]> OCCT Git - occt.git/commitdiff
0033374: Coding - Static Analyzing checking CR33374
authordpasukhi <dpasukhi@opencascade.com>
Sat, 6 May 2023 20:06:21 +0000 (20:06 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Sat, 6 May 2023 20:06:21 +0000 (20:06 +0000)
// Not processed changes.
Need to be cleared

2186 files changed:
src/AIS/AIS_AttributeFilter.hxx
src/AIS/AIS_Axis.cxx
src/AIS/AIS_Axis.hxx
src/AIS/AIS_BadEdgeFilter.cxx
src/AIS/AIS_C0RegularityFilter.cxx
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_InteractiveContext.hxx
src/AIS/AIS_LightSource.hxx
src/AIS/AIS_Manipulator.cxx
src/AIS/AIS_Plane.cxx
src/AIS/AIS_Plane.hxx
src/AIS/AIS_PlaneTrihedron.cxx
src/AIS/AIS_Shape.cxx
src/AIS/AIS_TextLabel.cxx
src/AIS/AIS_TexturedShape.cxx
src/AIS/AIS_Triangulation.cxx
src/AIS/AIS_Trihedron.hxx
src/AIS/AIS_XRTrackedDevice.cxx
src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx
src/APIHeaderSection/APIHeaderSection_MakeHeader.hxx
src/Adaptor2d/Adaptor2d_OffsetCurve.cxx
src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx
src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx
src/Adaptor3d/Adaptor3d_InterFunc.cxx
src/Adaptor3d/Adaptor3d_IsoCurve.cxx
src/Adaptor3d/Adaptor3d_TopolTool.cxx
src/Adaptor3d/Adaptor3d_TopolTool.hxx
src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx
src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx
src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx
src/AdvApp2Var/AdvApp2Var_Context.cxx
src/AdvApp2Var/AdvApp2Var_Framework.cxx
src/AdvApp2Var/AdvApp2Var_Iso.cxx
src/AdvApp2Var/AdvApp2Var_MathBase.cxx
src/AdvApp2Var/AdvApp2Var_Network.cxx
src/AdvApp2Var/AdvApp2Var_Patch.cxx
src/AdvApp2Var/AdvApp2Var_SysBase.cxx
src/AdvApp2Var/AdvApp2Var_SysBase.hxx
src/AdvApprox/AdvApprox_ApproxAFunction.cxx
src/AdvApprox/AdvApprox_ApproxAFunction.hxx
src/AdvApprox/AdvApprox_PrefAndRec.cxx
src/AdvApprox/AdvApprox_PrefCutting.cxx
src/AdvApprox/AdvApprox_SimpleApprox.cxx
src/AdvApprox/AdvApprox_SimpleApprox.hxx
src/AppCont/AppCont_ContMatrices.cxx
src/AppCont/AppCont_ContMatrices_1.cxx
src/AppCont/AppCont_ContMatrices_2.cxx
src/AppCont/AppCont_ContMatrices_3.cxx
src/AppCont/AppCont_ContMatrices_4.cxx
src/AppCont/AppCont_LeastSquare.cxx
src/AppCont/AppCont_LeastSquare.hxx
src/AppDef/AppDef_LinearCriteria.cxx
src/AppDef/AppDef_LinearCriteria.hxx
src/AppDef/AppDef_MultiLine.cxx
src/AppDef/AppDef_MultiPointConstraint.cxx
src/AppDef/AppDef_MyLineTool.cxx
src/AppDef/AppDef_Variational.cxx
src/AppDef/AppDef_Variational.hxx
src/AppParCurves/AppParCurves.cxx
src/AppParCurves/AppParCurves_ConstraintCouple.cxx
src/AppParCurves/AppParCurves_MultiBSpCurve.cxx
src/AppParCurves/AppParCurves_MultiCurve.cxx
src/AppParCurves/AppParCurves_MultiPoint.cxx
src/Approx/Approx_Curve2d.cxx
src/Approx/Approx_Curve3d.cxx
src/Approx/Approx_CurveOnSurface.cxx
src/Approx/Approx_CurveOnSurface.hxx
src/Approx/Approx_CurvilinearParameter.cxx
src/Approx/Approx_CurvilinearParameter.hxx
src/Approx/Approx_CurvlinFunc.cxx
src/Approx/Approx_CurvlinFunc.hxx
src/Approx/Approx_MCurvesToBSpCurve.cxx
src/Approx/Approx_SameParameter.cxx
src/Approx/Approx_SameParameter.hxx
src/Approx/Approx_SweepApproximation.cxx
src/Approx/Approx_SweepApproximation.hxx
src/ApproxInt/ApproxInt_KnotTools.cxx
src/Aspect/Aspect_Background.cxx
src/Aspect/Aspect_CircularGrid.cxx
src/Aspect/Aspect_CircularGrid.hxx
src/Aspect/Aspect_DisplayConnection.cxx [changed mode: 0755->0644]
src/Aspect/Aspect_GradientBackground.cxx
src/Aspect/Aspect_RectangularGrid.hxx
src/Aspect/Aspect_Window.hxx
src/Aspect/Aspect_WindowInputListener.hxx
src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx
src/BOPAlgo/BOPAlgo_BOP.cxx
src/BOPAlgo/BOPAlgo_BOP.hxx
src/BOPAlgo/BOPAlgo_Builder.cxx
src/BOPAlgo/BOPAlgo_BuilderFace.cxx
src/BOPAlgo/BOPAlgo_BuilderSolid.cxx
src/BOPAlgo/BOPAlgo_Builder_1.cxx
src/BOPAlgo/BOPAlgo_Builder_2.cxx
src/BOPAlgo/BOPAlgo_Builder_3.cxx
src/BOPAlgo/BOPAlgo_CellsBuilder.cxx
src/BOPAlgo/BOPAlgo_CheckerSI.cxx
src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx
src/BOPAlgo/BOPAlgo_MakerVolume.cxx
src/BOPAlgo/BOPAlgo_PaveFiller.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_11.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_9.cxx
src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx
src/BOPAlgo/BOPAlgo_Section.cxx
src/BOPAlgo/BOPAlgo_ShellSplitter.cxx
src/BOPAlgo/BOPAlgo_Tools.cxx
src/BOPAlgo/BOPAlgo_WireSplitter.cxx
src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx
src/BOPDS/BOPDS_CommonBlock.cxx
src/BOPDS/BOPDS_DS.cxx
src/BOPDS/BOPDS_Iterator.cxx
src/BOPDS/BOPDS_IteratorSI.cxx
src/BOPDS/BOPDS_PaveBlock.cxx [changed mode: 0755->0644]
src/BOPDS/BOPDS_SubIterator.cxx
src/BOPDS/BOPDS_SubIterator.hxx
src/BOPTools/BOPTools_AlgoTools.cxx
src/BOPTools/BOPTools_AlgoTools2D.cxx
src/BOPTools/BOPTools_AlgoTools2D_1.cxx
src/BOPTools/BOPTools_AlgoTools3D.cxx
src/BOPTools/BOPTools_AlgoTools_1.cxx
src/BOPTools/BOPTools_AlgoTools_2.cxx
src/BOPTools/BOPTools_Set.cxx
src/BRep/BRep_Tool.cxx
src/BRepAdaptor/BRepAdaptor_CompCurve.cxx
src/BRepAdaptor/BRepAdaptor_Curve.cxx
src/BRepAdaptor/BRepAdaptor_Curve2d.cxx
src/BRepAdaptor/BRepAdaptor_Surface.cxx
src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx
src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.cxx
src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx
src/BRepAlgoAPI/BRepAlgoAPI_Section.hxx
src/BRepAlgoAPI/BRepAlgoAPI_Splitter.cxx
src/BRepApprox/BRepApprox_ApproxLine.cxx
src/BRepBndLib/BRepBndLib.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx
src/BRepBuilderAPI/BRepBuilderAPI_FastSewing.cxx
src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.cxx
src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx
src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx
src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx
src/BRepCheck/BRepCheck_Edge.cxx
src/BRepCheck/BRepCheck_Face.cxx
src/BRepCheck/BRepCheck_Shell.cxx
src/BRepCheck/BRepCheck_Solid.cxx
src/BRepCheck/BRepCheck_Wire.cxx
src/BRepClass/BRepClass_FaceClassifier.cxx
src/BRepClass/BRepClass_FaceExplorer.cxx
src/BRepClass/BRepClass_Intersector.cxx
src/BRepClass3d/BRepClass3d.cxx
src/BRepClass3d/BRepClass3d_BndBoxTree.cxx
src/BRepClass3d/BRepClass3d_SClassifier.cxx
src/BRepClass3d/BRepClass3d_SolidClassifier.cxx
src/BRepClass3d/BRepClass3d_SolidClassifier.hxx
src/BRepClass3d/BRepClass3d_SolidExplorer.cxx
src/BRepClass3d/BRepClass3d_SolidExplorer.hxx
src/BRepExtrema/BRepExtrema_DistShapeShape.cxx
src/BRepExtrema/BRepExtrema_DistanceSS.cxx
src/BRepExtrema/BRepExtrema_ExtCC.cxx
src/BRepExtrema/BRepExtrema_ExtCF.cxx
src/BRepExtrema/BRepExtrema_ExtFF.cxx
src/BRepExtrema/BRepExtrema_ExtPC.cxx
src/BRepExtrema/BRepExtrema_ExtPF.cxx
src/BRepExtrema/BRepExtrema_OverlapTool.cxx
src/BRepExtrema/BRepExtrema_OverlapTool.hxx
src/BRepExtrema/BRepExtrema_Poly.cxx
src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx
src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx
src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx
src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx
src/BRepExtrema/BRepExtrema_SelfIntersection.cxx
src/BRepExtrema/BRepExtrema_SelfIntersection.hxx
src/BRepExtrema/BRepExtrema_ShapeProximity.hxx
src/BRepExtrema/BRepExtrema_TriangleSet.cxx
src/BRepGProp/BRepGProp.cxx
src/BRepGProp/BRepGProp_Cinert.cxx
src/BRepGProp/BRepGProp_Face.cxx
src/BRepGProp/BRepGProp_Gauss.cxx
src/BRepGProp/BRepGProp_MeshCinert.cxx
src/BRepGProp/BRepGProp_MeshProps.cxx
src/BRepGProp/BRepGProp_Sinert.hxx
src/BRepGProp/BRepGProp_TFunction.cxx
src/BRepGProp/BRepGProp_UFunction.cxx
src/BRepGProp/BRepGProp_Vinert.hxx
src/BRepGProp/BRepGProp_VinertGK.cxx
src/BRepGProp/BRepGProp_VinertGK.hxx
src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx
src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx
src/BRepLib/BRepLib.cxx
src/BRepLib/BRepLib_1.cxx
src/BRepLib/BRepLib_CheckCurveOnSurface.cxx
src/BRepLib/BRepLib_FindSurface.cxx
src/BRepLib/BRepLib_FindSurface.hxx
src/BRepLib/BRepLib_FuseEdges.cxx
src/BRepLib/BRepLib_MakeEdge.cxx
src/BRepLib/BRepLib_MakeEdge2d.cxx
src/BRepLib/BRepLib_MakeFace.cxx
src/BRepLib/BRepLib_MakeShell.cxx
src/BRepLib/BRepLib_MakeWire.cxx
src/BRepLib/BRepLib_MakeWire_1.cxx
src/BRepLib/BRepLib_PointCloudShape.cxx
src/BRepLib/BRepLib_ValidateEdge.cxx
src/BRepMAT2d/BRepMAT2d_BisectingLocus.cxx
src/BRepMAT2d/BRepMAT2d_Explorer.cxx
src/BRepMAT2d/BRepMAT2d_Explorer.hxx
src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.cxx
src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx
src/BRepMesh/BRepMesh_BaseMeshAlgo.cxx
src/BRepMesh/BRepMesh_CircleTool.cxx
src/BRepMesh/BRepMesh_Classifier.cxx
src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx
src/BRepMesh/BRepMesh_CurveTessellator.cxx
src/BRepMesh/BRepMesh_CurveTessellator.hxx
src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx
src/BRepMesh/BRepMesh_Deflection.cxx
src/BRepMesh/BRepMesh_Delaun.cxx
src/BRepMesh/BRepMesh_Delaun.hxx [changed mode: 0755->0644]
src/BRepMesh/BRepMesh_EdgeDiscret.cxx
src/BRepMesh/BRepMesh_FaceChecker.cxx
src/BRepMesh/BRepMesh_GeomTool.cxx
src/BRepMesh/BRepMesh_IncrementalMesh.hxx
src/BRepMesh/BRepMesh_ModelBuilder.cxx
src/BRepMesh/BRepMesh_ModelPreProcessor.cxx
src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx
src/BRepMesh/BRepMesh_ShapeTool.cxx
src/BRepMesh/BRepMesh_TorusRangeSplitter.cxx
src/BRepMesh/BRepMesh_VertexTool.cxx
src/BRepMesh/BRepMesh_VertexTool.hxx
src/BRepMesh/delabella.cpp
src/BRepPrim/BRepPrim_Cone.hxx
src/BRepPrim/BRepPrim_FaceBuilder.cxx
src/BRepPrim/BRepPrim_GWedge.cxx
src/BRepPrim/BRepPrim_GWedge.hxx
src/BRepPrim/BRepPrim_OneAxis.cxx
src/BRepPrim/BRepPrim_OneAxis.hxx
src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.cxx
src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx
src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx
src/BRepSweep/BRepSweep_Rotation.cxx
src/BRepSweep/BRepSweep_Translation.cxx
src/BRepSweep/BRepSweep_Trsf.cxx
src/BRepTools/BRepTools.cxx
src/BRepTools/BRepTools.hxx
src/BRepTools/BRepTools_CopyModification.cxx
src/BRepTools/BRepTools_GTrsfModification.cxx
src/BRepTools/BRepTools_Modifier.cxx
src/BRepTools/BRepTools_NurbsConvertModification.cxx
src/BRepTools/BRepTools_PurgeLocations.cxx
src/BRepTools/BRepTools_Quilt.cxx
src/BRepTools/BRepTools_ReShape.cxx
src/BRepTools/BRepTools_ShapeSet.cxx
src/BRepTools/BRepTools_Substitution.cxx
src/BRepTools/BRepTools_TrsfModification.cxx
src/BRepTools/BRepTools_WireExplorer.cxx
src/BRepTools/BRepTools_WireExplorer.hxx
src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx
src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx
src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx
src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx
src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx
src/BSplCLib/BSplCLib.cxx
src/BSplCLib/BSplCLib_2.cxx
src/BSplCLib/BSplCLib_BzSyntaxes.cxx
src/BSplSLib/BSplSLib.cxx
src/BSplSLib/BSplSLib_BzSyntaxes.cxx
src/BVH/BVH_BuildQueue.cxx
src/BinTools/BinTools_Curve2dSet.cxx
src/BinTools/BinTools_CurveSet.cxx
src/BinTools/BinTools_IStream.cxx
src/BinTools/BinTools_LocationSet.cxx
src/BinTools/BinTools_OStream.hxx
src/BinTools/BinTools_ShapeReader.cxx
src/BinTools/BinTools_ShapeSet.cxx
src/BinTools/BinTools_ShapeWriter.cxx
src/BinTools/BinTools_SurfaceSet.cxx
src/Bisector/Bisector_Bisec.cxx
src/Bisector/Bisector_BisecAna.cxx
src/Bisector/Bisector_BisecCC.cxx
src/Bisector/Bisector_BisecCC.hxx
src/Bisector/Bisector_BisecPC.cxx
src/Bisector/Bisector_BisecPC.hxx
src/Bisector/Bisector_FunctionH.cxx
src/Bisector/Bisector_FunctionInter.cxx
src/Bisector/Bisector_Inter.cxx
src/Bisector/Bisector_PointOnBis.cxx
src/Bisector/Bisector_PolyBis.cxx
src/Bnd/Bnd_BoundSortBox.cxx
src/Bnd/Bnd_BoundSortBox.hxx
src/Bnd/Bnd_Box.cxx
src/Bnd/Bnd_Box.hxx
src/Bnd/Bnd_Box2d.cxx
src/Bnd/Bnd_OBB.cxx
src/Bnd/Bnd_Sphere.cxx
src/BndLib/BndLib.cxx
src/BndLib/BndLib_Add2dCurve.cxx
src/BndLib/BndLib_Add3dCurve.cxx
src/BndLib/BndLib_AddSurface.cxx
src/CDF/CDF_Application.cxx
src/CDF/CDF_Store.cxx
src/CDF/CDF_Store.hxx
src/CDF/CDF_StoreList.cxx
src/CDM/CDM_Application.cxx
src/CDM/CDM_Document.cxx
src/CDM/CDM_Reference.cxx
src/CPnts/CPnts_AbscissaPoint.hxx
src/CPnts/CPnts_UniformDeflection.cxx
src/CPnts/CPnts_UniformDeflection.hxx
src/CSLib/CSLib.cxx
src/CSLib/CSLib_Class2d.cxx
src/CSLib/CSLib_Class2d.hxx
src/CSLib/CSLib_NormalPolyDef.cxx
src/Contap/Contap_ArcFunction.cxx
src/Contap/Contap_ContAna.cxx
src/Contap/Contap_Contour.cxx
src/Contap/Contap_HContTool.cxx
src/Contap/Contap_Line.cxx
src/Contap/Contap_Line.hxx
src/Contap/Contap_SurfFunction.cxx
src/Convert/Convert_CircleToBSplineCurve.cxx
src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx
src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.hxx
src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx
src/Convert/Convert_CompBezierCurvesToBSplineCurve.hxx
src/Convert/Convert_CompPolynomialToPoles.cxx
src/Convert/Convert_ConeToBSplineSurface.cxx
src/Convert/Convert_ConicToBSplineCurve.cxx
src/Convert/Convert_ConicToBSplineCurve.hxx
src/Convert/Convert_CylinderToBSplineSurface.cxx
src/Convert/Convert_ElementarySurfaceToBSplineSurface.hxx
src/Convert/Convert_EllipseToBSplineCurve.cxx
src/Convert/Convert_GridPolynomialToPoles.cxx
src/Convert/Convert_PolynomialCosAndSin.cxx
src/Convert/Convert_SphereToBSplineSurface.cxx
src/Convert/Convert_TorusToBSplineSurface.cxx
src/DBRep/DBRep.cxx
src/DBRep/DBRep_DrawableShape.cxx
src/DBRep/DBRep_DrawableShape.hxx
src/DBRep/DBRep_HideData.cxx
src/DBRep/DBRep_IsoBuilder.cxx
src/DE/DE_ConfigurationContext.cxx
src/DE/DE_ConfigurationNode.cxx
src/DE/DE_Wrapper.cxx
src/Draw/Draw.cxx
src/Draw/Draw_BasicCommands.cxx
src/Draw/Draw_GraphicCommands.cxx
src/Draw/Draw_Grid.cxx
src/Draw/Draw_Interpretor.cxx
src/Draw/Draw_PloadCommands.cxx
src/Draw/Draw_ProgressIndicator.cxx
src/Draw/Draw_VariableCommands.cxx
src/Draw/Draw_View.hxx
src/Draw/Draw_Viewer.cxx
src/Draw/Draw_Viewer.hxx
src/Draw/Draw_Window.cxx
src/DrawTrSurf/DrawTrSurf.cxx
src/DrawTrSurf/DrawTrSurf_BSplineCurve.cxx
src/DrawTrSurf/DrawTrSurf_BSplineCurve2d.cxx
src/DrawTrSurf/DrawTrSurf_BSplineSurface.cxx
src/DrawTrSurf/DrawTrSurf_BezierCurve.cxx
src/DrawTrSurf/DrawTrSurf_BezierCurve2d.cxx
src/DrawTrSurf/DrawTrSurf_BezierSurface.cxx
src/DrawTrSurf/DrawTrSurf_Curve.cxx
src/DrawTrSurf/DrawTrSurf_Curve2d.cxx
src/DrawTrSurf/DrawTrSurf_Drawable.cxx
src/DrawTrSurf/DrawTrSurf_Point.cxx
src/DrawTrSurf/DrawTrSurf_Surface.cxx
src/DrawTrSurf/DrawTrSurf_Triangulation.cxx
src/DrawTrSurf/DrawTrSurf_Triangulation2D.cxx
src/DsgPrs/DsgPrs.cxx
src/DsgPrs/DsgPrs_AnglePresentation.cxx
src/DsgPrs/DsgPrs_ConcentricPresentation.cxx
src/DsgPrs/DsgPrs_DatumPrs.cxx
src/DsgPrs/DsgPrs_DiameterPresentation.cxx
src/DsgPrs/DsgPrs_EqualDistancePresentation.cxx
src/DsgPrs/DsgPrs_EqualRadiusPresentation.cxx
src/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx
src/DsgPrs/DsgPrs_LengthPresentation.cxx
src/DsgPrs/DsgPrs_OffsetPresentation.cxx
src/DsgPrs/DsgPrs_ParalPresentation.cxx
src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx
src/DsgPrs/DsgPrs_SymmetricPresentation.cxx
src/ElSLib/ElSLib.cxx
src/ExpToCasExe/ExpToCasExe.cxx
src/ExpToCasExe/exptocas.tab.cxx
src/ExpToCasExe/exptocas.tab.hxx
src/ExpToCasExe/lex.exptocas.cxx
src/Expr/Expr_FunctionDerivative.cxx
src/Expr/Expr_NamedConstant.cxx
src/Expr/Expr_NamedExpression.cxx
src/Expr/Expr_NamedFunction.cxx
src/Expr/Expr_NumericValue.cxx
src/Expr/Expr_PolyExpression.cxx
src/Expr/Expr_PolyFunction.cxx
src/Expr/Expr_Product.cxx
src/Expr/Expr_RUIterator.cxx
src/Expr/Expr_Sum.cxx
src/Expr/Expr_UnknownIterator.cxx
src/ExprIntrp/ExprIntrp_GenExp.cxx
src/ExprIntrp/ExprIntrp_GenFct.cxx
src/ExprIntrp/ExprIntrp_GenRel.cxx
src/ExprIntrp/ExprIntrp_yaccintrf.cxx
src/Express/Express_ComplexType.cxx
src/Express/Express_Entity.cxx
src/Express/Express_Field.cxx
src/Express/Express_Item.cxx
src/Express/Express_NamedType.cxx
src/Express/Express_Reference.cxx
src/Express/Express_Schema.cxx
src/Express/Express_Select.cxx
src/Extrema/Extrema_Curve2dTool.cxx
src/Extrema/Extrema_CurveTool.cxx
src/Extrema/Extrema_ExtCC.cxx
src/Extrema/Extrema_ExtCC.hxx
src/Extrema/Extrema_ExtCC2d.cxx
src/Extrema/Extrema_ExtCC2d.hxx
src/Extrema/Extrema_ExtCS.cxx
src/Extrema/Extrema_ExtCS.hxx
src/Extrema/Extrema_ExtElC.cxx
src/Extrema/Extrema_ExtElC.hxx
src/Extrema/Extrema_ExtElC2d.cxx
src/Extrema/Extrema_ExtElC2d.hxx
src/Extrema/Extrema_ExtElCS.cxx
src/Extrema/Extrema_ExtElCS.hxx
src/Extrema/Extrema_ExtElSS.cxx
src/Extrema/Extrema_ExtElSS.hxx
src/Extrema/Extrema_ExtPElC.cxx
src/Extrema/Extrema_ExtPElC.hxx
src/Extrema/Extrema_ExtPElC2d.cxx
src/Extrema/Extrema_ExtPElC2d.hxx
src/Extrema/Extrema_ExtPElS.cxx
src/Extrema/Extrema_ExtPElS.hxx
src/Extrema/Extrema_ExtPExtS.cxx
src/Extrema/Extrema_ExtPExtS.hxx
src/Extrema/Extrema_ExtPRevS.cxx
src/Extrema/Extrema_ExtPRevS.hxx
src/Extrema/Extrema_ExtPS.cxx
src/Extrema/Extrema_ExtPS.hxx
src/Extrema/Extrema_ExtSS.cxx
src/Extrema/Extrema_ExtSS.hxx
src/Extrema/Extrema_FuncExtCS.cxx
src/Extrema/Extrema_FuncExtCS.hxx
src/Extrema/Extrema_FuncExtSS.cxx
src/Extrema/Extrema_FuncPSNorm.cxx
src/Extrema/Extrema_GenExtCS.cxx
src/Extrema/Extrema_GenExtCS.hxx
src/Extrema/Extrema_GenExtPS.cxx
src/Extrema/Extrema_GenExtPS.hxx
src/Extrema/Extrema_GenExtSS.cxx
src/Extrema/Extrema_GenExtSS.hxx
src/Extrema/Extrema_GenLocateExtCS.cxx
src/Extrema/Extrema_GenLocateExtCS.hxx
src/Extrema/Extrema_GenLocateExtPS.cxx
src/Extrema/Extrema_GenLocateExtSS.cxx
src/Extrema/Extrema_GenLocateExtSS.hxx
src/Extrema/Extrema_GlobOptFuncCC.cxx
src/Extrema/Extrema_GlobOptFuncCQuadric.cxx
src/Extrema/Extrema_GlobOptFuncCQuadric.hxx
src/Extrema/Extrema_GlobOptFuncCS.cxx
src/Extrema/Extrema_GlobOptFuncConicS.cxx
src/Extrema/Extrema_GlobOptFuncConicS.hxx
src/FEmTool/FEmTool_Assembly.cxx
src/FEmTool/FEmTool_Curve.cxx
src/FEmTool/FEmTool_Curve.hxx
src/FEmTool/FEmTool_ElementsOfRefMatrix.cxx
src/FEmTool/FEmTool_LinearFlexion.cxx
src/FEmTool/FEmTool_LinearJerk.cxx
src/FEmTool/FEmTool_LinearTension.cxx
src/FEmTool/FEmTool_ProfileMatrix.cxx
src/FSD/FSD_BinaryFile.cxx
src/FSD/FSD_BinaryFile.hxx
src/FSD/FSD_CmpFile.cxx
src/FSD/FSD_File.cxx
src/FairCurve/FairCurve_Batten.cxx
src/FairCurve/FairCurve_DistributionOfEnergy.cxx
src/FairCurve/FairCurve_DistributionOfEnergy.hxx
src/FairCurve/FairCurve_DistributionOfJerk.cxx
src/FairCurve/FairCurve_DistributionOfSagging.cxx
src/FairCurve/FairCurve_DistributionOfTension.cxx
src/FairCurve/FairCurve_Energy.cxx
src/FairCurve/FairCurve_EnergyOfBatten.cxx
src/FairCurve/FairCurve_EnergyOfMVC.cxx
src/FairCurve/FairCurve_MinimalVariation.cxx
src/Font/Font_FTFont.cxx [changed mode: 0755->0644]
src/Font/Font_FontMgr.cxx
src/Font/Font_SystemFont.hxx
src/Font/Font_TextFormatter.cxx
src/GC/GC_MakeArcOfCircle.cxx
src/GC/GC_MakeArcOfEllipse.cxx
src/GC/GC_MakeArcOfHyperbola.cxx
src/GC/GC_MakeArcOfParabola.cxx
src/GC/GC_MakeCircle.cxx
src/GC/GC_MakeConicalSurface.cxx
src/GC/GC_MakeCylindricalSurface.cxx
src/GC/GC_MakeEllipse.cxx
src/GC/GC_MakeHyperbola.cxx
src/GC/GC_MakeLine.cxx
src/GC/GC_MakeMirror.cxx
src/GC/GC_MakePlane.cxx
src/GC/GC_MakeRotation.cxx
src/GC/GC_MakeScale.cxx
src/GC/GC_MakeSegment.cxx
src/GC/GC_MakeTranslation.cxx
src/GC/GC_MakeTrimmedCone.cxx
src/GC/GC_MakeTrimmedCylinder.cxx
src/GCE2d/GCE2d_MakeArcOfCircle.cxx
src/GCE2d/GCE2d_MakeArcOfEllipse.cxx
src/GCE2d/GCE2d_MakeArcOfHyperbola.cxx
src/GCE2d/GCE2d_MakeArcOfParabola.cxx
src/GCE2d/GCE2d_MakeCircle.cxx
src/GCE2d/GCE2d_MakeEllipse.cxx
src/GCE2d/GCE2d_MakeHyperbola.cxx
src/GCE2d/GCE2d_MakeLine.cxx
src/GCE2d/GCE2d_MakeMirror.cxx
src/GCE2d/GCE2d_MakeParabola.cxx
src/GCE2d/GCE2d_MakeRotation.cxx
src/GCE2d/GCE2d_MakeScale.cxx
src/GCE2d/GCE2d_MakeSegment.cxx
src/GCE2d/GCE2d_MakeTranslation.cxx
src/GCPnts/GCPnts_TangentialDeflection.cxx
src/GProp/GProp_CelGProps.cxx
src/GProp/GProp_GProps.cxx
src/GProp/GProp_PEquation.cxx
src/GProp/GProp_PGProps.cxx
src/GProp/GProp_SelGProps.cxx
src/GProp/GProp_VelGProps.cxx
src/GccAna/GccAna_Circ2d2TanOn.cxx
src/GccAna/GccAna_Circ2d2TanOn_1.cxx
src/GccAna/GccAna_Circ2d2TanOn_10.cxx
src/GccAna/GccAna_Circ2d2TanOn_11.cxx
src/GccAna/GccAna_Circ2d2TanOn_2.cxx
src/GccAna/GccAna_Circ2d2TanOn_3.cxx
src/GccAna/GccAna_Circ2d2TanOn_4.cxx
src/GccAna/GccAna_Circ2d2TanOn_5.cxx
src/GccAna/GccAna_Circ2d2TanOn_6.cxx
src/GccAna/GccAna_Circ2d2TanOn_7.cxx
src/GccAna/GccAna_Circ2d2TanOn_8.cxx
src/GccAna/GccAna_Circ2d2TanOn_9.cxx
src/GccAna/GccAna_Circ2d2TanRad.cxx
src/GccAna/GccAna_Circ2d2TanRad_1.cxx
src/GccAna/GccAna_Circ2d2TanRad_2.cxx
src/GccAna/GccAna_Circ2d2TanRad_3.cxx
src/GccAna/GccAna_Circ2d2TanRad_4.cxx
src/GccAna/GccAna_Circ2d2TanRad_5.cxx
src/GccAna/GccAna_Circ2d3Tan.cxx
src/GccAna/GccAna_Circ2d3Tan_1.cxx
src/GccAna/GccAna_Circ2d3Tan_2.cxx
src/GccAna/GccAna_Circ2d3Tan_3.cxx
src/GccAna/GccAna_Circ2d3Tan_4.cxx
src/GccAna/GccAna_Circ2d3Tan_5.cxx
src/GccAna/GccAna_Circ2d3Tan_6.cxx
src/GccAna/GccAna_Circ2d3Tan_7.cxx
src/GccAna/GccAna_Circ2d3Tan_8.cxx
src/GccAna/GccAna_Circ2d3Tan_9.cxx
src/GccAna/GccAna_Circ2dBisec.cxx
src/GccAna/GccAna_Circ2dTanCen.cxx
src/GccAna/GccAna_Circ2dTanOnRad.cxx
src/GccAna/GccAna_Circ2dTanOnRad_1.cxx
src/GccAna/GccAna_Circ2dTanOnRad_2.cxx
src/GccAna/GccAna_Circ2dTanOnRad_3.cxx
src/GccAna/GccAna_Circ2dTanOnRad_4.cxx
src/GccAna/GccAna_Circ2dTanOnRad_5.cxx
src/GccAna/GccAna_CircLin2dBisec.cxx
src/GccAna/GccAna_CircPnt2dBisec.cxx
src/GccAna/GccAna_CircPnt2dBisec.hxx
src/GccAna/GccAna_Lin2d2Tan.cxx
src/GccAna/GccAna_Lin2dBisec.cxx
src/GccAna/GccAna_Lin2dTanObl.cxx
src/GccAna/GccAna_Lin2dTanPar.cxx
src/GccAna/GccAna_Lin2dTanPer.cxx
src/GccAna/GccAna_LinPnt2dBisec.cxx
src/GccAna/GccAna_Pnt2dBisec.cxx
src/GccEnt/GccEnt_QualifiedLin.cxx
src/Geom/Geom_Axis2Placement.cxx
src/Geom/Geom_BSplineCurve.cxx
src/Geom/Geom_BSplineCurve.hxx
src/Geom/Geom_BSplineCurve_1.cxx
src/Geom/Geom_BSplineSurface.cxx
src/Geom/Geom_BSplineSurface.hxx
src/Geom/Geom_BSplineSurface_1.cxx
src/Geom/Geom_BezierCurve.cxx
src/Geom/Geom_BezierCurve.hxx
src/Geom/Geom_BezierSurface.cxx
src/Geom/Geom_BezierSurface.hxx
src/Geom/Geom_Ellipse.cxx
src/Geom/Geom_Hyperbola.cxx
src/Geom/Geom_OffsetSurface.cxx
src/Geom/Geom_OsculatingSurface.cxx
src/Geom/Geom_OsculatingSurface.hxx
src/Geom/Geom_Parabola.cxx
src/Geom/Geom_RectangularTrimmedSurface.cxx
src/Geom/Geom_RectangularTrimmedSurface.hxx
src/Geom/Geom_Surface.cxx
src/Geom/Geom_SurfaceOfLinearExtrusion.cxx
src/Geom2d/Geom2d_AxisPlacement.cxx
src/Geom2d/Geom2d_BSplineCurve.cxx
src/Geom2d/Geom2d_BSplineCurve.hxx
src/Geom2d/Geom2d_BSplineCurve_1.cxx
src/Geom2d/Geom2d_BezierCurve.cxx
src/Geom2d/Geom2d_BezierCurve.hxx
src/Geom2d/Geom2d_Ellipse.cxx
src/Geom2d/Geom2d_Hyperbola.cxx
src/Geom2d/Geom2d_Parabola.cxx
src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.cxx
src/Geom2dAPI/Geom2dAPI_InterCurveCurve.cxx
src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx
src/Geom2dAPI/Geom2dAPI_Interpolate.cxx
src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx
src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx
src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.cxx
src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.hxx
src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx
src/Geom2dConvert/Geom2dConvert.cxx
src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.cxx
src/Geom2dConvert/Geom2dConvert_ApproxCurve.cxx
src/Geom2dConvert/Geom2dConvert_ApproxCurve.hxx
src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.cxx
src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.cxx
src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx
src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx
src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx
src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.cxx
src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx
src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx
src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx
src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.cxx
src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx
src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.cxx
src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.cxx
src/Geom2dGcc/Geom2dGcc_FunctionTanObl.cxx
src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx
src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.cxx
src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx
src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.cxx
src/Geom2dGcc/Geom2dGcc_QCurve.cxx
src/Geom2dGcc/Geom2dGcc_QualifiedCurve.cxx
src/Geom2dHatch/Geom2dHatch_Elements.cxx
src/Geom2dHatch/Geom2dHatch_Hatcher.cxx
src/Geom2dHatch/Geom2dHatch_Hatching.cxx
src/Geom2dLProp/Geom2dLProp_FuncCurExt.cxx
src/Geom2dLProp/Geom2dLProp_FuncCurNul.cxx
src/Geom2dLProp/Geom2dLProp_NumericCurInf2d.cxx
src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx
src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx
src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx
src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx
src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx
src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx
src/GeomAPI/GeomAPI_Interpolate.cxx
src/GeomAPI/GeomAPI_PointsToBSpline.cxx
src/GeomAPI/GeomAPI_PointsToBSplineSurface.cxx
src/GeomAPI/GeomAPI_ProjectPointOnCurve.cxx
src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx
src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx
src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx
src/GeomAdaptor/GeomAdaptor.cxx
src/GeomAdaptor/GeomAdaptor_Curve.cxx
src/GeomAdaptor/GeomAdaptor_Surface.cxx
src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx
src/GeomConvert/GeomConvert.cxx
src/GeomConvert/GeomConvert_1.cxx
src/GeomConvert/GeomConvert_ApproxCurve.cxx
src/GeomConvert/GeomConvert_ApproxCurve.hxx
src/GeomConvert/GeomConvert_ApproxSurface.cxx
src/GeomConvert/GeomConvert_ApproxSurface.hxx
src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.cxx
src/GeomConvert/GeomConvert_BSplineSurfaceKnotSplitting.cxx
src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.cxx
src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.cxx
src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx
src/GeomConvert/GeomConvert_CompCurveToBSplineCurve.cxx
src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx
src/GeomConvert/GeomConvert_FuncConeLSDist.cxx
src/GeomConvert/GeomConvert_FuncCylinderLSDist.cxx
src/GeomConvert/GeomConvert_FuncSphereLSDist.cxx
src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx
src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx
src/GeomEvaluator/GeomEvaluator_OffsetCurve.cxx
src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx
src/GeomFill/GeomFill.cxx
src/GeomFill/GeomFill_BSplineCurves.cxx
src/GeomFill/GeomFill_BezierCurves.cxx
src/GeomFill/GeomFill_BoundWithSurf.cxx
src/GeomFill/GeomFill_Boundary.cxx
src/GeomFill/GeomFill_CircularBlendFunc.cxx
src/GeomFill/GeomFill_CircularBlendFunc.hxx
src/GeomFill/GeomFill_ConstantBiNormal.cxx
src/GeomFill/GeomFill_ConstrainedFilling.cxx
src/GeomFill/GeomFill_ConstrainedFilling.hxx
src/GeomFill/GeomFill_Coons.cxx
src/GeomFill/GeomFill_CoonsAlgPatch.cxx
src/GeomFill/GeomFill_CorrectedFrenet.cxx
src/GeomFill/GeomFill_CurveAndTrihedron.cxx
src/GeomFill/GeomFill_Curved.cxx
src/GeomFill/GeomFill_Darboux.cxx
src/GeomFill/GeomFill_DiscreteTrihedron.cxx [changed mode: 0755->0644]
src/GeomFill/GeomFill_DraftTrihedron.cxx
src/GeomFill/GeomFill_DraftTrihedron.hxx
src/GeomFill/GeomFill_EvolvedSection.cxx
src/GeomFill/GeomFill_EvolvedSection.hxx
src/GeomFill/GeomFill_Frenet.cxx
src/GeomFill/GeomFill_FunctionDraft.cxx
src/GeomFill/GeomFill_FunctionGuide.cxx
src/GeomFill/GeomFill_Generator.cxx
src/GeomFill/GeomFill_GuideTrihedronAC.cxx
src/GeomFill/GeomFill_GuideTrihedronAC.hxx
src/GeomFill/GeomFill_GuideTrihedronPlan.cxx
src/GeomFill/GeomFill_Line.cxx
src/GeomFill/GeomFill_LocFunction.cxx
src/GeomFill/GeomFill_LocationDraft.cxx
src/GeomFill/GeomFill_LocationGuide.cxx
src/GeomFill/GeomFill_LocationGuide.hxx
src/GeomFill/GeomFill_NSections.cxx
src/GeomFill/GeomFill_Pipe.cxx
src/GeomFill/GeomFill_Pipe.hxx
src/GeomFill/GeomFill_PlanFunc.cxx
src/GeomFill/GeomFill_PolynomialConvertor.cxx
src/GeomFill/GeomFill_Profiler.cxx
src/GeomFill/GeomFill_QuasiAngularConvertor.cxx
src/GeomFill/GeomFill_SectionGenerator.cxx
src/GeomFill/GeomFill_SectionPlacement.cxx
src/GeomFill/GeomFill_Stretch.cxx
src/GeomFill/GeomFill_Sweep.cxx
src/GeomFill/GeomFill_Sweep.hxx
src/GeomFill/GeomFill_SweepFunction.cxx
src/GeomFill/GeomFill_SweepSectionGenerator.cxx
src/GeomFill/GeomFill_SweepSectionGenerator.hxx
src/GeomFill/GeomFill_Tensor.cxx
src/GeomFill/GeomFill_UniformSection.cxx
src/GeomInt/GeomInt.cxx
src/GeomInt/GeomInt_IntSS.cxx
src/GeomInt/GeomInt_IntSS_1.cxx
src/GeomInt/GeomInt_LineConstructor.cxx
src/GeomInt/GeomInt_LineTool.cxx
src/GeomLProp/GeomLProp.cxx
src/GeomLib/GeomLib.cxx
src/GeomLib/GeomLib.hxx
src/GeomLib/GeomLib_Check2dBSplineCurve.cxx
src/GeomLib/GeomLib_CheckBSplineCurve.cxx
src/GeomLib/GeomLib_CheckCurveOnSurface.cxx
src/GeomLib/GeomLib_DenominatorMultiplier.cxx
src/GeomLib/GeomLib_Interpolate.cxx
src/GeomLib/GeomLib_IsPlanarSurface.cxx
src/GeomLib/GeomLib_LogSample.cxx
src/GeomLib/GeomLib_MakeCurvefromApprox.cxx
src/GeomLib/GeomLib_Tool.cxx
src/GeomPlate/GeomPlate_Aij.cxx
src/GeomPlate/GeomPlate_BuildAveragePlane.cxx
src/GeomPlate/GeomPlate_BuildAveragePlane.hxx
src/GeomPlate/GeomPlate_BuildPlateSurface.cxx
src/GeomPlate/GeomPlate_BuildPlateSurface.hxx
src/GeomPlate/GeomPlate_CurveConstraint.cxx
src/GeomPlate/GeomPlate_CurveConstraint.hxx
src/GeomPlate/GeomPlate_MakeApprox.cxx
src/GeomPlate/GeomPlate_PlateG0Criterion.cxx
src/GeomPlate/GeomPlate_PlateG1Criterion.cxx
src/GeomProjLib/GeomProjLib.cxx
src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx
src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx
src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx
src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx
src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx
src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx
src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx
src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx
src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx
src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx
src/GeomToStep/GeomToStep_MakeCircle.cxx
src/GeomToStep/GeomToStep_MakeConic.cxx
src/GeomToStep/GeomToStep_MakeConicalSurface.cxx
src/GeomToStep/GeomToStep_MakeCurve.cxx
src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx
src/GeomToStep/GeomToStep_MakeDirection.cxx
src/GeomToStep/GeomToStep_MakeElementarySurface.cxx
src/GeomToStep/GeomToStep_MakeEllipse.cxx
src/GeomToStep/GeomToStep_MakeHyperbola.cxx
src/GeomToStep/GeomToStep_MakeLine.cxx
src/GeomToStep/GeomToStep_MakeParabola.cxx
src/GeomToStep/GeomToStep_MakePlane.cxx
src/GeomToStep/GeomToStep_MakePolyline.cxx
src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx
src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx
src/GeomToStep/GeomToStep_MakeSurface.cxx
src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx
src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx
src/GeomToStep/GeomToStep_MakeSweptSurface.cxx
src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx
src/GeomToStep/GeomToStep_MakeVector.cxx
src/GeomTools/GeomTools_Curve2dSet.cxx
src/GeomTools/GeomTools_CurveSet.cxx
src/GeomTools/GeomTools_SurfaceSet.cxx
src/Graphic3d/Graphic3d_CStructure.cxx
src/Graphic3d/Graphic3d_CView.cxx
src/Graphic3d/Graphic3d_Camera.cxx
src/Graphic3d/Graphic3d_CubeMapOrder.cxx
src/Graphic3d/Graphic3d_CubeMapOrder.hxx
src/Graphic3d/Graphic3d_CubeMapPacked.cxx
src/Graphic3d/Graphic3d_CubeMapPacked.hxx
src/Graphic3d/Graphic3d_CubeMapSeparate.hxx
src/Graphic3d/Graphic3d_CullingTool.hxx
src/Graphic3d/Graphic3d_HatchStyle.cxx
src/Graphic3d/Graphic3d_Layer.hxx
src/Graphic3d/Graphic3d_LightSet.hxx
src/Graphic3d/Graphic3d_MarkerImage.cxx [changed mode: 0755->0644]
src/Graphic3d/Graphic3d_MaterialAspect.hxx
src/Graphic3d/Graphic3d_PBRMaterial.hxx
src/Graphic3d/Graphic3d_ShaderManager.hxx
src/Graphic3d/Graphic3d_Structure.cxx
src/Graphic3d/Graphic3d_StructureManager.cxx
src/Graphic3d/Graphic3d_Vertex.cxx
src/HLRAlgo/HLRAlgo_EdgeIterator.cxx
src/HLRAlgo/HLRAlgo_EdgesBlock.hxx
src/HLRAlgo/HLRAlgo_PolyAlgo.cxx
src/HLRAlgo/HLRAlgo_PolyData.cxx
src/HLRAlgo/HLRAlgo_PolyInternalData.cxx
src/HLRAlgo/HLRAlgo_PolyShellData.hxx
src/HLRAlgo/HLRAlgo_Projector.cxx
src/HLRAlgo/HLRAlgo_Projector.hxx
src/HLRAppli/HLRAppli_ReflectLines.cxx
src/HLRBRep/HLRBRep.cxx
src/HLRBRep/HLRBRep_BSurfaceTool.cxx
src/HLRBRep/HLRBRep_Curve.cxx
src/HLRBRep/HLRBRep_Curve.hxx
src/HLRBRep/HLRBRep_Data.cxx
src/HLRBRep/HLRBRep_Data.hxx
src/HLRBRep/HLRBRep_EdgeBuilder.hxx
src/HLRBRep/HLRBRep_EdgeFaceTool.cxx
src/HLRBRep/HLRBRep_EdgeIList.cxx
src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx
src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx
src/HLRBRep/HLRBRep_FaceData.hxx
src/HLRBRep/HLRBRep_FaceIterator.hxx
src/HLRBRep/HLRBRep_HLRToShape.cxx
src/HLRBRep/HLRBRep_Hider.cxx
src/HLRBRep/HLRBRep_InternalAlgo.cxx
src/HLRBRep/HLRBRep_Intersector.cxx
src/HLRBRep/HLRBRep_Intersector.hxx
src/HLRBRep/HLRBRep_PolyAlgo.cxx
src/HLRBRep/HLRBRep_PolyAlgo.hxx
src/HLRBRep/HLRBRep_PolyHLRToShape.cxx
src/HLRBRep/HLRBRep_PolyHLRToShape.hxx
src/HLRBRep/HLRBRep_ShapeToHLR.cxx
src/HLRBRep/HLRBRep_Surface.cxx
src/HLRBRep/HLRBRep_SurfaceTool.cxx
src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx
src/HLRTopoBRep/HLRTopoBRep_Data.hxx
src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx
src/HLRTopoBRep/HLRTopoBRep_OutLiner.cxx
src/Hatch/Hatch_Hatcher.cxx
src/Hatch/Hatch_Line.cxx
src/HatchGen/HatchGen_PointOnHatching.cxx
src/Hermit/Hermit.cxx
src/IFGraph/IFGraph_Articulations.cxx
src/IFGraph/IFGraph_Articulations.hxx
src/IFGraph/IFGraph_ConnectedComponants.cxx
src/IFGraph/IFGraph_SubPartsIterator.cxx
src/IFSelect/IFSelect_Activator.cxx
src/IFSelect/IFSelect_AppliedModifiers.cxx
src/IFSelect/IFSelect_BasicDumper.cxx
src/IFSelect/IFSelect_CheckCounter.cxx
src/IFSelect/IFSelect_ContextModif.cxx
src/IFSelect/IFSelect_DispPerSignature.cxx
src/IFSelect/IFSelect_EditForm.cxx
src/IFSelect/IFSelect_Editor.cxx
src/IFSelect/IFSelect_Functions.cxx
src/IFSelect/IFSelect_GeneralModifier.cxx
src/IFSelect/IFSelect_GraphCounter.cxx
src/IFSelect/IFSelect_IntParam.cxx
src/IFSelect/IFSelect_ListEditor.cxx
src/IFSelect/IFSelect_ModelCopier.cxx
src/IFSelect/IFSelect_ModifEditForm.cxx
src/IFSelect/IFSelect_ModifReorder.cxx
src/IFSelect/IFSelect_PacketList.cxx
src/IFSelect/IFSelect_ParamEditor.cxx
src/IFSelect/IFSelect_SelectAnyList.cxx
src/IFSelect/IFSelect_SelectCombine.cxx
src/IFSelect/IFSelect_SelectExplore.cxx
src/IFSelect/IFSelect_SelectExtract.cxx
src/IFSelect/IFSelect_SelectPointed.cxx
src/IFSelect/IFSelect_SelectRootComps.cxx
src/IFSelect/IFSelect_SelectRoots.cxx
src/IFSelect/IFSelect_SelectSent.cxx
src/IFSelect/IFSelect_SelectSignature.cxx
src/IFSelect/IFSelect_SelectSuite.cxx
src/IFSelect/IFSelect_SelectType.cxx
src/IFSelect/IFSelect_Selection.cxx
src/IFSelect/IFSelect_SelectionIterator.cxx
src/IFSelect/IFSelect_SessionFile.cxx
src/IFSelect/IFSelect_SessionFile.hxx
src/IFSelect/IFSelect_SessionPilot.cxx
src/IFSelect/IFSelect_SessionPilot.hxx
src/IFSelect/IFSelect_ShareOut.cxx
src/IFSelect/IFSelect_ShareOutResult.cxx
src/IFSelect/IFSelect_ShareOutResult.hxx
src/IFSelect/IFSelect_SignCategory.cxx
src/IFSelect/IFSelect_SignCounter.cxx
src/IFSelect/IFSelect_SignMultiple.cxx
src/IFSelect/IFSelect_Signature.cxx
src/IFSelect/IFSelect_Signature.hxx
src/IFSelect/IFSelect_SignatureList.cxx
src/IFSelect/IFSelect_TransformStandard.cxx
src/IFSelect/IFSelect_WorkLibrary.cxx
src/IFSelect/IFSelect_WorkSession.cxx
src/Image/Image_AlienPixMap.cxx
src/Image/Image_VideoRecorder.hxx
src/IntAna/IntAna_Curve.cxx
src/IntAna/IntAna_Int3Pln.hxx
src/IntAna/IntAna_IntConicQuad.cxx
src/IntAna/IntAna_IntLinTorus.cxx
src/IntAna/IntAna_IntLinTorus.hxx
src/IntAna/IntAna_IntQuadQuad.cxx
src/IntAna/IntAna_IntQuadQuad.hxx
src/IntAna/IntAna_QuadQuadGeo.cxx
src/IntAna/IntAna_QuadQuadGeo.hxx
src/IntAna/IntAna_Quadric.cxx
src/IntAna/IntAna_Quadric.hxx
src/IntAna2d/IntAna2d_AnaIntersection.hxx
src/IntAna2d/IntAna2d_AnaIntersection_1.cxx
src/IntAna2d/IntAna2d_AnaIntersection_2.cxx
src/IntAna2d/IntAna2d_AnaIntersection_3.cxx
src/IntAna2d/IntAna2d_AnaIntersection_4.cxx
src/IntAna2d/IntAna2d_AnaIntersection_5.cxx
src/IntAna2d/IntAna2d_AnaIntersection_6.cxx
src/IntAna2d/IntAna2d_AnaIntersection_7.cxx
src/IntAna2d/IntAna2d_AnaIntersection_8.cxx
src/IntAna2d/IntAna2d_Conic.cxx
src/IntAna2d/IntAna2d_Conic.hxx
src/IntAna2d/IntAna2d_Outils.cxx
src/IntAna2d/IntAna2d_Outils.hxx
src/IntCurve/IntCurve_IConicTool.cxx
src/IntCurve/IntCurve_IntConicConic.cxx
src/IntCurve/IntCurve_IntConicConic_1.cxx
src/IntCurve/IntCurve_IntConicConic_Tool.cxx
src/IntCurve/IntCurve_ProjectOnPConicTool.cxx
src/IntCurveSurface/IntCurveSurface_Intersection.cxx
src/IntCurvesFace/IntCurvesFace_Intersector.cxx
src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx
src/IntImp/IntImp_ComputeTangence.cxx
src/IntImpParGen/IntImpParGen.cxx
src/IntImpParGen/IntImpParGen_Tool.cxx
src/IntPatch/IntPatch_ALine.cxx
src/IntPatch/IntPatch_ALineToWLine.cxx
src/IntPatch/IntPatch_CSFunction.cxx
src/IntPatch/IntPatch_GLine.cxx
src/IntPatch/IntPatch_HCurve2dTool.cxx
src/IntPatch/IntPatch_HInterTool.cxx
src/IntPatch/IntPatch_ImpPrmIntersection.cxx
src/IntPatch/IntPatch_InterferencePolyhedron.cxx
src/IntPatch/IntPatch_InterferencePolyhedron.hxx
src/IntPatch/IntPatch_Intersection.cxx
src/IntPatch/IntPatch_LineConstructor.cxx
src/IntPatch/IntPatch_Point.cxx
src/IntPatch/IntPatch_PolyArc.cxx
src/IntPatch/IntPatch_PolyLine.cxx
src/IntPatch/IntPatch_Polyhedron.cxx
src/IntPatch/IntPatch_PrmPrmIntersection.cxx
src/IntPatch/IntPatch_RLine.cxx
src/IntPatch/IntPatch_RstInt.cxx
src/IntPatch/IntPatch_SpecialPoints.cxx
src/IntPatch/IntPatch_WLine.cxx
src/IntPatch/IntPatch_WLine.hxx
src/IntPatch/IntPatch_WLineTool.cxx
src/IntPolyh/IntPolyh_Intersection.cxx
src/IntPolyh/IntPolyh_MaillageAffinage.cxx
src/IntPolyh/IntPolyh_StartPoint.cxx
src/IntPolyh/IntPolyh_Tools.cxx
src/IntPolyh/IntPolyh_Triangle.cxx
src/IntRes2d/IntRes2d_Domain.hxx
src/IntRes2d/IntRes2d_Intersection.cxx
src/IntSurf/IntSurf_LineOn2S.cxx
src/IntSurf/IntSurf_PathPoint.cxx
src/IntSurf/IntSurf_Quadric.cxx
src/IntSurf/IntSurf_Quadric.hxx
src/IntTools/IntTools.cxx
src/IntTools/IntTools_BaseRangeSample.cxx
src/IntTools/IntTools_BeanFaceIntersector.cxx
src/IntTools/IntTools_BeanFaceIntersector.hxx
src/IntTools/IntTools_CommonPrt.cxx
src/IntTools/IntTools_Context.cxx
src/IntTools/IntTools_CurveRangeLocalizeData.cxx
src/IntTools/IntTools_CurveRangeSample.cxx
src/IntTools/IntTools_EdgeEdge.cxx
src/IntTools/IntTools_EdgeFace.cxx
src/IntTools/IntTools_EdgeFace.hxx
src/IntTools/IntTools_FClass2d.cxx
src/IntTools/IntTools_FClass2d.hxx
src/IntTools/IntTools_FaceFace.cxx
src/IntTools/IntTools_FaceFace.hxx
src/IntTools/IntTools_MarkedRangeSet.hxx
src/IntTools/IntTools_PntOn2Faces.cxx
src/IntTools/IntTools_Range.cxx
src/IntTools/IntTools_Root.cxx
src/IntTools/IntTools_ShrunkRange.cxx
src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx
src/IntTools/IntTools_SurfaceRangeLocalizeData.hxx
src/IntTools/IntTools_SurfaceRangeSample.cxx
src/IntTools/IntTools_Tools.cxx
src/IntTools/IntTools_TopolTool.cxx
src/IntTools/IntTools_TopolTool.hxx
src/IntTools/IntTools_WLineTool.cxx
src/IntWalk/IntWalk_PWalking.cxx
src/IntWalk/IntWalk_PWalking.hxx
src/Interface/Interface_BitMap.cxx
src/Interface/Interface_BitMap.hxx
src/Interface/Interface_Category.cxx
src/Interface/Interface_Check.cxx
src/Interface/Interface_CheckIterator.cxx
src/Interface/Interface_CheckTool.cxx
src/Interface/Interface_CheckTool.hxx
src/Interface/Interface_CopyMap.cxx
src/Interface/Interface_CopyTool.cxx
src/Interface/Interface_CopyTool.hxx
src/Interface/Interface_EntityCluster.cxx
src/Interface/Interface_EntityIterator.cxx
src/Interface/Interface_FileParameter.cxx
src/Interface/Interface_FileParameter.hxx
src/Interface/Interface_FileReaderData.cxx
src/Interface/Interface_FileReaderTool.cxx
src/Interface/Interface_FloatWriter.cxx
src/Interface/Interface_FloatWriter.hxx
src/Interface/Interface_Graph.cxx
src/Interface/Interface_GraphContent.cxx
src/Interface/Interface_IntList.cxx
src/Interface/Interface_IntList.hxx
src/Interface/Interface_IntVal.cxx
src/Interface/Interface_InterfaceModel.cxx
src/Interface/Interface_LineBuffer.cxx
src/Interface/Interface_LineBuffer.hxx
src/Interface/Interface_MSG.cxx
src/Interface/Interface_ParamSet.cxx
src/Interface/Interface_ReportEntity.cxx
src/Interface/Interface_STAT.cxx
src/Interface/Interface_STAT.hxx
src/Interface/Interface_ShareFlags.cxx
src/Interface/Interface_ShareTool.cxx
src/Interface/Interface_Static.cxx
src/Interface/Interface_Static.hxx
src/Interface/Interface_UndefinedContent.cxx
src/Intf/Intf_Interference.cxx
src/Intf/Intf_InterferencePolygon2d.cxx
src/Intf/Intf_SectionLine.cxx
src/Intf/Intf_TangentZone.cxx
src/Intf/Intf_Tool.cxx
src/Intf/Intf_Tool.hxx
src/Intrv/Intrv_Interval.cxx
src/Intrv/Intrv_Intervals.cxx
src/LDOM/LDOMBasicString.cxx
src/LDOM/LDOMParser.cxx
src/LDOM/LDOM_BasicElement.cxx
src/LDOM/LDOM_CharReference.cxx
src/LDOM/LDOM_Document.cxx
src/LDOM/LDOM_MemManager.cxx
src/LDOM/LDOM_NodeList.cxx
src/LDOM/LDOM_OSStream.cxx
src/LDOM/LDOM_XmlReader.cxx
src/LDOM/LDOM_XmlReader.hxx
src/LDOM/LDOM_XmlWriter.cxx
src/LProp/LProp_AnalyticCurInf.cxx
src/Law/Law.cxx
src/Law/Law_BSpFunc.cxx
src/Law/Law_BSpline.cxx
src/Law/Law_Composite.cxx
src/Law/Law_Interpol.cxx
src/Law/Law_Interpolate.cxx
src/Law/Law_Linear.cxx
src/LocalAnalysis/LocalAnalysis_CurveContinuity.cxx
src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx
src/MAT/MAT_Arc.cxx
src/MAT/MAT_Bisector.cxx
src/MAT/MAT_Bisector.hxx
src/MAT/MAT_Graph.cxx
src/MAT/MAT_Node.cxx
src/MAT/MAT_Zone.hxx
src/MAT2d/MAT2d_Circuit.cxx
src/MAT2d/MAT2d_CutCurve.cxx
src/MAT2d/MAT2d_Mat2d.cxx
src/MAT2d/MAT2d_MiniPath.cxx
src/MAT2d/MAT2d_Tool2d.cxx
src/Media/Media_Packet.hxx
src/Message/Message_Algorithm.cxx
src/Message/Message_AttributeMeter.cxx
src/Message/Message_AttributeObject.cxx
src/Message/Message_Msg.cxx
src/Message/Message_MsgFile.cxx
src/Message/Message_PrinterOStream.cxx
src/Message/Message_PrinterToReport.cxx
src/Message/Message_PrinterToReport.hxx
src/Message/Message_ProgressIndicator.cxx
src/Message/Message_Report.cxx
src/MoniTool/MoniTool_AttrList.cxx
src/MoniTool/MoniTool_CaseData.cxx
src/MoniTool/MoniTool_IntVal.cxx
src/MoniTool/MoniTool_RealVal.cxx
src/MoniTool/MoniTool_Stat.cxx
src/MoniTool/MoniTool_Timer.cxx
src/MoniTool/MoniTool_TypedValue.cxx
src/MoniTool/MoniTool_TypedValue.hxx
src/NCollection/NCollection_AccAllocator.cxx
src/NCollection/NCollection_BaseMap.cxx
src/NCollection/NCollection_BaseSequence.cxx
src/NLPlate/NLPlate_HPG0Constraint.cxx
src/NLPlate/NLPlate_HPG0G1Constraint.cxx
src/NLPlate/NLPlate_HPG1Constraint.cxx
src/NLPlate/NLPlate_NLPlate.cxx
src/OSD/OSD.cxx
src/OSD/OSD_Chronometer.cxx
src/OSD/OSD_DirectoryIterator.cxx
src/OSD/OSD_Disk.cxx
src/OSD/OSD_Environment.cxx
src/OSD/OSD_Error.cxx [changed mode: 0755->0644]
src/OSD/OSD_Error.hxx
src/OSD/OSD_File.cxx
src/OSD/OSD_FileIterator.cxx
src/OSD/OSD_FileNode.cxx
src/OSD/OSD_Host.cxx
src/OSD/OSD_MAllocHook.cxx
src/OSD/OSD_MemInfo.hxx
src/OSD/OSD_OpenFile.cxx
src/OSD/OSD_Parallel_Threads.cxx
src/OSD/OSD_Path.cxx
src/OSD/OSD_Path.hxx
src/OSD/OSD_PerfMeter.cxx
src/OSD/OSD_Process.cxx
src/OSD/OSD_Protection.cxx
src/OSD/OSD_SharedLibrary.cxx
src/OSD/OSD_Thread.cxx
src/OSD/OSD_Thread.hxx
src/OSD/OSD_ThreadPool.cxx
src/OSD/OSD_ThreadPool.hxx
src/OSD/OSD_Timer.cxx
src/OSD/OSD_signal.cxx
src/PCDM/PCDM_ReadWriter.cxx
src/PCDM/PCDM_ReadWriter_1.cxx
src/PCDM/PCDM_ReferenceIterator.cxx
src/PLib/PLib.cxx
src/PLib/PLib_DoubleJacobiPolynomial.cxx
src/PLib/PLib_HermitJacobi.cxx
src/PLib/PLib_JacobiPolynomial.cxx
src/Plate/Plate_FreeGtoCConstraint.cxx
src/Plate/Plate_GlobalTranslationConstraint.cxx
src/Plate/Plate_GtoCConstraint.cxx
src/Plate/Plate_LinearScalarConstraint.cxx
src/Plate/Plate_LinearXYZConstraint.cxx
src/Plate/Plate_PinpointConstraint.cxx
src/Plate/Plate_Plate.cxx
src/Plate/Plate_Plate.hxx
src/Plugin/Plugin.cxx
src/Poly/Poly.cxx
src/Poly/Poly_CoherentTriangle.cxx
src/Poly/Poly_CoherentTriangle.hxx
src/Poly/Poly_CoherentTriangulation.cxx
src/Poly/Poly_Connect.cxx
src/Poly/Poly_MakeLoops.cxx
src/Poly/Poly_Polygon2D.cxx
src/Poly/Poly_Polygon3D.cxx
src/Poly/Poly_PolygonOnTriangulation.cxx
src/Poly/Poly_Triangulation.cxx
src/ProjLib/ProjLib.cxx
src/ProjLib/ProjLib_CompProjectedCurve.cxx
src/ProjLib/ProjLib_CompProjectedCurve.hxx
src/ProjLib/ProjLib_ComputeApprox.cxx
src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx
src/ProjLib/ProjLib_Cone.cxx
src/ProjLib/ProjLib_Cylinder.cxx
src/ProjLib/ProjLib_PrjFunc.cxx
src/ProjLib/ProjLib_PrjResolve.cxx
src/ProjLib/ProjLib_ProjectOnPlane.cxx
src/ProjLib/ProjLib_ProjectOnSurface.cxx
src/ProjLib/ProjLib_ProjectedCurve.cxx
src/ProjLib/ProjLib_Projector.cxx
src/ProjLib/ProjLib_Sphere.cxx
src/ProjLib/ProjLib_Torus.cxx
src/Prs3d/Prs3d.cxx
src/Prs3d/Prs3d_ArrowAspect.hxx
src/Prs3d/Prs3d_DatumAspect.cxx
src/Prs3d/Prs3d_DatumAspect.hxx
src/Prs3d/Prs3d_Drawer.hxx
src/PrsDim/PrsDim.cxx
src/PrsDim/PrsDim_AngleDimension.cxx
src/PrsDim/PrsDim_Chamf3dDimension.cxx
src/PrsDim/PrsDim_ConcentricRelation.cxx
src/PrsDim/PrsDim_ConcentricRelation.hxx
src/PrsDim/PrsDim_Dimension.cxx
src/PrsDim/PrsDim_EllipseRadiusDimension.cxx
src/PrsDim/PrsDim_EllipseRadiusDimension.hxx
src/PrsDim/PrsDim_EqualDistanceRelation.cxx
src/PrsDim/PrsDim_EqualRadiusRelation.cxx
src/PrsDim/PrsDim_FixRelation.cxx
src/PrsDim/PrsDim_IdenticRelation.cxx
src/PrsDim/PrsDim_LengthDimension.cxx
src/PrsDim/PrsDim_MaxRadiusDimension.cxx
src/PrsDim/PrsDim_MidPointRelation.cxx
src/PrsDim/PrsDim_MinRadiusDimension.cxx
src/PrsDim/PrsDim_OffsetDimension.cxx
src/PrsDim/PrsDim_ParallelRelation.cxx
src/PrsDim/PrsDim_PerpendicularRelation.cxx
src/PrsDim/PrsDim_Relation.cxx
src/PrsDim/PrsDim_SymmetricRelation.cxx
src/PrsDim/PrsDim_TangentRelation.cxx
src/PrsDim/PrsDim_TangentRelation.hxx
src/PrsMgr/PrsMgr_PresentableObject.cxx
src/Quantity/Quantity_Color.cxx
src/Quantity/Quantity_ColorRGBA.cxx
src/Quantity/Quantity_Date.cxx
src/Quantity/Quantity_Date.hxx
src/Quantity/Quantity_Period.hxx
src/RWGltf/RWGltf_CafReader.cxx
src/RWGltf/RWGltf_ConfigurationNode.cxx
src/RWGltf/RWGltf_Provider.cxx
src/RWHeaderSection/RWHeaderSection_GeneralModule.cxx
src/RWHeaderSection/RWHeaderSection_RWFileName.cxx
src/RWHeaderSection/RWHeaderSection_RWFileSchema.cxx
src/RWObj/RWObj_ConfigurationNode.cxx
src/RWPly/RWPly_ConfigurationNode.cxx
src/RWStepAP214/RWStepAP214_RWAppliedApprovalAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAppliedDateAndTimeAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAppliedDateAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAppliedDocumentReference.cxx
src/RWStepAP214/RWStepAP214_RWAppliedOrganizationAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAppliedPersonAndOrganizationAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAppliedPresentedItem.cxx
src/RWStepAP214/RWStepAP214_RWAppliedSecurityClassificationAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignActualDateAndTimeAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignActualDateAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignApprovalAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignDateAndPersonAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignDocumentReference.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignGroupAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignOrganizationAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignPresentedItem.cxx
src/RWStepAP214/RWStepAP214_RWAutoDesignSecurityClassificationAssignment.cxx
src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx
src/RWStepAP242/RWStepAP242_RWDraughtingModelItemAssociation.cxx
src/RWStepAP242/RWStepAP242_RWGeometricItemSpecificUsage.cxx
src/RWStepAP242/RWStepAP242_RWItemIdentifiedRepresentationUsage.cxx
src/RWStepBasic/RWStepBasic_RWApplicationProtocolDefinition.cxx
src/RWStepBasic/RWStepBasic_RWCalendarDate.cxx
src/RWStepBasic/RWStepBasic_RWCoordinatedUniversalTimeOffset.cxx
src/RWStepBasic/RWStepBasic_RWDate.cxx
src/RWStepBasic/RWStepBasic_RWDerivedUnit.cxx
src/RWStepBasic/RWStepBasic_RWDerivedUnitElement.cxx
src/RWStepBasic/RWStepBasic_RWDimensionalExponents.cxx
src/RWStepBasic/RWStepBasic_RWEulerAngles.cxx
src/RWStepBasic/RWStepBasic_RWLocalTime.cxx
src/RWStepBasic/RWStepBasic_RWOrdinalDate.cxx
src/RWStepBasic/RWStepBasic_RWOrganizationalAddress.cxx
src/RWStepBasic/RWStepBasic_RWPerson.cxx
src/RWStepBasic/RWStepBasic_RWPersonalAddress.cxx
src/RWStepBasic/RWStepBasic_RWProduct.cxx
src/RWStepBasic/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.cxx
src/RWStepBasic/RWStepBasic_RWProductRelatedProductCategory.cxx
src/RWStepBasic/RWStepBasic_RWProductType.cxx
src/RWStepBasic/RWStepBasic_RWWeekOfYearAndDayDate.cxx
src/RWStepDimTol/RWStepDimTol_RWDatumReference.cxx
src/RWStepDimTol/RWStepDimTol_RWDatumReferenceCompartment.cxx
src/RWStepDimTol/RWStepDimTol_RWDatumReferenceElement.cxx
src/RWStepDimTol/RWStepDimTol_RWDatumSystem.cxx
src/RWStepDimTol/RWStepDimTol_RWGeneralDatumReference.cxx
src/RWStepDimTol/RWStepDimTol_RWNonUniformZoneDefinition.cxx
src/RWStepDimTol/RWStepDimTol_RWProjectedZoneDefinition.cxx
src/RWStepDimTol/RWStepDimTol_RWRunoutZoneDefinition.cxx
src/RWStepDimTol/RWStepDimTol_RWToleranceZone.cxx
src/RWStepDimTol/RWStepDimTol_RWToleranceZoneDefinition.cxx
src/RWStepElement/RWStepElement_RWCurveElementEndReleasePacket.cxx
src/RWStepElement/RWStepElement_RWCurveElementSectionDefinition.cxx
src/RWStepElement/RWStepElement_RWCurveElementSectionDerivedDefinitions.cxx
src/RWStepElement/RWStepElement_RWSurfaceSectionFieldVarying.cxx
src/RWStepElement/RWStepElement_RWUniformSurfaceSection.cxx
src/RWStepFEA/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.cxx
src/RWStepFEA/RWStepFEA_RWCurveElementEndOffset.cxx
src/RWStepFEA/RWStepFEA_RWFeaAreaDensity.cxx
src/RWStepFEA/RWStepFEA_RWFeaMassDensity.cxx
src/RWStepFEA/RWStepFEA_RWFeaParametricPoint.cxx
src/RWStepFEA/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.cxx
src/RWStepFEA/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.cxx
src/RWStepGeom/RWStepGeom_RWBSplineCurve.cxx
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnots.cxx
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx
src/RWStepGeom/RWStepGeom_RWBSplineSurface.cxx
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnots.cxx
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx
src/RWStepGeom/RWStepGeom_RWBezierCurve.cxx
src/RWStepGeom/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.cxx
src/RWStepGeom/RWStepGeom_RWBezierSurface.cxx
src/RWStepGeom/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.cxx
src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cxx
src/RWStepGeom/RWStepGeom_RWCartesianPoint.cxx
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator.cxx
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator3d.cxx
src/RWStepGeom/RWStepGeom_RWCircle.cxx
src/RWStepGeom/RWStepGeom_RWCompositeCurve.cxx
src/RWStepGeom/RWStepGeom_RWCompositeCurveOnSurface.cxx
src/RWStepGeom/RWStepGeom_RWCompositeCurveSegment.cxx
src/RWStepGeom/RWStepGeom_RWConicalSurface.cxx
src/RWStepGeom/RWStepGeom_RWCurveBoundedSurface.cxx
src/RWStepGeom/RWStepGeom_RWCylindricalSurface.cxx
src/RWStepGeom/RWStepGeom_RWDegenerateToroidalSurface.cxx
src/RWStepGeom/RWStepGeom_RWDirection.cxx
src/RWStepGeom/RWStepGeom_RWEllipse.cxx
src/RWStepGeom/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContext.cxx
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.cxx
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.cxx
src/RWStepGeom/RWStepGeom_RWHyperbola.cxx
src/RWStepGeom/RWStepGeom_RWIntersectionCurve.cxx
src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cxx
src/RWStepGeom/RWStepGeom_RWOffsetSurface.cxx
src/RWStepGeom/RWStepGeom_RWOrientedSurface.cxx
src/RWStepGeom/RWStepGeom_RWOuterBoundaryCurve.cxx
src/RWStepGeom/RWStepGeom_RWParabola.cxx
src/RWStepGeom/RWStepGeom_RWPointOnCurve.cxx
src/RWStepGeom/RWStepGeom_RWPointOnSurface.cxx
src/RWStepGeom/RWStepGeom_RWPolyline.cxx
src/RWStepGeom/RWStepGeom_RWQuasiUniformCurve.cxx
src/RWStepGeom/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.cxx
src/RWStepGeom/RWStepGeom_RWQuasiUniformSurface.cxx
src/RWStepGeom/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.cxx
src/RWStepGeom/RWStepGeom_RWRationalBSplineCurve.cxx
src/RWStepGeom/RWStepGeom_RWRationalBSplineSurface.cxx
src/RWStepGeom/RWStepGeom_RWRectangularCompositeSurface.cxx
src/RWStepGeom/RWStepGeom_RWRectangularTrimmedSurface.cxx
src/RWStepGeom/RWStepGeom_RWReparametrisedCompositeCurveSegment.cxx
src/RWStepGeom/RWStepGeom_RWSeamCurve.cxx
src/RWStepGeom/RWStepGeom_RWSphericalSurface.cxx
src/RWStepGeom/RWStepGeom_RWSuParameters.cxx
src/RWStepGeom/RWStepGeom_RWSurfaceCurve.cxx
src/RWStepGeom/RWStepGeom_RWSurfaceCurveAndBoundedCurve.cxx
src/RWStepGeom/RWStepGeom_RWSurfacePatch.cxx
src/RWStepGeom/RWStepGeom_RWToroidalSurface.cxx
src/RWStepGeom/RWStepGeom_RWTrimmedCurve.cxx
src/RWStepGeom/RWStepGeom_RWUniformCurve.cxx
src/RWStepGeom/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.cxx
src/RWStepGeom/RWStepGeom_RWUniformSurface.cxx
src/RWStepGeom/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.cxx
src/RWStepGeom/RWStepGeom_RWVector.cxx
src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx
src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.cxx
src/RWStepKinematics/RWStepKinematics_RWCylindricalPairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.cxx
src/RWStepKinematics/RWStepKinematics_RWGearPair.cxx
src/RWStepKinematics/RWStepKinematics_RWGearPairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWGearPairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.cxx
src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPinionPair.cxx
src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx
src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.cxx
src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.cxx
src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.cxx
src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.cxx
src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.cxx
src/RWStepKinematics/RWStepKinematics_RWPlanarPair.cxx
src/RWStepKinematics/RWStepKinematics_RWPlanarPairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.cxx
src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.cxx
src/RWStepKinematics/RWStepKinematics_RWPrismaticPairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPair.cxx
src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWRevolutePair.cxx
src/RWStepKinematics/RWStepKinematics_RWRevolutePairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.cxx
src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.cxx
src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWRotationAboutDirection.cxx
src/RWStepKinematics/RWStepKinematics_RWScrewPair.cxx
src/RWStepKinematics/RWStepKinematics_RWScrewPairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWScrewPairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.cxx
src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.cxx
src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWSphericalPair.cxx
src/RWStepKinematics/RWStepKinematics_RWSphericalPairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.cxx
src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.cxx
src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.cxx
src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.cxx
src/RWStepKinematics/RWStepKinematics_RWUniversalPair.cxx
src/RWStepKinematics/RWStepKinematics_RWUniversalPairValue.cxx
src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.cxx
src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.cxx
src/RWStepRepr/RWStepRepr_RWCompoundRepresentationItem.cxx
src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.cxx
src/RWStepRepr/RWStepRepr_RWDefinitionalRepresentation.cxx
src/RWStepRepr/RWStepRepr_RWGlobalUncertaintyAssignedContext.cxx
src/RWStepRepr/RWStepRepr_RWGlobalUnitAssignedContext.cxx
src/RWStepRepr/RWStepRepr_RWIntegerRepresentationItem.cxx
src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx
src/RWStepRepr/RWStepRepr_RWReprItemAndLengthMeasureWithUnitAndQRI.cxx
src/RWStepRepr/RWStepRepr_RWReprItemAndPlaneAngleMeasureWithUnitAndQRI.cxx
src/RWStepRepr/RWStepRepr_RWRepresentation.cxx
src/RWStepShape/RWStepShape_RWAdvancedBrepShapeRepresentation.cxx
src/RWStepShape/RWStepShape_RWAdvancedFace.cxx
src/RWStepShape/RWStepShape_RWBlock.cxx
src/RWStepShape/RWStepShape_RWBoxDomain.cxx
src/RWStepShape/RWStepShape_RWBoxedHalfSpace.cxx
src/RWStepShape/RWStepShape_RWBrepWithVoids.cxx
src/RWStepShape/RWStepShape_RWClosedShell.cxx
src/RWStepShape/RWStepShape_RWConnectedFaceSet.cxx
src/RWStepShape/RWStepShape_RWCsgShapeRepresentation.cxx
src/RWStepShape/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.cxx
src/RWStepShape/RWStepShape_RWEdgeCurve.cxx
src/RWStepShape/RWStepShape_RWEdgeLoop.cxx
src/RWStepShape/RWStepShape_RWExtrudedAreaSolid.cxx
src/RWStepShape/RWStepShape_RWExtrudedFaceSolid.cxx
src/RWStepShape/RWStepShape_RWFace.cxx
src/RWStepShape/RWStepShape_RWFaceBound.cxx
src/RWStepShape/RWStepShape_RWFaceOuterBound.cxx
src/RWStepShape/RWStepShape_RWFaceSurface.cxx
src/RWStepShape/RWStepShape_RWFacetedBrepAndBrepWithVoids.cxx
src/RWStepShape/RWStepShape_RWFacetedBrepShapeRepresentation.cxx
src/RWStepShape/RWStepShape_RWGeometricCurveSet.cxx
src/RWStepShape/RWStepShape_RWGeometricSet.cxx
src/RWStepShape/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.cxx
src/RWStepShape/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.cxx
src/RWStepShape/RWStepShape_RWHalfSpaceSolid.cxx
src/RWStepShape/RWStepShape_RWLoopAndPath.cxx
src/RWStepShape/RWStepShape_RWManifoldSurfaceShapeRepresentation.cxx
src/RWStepShape/RWStepShape_RWMeasureQualification.cxx
src/RWStepShape/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.cxx
src/RWStepShape/RWStepShape_RWOpenShell.cxx
src/RWStepShape/RWStepShape_RWOrientedClosedShell.cxx
src/RWStepShape/RWStepShape_RWOrientedEdge.cxx
src/RWStepShape/RWStepShape_RWOrientedFace.cxx
src/RWStepShape/RWStepShape_RWOrientedOpenShell.cxx
src/RWStepShape/RWStepShape_RWOrientedPath.cxx
src/RWStepShape/RWStepShape_RWPath.cxx
src/RWStepShape/RWStepShape_RWPolyLoop.cxx
src/RWStepShape/RWStepShape_RWPrecisionQualifier.cxx
src/RWStepShape/RWStepShape_RWQualifiedRepresentationItem.cxx
src/RWStepShape/RWStepShape_RWRevolvedAreaSolid.cxx
src/RWStepShape/RWStepShape_RWRevolvedFaceSolid.cxx
src/RWStepShape/RWStepShape_RWRightAngularWedge.cxx
src/RWStepShape/RWStepShape_RWRightCircularCone.cxx
src/RWStepShape/RWStepShape_RWRightCircularCylinder.cxx
src/RWStepShape/RWStepShape_RWSeamEdge.cxx
src/RWStepShape/RWStepShape_RWShapeRepresentation.cxx
src/RWStepShape/RWStepShape_RWShellBasedSurfaceModel.cxx
src/RWStepShape/RWStepShape_RWSphere.cxx
src/RWStepShape/RWStepShape_RWTorus.cxx
src/RWStepShape/RWStepShape_RWTransitionalShapeRepresentation.cxx
src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrence.cxx
src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrenceAndGeomReprItem.cxx
src/RWStepVisual/RWStepVisual_RWAnnotationFillArea.cxx
src/RWStepVisual/RWStepVisual_RWAnnotationFillAreaOccurrence.cxx
src/RWStepVisual/RWStepVisual_RWAnnotationOccurrence.cxx
src/RWStepVisual/RWStepVisual_RWAnnotationPlane.cxx
src/RWStepVisual/RWStepVisual_RWCameraModelD2.cxx
src/RWStepVisual/RWStepVisual_RWCameraModelD3MultiClipping.cxx
src/RWStepVisual/RWStepVisual_RWCameraModelD3MultiClippingIntersection.cxx
src/RWStepVisual/RWStepVisual_RWCameraModelD3MultiClippingUnion.cxx
src/RWStepVisual/RWStepVisual_RWCharacterizedObjAndRepresentationAndDraughtingModel.cxx
src/RWStepVisual/RWStepVisual_RWColourRgb.cxx
src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx
src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx
src/RWStepVisual/RWStepVisual_RWCompositeText.cxx
src/RWStepVisual/RWStepVisual_RWCompositeTextWithExtent.cxx
src/RWStepVisual/RWStepVisual_RWContextDependentInvisibility.cxx
src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx
src/RWStepVisual/RWStepVisual_RWCoordinatesList.cxx
src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.cxx
src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.cxx
src/RWStepVisual/RWStepVisual_RWCurveStyleFont.cxx
src/RWStepVisual/RWStepVisual_RWCurveStyleFontPattern.cxx
src/RWStepVisual/RWStepVisual_RWDraughtingCallout.cxx
src/RWStepVisual/RWStepVisual_RWFillAreaStyle.cxx
src/RWStepVisual/RWStepVisual_RWInvisibility.cxx
src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.cxx
src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.cxx
src/RWStepVisual/RWStepVisual_RWOverRidingStyledItem.cxx
src/RWStepVisual/RWStepVisual_RWPlanarBox.cxx
src/RWStepVisual/RWStepVisual_RWPlanarExtent.cxx
src/RWStepVisual/RWStepVisual_RWPresentationArea.cxx
src/RWStepVisual/RWStepVisual_RWPresentationLayerAssignment.cxx
src/RWStepVisual/RWStepVisual_RWPresentationRepresentation.cxx
src/RWStepVisual/RWStepVisual_RWPresentationStyleAssignment.cxx
src/RWStepVisual/RWStepVisual_RWPresentationStyleByContext.cxx
src/RWStepVisual/RWStepVisual_RWPresentationView.cxx
src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedGeometricSet.cxx
src/RWStepVisual/RWStepVisual_RWStyledItem.cxx
src/RWStepVisual/RWStepVisual_RWSurfaceSideStyle.cxx
src/RWStepVisual/RWStepVisual_RWSurfaceStyleParameterLine.cxx
src/RWStepVisual/RWStepVisual_RWSurfaceStyleReflectanceAmbient.cxx
src/RWStepVisual/RWStepVisual_RWSurfaceStyleTransparent.cxx
src/RWStepVisual/RWStepVisual_RWTemplate.cxx
src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx
src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.cxx
src/RWStepVisual/RWStepVisual_RWTessellatedCurveSet.cxx
src/RWStepVisual/RWStepVisual_RWTessellatedEdge.cxx
src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.cxx
src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.cxx
src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx
src/RWStepVisual/RWStepVisual_RWTessellatedVertex.cxx
src/RWStepVisual/RWStepVisual_RWTextStyleWithBoxCharacteristics.cxx
src/RWStepVisual/RWStepVisual_RWTriangulatedFace.cxx
src/RWStepVisual/RWStepVisual_RWViewVolume.cxx
src/Resource/Resource_Manager.cxx
src/Resource/Resource_Unicode.cxx
src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx
src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx
src/STEPCAFControl/STEPCAFControl_Provider.cxx
src/STEPCAFControl/STEPCAFControl_Provider.hxx
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/STEPCAFControl/STEPCAFControl_Writer.hxx
src/STEPConstruct/STEPConstruct_AP203Context.cxx
src/STEPConstruct/STEPConstruct_Assembly.cxx
src/STEPConstruct/STEPConstruct_ContextTool.cxx
src/STEPConstruct/STEPConstruct_ExternRefs.cxx
src/STEPConstruct/STEPConstruct_Part.cxx
src/STEPConstruct/STEPConstruct_UnitContext.cxx
src/STEPControl/STEPControl_ActorRead.cxx
src/STEPControl/STEPControl_ActorWrite.cxx
src/STEPSelections/STEPSelections_AssemblyComponent.cxx
src/STEPSelections/STEPSelections_AssemblyLink.cxx
src/STEPSelections/STEPSelections_Counter.cxx
src/STEPSelections/STEPSelections_SelectDerived.cxx
src/Select3D/Select3D_SensitiveBox.cxx
src/Select3D/Select3D_SensitiveCircle.cxx
src/Select3D/Select3D_SensitivePoint.cxx
src/Select3D/Select3D_SensitivePoly.cxx
src/Select3D/Select3D_SensitiveSegment.cxx
src/Select3D/Select3D_SensitiveTriangulation.cxx
src/SelectMgr/SelectMgr_AxisIntersector.cxx
src/SelectMgr/SelectMgr_BaseFrustum.cxx
src/SelectMgr/SelectMgr_RectangularFrustum.cxx
src/SelectMgr/SelectMgr_SelectableObjectSet.cxx
src/SelectMgr/SelectMgr_SelectableObjectSet.hxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx
src/SelectMgr/SelectMgr_SelectionImageFiller.cxx
src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx
src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx
src/SelectMgr/SelectMgr_ViewerSelector.cxx
src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx
src/ShapeAnalysis/ShapeAnalysis.cxx
src/ShapeAnalysis/ShapeAnalysis_BoxBndTree.cxx
src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx
src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx
src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.hxx
src/ShapeAnalysis/ShapeAnalysis_Curve.cxx
src/ShapeAnalysis/ShapeAnalysis_Edge.cxx
src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.cxx
src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.hxx
src/ShapeAnalysis/ShapeAnalysis_FreeBounds.cxx
src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx
src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx
src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.hxx
src/ShapeAnalysis/ShapeAnalysis_Geom.cxx
src/ShapeAnalysis/ShapeAnalysis_ShapeContents.cxx
src/ShapeAnalysis/ShapeAnalysis_ShapeContents.hxx
src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx
src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.hxx
src/ShapeAnalysis/ShapeAnalysis_Shell.cxx
src/ShapeAnalysis/ShapeAnalysis_Surface.cxx
src/ShapeAnalysis/ShapeAnalysis_Surface.hxx
src/ShapeAnalysis/ShapeAnalysis_TransferParameters.cxx
src/ShapeAnalysis/ShapeAnalysis_TransferParameters.hxx
src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx
src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.hxx
src/ShapeAnalysis/ShapeAnalysis_Wire.cxx
src/ShapeAnalysis/ShapeAnalysis_Wire.hxx
src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx
src/ShapeAnalysis/ShapeAnalysis_WireVertex.cxx
src/ShapeBuild/ShapeBuild_Edge.cxx
src/ShapeBuild/ShapeBuild_ReShape.cxx
src/ShapeBuild/ShapeBuild_Vertex.cxx
src/ShapeConstruct/ShapeConstruct.cxx
src/ShapeConstruct/ShapeConstruct_MakeTriangulation.cxx
src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx
src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.hxx
src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx
src/ShapeCustom/ShapeCustom_ConvertToBSpline.cxx
src/ShapeCustom/ShapeCustom_ConvertToRevolution.cxx
src/ShapeCustom/ShapeCustom_Curve2d.cxx
src/ShapeCustom/ShapeCustom_DirectModification.cxx
src/ShapeCustom/ShapeCustom_RestrictionParameters.cxx
src/ShapeCustom/ShapeCustom_Surface.cxx
src/ShapeCustom/ShapeCustom_SweptToElementary.cxx
src/ShapeExtend/ShapeExtend_ComplexCurve.cxx
src/ShapeExtend/ShapeExtend_CompositeSurface.cxx
src/ShapeExtend/ShapeExtend_CompositeSurface.hxx
src/ShapeExtend/ShapeExtend_Explorer.cxx
src/ShapeExtend/ShapeExtend_WireData.cxx
src/ShapeExtend/ShapeExtend_WireData.hxx
src/ShapeFix/ShapeFix.cxx
src/ShapeFix/ShapeFix_ComposeShell.cxx
src/ShapeFix/ShapeFix_Edge.cxx
src/ShapeFix/ShapeFix_EdgeConnect.cxx
src/ShapeFix/ShapeFix_EdgeProjAux.cxx
src/ShapeFix/ShapeFix_EdgeProjAux.hxx
src/ShapeFix/ShapeFix_Face.cxx
src/ShapeFix/ShapeFix_Face.hxx
src/ShapeFix/ShapeFix_FaceConnect.cxx
src/ShapeFix/ShapeFix_FixSmallFace.cxx
src/ShapeFix/ShapeFix_FreeBounds.cxx
src/ShapeFix/ShapeFix_IntersectionTool.cxx
src/ShapeFix/ShapeFix_Root.cxx
src/ShapeFix/ShapeFix_Shape.cxx
src/ShapeFix/ShapeFix_ShapeTolerance.cxx
src/ShapeFix/ShapeFix_Shell.cxx
src/ShapeFix/ShapeFix_Shell.hxx
src/ShapeFix/ShapeFix_Solid.cxx
src/ShapeFix/ShapeFix_SplitCommonVertex.cxx
src/ShapeFix/ShapeFix_SplitTool.cxx
src/ShapeFix/ShapeFix_Wire.cxx
src/ShapeFix/ShapeFix_Wire.hxx
src/ShapeFix/ShapeFix_WireSegment.cxx
src/ShapeFix/ShapeFix_WireVertex.cxx
src/ShapeFix/ShapeFix_Wire_1.cxx
src/ShapeFix/ShapeFix_Wireframe.cxx
src/ShapeFix/ShapeFix_Wireframe.hxx
src/ShapeProcess/ShapeProcess.cxx
src/ShapeProcess/ShapeProcess_Context.cxx
src/ShapeProcess/ShapeProcess_OperLibrary.cxx
src/ShapeProcess/ShapeProcess_ShapeContext.cxx
src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.cxx
src/ShapeUpgrade/ShapeUpgrade.cxx
src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.cxx
src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx
src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx
src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.cxx
src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx
src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx
src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.cxx
src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx
src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.cxx
src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx
src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.hxx
src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx
src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.cxx
src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.cxx
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.cxx
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideContinuity.cxx
src/ShapeUpgrade/ShapeUpgrade_ShellSewing.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx
src/ShapeUpgrade/ShapeUpgrade_Tool.cxx
src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx
src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx
src/Standard/Standard.cxx
src/Standard/Standard_Condition.cxx
src/Standard/Standard_Condition.hxx
src/Standard/Standard_ErrorHandler.cxx
src/Standard/Standard_ErrorHandler.hxx
src/Standard/Standard_Failure.cxx
src/Standard/Standard_GUID.cxx
src/Standard/Standard_GUID.hxx
src/Standard/Standard_MMgrOpt.cxx
src/Standard/Standard_MMgrRaw.cxx
src/Standard/Standard_MMgrTBBalloc.cxx
src/Standard/Standard_Mutex.hxx
src/Standard/Standard_OutOfMemory.hxx
src/Standard/Standard_Real.cxx
src/Standard/Standard_ShortReal.cxx
src/Standard/Standard_Strtod.cxx
src/StdPrs/StdPrs_Curve.cxx
src/StdPrs/StdPrs_DeflectionCurve.cxx
src/StdPrs/StdPrs_HLRPolyShape.cxx
src/StdPrs/StdPrs_HLRShape.cxx [changed mode: 0755->0644]
src/StdPrs/StdPrs_HLRToolShape.cxx
src/StdPrs/StdPrs_Isolines.cxx
src/StdPrs/StdPrs_Plane.cxx
src/StdPrs/StdPrs_PoleCurve.cxx
src/StdPrs/StdPrs_ShadedSurface.cxx
src/StdPrs/StdPrs_ShapeTool.hxx
src/StdPrs/StdPrs_ToolRFace.cxx
src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx
src/StdPrs/StdPrs_WFDeflectionSurface.cxx
src/StdPrs/StdPrs_WFPoleSurface.cxx
src/StdPrs/StdPrs_WFRestrictedFace.cxx [changed mode: 0755->0644]
src/StdPrs/StdPrs_WFSurface.cxx
src/StdSelect/StdSelect_BRepSelectionTool.cxx
src/StepAP209/StepAP209_Construct.cxx
src/StepBasic/StepBasic_Action.cxx
src/StepBasic/StepBasic_ActionMethod.cxx
src/StepBasic/StepBasic_Address.hxx
src/StepBasic/StepBasic_ApplicationProtocolDefinition.hxx
src/StepBasic/StepBasic_CalendarDate.hxx
src/StepBasic/StepBasic_CharacterizedObject.cxx
src/StepBasic/StepBasic_CoordinatedUniversalTimeOffset.hxx
src/StepBasic/StepBasic_Date.hxx
src/StepBasic/StepBasic_DerivedUnitElement.hxx
src/StepBasic/StepBasic_DimensionalExponents.hxx
src/StepBasic/StepBasic_Document.cxx
src/StepBasic/StepBasic_DocumentFile.cxx
src/StepBasic/StepBasic_DocumentProductAssociation.cxx
src/StepBasic/StepBasic_GeneralProperty.cxx
src/StepBasic/StepBasic_Group.cxx
src/StepBasic/StepBasic_GroupRelationship.cxx
src/StepBasic/StepBasic_IdentificationRole.cxx
src/StepBasic/StepBasic_LocalTime.hxx
src/StepBasic/StepBasic_MeasureValueMember.cxx
src/StepBasic/StepBasic_ObjectRole.cxx
src/StepBasic/StepBasic_OrdinalDate.hxx
src/StepBasic/StepBasic_Organization.hxx
src/StepBasic/StepBasic_Person.hxx
src/StepBasic/StepBasic_ProductCategory.hxx
src/StepBasic/StepBasic_ProductCategoryRelationship.cxx
src/StepBasic/StepBasic_ProductDefinitionReference.hxx
src/StepBasic/StepBasic_ProductDefinitionRelationship.cxx
src/StepBasic/StepBasic_SiUnit.hxx
src/StepBasic/StepBasic_VersionedActionRequest.cxx
src/StepBasic/StepBasic_WeekOfYearAndDayDate.hxx
src/StepData/StepData_ECDescr.cxx
src/StepData/StepData_ESDescr.cxx
src/StepData/StepData_EnumTool.cxx
src/StepData/StepData_Field.cxx
src/StepData/StepData_Field.hxx
src/StepData/StepData_FieldList.cxx
src/StepData/StepData_FileProtocol.cxx
src/StepData/StepData_PDescr.cxx
src/StepData/StepData_Plex.cxx
src/StepData/StepData_Protocol.cxx
src/StepData/StepData_SelectInt.cxx
src/StepData/StepData_SelectReal.cxx
src/StepData/StepData_Simple.cxx
src/StepData/StepData_StepDumper.cxx
src/StepData/StepData_StepModel.cxx
src/StepData/StepData_StepReaderData.cxx
src/StepData/StepData_StepReaderTool.cxx
src/StepData/StepData_StepWriter.cxx
src/StepData/StepData_StepWriter.hxx
src/StepData/StepData_UndefinedEntity.cxx
src/StepDimTol/StepDimTol_DatumReference.hxx
src/StepElement/StepElement_CurveElementEndReleasePacket.hxx
src/StepElement/StepElement_CurveElementSectionDefinition.hxx
src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.hxx
src/StepElement/StepElement_SurfaceSectionFieldVarying.hxx
src/StepElement/StepElement_UniformSurfaceSection.hxx
src/StepFEA/StepFEA_ConstantSurface3dElementCoordinateSystem.hxx
src/StepFEA/StepFEA_FeaAreaDensity.hxx
src/StepFEA/StepFEA_FeaMassDensity.hxx
src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.hxx
src/StepFEA/StepFEA_ParametricSurface3dElementCoordinateSystem.hxx
src/StepFile/StepFile_Read.cxx
src/StepFile/StepFile_ReadData.cxx
src/StepFile/lex.step.cxx
src/StepFile/step.tab.cxx
src/StepFile/step.tab.hxx
src/StepGeom/StepGeom_Axis1Placement.hxx
src/StepGeom/StepGeom_Axis2Placement2d.hxx
src/StepGeom/StepGeom_Axis2Placement3d.hxx
src/StepGeom/StepGeom_BSplineCurve.hxx
src/StepGeom/StepGeom_BSplineSurface.hxx
src/StepGeom/StepGeom_CartesianPoint.hxx
src/StepGeom/StepGeom_CartesianTransformationOperator.hxx
src/StepGeom/StepGeom_CartesianTransformationOperator3d.hxx
src/StepGeom/StepGeom_Circle.hxx
src/StepGeom/StepGeom_CompositeCurveSegment.hxx
src/StepGeom/StepGeom_ConicalSurface.hxx
src/StepGeom/StepGeom_CurveBoundedSurface.hxx
src/StepGeom/StepGeom_CylindricalSurface.hxx
src/StepGeom/StepGeom_DegenerateToroidalSurface.hxx
src/StepGeom/StepGeom_Ellipse.hxx
src/StepGeom/StepGeom_GeometricRepresentationContext.hxx
src/StepGeom/StepGeom_Hyperbola.hxx
src/StepGeom/StepGeom_OffsetCurve3d.hxx
src/StepGeom/StepGeom_OffsetSurface.hxx
src/StepGeom/StepGeom_OrientedSurface.hxx
src/StepGeom/StepGeom_Parabola.hxx
src/StepGeom/StepGeom_PointOnCurve.hxx
src/StepGeom/StepGeom_PointOnSurface.hxx
src/StepGeom/StepGeom_RectangularTrimmedSurface.hxx
src/StepGeom/StepGeom_ReparametrisedCompositeCurveSegment.hxx
src/StepGeom/StepGeom_SphericalSurface.hxx
src/StepGeom/StepGeom_SuParameters.hxx
src/StepGeom/StepGeom_SurfacePatch.hxx
src/StepGeom/StepGeom_ToroidalSurface.hxx
src/StepGeom/StepGeom_TrimmedCurve.hxx
src/StepGeom/StepGeom_Vector.hxx
src/StepKinematics/StepKinematics_ActuatedKinematicPair.cxx
src/StepKinematics/StepKinematics_CylindricalPairValue.hxx
src/StepKinematics/StepKinematics_CylindricalPairWithRange.cxx
src/StepKinematics/StepKinematics_CylindricalPairWithRange.hxx
src/StepKinematics/StepKinematics_GearPair.hxx
src/StepKinematics/StepKinematics_GearPairValue.hxx
src/StepKinematics/StepKinematics_GearPairWithRange.cxx
src/StepKinematics/StepKinematics_GearPairWithRange.hxx
src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.hxx
src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx
src/StepKinematics/StepKinematics_LowOrderKinematicPair.hxx
src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.hxx
src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.cxx
src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.hxx
src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx
src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx
src/StepKinematics/StepKinematics_PlanarCurvePair.hxx
src/StepKinematics/StepKinematics_PlanarPairValue.hxx
src/StepKinematics/StepKinematics_PlanarPairWithRange.cxx
src/StepKinematics/StepKinematics_PlanarPairWithRange.hxx
src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.hxx
src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.cxx
src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.hxx
src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.cxx
src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.hxx
src/StepKinematics/StepKinematics_PrismaticPairValue.hxx
src/StepKinematics/StepKinematics_PrismaticPairWithRange.cxx
src/StepKinematics/StepKinematics_PrismaticPairWithRange.hxx
src/StepKinematics/StepKinematics_RackAndPinionPair.hxx
src/StepKinematics/StepKinematics_RackAndPinionPairValue.hxx
src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.cxx
src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.hxx
src/StepKinematics/StepKinematics_RevolutePairValue.hxx
src/StepKinematics/StepKinematics_RevolutePairWithRange.cxx
src/StepKinematics/StepKinematics_RevolutePairWithRange.hxx
src/StepKinematics/StepKinematics_RollingSurfacePairValue.hxx
src/StepKinematics/StepKinematics_RotationAboutDirection.hxx
src/StepKinematics/StepKinematics_ScrewPair.hxx
src/StepKinematics/StepKinematics_ScrewPairValue.hxx
src/StepKinematics/StepKinematics_ScrewPairWithRange.cxx
src/StepKinematics/StepKinematics_ScrewPairWithRange.hxx
src/StepKinematics/StepKinematics_SlidingSurfacePairValue.hxx
src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.cxx
src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.hxx
src/StepKinematics/StepKinematics_SphericalPairWithRange.cxx
src/StepKinematics/StepKinematics_SphericalPairWithRange.hxx
src/StepKinematics/StepKinematics_SurfacePair.hxx
src/StepKinematics/StepKinematics_SurfacePairWithRange.cxx
src/StepKinematics/StepKinematics_SurfacePairWithRange.hxx
src/StepKinematics/StepKinematics_UniversalPair.cxx
src/StepKinematics/StepKinematics_UniversalPair.hxx
src/StepKinematics/StepKinematics_UniversalPairValue.hxx
src/StepKinematics/StepKinematics_UniversalPairWithRange.cxx
src/StepKinematics/StepKinematics_UniversalPairWithRange.hxx
src/StepRepr/StepRepr_AssemblyComponentUsage.cxx
src/StepRepr/StepRepr_ConfigurationItem.cxx
src/StepRepr/StepRepr_IntegerRepresentationItem.hxx
src/StepRepr/StepRepr_MakeFromUsageOption.hxx
src/StepRepr/StepRepr_MeasureRepresentationItem.cxx
src/StepRepr/StepRepr_ProductConcept.cxx
src/StepRepr/StepRepr_PropertyDefinition.cxx
src/StepRepr/StepRepr_ReprItemAndLengthMeasureWithUnit.cxx
src/StepRepr/StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI.cxx
src/StepRepr/StepRepr_ReprItemAndMeasureWithUnit.cxx
src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.cxx
src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.hxx
src/StepRepr/StepRepr_ReprItemAndPlaneAngleMeasureWithUnit.cxx
src/StepRepr/StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI.cxx
src/StepRepr/StepRepr_ShapeAspectRelationship.cxx
src/StepSelect/StepSelect_StepType.cxx
src/StepShape/StepShape_Block.hxx
src/StepShape/StepShape_BooleanOperand.hxx
src/StepShape/StepShape_BoxDomain.hxx
src/StepShape/StepShape_CsgSelect.hxx
src/StepShape/StepShape_EdgeCurve.hxx
src/StepShape/StepShape_ExtrudedAreaSolid.hxx
src/StepShape/StepShape_ExtrudedFaceSolid.hxx
src/StepShape/StepShape_FaceBound.hxx
src/StepShape/StepShape_FaceSurface.hxx
src/StepShape/StepShape_HalfSpaceSolid.hxx
src/StepShape/StepShape_MeasureRepresentationItemAndQualifiedRepresentationItem.cxx
src/StepShape/StepShape_OrientedClosedShell.hxx
src/StepShape/StepShape_OrientedEdge.hxx
src/StepShape/StepShape_OrientedFace.hxx
src/StepShape/StepShape_OrientedOpenShell.hxx
src/StepShape/StepShape_OrientedPath.hxx
src/StepShape/StepShape_PrecisionQualifier.hxx
src/StepShape/StepShape_RevolvedAreaSolid.hxx
src/StepShape/StepShape_RevolvedFaceSolid.hxx
src/StepShape/StepShape_RightAngularWedge.hxx
src/StepShape/StepShape_RightCircularCone.hxx
src/StepShape/StepShape_RightCircularCylinder.hxx
src/StepShape/StepShape_Sphere.hxx
src/StepShape/StepShape_Torus.hxx
src/StepToGeom/StepToGeom.cxx
src/StepToTopoDS/StepToTopoDS_Builder.cxx
src/StepToTopoDS/StepToTopoDS_NMTool.cxx
src/StepToTopoDS/StepToTopoDS_Tool.hxx
src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx
src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx
src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx
src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx
src/StepVisual/StepVisual_BoxCharacteristicSelect.hxx
src/StepVisual/StepVisual_CameraModelD2.hxx
src/StepVisual/StepVisual_ColourRgb.hxx
src/StepVisual/StepVisual_CurveStyleFontPattern.hxx
src/StepVisual/StepVisual_PlanarExtent.hxx
src/StepVisual/StepVisual_PreDefinedColour.cxx
src/StepVisual/StepVisual_SurfaceStyleReflectanceAmbient.hxx
src/StepVisual/StepVisual_SurfaceStyleTransparent.hxx
src/StepVisual/StepVisual_TessellatedEdge.cxx
src/StepVisual/StepVisual_TessellatedFace.cxx
src/StepVisual/StepVisual_TessellatedFace.hxx
src/StepVisual/StepVisual_TessellatedShell.cxx
src/StepVisual/StepVisual_TessellatedSolid.cxx
src/StepVisual/StepVisual_TessellatedSurfaceSet.hxx
src/StepVisual/StepVisual_TessellatedVertex.cxx
src/StepVisual/StepVisual_TessellatedWire.cxx
src/StepVisual/StepVisual_ViewVolume.hxx
src/Storage/Storage_BaseDriver.cxx
src/Storage/Storage_Data.cxx
src/Storage/Storage_RootData.cxx
src/Storage/Storage_Schema.cxx
src/Storage/Storage_TypeData.cxx
src/Storage/Storage_TypedCallBack.cxx
src/TColStd/TColStd_PackedMapOfInteger.cxx
src/TCollection/TCollection_AsciiString.cxx
src/TCollection/TCollection_ExtendedString.cxx
src/TDF/TDF_Attribute.cxx
src/TDF/TDF_ClosureTool.cxx
src/TDF/TDF_CopyLabel.cxx
src/TDF/TDF_Data.cxx
src/TDF/TDF_Delta.cxx
src/TDF/TDF_Tool.cxx
src/TDataStd/TDataStd_BooleanArray.hxx
src/TDataStd/TDataStd_ByteArray.cxx
src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.cxx
src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.cxx
src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.cxx
src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.cxx
src/TDataStd/TDataStd_ExtStringArray.cxx
src/TDataStd/TDataStd_IntPackedMap.cxx
src/TDataStd/TDataStd_IntegerArray.cxx
src/TDataStd/TDataStd_RealArray.cxx
src/TDataStd/TDataStd_ReferenceArray.cxx
src/TDataXtd/TDataXtd_Constraint.cxx
src/TDataXtd/TDataXtd_Geometry.cxx
src/TDocStd/TDocStd_Application.cxx
src/TDocStd/TDocStd_ApplicationDelta.cxx
src/TDocStd/TDocStd_Document.cxx
src/TDocStd/TDocStd_Document.hxx
src/TDocStd/TDocStd_MultiTransactionManager.cxx
src/TDocStd/TDocStd_Owner.hxx
src/TDocStd/TDocStd_PathParser.cxx
src/TDocStd/TDocStd_XLinkTool.cxx
src/TNaming/TNaming.cxx
src/TNaming/TNaming_DeltaOnRemoval.cxx
src/TNaming/TNaming_Localizer.hxx
src/TNaming/TNaming_Name.cxx
src/TNaming/TNaming_NamedShape.cxx
src/TNaming/TNaming_Scope.cxx
src/TNaming/TNaming_Selector.cxx
src/TNaming/TNaming_Tool.cxx
src/TNaming/TNaming_TranslateTool.cxx
src/TPrsStd/TPrsStd_ConstraintTools.cxx
src/TPrsStd/TPrsStd_NamedShapeDriver.cxx
src/TopExp/TopExp_Explorer.cxx
src/TopLoc/TopLoc_Datum3D.cxx
src/TopTools/TopTools_LocationSet.cxx
src/TopTools/TopTools_ShapeSet.cxx
src/TopTrans/TopTrans_CurveTransition.cxx
src/TopTrans/TopTrans_SurfaceTransition.cxx
src/TopoDS/TopoDS_AlertWithShape.cxx
src/TopoDSToStep/TopoDSToStep_FacetedTool.cxx
src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx
src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx
src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx
src/TopoDSToStep/TopoDSToStep_Root.cxx
src/TopoDSToStep/TopoDSToStep_Tool.cxx
src/TopoDSToStep/TopoDSToStep_Tool.hxx
src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx
src/Transfer/Transfer_ActorOfFinderProcess.cxx
src/Transfer/Transfer_Binder.cxx
src/Transfer/Transfer_DispatchControl.cxx
src/Transfer/Transfer_Finder.cxx
src/Transfer/Transfer_FinderProcess.cxx
src/Transfer/Transfer_ResultFromModel.cxx
src/Transfer/Transfer_ResultFromTransient.cxx
src/Transfer/Transfer_TransferInput.cxx
src/Transfer/Transfer_TransferIterator.cxx
src/Transfer/Transfer_TransferOutput.cxx
src/Transfer/Transfer_TransientListBinder.cxx
src/Transfer/Transfer_TransientProcess.cxx
src/TransferBRep/TransferBRep.cxx
src/TransferBRep/TransferBRep_Reader.cxx
src/TransferBRep/TransferBRep_ShapeListBinder.cxx
src/TransferBRep/TransferBRep_TransferResultInfo.hxx
src/Units/Units.cxx
src/Units/Units_Dimensions.cxx
src/Units/Units_Explorer.cxx
src/Units/Units_Explorer.hxx
src/Units/Units_Lexicon.cxx
src/Units/Units_Measurement.cxx
src/Units/Units_Quantity.cxx
src/Units/Units_Sentence.cxx
src/Units/Units_ShiftedToken.cxx
src/Units/Units_ShiftedUnit.cxx
src/Units/Units_Token.cxx
src/Units/Units_Unit.cxx
src/Units/Units_UnitSentence.cxx
src/Units/Units_UnitsDictionary.cxx
src/Units/Units_UnitsSystem.cxx
src/UnitsAPI/UnitsAPI.cxx
src/V3d/V3d.cxx
src/V3d/V3d_CircularGrid.cxx
src/V3d/V3d_RectangularGrid.cxx
src/V3d/V3d_Trihedron.cxx
src/V3d/V3d_View.cxx
src/V3d/V3d_View.hxx
src/Vrml/Vrml_AsciiText.cxx
src/Vrml/Vrml_Cone.cxx
src/Vrml/Vrml_ConfigurationNode.cxx
src/Vrml/Vrml_Coordinate3.cxx
src/Vrml/Vrml_Cube.cxx
src/Vrml/Vrml_Cylinder.cxx
src/Vrml/Vrml_DirectionalLight.cxx
src/Vrml/Vrml_FontStyle.cxx
src/Vrml/Vrml_Group.cxx
src/Vrml/Vrml_IndexedFaceSet.cxx
src/Vrml/Vrml_IndexedLineSet.cxx
src/Vrml/Vrml_Info.cxx
src/Vrml/Vrml_LOD.cxx
src/Vrml/Vrml_Material.cxx
src/Vrml/Vrml_MaterialBinding.cxx
src/Vrml/Vrml_MatrixTransform.cxx
src/Vrml/Vrml_Normal.cxx
src/Vrml/Vrml_NormalBinding.cxx
src/Vrml/Vrml_OrthographicCamera.cxx
src/Vrml/Vrml_PerspectiveCamera.cxx
src/Vrml/Vrml_PointSet.cxx
src/Vrml/Vrml_Rotation.cxx
src/Vrml/Vrml_SFImage.cxx
src/Vrml/Vrml_SFImage.hxx
src/Vrml/Vrml_SFRotation.cxx
src/Vrml/Vrml_SFRotation.hxx
src/Vrml/Vrml_Scale.cxx
src/Vrml/Vrml_Separator.cxx
src/Vrml/Vrml_ShapeHints.cxx
src/Vrml/Vrml_Sphere.cxx
src/Vrml/Vrml_SpotLight.cxx
src/Vrml/Vrml_Switch.cxx
src/Vrml/Vrml_Texture2.cxx
src/Vrml/Vrml_Texture2Transform.cxx
src/Vrml/Vrml_TextureCoordinate2.cxx
src/Vrml/Vrml_Transform.cxx
src/Vrml/Vrml_TransformSeparator.cxx
src/Vrml/Vrml_Translation.cxx
src/Vrml/Vrml_WWWAnchor.cxx
src/Vrml/Vrml_WWWInline.cxx
src/VrmlAPI/VrmlAPI_Writer.cxx
src/VrmlAPI/VrmlAPI_Writer.hxx
src/VrmlConverter/VrmlConverter_Curve.cxx
src/VrmlConverter/VrmlConverter_DeflectionCurve.cxx
src/VrmlConverter/VrmlConverter_HLRShape.cxx
src/VrmlConverter/VrmlConverter_IsoAspect.cxx
src/VrmlConverter/VrmlConverter_LineAspect.cxx
src/VrmlConverter/VrmlConverter_PointAspect.cxx
src/VrmlConverter/VrmlConverter_Projector.cxx
src/VrmlConverter/VrmlConverter_ShadedShape.cxx
src/VrmlConverter/VrmlConverter_ShadingAspect.cxx
src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.cxx
src/VrmlConverter/VrmlConverter_WFDeflectionShape.cxx
src/VrmlConverter/VrmlConverter_WFRestrictedFace.cxx
src/VrmlConverter/VrmlConverter_WFShape.cxx
src/VrmlData/VrmlData_Group.cxx
src/VrmlData/VrmlData_IndexedFaceSet.cxx
src/VrmlData/VrmlData_IndexedLineSet.cxx
src/VrmlData/VrmlData_Node.cxx
src/VrmlData/VrmlData_Node.hxx
src/VrmlData/VrmlData_Scene.cxx
src/VrmlData/VrmlData_ShapeConvert.cxx
src/VrmlData/VrmlData_WorldInfo.hxx
src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.cxx
src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.hxx
src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx
src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx
src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.cxx
src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.hxx
src/XCAFDoc/XCAFDoc.cxx
src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx
src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx
src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx
src/XCAFDoc/XCAFDoc_Datum.cxx
src/XCAFDoc/XCAFDoc_DimTol.hxx
src/XCAFDoc/XCAFDoc_Dimension.cxx
src/XCAFDoc/XCAFDoc_GraphNode.cxx
src/XCAFDoc/XCAFDoc_Material.hxx
src/XCAFDoc/XCAFDoc_ShapeTool.cxx
src/XCAFPrs/XCAFPrs_AISObject.cxx
src/XCAFView/XCAFView_Object.cxx
src/XCAFView/XCAFView_Object.hxx
src/XSAlgo/XSAlgo_AlgoContainer.cxx
src/XSControl/XSControl_ConnectedShapes.cxx
src/XSControl/XSControl_Controller.cxx
src/XSControl/XSControl_FuncShape.cxx
src/XSControl/XSControl_Functions.cxx
src/XSControl/XSControl_Reader.cxx
src/XSControl/XSControl_Reader.hxx
src/XSControl/XSControl_SelectForTransfer.cxx
src/XSControl/XSControl_TransferReader.cxx
src/XSControl/XSControl_TransferWriter.cxx
src/XSControl/XSControl_Utils.cxx
src/XSControl/XSControl_WorkSession.cxx
src/Xw/Xw_Window.cxx
src/gce/gce_MakeCirc.cxx
src/gce/gce_MakeCirc2d.cxx
src/gce/gce_MakeCone.cxx
src/gce/gce_MakeCylinder.cxx
src/gce/gce_MakeDir.cxx
src/gce/gce_MakeDir2d.cxx
src/gce/gce_MakeElips.cxx
src/gce/gce_MakeElips2d.cxx
src/gce/gce_MakeHypr.cxx
src/gce/gce_MakeHypr2d.cxx
src/gce/gce_MakeLin.cxx
src/gce/gce_MakeLin2d.cxx
src/gce/gce_MakeParab.cxx
src/gce/gce_MakeParab2d.cxx
src/gce/gce_MakePln.cxx
src/gp/gp_Dir.cxx
src/gp/gp_Quaternion.cxx
src/gp/gp_Trsf.cxx
src/gp/gp_XY.cxx
src/gp/gp_XYZ.cxx
src/math/math.cxx
src/math/math_BFGS.cxx
src/math/math_BissecNewton.cxx
src/math/math_BracketMinimum.cxx
src/math/math_BracketedRoot.cxx
src/math/math_BrentMinimum.cxx
src/math/math_ComputeGaussPointsAndWeights.cxx
src/math/math_ComputeKronrodPointsAndWeights.cxx
src/math/math_Crout.cxx
src/math/math_DirectPolynomialRoots.cxx
src/math/math_DirectPolynomialRoots.hxx
src/math/math_DoubleTab.hxx
src/math/math_EigenValuesSearcher.cxx
src/math/math_FRPR.cxx
src/math/math_FunctionAllRoots.cxx
src/math/math_FunctionRoot.cxx
src/math/math_FunctionRoot.hxx
src/math/math_FunctionRoots.cxx
src/math/math_FunctionSetRoot.cxx
src/math/math_Gauss.cxx
src/math/math_GaussLeastSquare.hxx
src/math/math_GaussMultipleIntegration.cxx
src/math/math_GaussSetIntegration.cxx
src/math/math_GaussSingleIntegration.cxx
src/math/math_GaussSingleIntegration.hxx
src/math/math_GlobOptMin.cxx
src/math/math_GlobOptMin.hxx
src/math/math_Householder.cxx
src/math/math_Householder.hxx
src/math/math_IntegerVector.cxx
src/math/math_Jacobi.cxx
src/math/math_Jacobi.hxx
src/math/math_Kronrod.cxx
src/math/math_KronrodSingleIntegration.cxx
src/math/math_KronrodSingleIntegration.hxx
src/math/math_Matrix.cxx
src/math/math_NewtonFunctionRoot.cxx
src/math/math_NewtonFunctionSetRoot.cxx
src/math/math_NewtonMinimum.cxx
src/math/math_PSO.cxx
src/math/math_PSOParticlesPool.cxx
src/math/math_Powell.cxx
src/math/math_Recipes.cxx
src/math/math_SVD.cxx
src/math/math_TrigonometricFunctionRoots.cxx
src/math/math_Uzawa.cxx
src/math/math_Uzawa.hxx

index 0d910bed46073ceb1b1754accdc99c5a96fd33f5..1de1edbcb5745795b6fa5288f42458cad34e09e9 100644 (file)
@@ -103,7 +103,7 @@ public:
 private:
 
   Quantity_NameOfColor myCol;
-  Standard_Real myWid;
+  Standard_Real myWid{};
   Standard_Boolean hasC;
   Standard_Boolean hasW;
 
index 9580e5c22382ea354a9ba6e49c0942f1cba9c4cb..8341cb4664f2734ce7ca71f21c59145f1206c300 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <AIS_Axis.hxx>
 
 #include <Aspect_TypeOfLine.hxx>
@@ -71,7 +73,7 @@ myTypeOfAxis(anAxisType),
 myIsXYZAxis(Standard_True)
 {
   Handle (Prs3d_DatumAspect) DA = new Prs3d_DatumAspect();
-  Standard_Real aLength;
+  Standard_Real aLength = NAN;
   try {
     aLength = UnitsAPI::AnyToLS(100. ,"mm");
   } catch (Standard_Failure const&) {
@@ -112,11 +114,11 @@ AIS_Axis::AIS_Axis(const Handle(Geom_Axis1Placement)& anAxis)
 //=======================================================================
 AIS_Axis::AIS_Axis (const gp_Ax1& theAxis, const Standard_Real theLength)
 : myComponent (new Geom_Line (theAxis)),
-  myTypeOfAxis (AIS_TOAX_ZAxis),
-  myIsXYZAxis (Standard_True)
+  myPfirst(theAxis.Location()), myTypeOfAxis (AIS_TOAX_ZAxis),
+  myIsXYZAxis (Standard_True), myDir(theAxis.Direction())
 {
-  myDir = theAxis.Direction();
-  myPfirst = theAxis.Location();
+  
+  
   if (theLength <= 0 && theLength != -1)
   {
     throw Standard_NumericError ("AIS_Axis::AIS_Axis : invalid value for theLength parameter");
@@ -274,7 +276,7 @@ void AIS_Axis::ComputeFields()
     const gp_Dir& oX   = anAxis.XDirection();
     const gp_Dir& oY   = anAxis.YDirection();
     const gp_Dir& oZ   = anAxis.Direction();
-    Standard_Real xo,yo,zo,x = 0.,y = 0.,z = 0.;
+    Standard_Real xo = NAN,yo = NAN,zo = NAN,x = 0.,y = 0.,z = 0.;
     Orig.Coord(xo,yo,zo);
     myPfirst.SetCoord(xo,yo,zo);
     
index 23a928c2fc5954a87d746d5899b6cdf4a4033045..574699c1d42cb16037f8e579fceb287cecbced44 100644 (file)
@@ -124,8 +124,8 @@ private:
   AIS_TypeOfAxis myTypeOfAxis;
   Standard_Boolean myIsXYZAxis;
   gp_Dir myDir;
-  Standard_Real myVal;
-  Standard_CString myText;
+  Standard_Real myVal{};
+  Standard_CString myText{};
   Handle(Prs3d_LineAspect) myLineAspect;
 
 };
index 1bdd5b27d8307da56b5e0e826ec4f07fd861974f..b8dec686036cb92bdaccd8dbe9fe48aa7cc73378 100644 (file)
@@ -28,9 +28,9 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_BadEdgeFilter,SelectMgr_Filter)
 //function : AIS_BadEdgeFilter
 //purpose  : 
 //=======================================================================
-AIS_BadEdgeFilter::AIS_BadEdgeFilter()
+AIS_BadEdgeFilter::AIS_BadEdgeFilter() : myContour(0)
 {
-  myContour=0;
+  
 }
 
 //=======================================================================
index 8becc91faa6e2c7cdebac0f3414b1668d8e0e4bc..ddb1f01821f49a9a02f69a2eede2b95f5e022d08 100644 (file)
@@ -37,7 +37,7 @@ AIS_C0RegularityFilter::AIS_C0RegularityFilter(const TopoDS_Shape& aShape)
 {
   TopTools_IndexedDataMapOfShapeListOfShape SubShapes;
   TopExp::MapShapesAndAncestors(aShape,TopAbs_EDGE,TopAbs_FACE,SubShapes);
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   for (Standard_Integer i = 1; i <= SubShapes.Extent(); i++) {
     Ok = Standard_False;
     TopTools_ListIteratorOfListOfShape it(SubShapes(i));
@@ -56,7 +56,7 @@ AIS_C0RegularityFilter::AIS_C0RegularityFilter(const TopoDS_Shape& aShape)
       }
     }
     if (Ok) {
-      TopoDS_Shape curEdge = SubShapes.FindKey( i );
+      const TopoDS_Shape& curEdge = SubShapes.FindKey( i );
       myMapOfEdges.Add(curEdge);
     }
   }
index 866259af85da90da38677f28713bacb26863fc0c..47a43296c3dfdf759cc52186441880d6e2a3f1ca 100644 (file)
@@ -511,7 +511,7 @@ void AIS_InteractiveContext::Load (const Handle(AIS_InteractiveObject)& theIObj,
   setContextToObject (theIObj);
   if (!myObjects.IsBound (theIObj))
   {
-    Standard_Integer aDispMode, aHiMod, aSelModeDef;
+    Standard_Integer aDispMode = 0, aHiMod = 0, aSelModeDef = 0;
     GetDefModes (theIObj, aDispMode, aHiMod, aSelModeDef);
     setObjectStatus (theIObj, PrsMgr_DisplayStatus_Erased, aDispMode, theSelMode != -1 ? theSelMode : aSelModeDef);
     theIObj->ViewAffinity()->SetVisible (true); // reset view affinity mask
@@ -945,7 +945,7 @@ void AIS_InteractiveContext::Redisplay (const AIS_KindOfInteractive theKOI,
   Standard_Boolean isRedisplayed = Standard_False;
   for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
   {
-    Handle(AIS_InteractiveObject) anObj = anObjIter.Key();
+    const Handle(AIS_InteractiveObject)& anObj = anObjIter.Key();
     if (anObj->Type() != theKOI)
     {
       continue;
@@ -1155,7 +1155,7 @@ void AIS_InteractiveContext::SetDisplayMode(const Standard_Integer theMode,
       continue;
     }
 
-    Handle(AIS_GlobalStatus) aStatus = anObjIter.Value();
+    const Handle(AIS_GlobalStatus)& aStatus = anObjIter.Value();
     aStatus->SetDisplayMode (theMode);
 
     if (anObj->DisplayStatus() == PrsMgr_DisplayStatus_Displayed)
@@ -2251,7 +2251,7 @@ Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection (const Handle(V3d_View)&
 
   for (AIS_MapIteratorOfMapOfObjectOwners anIter (anObjectOwnerMap); anIter.More(); anIter.Next())
   {
-    const Handle(SelectMgr_SelectableObject) anObject = anIter.Key();
+    const Handle(SelectMgr_SelectableObject)& anObject = anIter.Key();
     Bnd_Box aTmpBox = anObject->BndBoxOfSelected (anIter.ChangeValue());
     aBndSelected.Add (aTmpBox);
   }
index 64c30eb89d679e1476411f834d2d50bffe866a75..054164438b146d3f63962bd814902290746f70e6 100644 (file)
@@ -1453,7 +1453,7 @@ protected: //! @name internal fields
   Handle(SelectMgr_SelectionManager) mgrSelector;
   Handle(PrsMgr_PresentationManager) myMainPM;
   Handle(V3d_Viewer) myMainVwr;
-  V3d_View* myLastActiveView;
+  V3d_View* myLastActiveView{};
   Handle(SelectMgr_EntityOwner) myLastPicked;
   Standard_Boolean myToHilightSelected;
   Handle(AIS_Selection) mySelection;
index feb5570abe25f3e77ea92565adda05dd17a57a00..7cb5abe8500f1aed6758df519c19fb94c438a462 100644 (file)
@@ -256,7 +256,7 @@ protected:
   Handle(Graphic3d_AspectLine3d)   myArrowLineAspectShadow; //!< arrow shadow style
   Handle(Graphic3d_MarkerImage)    myMarkerImages[2];       //!< icon of disabled (0) and enabled (1) light
   Handle(Select3D_SensitiveSphere) mySensSphere;            //!< sensitive sphere of directional light source
-  Aspect_TypeOfMarker              myMarkerTypes[2];        //!< icon of disabled (0) and enabled (1) light
+  Aspect_TypeOfMarker              myMarkerTypes[2]{};        //!< icon of disabled (0) and enabled (1) light
   Aspect_TypeOfMarker              myCodirMarkerType;       //!< icon of arrow co-directional to camera direction (look from)
   Aspect_TypeOfMarker              myOpposMarkerType;       //!< icon of arrow opposite to camera direction (look at)
 
index 4cd43844b826579ea07d30ba18e827773a80a737..2a1eda4aa57e71c9765ea3f8df0d2dbb90c84c73 100644 (file)
@@ -89,7 +89,7 @@ namespace
       ManipSensRotation (theCircle.Position().Direction()) {}
 
     //! Checks whether the circle overlaps current selecting volume
-    virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
+    Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
                                       SelectBasics_PickResult& thePickResult) Standard_OVERRIDE
     {
       return isValidRay (theMgr)
@@ -108,7 +108,7 @@ namespace
       ManipSensRotation (thePlaneNormal) {}
 
     //! Checks whether the circle overlaps current selecting volume
-    virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
+    Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
                                       SelectBasics_PickResult& thePickResult) Standard_OVERRIDE
     {
       return isValidRay (theMgr)
index b04a7a9cecd20888d821bffd3b928fccc6ff89ef..99db4d844a322560ef20bf522a26715a48466194 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <AIS_Plane.hxx>
 
 #include <AIS_InteractiveContext.hxx>
@@ -421,7 +423,7 @@ void AIS_Plane::SetMinimumSize (const Standard_Real theValue)
     UnsetMinimumSize();
     return;
   }
-  Standard_Real aX, anY;
+  Standard_Real aX = NAN, anY = NAN;
   Size (aX, anY);
   SetTransformPersistence (new Graphic3d_TransformPersScaledAbove (Min (aX, anY) / theValue, myCenter));
 }
@@ -518,7 +520,7 @@ void AIS_Plane::ComputeFrame()
 {
 
   const Handle(Geom_Plane)& pl = myComponent;
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
 
   if (myAutomaticPosition) {
     ElSLib::Parameters(pl->Pln(),myCenter,U,V);
@@ -551,7 +553,7 @@ void AIS_Plane::ComputeFields()
     gp_Dir oY = myAx2->Ax2().YDirection();
     gp_Dir oZ = myAx2->Ax2().Direction();
     myCenter = Orig;
-    Standard_Real xo,yo,zo,x1,y1,z1,x2,y2,z2,x3,y3,z3,x4=0,y4=0,z4=0;
+    Standard_Real xo = NAN,yo = NAN,zo = NAN,x1 = NAN,y1 = NAN,z1 = NAN,x2 = NAN,y2 = NAN,z2 = NAN,x3 = NAN,y3 = NAN,z3 = NAN,x4=0,y4=0,z4=0;
     Standard_Real x5=0,y5=0,z5=0;
     Orig.Coord(xo,yo,zo);
     oX.Coord(x1,y1,z1);
index cf973058f9252d5b4efccaf38071eab767cd1122..c5adaa899c5936daa6eb5148f3cf54276681e5df 100644 (file)
@@ -169,7 +169,7 @@ private:
   Standard_Boolean myAutomaticPosition;
   AIS_TypeOfPlane myTypeOfPlane;
   Standard_Boolean myIsXYZPlane;
-  Standard_Boolean myHasOwnSize;
+  Standard_Boolean myHasOwnSize{};
   Select3D_TypeOfSensitivity myTypeOfSensitivity;
 
 };
index 2a9bfb8bc667451553d9bafe470a1b83ccb69dd2..5d5a5e3db33cf1fc22bc66fc46320432ed777ae7 100644 (file)
@@ -18,6 +18,8 @@
 // + (-1) selection mode token into account 
 // (SAMTECH specific)
 
+#include <math.h>
+
 #include <AIS_Line.hxx>
 #include <AIS_PlaneTrihedron.hxx>
 #include <AIS_Point.hxx>
@@ -153,7 +155,7 @@ void AIS_PlaneTrihedron::Compute (const Handle(PrsMgr_PresentationManager)& ,
   gp_Dir xDir = myPlane->Position().Ax2().XDirection();
 
   gp_Pnt orig = myPlane->Position().Ax2().Location();
-  Standard_Real xo,yo,zo,x,y,z;
+  Standard_Real xo = NAN,yo = NAN,zo = NAN,x = NAN,y = NAN,z = NAN;
   orig.Coord( xo, yo, zo );
   xDir.Coord( x, y, z );
   first.SetCoord( xo, yo, zo );
@@ -188,7 +190,7 @@ void AIS_PlaneTrihedron::Compute (const Handle(PrsMgr_PresentationManager)& ,
 void AIS_PlaneTrihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
                                             const Standard_Integer aMode)
 {
-  Standard_Integer Prior;
+  Standard_Integer Prior = 0;
   Handle(SelectMgr_EntityOwner) eown;
   TColgp_Array1OfPnt PP(1,4),PO(1,4);
 //  ExtremityPoints(PP);
index eb9e7f68e743ea34496ec55cc9b3544189ac92a5..fb2bf4f3abc104f0e9ff5d4d92489babcd3cfd3f 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <AIS_Shape.hxx>
 
 #include <AIS_GraphicTool.hxx>
@@ -856,7 +858,7 @@ void AIS_Shape::SetOwnDeviationAngle (const Standard_Real theAngle)
 
 void AIS_Shape::SetAngleAndDeviation ( const Standard_Real  anAngle )
 {
-  Standard_Real OutAngl,OutDefl;
+  Standard_Real OutAngl = NAN,OutDefl = NAN;
   HLRBRep::PolyHLRAngleAndDeflection(anAngle,OutAngl,OutDefl);
   SetOwnDeviationAngle(anAngle) ;
   SetOwnDeviationCoefficient(OutDefl) ;
index 76fb8f1c33a6ed032a43d1f807006761e955df34..aba733647988a78bc82e5fb966933e644b381a34 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <AIS_TextLabel.hxx>
 
 #include <AIS_InteractiveContext.hxx>
@@ -292,7 +294,7 @@ void AIS_TextLabel::Compute (const Handle(PrsMgr_PresentationManager)& ,
       }
 
       gp_Pnt aCenterOfLabel;
-      Standard_Real aWidth, aHeight;
+      Standard_Real aWidth = NAN, aHeight = NAN;
 
       Standard_Boolean isInit = calculateLabelParams (aPosition, aCenterOfLabel, aWidth, aHeight);
       if (myHasOrientation3D)
@@ -363,7 +365,7 @@ void AIS_TextLabel::ComputeSelection (const Handle(SelectMgr_Selection)& theSele
       }
 
       gp_Pnt aCenterOfLabel;
-      Standard_Real aWidth, aHeight;
+      Standard_Real aWidth = NAN, aHeight = NAN;
 
       if (!calculateLabelParams (aPosition, aCenterOfLabel, aWidth, aHeight))
       {
index 1cb792082fb1514f5bfcf54ed990e7e66a3adf83..44d40c49de463188c498eceedf29d69b63a7c7f4 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <AIS_TexturedShape.hxx>
 
 #include <AIS_GraphicTool.hxx>
@@ -266,8 +268,8 @@ void AIS_TexturedShape::updateAttributes (const Handle(Prs3d_Presentation)& theP
   myAspect = new Graphic3d_AspectFillArea3d (*myDrawer->ShadingAspect()->Aspect());
   if (HasPolygonOffsets())
   {
-    Standard_Integer aMode;
-    Standard_ShortReal aFactor, aUnits;
+    Standard_Integer aMode = 0;
+    Standard_ShortReal aFactor = NAN, aUnits = NAN;
     PolygonOffsets (aMode, aFactor, aUnits);
     myAspect->SetPolygonOffsets (aMode, aFactor, aUnits);
   }
index 734d092ef7b64a04ee136eb039ed20b6c1058db7..bb733e0a96acc119f5eda4f8d658267d60c50285 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(AIS_Triangulation,AIS_InteractiveObject)
 
-AIS_Triangulation::AIS_Triangulation(const Handle(Poly_Triangulation)& Triangulation)
+AIS_Triangulation::AIS_Triangulation(const Handle(Poly_Triangulation)& Triangulation) : myTriangulation(Triangulation), myNbNodes(Triangulation->NbNodes()), myNbTriangles(Triangulation->NbTriangles()), myFlagColor(0)
 {
-  myTriangulation = Triangulation;
-  myNbNodes       = Triangulation->NbNodes();
-  myNbTriangles   = Triangulation->NbTriangles();
-  myFlagColor     = 0;
+  
+  
+  
+  
 }
 
 //=======================================================================
index 03cb6f1c29625a5e55deb32314f32d7a8d7ad71c..80797dda04394fe71dec28e0c747f55054df7175 100644 (file)
@@ -241,7 +241,7 @@ protected:
   Standard_Boolean myHasOwnArrowColor;
 
   TCollection_ExtendedString myLabels[Prs3d_DatumParts_NB];
-  Standard_Integer mySelectionPriority[Prs3d_DatumParts_NB];
+  Standard_Integer mySelectionPriority[Prs3d_DatumParts_NB]{};
 
   Handle(Graphic3d_Group) myPartToGroup[Prs3d_DatumParts_NB];
   NCollection_List<Prs3d_DatumParts> mySelectedParts;
index 9835b152d0ce7f1f1f905f680eacc7d09d76ddcd..8335efc01af59cfb62ecfebf9363ab07bfe9ec0e 100644 (file)
@@ -43,7 +43,7 @@ public:
   }
 
   //! Image reader.
-  virtual Handle(Image_PixMap) GetImage (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE
+  Handle(Image_PixMap) GetImage (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE
   {
     return myImageSource->ReadImage (theSupported);
   }
index 9f90004ff9488a51b23b85d9d243ac8587dde906..4ac43817ab943e340bfce62dbc5523220406f6b6 100644 (file)
@@ -36,9 +36,9 @@ static Handle(TCollection_HAsciiString) nulstr;
 static Handle(Interface_HArray1OfHAsciiString) nularr;
 
 APIHeaderSection_MakeHeader::APIHeaderSection_MakeHeader
-  (const Handle(StepData_StepModel)& model)
+  (const Handle(StepData_StepModel)& model) : done(Standard_True)
 {
-  done = Standard_True;
+  
   if (model->HasHeaderEntity (STANDARD_TYPE(HeaderSection_FileName))) {
     fn = GetCasted(HeaderSection_FileName,
                   model->HeaderEntity(STANDARD_TYPE(HeaderSection_FileName)));
@@ -384,7 +384,7 @@ void APIHeaderSection_MakeHeader::AddSchemaIdentifier(const Handle(TCollection_H
   Handle(Interface_HArray1OfHAsciiString) idents = fs->SchemaIdentifiers();
 
   // check that requested subschema is already in the list
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for ( i=1; ! idents.IsNull() && i <= idents->Length(); i++ ) {
     if ( aSchem->IsSameString ( idents->Value(i) ) ) return;
   }
index 9415693b6538655202bcba53a91208ef58a0abaf..a1754c5a601575b9e217c62449a40b1c978028f1 100644 (file)
@@ -185,7 +185,7 @@ private:
 
 
 
-  Standard_Boolean done;
+  Standard_Boolean done{};
   Handle(HeaderSection_FileName) fn;
   Handle(HeaderSection_FileSchema) fs;
   Handle(HeaderSection_FileDescription) fd;
index 7f4d40c21cec4752382c719f040201b958af09a4..2cfb615747e24b414e4fc21b4f459b2c0be9e9e6 100644 (file)
@@ -224,7 +224,7 @@ void Adaptor2d_OffsetCurve::Intervals(TColStd_Array1OfReal& TI,
   Standard_Integer last = nbInter+1;
   while (T(last) >= myLast) last--;
 
-  Standard_Integer i = TI.Lower(), j;
+  Standard_Integer i = TI.Lower(), j = 0;
   for (j = first-1; j <= last+1; j++) {
     TI(i) = T(j);
     i++;
index 9bf807c22778fff8e7f3c3e39ad670b4072211ef..4d8830ee42dfe464251ca1d496beead50e439bff 100644 (file)
@@ -14,6 +14,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <Adaptor3d_CurveOnSurface.hxx>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -242,9 +244,9 @@ static void Locate1Coord(const Standard_Integer Index,
                         const Handle(Geom_BSplineCurve)& BSplC,
                         gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop)
 {
-  Standard_Real Comp1=0, DComp1=0, cur, f = 0.0, l = 0.0;
+  Standard_Real Comp1=0, DComp1=0, cur = NAN, f = 0.0, l = 0.0;
   Standard_Real Tol = Precision::PConfusion()/10;
-  Standard_Integer i = 1, Bnd1, Bnd2;
+  Standard_Integer i = 1, Bnd1 = 0, Bnd2 = 0;
   Standard_Boolean DIsNull= Standard_False; 
   TColStd_Array1OfReal Arr(1,BSplC->NbKnots());  BSplC->Knots(Arr);
   
@@ -346,7 +348,7 @@ static void Locate1Coord(const Standard_Integer Index,
 {
   Standard_Real Comp1=0,DComp1=0; 
   Standard_Real Tol = Precision::PConfusion()/10;
-  Standard_Integer i=1, Up=0, Up1, Up2, Down=0, Down1, Down2;
+  Standard_Integer i=1, Up=0, Up1 = 0, Up2 = 0, Down=0, Down1 = 0, Down2 = 0;
   Standard_Real cur = 0.;
 
   DIsNull= Standard_False; 
@@ -875,7 +877,7 @@ Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals (const GeomAbs_Shape S) c
   if(S == myIntCont && !myIntervals.IsNull())
     return myIntervals->Length()-1;
   
-  Standard_Integer nu,nv,nc;
+  Standard_Integer nu = 0,nv = 0,nc = 0;
   nu=mySurface->NbUIntervals(S);
   nv=mySurface->NbVIntervals(S);
   nc=myCurve->NbIntervals(S);
@@ -887,7 +889,7 @@ Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals (const GeomAbs_Shape S) c
   TColStd_Array1OfReal TabC(TabBuf(nu + nv + 3), 1, nc+1);
 
   Standard_Integer NbSample = 20;
-  Standard_Real U,V,Tdeb,Tfin;
+  Standard_Real U = NAN,V = NAN,Tdeb = NAN,Tfin = NAN;
   Tdeb=myCurve->FirstParameter();
   Tfin=myCurve->LastParameter();
 
@@ -1234,7 +1236,7 @@ gp_Vec Adaptor3d_CurveOnSurface::DN
 Standard_Real Adaptor3d_CurveOnSurface::Resolution
   (const Standard_Real R3d) const
 {
-  Standard_Real ru,rv;
+  Standard_Real ru = NAN,rv = NAN;
   ru = mySurface->UResolution(R3d);
   rv = mySurface->VResolution(R3d);
   return myCurve->Resolution(Min(ru,rv)); 
@@ -1648,7 +1650,7 @@ void Adaptor3d_CurveOnSurface::EvalKPart()
 
 void Adaptor3d_CurveOnSurface::EvalFirstLastSurf()
 { 
-  Standard_Real FirstPar,LastPar;
+  Standard_Real FirstPar = NAN,LastPar = NAN;
   gp_Pnt2d UV, LeftBot, RightTop;
   gp_Vec2d DUV;
   Standard_Real Tol= Precision::PConfusion()/10;
@@ -1756,7 +1758,7 @@ Standard_Boolean Adaptor3d_CurveOnSurface::LocatePart_RevExt(const gp_Pnt2d& UV,
       Locate2Coord(1,UV,DUV,S->FirstUParameter(),S->LastUParameter(),LeftBot,RightTop);
     } 
 
-    Standard_Real u1,u2,v1,v2;
+    Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
     ReverseParam(LeftBot.X(),RightTop.X(),u1,u2);
     LeftBot.SetX(u1);
     RightTop.SetX(u2);
index 9873386075b56d6ca863c2619ec97e34c9f0eba7..9108ed46f471eb51a9ebaa7768ca48e183e198ce 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Adaptor3d_HSurfaceTool.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -102,7 +104,7 @@ Standard_Boolean Adaptor3d_HSurfaceTool::IsSurfG1(const Handle(Adaptor3d_Surface
                                                   const Standard_Boolean theAlongU,
                                                   const Standard_Real theAngTol)
 {
-  Standard_Real aUf, aUl, aVf, aVl;
+  Standard_Real aUf = NAN, aUl = NAN, aVf = NAN, aVl = NAN;
   aUf = theSurf->FirstUParameter();
   aUl = theSurf->LastUParameter();
   aVf = theSurf->FirstVParameter();
index fec695971eebb2660214cfda985f721d20362d92..6262ad3ed7d39933f96a1f7704b53b9b8036218c 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Adaptor3d_InterFunc.hxx>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -40,7 +42,7 @@ Standard_Boolean Adaptor3d_InterFunc::Value(const Standard_Real X , Standard_Rea
 }
 Standard_Boolean Adaptor3d_InterFunc::Derivative(const Standard_Real X , Standard_Real& D)
 {
-   Standard_Real F;
+   Standard_Real F = NAN;
    return Values(X,F,D);
 }
 Standard_Boolean Adaptor3d_InterFunc::Values(const Standard_Real X , Standard_Real& F,Standard_Real& D)
index 3859809d5bff44e3720aa04d2f1008324911fae3..2a989c4c62602befcf07c9af96d9de19d9517667 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Adaptor3d_IsoCurve.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -312,7 +314,7 @@ void Adaptor3d_IsoCurve::Intervals(TColStd_Array1OfReal& TI,
   Standard_Integer last = nbInter+1;
   while (T(last) >= myLast) last--;
 
-  Standard_Integer i = TI.Lower(), j;
+  Standard_Integer i = TI.Lower(), j = 0;
   for (j = first-1; j <= last+1; j++) {
     TI(i) = T(j);
     i++;
@@ -675,7 +677,7 @@ static void computeHR(const gp_Ax3&        axes,
 gp_Circ Adaptor3d_IsoCurve::Circle() const
 {
   gp_Ax3 axes;
-  Standard_Real radius,h = 0.;
+  Standard_Real radius = NAN,h = 0.;
 
   switch (mySurface->GetType()) {
     
index 807291d755da1bdf2ca5aff2b6017d188b27ba40..cdeac49f9a9b61520793ed67a0a2c936a144b107 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Adaptor3d_TopolTool.hxx>
 
 #include <Adaptor2d_Line2d.hxx>
@@ -58,7 +60,7 @@ void Adaptor3d_TopolTool::Initialize ()
 
 void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_Surface)& S)
 {
-  Standard_Real pinf,psup,deltap;
+  Standard_Real pinf = NAN,psup = NAN,deltap = NAN;
   //Adaptor2d_Line2d  * Line2dPtr ;
 
   myNbSamplesU=-1;
@@ -216,7 +218,7 @@ void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor2d_Curve2d)& C)
 {
   nbVtx = 0;
   idVtx = 0;
-  Standard_Real theUinf,theUsup;
+  Standard_Real theUinf = NAN,theUsup = NAN;
   theUinf = C->FirstParameter();
   theUsup = C->LastParameter();
 //  if (!Precision::IsNegativeInfinite(theUinf)) {
@@ -280,7 +282,7 @@ TopAbs_State Adaptor3d_TopolTool::Classify(const gp_Pnt2d& P,
     return TopAbs_IN;
   }
   else {
-    Standard_Boolean dansu,dansv,surumin,surumax,survmin,survmax;
+    Standard_Boolean dansu = 0,dansv = 0,surumin = 0,surumax = 0,survmin = 0,survmax = 0;
     if (Precision::IsNegativeInfinite(Uinf) && 
            Precision::IsPositiveInfinite(Usup)) {
       dansu = Standard_True;
@@ -415,7 +417,7 @@ Standard_Boolean  Adaptor3d_TopolTool::IsThePointOn(const gp_Pnt2d& P,
     return(Standard_False);
   }
   else {
-    Standard_Boolean dansu,dansv,surumin,surumax,survmin,survmax;
+    Standard_Boolean dansu = 0,dansv = 0,surumin = 0,surumax = 0,survmin = 0,survmax = 0;
     if (Precision::IsNegativeInfinite(Uinf) && 
        Precision::IsPositiveInfinite(Usup)) {
       dansu = Standard_True;
@@ -569,7 +571,7 @@ static void Analyse(const TColgp_Array2OfPnt& array2,
                    Standard_Integer& myNbSamplesU,
                    Standard_Integer& myNbSamplesV) { 
   gp_Vec Vi,Vip1;
-  Standard_Integer sh,nbch,i,j;
+  Standard_Integer sh = 0,nbch = 0,i = 0,j = 0;
   
   sh = 1;
   nbch = 0;
@@ -638,7 +640,7 @@ void Adaptor3d_TopolTool::ComputeSamplePoints()
 { 
   const Standard_Integer aMaxNbSample = 50;
 
-  Standard_Real uinf,usup,vinf,vsup;
+  Standard_Real uinf = NAN,usup = NAN,vinf = NAN,vsup = NAN;
   uinf = myS->FirstUParameter();  usup = myS->LastUParameter();
   vinf = myS->FirstVParameter();  vsup = myS->LastVParameter();
   if (usup < uinf) { Standard_Real temp=uinf; uinf=usup; usup=temp; }
@@ -651,7 +653,7 @@ void Adaptor3d_TopolTool::ComputeSamplePoints()
   else if (vinf == RealFirst()) { vinf=vsup-2.e5;  }
   else if (vsup == RealLast()) {  vsup=vinf+2.e5;  }
   
-  Standard_Integer nbsu,nbsv;
+  Standard_Integer nbsu = 0,nbsv = 0;
   GeomAbs_SurfaceType typS = myS->GetType();
   switch(typS) { 
   case GeomAbs_Plane:          { nbsv=2; nbsu=2; } break;
@@ -756,8 +758,8 @@ void Adaptor3d_TopolTool::SamplePoint(const Standard_Integer i,
                                      gp_Pnt2d& P2d,
                                      gp_Pnt& P3d)
 {
-  Standard_Integer iu, iv;
-  Standard_Real u, v;
+  Standard_Integer iu = 0, iv = 0;
+  Standard_Real u = NAN, v = NAN;
   if (myUPars.IsNull())
     {
       Standard_Real myDU=(Usup-Uinf)/(myNbSamplesU+1);
@@ -846,7 +848,7 @@ void Adaptor3d_TopolTool::SamplePnts(const Standard_Real theDefl,
                                     const Standard_Integer theNUmin,
                                     const Standard_Integer theNVmin)
 { 
-  Standard_Real uinf,usup,vinf,vsup;
+  Standard_Real uinf = NAN,usup = NAN,vinf = NAN,vsup = NAN;
   uinf = myS->FirstUParameter();  usup = myS->LastUParameter();
   vinf = myS->FirstVParameter();  vsup = myS->LastVParameter();
   if (usup < uinf) { Standard_Real temp=uinf; uinf=usup; usup=temp; }
@@ -906,8 +908,8 @@ void Adaptor3d_TopolTool::SamplePnts(const Standard_Real theDefl,
 
   myUPars = new TColStd_HArray1OfReal(1, myNbSamplesU);
   myVPars = new TColStd_HArray1OfReal(1, myNbSamplesV);
-  Standard_Integer i;
-  Standard_Real t, dt = (usup - uinf)/(myNbSamplesU - 1);
+  Standard_Integer i = 0;
+  Standard_Real t = NAN, dt = (usup - uinf)/(myNbSamplesU - 1);
   myUPars->SetValue(1, uinf);
   myUPars->SetValue(myNbSamplesU, usup);
   for(i = 2, t = uinf+dt; i < myNbSamplesU; ++i, t += dt) {
@@ -936,12 +938,12 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
 { 
   const Standard_Integer aMaxPnts = 1001;
   const Handle(Geom_BSplineSurface)& aBS = myS->BSpline();
-  Standard_Real uinf,usup,vinf,vsup;
+  Standard_Real uinf = NAN,usup = NAN,vinf = NAN,vsup = NAN;
   uinf = myS->FirstUParameter();  usup = myS->LastUParameter();
   vinf = myS->FirstVParameter();  vsup = myS->LastVParameter();
 
-  Standard_Integer i, k, j = 1;
-  Standard_Real t1, t2, dt;
+  Standard_Integer i = 0, k = 0, j = 1;
+  Standard_Real t1 = NAN, t2 = NAN, dt = NAN;
   Standard_Integer ui1 = aBS->FirstUKnotIndex();
   Standard_Integer ui2 = aBS->LastUKnotIndex();
   Standard_Integer vi1 = aBS->FirstVKnotIndex();
@@ -982,7 +984,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
 
   //modified by NIZHNY-EMV Mon Jun 10 14:19:04 2013
   if (nbsu < theNUmin || nbsv < theNVmin) {
-    Standard_Integer aNb;
+    Standard_Integer aNb = 0;
     if (nbsu < nbsv) {
       aNb = (Standard_Integer)(nbsv * ((Standard_Real)theNUmin)/((Standard_Real)nbsu));
       aNb = Min(aNb, 30);
@@ -1096,7 +1098,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
 
   Standard_Real aDefl2 = Max(theDefl*theDefl, 1.e-9);
   Standard_Real tol = Max(0.01*aDefl2, 1.e-9);
-  Standard_Integer l;
+  Standard_Integer l = 0;
 
   anUFlg(1) = Standard_True;
   anUFlg(nbsu) = Standard_True;
@@ -1270,7 +1272,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
   //
   //modified by NIZNHY-PKV Fri Dec 16 10:05:01 2011f
   //
-  Standard_Boolean bFlag;
+  Standard_Boolean bFlag = 0;
   //
   // U 
   bFlag=(myNbSamplesU < theNUmin);
index 439b16e129c16345f585665ed3c733a63878cc3e..07b1bfb07ab53b33b2bb32b7e80083819c524c72 100644 (file)
@@ -157,22 +157,22 @@ public:
 protected:
 
   Handle(Adaptor3d_Surface) myS;
-  Standard_Integer myNbSamplesU;
-  Standard_Integer myNbSamplesV;
+  Standard_Integer myNbSamplesU{};
+  Standard_Integer myNbSamplesV{};
   Handle(TColStd_HArray1OfReal) myUPars;
   Handle(TColStd_HArray1OfReal) myVPars;
 
 private:
 
-  Standard_Integer nbRestr;
-  Standard_Integer idRestr;
-  Standard_Real Uinf;
-  Standard_Real Usup;
-  Standard_Real Vinf;
-  Standard_Real Vsup;
+  Standard_Integer nbRestr{};
+  Standard_Integer idRestr{};
+  Standard_Real Uinf{};
+  Standard_Real Usup{};
+  Standard_Real Vinf{};
+  Standard_Real Vsup{};
   Handle(Adaptor2d_Line2d) myRestr[4];
-  Standard_Integer nbVtx;
-  Standard_Integer idVtx;
+  Standard_Integer nbVtx{};
+  Standard_Integer idVtx{};
   Handle(Adaptor3d_HVertex) myVtx[2];
 
 };
index f07a63a03549b4d376a645854523f7ee85291830..71c7cbf1c4edfd270b4d6e6dfa53f2fd04f47799 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <AdvApp2Var_ApproxAFunc2Var.hxx>
 #include <AdvApp2Var_EvaluatorFunc2Var.hxx>
 #include <AdvApp2Var_Criterion.hxx>
@@ -171,7 +173,7 @@ AdvApp2Var_ApproxAFunc2Var::AdvApp2Var_ApproxAFunc2Var(
 
 void AdvApp2Var_ApproxAFunc2Var::Init()
 {
-  Standard_Integer ifav,iu=0,iv=0,ndu,ndv;
+  Standard_Integer ifav = 0,iu=0,iv=0,ndu = 0,ndv = 0;
   switch (myFavoriteIso) {
   case GeomAbs_IsoU :
     ifav = 1;
@@ -239,7 +241,7 @@ void AdvApp2Var_ApproxAFunc2Var::Init()
 
 void AdvApp2Var_ApproxAFunc2Var::InitGrid(const Standard_Integer NbInt)
 {
-  Standard_Integer iu=myConditions.UOrder(),iv=myConditions.VOrder(),iint;
+  Standard_Integer iu=myConditions.UOrder(),iv=myConditions.VOrder(),iint = 0;
 
   Handle(AdvApp2Var_Patch) M0 = new AdvApp2Var_Patch (myFirstParInU,myLastParInU,myFirstParInV,myLastParInV,iu,iv);
 
@@ -346,10 +348,10 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
                                                const AdvApprox_Cutting& VChoice,
                                         const AdvApp2Var_EvaluatorFunc2Var& Func)
 {
-  Standard_Real Udec, Vdec;
-  Standard_Boolean Umore, Vmore;
-  Standard_Integer NbPatch, NbU, NbV, NumDec;
-  Standard_Integer FirstNA;
+  Standard_Real Udec = NAN, Vdec = NAN;
+  Standard_Boolean Umore = 0, Vmore = 0;
+  Standard_Integer NbPatch = 0, NbU = 0, NbV = 0, NumDec = 0;
+  Standard_Integer FirstNA = 0;
 
   while (myResult.FirstNotApprox(FirstNA)) {
 
@@ -437,10 +439,10 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
                                         const AdvApp2Var_EvaluatorFunc2Var& Func,
                                         const AdvApp2Var_Criterion& Crit)
 {
-  Standard_Real Udec, Vdec, CritValue, m1=0.;
-  Standard_Boolean Umore, Vmore, CritAbs = (Crit.Type() == AdvApp2Var_Absolute);
-  Standard_Integer NbPatch, NbU, NbV, NbInt, NumDec;
-  Standard_Integer FirstNA, decision=0;
+  Standard_Real Udec = NAN, Vdec = NAN, CritValue = NAN, m1=0.;
+  Standard_Boolean Umore = 0, Vmore = 0, CritAbs = (Crit.Type() == AdvApp2Var_Absolute);
+  Standard_Integer NbPatch = 0, NbU = 0, NbV = 0, NbInt = 0, NumDec = 0;
+  Standard_Integer FirstNA = 0, decision=0;
 
   while (myResult.FirstNotApprox(FirstNA)) {
 
@@ -551,9 +553,9 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
                                         const AdvApprox_Cutting& VChoice,
                                         const AdvApp2Var_EvaluatorFunc2Var& Func)
 {
-  Standard_Real dec;
-  Standard_Boolean more;
-  Standard_Integer ind1, ind2, NbPatch, NbU, NbV;
+  Standard_Real dec = NAN;
+  Standard_Boolean more = 0;
+  Standard_Integer ind1 = 0, ind2 = 0, NbPatch = 0, NbU = 0, NbV = 0;
   Standard_Integer iu = myConditions.UOrder(), iv = myConditions.VOrder();
   AdvApp2Var_Node N1(iu,iv), N2(iu,iv);
 
@@ -638,10 +640,10 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
                                         const AdvApp2Var_EvaluatorFunc2Var& Func,
                                         const AdvApp2Var_Criterion& Crit)
 {
-  Standard_Real dec;
-  Standard_Boolean more, CritRel = (Crit.Type() == AdvApp2Var_Relative);
-  Standard_Integer ind1, ind2, NbPatch, NbU, NbV;
-  Standard_Integer indN1, indN2;
+  Standard_Real dec = NAN;
+  Standard_Boolean more = 0, CritRel = (Crit.Type() == AdvApp2Var_Relative);
+  Standard_Integer ind1 = 0, ind2 = 0, NbPatch = 0, NbU = 0, NbV = 0;
+  Standard_Integer indN1 = 0, indN2 = 0;
   Standard_Integer iu = myConditions.UOrder(), iv = myConditions.VOrder();
   AdvApp2Var_Node N1(iu,iv), N2(iu,iv);
 
@@ -727,9 +729,9 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
 void AdvApp2Var_ApproxAFunc2Var::Compute3DErrors()
 {
 
-  Standard_Integer iesp,ipat;
-  Standard_Real error_max,error_moy,error_U0,error_V0,error_U1,error_V1;
-  Standard_Real Tol,F1Tol,F2Tol,F3Tol,F4Tol;
+  Standard_Integer iesp = 0,ipat = 0;
+  Standard_Real error_max = NAN,error_moy = NAN,error_U0 = NAN,error_V0 = NAN,error_U1 = NAN,error_V1 = NAN;
+  Standard_Real Tol = NAN,F1Tol = NAN,F2Tol = NAN,F3Tol = NAN,F4Tol = NAN;
   if ( myNumSubSpaces[2] > 0 ) {
     my3DMaxError = new (TColStd_HArray1OfReal) (1,myNumSubSpaces[2]);
     my3DAverageError = new (TColStd_HArray1OfReal) (1,myNumSubSpaces[2]);
@@ -778,8 +780,8 @@ void AdvApp2Var_ApproxAFunc2Var::Compute3DErrors()
 void AdvApp2Var_ApproxAFunc2Var::ComputeCritError()
 {
 
-  Standard_Integer iesp,ipat;
-  Standard_Real crit_max;
+  Standard_Integer iesp = 0,ipat = 0;
+  Standard_Real crit_max = NAN;
   if ( myNumSubSpaces[2] > 0 ) {
     for (iesp=1;iesp<=myNumSubSpaces[2];iesp++) {
       crit_max = 0.;
@@ -808,7 +810,7 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
  // Calculate resulting surfaces 
   mySurfaces = new ( TColGeom_HArray1OfSurface) (1,  myNumSubSpaces[2]);
 
-  Standard_Integer j;
+  Standard_Integer j = 0;
   TColStd_Array1OfReal UKnots (1, myResult.NbPatchInU()+1);
   for (j=1; j<=UKnots.Length(); j++) { UKnots.SetValue(j, myResult.UParameter(j)); } 
  
@@ -840,11 +842,11 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
   Handle(TColStd_HArray1OfReal) Poly = 
     new (TColStd_HArray1OfReal) (1, nmax * Size_eq);
 
-  Standard_Integer SSP, i;
+  Standard_Integer SSP = 0, i = 0;
   for (SSP=1; SSP <= myNumSubSpaces[2]; SSP++) { 
 
     // Creation of the grid of polynoms
-    Standard_Integer n=0,icf=1,ieq;
+    Standard_Integer n=0,icf=1,ieq = 0;
     for (j=1; j<=myResult.NbPatchInV(); j++) {
       for (i=1; i<=myResult.NbPatchInU(); i++) {
        n++;
@@ -1064,7 +1066,7 @@ Standard_Real
 
 void AdvApp2Var_ApproxAFunc2Var::Dump(Standard_OStream& o) const 
 {
-  Standard_Integer iesp=1,NbKU,NbKV,ik;
+  Standard_Integer iesp=1,NbKU = 0,NbKV = 0,ik = 0;
   o<<std::endl;
   if (!myHasResult) { o<<"No result"<<std::endl; }
   else {
index 73e72e7da545551917d08c806a381d875bbdc86c..d0edfb8aba18a17aa16ca99e6ae7a062f87e2711 100644 (file)
@@ -193,7 +193,7 @@ private:
   Standard_EXPORT void ConvertBS();
 
 
-  Standard_Integer myNumSubSpaces[3];
+  Standard_Integer myNumSubSpaces[3]{};
   Handle(TColStd_HArray1OfReal) my1DTolerances;
   Handle(TColStd_HArray1OfReal) my2DTolerances;
   Handle(TColStd_HArray1OfReal) my3DTolerances;
index 648f5300b4d09306e9ce7fd6ce3aa95d0ea9604b..43421f2c2074a177bcefba63617609377bb042ad 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <AdvApp2Var_SysBase.hxx>
 #include <AdvApp2Var_MathBase.hxx>
 #include <AdvApp2Var_Data_f2c.hxx>
@@ -275,15 +277,15 @@ int mma1cdi_(integer *ndimen,
   integer c__1 = 1;
 
   /* System generated locals */
-  integer contr1_dim1, contr1_offset, contr2_dim1, contr2_offset
-  somtab_dim1, somtab_offset, diftab_dim1, diftab_offset
-  fpntab_dim1, fpntab_offset, hermit_dim1, hermit_offset, i__1
-  i__2, i__3;
+  integer contr1_dim1 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_offset = 0
+  somtab_dim1 = 0, somtab_offset = 0, diftab_dim1 = 0, diftab_offset = 0
+  fpntab_dim1 = 0, fpntab_offset = 0, hermit_dim1 = 0, hermit_offset = 0, i__1 = 0
+  i__2 = 0, i__3 = 0;
 
   /* Local variables */
-  integer nroo2, ncfhe, nd, ii, kk;
-  integer ibb, kkm, kkp;
-  doublereal bid1, bid2, bid3 = 0.;
+  integer nroo2 = 0, ncfhe = 0, nd = 0, ii = 0, kk = 0;
+  integer ibb = 0, kkm = 0, kkp = 0;
+  doublereal bid1 = NAN, bid2 = NAN, bid3 = 0.;
 
 /* ********************************************************************** 
 */
@@ -495,13 +497,13 @@ int mma1cnt_(integer *ndimen,
             doublereal *crvjac)
 {
   /* System generated locals */
-  integer contr1_dim1, contr1_offset, contr2_dim1, contr2_offset
-  hermit_dim1, hermit_offset, crvjac_dim1, crvjac_offset, i__1
-  i__2, i__3;
+  integer contr1_dim1 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_offset = 0
+  hermit_dim1 = 0, hermit_offset = 0, crvjac_dim1 = 0, crvjac_offset = 0, i__1 = 0
+  i__2 = 0, i__3 = 0;
 
   /* Local variables */
-  integer nd, ii, jj, ibb;
-  doublereal bid;
+  integer nd = 0, ii = 0, jj = 0, ibb = 0;
+  doublereal bid = NAN;
 
 
   /* ***********************************************************************
@@ -632,16 +634,16 @@ int mma1fdi_(integer *ndimen,
             integer *iercod)
 {
   /* System generated locals */
-  integer fpntab_dim1, somtab_dim1, somtab_offset, diftab_dim1
-  diftab_offset, contr1_dim1, contr1_offset, contr2_dim1
-  contr2_offset, i__1, i__2;
-  doublereal d__1;
+  integer fpntab_dim1 = 0, somtab_dim1 = 0, somtab_offset = 0, diftab_dim1 = 0
+  diftab_offset = 0, contr1_dim1 = 0, contr1_offset = 0, contr2_dim1 = 0
+  contr2_offset = 0, i__1 = 0, i__2 = 0;
+  doublereal d__1 = NAN;
 
   /* Local variables */
-  integer ideb, ifin, nroo2, ideru, iderv;
-  doublereal renor;
-  integer ii, nd, ibb, iim, nbp, iip;
-  doublereal bid1, bid2;
+  integer ideb = 0, ifin = 0, nroo2 = 0, ideru = 0, iderv = 0;
+  doublereal renor = NAN;
+  integer ii = 0, nd = 0, ibb = 0, iim = 0, nbp = 0, iip = 0;
+  doublereal bid1 = NAN, bid2 = NAN;
 
 /* ********************************************************************** 
 */
@@ -962,11 +964,11 @@ int mma1fer_(integer *,//ndimen,
             integer *iercod)
 {
   /* System generated locals */
-  integer crvjac_dim1, crvjac_offset, i__1, i__2;
+  integer crvjac_dim1 = 0, crvjac_offset = 0, i__1 = 0, i__2 = 0;
 
   /* Local variables */
-  integer idim, ncfja, ncfnw, ndses, ii, kk, ibb, ier;
-  integer nbr0;
+  integer idim = 0, ncfja = 0, ncfnw = 0, ndses = 0, ii = 0, kk = 0, ibb = 0, ier = 0;
+  integer nbr0 = 0;
 
 
 /* ***********************************************************************
@@ -1156,10 +1158,10 @@ int AdvApp2Var_ApproxF2var::mma1her_(const integer *iordre,
                                     integer *iercod)
 {
   /* System generated locals */
-  integer hermit_dim1, hermit_offset;
+  integer hermit_dim1 = 0, hermit_offset = 0;
 
   /* Local variables */
-  integer ibb;
+  integer ibb = 0;
 
 
 
@@ -1323,11 +1325,11 @@ int mma1jak_(integer *ndimen,
             integer *iercod)
 {
   /* System generated locals */
-  integer somtab_dim1, somtab_offset, diftab_dim1, diftab_offset
-  crvjac_dim1, crvjac_offset;
+  integer somtab_dim1 = 0, somtab_offset = 0, diftab_dim1 = 0, diftab_offset = 0
+  crvjac_dim1 = 0, crvjac_offset = 0;
 
   /* Local variables */
-  integer ibb;
+  integer ibb = 0;
 
 /* ********************************************************************** 
 */
@@ -1437,13 +1439,13 @@ int mma1noc_(doublereal *dfuvin,
             doublereal *cntout)
 {
   /* System generated locals */
-  integer i__1;
-  doublereal d__1;
+  integer i__1 = 0;
+  doublereal d__1 = NAN;
 
   /* Local variables */
-  doublereal rider, riord;
-  integer nd, ibb;
-  doublereal bid;
+  doublereal rider = NAN, riord = NAN;
+  integer nd = 0, ibb = 0;
+  doublereal bid = NAN;
 /* ********************************************************************** 
 */
 
@@ -1571,11 +1573,11 @@ int mma1nop_(integer *nbroot,
 
 {
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
 
   /* Local variables */
-  doublereal alinu, blinu, alinv, blinv;
-  integer ii, ibb;
+  doublereal alinu = NAN, blinu = NAN, alinv = NAN, blinv = NAN;
+  integer ii = 0, ibb = 0;
 
 /* ***********************************************************************
  */
@@ -1686,18 +1688,18 @@ int AdvApp2Var_ApproxF2var::mma2ac1_(integer const *ndimen,
 
 {
   /* System generated locals */
-  integer contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
-  contr2_offset, contr3_dim1, contr3_dim2, contr3_offset
-  contr4_dim1, contr4_dim2, contr4_offset, uhermt_dim1
-  uhermt_offset, vhermt_dim1, vhermt_offset, patjac_dim1
-  patjac_dim2, patjac_offset, i__1, i__2, i__3, i__4, i__5;
+  integer contr1_dim1 = 0, contr1_dim2 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_dim2 = 0,
+  contr2_offset = 0, contr3_dim1 = 0, contr3_dim2 = 0, contr3_offset = 0
+  contr4_dim1 = 0, contr4_dim2 = 0, contr4_offset = 0, uhermt_dim1 = 0
+  uhermt_offset = 0, vhermt_dim1 = 0, vhermt_offset = 0, patjac_dim1 = 0
+  patjac_dim2 = 0, patjac_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0, i__5 = 0;
 
   /* Local variables */
-  logical ldbg;
-  integer ndgu, ndgv;
-  doublereal bidu1, bidu2, bidv1, bidv2;
-  integer ioru1, iorv1, ii, nd, jj, ku, kv;
-  doublereal cnt1, cnt2, cnt3, cnt4;
+  logical ldbg = 0;
+  integer ndgu = 0, ndgv = 0;
+  doublereal bidu1 = NAN, bidu2 = NAN, bidv1 = NAN, bidv2 = NAN;
+  integer ioru1 = 0, iorv1 = 0, ii = 0, nd = 0, jj = 0, ku = 0, kv = 0;
+  doublereal cnt1 = NAN, cnt2 = NAN, cnt3 = NAN, cnt4 = NAN;
 
 /* ********************************************************************** 
 */
@@ -1853,14 +1855,14 @@ int AdvApp2Var_ApproxF2var::mma2ac2_(const integer *ndimen,
 
 {
   /* System generated locals */
-  integer crbiv1_dim1, crbiv1_dim2, crbiv1_offset, crbiv2_dim1, crbiv2_dim2,
-  crbiv2_offset, patjac_dim1, patjac_dim2, patjac_offset
-  vhermt_dim1, vhermt_offset, i__1, i__2, i__3, i__4;
+  integer crbiv1_dim1 = 0, crbiv1_dim2 = 0, crbiv1_offset = 0, crbiv2_dim1 = 0, crbiv2_dim2 = 0,
+  crbiv2_offset = 0, patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0
+  vhermt_dim1 = 0, vhermt_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
 
   /* Local variables */
-  logical ldbg;
-  integer ndgv1, ndgv2, ii, jj, nd, kk;
-  doublereal bid1, bid2;
+  logical ldbg = 0;
+  integer ndgv1 = 0, ndgv2 = 0, ii = 0, jj = 0, nd = 0, kk = 0;
+  doublereal bid1 = NAN, bid2 = NAN;
 
 /* ********************************************************************** 
 */
@@ -1999,14 +2001,14 @@ int AdvApp2Var_ApproxF2var::mma2ac3_(const integer *ndimen,
 
 {
   /* System generated locals */
-  integer crbiu1_dim1, crbiu1_dim2, crbiu1_offset, crbiu2_dim1, crbiu2_dim2,
-  crbiu2_offset, patjac_dim1, patjac_dim2, patjac_offset
-  uhermt_dim1, uhermt_offset, i__1, i__2, i__3, i__4;
+  integer crbiu1_dim1 = 0, crbiu1_dim2 = 0, crbiu1_offset = 0, crbiu2_dim1 = 0, crbiu2_dim2 = 0,
+  crbiu2_offset = 0, patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0
+  uhermt_dim1 = 0, uhermt_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
 
   /* Local variables */
-  logical ldbg;
-  integer ndgu1, ndgu2, ii, jj, nd, kk;
-  doublereal bid1, bid2;
+  logical ldbg = 0;
+  integer ndgu1 = 0, ndgu2 = 0, ii = 0, jj = 0, nd = 0, kk = 0;
+  doublereal bid1 = NAN, bid2 = NAN;
 
 /* ********************************************************************** 
 */
@@ -2146,12 +2148,12 @@ int AdvApp2Var_ApproxF2var::mma2can_(const integer *ncfmxu,
 
 {
   /* System generated locals */
-  integer patjac_dim1, patjac_dim2, patjac_offset, patcan_dim1, patcan_dim2,
-  patcan_offset, i__1, i__2;
+  integer patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0, patcan_dim1 = 0, patcan_dim2 = 0,
+  patcan_offset = 0, i__1 = 0, i__2 = 0;
 
   /* Local variables */
-  logical ldbg;
-  integer ilon1, ilon2, ii, nd;
+  logical ldbg = 0;
+  integer ilon1 = 0, ilon2 = 0, ii = 0, nd = 0;
 
 /* ********************************************************************** 
 */
@@ -2306,21 +2308,21 @@ int mma2cd1_(integer *ndimen,
   integer c__1 = 1;
 
 /* System generated locals */
-    integer contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
-            contr2_offset, contr3_dim1, contr3_dim2, contr3_offset
-           contr4_dim1, contr4_dim2, contr4_offset, uhermt_dim1
-           uhermt_offset, vhermt_dim1, vhermt_offset, fpntbu_dim1
-           fpntbu_offset, fpntbv_dim1, fpntbv_offset, sosotb_dim1
-           sosotb_dim2, sosotb_offset, diditb_dim1, diditb_dim2
-           diditb_offset, soditb_dim1, soditb_dim2, soditb_offset
-           disotb_dim1, disotb_dim2, disotb_offset, i__1, i__2, i__3, i__4
-           i__5;
+    integer contr1_dim1 = 0, contr1_dim2 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_dim2 = 0,
+            contr2_offset = 0, contr3_dim1 = 0, contr3_dim2 = 0, contr3_offset = 0
+           contr4_dim1 = 0, contr4_dim2 = 0, contr4_offset = 0, uhermt_dim1 = 0
+           uhermt_offset = 0, vhermt_dim1 = 0, vhermt_offset = 0, fpntbu_dim1 = 0
+           fpntbu_offset = 0, fpntbv_dim1 = 0, fpntbv_offset = 0, sosotb_dim1 = 0
+           sosotb_dim2 = 0, sosotb_offset = 0, diditb_dim1 = 0, diditb_dim2 = 0
+           diditb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0
+           disotb_dim1 = 0, disotb_dim2 = 0, disotb_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0
+           i__5 = 0;
 
     /* Local variables */
-    integer ncfhu, ncfhv, nuroo, nvroo, nd, ii, jj, kk, ll, ibb, kkm
-           llm, kkp, llp;
-    doublereal bid1, bid2, bid3, bid4;
-    doublereal diu1, diu2, div1, div2, sou1, sou2, sov1, sov2;
+    integer ncfhu = 0, ncfhv = 0, nuroo = 0, nvroo = 0, nd = 0, ii = 0, jj = 0, kk = 0, ll = 0, ibb = 0, kkm = 0
+           llm = 0, kkp = 0, llp = 0;
+    doublereal bid1 = NAN, bid2 = NAN, bid3 = NAN, bid4 = NAN;
+    doublereal diu1 = NAN, diu2 = NAN, div1 = NAN, div2 = NAN, sou1 = NAN, sou2 = NAN, sov1 = NAN, sov2 = NAN;
 
 /* ********************************************************************** 
 */
@@ -2665,17 +2667,17 @@ int mma2cd2_(integer *ndimen,
 {
   integer c__1 = 1;
   /* System generated locals */
-  integer sotbv1_dim1, sotbv1_dim2, sotbv1_offset, sotbv2_dim1, sotbv2_dim2,
-  sotbv2_offset, ditbv1_dim1, ditbv1_dim2, ditbv1_offset
-  ditbv2_dim1, ditbv2_dim2, ditbv2_offset, fpntab_dim1
-  fpntab_offset, vhermt_dim1, vhermt_offset, sosotb_dim1
-  sosotb_dim2, sosotb_offset, diditb_dim1, diditb_dim2
-  diditb_offset, soditb_dim1, soditb_dim2, soditb_offset
-  disotb_dim1, disotb_dim2, disotb_offset, i__1, i__2, i__3, i__4;
+  integer sotbv1_dim1 = 0, sotbv1_dim2 = 0, sotbv1_offset = 0, sotbv2_dim1 = 0, sotbv2_dim2 = 0,
+  sotbv2_offset = 0, ditbv1_dim1 = 0, ditbv1_dim2 = 0, ditbv1_offset = 0
+  ditbv2_dim1 = 0, ditbv2_dim2 = 0, ditbv2_offset = 0, fpntab_dim1 = 0
+  fpntab_offset = 0, vhermt_dim1 = 0, vhermt_offset = 0, sosotb_dim1 = 0
+  sosotb_dim2 = 0, sosotb_offset = 0, diditb_dim1 = 0, diditb_dim2 = 0
+  diditb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0
+  disotb_dim1 = 0, disotb_dim2 = 0, disotb_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
 
   /* Local variables */
-  integer ncfhv, nuroo, nvroo, ii, nd, jj, kk, ibb, jjm, jjp;
-  doublereal bid1, bid2, bid3, bid4;
+  integer ncfhv = 0, nuroo = 0, nvroo = 0, ii = 0, nd = 0, jj = 0, kk = 0, ibb = 0, jjm = 0, jjp = 0;
+  doublereal bid1 = NAN, bid2 = NAN, bid3 = NAN, bid4 = NAN;
 
 /* ********************************************************************** 
 */
@@ -2978,17 +2980,17 @@ int mma2cd3_(integer *ndimen,
   integer c__1 = 1;
 
    /* System generated locals */
-    integer sotbu1_dim1, sotbu1_dim2, sotbu1_offset, sotbu2_dim1, sotbu2_dim2,
-            sotbu2_offset, ditbu1_dim1, ditbu1_dim2, ditbu1_offset
-           ditbu2_dim1, ditbu2_dim2, ditbu2_offset, fpntab_dim1
-           fpntab_offset, uhermt_dim1, uhermt_offset, sosotb_dim1
-           sosotb_dim2, sosotb_offset, diditb_dim1, diditb_dim2
-           diditb_offset, soditb_dim1, soditb_dim2, soditb_offset
-           disotb_dim1, disotb_dim2, disotb_offset, i__1, i__2, i__3, i__4;
+    integer sotbu1_dim1 = 0, sotbu1_dim2 = 0, sotbu1_offset = 0, sotbu2_dim1 = 0, sotbu2_dim2 = 0,
+            sotbu2_offset = 0, ditbu1_dim1 = 0, ditbu1_dim2 = 0, ditbu1_offset = 0
+           ditbu2_dim1 = 0, ditbu2_dim2 = 0, ditbu2_offset = 0, fpntab_dim1 = 0
+           fpntab_offset = 0, uhermt_dim1 = 0, uhermt_offset = 0, sosotb_dim1 = 0
+           sosotb_dim2 = 0, sosotb_offset = 0, diditb_dim1 = 0, diditb_dim2 = 0
+           diditb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0
+           disotb_dim1 = 0, disotb_dim2 = 0, disotb_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
 
     /* Local variables */
-    integer ncfhu, nuroo, nvroo, ii, nd, jj, kk, ibb, kkm, kkp;
-    doublereal bid1, bid2, bid3, bid4;
+    integer ncfhu = 0, nuroo = 0, nvroo = 0, ii = 0, nd = 0, jj = 0, kk = 0, ibb = 0, kkm = 0, kkp = 0;
+    doublereal bid1 = NAN, bid2 = NAN, bid3 = NAN, bid4 = NAN;
 
 /* ********************************************************************** 
 */
@@ -3304,22 +3306,22 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen,
   integer c__8 = 8;
 
     /* System generated locals */
-    integer contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
-            contr2_offset, contr3_dim1, contr3_dim2, contr3_offset
-           contr4_dim1, contr4_dim2, contr4_offset, sosotb_dim1, sosotb_dim2,
-            sosotb_offset, diditb_dim1, diditb_dim2, diditb_offset
-           soditb_dim1, soditb_dim2, soditb_offset, disotb_dim1, disotb_dim2,
-            disotb_offset;
+    integer contr1_dim1 = 0, contr1_dim2 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_dim2 = 0,
+            contr2_offset = 0, contr3_dim1 = 0, contr3_dim2 = 0, contr3_offset = 0
+           contr4_dim1 = 0, contr4_dim2 = 0, contr4_offset = 0, sosotb_dim1 = 0, sosotb_dim2 = 0,
+            sosotb_offset = 0, diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0
+           soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
+            disotb_offset = 0;
 
     /* Local variables */
-    integer ilong;
-    intptr_t iofwr;
+    integer ilong = 0;
+    intptr_t iofwr = 0;
     doublereal* wrkar = 0;
-    doublereal* wrkar_off;
-    integer iszwr;
-    integer ibb, ier = 0;
-    integer isz1, isz2, isz3, isz4;
-    intptr_t ipt1, ipt2, ipt3;
+    doublereal* wrkar_off = nullptr;
+    integer iszwr = 0;
+    integer ibb = 0, ier = 0;
+    integer isz1 = 0, isz2 = 0, isz3 = 0, isz4 = 0;
+    intptr_t ipt1 = 0, ipt2 = 0, ipt3 = 0;
 
 
 
@@ -3621,20 +3623,20 @@ int AdvApp2Var_ApproxF2var::mma2ce1_(integer *numdec,
   integer c__8 = 8;
   
     /* System generated locals */
-    integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
-            disotb_offset, soditb_dim1, soditb_dim2, soditb_offset
-           diditb_dim1, diditb_dim2, diditb_offset, patjac_dim1, patjac_dim2,
-            patjac_offset;
+    integer sosotb_dim1 = 0, sosotb_dim2 = 0, sosotb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
+            disotb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0
+           diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0, patjac_dim1 = 0, patjac_dim2 = 0,
+            patjac_offset = 0;
 
     /* Local variables */
-    logical ldbg;
-    intptr_t iofwr;
+    logical ldbg = 0;
+    intptr_t iofwr = 0;
     doublereal* wrkar = 0;
-    doublereal* wrkar_off;
-    integer iszwr;
-    integer ier;
-    integer isz1, isz2, isz3, isz4, isz5, isz6, isz7;
-    intptr_t ipt1, ipt2, ipt3, ipt4, ipt5, ipt6;
+    doublereal* wrkar_off = nullptr;
+    integer iszwr = 0;
+    integer ier = 0;
+    integer isz1 = 0, isz2 = 0, isz3 = 0, isz4 = 0, isz5 = 0, isz6 = 0, isz7 = 0;
+    intptr_t ipt1 = 0, ipt2 = 0, ipt3 = 0, ipt4 = 0, ipt5 = 0, ipt6 = 0;
 
 
 
@@ -3902,20 +3904,20 @@ int mma2ce2_(integer *numdec,
 
 {
   /* System generated locals */
-  integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
-  disotb_offset, soditb_dim1, soditb_dim2, soditb_offset
-  diditb_dim1, diditb_dim2, diditb_offset, gssutb_dim1, gssvtb_dim1,
-  chpair_dim1, chpair_dim2, chpair_offset, chimpr_dim1
-  chimpr_dim2, chimpr_offset, patjac_dim1, patjac_dim2
-  patjac_offset, vecerr_dim1, vecerr_offset, i__1, i__2, i__3, i__4;
+  integer sosotb_dim1 = 0, sosotb_dim2 = 0, sosotb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
+  disotb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0
+  diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0, gssutb_dim1 = 0, gssvtb_dim1 = 0,
+  chpair_dim1 = 0, chpair_dim2 = 0, chpair_offset = 0, chimpr_dim1 = 0
+  chimpr_dim2 = 0, chimpr_offset = 0, patjac_dim1 = 0, patjac_dim2 = 0
+  patjac_offset = 0, vecerr_dim1 = 0, vecerr_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
   
   /* Local variables */
-  logical ldbg;
-  integer idim, igsu, minu, minv, maxu, maxv, igsv;
+  logical ldbg = 0;
+  integer idim = 0, igsu = 0, minu = 0, minv = 0, maxu = 0, maxv = 0, igsv = 0;
   doublereal vaux[3];
-  integer i2rdu, i2rdv, ndses, nd, ii, jj, kk, nu, nv;
-  doublereal zu, zv;
-  integer nu1, nv1;
+  integer i2rdu = 0, i2rdv = 0, ndses = 0, nd = 0, ii = 0, jj = 0, kk = 0, nu = 0, nv = 0;
+  doublereal zu = NAN, zv = NAN;
+  integer nu1 = 0, nv1 = 0;
 
 /* ********************************************************************** 
 */
@@ -4671,13 +4673,13 @@ int mma2cfu_(integer *ndujac,
 
 {
   /* System generated locals */
-  integer sosotb_dim1, disotb_dim1, disotb_offset, soditb_dim1
-  soditb_offset, diditb_dim1, i__1, i__2;
+  integer sosotb_dim1 = 0, disotb_dim1 = 0, disotb_offset = 0, soditb_dim1 = 0
+  soditb_offset = 0, diditb_dim1 = 0, i__1 = 0, i__2 = 0;
 
   /* Local variables */
-  logical ldbg;
-  integer nptu2, nptv2, ii, jj;
-  doublereal bid0, bid1, bid2;
+  logical ldbg = 0;
+  integer nptu2 = 0, nptv2 = 0, ii = 0, jj = 0;
+  doublereal bid0 = NAN, bid1 = NAN, bid2 = NAN;
 
 /* ********************************************************************** 
 */
@@ -4887,13 +4889,13 @@ int mma2cfv_(integer *ndvjac,
 
 {
   /* System generated locals */
-  integer chpair_dim1, chpair_offset, chimpr_dim1, chimpr_offset
-  patjac_offset, i__1, i__2;
+  integer chpair_dim1 = 0, chpair_offset = 0, chimpr_dim1 = 0, chimpr_offset = 0
+  patjac_offset = 0, i__1 = 0, i__2 = 0;
 
   /* Local variables */
-  logical ldbg;
-  integer nptv2, ii, jj;
-  doublereal bid1;
+  logical ldbg = 0;
+  integer nptv2 = 0, ii = 0, jj = 0;
+  doublereal bid1 = NAN;
 
 /* ********************************************************************** 
 */
@@ -5043,15 +5045,15 @@ int AdvApp2Var_ApproxF2var::mma2ds1_(integer *ndimen,
 
 {
   /* System generated locals */
-  integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
-  disotb_offset, soditb_dim1, soditb_dim2, soditb_offset
-  diditb_dim1, diditb_dim2, diditb_offset, fpntab_dim1
-  fpntab_offset, i__1;
+  integer sosotb_dim1 = 0, sosotb_dim2 = 0, sosotb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
+  disotb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0
+  diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0, fpntab_dim1 = 0
+  fpntab_offset = 0, i__1 = 0;
 
   /* Local variables */
-  logical ldbg;
-  integer ibid1, ibid2, iuouv, nd;
-  integer isz1, isz2;
+  logical ldbg = 0;
+  integer ibid1 = 0, ibid2 = 0, iuouv = 0, nd = 0;
+  integer isz1 = 0, isz2 = 0;
 
 /* ********************************************************************** 
 */
@@ -5364,18 +5366,18 @@ int mma2ds2_(integer *ndimen,
 {
   integer c__0 = 0;
   /* System generated locals */
-  integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
-  disotb_offset, soditb_dim1, soditb_dim2, soditb_offset
-  diditb_dim1, diditb_dim2, diditb_offset, fpntab_dim1
-  fpntab_offset, i__1, i__2, i__3;
+  integer sosotb_dim1 = 0, sosotb_dim2 = 0, sosotb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
+  disotb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0
+  diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0, fpntab_dim1 = 0
+  fpntab_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
 
   /* Local variables */
-  integer jdec;
-  logical ldbg;
-  doublereal alinu, blinu, alinv, blinv, tcons;
+  integer jdec = 0;
+  logical ldbg = 0;
+  doublereal alinu = NAN, blinu = NAN, alinv = NAN, blinv = NAN, tcons = NAN;
   doublereal dbfn1[2], dbfn2[2];
-  integer nuroo, nvroo, id, iu, iv;
-  doublereal um, up;
+  integer nuroo = 0, nvroo = 0, id = 0, iu = 0, iv = 0;
+  doublereal um = NAN, up = NAN;
 
 
 /* ********************************************************************** 
@@ -5742,15 +5744,15 @@ int mma2er1_(integer *ndjacu,
 
 {
   /* System generated locals */
-  integer patjac_dim1, patjac_dim2, patjac_offset, i__1, i__2, i__3;
-  doublereal d__1;
+  integer patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
+  doublereal d__1 = NAN;
 
   /* Local variables */
-  logical ldbg;
-  integer minu, minv;
+  logical ldbg = 0;
+  integer minu = 0, minv = 0;
   doublereal vaux[2];
-  integer ii, nd, jj;
-  doublereal bid0, bid1;
+  integer ii = 0, nd = 0, jj = 0;
+  doublereal bid0 = NAN, bid1 = NAN;
 
 /* ********************************************************************** 
 */
@@ -5908,16 +5910,16 @@ int mma2er2_(integer *ndjacu,
 
 {
   /* System generated locals */
-  integer patjac_dim1, patjac_dim2, patjac_offset, i__1, i__2;
-  doublereal d__1;
+  integer patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0, i__1 = 0, i__2 = 0;
+  doublereal d__1 = NAN;
 
   /* Local variables */
-  logical ldbg;
+  logical ldbg = 0;
   doublereal vaux[2];
-  integer i2rdu, i2rdv;
-  doublereal errnu, errnv;
-  integer ii, nd, jj, nu, nv;
-  doublereal bid0, bid1;
+  integer i2rdu = 0, i2rdv = 0;
+  doublereal errnu = NAN, errnv = NAN;
+  integer ii = 0, nd = 0, jj = 0, nu = 0, nv = 0;
+  doublereal bid0 = NAN, bid1 = NAN;
 
 /* ********************************************************************** 
 */
@@ -6155,31 +6157,31 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen,
   integer c__8 = 8;
 
    /* System generated locals */
-    integer courbe_dim1, courbe_dim2, courbe_offset, somtab_dim1, somtab_dim2,
-            somtab_offset, diftab_dim1, diftab_dim2, diftab_offset
-           contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
-            contr2_offset, errmax_dim1, errmax_offset, errmoy_dim1
-           errmoy_offset, i__1;
-    doublereal d__1;
+    integer courbe_dim1 = 0, courbe_dim2 = 0, courbe_offset = 0, somtab_dim1 = 0, somtab_dim2 = 0,
+            somtab_offset = 0, diftab_dim1 = 0, diftab_dim2 = 0, diftab_offset = 0
+           contr1_dim1 = 0, contr1_dim2 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_dim2 = 0,
+            contr2_offset = 0, errmax_dim1 = 0, errmax_offset = 0, errmoy_dim1 = 0
+           errmoy_offset = 0, i__1 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
-    integer ideb;
-    doublereal tmil;
-    integer  ideb1, ibid1, ibid2, ncfja, ndgre, ilong
-           ndwrk;
+    integer ideb = 0;
+    doublereal tmil = NAN;
+    integer  ideb1 = 0, ibid1 = 0, ibid2 = 0, ncfja = 0, ndgre = 0, ilong = 0
+           ndwrk = 0;
     doublereal* wrkar = 0;
-    doublereal* wrkar_off;
-    integer nupil;
-    intptr_t iofwr;
+    doublereal* wrkar_off = nullptr;
+    integer nupil = 0;
+    intptr_t iofwr = 0;
     doublereal uvpav[4]        /* was [2][2] */;
-    integer nd, ii;
-    integer ibb;
+    integer nd = 0, ii = 0;
+    integer ibb = 0;
     integer ier = 0;
     doublereal uv11[4] /* was [2][2] */;
-  integer ncb1;
-    doublereal eps3;
-    integer isz1, isz2, isz3, isz4, isz5;
-    intptr_t ipt1, ipt2, ipt3, ipt4,iptt, jptt;
+  integer ncb1 = 0;
+    doublereal eps3 = NAN;
+    integer isz1 = 0, isz2 = 0, isz3 = 0, isz4 = 0, isz5 = 0;
+    intptr_t ipt1 = 0, ipt2 = 0, ipt3 = 0, ipt4 = 0,iptt = 0, jptt = 0;
 
 /* ********************************************************************** 
 */
@@ -6707,16 +6709,16 @@ int AdvApp2Var_ApproxF2var::mma2fx6_(integer *ncfmxu,
 
 {
   /* System generated locals */
-  integer epsfro_dim1, epsfro_offset, patcan_dim1, patcan_dim2, patcan_dim3,
-  patcan_dim4, patcan_offset, errmax_dim1, errmax_dim2
-  errmax_offset, ncoefu_dim1, ncoefu_offset, ncoefv_dim1
-  ncoefv_offset, i__1, i__2, i__3, i__4, i__5;
-  doublereal d__1, d__2;
+  integer epsfro_dim1 = 0, epsfro_offset = 0, patcan_dim1 = 0, patcan_dim2 = 0, patcan_dim3 = 0,
+  patcan_dim4 = 0, patcan_offset = 0, errmax_dim1 = 0, errmax_dim2 = 0
+  errmax_offset = 0, ncoefu_dim1 = 0, ncoefu_offset = 0, ncoefv_dim1 = 0
+  ncoefv_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0, i__5 = 0;
+  doublereal d__1 = NAN, d__2 = NAN;
 
   /* Local variables */
-  integer idim, ncfu, ncfv, id, ii, nd, jj, ku, kv, ns, ibb;
-  doublereal bid;
-  doublereal tol;
+  integer idim = 0, ncfu = 0, ncfv = 0, id = 0, ii = 0, nd = 0, jj = 0, ku = 0, kv = 0, ns = 0, ibb = 0;
+  doublereal bid = NAN;
+  doublereal tol = NAN;
 
 /* ********************************************************************** 
 */
@@ -7142,12 +7144,12 @@ int AdvApp2Var_ApproxF2var::mma2jmx_(integer *ndgjac,
            2.71238965987606292679677228666411 };
 
     /* System generated locals */
-    integer i__1;
+    integer i__1 = 0;
 
     /* Local variables */
-    logical ldbg;
-    integer numax, ii;
-    doublereal bid;
+    logical ldbg = 0;
+    integer numax = 0, ii = 0;
+    doublereal bid = NAN;
 
 
 /* ********************************************************************** 
@@ -7246,12 +7248,12 @@ int mma2moy_(integer *ndgumx,
             doublereal *errmoy)
 {
   /* System generated locals */
-    integer patjac_dim1, patjac_dim2, patjac_offset, i__1, i__2, i__3;
+    integer patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
    
     /* Local variables */
-    logical ldbg;
-    integer minu, minv, idebu, idebv, ii, nd, jj;
-    doublereal bid0, bid1;
+    logical ldbg = 0;
+    integer minu = 0, minv = 0, idebu = 0, idebv = 0, ii = 0, nd = 0, jj = 0;
+    doublereal bid0 = NAN, bid1 = NAN;
     
     
 /* ********************************************************************** 
@@ -7393,10 +7395,10 @@ int AdvApp2Var_ApproxF2var::mma2roo_(integer *nbpntu,
                                     doublereal *vrootl)
 {
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
 
   /* Local variables */
-  integer ii, ibb;
+  integer ii = 0, ibb = 0;
 
 /* ********************************************************************** 
 */
@@ -7498,13 +7500,13 @@ int mmmapcoe_(integer *ndim,
 
 {
   /* System generated locals */
-  integer somtab_dim1, somtab_offset, diftab_dim1, diftab_offset
-  crvjac_dim1, crvjac_offset, gsstab_dim1, i__1, i__2, i__3;
+  integer somtab_dim1 = 0, somtab_offset = 0, diftab_dim1 = 0, diftab_offset = 0
+  crvjac_dim1 = 0, crvjac_offset = 0, gsstab_dim1 = 0, i__1 = 0, i__2 = 0, i__3 = 0;
 
   /* Local variables */
-  integer igss, ikdeb;
-  doublereal bidon;
-  integer nd, ik, ir, nbroot, ibb;
+  integer igss = 0, ikdeb = 0;
+  doublereal bidon = NAN;
+  integer nd = 0, ik = 0, ir = 0, nbroot = 0, ibb = 0;
 
 /* ********************************************************************** 
 */
@@ -7660,12 +7662,12 @@ int mmaperm_(integer *ncofmx,
             doublereal *errmoy)
 {
   /* System generated locals */
-  integer crvjac_dim1, crvjac_offset, i__1, i__2;
+  integer crvjac_dim1 = 0, crvjac_offset = 0, i__1 = 0, i__2 = 0;
 
   /* Local variables */
-  doublereal bidj;
-  integer i__, ia, nd, ncfcut, ibb;
-  doublereal bid;
+  doublereal bidj = NAN;
+  integer i__ = 0, ia = 0, nd = 0, ncfcut = 0, ibb = 0;
+  doublereal bid = NAN;
 
 /* ********************************************************************** 
 */
@@ -7769,10 +7771,10 @@ int AdvApp2Var_ApproxF2var::mmapptt_(const integer *ndgjac,
                                     integer *iercod)
 {
   /* System generated locals */
-  integer cgauss_dim1, i__1;
+  integer cgauss_dim1 = 0, i__1 = 0;
 
   /* Local variables */
-  integer kjac, iptt, ipdb0, infdg, iptdb, mxjac, ilong, ibb;
+  integer kjac = 0, iptt = 0, ipdb0 = 0, infdg = 0, iptdb = 0, mxjac = 0, ilong = 0, ibb = 0;
 
 /* ********************************************************************** 
 */
@@ -8071,12 +8073,12 @@ int mmjacpt_(const integer *ndimen,
             doublereal *ptccan)
 {
     /* System generated locals */
-  integer ptccan_dim1, ptccan_dim2, ptccan_offset, ptclgd_dim1, ptclgd_dim2,
-  ptclgd_offset, ptcaux_dim1, ptcaux_dim2, ptcaux_dim3
-  ptcaux_offset, i__1, i__2, i__3;
+  integer ptccan_dim1 = 0, ptccan_dim2 = 0, ptccan_offset = 0, ptclgd_dim1 = 0, ptclgd_dim2 = 0,
+  ptclgd_offset = 0, ptcaux_dim1 = 0, ptcaux_dim2 = 0, ptcaux_dim3 = 0
+  ptcaux_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
   
   /* Local variables */
-  integer kdim, nd, ii, jj, ibb;
+  integer kdim = 0, nd = 0, ii = 0, jj = 0, ibb = 0;
 
 /* ***********************************************************************
  */
index 23784349b5a0163388c06250cf55ef5ed2d13551..f6ebdf7dec82c015751b3994550835dd79d4b14c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AdvApp2Var_ApproxF2var.hxx>
 #include <AdvApp2Var_Context.hxx>
 #include <Standard_ConstructionError.hxx>
@@ -108,7 +110,7 @@ myNb2DSS(nb2Dss),
 myNb3DSS(nb3Dss)
 {
 Standard_Integer ErrorCode=0,NbPntU=0,JDegU=0,NbPntV=0,JDegV=0;
-Standard_Integer ncfl;
+Standard_Integer ncfl = 0;
 
 // myNbURoot,myJDegU
 ncfl = nlimu;
@@ -120,7 +122,7 @@ myJDegU = JDegU;
 if (iu>-1) NbPntU = myNbURoot - 2;
 
 // myJMaxU
-Standard_Integer i,j,size = JDegU-2*iu-1;
+Standard_Integer i = 0,j = 0,size = JDegU-2*iu-1;
 Handle (TColStd_HArray1OfReal) JMaxU =
   new TColStd_HArray1OfReal(1,size);
 Standard_Real *JU_array =
@@ -223,7 +225,7 @@ for (j=1;j<=4;j++) {
 }
 }
 if (iu>-1||iv>-1) {
-  Standard_Real tolmin, poids, hmax[4];
+  Standard_Real tolmin = NAN, poids = NAN, hmax[4];
   hmax[0] = 0;
   hmax[1] = 1;
   hmax[2] = 1.5;
index 846781e54a0fd326297c8598c1584f7d60eade82..69a5ccee1c59c2e1d2f442869593c5c73b294f00 100644 (file)
@@ -45,11 +45,11 @@ AdvApp2Var_Framework::AdvApp2Var_Framework()
 
 AdvApp2Var_Framework::AdvApp2Var_Framework(const AdvApp2Var_SequenceOfNode& Frame,
                                           const AdvApp2Var_SequenceOfStrip& UFrontier,
-                                          const AdvApp2Var_SequenceOfStrip& VFrontier)
+                                          const AdvApp2Var_SequenceOfStrip& VFrontier) : myNodeConstraints(Frame), myUConstraints(UFrontier), myVConstraints(VFrontier)
 {
-  myNodeConstraints = Frame;
-  myUConstraints = UFrontier;
-  myVConstraints = VFrontier;
+  
+  
+  
 }
 
 //==========================================================================================
@@ -92,7 +92,7 @@ Standard_Integer AdvApp2Var_Framework::FirstNode(const GeomAbs_IsoType Type,
                                                 const Standard_Integer IndexIso,
                                                 const Standard_Integer IndexStrip) const 
 {
-  Standard_Integer NbIso,Index;
+  Standard_Integer NbIso = 0,Index = 0;
   NbIso = myUConstraints.Length()+1;
   if (Type==GeomAbs_IsoU) {
     Index = NbIso * (IndexStrip-1) + IndexIso;
@@ -113,7 +113,7 @@ Standard_Integer AdvApp2Var_Framework::LastNode(const GeomAbs_IsoType Type,
                                               const Standard_Integer IndexIso,
                                               const Standard_Integer IndexStrip) const 
 {
-  Standard_Integer NbIso,Index;
+  Standard_Integer NbIso = 0,Index = 0;
   NbIso = myUConstraints.Length()+1;
   if (Type==GeomAbs_IsoU) {
     Index = NbIso * IndexStrip + IndexIso;
index 9f34a45f4e92c1b4622e2a24c1fa90a443b4edda..386f641928ebae62e2f62b6d729595eef55b500a 100644 (file)
@@ -116,9 +116,9 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
                                AdvApp2Var_Node& NodeEnd)
 {
 // fixed values
-  Standard_Integer NBCRMX=1, NBCRBE;
+  Standard_Integer NBCRMX=1, NBCRBE = 0;
 // data stored in the Context
-  Standard_Integer NDIMEN, NBSESP, NDIMSE;
+  Standard_Integer NDIMEN = 0, NBSESP = 0, NDIMSE = 0;
   NDIMEN = Conditions.TotalDimension();
   NBSESP = Conditions.TotalNumberSSP();
 // Attention : works only in 3D
@@ -176,7 +176,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
 
 // data relative to the position of iso (front or cut line)
   Handle (TColStd_HArray1OfReal) HEPSAPR = new TColStd_HArray1OfReal(1,NBSESP);
-  Standard_Integer iesp;
+  Standard_Integer iesp = 0;
   switch(myPosition) {
    case 0 :
     for (iesp=1;iesp<=NBSESP;iesp++) {
@@ -247,7 +247,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
 // the approximations
 //
   Standard_Integer IERCOD=0, NCOEFF=0;
-  Standard_Integer iapp,ncfapp,ierapp;
+  Standard_Integer iapp = 0,ncfapp = 0,ierapp = 0;
 //  Standard_Integer id,ic,ideb;
   for (iapp=0;iapp<=IDERIV;iapp++) {
 //   approximation of the derivative of order iapp
@@ -291,7 +291,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
     if (NCOEFF<=ncfapp) NCOEFF=ncfapp;
     if (ierapp==-1) IERCOD = -1;
 //   return constraints of order 0 to IORDRE of extremities
-    Standard_Integer ider, jpos=HCONTR1->Lower();
+    Standard_Integer ider = 0, jpos=HCONTR1->Lower();
     for (ider=0; ider<=IORDRE;ider++) {
       gp_Pnt pt(HCONTR1->Value(jpos),
                HCONTR1->Value(jpos+1),
index 7641dfb915b41bfa7436a168627c8b2e63cfa4aa..85119cd1080bec6b1a241879409bb0d395fd92de 100644 (file)
@@ -265,14 +265,14 @@ int AdvApp2Var_MathBase::mdsptpt_(integer *ndimen,
 {
   integer c__8 = 8;
   /* System generated locals */
-  integer i__1;
-  doublereal d__1;
+  integer i__1 = 0;
+  doublereal d__1 = NAN;
 
   /* Local variables */
-  integer i__;
+  integer i__ = 0;
   doublereal* differ = 0;
-  integer  ier;
-  intptr_t iofset, j;
+  integer  ier = 0;
+  intptr_t iofset = 0, j = 0;
 
 /* ********************************************************************** 
 */
@@ -384,10 +384,10 @@ int mfac_(doublereal *f,
 
 {
     /* System generated locals */
-    integer i__1;
+    integer i__1 = 0;
 
     /* Local variables */
-    integer i__;
+    integer i__ = 0;
 
 /*    FORTRAN CONFORME AU TEXT */
 /*     CALCUL DE MFACTORIEL N */
@@ -416,11 +416,11 @@ int AdvApp2Var_MathBase::mmapcmp_(integer *ndim,
 
 {
   /* System generated locals */
-  integer crvold_dim1, crvold_offset, crvnew_dim1, crvnew_offset, i__1
-  i__2;
+  integer crvold_dim1 = 0, crvold_offset = 0, crvnew_dim1 = 0, crvnew_offset = 0, i__1 = 0
+  i__2 = 0;
 
   /* Local variables */
-  integer ipair, nd, ndegre, impair, ibb, idg;
+  integer ipair = 0, nd = 0, ndegre = 0, impair = 0, ibb = 0, idg = 0;
   //extern  int  mgsomsg_();//mgenmsg_(),
 
 /* ********************************************************************** 
@@ -532,13 +532,13 @@ int mmaper0_(integer *ncofmx,
 
 {
   /* System generated locals */
-  integer crvlgd_dim1, crvlgd_offset, i__1, i__2;
-  doublereal d__1;
+  integer crvlgd_dim1 = 0, crvlgd_offset = 0, i__1 = 0, i__2 = 0;
+  doublereal d__1 = NAN;
 
   /* Local variables */
-  integer ncut;
-  doublereal bidon;
-  integer ii, nd;
+  integer ncut = 0;
+  doublereal bidon = NAN;
+  integer ii = 0, nd = 0;
 
 /* ***********************************************************************
  */
@@ -710,13 +710,13 @@ int mmaper2_(integer *ncofmx,
            3.72184531357268220291630708234186 };
 
     /* System generated locals */
-    integer crvjac_dim1, crvjac_offset, i__1, i__2;
-    doublereal d__1;
+    integer crvjac_dim1 = 0, crvjac_offset = 0, i__1 = 0, i__2 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
-    integer idec, ncut;
-    doublereal bidon;
-    integer ii, nd;
+    integer idec = 0, ncut = 0;
+    doublereal bidon = NAN;
+    integer ii = 0, nd = 0;
 
 
 
@@ -894,13 +894,13 @@ int mmaper4_(integer *ncofmx,
            3.05886060707437081434964933864149 };
 
     /* System generated locals */
-    integer crvjac_dim1, crvjac_offset, i__1, i__2;
-    doublereal d__1;
+    integer crvjac_dim1 = 0, crvjac_offset = 0, i__1 = 0, i__2 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
-    integer idec, ncut;
-    doublereal bidon;
-    integer ii, nd;
+    integer idec = 0, ncut = 0;
+    doublereal bidon = NAN;
+    integer ii = 0, nd = 0;
 
 
 
@@ -1073,13 +1073,13 @@ int mmaper6_(integer *ncofmx,
            2.71238965987606292679677228666411 };
 
     /* System generated locals */
-    integer crvjac_dim1, crvjac_offset, i__1, i__2;
-    doublereal d__1;
+    integer crvjac_dim1 = 0, crvjac_offset = 0, i__1 = 0, i__2 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
-    integer idec, ncut;
-    doublereal bidon;
-    integer ii, nd;
+    integer idec = 0, ncut = 0;
+    doublereal bidon = NAN;
+    integer ii = 0, nd = 0;
 
 
 
@@ -1196,10 +1196,10 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx,
 
 {
   /* System generated locals */
-  integer crvjac_dim1, crvjac_offset;
+  integer crvjac_dim1 = 0, crvjac_offset = 0;
 
   /* Local variables */
-  integer jord;
+  integer jord = 0;
 
 /* ********************************************************************** 
 */
@@ -1291,15 +1291,15 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx,
 
 {
   /* System generated locals */
-    integer crvold_dim1, crvold_offset, crvnew_dim1, crvnew_offset, i__1
-    i__2, i__3;
+    integer crvold_dim1 = 0, crvold_offset = 0, crvnew_dim1 = 0, crvnew_offset = 0, i__1 = 0
+    i__2 = 0, i__3 = 0;
     
     /* Local variables */
-    integer nboct;
+    integer nboct = 0;
     doublereal tbaux[61];
-    integer nd;
-    doublereal bid;
-    integer ncf, ncj;
+    integer nd = 0;
+    doublereal bid = NAN;
+    integer ncf = 0, ncj = 0;
 
 
 /*      IMPLICIT DOUBLE PRECISION(A-H,O-Z) */
@@ -1535,19 +1535,19 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax,
 
 {
   /* System generated locals */
-  integer crvold_dim1, crvold_offset, crvnew_dim1, crvnew_offset, i__1
-  i__2, i__3;
-  doublereal d__1;
+  integer crvold_dim1 = 0, crvold_offset = 0, crvnew_dim1 = 0, crvnew_offset = 0, i__1 = 0
+  i__2 = 0, i__3 = 0;
+  doublereal d__1 = NAN;
   
   /* Local variables */
-  doublereal x0, x1;
-  integer nd;
+  doublereal x0 = NAN, x1 = NAN;
+  integer nd = 0;
   doublereal tabaux[61];
-  integer ibb;
-  doublereal bid;
-  integer ncf;
-  integer ncj;
-  doublereal eps3;
+  integer ibb = 0;
+  doublereal bid = NAN;
+  integer ncf = 0;
+  integer ncj = 0;
+  doublereal eps3 = NAN;
   
 
 
@@ -1762,13 +1762,13 @@ int mmatvec_(integer *nligne,
 
 {
   /* System generated locals */
-  integer i__1, i__2;
+  integer i__1 = 0, i__2 = 0;
   
   /* Local variables */
-    logical ldbg;
-  integer jmin, jmax, i__, j, k;
-  doublereal somme;
-  integer aux;
+    logical ldbg = 0;
+  integer jmin = 0, jmax = 0, i__ = 0, j = 0, k = 0;
+  doublereal somme = NAN;
+  integer aux = 0;
 
 
 /* ***********************************************************************
@@ -1912,12 +1912,12 @@ int AdvApp2Var_MathBase::mmbulld_(integer *nbcoln,
 
 {
   /* System generated locals */
-  integer dtabtr_dim1, dtabtr_offset, i__1, i__2;
+  integer dtabtr_dim1 = 0, dtabtr_offset = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  logical ldbg;
-  doublereal daux;
-  integer nite1, nite2, nchan, i1, i2;
+  logical ldbg = 0;
+  doublereal daux = NAN;
+  integer nite1 = 0, nite2 = 0, nchan = 0, i1 = 0, i2 = 0;
   
 /* ***********************************************************************
  */
@@ -2064,12 +2064,12 @@ int AdvApp2Var_MathBase::mmcdriv_(integer *ndimen,
 
 {
   /* System generated locals */
-  integer courbe_dim1, courbe_offset, crvdrv_dim1, crvdrv_offset, i__1
-  i__2;
+  integer courbe_dim1 = 0, courbe_offset = 0, crvdrv_dim1 = 0, crvdrv_offset = 0, i__1 = 0
+  i__2 = 0;
   
   /* Local variables */
-  integer i__, j, k;
-  doublereal mfactk, bid;
+  integer i__ = 0, j = 0, k = 0;
+  doublereal mfactk = NAN, bid = NAN;
   
 
 /* ***********************************************************************
@@ -2242,19 +2242,19 @@ int AdvApp2Var_MathBase::mmcglc1_(integer *ndimax,
 
 {
   /* System generated locals */
-  integer courbe_dim1, courbe_offset, i__1;
-  doublereal d__1;
+  integer courbe_dim1 = 0, courbe_offset = 0, i__1 = 0;
+  doublereal d__1 = NAN;
   
   /* Local variables */
-  integer ndec;
-  doublereal tdeb, tfin;
-  integer iter;
+  integer ndec = 0;
+  doublereal tdeb = NAN, tfin = NAN;
+  integer iter = 0;
   doublereal oldso = 0.;
-  integer itmax;
-  doublereal sottc;
-  integer kk, ibb;
-  doublereal dif, pas;
-  doublereal som;
+  integer itmax = 0;
+  doublereal sottc = NAN;
+  integer kk = 0, ibb = 0;
+  doublereal dif = NAN, pas = NAN;
+  doublereal som = NAN;
  
 
 /* ***********************************************************************
@@ -2469,17 +2469,17 @@ int mmchole_(integer *,//mxcoef,
 
 {
   /* System generated locals */
-  integer i__1, i__2, i__3;
-  doublereal d__1;
+  integer i__1 = 0, i__2 = 0, i__3 = 0;
+  doublereal d__1 = NAN;
   
   /* Builtin functions */
   //double sqrt();
   
     /* Local variables */
-  logical ldbg;
-  integer kmin, i__, j, k;
-  doublereal somme;
-  integer ptini, ptcou;
+  logical ldbg = 0;
+  integer kmin = 0, i__ = 0, j = 0, k = 0;
+  doublereal somme = NAN;
+  integer ptini = 0, ptcou = 0;
 
 
 /* ***********************************************************************
@@ -2641,15 +2641,15 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen,
 
 {
   /* System generated locals */
-  integer ctrtes_dim1, ctrtes_offset, crvres_dim1, crvres_offset
-  xmatri_dim1, xmatri_offset, tabaux_dim1, tabaux_offset, i__1
-  i__2;
+  integer ctrtes_dim1 = 0, ctrtes_offset = 0, crvres_dim1 = 0, crvres_offset = 0
+  xmatri_dim1 = 0, xmatri_offset = 0, tabaux_dim1 = 0, tabaux_offset = 0, i__1 = 0
+  i__2 = 0;
   
   /* Local variables */
-  integer moup1, nordr;
-  integer nd;
-  integer ibb, ncf, ndv;
-  doublereal eps1;
+  integer moup1 = 0, nordr = 0;
+  integer nd = 0;
+  integer ibb = 0, ncf = 0, ndv = 0;
+  doublereal eps1 = NAN;
 
 
 /* ***********************************************************************
@@ -2891,10 +2891,10 @@ L9999:
   static char nomprg[8+1] = "MMCVINV ";
   
   /* System generated locals */
-  integer curve_dim1, curve_offset, curveo_dim1, curveo_offset, i__1, i__2;
+  integer curve_dim1 = 0, curve_offset = 0, curveo_dim1 = 0, curveo_offset = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer i__, nd, ibb;
+  integer i__ = 0, nd = 0, ibb = 0;
   
 
 /* ***********************************************************************
@@ -2971,11 +2971,11 @@ int mmcvstd_(integer *ncofmx,
 
 {
   /* System generated locals */
-  integer courbe_dim1, crvcan_dim1, crvcan_offset, i__1, i__2, i__3;
+  integer courbe_dim1 = 0, crvcan_dim1 = 0, crvcan_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
   
   /* Local variables */
-  integer ndeg, i__, j, j1, nd, ibb;
-  doublereal bid;
+  integer ndeg = 0, i__ = 0, j = 0, j1 = 0, nd = 0, ibb = 0;
+  doublereal bid = NAN;
   
 
 /* ***********************************************************************
@@ -3124,12 +3124,12 @@ int AdvApp2Var_MathBase::mmdrc11_(integer *iordre,
 
 {
   /* System generated locals */
-  integer courbe_dim1, courbe_offset, points_dim2, points_offset, i__1
-  i__2;
+  integer courbe_dim1 = 0, courbe_offset = 0, points_dim2 = 0, points_offset = 0, i__1 = 0
+  i__2 = 0;
   
   /* Local variables */
   
-  integer ndeg, i__, j, ndgcb, nd, ibb;
+  integer ndeg = 0, i__ = 0, j = 0, ndgcb = 0, nd = 0, ibb = 0;
   
 
 /* ********************************************************************** 
@@ -3313,10 +3313,10 @@ int mmdrvcb_(integer *ideriv,
 
 {
   /* System generated locals */
-  integer courbe_dim1, tabpnt_dim1, i__1, i__2, i__3;
+  integer courbe_dim1 = 0, tabpnt_dim1 = 0, i__1 = 0, i__2 = 0, i__3 = 0;
   
   /* Local variables */
-  integer ndeg, i__, j, nd, ndgcrb, iptpnt, ibb;
+  integer ndeg = 0, i__ = 0, j = 0, nd = 0, ndgcrb = 0, iptpnt = 0, ibb = 0;
   
 
 /* *********************************************************************** */
@@ -3495,11 +3495,11 @@ int AdvApp2Var_MathBase::mmdrvck_(integer *ncoeff,
            1.21645100408832e17,2.43290200817664e18,5.109094217170944e19 };
   
   /* System generated locals */
-  integer courbe_dim1, courbe_offset, i__1, i__2;
+  integer courbe_dim1 = 0, courbe_offset = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer i__, j, k, nd;
-  doublereal mfactk, bid;
+  integer i__ = 0, j = 0, k = 0, nd = 0;
+  doublereal mfactk = NAN, bid = NAN;
   
 
 /*      IMPLICIT INTEGER (I-N) */
@@ -3769,11 +3769,11 @@ int mmexthi_(integer *ndegre,
 
 {
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
   
   /* Local variables */
-  integer iadd, ideb, ndeg2, nmod2, ii, ibb;
-  integer kpt;
+  integer iadd = 0, ideb = 0, ndeg2 = 0, nmod2 = 0, ii = 0, ibb = 0;
+  integer kpt = 0;
 
 /* ********************************************************************** 
 */
@@ -3918,11 +3918,11 @@ int mmextrl_(integer *ndegre,
             NCollection_Array1<doublereal>& rootlg)
 {
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
   
   /* Local variables */
-  integer iadd, ideb, ndeg2, nmod2, ii, ibb;
-  integer kpt;
+  integer iadd = 0, ideb = 0, ndeg2 = 0, nmod2 = 0, ii = 0, ibb = 0;
+  integer kpt = 0;
 
 
 /* ********************************************************************** 
@@ -4071,11 +4071,11 @@ int AdvApp2Var_MathBase::mmfmca8_(const integer *ndimen,
 
 {
   /* System generated locals */
-  integer tabini_dim1, tabini_dim2, tabini_offset, tabres_dim1, tabres_dim2,
-  tabres_offset;
+  integer tabini_dim1 = 0, tabini_dim2 = 0, tabini_offset = 0, tabres_dim1 = 0, tabres_dim2 = 0,
+  tabres_offset = 0;
 
   /* Local variables */
-  integer i__, j, k, ilong;
+  integer i__ = 0, j = 0, k = 0, ilong = 0;
 
 
 
@@ -4207,11 +4207,11 @@ L9999:
 
 {
   /* System generated locals */
-  integer tabini_dim1, tabini_dim2, tabini_offset, tabres_dim1, tabres_dim2,
-  tabres_offset, i__1, i__2, i__3;
+  integer tabini_dim1 = 0, tabini_dim2 = 0, tabini_offset = 0, tabres_dim1 = 0, tabres_dim2 = 0,
+  tabres_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
   
     /* Local variables */
-  integer i__, j, k, ilong;
+  integer i__ = 0, j = 0, k = 0, ilong = 0;
 
 
 
@@ -4355,14 +4355,14 @@ int AdvApp2Var_MathBase::mmfmcar_(integer *ndimen,
 {
   integer c__8 = 8;
   /* System generated locals */
-    integer patold_dim1, patold_dim2, patnew_dim1, patnew_dim2,
-           i__1, patold_offset,patnew_offset;
+    integer patold_dim1 = 0, patold_dim2 = 0, patnew_dim1 = 0, patnew_dim2 = 0,
+           i__1 = 0, patold_offset = 0,patnew_offset = 0;
 
     /* Local variables */
     doublereal* tbaux = 0;
-    integer ksize, numax, kk;
-    intptr_t iofst;
-    integer ibb, ier;
+    integer ksize = 0, numax = 0, kk = 0;
+    intptr_t iofst = 0;
+    integer ibb = 0, ier = 0;
 
 /* ***********************************************************************
  */
@@ -4598,11 +4598,11 @@ int AdvApp2Var_MathBase::mmfmcb5_(integer *isenmsc,
 
 {
   /* System generated locals */
-  integer courb1_dim1, courb1_offset, courb2_dim1, courb2_offset, i__1
-  i__2;
+  integer courb1_dim1 = 0, courb1_offset = 0, courb2_dim1 = 0, courb2_offset = 0, i__1 = 0
+  i__2 = 0;
   
   /* Local variables */
-  integer i__, nboct, nd;
+  integer i__ = 0, nboct = 0, nd = 0;
   
 
 /* ********************************************************************** 
@@ -4745,13 +4745,13 @@ int AdvApp2Var_MathBase::mmfmtb1_(integer *maxsz1,
   integer c__8 = 8;
 
    /* System generated locals */
-    integer table1_dim1, table1_offset, table2_dim1, table2_offset, i__1
-           i__2;
+    integer table1_dim1 = 0, table1_offset = 0, table2_dim1 = 0, table2_offset = 0, i__1 = 0
+           i__2 = 0;
 
     /* Local variables */
     doublereal* work = 0;
-    integer ilong, isize, ii, jj, ier = 0;
-    intptr_t iofst = 0,iipt, jjpt;
+    integer ilong = 0, isize = 0, ii = 0, jj = 0, ier = 0;
+    intptr_t iofst = 0,iipt = 0, jjpt = 0;
 
 
 /************************************************************************
@@ -4896,15 +4896,15 @@ int AdvApp2Var_MathBase::mmgaus1_(integer *ndimf,
                                  integer *iercod)
 {
   /* System generated locals */
-  integer i__1, i__2;
+  integer i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer ndeg;
+  integer ndeg = 0;
   doublereal h__[20];
-  integer j;
-  doublereal t, u[20], x;
-  integer idimf;
-  doublereal c1x, c2x;
+  integer j = 0;
+  doublereal t = NAN, u[20], x = NAN;
+  integer idimf = 0;
+  doublereal c1x = NAN, c2x = NAN;
 /* ********************************************************************** 
 */
 
@@ -5083,22 +5083,22 @@ int mmherm0_(doublereal *debfin,
 
   
    /* System generated locals */
-    integer i__1, i__2;
-    doublereal d__1;
+    integer i__1 = 0, i__2 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
     doublereal amat[36]        /* was [6][6] */;
     integer iord[2];
-    doublereal prod;
-    integer iord1, iord2;
+    doublereal prod = NAN;
+    integer iord1 = 0, iord2 = 0;
     doublereal miden[36]       /* was [6][6] */;
-    integer ncmat;
-    doublereal epspi, d1, d2;
-    integer ii, jj, pp, ncf;
+    integer ncmat = 0;
+    doublereal epspi = NAN, d1 = NAN, d2 = NAN;
+    integer ii = 0, jj = 0, pp = 0, ncf = 0;
     doublereal cof[6];
-    integer iof[2], ier;
+    integer iof[2], ier = 0;
     doublereal mat[36] /* was [6][6] */;
-    integer cot;
+    integer cot = 0;
     doublereal abid[72]        /* was [12][6] */;
 /* ***********************************************************************
  */
@@ -5420,12 +5420,12 @@ int mmherm1_(doublereal *debfin,
             integer *iercod)
 {
   /* System generated locals */
-  integer hermit_dim1, hermit_dim2, hermit_offset;
+  integer hermit_dim1 = 0, hermit_dim2 = 0, hermit_offset = 0;
 
   /* Local variables */
-  integer nbval;
-  doublereal d1;
-  integer cot;
+  integer nbval = 0;
+  doublereal d1 = NAN;
+  integer cot = 0;
 
 /* ***********************************************************************
  */
@@ -5642,22 +5642,22 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen,
   integer c__2 = 2;
   integer c__21 = 21;
   /* System generated locals */
-    integer tcbold_dim1, tcbold_dim2, tcbold_offset, tcbnew_dim1, tcbnew_dim2,
-            tcbnew_offset, i__1, i__2, i__3, i__4, i__5;
+    integer tcbold_dim1 = 0, tcbold_dim2 = 0, tcbold_offset = 0, tcbnew_dim1 = 0, tcbnew_dim2 = 0,
+            tcbnew_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0, i__5 = 0;
 
 
     /* Local variables */
-    logical ldbg;
-    integer ndeg;
+    logical ldbg = 0;
+    integer ndeg = 0;
     doublereal taux1[21];
-    integer d__, e, i__, k;
-    doublereal mfact;
-    integer ncoeff;
+    integer d__ = 0, e = 0, i__ = 0, k = 0;
+    doublereal mfact = NAN;
+    integer ncoeff = 0;
     doublereal tjacap[21];
     integer iordre[2];
-    doublereal hermit[36]/* was [6][3][2] */, ctenor, bornes[2];
-    integer ier;
-    integer aux1, aux2;
+    doublereal hermit[36]/* was [6][3][2] */, ctenor = NAN, bornes[2];
+    integer ier = 0;
+    integer aux1 = 0, aux2 = 0;
 
 /* ***********************************************************************
  */
@@ -5882,13 +5882,13 @@ L9999:
                            integer *iercod)
 {
   /* System generated locals */
-  integer tabtri_dim1, tabtri_offset, i__1, i__2;
+  integer tabtri_dim1 = 0, tabtri_offset = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  logical idbg;
-  integer icol, ilgn, nlgn, noct, inser;
+  logical idbg = 0;
+  integer icol = 0, ilgn = 0, nlgn = 0, noct = 0, inser = 0;
   doublereal epsega = 0.;
-  integer ibb;
+  integer ibb = 0;
 
 /* ***********************************************************************
  */
@@ -6083,11 +6083,11 @@ L9999:
                            doublereal *polcan)
 {
     /* System generated locals */
-  integer poljac_dim1, i__1, i__2;
+  integer poljac_dim1 = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer iptt, i__, j, ibb;
-  doublereal bid;
+  integer iptt = 0, i__ = 0, j = 0, ibb = 0;
+  doublereal bid = NAN;
 
 /* ***********************************************************************
  */
@@ -6233,11 +6233,11 @@ L9999:
   static char nomprg[8+1] = "MMJACCV ";
   
   /* System generated locals */
-  integer crvlgd_dim1, crvlgd_offset, crvcan_dim1, crvcan_offset
-  polaux_dim1, i__1, i__2;
+  integer crvlgd_dim1 = 0, crvlgd_offset = 0, crvcan_dim1 = 0, crvcan_offset = 0
+  polaux_dim1 = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer ndeg, i__, nd, ii, ibb;
+  integer ndeg = 0, i__ = 0, nd = 0, ii = 0, ibb = 0;
 
 /* ***********************************************************************
  */
@@ -6344,16 +6344,16 @@ int mmloncv_(integer *ndimax,
   integer kgar = 0;
   
   /* System generated locals */
-  integer courbe_dim1, courbe_offset, i__1, i__2;
+  integer courbe_dim1 = 0, courbe_offset = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  doublereal tran;
+  doublereal tran = NAN;
   integer ngaus = 0;
-  doublereal c1, c2, d1, d2,
-    wgaus[20] = {0.}, uroot[20] = {0.}, x1, x2, dd;
-  integer ii, jj, kk;
-  doublereal som;
-  doublereal der1, der2;
+  doublereal c1 = NAN, c2 = NAN, d1 = NAN, d2 = NAN,
+    wgaus[20] = {0.}, uroot[20] = {0.}, x1 = NAN, x2 = NAN, dd = NAN;
+  integer ii = 0, jj = 0, kk = 0;
+  doublereal som = NAN;
+  doublereal der1 = NAN, der2 = NAN;
 
 
 
@@ -6883,11 +6883,11 @@ L9999:
 
 {
   /* System generated locals */
-  integer courbe_dim1, courbe_offset, i__1, i__2;
+  integer courbe_dim1 = 0, courbe_offset = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer ncof2;
-  integer isize, nd, kcf, ncf;
+  integer ncof2 = 0;
+  integer isize = 0, nd = 0, kcf = 0, ncf = 0;
 
 
 /* ***********************************************************************
@@ -7012,11 +7012,11 @@ L9999:
 
 {
   /* System generated locals */
-  integer courbe_dim1, courbe_offset, i__1;
+  integer courbe_dim1 = 0, courbe_offset = 0, i__1 = 0;
   
   /* Local variables */
-  integer i__, nd;
-  doublereal fu;
+  integer i__ = 0, nd = 0;
+  doublereal fu = NAN;
   
  
 /* ***********************************************************************
@@ -7098,12 +7098,12 @@ int mmpojac_(doublereal *tparam,
   integer c__2 = 2;
   
     /* System generated locals */
-    integer valjac_dim1, i__1, i__2;
+    integer valjac_dim1 = 0, i__1 = 0, i__2 = 0;
 
     /* Local variables */
-    doublereal cofa, cofb, denom, tnorm[100];
-    integer ii, jj, kk1, kk2;
-    doublereal aux1, aux2;
+    doublereal cofa = NAN, cofb = NAN, denom = NAN, tnorm[100];
+    integer ii = 0, jj = 0, kk1 = 0, kk2 = 0;
+    doublereal aux1 = NAN, aux2 = NAN;
 
 
 /* ***********************************************************************
@@ -7319,12 +7319,12 @@ L9999:
 
 {
   /* System generated locals */
-  integer i__1, i__2;
+  integer i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  logical ldbg;
-  integer imin, jmin, i__, j, k;
-  logical trouve;
+  logical ldbg = 0;
+  integer imin = 0, jmin = 0, i__ = 0, j = 0, k = 0;
+  logical trouve = 0;
 
 /* ***********************************************************************
  */
@@ -7486,20 +7486,20 @@ L9999:
   integer c__100 = 100;
  
    /* System generated locals */
-    integer i__1, i__2;
+    integer i__1 = 0, i__2 = 0;
 
     /* Local variables */
-    logical ldbg;
+    logical ldbg = 0;
     doublereal* mcho = 0;
-    integer jmin, jmax, i__, j, k, l;
-    intptr_t iofv1, iofv2, iofv3, iofv4;
+    integer jmin = 0, jmax = 0, i__ = 0, j = 0, k = 0, l = 0;
+    intptr_t iofv1 = 0, iofv2 = 0, iofv3 = 0, iofv4 = 0;
     doublereal *v1 = 0, *v2 = 0, *v3 = 0, *v4 = 0;
-    integer deblig, dimhch;
+    integer deblig = 0, dimhch = 0;
     doublereal* hchole = 0;
-    intptr_t iofmch, iofmam, iofhch;
+    intptr_t iofmch = 0, iofmam = 0, iofhch = 0;
     doublereal* matsym = 0;
-    integer ier;
-    integer aux;
+    integer ier = 0;
+    integer aux = 0;
 
 
 
@@ -7848,13 +7848,13 @@ int mmrslss_(integer *,//mxcoef,
             integer *iercod)
 {
   /* System generated locals */
-  integer i__1, i__2;
+  integer i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  logical ldbg;
-  integer i__, j;
-  doublereal somme;
-  integer pointe, ptcour;
+  logical ldbg = 0;
+  integer i__ = 0, j = 0;
+  doublereal somme = NAN;
+  integer pointe = 0, ptcour = 0;
 
 /* ***********************************************************************
  */
@@ -8004,15 +8004,15 @@ int mmrslw_(integer *normax,
            integer *iercod)
 {
   /* System generated locals */
-    integer abmatr_dim1, abmatr_offset, xmatri_dim1, xmatri_offset, i__1
-           i__2, i__3;
-    doublereal d__1;
+    integer abmatr_dim1 = 0, abmatr_offset = 0, xmatri_dim1 = 0, xmatri_offset = 0, i__1 = 0
+           i__2 = 0, i__3 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
-    integer kpiv;
-    doublereal pivot;
-    integer ii, jj, kk;
-    doublereal akj;
+    integer kpiv = 0;
+    doublereal pivot = NAN;
+    integer ii = 0, jj = 0, kk = 0;
+    doublereal akj = NAN;
     
 
 /* ********************************************************************** 
@@ -8228,12 +8228,12 @@ L9999:
 
 {
   /* System generated locals */
-  integer amat_dim1, amat_offset, bmat_dim1, bmat_offset, xmat_dim1
-  xmat_offset, aaux_dim1, aaux_offset, i__1, i__2;
+  integer amat_dim1 = 0, amat_offset = 0, bmat_dim1 = 0, bmat_offset = 0, xmat_dim1 = 0
+  xmat_offset = 0, aaux_dim1 = 0, aaux_offset = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer i__, j;
-  integer ibb;
+  integer i__ = 0, j = 0;
+  integer ibb = 0;
 
 /*      IMPLICIT DOUBLE PRECISION (A-H,O-Z) */
 /*      IMPLICIT INTEGER (I-N) */
@@ -8369,7 +8369,7 @@ L9999:
                            doublereal *rtlegd)
 
 {
-  integer ideb, nmod2, nsur2, ilong, ibb;
+  integer ideb = 0, nmod2 = 0, nsur2 = 0, ilong = 0, ibb = 0;
 
 
 /* ********************************************************************** 
@@ -8497,10 +8497,10 @@ L9999:
                            integer *iercod)
 {
   /* System generated locals */
-  doublereal d__1;
+  doublereal d__1 = NAN;
   
   /* Local variables */
-  integer ideb, ifin, imil, ibb;
+  integer ideb = 0, ifin = 0, imil = 0, ibb = 0;
 
 /* ***********************************************************************
  */
@@ -8650,13 +8650,13 @@ int mmtmave_(integer *nligne,
 
 {
   /* System generated locals */
-  integer i__1, i__2;
+  integer i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  logical ldbg;
-  integer imin, imax, i__, j, k;
-  doublereal somme;
-  integer aux;
+  logical ldbg = 0;
+  integer imin = 0, imax = 0, i__ = 0, j = 0, k = 0;
+  doublereal somme = NAN;
+  integer aux = 0;
   
 
 /* ***********************************************************************
@@ -8800,13 +8800,13 @@ int mmtrpj0_(integer *ncofmx,
 
 {
   /* System generated locals */
-  integer crvlgd_dim1, crvlgd_offset, i__1, i__2;
-  doublereal d__1;
+  integer crvlgd_dim1 = 0, crvlgd_offset = 0, i__1 = 0, i__2 = 0;
+  doublereal d__1 = NAN;
   
   /* Local variables */
-  integer ncut, i__;
-  doublereal bidon, error;
-  integer nd;
+  integer ncut = 0, i__ = 0;
+  doublereal bidon = NAN, error = NAN;
+  integer nd = 0;
   
 
 /* ***********************************************************************
@@ -8980,14 +8980,14 @@ int mmtrpj2_(integer *ncofmx,
            3.72184531357268220291630708234186 };
 
     /* System generated locals */
-    integer crvlgd_dim1, crvlgd_offset, i__1, i__2;
-    doublereal d__1;
+    integer crvlgd_dim1 = 0, crvlgd_offset = 0, i__1 = 0, i__2 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
-    integer ncut, i__;
-    doublereal bidon, error;
-    integer ia, nd;
-    doublereal bid, eps1;
+    integer ncut = 0, i__ = 0;
+    doublereal bidon = NAN, error = NAN;
+    integer ia = 0, nd = 0;
+    doublereal bid = NAN, eps1 = NAN;
 
 
 /* ***********************************************************************
@@ -9184,14 +9184,14 @@ int mmtrpj4_(integer *ncofmx,
            3.05886060707437081434964933864149 };
 
     /* System generated locals */
-    integer crvlgd_dim1, crvlgd_offset, i__1, i__2;
-    doublereal d__1;
+    integer crvlgd_dim1 = 0, crvlgd_offset = 0, i__1 = 0, i__2 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
-    integer ncut, i__;
-    doublereal bidon, error;
-    integer ia, nd;
-    doublereal bid, eps1;
+    integer ncut = 0, i__ = 0;
+    doublereal bidon = NAN, error = NAN;
+    integer ia = 0, nd = 0;
+    doublereal bid = NAN, eps1 = NAN;
 
 
 
@@ -9388,14 +9388,14 @@ int mmtrpj6_(integer *ncofmx,
            2.71238965987606292679677228666411 };
 
     /* System generated locals */
-    integer crvlgd_dim1, crvlgd_offset, i__1, i__2;
-    doublereal d__1;
+    integer crvlgd_dim1 = 0, crvlgd_offset = 0, i__1 = 0, i__2 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
-    integer ncut, i__;
-    doublereal bidon, error;
-    integer ia, nd;
-    doublereal bid, eps1;
+    integer ncut = 0, i__ = 0;
+    doublereal bidon = NAN, error = NAN;
+    integer ia = 0, nd = 0;
+    doublereal bid = NAN, eps1 = NAN;
 
 
 
@@ -9535,10 +9535,10 @@ L9999:
                            integer *ncfnew)
 {
     /* System generated locals */
-    integer crvlgd_dim1, crvlgd_offset;
+    integer crvlgd_dim1 = 0, crvlgd_offset = 0;
 
     /* Local variables */
-    integer ia;
+    integer ia = 0;
    
 
 /* ***********************************************************************
@@ -9623,15 +9623,15 @@ L9999:
   doublereal c_b2 = 10.;
   
     /* System generated locals */
-    integer i__1;
-    doublereal d__1;
+    integer i__1 = 0;
+    doublereal d__1 = NAN;
 
     /* Local variables */
-    integer nchif, iunit = 1, izero;
-    doublereal vnorm;
-    integer ii;
-    doublereal bid;
-    doublereal eps0;
+    integer nchif = 0, iunit = 1, izero = 0;
+    doublereal vnorm = NAN;
+    integer ii = 0;
+    doublereal bid = NAN;
+    doublereal eps0 = NAN;
 
 
 
@@ -9763,7 +9763,7 @@ L9999:
   
   static char nomprg[8+1] = "MMEPS1  ";
   
-  integer ibb;
+  integer ibb = 0;
   
 
 
@@ -9868,15 +9868,15 @@ L9999:
 
 {
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
   
   /* Local variables */
-  logical ldbg;
-  integer d__;
+  logical ldbg = 0;
+  integer d__ = 0;
   doublereal vaux1[3], vaux2[3];
-  logical colin;
-  doublereal valaux;
-  integer aux;
+  logical colin = 0;
+  doublereal valaux = NAN;
+  integer aux = 0;
  
 /* ***********************************************************************
  */
@@ -10155,8 +10155,8 @@ void AdvApp2Var_MathBase::mmwprcs_(doublereal *epsil1,
  doublereal AdvApp2Var_MathBase::pow__di (doublereal *x,
                                   integer *n)
 {
-  doublereal result ;
-  integer    absolute ;
+  doublereal result = NAN ;
+  integer    absolute = 0 ;
   result = 1.0e0 ;
   if ( *n > 0 ) {absolute = *n;}
   else {absolute = -*n;}
@@ -10212,8 +10212,8 @@ integer pow__ii(integer *x,
                integer *n)
 
 {
-  integer result ;
-  integer    absolute ;
+  integer result = 0 ;
+  integer    absolute = 0 ;
   result = 1 ;
   if ( *n > 0 ) {absolute = *n;}
   else {absolute = -*n;}
@@ -10273,12 +10273,12 @@ integer pow__ii(integer *x,
 
 {
   /* System generated locals */
-  integer i__1;
-  doublereal ret_val;
+  integer i__1 = 0;
+  doublereal ret_val = NAN;
   
   /* Local variables */
-  integer i__;
-  doublereal x;
+  integer i__ = 0;
+  doublereal x = NAN;
   
 
 
@@ -10348,12 +10348,12 @@ int mvcvin2_(integer *ncoeff,
 
 {
   /* System generated locals */
-  integer i__1, i__2;
+  integer i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer m1jm1, ncfm1, j, k;
-  doublereal bid;
-  doublereal cij1, cij2;
+  integer m1jm1 = 0, ncfm1 = 0, j = 0, k = 0;
+  doublereal bid = NAN;
+  doublereal cij1 = NAN, cij2 = NAN;
   
 
 
@@ -10498,13 +10498,13 @@ int mvcvinv_(integer *ncoeff,
 
 {
   /* System generated locals */
-  integer i__1, i__2;
+  integer i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer m1jm1, ncfm1, j, k;
-  doublereal bid;
+  integer m1jm1 = 0, ncfm1 = 0, j = 0, k = 0;
+  doublereal bid = NAN;
   //extern /* Subroutine */ int maermsg_();
-  doublereal cij1, cij2, cij3;
+  doublereal cij1 = NAN, cij2 = NAN, cij3 = NAN;
   
  
 /* ********************************************************************** 
@@ -10782,11 +10782,11 @@ int mvpscr2_(integer *ncoeff,
             doublereal *pntcrb)
 {
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
   
   /* Local variables */
-  integer ndeg, kk;
-  doublereal xxx, yyy;
+  integer ndeg = 0, kk = 0;
+  doublereal xxx = NAN, yyy = NAN;
 
 
 
@@ -10910,11 +10910,11 @@ int mvpscr3_(integer *ncoeff,
 
 {
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
   
   /* Local variables */
-  integer ndeg, kk;
-  doublereal xxx, yyy, zzz;
+  integer ndeg = 0, kk = 0;
+  doublereal xxx = NAN, yyy = NAN, zzz = NAN;
 
 
 
@@ -11049,12 +11049,12 @@ L9999:
 
 {
   /* System generated locals */
-  integer dtab_dim1, dtab_offset, i__1, i__2;
+  integer dtab_dim1 = 0, dtab_offset = 0, i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  integer incr;
-  doublereal dsave;
-  integer i3, i4, i5, incrp1;
+  integer incr = 0;
+  doublereal dsave = NAN;
+  integer i3 = 0, i4 = 0, i5 = 0, incrp1 = 0;
 
 
 /************************************************************************
@@ -11179,12 +11179,12 @@ L9900:
    
 {
   /* System generated locals */
-  integer i__1;
-  doublereal ret_val, d__1, d__2;
+  integer i__1 = 0;
+  doublereal ret_val = NAN, d__1 = NAN, d__2 = NAN;
 
   /* Local variables */
-  doublereal xsom;
-  integer i__, irmax;
+  doublereal xsom = NAN;
+  integer i__ = 0, irmax = 0;
   
   
 
index a2476c50c587588db0531ae4df46e48f255b0eac..37e55bea086504bee8db86593654803382515a26 100644 (file)
@@ -39,11 +39,11 @@ AdvApp2Var_Network::AdvApp2Var_Network()
 
 AdvApp2Var_Network::AdvApp2Var_Network(const AdvApp2Var_SequenceOfPatch& Net,
                                       const TColStd_SequenceOfReal& TheU,
-                                      const TColStd_SequenceOfReal& TheV)
+                                      const TColStd_SequenceOfReal& TheV) : myNet(Net), myUParameters(TheU), myVParameters(TheV)
 {
-  myNet=Net;
-  myUParameters=TheU;
-  myVParameters=TheV;
+  
+  
+  
 }
 
 //==========================================================================================
@@ -75,7 +75,7 @@ void AdvApp2Var_Network::UpdateInU(const Standard_Real CuttingValue)
 {
 
 //  insertion du nouveau parametre de decoupe
-  Standard_Integer i=1,j;
+  Standard_Integer i=1,j = 0;
   while (myUParameters.Value(i)<CuttingValue) {
     i++;
   }
index 1b0bf691c6e75abee28418f17b08b7e0ba92e8bb..6393ce62c976f5e72029cf471818e77e6894bacb 100644 (file)
@@ -22,6 +22,8 @@
 //   by:       Joelle CHAUVET / Jean-Marc LACHAUME
 //             Initialisation de myCritValue pour OSF
 
+#include <math.h>
+
 #include <AdvApp2Var_ApproxF2var.hxx>
 #include <AdvApp2Var_Context.hxx>
 #include <AdvApp2Var_Criterion.hxx>
@@ -109,21 +111,21 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
 {
 
 // data stored in the Context
-  Standard_Integer NDIMEN, ISOFAV;
+  Standard_Integer NDIMEN = 0, ISOFAV = 0;
   NDIMEN = Conditions.TotalDimension();
 // Attention : works only for 3D
   ISOFAV = Conditions.FavorIso();
 
 // data related to the patch to be discretized
-  Standard_Integer NBPNTU, NBPNTV;
+  Standard_Integer NBPNTU = 0, NBPNTV = 0;
   Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV;
   Handle (TColStd_HArray1OfReal) HUROOT  = Conditions.URoots();
   Handle (TColStd_HArray1OfReal) HVROOT  = Conditions.VRoots();
-  Standard_Real * UROOT;
+  Standard_Real * UROOT = nullptr;
     UROOT =  (Standard_Real *) &HUROOT ->ChangeArray1()(HUROOT ->Lower());
   NBPNTU = (Conditions.URoots())->Length();
   if (myOrdInU>-1) NBPNTU -= 2;
-  Standard_Real * VROOT;
+  Standard_Real * VROOT = nullptr;
     VROOT =  (Standard_Real *) &HVROOT ->ChangeArray1()(HVROOT ->Lower());
   NBPNTV = (Conditions.VRoots())->Length();
   if (myOrdInV>-1) NBPNTV -= 2;
@@ -135,8 +137,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
     new TColStd_HArray1OfReal(1,SIZE*4);
   HCOINS->Init(0.);
 
-  Standard_Integer iu,iv;
-  Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho,valnorm;
+  Standard_Integer iu = 0,iv = 0;
+  Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho = NAN,valnorm = NAN;
 
   for (iu=0;iu<=myOrdInU;iu++) {
     for (iv=0;iv<=myOrdInV;iv++) {
@@ -209,7 +211,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
     ( (Constraints.IsoU(myU1,myV0,myV1)).DifTab() ) ->Array1();
 
 // normalization
-  Standard_Integer ideb1,ideb2,ideb3,ideb4,jj;
+  Standard_Integer ideb1 = 0,ideb2 = 0,ideb3 = 0,ideb4 = 0,jj = 0;
   for (iu=1;iu<=IORDRU;iu++) {
     rho = pow(du,iu);
     ideb1 = HSU0->Lower() + iu*SIZE -1;
@@ -402,8 +404,8 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
                                      const AdvApp2Var_Framework& Constraints)
 {
 // data stored in the  Context
-  Standard_Integer NDIMEN;
-  Standard_Integer IERCOD, NCFLMU, NCFLMV, NDegU, NDegV;
+  Standard_Integer NDIMEN = 0;
+  Standard_Integer IERCOD = 0, NCFLMU = 0, NCFLMV = 0, NDegU = 0, NDegV = 0;
   NDIMEN = Conditions.TotalDimension();
 // Attention : works only for 3D
   NCFLMU = Conditions.ULimit();
@@ -443,9 +445,9 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
   HCFU1->Init( (Constraints.IsoU(myU1,myV0,myV1)).NbCoeff() );
 
 // normalization of Isos U
-  Standard_Integer iu,iv;
-  Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho,valnorm;
-  Standard_Integer ideb0,ideb1,jj;
+  Standard_Integer iu = 0,iv = 0;
+  Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho = NAN,valnorm = NAN;
+  Standard_Integer ideb0 = 0,ideb1 = 0,jj = 0;
 
   for (iu=1;iu<=IORDRU;iu++) {
     rho = pow(du,iu);
@@ -532,7 +534,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
   }
 
 // add constraints at the corners
-  Standard_Integer ideb;
+  Standard_Integer ideb = 0;
   SIZE=NDIMEN*(IORDRU+2)*(IORDRV+2);
   Handle (TColStd_HArray1OfReal) HCOINS  =
     new TColStd_HArray1OfReal(1,SIZE*4);
@@ -590,8 +592,8 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
   Standard_Real *FACT = 
     (Standard_Real *) &HFACT ->ChangeArray1()(HFACT ->Lower());
 
-  Standard_Integer idim,ncf0,ncf1,iun=1;
-  Standard_Real *Is;
+  Standard_Integer idim = 0,ncf0 = 0,ncf1 = 0,iun=1;
+  Standard_Real *Is = nullptr;
 
 // add extremities of isos U
   for (iu=1;iu<=IORDRU+1;iu++) {
@@ -656,10 +658,10 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
 
 void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
 {
-  Standard_Integer NBSESP = 1, iesp;
-  Standard_Integer iu,iv;
+  Standard_Integer NBSESP = 1, iesp = 0;
+  Standard_Integer iu = 0,iv = 0;
 
-  Standard_Real errU,errV,error,hmax[4];
+  Standard_Real errU = NAN,errV = NAN,error = NAN,hmax[4];
   hmax[0] = 0;
   hmax[1] = 1;
   hmax[2] = 1.5;
@@ -718,7 +720,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
              ((Constraints.IsoU(myU1,myV0,myV1)).MaxErrors())->Value(iesp,1));
 
 // calculate max errors at the corners
-    Standard_Real emax1=0.,emax2=0.,emax3=0.,emax4=0.,err1,err2,err3,err4;
+    Standard_Real emax1=0.,emax2=0.,emax3=0.,emax4=0.,err1 = NAN,err2 = NAN,err3 = NAN,err4 = NAN;
     for (iu=0;iu<=myOrdInU;iu++) {
       for (iv=0;iv<=myOrdInV;iv++) {
     error = (Constraints.Node(myU0,myV0))->Error(iu,iv);
@@ -766,9 +768,9 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
 {
 
 // data stored in the Context
-  Standard_Integer NDIMEN, NBSESP, NDIMSE;
-  Standard_Integer NBPNTU, NBPNTV, NCFLMU, NCFLMV, NDJACU, NDJACV;
-  Standard_Integer NDegU, NDegV, NJacU, NJacV;
+  Standard_Integer NDIMEN = 0, NBSESP = 0, NDIMSE = 0;
+  Standard_Integer NBPNTU = 0, NBPNTV = 0, NCFLMU = 0, NCFLMV = 0, NDJACU = 0, NDJACV = 0;
+  Standard_Integer NDegU = 0, NDegV = 0, NJacU = 0, NJacV = 0;
   NDIMEN = Conditions.TotalDimension();
   NBSESP = Conditions.TotalNumberSSP();
   NDIMSE = 3;
@@ -787,7 +789,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
 
 // data relative to the processed patch
   Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV,
-                   NDMINU = 1, NDMINV = 1, NCOEFU, NCOEFV;
+                   NDMINU = 1, NDMINV = 1, NCOEFU = 0, NCOEFV = 0;
 // NDMINU and NDMINV depend on the nb of coeff of neighboring isos
 // and of the required order of continuity
   NDMINU = Max(1,2*IORDRU+1);
@@ -807,7 +809,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
     new TColStd_HArray1OfReal(1,NBSESP);
   Handle (TColStd_HArray1OfReal) HEPSFRO =
     new TColStd_HArray1OfReal(1,NBSESP*8);
-  Standard_Integer iesp;
+  Standard_Integer iesp = 0;
   for (iesp=1;iesp<=NBSESP;iesp++) {
     HEPSAPR->SetValue(iesp,(Conditions.IToler())->Value(iesp));
     HEPSFRO->SetValue(iesp,(Conditions.FToler())->Value(iesp,1));
@@ -937,7 +939,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
                                     &myNbCoeffInV);
     
 // transposition (NCFLMU,NCFLMV,NDIMEN)Fortran-C++
-    Standard_Integer aIU, aIN, dim, ii, jj;
+    Standard_Integer aIU = 0, aIN = 0, dim = 0, ii = 0, jj = 0;
     for (dim=1; dim<=NDIMEN; dim++){
        aIN = (dim-1)*NCFLMU*NCFLMV;
        for (ii=1; ii<=NCFLMU; ii++) {
index 7f32dcb631058946e8b6086c89102371f743049c..12480b48d65c642d3a1ab80fcacd531d8a2d32fb 100644 (file)
@@ -14,6 +14,7 @@
 // AdvApp2Var_SysBase.cxx
 #include <assert.h>
 #include <cmath>
+#include <math.h>
 #include <string.h>
 #include <AdvApp2Var_SysBase.hxx>
 #include <AdvApp2Var_Data.hxx>
@@ -273,7 +274,7 @@ int AdvApp2Var_SysBase::macrai4_(integer *nbelem,
   /* ***********************************************************************
    */
   
-  integer  iunit; 
+  integer  iunit = 0
   
   
   iunit = sizeof(integer);    
@@ -372,10 +373,10 @@ int macrbrk_()
 int AdvApp2Var_SysBase::macrchk_()
 {
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
   
   /* Local variables */
-  integer  i__, j;
+  integer  i__ = 0, j = 0;
   
 /* ***********************************************************************
  */
@@ -557,7 +558,7 @@ int AdvApp2Var_SysBase::macrdi4_(integer *nbelem,
 /* > */
 /* ***********************************************************************
  */
-  integer iunit;
+  integer iunit = 0;
   
   iunit = sizeof(integer); 
   /* Function Body */
@@ -713,7 +714,7 @@ int macrgfl_(intptr_t *iadfld,
   integer ifois = 1;
   
   char cbid[1] = {};
-  integer ibid, ienr;
+  integer ibid = 0, ienr = 0;
   integer novfl = 0;
   
   /* ***********************************************************************
@@ -849,7 +850,7 @@ int macrmsg_(const char *,//crout,
 {
   
   /* Local variables */
-  integer inum;
+  integer inum = 0;
   char /*cfm[80],*/ cln[3];
   
 /* ***********************************************************************
@@ -1152,7 +1153,7 @@ int magtlog_(const char *cnmlog,
  
   /* Local variables */
   char cbid[255];
-  integer ibid, ier;
+  integer ibid = 0, ier = 0;
   
 
 /* ********************************************************************** 
@@ -1307,12 +1308,12 @@ int AdvApp2Var_SysBase::maitbr8_(integer *itaill,
     };
   
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
   
   /* Local variables */
-  integer i__;
+  integer i__ = 0;
   doublereal buffx[63];
-  integer nbfois, noffst, nreste, nufois;
+  integer nbfois = 0, noffst = 0, nreste = 0, nufois = 0;
 
 /* ***********************************************************************
  */
@@ -1552,7 +1553,7 @@ int maostrb_()
 //=======================================================================
 int maostrd_()
 {
-  integer imod;
+  integer imod = 0;
   
 /* ***********************************************************************
  */
@@ -1615,12 +1616,12 @@ int maoverf_(integer *nbentr,
   integer ifois = 0;
   
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
   
   /* Local variables */
-  integer ibid;
+  integer ibid = 0;
   doublereal buff[63];
-  integer ioct, indic, nrest, icompt;
+  integer ioct = 0, indic = 0, nrest = 0, icompt = 0;
 
 /* ***********************************************************************
  */
@@ -1789,7 +1790,7 @@ int maoverf_(integer *nbentr,
     /* Loop. The upper limit is the integer value of the logarithm of base 2
      */
     /* of NBENTR/NLONGR. */
-    i__1 = (integer) (log((real) (*nbentr) / (float)63.) / log((float)2.))
+    i__1 = (integer) (std::log((real) (*nbentr) / (float)63.) / std::log((float)2.))
       ;
     for (ibid = 1; ibid <= i__1; ++ibid) {
       
@@ -1943,14 +1944,14 @@ int mcrcomm_(integer *kop,
   integer ntab = 0;
   
   /* System generated locals */
-  integer i__1, i__2;
+  integer i__1 = 0, i__2 = 0;
   
   /* Local variables */
-  intptr_t ideb;
+  intptr_t ideb = 0;
   doublereal dtab[32000];
   intptr_t itab[160]   /* was [4][40] */;
-  intptr_t ipre;
-  integer i__, j, k;
+  intptr_t ipre = 0;
+  integer i__ = 0, j = 0, k = 0;
   
 
 /************************************************************************
@@ -2118,12 +2119,12 @@ int AdvApp2Var_SysBase::mcrdelt_(integer *iunit,
                                 integer *iercod)
 
 {
-  integer ibid;
-  doublereal xbid;
-  integer noct, iver, ksys, i__, n, nrang
-  ibyte, ier;
-  intptr_t iadfd,  iadff, iaddr, loc; /* Les adrresses en long*/
-  integer kop;
+  integer ibid = 0;
+  doublereal xbid = NAN;
+  integer noct = 0, iver = 0, ksys = 0, i__ = 0, n = 0, nrang = 0
+  ibyte = 0, ier = 0;
+  intptr_t iadfd = 0,  iadff = 0, iaddr = 0, loc = 0; /* Les adrresses en long*/
+  integer kop = 0;
   
 /* ***********************************************************************
  */
@@ -2516,14 +2517,14 @@ int AdvApp2Var_SysBase::mcrlist_(integer *ier) const
 
 {
   /* System generated locals */
-  integer i__1;
+  integer i__1 = 0;
   
   /* Builtin functions */
   
   /* Local variables */
   char cfmt[1];
-  doublereal dfmt;
-  integer ifmt, i__, nufmt, ntotal;
+  doublereal dfmt = NAN;
+  integer ifmt = 0, i__ = 0, nufmt = 0, ntotal = 0;
   char subrou[7];
   
 
@@ -2664,15 +2665,15 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit,
 
 {
 
-  integer i__1, i__2;
+  integer i__1 = 0, i__2 = 0;
 
   /* Local variables */
-  doublereal dfmt;
-  integer ifmt, iver;
+  doublereal dfmt = NAN;
+  integer ifmt = 0, iver = 0;
   char subr[7];
-  integer ksys , ibyte, irest, ier;
-  intptr_t iadfd, iadff, iaddr,lofset, loc;
-  integer izu;
+  integer ksys = 0 , ibyte = 0, irest = 0, ier = 0;
+  intptr_t iadfd = 0, iadff = 0, iaddr = 0,lofset = 0, loc = 0;
+  integer izu = 0;
 
   
 /* ********************************************************************** 
@@ -3064,7 +3065,7 @@ void AdvApp2Var_SysBase::miraz_(integer *taille,
 //=======================================================================
 integer AdvApp2Var_SysBase::mnfndeb_()
 {
-  integer ret_val;
+  integer ret_val = 0;
   ret_val = 0;
   return ret_val;
 } /* mnfndeb_ */
@@ -3077,7 +3078,7 @@ int AdvApp2Var_SysBase::msifill_(integer *nbintg,
                                 integer *ivecin,
                                 integer *ivecou)
 {
-  integer nocte;
+  integer nocte = 0;
   
 /* ***********************************************************************
  */
@@ -3132,7 +3133,7 @@ int AdvApp2Var_SysBase::msrfill_(integer *nbreel,
                                 doublereal *vecent,
                                 doublereal * vecsor)
 {
-  integer nocte;
+  integer nocte = 0;
   
 
 /* ***********************************************************************
@@ -3309,7 +3310,7 @@ void AdvApp2Var_SysBase::mvriraz_(integer *taille,
                                  void *adt)
 
 {
-  integer offset;
+  integer offset = 0;
   offset = *taille * 8 ;
   /*    printf(" adt %d  long %d\n",adt,offset); */
   memset(adt , '\0' , offset) ;
index 8cf12ccfba8fe6f96660281f10457d8ea00bde39..bed9087bd493b19a859d4ad5fc89524750fe68c2 100644 (file)
@@ -140,7 +140,7 @@ private:
     mitem           icore[MAX_ALLOC_NB];
     integer         ncore;
     unsigned char   lprot;
-  } mcrgene_;
+  } mcrgene_{};
 
   /* Contains statistics on allocation requests.
      Index 0 corresponds to static_allocation, 1 - to heap allocation.
@@ -151,7 +151,7 @@ private:
   */
   struct {
     integer nrqst[2], ndelt[2], nbyte[2], mbyte[2];
-  } mcrstac_; 
+  } mcrstac_{}
 };
 
 #endif
index 388ddf909db447b7723864335c28ff15a51c13b6..7766c4f2604450229d24e05925de34b1e0721638 100644 (file)
@@ -21,6 +21,8 @@
 //                               facilement approchable ont de petites erreurs.
 // Modified     PMN 15/04/1997 : Gestion fine de la continuite aux lieux de decoupes 
 
+#include <math.h>
+
 #include <AdvApprox_ApproxAFunction.hxx>
 #include <AdvApprox_DichoCutting.hxx>
 #include <AdvApprox_EvaluatorFunction.hxx>
@@ -138,13 +140,13 @@ static void PrepareConvert(const Standard_Integer NumCurves,
             
 {
   // Declaration
-  Standard_Boolean isCi;
-  Standard_Integer icurve, idim, iordre, ii
+  Standard_Boolean isCi = 0;
+  Standard_Integer icurve = 0, idim = 0, iordre = 0, ii = 0
                    Dimension=Num1DSS + 2*Num2DSS + 3*Num3DSS,
                    NbSpace  = Num1DSS + Num2DSS + Num3DSS;
-  Standard_Real diff, moy, facteur1,  facteur2, normal1, normal2, eps;
-  Standard_Real *Res1, *Res2, *Val1, *Val2;
-  Standard_Real *Coef1, *Coef2
+  Standard_Real diff = NAN, moy = NAN, facteur1 = NAN,  facteur2 = NAN, normal1 = NAN, normal2 = NAN, eps = NAN;
+  Standard_Real *Res1 = nullptr, *Res2 = nullptr, *Val1 = nullptr, *Val2 = nullptr;
+  Standard_Real *Coef1 = nullptr, *Coef2 = nullptr
   Standard_Integer RealDegree = Max(MaxDegree + 1, 2 * ContinuityOrder + 2);
   
   gp_Vec V1,V2;
@@ -194,7 +196,7 @@ static void PrepareConvert(const Standard_Integer NumCurves,
       Standard_Real f2_dividend = PolynomialIntervals(icurve+1,2)-PolynomialIntervals(icurve+1,1);
       Standard_Real f1_divizor = TrueIntervals(icurve+1)-TrueIntervals(icurve); 
       Standard_Real f2_divizor = TrueIntervals(icurve+2)-TrueIntervals(icurve+1);
-      Standard_Real fract1, fract2;
+      Standard_Real fract1 = NAN, fract2 = NAN;
       
       if( Abs(f1_divizor) < Toler )     // this is to avoid divizion by zero 
        //in this case fract1 =  5.14755758946803e-85 
@@ -419,7 +421,7 @@ void AdvApprox_ApproxAFunction::Approximation(
                                              Standard_Integer& ErrorCode)
 {
 //  Standard_Real EpsPar =  Precision::Confusion();
-  Standard_Integer IDIM, NUPIL,TheDeg;
+  Standard_Integer IDIM = 0, NUPIL = 0,TheDeg = 0;
 #ifdef OCCT_DEBUG
   Standard_Integer NDIMEN = TotalDimension;
 #endif
@@ -465,7 +467,7 @@ void AdvApprox_ApproxAFunction::Approximation(
 //-->  NDJAC est le degre de "travail" dans la base orthogonale.
 
 
-      Standard_Integer NbGaussPoints, WorkDegree;
+      Standard_Integer NbGaussPoints = 0, WorkDegree = 0;
 
       PLib::JacobiParameters(Continuity, NumMaxCoeffs-1, code_precis, 
                             NbGaussPoints, WorkDegree);
@@ -483,8 +485,8 @@ void AdvApprox_ApproxAFunction::Approximation(
 //C**********************************************************************
   Handle(PLib_JacobiPolynomial) JacobiBase = new (PLib_JacobiPolynomial) (WorkDegree, Continuity);
 //Portage HP le compilateur refuse le debranchement
-  Standard_Integer IS ;
-  Standard_Boolean goto_fin_de_boucle;
+  Standard_Integer IS = 0 ;
+  Standard_Boolean goto_fin_de_boucle = 0;
   Standard_Integer MaxDegree = NumMaxCoeffs-1;
   AdvApprox_SimpleApprox Approx (TotalDimension, TotalNumSS,  
                                  Continuity,
@@ -531,8 +533,8 @@ void AdvApprox_ApproxAFunction::Approximation(
        else 
           {
 //-> ...sinon on essai de decouper l' intervalle courant en 2...
-          Standard_Real TMIL;
-          Standard_Boolean Large;
+          Standard_Real TMIL = NAN;
+          Standard_Boolean Large = 0;
 
            Large = CutTool.Value(TABINT[NumCurves], TABINT[NumCurves+1], 
                                   TMIL);
@@ -581,7 +583,7 @@ void AdvApprox_ApproxAFunction::Approximation(
        TColStd_Array1OfReal Coefficients(0,(TheDeg+1)*TotalDimension-1);
        JacobiBase->ToCoefficients (TotalDimension, TheDeg, 
                                    HJacCoeff->Array1(), Coefficients);
-       Standard_Integer i,j, f = (TheDeg+1)*TotalDimension;
+       Standard_Integer i = 0,j = 0, f = (TheDeg+1)*TotalDimension;
        for (i=0,j=(NumCurves-1)*TotalDimension*NumMaxCoeffs+1;
             i<f; i++, j++) {
          CoefficientArray.SetValue(j, Coefficients.Value(i));
@@ -693,15 +695,15 @@ void AdvApprox_ApproxAFunction::Perform(const Standard_Integer Num1DSS,
   myNumSubSpaces[2] = Num3DSS ;
   Standard_Integer  TotalNumSS  =
     Num1DSS + Num2DSS + Num3DSS,
-  ii,
-  jj,
-  kk,
-  index,
-  dim_index,
-  local_index;
+  ii = 0,
+  jj = 0,
+  kk = 0,
+  index = 0,
+  dim_index = 0,
+  local_index = 0;
   Standard_Integer  TotalDimension =
     myNumSubSpaces[0] + 2 * myNumSubSpaces[1] + 3 * myNumSubSpaces[2] ;
-  Standard_Real  error_value ;
+  Standard_Real  error_value = NAN ;
 
   Standard_Integer ContinuityOrder=0 ;
   switch (myContinuity) {
@@ -754,7 +756,7 @@ void AdvApprox_ApproxAFunction::Perform(const Standard_Integer Num1DSS,
   //
   
   Standard_Integer ErrorCode = 0,
-  NumCurves,
+  NumCurves = 0,
   size = 
     myMaxSegments * NumMaxCoeffs * TotalDimension ;
   Handle(TColStd_HArray1OfInteger)  NumCoeffPerCurvePtr =
@@ -961,7 +963,7 @@ void AdvApprox_ApproxAFunction::Perform(const Standard_Integer Num1DSS,
 void AdvApprox_ApproxAFunction::Poles(const Standard_Integer Index,
                                      TColgp_Array1OfPnt&   P) const 
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
   for (ii = P.Lower() ; ii <= P.Upper() ; ii++) {
     P.SetValue(ii,my3DPoles->Value(ii,Index)) ;
   }
@@ -987,7 +989,7 @@ Standard_Integer AdvApprox_ApproxAFunction::NbPoles()  const
 void AdvApprox_ApproxAFunction::Poles2d(const Standard_Integer Index,
                                        TColgp_Array1OfPnt2d&   P) const 
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
   for (ii = P.Lower() ; ii <= P.Upper() ; ii++) {
     P.SetValue(ii,my2DPoles->Value(ii,Index)) ;
   }
@@ -1000,7 +1002,7 @@ void AdvApprox_ApproxAFunction::Poles2d(const Standard_Integer Index,
 void AdvApprox_ApproxAFunction::Poles1d(const Standard_Integer Index,
                                        TColStd_Array1OfReal&   P) const 
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
   for (ii = P.Lower() ; ii <= P.Upper() ; ii++) {
     P.SetValue(ii,my1DPoles->Value(ii,Index)) ;
   }
@@ -1089,7 +1091,7 @@ Standard_Real  AdvApprox_ApproxAFunction::AverageError(
 
 void  AdvApprox_ApproxAFunction::Dump(Standard_OStream& o) const 
 {
-  Standard_Integer ii;
+  Standard_Integer ii = 0;
   o << "Dump of ApproxAFunction" << std::endl;
   if (myNumSubSpaces[0] > 0) {
     o << "Error(s) 1d = " << std::endl;
index 74f58b76ca3e54b62a63414f4dfe62e24b92580b..0b9b0934bbcbcc2d00a2bead37a72c288976d81c 100644 (file)
@@ -138,7 +138,7 @@ private:
   Standard_EXPORT void Perform (const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const AdvApprox_Cutting& CutTool);
 
 
-  Standard_Integer myNumSubSpaces[3];
+  Standard_Integer myNumSubSpaces[3]{};
   Handle(TColStd_HArray1OfReal) my1DTolerances;
   Handle(TColStd_HArray1OfReal) my2DTolerances;
   Handle(TColStd_HArray1OfReal) my3DTolerances;
@@ -154,7 +154,7 @@ private:
   Handle(TColgp_HArray2OfPnt) my3DPoles;
   Handle(TColStd_HArray1OfReal) myKnots;
   Handle(TColStd_HArray1OfInteger) myMults;
-  Standard_Integer myDegree;
+  Standard_Integer myDegree{};
   Standard_Address myEvaluator;
   Handle(TColStd_HArray1OfReal) my1DMaxError;
   Handle(TColStd_HArray1OfReal) my1DAverageError;
index be5e8ba9c281d57f59dc5c1c13f3b93d1241d9eb..6403580b1b17b085ed317b08c41e2ed2885266e6 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AdvApprox_PrefAndRec.hxx>
 #include <Precision.hxx>
 #include <Standard_DomainError.hxx>
 AdvApprox_PrefAndRec::AdvApprox_PrefAndRec(const TColStd_Array1OfReal& RecCut,
                                           const TColStd_Array1OfReal& PrefCut,
                                           const Standard_Real Weight):
-  myRecCutting(1, RecCut.Length()),
-  myPrefCutting(1, PrefCut.Length()),
+  myRecCutting(RecCut),
+  myPrefCutting(PrefCut),
   myWeight(Weight)
 {
-  myRecCutting =  RecCut;
-  myPrefCutting =  PrefCut;
   if (myWeight <= 1) { throw Standard_DomainError("PrefAndRec : Weight is too small");}
 }
 
@@ -37,8 +37,8 @@ Standard_Boolean AdvApprox_PrefAndRec::Value(const Standard_Real a,
 {
 //  longueur minimum d'un intervalle parametrique : 10*PConfusion()
   Standard_Real lgmin = 10 * Precision::PConfusion();
-  Standard_Integer i;
-  Standard_Real cut, mil=(a+b)/2, dist;
+  Standard_Integer i = 0;
+  Standard_Real cut = NAN, mil=(a+b)/2, dist = NAN;
   Standard_Boolean isfound = Standard_False;
 
   cut = mil;
index 02753ec1f7b7bb3ebbfab42dc0f3fd896b351eba..416be30f96bce09d88391562b69fb757505bb5e2 100644 (file)
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AdvApprox_PrefCutting.hxx>
 #include <Precision.hxx>
 
 AdvApprox_PrefCutting::AdvApprox_PrefCutting(const TColStd_Array1OfReal& CutPnts):
-  myPntOfCutting(1, CutPnts.Length()) 
-{
-  myPntOfCutting = CutPnts;
-}
+  myPntOfCutting(CutPnts)
+{}
 
 Standard_Boolean AdvApprox_PrefCutting::Value(const Standard_Real a,
                                              const Standard_Real b,
@@ -31,8 +31,8 @@ Standard_Boolean AdvApprox_PrefCutting::Value(const Standard_Real a,
 //  longueur minimum d'un intervalle parametrique : PConfusion()
 //                                    pour F(U,V) : EPS1=1.e-9 (cf.MMEPS1)
   Standard_Real lgmin = 10 * Precision::PConfusion();
-  Standard_Integer i;
-  Standard_Real cut, mil=(a+b)/2,
+  Standard_Integer i = 0;
+  Standard_Real cut = NAN, mil=(a+b)/2,
                 dist = Abs((a-b)/2);
   cut = mil;
   for ( i=myPntOfCutting.Lower(); i<= myPntOfCutting.Upper(); i++) {
index 6ffcec798b291209c2e9276b7969f46515c52ace..ce3d3d0ea4c58488c813f9c498ecba85b80b69b8 100644 (file)
@@ -16,6 +16,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <AdvApprox_EvaluatorFunction.hxx>
 #include <AdvApprox_SimpleApprox.hxx>
 #include <math_Vector.hxx>
@@ -90,7 +92,7 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi
 // ======= the computation of Pp(t) = Rr(t) + W(t)*Qq(t) =======
 
   done = Standard_False;
-  Standard_Integer i,idim,k,numss;
+  Standard_Integer i = 0,idim = 0,k = 0,numss = 0;
 
   Standard_Integer Dimension = myTotalDimension;
   AdvApprox_EvaluatorFunction& Evaluator = 
@@ -106,10 +108,10 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi
   FirstLast[1] = Last;
 
   math_Vector Result(1,myTotalDimension);
-  Standard_Integer ErrorCode,derive,i_idim;
+  Standard_Integer ErrorCode = 0,derive = 0,i_idim = 0;
   Standard_Real Fact=(Last-First)/2;
   Standard_Real *pResult = (Standard_Real*) &Result.Value(1);
-  Standard_Real param;  
+  Standard_Real param = NAN;  
 
   for (param = First, derive = myNivConstr; 
        derive >= 0 ; derive--) {
@@ -148,7 +150,7 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi
   Standard_Real* Coef1 = (Standard_Real*) &(myCoeff->ChangeArray1().Value(0));
 
   derive = 0;
-  Standard_Real ti, tip, tin, alin = (Last-First)/2, blin = (Last+First)/2.;
+  Standard_Real ti = NAN, tip = NAN, tin = NAN, alin = (Last-First)/2, blin = (Last+First)/2.;
 
   i_idim = myTotalDimension;
   for (i=1; i<=myNbGaussPoints/2; i++) {
@@ -234,8 +236,8 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi
   // the computing of NewDegree
   TColStd_Array1OfReal JacCoeff(0, myTotalDimension*(myWorkDegree+1)-1);
  
-  Standard_Real MaxErr,AverageErr;
-  Standard_Integer Dim, RangSS, RangCoeff, RangJacCoeff, RangDim, NewDegree, NewDegreeMax = 0;
+  Standard_Real MaxErr = NAN,AverageErr = NAN;
+  Standard_Integer Dim = 0, RangSS = 0, RangCoeff = 0, RangJacCoeff = 0, RangDim = 0, NewDegree = 0, NewDegreeMax = 0;
 
   myMaxError =  new TColStd_HArray1OfReal (1,myTotalNumSS);
   myAverageError = new TColStd_HArray1OfReal (1,myTotalNumSS);
@@ -377,7 +379,7 @@ Standard_Real AdvApprox_SimpleApprox::AverageError(const Standard_Integer Index)
 
 void AdvApprox_SimpleApprox::Dump(Standard_OStream& o) const
 {
-  Standard_Integer ii;
+  Standard_Integer ii = 0;
   o << "Dump of SimpleApprox " << std::endl;
   for (ii=1; ii <= myTotalNumSS; ii++) {
     o << "Error   " << MaxError(ii) << std::endl;
index 757db18ef742eafe9971c7064d96bfa8bdef6918..2f012334e2350ac7916e4cb6b37819d95e0663c5 100644 (file)
@@ -101,7 +101,7 @@ private:
   Handle(TColStd_HArray1OfReal) myTabPoints;
   Handle(TColStd_HArray2OfReal) myTabWeights;
   Standard_Address myEvaluator;
-  Standard_Integer myDegree;
+  Standard_Integer myDegree{};
   Handle(TColStd_HArray1OfReal) myCoeff;
   Handle(TColStd_HArray2OfReal) myFirstConstr;
   Handle(TColStd_HArray2OfReal) myLastConstr;
index 54a258b826ca1e195a156120a400bb8c23fa7a83..ce0cf2456f70acd20731271235c6b702eb452f62 100644 (file)
@@ -2070,7 +2070,7 @@ void InvMMatrix(const Standard_Integer classe,
                math_Matrix&           InvM)
 {
   if (classe > 24) throw Standard_DimensionError("InvMMatrix: classe > 24");
-  Standard_Integer i, j, k = 0, Som = 0;
+  Standard_Integer i = 0, j = 0, k = 0, Som = 0;
   for (i = 2; i < classe; i++) {
     Som += (i)*(i);
   }
index 0956cea9356a223ac774625105a090c3e481730b..f559efff767da3d30a3eb2ff97274083ba5c9b3a 100644 (file)
@@ -416,7 +416,7 @@ void IBPMatrix(const Standard_Integer classe, math_Matrix& IBPMa)
 {
   if (classe > 26) throw Standard_DimensionError("IBPMatrix: classe > 26");
 //  math_Matrix IBPMa(1, classe-2, 1, classe-2);
-  Standard_Integer i, j, k = 0, Som = 0;
+  Standard_Integer i = 0, j = 0, k = 0, Som = 0;
   for (i = 1; i < classe-2; i++) {
     Som += (i)*(i);
   }
index 3243a8ef23014901615db0da6f690f698107f764..18cff5e5dca87f6db28ee2418e189ba5572858de 100644 (file)
@@ -3277,7 +3277,7 @@ void MMatrix(const Standard_Integer classe,
             math_Matrix&           M)
 {
   if (classe > 24) throw Standard_DimensionError("MMatrix: classe > 24");
-  Standard_Integer i, j, k = 0, Som = 0;
+  Standard_Integer i = 0, j = 0, k = 0, Som = 0;
   for (i = 2; i < classe; i++) {
     Som += (i)*(i);
   }
index 20f44432490e39eb411c8de065f3a0a5a6f46dc8..1d44506e82acd6a49e4f69094825110109011764 100644 (file)
@@ -354,7 +354,7 @@ void IBTMatrix(const Standard_Integer classe, math_Matrix& IBTMa)
 {
   if (classe > 26) throw Standard_DimensionError("IBTMatrix: classe > 26");
 //  math_Matrix IBTMa(1, classe-4, 1, classe-4);
-  Standard_Integer i, j, k = 0, Som = 0;
+  Standard_Integer i = 0, j = 0, k = 0, Som = 0;
   for (i = 1; i < classe-4; i++) {
     Som += (i)*(i);
   }
index 7cc15f2dbc79354cf69faae87c6813806445c986..3c29bba8a17f985d5bfab4a4e56203f3b94a8f13 100644 (file)
@@ -1238,11 +1238,11 @@ void VBernstein(const Standard_Integer classe,
   if (nbpoints > 24) throw Standard_DimensionError("VBernstein: nbpoints > 24");
   //  math_Matrix VB(classe, nbpoints);
   
-  Standard_Integer i, j, k = 0, Som;
+  Standard_Integer i = 0, j = 0, k = 0, Som = 0;
   // 300 = 1+2+  ... +24 points.
   Som = (Standard_Integer )( 300*((classe-1)*classe/2.-1) + classe * (nbpoints-1)*nbpoints/2.);
   
-  const Standard_Real *tmpVB;
+  const Standard_Real *tmpVB = nullptr;
   tmpVB = VBMatrix + Som;
   for (i = 1; i <= classe; i++) {
     for (j = 1; j <= nbpoints; j++) {
index 01acce62da45b03c07d4bbc2225d1043007db3b9..806307311ba47c844e8614afbb247d9121858a74 100644 (file)
@@ -18,6 +18,8 @@
 #define No_Standard_OutOfRange
 #define No_Standard_RangeError
 #endif
+#include <math.h>
+
 #include <AppCont_LeastSquare.hxx>
 
 #include <math.hxx>
@@ -42,7 +44,7 @@ void AppCont_LeastSquare::FixSingleBorderPoint(const AppCont_Function&       the
   NCollection_Array1<gp_Pnt2d> aTabP2d(1,  Max (myNbP2d, 1)), aPrevP2d(1,  Max (myNbP2d, 1));
   Standard_Real aMult = ((theU - theU0) > (theU1 - theU)) ? 1.0: -1.0;
   Standard_Real aStartParam = theU,
-                aCurrParam, aPrevDist = 1.0, aCurrDist = 1.0;
+                aCurrParam = NAN, aPrevDist = 1.0, aCurrDist = 1.0;
 
   Standard_Real du = -(theU1 - theU0) / 2.0 * aMult;
   Standard_Real eps = Epsilon(1.);
@@ -103,14 +105,14 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function&       SSP,
   myPoles(1, Deg + 1, 1, 3 * SSP.GetNbOf3dPoints() + 2 * SSP.GetNbOf2dPoints(), 0.0),
   myParam(1, myNbPoints),
   myVB(1, Deg+1, 1, myNbPoints),
-  myPerInfo(1, 3 * SSP.GetNbOf3dPoints() + 2 * SSP.GetNbOf2dPoints() )
+  myPerInfo(1, 3 * SSP.GetNbOf3dPoints() + 2 * SSP.GetNbOf2dPoints() ), myDone(Standard_False), myDegre(Deg), myNbdiscret(myNbPoints)
 {
-  myDone = Standard_False;
-  myDegre = Deg;
-  Standard_Integer i, j, k, c, i2;
+  
+  
+  Standard_Integer i = 0, j = 0, k = 0, c = 0, i2 = 0;
   Standard_Integer classe = Deg + 1, cl1 = Deg;
-  Standard_Real U, dU, Coeff, Coeff2;
-  Standard_Real IBij, IBPij;
+  Standard_Real U = NAN, dU = NAN, Coeff = NAN, Coeff2 = NAN;
+  Standard_Real IBij = NAN, IBPij = NAN;
 
   Standard_Integer FirstP = 1, LastP = myNbPoints;
   Standard_Integer nbcol = 3 * SSP.GetNbOf3dPoints() + 2 * SSP.GetNbOf2dPoints();
@@ -119,8 +121,8 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function&       SSP,
   AppParCurves_Constraint myFirstC = FirstCons, myLastC = LastCons;
   SSP.GetNumberOfPoints(myNbP, myNbP2d);
 
-  Standard_Integer i2plus1, i2plus2;
-  myNbdiscret = myNbPoints;
+  Standard_Integer i2plus1 = 0, i2plus2 = 0;
+  
   NCollection_Array1<gp_Pnt>   aTabP(1, Max (myNbP, 1));
   NCollection_Array1<gp_Pnt2d> aTabP2d(1, Max (myNbP2d, 1));
   NCollection_Array1<gp_Vec>   aTabV(1, Max (myNbP, 1));
@@ -133,7 +135,7 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function&       SSP,
                           myPerInfo(aDimIdx).myPeriod);
   }
 
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   if (myFirstC == AppParCurves_TangencyPoint) 
   {
     Ok = SSP.D1(U0, aTabV2d, aTabV);
@@ -469,7 +471,7 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function&       SSP,
 const AppParCurves_MultiCurve& AppCont_LeastSquare::Value() 
 {
 
-  Standard_Integer i, j, j2;
+  Standard_Integer i = 0, j = 0, j2 = 0;
   gp_Pnt Pt;
   gp_Pnt2d Pt2d;
   Standard_Integer ideb = 1, ifin = myDegre+1;
@@ -504,8 +506,8 @@ void AppCont_LeastSquare::Error(Standard_Real& F,
                                 Standard_Real& MaxE3d,
                                 Standard_Real& MaxE2d) const
 {
-  Standard_Integer i, j, k, c, i2, classe = myDegre + 1;
-  Standard_Real Coeff, err3d = 0.0, err2d = 0.0;
+  Standard_Integer i = 0, j = 0, k = 0, c = 0, i2 = 0, classe = myDegre + 1;
+  Standard_Real Coeff = NAN, err3d = 0.0, err2d = 0.0;
   Standard_Integer ncol = myPoints.UpperCol() - myPoints.LowerCol() + 1;
 
   math_Matrix MyPoints(1, myNbdiscret, 1, ncol);
@@ -531,7 +533,7 @@ void AppCont_LeastSquare::Error(Standard_Real& F,
     }
   }
 
-  Standard_Real e1, e2, e3;
+  Standard_Real e1 = NAN, e2 = NAN, e3 = NAN;
   for (i = 1; i <= myNbdiscret; i++)
   {
     i2 = 1;
index 51300f2903f4c6e4bec94ce19519fadfdf9c7bc0..b1694b8b4e2c047e18c0d61204b8e1797f49e253 100644 (file)
@@ -68,7 +68,7 @@ private:
   NCollection_Array1<PeriodicityInfo> myPerInfo;
   Standard_Boolean myDone;
   Standard_Integer myDegre;
-  Standard_Integer myNbdiscret, myNbP, myNbP2d;
+  Standard_Integer myNbdiscret, myNbP{}, myNbP2d{};
 };
 
 #endif
index ae23fb509095d27dac9a4e03e1affcd73b991694..10fd202285150fa4739eeb89c61d30cdbf5eb9e3 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AppDef_LinearCriteria.hxx>
 #include <AppDef_MultiLine.hxx>
 #include <AppDef_MyLineTool.hxx>
@@ -218,7 +220,7 @@ Handle(FEmTool_HAssemblyTable) AppDef_LinearCriteria::AssemblyTable() const
 
   Handle(TColStd_HArray1OfInteger) GlobIndex, Aux;
 
-  Standard_Integer i, el = 1, dim = 1, NbGlobVar = 0, gi0;
+  Standard_Integer i = 0, el = 1, dim = 1, NbGlobVar = 0, gi0 = 0;
   
   // For dim = 1
   // For first element (el = 1)
@@ -288,7 +290,7 @@ Handle(TColStd_HArray2OfInteger) AppDef_LinearCriteria::DependenceTable() const
 
   Handle(TColStd_HArray2OfInteger) DepTab = 
     new TColStd_HArray2OfInteger(1, Dim, 1, Dim, 0);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i=1; i <= Dim; i++) DepTab->SetValue(i,i,1);
   
   return DepTab;
@@ -315,8 +317,8 @@ Standard_Integer AppDef_LinearCriteria::QualityValues(const Standard_Real J1min,
   TColStd_Array1OfReal& Knots = myCurve->Knots();
   Handle(TColStd_HArray2OfReal) Coeff; 
 
-  Standard_Integer el, deg = 0, curdeg, i;
-  Standard_Real UFirst, ULast;
+  Standard_Integer el = 0, deg = 0, curdeg = 0, i = 0;
+  Standard_Real UFirst = NAN, ULast = NAN;
 
   J1 = J2 = J3 = 0.;
   for(el = 1; el <= NbElm; el++) {
@@ -451,8 +453,8 @@ void AppDef_LinearCriteria::ErrorValues(Standard_Real& MaxError,
   gp_Pnt2d P2d;
   gp_Pnt P3d;
 
-  Standard_Integer i, ipnt, c0 = 0;
-  Standard_Real SqrDist, Dist;
+  Standard_Integer i = 0, ipnt = 0, c0 = 0;
+  Standard_Real SqrDist = NAN, Dist = NAN;
 
   MaxError = QuadraticError = AverageError = 0.;
 
@@ -510,11 +512,11 @@ void AppDef_LinearCriteria::Hessian(const Standard_Integer Element,
   math_Matrix AuxH(0, H.RowNumber()-1, 0, H.ColNumber()-1, 0.);
 
   TColStd_Array1OfReal& Knots = myCurve->Knots();
-  Standard_Real UFirst, ULast;
+  Standard_Real UFirst = NAN, ULast = NAN;
 
   UFirst = Knots(Element); ULast = Knots(Element + 1);
 
-  Standard_Integer icrit;
+  Standard_Integer icrit = 0;
 
   // Quality criterion part of Hessian
 
@@ -530,12 +532,12 @@ void AppDef_LinearCriteria::Hessian(const Standard_Integer Element,
 
   AuxH.Init(0.);
 
-  Standard_Real coeff = (ULast - UFirst)/2., curcoeff, poid;
-  Standard_Integer ipnt, ii, degH = 2 * Order+1;
+  Standard_Real coeff = (ULast - UFirst)/2., curcoeff = NAN, poid = NAN;
+  Standard_Integer ipnt = 0, ii = 0, degH = 2 * Order+1;
 
 
   Handle(PLib_Base) myBase = myCurve->Base();
-  Standard_Integer k1, k2, i, j, i0 = H.LowerRow(), j0 = H.LowerCol(), i1, j1,
+  Standard_Integer k1 = 0, k2 = 0, i = 0, j = 0, i0 = H.LowerRow(), j0 = H.LowerCol(), i1 = 0, j1 = 0,
                    di = myPntWeight.Lower() - myParameters->Lower();
 
   //BuilCache
@@ -603,8 +605,8 @@ void AppDef_LinearCriteria::Gradient(const Standard_Integer Element,
   TColgp_Array1OfPnt TabP3d(1, Max(1,myNbP3d));
   TColgp_Array1OfPnt2d TabP2d(1, Max(1,myNbP2d));    
 
-  Standard_Boolean In3d;
-  Standard_Integer IndPnt, IndCrd;
+  Standard_Boolean In3d = 0;
+  Standard_Integer IndPnt = 0, IndCrd = 0;
 
   if(Dimension <= 3*myNbP3d) {
     In3d = Standard_True;
@@ -622,7 +624,7 @@ void AppDef_LinearCriteria::Gradient(const Standard_Integer Element,
   }
     
   TColStd_Array1OfReal& Knots = myCurve->Knots();
-  Standard_Real UFirst, ULast, Pnt;
+  Standard_Real UFirst = NAN, ULast = NAN, Pnt = NAN;
   UFirst = Knots(Element); ULast = Knots(Element + 1);
   Standard_Real coeff = (ULast-UFirst)/2;
 
@@ -632,9 +634,9 @@ void AppDef_LinearCriteria::Gradient(const Standard_Integer Element,
   Handle(PLib_Base) myBase = myCurve->Base();
   Standard_Integer MxDeg = myBase->WorkDegree();
 
-  Standard_Real curcoeff;
+  Standard_Real curcoeff = NAN;
   Standard_Integer degH = 2 * Order + 1;
-  Standard_Integer ipnt, k, i, ii, i0 = G.Lower(),
+  Standard_Integer ipnt = 0, k = 0, i = 0, ii = 0, i0 = G.Lower(),
                    di = myPntWeight.Lower() - myParameters->Lower();
 
   if (myE != Element) BuildCache(Element);
@@ -686,7 +688,7 @@ void AppDef_LinearCriteria::InputVector(const math_Vector& X,
 
   Handle(TColStd_HArray1OfInteger) GlobIndex;
   
-  Standard_Integer el, dim, i, i0 = X.Lower() - 1;
+  Standard_Integer el = 0, dim = 0, i = 0, i0 = X.Lower() - 1;
 
   for(el = 1; el <= NbElm; el++) {
     for(dim = 1; dim <= NbDim; dim++) {
@@ -751,9 +753,9 @@ void AppDef_LinearCriteria::SetWeight(const TColStd_Array1OfReal& Weight)
 //=======================================================================
 void AppDef_LinearCriteria::BuildCache(const Standard_Integer Element)
 {
-  Standard_Real t; 
-  Standard_Real UFirst, ULast;
-  Standard_Integer ipnt;
+  Standard_Real t = NAN
+  Standard_Real UFirst = NAN, ULast = NAN;
+  Standard_Integer ipnt = 0;
 
   UFirst = myCurve->Knots()(Element); 
   ULast =  myCurve->Knots()(Element + 1);
@@ -770,7 +772,7 @@ void AppDef_LinearCriteria::BuildCache(const Standard_Integer Element)
 
   if (IF != 0) {
     Handle(PLib_Base) myBase = myCurve->Base();
-    Standard_Integer order = myBase->WorkDegree()+1, ii; 
+    Standard_Integer order = myBase->WorkDegree()+1, ii = 0
     myCache = new TColStd_HArray1OfReal (1, (IL-IF+1)*(order));
     
     ii =1;
@@ -778,7 +780,7 @@ void AppDef_LinearCriteria::BuildCache(const Standard_Integer Element)
       Standard_Real * cache = &myCache->ChangeValue(ii);
       TColStd_Array1OfReal BasicValue(cache[0], 0, order-1);
       t = myParameters->Value(ipnt);
-      Standard_Real coeff = 2./(ULast - UFirst), c0 = -(ULast + UFirst)/2., s;
+      Standard_Real coeff = 2./(ULast - UFirst), c0 = -(ULast + UFirst)/2., s = NAN;
       s = (t + c0) * coeff;
       myBase->D0(s, BasicValue);
     }
index 7c7d2938b665758db7846bd98f452f2fad7cb3dd..7f598fb935f34c8bcaead342001093fe9658e578 100644 (file)
@@ -96,10 +96,10 @@ private:
   Handle(TColStd_HArray1OfReal) myParameters;
   Handle(TColStd_HArray1OfReal) myCache;
   Handle(FEmTool_ElementaryCriterion) myCriteria[3];
-  Standard_Real myEstimation[3];
+  Standard_Real myEstimation[3]{};
   Standard_Real myQuadraticWeight;
   Standard_Real myQualityWeight;
-  Standard_Real myPercent[3];
+  Standard_Real myPercent[3]{};
   TColStd_Array1OfReal myPntWeight;
   Handle(FEmTool_Curve) myCurve;
   Standard_Real myLength;
index b53ea7db6dabdc97e2c6f9032bba62df535153be..66c44d7128352284520885c0dda00193bf304fe0 100644 (file)
@@ -31,20 +31,20 @@ AppDef_MultiLine::AppDef_MultiLine (const Standard_Integer NbMult)
 }
 
 
-AppDef_MultiLine::AppDef_MultiLine (const AppDef_Array1OfMultiPointConstraint& tabMultiP)
+AppDef_MultiLine::AppDef_MultiLine (const AppDef_Array1OfMultiPointConstraint& tabMultiP) : tabMult(new AppDef_HArray1OfMultiPointConstraint (1, tabMultiP.Length()))
 {
-  tabMult = new AppDef_HArray1OfMultiPointConstraint (1, tabMultiP.Length());
-  Standard_Integer i, Lower = tabMultiP.Lower();
+  
+  Standard_Integer i = 0, Lower = tabMultiP.Lower();
   for (i = 1; i <= tabMultiP.Length(); i++) {
     tabMult->SetValue(i, tabMultiP.Value(Lower+i-1));
   }
 }
 
 
-AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt& tabP3d)
+AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt& tabP3d) : tabMult(new AppDef_HArray1OfMultiPointConstraint (1, tabP3d.Length()))
 {
-  tabMult = new AppDef_HArray1OfMultiPointConstraint (1, tabP3d.Length());
-  Standard_Integer i, Lower = tabP3d.Lower();
+  
+  Standard_Integer i = 0, Lower = tabP3d.Lower();
   for (i = 1; i <= tabP3d.Length(); i++) {
     AppDef_MultiPointConstraint MP(1, 0);
     MP.SetPoint(1, tabP3d(Lower+i-1));
@@ -54,10 +54,10 @@ AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt& tabP3d)
 
 
 
-AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt2d& tabP2d)
+AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt2d& tabP2d) : tabMult(new AppDef_HArray1OfMultiPointConstraint (1, tabP2d.Length()))
 {
-  tabMult = new AppDef_HArray1OfMultiPointConstraint (1, tabP2d.Length());
-  Standard_Integer i, Lower = tabP2d.Lower();
+  
+  Standard_Integer i = 0, Lower = tabP2d.Lower();
   for (i = 1; i <= tabP2d.Length(); i++) {
     AppDef_MultiPointConstraint MP(0, 1);
     MP.SetPoint2d(1, tabP2d(Lower+i-1));
index b35ba67def5f0469970b2a65cde2af554fac4bb1..5434e28b91a123bee78d031e58f5549c77c577dc 100644 (file)
@@ -77,7 +77,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
   tabTang = new TColgp_HArray1OfVec(1, tabVec.Length());
   tabTang2d = new TColgp_HArray1OfVec2d(1, tabVec2d.Length());
 
-  Standard_Integer i, Lower = tabVec.Lower();
+  Standard_Integer i = 0, Lower = tabVec.Lower();
   for (i = 1; i <= tabVec.Length(); i++) {
     tabTang->SetValue(i, tabVec.Value(Lower+i-1));
   }
@@ -116,7 +116,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
   tabTang = new TColgp_HArray1OfVec(1, tabVec.Length());
   tabTang2d = new TColgp_HArray1OfVec2d(1, tabVec2d.Length());
 
-  Standard_Integer i, Lower = tabVec.Lower();
+  Standard_Integer i = 0, Lower = tabVec.Lower();
   for (i = 1; i <= tabVec.Length(); i++) {
     tabTang->SetValue(i, tabVec.Value(Lower+i-1));
   }
@@ -139,7 +139,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint (
 
   tabTang = new TColgp_HArray1OfVec(1, tabVec.Length());
 
-  Standard_Integer i, Lower = tabVec.Lower();
+  Standard_Integer i = 0, Lower = tabVec.Lower();
   for (i = 1; i <= tabVec.Length(); i++) {
     tabTang->SetValue(i, tabVec.Value(Lower+i-1));
   }
@@ -158,7 +158,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
   }
 
   tabTang = new TColgp_HArray1OfVec(1, tabVec.Length());
-  Standard_Integer i, Lower = tabVec.Lower();
+  Standard_Integer i = 0, Lower = tabVec.Lower();
   for (i = 1; i <= tabVec.Length(); i++) {
     tabTang->SetValue(i, tabVec.Value(Lower+i-1));
   }
@@ -183,7 +183,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
   }
 
   tabTang2d = new TColgp_HArray1OfVec2d(1, tabVec2d.Length());
-  Standard_Integer i, Lower = tabVec2d.Lower();
+  Standard_Integer i = 0, Lower = tabVec2d.Lower();
   for (i = 1; i <= tabVec2d.Length(); i++) {
     tabTang2d->SetValue(i, tabVec2d.Value(Lower+i-1));
   }
@@ -204,7 +204,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
   }
   
   tabTang2d = new TColgp_HArray1OfVec2d(1, tabVec2d.Length());
-  Standard_Integer i, Lower = tabVec2d.Lower();
+  Standard_Integer i = 0, Lower = tabVec2d.Lower();
   for (i = 1; i <= tabVec2d.Length(); i++) {
     tabTang2d->SetValue(i, tabVec2d.Value(Lower+i-1));
   }
index 3bc30bc204c2aa8231332b19355024a810cb7e11..0772585b8e0946af63f0ea70000180d5d5ee3aa3 100644 (file)
@@ -73,7 +73,7 @@ void AppDef_MyLineTool::Value(const AppDef_MultiLine& ML,
                              TColgp_Array1OfPnt2d& tabPt2d)
 {
   AppDef_MultiPointConstraint MPC = ML.Value(MPointIndex);
-  Standard_Integer i, nbp2d = MPC.NbPoints2d(), low2d = tabPt2d.Lower();
+  Standard_Integer i = 0, nbp2d = MPC.NbPoints2d(), low2d = tabPt2d.Lower();
   Standard_Integer nbp3d = MPC.NbPoints(), low = tabPt.Lower();
   for (i = 1; i <= nbp3d; i++) {
     tabPt(i+low-1) = MPC.Point(i);
@@ -123,7 +123,7 @@ Standard_Boolean AppDef_MyLineTool::Tangency(const AppDef_MultiLine& ML,
 {
   AppDef_MultiPointConstraint MPC = ML.Value(MPointIndex);
   if (MPC.IsTangencyPoint()) {
-    Standard_Integer i, nbp3d = MPC.NbPoints(), low = tabV.Lower();
+    Standard_Integer i = 0, nbp3d = MPC.NbPoints(), low = tabV.Lower();
     Standard_Integer nbp2d = MPC.NbPoints2d(), low2d = tabV2d.Lower();
     for (i = 1; i <= nbp3d; i++) {
       tabV(i+low-1) = MPC.Tang(i);
@@ -204,7 +204,7 @@ Standard_Boolean AppDef_MyLineTool::Curvature(const AppDef_MultiLine& ML,
 {
   AppDef_MultiPointConstraint MPC = ML.Value(MPointIndex);
   if (MPC.IsCurvaturePoint()) {
-    Standard_Integer i, nbp3d = MPC.NbPoints(), low = tabV.Lower();
+    Standard_Integer i = 0, nbp3d = MPC.NbPoints(), low = tabV.Lower();
     Standard_Integer nbp2d = MPC.NbPoints2d(), low2d = tabV2d.Lower();
     for (i = 1; i <= nbp3d; i++) {
       tabV(i+low-1) = MPC.Curv(i);
index b4604d0e351b7d33f0ad1c56d7f89702d0f53efe..74ca2c216cfefb41bef692d601cb16267a7e5025 100644 (file)
@@ -17,6 +17,8 @@
 // Approximation d une MultiLine de points decrite par le tool MLineTool.
 // avec criteres variationnels
 
+#include <math.h>
+
 #include <AppDef_MultiLine.hxx>
 #include <AppDef_Variational.hxx>
 #include <AppParCurves_MultiBSpCurve.hxx>
@@ -145,7 +147,7 @@ myWithCutting(WithCutting)
   //
   //  Table of Points initialization
   //
-  Standard_Integer ipoint,jp2d,jp3d,index;
+  Standard_Integer ipoint = 0,jp2d = 0,jp3d = 0,index = 0;
   TColgp_Array1OfPnt TabP3d(1, Max(1,myNbP3d));
   TColgp_Array1OfPnt2d TabP2d(1, Max(1,myNbP2d));    
   gp_Pnt2d P2d;
@@ -212,8 +214,8 @@ myWithCutting(WithCutting)
 void AppDef_Variational::Init()
 {
 
-  Standard_Integer ipoint,jp2d,jp3d,index,jndex;
-  Standard_Integer CurMultyPoint;
+  Standard_Integer ipoint = 0,jp2d = 0,jp3d = 0,index = 0,jndex = 0;
+  Standard_Integer CurMultyPoint = 0;
   TColgp_Array1OfVec TabV3d(1, Max(1,myNbP3d));
   TColgp_Array1OfVec2d TabV2d(1, Max(1,myNbP2d));
   TColgp_Array1OfVec TabV3dcurv(1, Max(1,myNbP3d));
@@ -233,7 +235,7 @@ void AppDef_Variational::Init()
 
   //
   // Table of types initialization
-  Standard_Integer iconstr;
+  Standard_Integer iconstr = 0;
   index=1;
   jndex=1;
   CurMultyPoint = 1;
@@ -412,7 +414,7 @@ void AppDef_Variational::Init()
     CurMultyPoint += myNbP3d * 6 + myNbP2d * 2;
   }
   // OverConstraint Detection
-  Standard_Integer MaxSeg;
+  Standard_Integer MaxSeg = 0;
   if(myWithCutting == Standard_True) MaxSeg = myMaxSegment ;
   else MaxSeg = 1;
   if (((myMaxDegree-myNivCont)*MaxSeg-myNbPassPoints-2*myNbTangPoints-3*myNbCurvPoints) < 0 )
@@ -439,7 +441,7 @@ void AppDef_Variational::Approximate()
   if (myIsCreated == Standard_False )  throw StdFail_NotDone();
 
 
-  Standard_Real WQuadratic, WQuality;
+  Standard_Real WQuadratic = NAN, WQuality = NAN;
 
   TColStd_Array1OfReal Ecarts(myFirstPoint, myLastPoint); 
 
@@ -459,7 +461,7 @@ void AppDef_Variational::Approximate()
 
   //---------------------------------------------------------------------
 
-  Standard_Integer jp2d,jp3d,index,ipole
+  Standard_Integer jp2d = 0,jp3d = 0,index = 0,ipole = 0
     NbElem = TheCurve->NbElements();
 
   TColgp_Array1OfPnt TabP3d(1, Max(1,myNbP3d));
@@ -490,7 +492,7 @@ void AppDef_Variational::Approximate()
 
     TheCurve->GetPolynom(CoeffPtr->ChangeArray1());
 
-    Standard_Integer ii;
+    Standard_Integer ii = 0;
 
     for(ii = 1; ii <= NbElem; ii++)  
       NbCoeffPtr->SetValue(ii, TheCurve->Degree(ii)+1);
@@ -699,7 +701,7 @@ void AppDef_Variational::Distance(math_Matrix& mat)
 
 {
   if (myIsDone == Standard_False)  throw StdFail_NotDone();
-  Standard_Integer ipoint,jp2d,jp3d,index;
+  Standard_Integer ipoint = 0,jp2d = 0,jp3d = 0,index = 0;
   TColgp_Array1OfPnt TabP3d(1,Max(1,myNbP3d));
   TColgp_Array1OfPnt2d TabP2d(1, Max(1,myNbP2d));
   Standard_Integer j0 = mat.LowerCol() - myFirstPoint;
@@ -1150,22 +1152,22 @@ void AppDef_Variational::TheMotor(
 
   Handle(TColStd_HArray1OfReal) CurrentTi, NewTi, OldTi;  
   Handle(TColStd_HArray2OfInteger) Dependence;
-  Standard_Boolean lestim, lconst, ToOptim, iscut;
+  Standard_Boolean lestim = 0, lconst = 0, ToOptim = 0, iscut = 0;
   Standard_Boolean isnear = Standard_False, again = Standard_True; 
-  Standard_Integer NbEst, ICDANA, NumPnt, Iter;
+  Standard_Integer NbEst = 0, ICDANA = 0, NumPnt = 0, Iter = 0;
   Standard_Integer MaxNbEst =5; 
   Standard_Real VOCRI[3] = {BigValue, BigValue, BigValue}, EROLD = BigValue,
-    VALCRI[3], ERRMAX = BigValue, ERRMOY, ERRQUA;
-  Standard_Real CBLONG, LNOLD;
+    VALCRI[3], ERRMAX = BigValue, ERRMOY = NAN, ERRQUA = NAN;
+  Standard_Real CBLONG = NAN, LNOLD = NAN;
   Standard_Integer NbrPnt = myLastPoint - myFirstPoint + 1;
   Standard_Integer NbrConstraint = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
   Handle(FEmTool_Curve) CCurrent, COld, CNew;
   Standard_Real EpsLength = SmallValue;
-  Standard_Real EpsDeg; 
+  Standard_Real EpsDeg = NAN
 
-  Standard_Real e1, e2, e3;
-  Standard_Real J1min, J2min, J3min;
-  Standard_Integer iprog;
+  Standard_Real e1 = NAN, e2 = NAN, e3 = NAN;
+  Standard_Real J1min = NAN, J2min = NAN, J3min = NAN;
+  Standard_Integer iprog = 0;
 
   // (0) Init
 
@@ -1368,7 +1370,7 @@ void AppDef_Variational::TheMotor(
         if ( (ERRMAX > WQuality) && (ERRMAX > 2*EROLD)) iregre++;
         if ( (EROLD  > WQuality) && (ERRMAX <= 0.5*EROLD)) iregre--;
       }
-      Standard_Real E1, E2, E3;
+      Standard_Real E1 = NAN, E2 = NAN, E3 = NAN;
       J->GetEstimation(E1, E2, E3);
       if ( (VALCRI[0] > E1) && (VALCRI[0] > 1.1*VOCRI[0])) iregre++;
       if ( (VALCRI[1] > E2) && (VALCRI[1] > 1.1*VOCRI[1])) iregre++;
@@ -1413,7 +1415,7 @@ void AppDef_Variational::TheMotor(
 
       if ((CurrentTi->Value(1)!= 0.) || 
         (CurrentTi->Value(NbrPnt)!= 1.)) {
-          Standard_Real t, DelatT = 
+          Standard_Real t = NAN, DelatT = 
             1.0 /(CurrentTi->Value(NbrPnt)-CurrentTi->Value(1));
           for (Standard_Integer ii=2; ii<NbrPnt; ii++) {
             t = (CurrentTi->Value(ii)-CurrentTi->Value(1))*DelatT;
@@ -1489,7 +1491,7 @@ void AppDef_Variational::Optimization(Handle(AppDef_SmoothCriterion)& J,
   math_Matrix H(0, MxDeg, 0, MxDeg);
   math_Vector G(0, MxDeg), Sol(1, A.NbGlobVar());
 
-  Standard_Integer el, dim;
+  Standard_Integer el = 0, dim = 0;
 
   A.GetAssemblyTable(AssTable);
   Standard_Integer NbConstr = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
@@ -1532,8 +1534,8 @@ void AppDef_Variational::Optimization(Handle(AppDef_SmoothCriterion)& J,
 
   // Updating Curve and reduction of degree
 
-  Standard_Integer Newdeg;
-  Standard_Real MaxError;
+  Standard_Integer Newdeg = 0;
+  Standard_Real MaxError = NAN;
 
   if(NbConstr == 0) {
     for(el = 1; el <= NbElm; el++) {
@@ -1543,7 +1545,7 @@ void AppDef_Variational::Optimization(Handle(AppDef_SmoothCriterion)& J,
   else {
 
     TColStd_Array1OfReal& TabInt = Curve->Knots();
-    Standard_Integer Icnt = 1, p0 = Parameters.Lower() - myFirstPoint, point;
+    Standard_Integer Icnt = 1, p0 = Parameters.Lower() - myFirstPoint, point = 0;
     for(el = 1; el <= NbElm; el++) {     
       while((Icnt < NbConstr) && 
         (Parameters(p0 + myTypConstraints->Value(2 * Icnt - 1)) <= TabInt(el))) Icnt++;
@@ -1573,11 +1575,11 @@ void AppDef_Variational::Project(const Handle(FEmTool_Curve)& C,
 
   MaxErr = QuaErr = AveErr = 0.;
 
-  Standard_Integer Ipnt, NItCv, Iter, i, i0 = -myDimension, d0 = Distance.Lower() - 1;
+  Standard_Integer Ipnt = 0, NItCv = 0, Iter = 0, i = 0, i0 = -myDimension, d0 = Distance.Lower() - 1;
 
-  Standard_Real TNew, Dist, T0, Dist0, F1, F2, Aux, DF, Ecart;
+  Standard_Real TNew = NAN, Dist = NAN, T0 = NAN, Dist0 = NAN, F1 = NAN, F2 = NAN, Aux = NAN, DF = NAN, Ecart = NAN;
 
-  Standard_Boolean EnCour;
+  Standard_Boolean EnCour = 0;
 
   TColStd_Array1OfReal ValOfC(1, myDimension), FirstDerOfC(1, myDimension), 
     SecndDerOfC(1, myDimension);
@@ -1684,8 +1686,8 @@ void AppDef_Variational::ACR(Handle(FEmTool_Curve)& Curve,
   Standard_Integer NbrPnt = Ti.Length(), TiFirst = Ti.Lower(), TiLast = Ti.Upper(),
     KFirst = Knots.Lower(), KLast = Knots.Upper();
 
-  Standard_Real CbLong, DeltaT, VTest, UNew, UOld, DU, TPara, TOld, DTInv, Ratio;
-  Standard_Integer ipnt, ii, IElm, IOld, POld, PCnt, ICnt=0;
+  Standard_Real CbLong = NAN, DeltaT = NAN, VTest = NAN, UNew = NAN, UOld = NAN, DU = NAN, TPara = NAN, TOld = NAN, DTInv = NAN, Ratio = NAN;
+  Standard_Integer ipnt = 0, ii = 0, IElm = 0, IOld = 0, POld = 0, PCnt = 0, ICnt=0;
   Standard_Integer NbCntr = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
 
   //     (1) Calcul de la longueur de courbe
@@ -1806,7 +1808,7 @@ static Standard_Integer NearIndex(const Standard_Real T,
   if(T < TabPar(Loi)) { Flag = -1; return Loi;}
   if(T > TabPar(Upi)) { Flag =  1; return Upi;}
 
-  Standard_Integer Ibeg = Loi, Ifin = Upi, Imidl;
+  Standard_Integer Ibeg = Loi, Ifin = Upi, Imidl = 0;
 
   while(Ibeg + 1 != Ifin) {
     Imidl = (Ibeg + Ifin) / 2;
@@ -1840,9 +1842,9 @@ static void GettingKnots(const TColStd_Array1OfReal& TabPar,
 
   TColStd_Array1OfReal& OldKnots = InCurve->Knots();
   Standard_Integer NbMaxOld = InCurve->NbElements(); 
-  Standard_Integer NbMax = NewKnots.Upper(), Ipt, Ipt1, Ipt2
-  Standard_Integer el = 0, i1 = OldKnots.Lower(), i0 = i1 - 1, Flag;
-  Standard_Real TPar;
+  Standard_Integer NbMax = NewKnots.Upper(), Ipt = 0, Ipt1 = 0, Ipt2 = 0
+  Standard_Integer el = 0, i1 = OldKnots.Lower(), i0 = i1 - 1, Flag = 0;
+  Standard_Real TPar = NAN;
 
   while((NbElm < NbMax) && (el < NbMaxOld)) {
 
@@ -1904,7 +1906,7 @@ void AppDef_Variational::SplitCurve(const Handle(FEmTool_Curve)& InCurve,
     TColStd_Array1OfReal& OutKnots = OutCurve->Knots();
     TColStd_Array1OfReal& InKnots = InCurve->Knots();
 
-    Standard_Integer i, i0 = OutKnots.Lower();
+    Standard_Integer i = 0, i0 = OutKnots.Lower();
     for(i = InKnots.Lower(); i <= InKnots.Upper(); i++) OutKnots(i) = InKnots(i);
     for(i = NbElmOld + 1; i <= NbElm; i++) OutKnots(i + i0) = NewKnots(i);
 
@@ -1927,13 +1929,13 @@ void AppDef_Variational::InitSmoothCriterion()
 
 
 
-  Standard_Real Length;
+  Standard_Real Length = NAN;
 
   InitParameters(Length);
 
   mySmoothCriterion->SetParameters(myParameters);
 
-  Standard_Real E1, E2, E3;
+  Standard_Real E1 = NAN, E2 = NAN, E3 = NAN;
 
   InitCriterionEstimations(Length, E1,  E2,  E3);
   /*
@@ -1946,7 +1948,7 @@ void AppDef_Variational::InitSmoothCriterion()
   mySmoothCriterion->EstLength() = Length;
   mySmoothCriterion->SetEstimation(E1, E2, E3);
 
-  Standard_Real WQuadratic, WQuality;
+  Standard_Real WQuadratic = NAN, WQuality = NAN;
 
   if(!myWithMinMax && myTolerance != 0.) 
     WQuality = myTolerance;
@@ -1968,7 +1970,7 @@ void AppDef_Variational::InitSmoothCriterion()
 
   Handle(PLib_Base) TheBase = new PLib_HermitJacobi(myMaxDegree, myContinuity);
   Handle(FEmTool_Curve) TheCurve;
-  Standard_Integer NbElem;
+  Standard_Integer NbElem = 0;
   Standard_Real CurvTol = Eps2 * Length / myNbPoints;
 
   // Decoupe de l'intervalle en fonction des contraintes
@@ -2006,8 +2008,8 @@ void AppDef_Variational::InitParameters(Standard_Real& Length)
 
   const Standard_Real Eps1 = Precision::Confusion() * .01;
 
-  Standard_Real aux, dist;
-  Standard_Integer i, i0, i1 = 0, ipoint;
+  Standard_Real aux = NAN, dist = NAN;
+  Standard_Integer i = 0, i0 = 0, i1 = 0, ipoint = 0;
 
 
   Length = 0.;  
@@ -2136,7 +2138,7 @@ void AppDef_Variational::InitCriterionEstimations(const Standard_Real Length,
   Delta = .5 * (myParameters->Value(myLastPoint) - myParameters->Value(myLastPoint - 1));
   if(Delta <= Eps1) Delta = 1.;
 
-  Standard_Real aux;
+  Standard_Real aux = NAN;
 
   if(CurrPoint == 1) {
 
@@ -2179,7 +2181,7 @@ void AppDef_Variational::EstTangent(const Standard_Integer ipnt,
                                     math_Vector& VTang) const
 
 {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   const Standard_Real Eps1 = Precision::Confusion() * .01;
   const Standard_Real EpsNorm = 1.e-9;
 
@@ -2207,7 +2209,7 @@ void AppDef_Variational::EstTangent(const Standard_Integer ipnt,
       Standard_Real V2 = 0.;
       if(V1 > Eps1) V2 = Pnt3.Subtracted(Pnt2).Norm();
       if(V2 > Eps1) {
-        Standard_Real d = V1 / (V1 + V2), d1;
+        Standard_Real d = V1 / (V1 + V2), d1 = NAN;
         d1 = 1. / (d * (1 - d)); d *= d;
         VTang = ((d - 1.) * Pnt1 + Pnt2 - d * Pnt3) * d1;
       }
@@ -2240,7 +2242,7 @@ void AppDef_Variational::EstTangent(const Standard_Integer ipnt,
       Standard_Real V2 = 0.;
       if(V1 > Eps1) V2 = Pnt3.Subtracted(Pnt2).Norm();
       if(V2 > Eps1) {
-        Standard_Real d = V1 / (V1 + V2), d1;
+        Standard_Real d = V1 / (V1 + V2), d1 = NAN;
         d1 = 1. / (d * (1 - d)); d *= d - 2;
         VTang = ((d + 1.) * Pnt1 - Pnt2 - d * Pnt3) * d1;
       }
@@ -2332,13 +2334,13 @@ void AppDef_Variational::EstSecnd(const Standard_Integer ipnt,
                                   const Standard_Real Length, 
                                   math_Vector& VScnd) const
 {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
 
   const Standard_Real Eps = 1.e-9;
 
   Standard_Real Wpnt = 1.;
 
-  Standard_Real aux;
+  Standard_Real aux = NAN;
 
   if(ipnt == myFirstPoint)
     aux = myParameters->Value(ipnt + 1) - myParameters->Value(ipnt);
@@ -2411,7 +2413,7 @@ void AppDef_Variational::InitCutting(const Handle(PLib_Base)& aBase,
 {
 
   // Definition of number of elements
-  Standard_Integer ORCMx = -1, NCont = 0, i, kk, NbElem;
+  Standard_Integer ORCMx = -1, NCont = 0, i = 0, kk = 0, NbElem = 0;
   Standard_Integer NbConstr = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
 
   for(i = 1; i <= NbConstr; i++) {
@@ -2534,15 +2536,15 @@ void AppDef_Variational::Adjusting(
 
 
   /* Local variables */
-  Standard_Integer iter, ipnt;
-  Standard_Real ecart, emold, erold, tpara;
-  Standard_Real vocri[4], j1cibl, vtest, vseuil;
-  Standard_Integer i, numint, flag;
+  Standard_Integer iter = 0, ipnt = 0;
+  Standard_Real ecart = NAN, emold = NAN, erold = NAN, tpara = NAN;
+  Standard_Real vocri[4], j1cibl = NAN, vtest = NAN, vseuil = NAN;
+  Standard_Integer i = 0, numint = 0, flag = 0;
   TColStd_Array1OfReal tbpoid(myFirstPoint, myLastPoint);
-  Standard_Boolean loptim, lrejet;
+  Standard_Boolean loptim = 0, lrejet = 0;
   Handle(AppDef_SmoothCriterion) JNew;
   Handle(FEmTool_Curve) CNew;
-  Standard_Real E1, E2, E3;
+  Standard_Real E1 = NAN, E2 = NAN, E3 = NAN;
 
 
   /* (0.b) Initialisations */
@@ -2694,12 +2696,12 @@ void AppDef_Variational::AssemblingConstraints(const Handle(FEmTool_Curve)& Curv
     V1((Standard_Real*)&G1(0), 0, MxDeg), 
     V2((Standard_Real*)&G2(0), 0, MxDeg);
 
-  Standard_Integer IndexOfConstraint, Ng3d, Ng2d, NBeg2d, NPass, NgPC1
-    NTang3d, NTang2d,  
-    Point, TypOfConstr
+  Standard_Integer IndexOfConstraint = 0, Ng3d = 0, Ng2d = 0, NBeg2d = 0, NPass = 0, NgPC1 = 0
+    NTang3d = 0, NTang2d = 0,  
+    Point = 0, TypOfConstr = 0
     p0 = Parameters.Lower() - myFirstPoint,
-    curel = 1, el, i, ipnt, ityp, j, k, pnt, curdim,
-    jt, Ntheta = 6 * myNbP3d + 2 * myNbP2d;
+    curel = 1, el = 0, i = 0, ipnt = 0, ityp = 0, j = 0, k = 0, pnt = 0, curdim = 0,
+    jt = 0, Ntheta = 6 * myNbP3d + 2 * myNbP2d;
   Standard_Integer NbConstr = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
 
   //  Ng3d = 3 * NbConstr + 2 * myNbTangPoints + 5 * myNbCurvPoints;
@@ -2715,13 +2717,13 @@ void AppDef_Variational::AssemblingConstraints(const Handle(FEmTool_Curve)& Curv
 
   TColStd_Array1OfReal& Intervals = Curve->Knots();
 
-  Standard_Real t, R1, R2;
+  Standard_Real t = NAN, R1 = NAN, R2 = NAN;
 
   Handle(PLib_Base) myBase = Curve->Base();
   Handle(PLib_HermitJacobi) myHermitJacobi = Handle(PLib_HermitJacobi)::DownCast (myBase);
   Standard_Integer Order = myHermitJacobi->NivConstr() + 1;
 
-  Standard_Real UFirst, ULast, coeff, c0, mfact, mfact1;
+  Standard_Real UFirst = NAN, ULast = NAN, coeff = NAN, c0 = NAN, mfact = NAN, mfact1 = NAN;
 
   A.NullifyConstraint();
 
@@ -2960,7 +2962,7 @@ Standard_Boolean AppDef_Variational::InitTthetaF(const Standard_Integer ndimen,
   gp_Vec T, V;
   gp_Vec theta1, theta2;
   gp_Vec F;
-  Standard_Real XX, XY, YY, XZ, YZ, ZZ;
+  Standard_Real XX = NAN, XY = NAN, YY = NAN, XZ = NAN, YZ = NAN, ZZ = NAN;
 
   if ((typcon == AppParCurves_TangencyPoint)||(typcon == AppParCurves_CurvaturePoint))
   {
index 3e2c7465de8a3b6f164549902066cde4e4e6e60c..60b6b9952cfab4d6b56289949864a04fabad3102 100644 (file)
@@ -254,11 +254,11 @@ private:
   Standard_Integer myNbPoints;
   Handle(TColStd_HArray1OfReal) myTabPoints;
   Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
-  Standard_Integer myNbConstraints;
+  Standard_Integer myNbConstraints{};
   Handle(TColStd_HArray1OfReal) myTabConstraints;
-  Standard_Integer myNbPassPoints;
-  Standard_Integer myNbTangPoints;
-  Standard_Integer myNbCurvPoints;
+  Standard_Integer myNbPassPoints{};
+  Standard_Integer myNbTangPoints{};
+  Standard_Integer myNbCurvPoints{};
   Handle(TColStd_HArray1OfInteger) myTypConstraints;
   Handle(TColStd_HArray1OfReal) myTtheta;
   Handle(TColStd_HArray1OfReal) myTfthet;
@@ -270,15 +270,15 @@ private:
   Standard_Integer myNivCont;
   Standard_Boolean myWithMinMax;
   Standard_Boolean myWithCutting;
-  Standard_Real myPercent[3];
-  Standard_Real myCriterium[4];
+  Standard_Real myPercent[3]{};
+  Standard_Real myCriterium[4]{};
   Handle(AppDef_SmoothCriterion) mySmoothCriterion;
   Handle(TColStd_HArray1OfReal) myParameters;
   Handle(TColStd_HArray1OfReal) myKnots;
   AppParCurves_MultiBSpCurve myMBSpCurve;
-  Standard_Real myMaxError;
-  Standard_Integer myMaxErrorIndex;
-  Standard_Real myAverageError;
+  Standard_Real myMaxError{};
+  Standard_Integer myMaxErrorIndex{};
+  Standard_Real myAverageError{};
   Standard_Boolean myIsCreated;
   Standard_Boolean myIsDone;
   Standard_Boolean myIsOverConstr;
index 94c9c18dd1f0fe300f8163b9b6e5436f598f5040..0a62be251dc2fc67cfe34ec41aa0dcc2de4aff16 100644 (file)
@@ -16,6 +16,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <AppParCurves.hxx>
 #include <BSplCLib.hxx>
 #include <math_Matrix.hxx>
@@ -25,8 +27,8 @@ void AppParCurves::BernsteinMatrix(const Standard_Integer NbPoles,
                                   const math_Vector& U,
                                   math_Matrix& A) {
 
-  Standard_Integer i, j, id;
-  Standard_Real u0, u1, y0, y1, xs;
+  Standard_Integer i = 0, j = 0, id = 0;
+  Standard_Real u0 = NAN, u1 = NAN, y0 = NAN, y1 = NAN, xs = NAN;
   Standard_Integer first = U.Lower(), last = U.Upper();
   math_Vector B(1, NbPoles-1);
 
@@ -62,8 +64,8 @@ void AppParCurves::Bernstein(const Standard_Integer NbPoles,
                             math_Matrix& A,
                             math_Matrix& DA) {
   
-  Standard_Integer i, j, id, Ndeg = NbPoles-1;
-  Standard_Real u0, u1, y0, y1, xs, bj, bj1;
+  Standard_Integer i = 0, j = 0, id = 0, Ndeg = NbPoles-1;
+  Standard_Real u0 = NAN, u1 = NAN, y0 = NAN, y1 = NAN, xs = NAN, bj = NAN, bj1 = NAN;
   Standard_Integer first = U.Lower(), last = U.Upper();
   math_Vector B(1, NbPoles-1);
 
@@ -101,9 +103,9 @@ void AppParCurves::Bernstein(const Standard_Integer NbPoles,
 void AppParCurves::SecondDerivativeBernstein(const Standard_Real U,
                                             math_Vector&        DDA) {
 //  Standard_Real U1 = 1-U, Y0, Y1, Xs;
-  Standard_Real Y0, Y1, Xs;
+  Standard_Real Y0 = NAN, Y1 = NAN, Xs = NAN;
   Standard_Integer NbPoles = DDA.Length();
-  Standard_Integer id, j, N4, deg = NbPoles-1;
+  Standard_Integer id = 0, j = 0, N4 = 0, deg = NbPoles-1;
   N4 = deg*(deg-1);
   math_Vector B(1, deg-1);
   B(1) = 1.;
@@ -155,13 +157,13 @@ void AppParCurves::SplineFunction(const Standard_Integer nbpoles,
                                  math_IntegerVector&    index)
 {
 //  Standard_Real U, NewU, co, diff, t1, t2;
-  Standard_Real U, NewU;
+  Standard_Real U = NAN, NewU = NAN;
 //  gp_Pnt2d Pt, P0;
 //  gp_Vec2d V1;
 //  Standard_Integer i, j, k, iter, in, ik, deg1 = deg+1;
-  Standard_Integer i, j, deg1 = deg+1;
+  Standard_Integer i = 0, j = 0, deg1 = deg+1;
 //  Standard_Integer oldkindex, kindex, theindex, ttindex;
-  Standard_Integer oldkindex, kindex, theindex;
+  Standard_Integer oldkindex = 0, kindex = 0, theindex = 0;
   math_Vector locpoles(1 , deg1);
   math_Vector locdpoles(1 , deg1);
   Standard_Integer firstp = Parameters.Lower(), lastp = Parameters.Upper();
@@ -174,8 +176,8 @@ void AppParCurves::SplineFunction(const Standard_Integer nbpoles,
 
   oldkindex = 1;
   
-  Standard_Integer pp, qq;
-  Standard_Real Saved, Inverse, LocalInverse, locqq, locdqq, val;
+  Standard_Integer pp = 0, qq = 0;
+  Standard_Real Saved = NAN, Inverse = NAN, LocalInverse = NAN, locqq = NAN, locdqq = NAN, val = NAN;
 
   for (i = firstp; i <= lastp; i++) {
     U = Parameters(i);
index 27ff6969b628525cabfe7e60ddeca609beb86488..1f35992f24e58fdd7145e2124ba9a628f62cf06e 100644 (file)
@@ -25,10 +25,10 @@ AppParCurves_ConstraintCouple::
 
 AppParCurves_ConstraintCouple::
   AppParCurves_ConstraintCouple(const Standard_Integer TheIndex,
-                               const AppParCurves_Constraint Cons)
+                               const AppParCurves_Constraint Cons) : myIndex(TheIndex), myConstraint(Cons)
 {
-  myIndex = TheIndex;
-  myConstraint = Cons;
+  
+  
 }
 
 
index ed0a35993a6381bcb88eedb1c06c13714adccf4f..c4b082bee8d118e79c4b58807be9c40cd19ba0d4 100644 (file)
@@ -32,7 +32,7 @@
 static Standard_Integer ComputeDegree(const TColStd_Array1OfInteger& mults,
                                      const Standard_Integer nbPoles)
 {
-  Standard_Integer i, sum = 0;
+  Standard_Integer i = 0, sum = 0;
   for (i = mults.Lower(); i <= mults.Upper(); i++) {
     sum += mults(i);
   }
@@ -73,13 +73,13 @@ AppParCurves_MultiBSpCurve::AppParCurves_MultiBSpCurve
   (const AppParCurves_Array1OfMultiPoint& tabMU,
    const TColStd_Array1OfReal& Knots,
    const TColStd_Array1OfInteger& Mults):
-  AppParCurves_MultiCurve(tabMU)
+  AppParCurves_MultiCurve(tabMU), myknots(new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper())), mymults(new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper())), myDegree(ComputeDegree(Mults,NbPoles()))
 {
-  myknots = new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper());
+  
   myknots->ChangeArray1() = Knots;
-  mymults = new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper());
+  
   mymults->ChangeArray1() = Mults;
-  myDegree = ComputeDegree(Mults,NbPoles());
+  
 }
 
 
@@ -92,13 +92,13 @@ AppParCurves_MultiBSpCurve::AppParCurves_MultiBSpCurve
   (const AppParCurves_MultiCurve& SC,
    const TColStd_Array1OfReal& Knots,
    const TColStd_Array1OfInteger& Mults):
-  AppParCurves_MultiCurve(SC)
+  AppParCurves_MultiCurve(SC), myknots(new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper())), mymults(new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper())), myDegree(ComputeDegree(Mults,NbPoles()))
 {
-  myknots = new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper());
+  
   myknots->ChangeArray1() = Knots;
-  mymults = new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper());
+  
   mymults->ChangeArray1() = Mults;
-  myDegree = ComputeDegree(Mults,NbPoles());
+  
 }
 
 
index e9fd50925293159ccff026f096c3ded9bf86dc17..c2e5f7da6edbde56575cb6081b1bbdebcec7dc87 100644 (file)
 AppParCurves_MultiCurve::AppParCurves_MultiCurve() {}
 
 
-AppParCurves_MultiCurve::AppParCurves_MultiCurve (const Standard_Integer NbPol) 
+AppParCurves_MultiCurve::AppParCurves_MultiCurve (const Standard_Integer NbPol) : tabPoint(new AppParCurves_HArray1OfMultiPoint(1, NbPol)) 
 {
-  tabPoint = new AppParCurves_HArray1OfMultiPoint(1, NbPol);
+  
 }
 
 
 
-AppParCurves_MultiCurve::AppParCurves_MultiCurve (const AppParCurves_Array1OfMultiPoint& tabMU)
+AppParCurves_MultiCurve::AppParCurves_MultiCurve (const AppParCurves_Array1OfMultiPoint& tabMU) : tabPoint(new AppParCurves_HArray1OfMultiPoint(1, tabMU.Length()))
 {
-  tabPoint = new AppParCurves_HArray1OfMultiPoint(1, tabMU.Length());
-  Standard_Integer i, Lower = tabMU.Lower();
+  
+  Standard_Integer i = 0, Lower = tabMU.Lower();
   for (i = 1; i <= tabMU.Length(); i++) {
     tabPoint->SetValue(i, tabMU.Value(Lower+i-1));
   }
index faf2c490d8d3efba312033cc1fd7bfeea5684ff3..28b0a773553e3a4e5b248b507550c8dc78e55a48 100644 (file)
@@ -32,10 +32,10 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint()
 
 
 AppParCurves_MultiPoint::AppParCurves_MultiPoint (const Standard_Integer NbPoles, 
-                                                 const Standard_Integer NbPoles2d)
+                                                 const Standard_Integer NbPoles2d) : nbP(NbPoles), nbP2d(NbPoles2d)
 {
-  nbP = NbPoles;
-  nbP2d = NbPoles2d;
+  
+  
   if (nbP != 0)  {
     Handle(TColgp_HArray1OfPnt) tab3d = 
       new TColgp_HArray1OfPnt(1, NbPoles);
@@ -50,10 +50,10 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint (const Standard_Integer NbPoles
 
 
 
-AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP)
+AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP) : nbP2d(0), nbP(tabP.Length())
 {
-  nbP2d = 0;
-  nbP = tabP.Length();
+  
+  
   Handle(TColgp_HArray1OfPnt) tab3d = 
     new TColgp_HArray1OfPnt(1, nbP);
   ttabPoint = tab3d;
@@ -66,10 +66,10 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP)
 
 
 
-AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt2d& tabP2d)
+AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt2d& tabP2d) : nbP(0), nbP2d(tabP2d.Length())
 {
-  nbP = 0;
-  nbP2d = tabP2d.Length();
+  
+  
   Handle(TColgp_HArray1OfPnt2d) tab2d = 
     new TColgp_HArray1OfPnt2d(1, nbP2d);
   ttabPoint2d = tab2d;
@@ -82,10 +82,10 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt2d& tab
 
 
 AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt&   tabP,
-                                                const TColgp_Array1OfPnt2d& tabP2d)
+                                                const TColgp_Array1OfPnt2d& tabP2d) : nbP(tabP.Length()), nbP2d(tabP2d.Length())
 {
-  nbP = tabP.Length();
-  nbP2d = tabP2d.Length();
+  
+  
   Handle(TColgp_HArray1OfPnt) t3d = 
     new TColgp_HArray1OfPnt(1, nbP);
   ttabPoint = t3d;
@@ -95,7 +95,7 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt&   tab
   ttabPoint2d = t2d;
 
   TColgp_Array1OfPnt& P3d = tabPoint->ChangeArray1();
-  Standard_Integer i, Lower = tabP.Lower();
+  Standard_Integer i = 0, Lower = tabP.Lower();
   for (i = 1; i <= nbP; i++) {
     P3d.SetValue(i, tabP.Value(Lower+i-1));
   }
index be3c9def4cacb05ec0d6136c6bbf318f2359d95e..f0aa89b19a20398a17ab7c71e34cfd27acc58bf8 100644 (file)
@@ -34,16 +34,16 @@ class Approx_Curve2d_Eval : public AdvApprox_EvaluatorFunction
                        Standard_Real First, Standard_Real Last)
     : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Adaptor2d_Curve2d) fonct;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void Approx_Curve2d_Eval::Evaluate (Standard_Integer *Dimension,
@@ -96,7 +96,7 @@ void Approx_Curve2d_Eval::Evaluate (Standard_Integer *Dimension,
   }
 }
 
- Approx_Curve2d::Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D,const Standard_Real First,const Standard_Real Last,const Standard_Real TolU,const Standard_Real TolV,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments)
+ Approx_Curve2d::Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D,const Standard_Real First,const Standard_Real Last,const Standard_Real TolU,const Standard_Real TolV,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments) : myMaxError2dU(0), myMaxError2dV(0)
 {
   C2D->Trim(First,Last,Precision::PConfusion());
 
@@ -115,8 +115,8 @@ void Approx_Curve2d_Eval::Evaluate (Standard_Integer *Dimension,
 
   AdvApprox_PrefAndRec CutTool(CutPnts_C2,CutPnts_C3);
 
-  myMaxError2dU = 0;
-  myMaxError2dV = 0;
+  
+  
 
   Approx_Curve2d_Eval ev (C2D, First, Last);
   AdvApprox_ApproxAFunction aApprox (Num1DSS, Num2DSS, Num3DSS, 
index ccbab07868e2c477c3d5750768e748de06f3ae79..d67e4780a4ba03403604b7cee6fc1aabd896293c 100644 (file)
@@ -38,16 +38,16 @@ class Approx_Curve3d_Eval : public AdvApprox_EvaluatorFunction
                        Standard_Real First, Standard_Real Last)
     : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Adaptor3d_Curve) fonct;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void Approx_Curve3d_Eval::Evaluate (Standard_Integer *Dimension,
@@ -105,7 +105,7 @@ Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve,
                                                 const Standard_Real Tol3d,
                                                 const GeomAbs_Shape Order,
                                                 const Standard_Integer MaxSegments,
-                                                const Standard_Integer MaxDegree)
+                                                const Standard_Integer MaxDegree) : myMaxError(0)
 {
   // Initialisation of input parameters of AdvApprox
 
@@ -127,7 +127,7 @@ Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve,
  
   AdvApprox_PrefAndRec CutTool(CutPnts_C2,CutPnts_C3);
 
-  myMaxError = 0;
+  
 
   Approx_Curve3d_Eval ev (Curve, First, Last);
   AdvApprox_ApproxAFunction aApprox (Num1DSS, Num2DSS, Num3DSS, 
index 1899d0eb82f90d8d8c06374f2e7364186cd33bc1..f7affbeeefeee29ca430caff168e5cfb1af7b9d0 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Approx_CurveOnSurface.hxx>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -55,17 +57,17 @@ class Approx_CurveOnSurface_Eval : public AdvApprox_EvaluatorFunction
     : fonct(theFunc), fonct2d(theFunc2d) 
       { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Adaptor3d_Curve) fonct;
   Handle(Adaptor2d_Curve2d) fonct2d;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void Approx_CurveOnSurface_Eval::Evaluate (Standard_Integer *Dimension,
@@ -154,16 +156,16 @@ class Approx_CurveOnSurface_Eval3d : public AdvApprox_EvaluatorFunction
                                 Standard_Real First, Standard_Real Last)
     : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Adaptor3d_Curve) fonct;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void Approx_CurveOnSurface_Eval3d::Evaluate (Standard_Integer *Dimension,
@@ -235,16 +237,16 @@ class Approx_CurveOnSurface_Eval2d : public AdvApprox_EvaluatorFunction
                                 Standard_Real First, Standard_Real Last)
     : fonct2d(theFunc2d) { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Adaptor2d_Curve2d) fonct2d;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void Approx_CurveOnSurface_Eval2d::Evaluate (Standard_Integer *Dimension,
@@ -381,8 +383,8 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
 
   Handle( Adaptor2d_Curve2d ) TrimmedC2D = myC2D->Trim( myFirst, myLast, Precision::PConfusion() );
 
-  Standard_Boolean isU, isForward;
-  Standard_Real aParam;
+  Standard_Boolean isU = 0, isForward = 0;
+  Standard_Real aParam = NAN;
   if (theOnly3d && isIsoLine(TrimmedC2D, isU, aParam, isForward))
   {
     if (buildC3dOnIsoLine(TrimmedC2D, isU, aParam, isForward))
@@ -404,7 +406,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
   Approx_CurveOnSurface_Eval3d Eval3dCvOnSurf (HCOnS,             myFirst, myLast);
   Approx_CurveOnSurface_Eval2d Eval2dCvOnSurf (       TrimmedC2D, myFirst, myLast);
   Approx_CurveOnSurface_Eval   EvalCvOnSurf   (HCOnS, TrimmedC2D, myFirst, myLast);
-  AdvApprox_EvaluatorFunction* EvalPtr;
+  AdvApprox_EvaluatorFunction* EvalPtr = nullptr;
   if ( theOnly3d ) EvalPtr = &Eval3dCvOnSurf;
   else if ( theOnly2d ) EvalPtr = &Eval2dCvOnSurf;
   else EvalPtr = &EvalCvOnSurf;
@@ -414,7 +416,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
     Num1DSS = 2;
     OneDTol = new TColStd_HArray1OfReal(1,Num1DSS);
 
-    Standard_Real TolU, TolV;
+    Standard_Real TolU = NAN, TolV = NAN;
 
     TolU = mySurf->UResolution(myTol) / 2.;
     TolV = mySurf->VResolution(myTol) / 2.;
@@ -445,7 +447,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
     ThreeDTol->Init(myTol/2);
   }
 
-  AdvApprox_Cutting* CutTool;
+  AdvApprox_Cutting* CutTool = nullptr;
 
   if (aContinuity <= myC2D->Continuity() &&
       aContinuity <= mySurf->UContinuity() &&
@@ -556,7 +558,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
 //function : isIsoLine
 //purpose  :
 //=============================================================================
-Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
                                                   Standard_Boolean&                theIsU,
                                                   Standard_Real&                   theParam,
                                                   Standard_Boolean&                theIsForward) const
@@ -638,7 +640,7 @@ Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d
 //function : buildC3dOnIsoLine
 //purpose  :
 //=============================================================================
-Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
                                                           const Standard_Boolean           theIsU,
                                                           const Standard_Real              theParam,
                                                           const Standard_Boolean           theIsForward)
@@ -659,7 +661,7 @@ Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d
   gp_Pnt2d aL2d = theC2D->Value(theC2D->LastParameter());
 
   Standard_Boolean isToTrim = Standard_True;
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   aSurf->Bounds(U1, U2, V1, V2);
 
   if (theIsU)
index 55f376e5c87dcbcda0cb0047ba475deb7406d08b..c3541e357dda049bcfa69226b8ba3ef54b58def9 100644 (file)
@@ -85,7 +85,7 @@ protected:
   //! @param theParam     Line parameter.
   //! @param theIsForward Flag indicating forward parameterization on a isoline.
   //! @return Standard_True when 2d curve is a line and Standard_False otherwise.
-  Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+  Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
                              Standard_Boolean&                theIsU,
                              Standard_Real&                   theParam,
                              Standard_Boolean&                theIsForward) const;
@@ -97,7 +97,7 @@ protected:
   //! @param theParam Line parameter.
   //! @param theIsForward Flag indicating forward parameterization on a isoline.
   //! @return Standard_True when 3d curve is built and Standard_False otherwise.
-  Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+  Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
                                      const Standard_Boolean           theIsU,
                                      const Standard_Real              theParam,
                                      const Standard_Boolean           theIsForward);
index 77ca7f8e2cccab88cd23761746ff8e0605b55f73..e311a147f580310471b679968ff3ec40e9f34633 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Approx_CurvilinearParameter.hxx>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -73,16 +75,16 @@ class Approx_CurvilinearParameter_EvalCurv : public AdvApprox_EvaluatorFunction
                                         Standard_Real First, Standard_Real Last)
     : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Approx_CurvlinFunc) fonct;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void Approx_CurvilinearParameter_EvalCurv::Evaluate (Standard_Integer * Dimension,
@@ -95,7 +97,7 @@ void Approx_CurvilinearParameter_EvalCurv::Evaluate (Standard_Integer * Dimensio
   *ErrorCode = 0;
   Standard_Real S = *Param;
   TColStd_Array1OfReal Res(0, 2);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   
 // Dimension is incorrect
   if (*Dimension != 3) {
@@ -126,7 +128,7 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_
                                                         const GeomAbs_Shape Order,
                                                         const Standard_Integer MaxDegree,
                                                         const Standard_Integer MaxSegments)
-: myMaxError2d1(0.0),
+: myCase(1), myMaxError2d1(0.0),
   myMaxError2d2(0.0)
 {
 #ifdef OCCT_DEBUG_CHRONO
@@ -134,7 +136,7 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_
   uparam_count = 0;
   InitChron(chr_total);
 #endif
-  myCase = 1;
+  
 // Initialisation of input parameters of AdvApprox
 
   Standard_Integer Num1DSS=0, Num2DSS=0, Num3DSS=1;
@@ -212,16 +214,16 @@ class Approx_CurvilinearParameter_EvalCurvOnSurf : public AdvApprox_EvaluatorFun
                                               Standard_Real First, Standard_Real Last)
     : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Approx_CurvlinFunc) fonct;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void Approx_CurvilinearParameter_EvalCurvOnSurf::Evaluate (Standard_Integer * Dimension,
@@ -234,7 +236,7 @@ void Approx_CurvilinearParameter_EvalCurvOnSurf::Evaluate (Standard_Integer * Di
   *ErrorCode = 0;
   Standard_Real S = *Param;
   TColStd_Array1OfReal Res(0, 4);
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
 // Dimension is incorrect
   if (*Dimension != 5) {
@@ -265,21 +267,21 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
                                                         const Standard_Real Tol,
                                                         const GeomAbs_Shape Order,
                                                         const Standard_Integer MaxDegree,
-                                                        const Standard_Integer MaxSegments)
+                                                        const Standard_Integer MaxSegments) : myCase(2)
 {
 #ifdef OCCT_DEBUG_CHRONO
   t_total = t_init = t_approx = t_uparam = 0;
   uparam_count = 0;
   InitChron(chr_total);
 #endif
-  myCase = 2;
+  
 
   // Initialisation of input parameters of AdvApprox
 
-  Standard_Integer Num1DSS=2, Num2DSS=0, Num3DSS=1, i;
+  Standard_Integer Num1DSS=2, Num2DSS=0, Num3DSS=1, i = 0;
 
   Handle(TColStd_HArray1OfReal) OneDTol = new TColStd_HArray1OfReal(1,Num1DSS);
-  Standard_Real TolV,TolW;
+  Standard_Real TolV = NAN,TolW = NAN;
 
   ToleranceComputation(C2D,Surf,10,Tol,TolV,TolW);
   OneDTol->SetValue(1,TolV);
@@ -373,16 +375,16 @@ class Approx_CurvilinearParameter_EvalCurvOn2Surf : public AdvApprox_EvaluatorFu
                                                Standard_Real First, Standard_Real Last)
     : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Approx_CurvlinFunc) fonct;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void Approx_CurvilinearParameter_EvalCurvOn2Surf::Evaluate (Standard_Integer * Dimension,
@@ -395,7 +397,7 @@ void Approx_CurvilinearParameter_EvalCurvOn2Surf::Evaluate (Standard_Integer * D
   *ErrorCode = 0;
   Standard_Real S = *Param;
   TColStd_Array1OfReal Res(0, 6);
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
 // Dimension is incorrect
   if (*Dimension != 7) {
@@ -428,23 +430,23 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
                                                         const Standard_Real Tol,
                                                         const GeomAbs_Shape Order,
                                                         const Standard_Integer MaxDegree,
-                                                        const Standard_Integer MaxSegments)
+                                                        const Standard_Integer MaxSegments) : myCase(3)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
 #ifdef OCCT_DEBUG_CHRONO
   t_total = t_init = t_approx = t_uparam = 0;
   uparam_count = 0;
   InitChron(chr_total);
 #endif
-  myCase = 3;
+  
 
   // Initialisation of input parameters of AdvApprox
 
   Standard_Integer Num1DSS=4, Num2DSS=0, Num3DSS=1;
   Handle(TColStd_HArray1OfReal) OneDTol = new TColStd_HArray1OfReal(1,Num1DSS); 
 
-  Standard_Real TolV,TolW;
+  Standard_Real TolV = NAN,TolW = NAN;
   ToleranceComputation(C2D1,Surf1,10,Tol,TolV,TolW);
   OneDTol->SetValue(1,TolV); 
   OneDTol->SetValue(2,TolW); 
index bf014252db4668b3748a4d71cb2008a77bf8e1f8..e0dfb3fa0257b9a6a7b49b96356d76eab5f0d002 100644 (file)
@@ -90,7 +90,7 @@ private:
   Handle(Geom2d_BSplineCurve) myCurve2d1;
   Standard_Real myMaxError2d1;
   Handle(Geom2d_BSplineCurve) myCurve2d2;
-  Standard_Real myMaxError2d2;
+  Standard_Real myMaxError2d2{};
 
 };
 
index ba82388e953145ba59b9ed3ef710936340f380bb..156224da69fcd65d4db7a8e16dca1d5dcb814146 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Approx_CurvlinFunc.hxx>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -43,7 +45,7 @@ Standard_IMPORT void ResultChron( OSD_Chronometer & ch, Standard_Real & time);
 
 static Standard_Real cubic(const Standard_Real X, const Standard_Real *Xi, const Standard_Real *Yi)
 {
-  Standard_Real I1, I2, I3, I21, I22, I31, Result;
+  Standard_Real I1 = NAN, I2 = NAN, I3 = NAN, I21 = NAN, I22 = NAN, I31 = NAN, Result = NAN;
 
   I1 = (Yi[0] - Yi[1])/(Xi[0] - Xi[1]);
   I2 = (Yi[1] - Yi[2])/(Xi[1] - Xi[2]);
@@ -68,7 +70,7 @@ static void findfourpoints(const Standard_Real ,
                           const Standard_Real prevU, Standard_Real *Xi, 
                           Standard_Real *Yi)
 {
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   Standard_Integer NbInt = Si->Length() - 1;
   if (NbInt < 3) throw Standard_ConstructionError("Approx_CurvlinFunc::GetUParameter");
 
@@ -193,8 +195,8 @@ void Approx_CurvlinFunc::Init()
 void Approx_CurvlinFunc::Init(Adaptor3d_Curve& C, Handle(TColStd_HArray1OfReal)& Si, 
                              Handle(TColStd_HArray1OfReal)& Ui) const
 {
-  Standard_Real Step, FirstU, LastU;
-  Standard_Integer i, j, k, NbInt, NbIntC3;
+  Standard_Real Step = NAN, FirstU = NAN, LastU = NAN;
+  Standard_Integer i = 0, j = 0, k = 0, NbInt = 0, NbIntC3 = 0;
   FirstU = C.FirstParameter();
   LastU  = C.LastParameter();
 
@@ -260,7 +262,7 @@ Standard_Integer Approx_CurvlinFunc::NbIntervals(const GeomAbs_Shape S) const
     CurOnSur.Load(mySurf1);
     return CurOnSur.NbIntervals(S);
   case 3:
-    Standard_Integer NbInt;
+    Standard_Integer NbInt = 0;
     CurOnSur.Load(myC2D1);
     CurOnSur.Load(mySurf1);
     NbInt = CurOnSur.NbIntervals(S);
@@ -284,7 +286,7 @@ Standard_Integer Approx_CurvlinFunc::NbIntervals(const GeomAbs_Shape S) const
 void Approx_CurvlinFunc::Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const
 {
   Adaptor3d_CurveOnSurface CurOnSur;
-  Standard_Integer i;
+  Standard_Integer i = 0;
     
   switch(myCase) {
   case 1:
@@ -296,7 +298,7 @@ void Approx_CurvlinFunc::Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape
     CurOnSur.Intervals(T, S);
     break;
   case 3:
-    Standard_Integer NbInt;
+    Standard_Integer NbInt = 0;
     CurOnSur.Load(myC2D1);
     CurOnSur.Load(mySurf1);
     NbInt = CurOnSur.NbIntervals(S);
@@ -324,7 +326,7 @@ void Approx_CurvlinFunc::Trim(const Standard_Real First, const Standard_Real Las
   if (First < 0 || Last >1) throw Standard_OutOfRange("Approx_CurvlinFunc::Trim");
   if ((Last - First) < Tol) return;
 
-  Standard_Real FirstU, LastU;
+  Standard_Real FirstU = NAN, LastU = NAN;
   Adaptor3d_CurveOnSurface CurOnSur;
   Handle(Adaptor3d_CurveOnSurface) HCurOnSur;
 
@@ -373,7 +375,7 @@ void Approx_CurvlinFunc::Trim(const Standard_Real First, const Standard_Real Las
 void Approx_CurvlinFunc::Length()
 {
   Adaptor3d_CurveOnSurface CurOnSur;
-  Standard_Real FirstU, LastU;
+  Standard_Real FirstU = NAN, LastU = NAN;
 
   switch(myCase){
   case 1:
@@ -408,7 +410,7 @@ void Approx_CurvlinFunc::Length()
 
 Standard_Real Approx_CurvlinFunc::Length(Adaptor3d_Curve& C, const Standard_Real FirstU, const Standard_Real LastU) const
 {
-  Standard_Real Length;
+  Standard_Real Length = NAN;
 
   Length = GCPnts_AbscissaPoint::Length(C, FirstU, LastU, myTolLen);
   return Length;
@@ -422,7 +424,7 @@ Standard_Real Approx_CurvlinFunc::GetLength() const
 
 Standard_Real Approx_CurvlinFunc::GetSParameter(const Standard_Real U) const
 {
-  Standard_Real S=0, S1, S2;
+  Standard_Real S=0, S1 = NAN, S2 = NAN;
   Adaptor3d_CurveOnSurface CurOnSur;
 
   switch (myCase) {
@@ -452,8 +454,8 @@ Standard_Real Approx_CurvlinFunc::GetUParameter(Adaptor3d_Curve& C,
                                                const Standard_Real S, 
                                                const Standard_Integer NumberOfCurve) const
 {
-  Standard_Real deltaS, base, U, Length;
-  Standard_Integer NbInt, NInterval, i;
+  Standard_Real deltaS = NAN, base = NAN, U = NAN, Length = NAN;
+  Standard_Integer NbInt = 0, NInterval = 0, i = 0;
   Handle(TColStd_HArray1OfReal) InitUArray, InitSArray;
 #ifdef OCCT_DEBUG_CHRONO
   InitChron(chr_uparam);
@@ -495,7 +497,7 @@ Standard_Real Approx_CurvlinFunc::GetUParameter(Adaptor3d_Curve& C,
   deltaS = (S - InitSArray->Value(NInterval))*Length;
 
 // to find an initial point
-  Standard_Real Xi[4], Yi[4], UGuess;
+  Standard_Real Xi[4], Yi[4], UGuess = NAN;
   findfourpoints(S, NInterval, InitSArray, InitUArray, myPrevS, myPrevU, Xi, Yi);
   UGuess = cubic(S , Xi, Yi);
 
@@ -515,7 +517,7 @@ Standard_Real Approx_CurvlinFunc::GetUParameter(Adaptor3d_Curve& C,
 
 Standard_Real Approx_CurvlinFunc::GetSParameter(Adaptor3d_Curve& C, const Standard_Real U, const Standard_Real Len) const
 {
-  Standard_Real S, Origin;
+  Standard_Real S = NAN, Origin = NAN;
 
   Origin = C.FirstParameter();
   S = myFirstS + Length(C, Origin, U)/Len;    
@@ -528,7 +530,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase1(const Standard_Real S, const Stan
 
   gp_Pnt C;
   gp_Vec dC_dU, dC_dS, d2C_dU2, d2C_dS2;
-  Standard_Real U, Mag, dU_dS, d2U_dS2;
+  Standard_Real U = NAN, Mag = NAN, dU_dS = NAN, d2U_dS2 = NAN;
   
   U = GetUParameter (*myC3D, S, 1);
 
@@ -575,7 +577,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase2(const Standard_Real S, const Stan
 {
   if(myCase != 2) throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCase2");
 
-  Standard_Boolean Done;
+  Standard_Boolean Done = 0;
 
   Done = EvalCurOnSur(S, Order, Result, 1);
 
@@ -587,7 +589,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase3(const Standard_Real S, const Stan
   if(myCase != 3) throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCase3");
   
   TColStd_Array1OfReal tmpRes1(0, 4), tmpRes2(0, 4);
-  Standard_Boolean Done;
+  Standard_Boolean Done = 0;
 
   Done = EvalCurOnSur(S, Order, tmpRes1, 1);
 
@@ -628,7 +630,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCurOnSur(const Standard_Real S, const S
   else 
     throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCurOnSur");
 
-  Standard_Real Mag, dU_dS, d2U_dS2, dV_dU, dW_dU, dV_dS, dW_dS, d2V_dS2, d2W_dS2, d2V_dU2, d2W_dU2;
+  Standard_Real Mag = NAN, dU_dS = NAN, d2U_dS2 = NAN, dV_dU = NAN, dW_dU = NAN, dV_dS = NAN, dW_dS = NAN, d2V_dS2 = NAN, d2W_dS2 = NAN, d2V_dU2 = NAN, d2W_dU2 = NAN;
   gp_Pnt2d C2D;
   gp_Pnt C;
   gp_Vec2d dC2D_dU, d2C2D_dU2;
index c97e46146b4bc2f8949e0a97edd7c42986fdcf6c..b83494e474d81ee50db5b207085a6c5c556f4c50 100644 (file)
@@ -115,13 +115,13 @@ private:
   Standard_Integer myCase;
   Standard_Real myFirstS;
   Standard_Real myLastS;
-  Standard_Real myFirstU1;
-  Standard_Real myLastU1;
-  Standard_Real myFirstU2;
-  Standard_Real myLastU2;
-  Standard_Real myLength;
-  Standard_Real myLength1;
-  Standard_Real myLength2;
+  Standard_Real myFirstU1{};
+  Standard_Real myLastU1{};
+  Standard_Real myFirstU2{};
+  Standard_Real myLastU2{};
+  Standard_Real myLength{};
+  Standard_Real myLength1{};
+  Standard_Real myLength2{};
   Standard_Real myTolLen;
   Standard_Real myPrevS;
   Standard_Real myPrevU;
index f929166f90c04d6d559bdbb832a5cc448c44ec44..9c40996027074a0984e65cc40bc63bf52b1eb5c5 100644 (file)
@@ -52,9 +52,9 @@ static void DEBUG(const AppParCurves_MultiCurve& MC) {
 
 
 
-Approx_MCurvesToBSpCurve::Approx_MCurvesToBSpCurve()
+Approx_MCurvesToBSpCurve::Approx_MCurvesToBSpCurve() : myDone(Standard_False)
 {
-  myDone = Standard_False;
+  
 }
 
 void Approx_MCurvesToBSpCurve::Reset()
@@ -78,7 +78,7 @@ void Approx_MCurvesToBSpCurve::Perform
   (const AppParCurves_SequenceOfMultiCurve& TheSeq)
 {
 
-  Standard_Integer i, j, deg=0;
+  Standard_Integer i = 0, j = 0, deg=0;
   Standard_Integer nbcu = TheSeq.Length();
   AppParCurves_MultiCurve CU;
   Standard_Integer nbpolesspl=0, nbknots=0;
@@ -167,8 +167,8 @@ void Approx_MCurvesToBSpCurve::Perform
     }
 
     Standard_Integer kpol = 1, kpoles3d=1, kpoles2d=1;
-    Standard_Integer mydegre, k;
-    Standard_Integer first, last, Inc, thefirst;
+    Standard_Integer mydegre = 0, k = 0;
+    Standard_Integer first = 0, last = 0, Inc = 0, thefirst = 0;
     if (nb3d != 0) thefirst = 1;
     else thefirst = 2;
 
index 9bb7b22e24fbb21ceadd8856e2ec132995bb07fb..0330c25c78ce7e67eed7b457a49f4f831868188a 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Approx_SameParameter.hxx>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -46,12 +48,12 @@ public:
       Poles(thePoles),
       HCurve2d(theHCurve2d) {}
 
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                          Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
 
 private:
   const TColStd_Array1OfReal& FlatKnots;
@@ -119,7 +121,7 @@ static void ProjectPointOnCurve(const Standard_Real      InitValue,
 
   gp_Pnt a_point;
   gp_Vec vector, d1, d2;
-  Standard_Real func, func_derivative,
+  Standard_Real func = NAN, func_derivative = NAN,
                 param = InitValue;
   Status = Standard_False;
   do
@@ -236,7 +238,7 @@ static Standard_Boolean Check(const TColStd_Array1OfReal& FlatKnots,
     Standard_Real t = unsurnn*i;
     Standard_Real tc3d = pc3d[0]*(1.0 - t) + pc3d[nbp - 1] * t; // weight function.
     gp_Pnt Pc3d = c3d->Value(tc3d);
-    Standard_Real tcons;
+    Standard_Real tcons = NAN;
     BSplCLib::Eval(tc3d, Standard_False, 0, extrap_mode[0],
                    aDegree, FlatKnots, 1, (Standard_Real&)Poles(1), tcons);
 
@@ -276,11 +278,11 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Geom_Curve)&   C3D,
                                            const Standard_Real         Tol)
 : myDeltaMin(Precision::PConfusion()),
   mySameParameter(Standard_True),
-  myDone(Standard_False)
+  myDone(Standard_False), myHCurve2d(new Geom2dAdaptor_Curve(C2D)), myC3d(new GeomAdaptor_Curve(C3D)), mySurf(new GeomAdaptor_Surface(S))
 {
-  myHCurve2d = new Geom2dAdaptor_Curve(C2D);
-  myC3d      = new GeomAdaptor_Curve(C3D);
-  mySurf     = new GeomAdaptor_Surface(S);
+  
+  
+  
   Build(Tol);
 }
 
@@ -294,11 +296,11 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_Curve)&   C3D,
                                            const Standard_Real               Tol)
 : myDeltaMin(Precision::PConfusion()),
   mySameParameter(Standard_True),
-  myDone(Standard_False)
+  myDone(Standard_False), myHCurve2d(new Geom2dAdaptor_Curve(C2D)), myC3d(C3D), mySurf(S)
 {
-  myC3d = C3D;
-  mySurf = S;
-  myHCurve2d = new Geom2dAdaptor_Curve(C2D);
+  
+  
+  
   Build(Tol);
 }
 
@@ -312,11 +314,11 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_Curve)&   C3D,
                                            const Standard_Real               Tol)
 : myDeltaMin(Precision::PConfusion()),
   mySameParameter(Standard_True),
-  myDone(Standard_False)
+  myDone(Standard_False), myHCurve2d(C2D), myC3d(C3D), mySurf(S)
 {
-  myC3d = C3D;
-  mySurf = S;
-  myHCurve2d = C2D;
+  
+  
+  
   Build(Tol);
 }
 
@@ -657,7 +659,7 @@ Standard_Boolean Approx_SameParameter::CheckSameParameter(Approx_SameParameter_D
   Projector.Initialize (*myC3d, theData.myC3dPF, theData.myC3dPL, theData.myTol);
 
   Standard_Integer count = 1;
-  Standard_Real previousp = theData.myC3dPF, initp=0, curp;
+  Standard_Real previousp = theData.myC3dPF, initp=0, curp = NAN;
   Standard_Real bornesup = theData.myC3dPL - myDeltaMin;
   Standard_Boolean isProjOk = Standard_False;
   for (Standard_Integer ii = 1; ii < theData.myNbPnt; ii++)
@@ -813,7 +815,7 @@ Standard_Boolean Approx_SameParameter::Interpolate(const Approx_SameParameter_Da
     thePoles(ii) = theData.myPC2d[ii - 2];
     aParameters(ii) = theFlatKnots(ii+2) = theData.myPC3d[ii - 2];
   }
-  Standard_Integer inversion_problem;
+  Standard_Integer inversion_problem = 0;
   BSplCLib::Interpolate(3,theFlatKnots,aParameters,ContactOrder,
                         1,thePoles(1),inversion_problem);
   if(inversion_problem)
@@ -842,7 +844,7 @@ Standard_Boolean Approx_SameParameter::IncreaseNbPoles(const TColStd_Array1OfRea
   const Standard_Integer aDegree = 3;
   const Standard_Integer DerivativeRequest = 0;
   Standard_Integer extrap_mode[2] = {aDegree, aDegree};
-  Standard_Real eval_result;
+  Standard_Real eval_result = NAN;
   Standard_Real *PolesArray = (Standard_Real *) &thePoles(thePoles.Lower());
   Standard_Integer newcount = 0;
   for (Standard_Integer ii = 0; ii < theData.myNbPnt; ii++)
index 257a01933603e4acd45a25b7ac7895b3a5de96ac..72e6f8dc82145067fcd74754759a3f6a9ae388e9 100644 (file)
@@ -186,7 +186,7 @@ private:
 
   Standard_Boolean mySameParameter;
   Standard_Boolean myDone;
-  Standard_Real myTolReached;
+  Standard_Real myTolReached{};
   Handle(Geom2d_Curve) myCurve2d;
   Handle(Adaptor2d_Curve2d) myHCurve2d;
   Handle(Adaptor3d_Curve) myC3d;
index 5e136d2fc94c67b0c374fe2fe87ac5ead3dafe15..0baa75efbece103bd28ed78858b99470c19f1079 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AdvApprox_ApproxAFunction.hxx>
 #include <AdvApprox_DichoCutting.hxx>
 #include <AdvApprox_PrefAndRec.hxx>
@@ -37,12 +39,12 @@ class Approx_SweepApproximation_Eval : public AdvApprox_EvaluatorFunction
   Approx_SweepApproximation_Eval (Approx_SweepApproximation& theTool)
     : Tool(theTool) {}
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Approx_SweepApproximation &Tool;
@@ -60,14 +62,14 @@ void Approx_SweepApproximation_Eval::Evaluate (Standard_Integer *,/*Dimension*/
 }
 
 Approx_SweepApproximation::
-Approx_SweepApproximation(const Handle(Approx_SweepFunction)& Func) 
+Approx_SweepApproximation(const Handle(Approx_SweepFunction)& Func) : myFunc(Func), myParam(0), myOrder(-1), first(1.e100), last(-1.e100), done(Standard_False) 
 {
-  myFunc  = Func;
+  
   //  Init of variables of control
-  myParam = 0;
-  myOrder = -1;
-  first = 1.e100; last = -1.e100;
-  done = Standard_False;
+  
+  
+  
+  
 }
 
 void Approx_SweepApproximation::Perform(const Standard_Real First,
@@ -80,8 +82,8 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
                                        const Standard_Integer Degmax,
                                        const Standard_Integer Segmax)
 {
- Standard_Integer NbPolSect, NbKnotSect, ii;
- Standard_Real Tol, Tol3dMin = Tol3d, The3D2DTol=0 ; 
+ Standard_Integer NbPolSect = 0, NbKnotSect = 0, ii = 0;
+ Standard_Real Tol = NAN, Tol3dMin = Tol3d, The3D2DTol=0 ; 
  GeomAbs_Shape   continuity = Continuity;
 
 // (1) Characteristics of a section
@@ -107,7 +109,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
    if (ThreeDTol->Value(ii) < Tol3dMin) Tol3dMin = ThreeDTol->Value(ii);
 
  if (myFunc->IsRational()) {
-   Standard_Real Size;
+   Standard_Real Size = NAN;
    Num1DSS = NbPolSect;
    TColStd_Array1OfReal Wmin(1, Num1DSS);
    myFunc->GetMinimalWeight(Wmin);
@@ -129,7 +131,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
  else {
    // for 2d define affinity using resolutions, to 
    // avoid homogenuous tolerance of approximation (u/v and 2d/3d)
-   Standard_Real res, tolu, tolv
+   Standard_Real res = NAN, tolu = NAN, tolv = NAN
    TwoDTol = new (TColStd_HArray1OfReal) (1, Num2DSS);
    AAffin = new (Approx_HArray1OfGTrsf2d) (1, Num2DSS);
    The3D2DTol= 0.9*BoundTol; // 10% of security
@@ -175,7 +177,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
 
 // Checks if myFunc->D2 is implemented
  if (continuity >= GeomAbs_C2) {
-   Standard_Boolean B;
+   Standard_Boolean B = 0;
    B = myFunc->D2(First, First, Last, 
                  myPoles->ChangeArray1(), myDPoles->ChangeArray1(), 
                  myD2Poles->ChangeArray1(),
@@ -187,7 +189,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
  }
 // Checks if myFunc->D1 is implemented
  if (continuity == GeomAbs_C1) {
-   Standard_Boolean B;
+   Standard_Boolean B = 0;
    B = myFunc->D1(First, First, Last, 
                  myPoles->ChangeArray1(), myDPoles->ChangeArray1(), 
                  myPoles2d->ChangeArray1(), myDPoles2d->ChangeArray1(), 
@@ -267,7 +269,7 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol,
 
  if (done) {
  // --> Fill Champs of the surface ----
-   Standard_Integer ii, jj;
+   Standard_Integer ii = 0, jj = 0;
 
    vdeg = Approx.Degree();
    // Unfortunately Adv_Approx stores the transposition of the required 
@@ -279,7 +281,7 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol,
      (1, Num3DSS, 1, Approx.NbPoles());
 
    if (Num1DSS == Num3DSS) {
-     Standard_Real wpoid;
+     Standard_Real wpoid = NAN;
      gp_Pnt P;
      for (ii=1; ii <=Num3DSS; ii++) {
        for (jj=1; jj <=Approx.NbPoles() ; jj++) {
@@ -384,7 +386,7 @@ Standard_Boolean Approx_SweepApproximation::D0(const Standard_Real Param,
                                               const Standard_Real Last,
                                               Standard_Real& Result) 
 {
-  Standard_Integer index, ii;
+  Standard_Integer index = 0, ii = 0;
   Standard_Boolean Ok=Standard_True;
   Standard_Real * LocalResult =  &Result;
 
@@ -448,7 +450,7 @@ Standard_Boolean Approx_SweepApproximation::D1(const Standard_Real Param,
 {
   gp_XY Vcoord;
   gp_Vec Vaux;
-  Standard_Integer index, ii;
+  Standard_Integer index = 0, ii = 0;
   Standard_Boolean Ok=Standard_True;
   Standard_Real * LocalResult =  &Result;
 
@@ -525,7 +527,7 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param,
 {
   gp_XY Vcoord;  
   gp_Vec Vaux;
-  Standard_Integer index, ii;
+  Standard_Integer index = 0, ii = 0;
   Standard_Boolean Ok=Standard_True;
   Standard_Real * LocalResult =  &Result;
 
@@ -642,8 +644,8 @@ Surface(TColgp_Array2OfPnt& TPoles,
 
 Standard_Real Approx_SweepApproximation::MaxErrorOnSurf() const
 {
- Standard_Integer ii;
- Standard_Real MaxError = 0, err;
+ Standard_Integer ii = 0;
+ Standard_Real MaxError = 0, err = NAN;
  if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
 
  if (myFunc->IsRational()) {
@@ -666,8 +668,8 @@ Standard_Real Approx_SweepApproximation::MaxErrorOnSurf() const
 
  Standard_Real Approx_SweepApproximation::AverageErrorOnSurf() const
 {
- Standard_Integer ii;
- Standard_Real MoyError = 0, err;
+ Standard_Integer ii = 0;
+ Standard_Real MoyError = 0, err = NAN;
  if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
 
  if (myFunc->IsRational()) {
index bc374834566a5690de89d9e2a3f5c7baa1d5a9d6..63b6fd59abfffe4e7f75e605adc3847d5421644c 100644 (file)
@@ -164,12 +164,12 @@ private:
 
   Handle(Approx_SweepFunction) myFunc;
   Standard_Boolean done;
-  Standard_Integer Num1DSS;
-  Standard_Integer Num2DSS;
-  Standard_Integer Num3DSS;
-  Standard_Integer udeg;
-  Standard_Integer vdeg;
-  Standard_Integer deg2d;
+  Standard_Integer Num1DSS{};
+  Standard_Integer Num2DSS{};
+  Standard_Integer Num3DSS{};
+  Standard_Integer udeg{};
+  Standard_Integer vdeg{};
+  Standard_Integer deg2d{};
   Handle(TColgp_HArray2OfPnt) tabPoles;
   Handle(TColStd_HArray2OfReal) tabWeights;
   Handle(TColStd_HArray1OfReal) tabUKnots;
index d7acaf76d5a35c9555a4b92b3507f51b7ef0b6ad..ea13582f6dbe6d4788f8f8b60ccd8ba4c59e277b 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <ApproxInt_KnotTools.hxx>
 #include <TColgp_Array1OfPnt2d.hxx>
 #include <TColStd_Array1OfReal.hxx>
@@ -45,8 +47,8 @@ static Standard_Real EvalCurv(const Standard_Real dim,
   // V1^V2 is outer product of two vectors:
   // P(i,j) = V1(i)*V2(j) - V1(j)*V2(i);
   Standard_Real mp = 0.;
-  Standard_Integer i, j;
-  Standard_Real p;
+  Standard_Integer i = 0, j = 0;
+  Standard_Real p = NAN;
   for(i = 1; i < dim; ++i)
   {
     for(j = 0; j < i; ++j)
@@ -100,7 +102,7 @@ void ApproxInt_KnotTools::BuildCurvature(
 {
   // Arrays are allocated for max theDim = 7: 1 3d curve + 2 2d curves.
   Standard_Real Val[21], Par[3], Res[21];
-  Standard_Integer i, j, m, ic;
+  Standard_Integer i = 0, j = 0, m = 0, ic = 0;
   Standard_Integer dim = theDim;
   //
   theMaxCurv = 0.;
@@ -189,7 +191,7 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray<Standard_
   Standard_Real aMaxCurv = 0.;
   BuildCurvature(theCoords, theDim, thePars, aCurv, aMaxCurv);
   //  
-  Standard_Integer i, j, dim = theDim;
+  Standard_Integer i = 0, j = 0, dim = theDim;
 #ifdef APPROXINT_KNOTTOOLS_DEBUG
   std::cout << "Discrete curvature array is" << std::endl;
   for(i = aCurv.Lower(); i <= aCurv.Upper(); ++i)
@@ -250,7 +252,7 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray<Standard_
 #endif
 
   //III: Put knots in monotone intervals of curvature.
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   i = 1;
   do
   {
@@ -280,7 +282,7 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray<Standard_
           icm = (anInd - aCurv.Lower()) * theDim;
         NCollection_LocalArray<Standard_Real> V1(theDim), V2(theDim);
         Standard_Real mp = 0., m1 = 0., m2 = 0.;
-        Standard_Real p;
+        Standard_Real p = NAN;
         for(Standard_Integer k = 0; k < theDim; ++k)
         {
           V1[k] = theCoords[icm + k] - theCoords[ici + k];
@@ -482,7 +484,7 @@ Standard_Boolean ApproxInt_KnotTools::InsKnotBefI(const Standard_Integer theI,
   }
   //
   Standard_Real curv = 0.5*(theCurv(anInd) + theCurv(anInd1));
-  Standard_Integer mid = 0, j, jj;
+  Standard_Integer mid = 0, j = 0, jj = 0;
   const Standard_Real aLimitCurvatureChange = 3.0;
   for(j = anInd+1; j < anInd1; ++j)
   {
@@ -532,9 +534,9 @@ Standard_Boolean ApproxInt_KnotTools::InsKnotBefI(const Standard_Integer theI,
           ici1 = (anInd1 - theCurv.Lower()) * theDim,
           icm = (mid - theCurv.Lower()) * theDim;
         NCollection_LocalArray<Standard_Real> V1(theDim), V2(theDim);
-        Standard_Integer i;
+        Standard_Integer i = 0;
         Standard_Real mp = 0., m1 = 0., m2 = 0.;
-        Standard_Real p;
+        Standard_Real p = NAN;
         for(i = 0; i < theDim; ++i)
         {
           V1[i] = theCoords[icm + i] - theCoords[ici + i];
@@ -596,7 +598,7 @@ void ApproxInt_KnotTools::BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ,
     aDim += 2;
 
   NCollection_LocalArray<Standard_Real> aCoords(thePars.Length()*aDim);
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   for(i = thePars.Lower(); i <= thePars.Upper(); ++i)
   {
     j = (i - thePars.Lower()) * aDim;
@@ -654,7 +656,7 @@ void ApproxInt_KnotTools::BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ,
 //=======================================================================
 static Standard_Real MaxParamRatio(const math_Vector& thePars)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real aMaxRatio = 0.;
   //
   for (i = thePars.Lower() + 1; i < thePars.Upper(); ++i)
@@ -694,7 +696,7 @@ Approx_ParametrizationType ApproxInt_KnotTools::DefineParType(
   TColgp_Array1OfPnt2d aPntU1V1(theFpar, theLpar);
   TColgp_Array1OfPnt2d aPntU2V2(theFpar, theLpar);
 
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   for (i = theFpar; i <= theLpar; ++i)
   {
index 88739b2efceb62721ddf8d0702e91ca52552816a..af66ff5e3c5288224f694017dfe87198cb82a4fa 100644 (file)
@@ -40,9 +40,9 @@ Quantity_Color MatraGray (Quantity_NOC_MATRAGRAY);
 
 }
 
-Aspect_Background::Aspect_Background (const Quantity_Color& AColor) {
+Aspect_Background::Aspect_Background (const Quantity_Color& AColor) : MyColor(AColor) {
 
-       MyColor = AColor;
+       
 
 }
 
index 400fdeaac00e1525e6304b3b4671d976eb82366f..efa491cfee2591ccbd298e1ec9b504a3c4fd5446 100644 (file)
@@ -80,7 +80,7 @@ void Aspect_CircularGrid::Compute(const Standard_Real X,
   Standard_Real cs=0,sn=0;
   Standard_Boolean done = Standard_False;
   Standard_Integer nmax = 2*myDivisionNumber;
-  Standard_Integer nquad,qmax;
+  Standard_Integer nquad = 0,qmax = 0;
 
   if( ra == 0. ) {
     nquad = 4; qmax = nmax/nquad;
index f507b6a5cce795536fa025ff47b2c62069bb0525..a91d2a17e2eaf6a67c62bed9bc5de80bf810badc 100644 (file)
@@ -56,9 +56,9 @@ private:
 
   Standard_Real myRadiusStep;
   Standard_Integer myDivisionNumber;
-  Standard_Real myAlpha;
-  Standard_Real myA1;
-  Standard_Real myB1;
+  Standard_Real myAlpha{};
+  Standard_Real myA1{};
+  Standard_Real myB1{};
 
 };
 
old mode 100755 (executable)
new mode 100644 (file)
index 288c067..cd2b29b
@@ -27,13 +27,13 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_DisplayConnection,Standard_Transient)
 // function : Aspect_DisplayConnection
 // purpose  :
 // =======================================================================
-Aspect_DisplayConnection::Aspect_DisplayConnection()
+Aspect_DisplayConnection::Aspect_DisplayConnection() : myDisplay(NULL), myDefVisualInfo(NULL), myDefFBConfig(NULL), myIsOwnDisplay(false)
 {
 #if defined(HAVE_XLIB)
-  myDisplay = NULL;
-  myDefVisualInfo = NULL;
-  myDefFBConfig = NULL;
-  myIsOwnDisplay = false;
+  
+  
+  
+  
   OSD_Environment anEnv ("DISPLAY");
   myDisplayName = anEnv.Value();
   Init (NULL);
@@ -67,9 +67,9 @@ Aspect_DisplayConnection::Aspect_DisplayConnection (const TCollection_AsciiStrin
 : myDisplay (NULL),
   myDefVisualInfo (NULL),
   myDefFBConfig (NULL),
-  myIsOwnDisplay (false)
+  myDisplayName(theDisplayName), myIsOwnDisplay (false)
 {
-  myDisplayName = theDisplayName;
+  
   Init (NULL);
 }
 
index ae3a2754c9243e35f3cea70a36860e0e873df052..cea8126ca2be0f8f8f7e1a93ae5d6c1d243bedf4 100644 (file)
 #include <Aspect_GradientBackground.hxx>
 
 
-Aspect_GradientBackground::Aspect_GradientBackground () {
+Aspect_GradientBackground::Aspect_GradientBackground () : MyGradientMethod(Aspect_GradientFillMethod_None) {
 
   Quantity_Color Black (Quantity_NOC_BLACK);
 
   SetColor( Black );
   MyColor2 = Black;
-  MyGradientMethod = Aspect_GradientFillMethod_None;
+  
 
 }
 
 Aspect_GradientBackground::Aspect_GradientBackground( const Quantity_Color& AColor1,
                                                       const Quantity_Color& AColor2,
-                                                      const Aspect_GradientFillMethod AMethod ) 
+                                                      const Aspect_GradientFillMethod AMethod ) : MyColor2(AColor2), MyGradientMethod(AMethod) 
 {
   SetColor( AColor1 );
-  MyColor2 = AColor2;
-  MyGradientMethod = AMethod;
+  
+  
 }
 
 
index 870b1368a2b78b72260a7de748ec6ace22719242..48545d3a0a90785f5a4387716496b490eb3c039f 100644 (file)
@@ -75,12 +75,12 @@ private:
   Standard_Real myYStep;
   Standard_Real myFirstAngle;
   Standard_Real mySecondAngle;
-  Standard_Real a1;
-  Standard_Real b1;
-  Standard_Real c1;
-  Standard_Real a2;
-  Standard_Real b2;
-  Standard_Real c2;
+  Standard_Real a1{};
+  Standard_Real b1{};
+  Standard_Real c1{};
+  Standard_Real a2{};
+  Standard_Real b2{};
+  Standard_Real c2{};
 
 };
 
index a849aaea73074d085aac97f232e5259f0eecc07c..5faadf4e7c1c569f1d2e50b344c301a35529462c 100644 (file)
@@ -170,7 +170,7 @@ protected:
   Aspect_Background MyBackground;
   Aspect_GradientBackground MyGradientBackground;
   Aspect_FillMethod MyBackgroundFillMethod;
-  Standard_Boolean MyIsVirtual;
+  Standard_Boolean MyIsVirtual{};
 
 };
 
index d4b5e1128a0d9e29e8aea0b2412ef1f672f879e4..720868e6d36e3e45aa85254fa4fd28ac1a41d653 100644 (file)
@@ -260,7 +260,7 @@ protected:
 
 protected: //! @name 3d mouse input variables
 
-  bool                   my3dMouseButtonState[32];//!< cached button state
+  bool                   my3dMouseButtonState[32]{};//!< cached button state
   NCollection_Vec3<bool> my3dMouseNoRotate;       //!< ignore  3d mouse rotation axes
   NCollection_Vec3<bool> my3dMouseToReverse;      //!< reverse 3d mouse rotation axes
   float                  my3dMouseAccelTrans;     //!< acceleration ratio for translation event
index af16ada090b4feb884f37637626655860b2ad266..f3829638607fceccace6fa4131dfe616fdc11478 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BOPAlgo_ArgumentAnalyzer.hxx>
 #include <BOPAlgo_BuilderFace.hxx>
 #include <BOPAlgo_CheckerSI.hxx>
@@ -345,7 +347,7 @@ void BOPAlgo_ArgumentAnalyzer::TestTypes()
 void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences(const Message_ProgressRange& theRange)
 {
   Message_ProgressScope aPS(theRange, NULL, (!myShape1.IsNull() && !myShape2.IsNull() ? 2 : 1));
-  Standard_Integer ii;
+  Standard_Integer ii = 0;
   //
   for(ii = 0; ii < 2; ii++) {
     const TopoDS_Shape& aS = (ii == 0) ? myShape1 : myShape2;
@@ -358,7 +360,7 @@ void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences(const Message_ProgressRange
       continue;
     }
     //
-    Standard_Integer n1, n2;
+    Standard_Integer n1 = 0, n2 = 0;
     BOPDS_MapIteratorOfMapOfPair aItMPK;
     TopTools_ListOfShape anArgs;
     BOPAlgo_CheckerSI aChecker;
@@ -812,8 +814,8 @@ void BOPAlgo_ArgumentAnalyzer::TestMergeEdge()
 // ================================================================================
 void BOPAlgo_ArgumentAnalyzer::TestContinuity() 
 {
-  Standard_Integer i, j, aNbS;
-  Standard_Real f, l;
+  Standard_Integer i = 0, j = 0, aNbS = 0;
+  Standard_Real f = NAN, l = NAN;
   TopExp_Explorer aExp;
   //
   for (i = 0; i < 2; ++i) {
@@ -869,8 +871,8 @@ void BOPAlgo_ArgumentAnalyzer::TestContinuity()
 // ================================================================================
 void BOPAlgo_ArgumentAnalyzer::TestCurveOnSurface()
 {
-  Standard_Integer i;
-  Standard_Real aT, aD, aTolE;
+  Standard_Integer i = 0;
+  Standard_Real aT = NAN, aD = NAN, aTolE = NAN;
   TopExp_Explorer aExpF, aExpE;
   //
   for(i = 0; i < 2; i++) {
index 39641f6869e35b5b8521ad48fbcb44054731b7cb..de53e80d27dcdd8a3e1f527b4ea643ce38cef702 100644 (file)
@@ -120,8 +120,8 @@ BOPAlgo_Operation BOPAlgo_BOP::Operation()const
 //=======================================================================
 void BOPAlgo_BOP::CheckData()
 {
-  Standard_Integer i, j, aNbArgs, aNbTools;
-  Standard_Boolean bFuse;
+  Standard_Integer i = 0, j = 0, aNbArgs = 0, aNbTools = 0;
+  Standard_Boolean bFuse = 0;
   TopTools_ListIteratorOfListOfShape aItLS;
   //
   if (!(myOperation==BOPAlgo_COMMON ||
@@ -178,7 +178,7 @@ void BOPAlgo_BOP::CheckData()
         continue;
       }
 
-      Standard_Integer iDMin, iDMax;
+      Standard_Integer iDMin = 0, iDMax = 0;
       BOPTools_AlgoTools::Dimensions(aS, iDMin, iDMax);
 
       if (iDMin < iDimMin[i])
@@ -355,7 +355,7 @@ void BOPAlgo_BOP::BuildResult(const TopAbs_ShapeEnum theType)
 void BOPAlgo_BOP::Perform(const Message_ProgressRange& theRange)
 {
   Handle(NCollection_BaseAllocator) aAllocator;
-  BOPAlgo_PaveFiller* pPF;
+  BOPAlgo_PaveFiller* pPF = nullptr;
   TopTools_ListIteratorOfListOfShape aItLS;
   //
   GetReport()->Clear();
@@ -585,8 +585,8 @@ void BOPAlgo_BOP::BuildRC(const Message_ProgressRange& theRange)
   }
   // B. Common, Cut, Cut21
   //
-  Standard_Integer i, j, aNb, iDim;
-  Standard_Boolean bCheckEdges, bContains, bCut21, bCommon;
+  Standard_Integer i = 0, j = 0, aNb = 0, iDim = 0;
+  Standard_Boolean bCheckEdges = 0, bContains = 0, bCut21 = 0, bCommon = 0;
   TopTools_ListIteratorOfListOfShape aItLS;
   //
   // prepare the building elements of arguments to get its splits
@@ -662,7 +662,7 @@ void BOPAlgo_BOP::BuildRC(const Message_ProgressRange& theRange)
   //
   // compare the maps and make the result
   //
-  Standard_Integer iDimMin, iDimMax;
+  Standard_Integer iDimMin = 0, iDimMax = 0;
   //
   iDimMin = Min(myDims[0], myDims[1]);
   bCommon = (myOperation == BOPAlgo_COMMON);
@@ -755,7 +755,7 @@ void BOPAlgo_BOP::BuildRC(const Message_ProgressRange& theRange)
     return;
   }
   // The squats around degenerated edges
-  Standard_Integer nVD;
+  Standard_Integer nVD = 0;
   TopTools_IndexedMapOfShape aMVC;
   //
   // 1. Vertices of aC
@@ -841,7 +841,7 @@ void BOPAlgo_BOP::BuildShape(const Message_ProgressRange& theRange)
     return;
   }
   //
-  Standard_Integer i;
+  Standard_Integer i = 0;
   TopAbs_ShapeEnum aType, aT1, aT2;
   TopTools_ListOfShape aLSC, aLCB;
   TopTools_ListIteratorOfListOfShape aItLS, aItLSIm, aItLCB;
@@ -1044,7 +1044,7 @@ void BOPAlgo_BOP::BuildSolid(const Message_ProgressRange& theRange)
   //
   // Find solids in input arguments sharing faces with other solids
   TopTools_MapOfShape aMTSols;
-  Standard_Integer i, aNb = aMFS.Extent();
+  Standard_Integer i = 0, aNb = aMFS.Extent();
   for (i = 1; i < aNb; ++i) {
     const TopTools_ListOfShape& aLSols = aMFS(i);
     if (aLSols.Extent() > 1) {
@@ -1505,7 +1505,7 @@ void RemoveDuplicates(TopTools_ListOfShape& theContainers,
   // compare the contents of the containers and find duplicates
   TopTools_MapOfShape aDuplicates;
   //
-  Standard_Integer i, j, aNb = aContents.Extent();
+  Standard_Integer i = 0, j = 0, aNb = aContents.Extent();
   for (i = 1; i <= aNb; ++i) {
     const TopoDS_Shape& aCi = aContents.FindKey(i);
     if (aDuplicates.Contains(aCi)) {
index ea63fa52764b7f34cff03da57c07d1b7ab3e9897..114119534d5f7483f672732ee7b257d97e393944 100644 (file)
@@ -125,7 +125,7 @@ protected:
 protected:
 
   BOPAlgo_Operation myOperation;
-  Standard_Integer  myDims[2];
+  Standard_Integer  myDims[2]{};
   TopoDS_Shape      myRC;
 };
 
index d4c080e419f5522183c4a1c6fd807b58b9a1de7c..748ac01ecf8e9f83fb282a5d315275f7d5d3b765 100644 (file)
@@ -452,7 +452,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller, cons
 //=======================================================================
 void BOPAlgo_Builder::PostTreat(const Message_ProgressRange& theRange)
 {
-  Standard_Integer i, aNbS;
+  Standard_Integer i = 0, aNbS = 0;
   TopAbs_ShapeEnum aType;
   TopTools_IndexedMapOfShape aMA;
   if (myPaveFiller->NonDestructive()) {
index 2154b04c30617a3960bf70ed729e7ee295a27994..82e06ab6ad53968025cf7af6cc14bbdf67b32469 100644 (file)
@@ -16,6 +16,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BOPAlgo_BuilderFace.hxx>
 #include <BOPAlgo_WireEdgeSet.hxx>
 #include <BOPAlgo_WireSplitter.hxx>
@@ -66,9 +68,9 @@ static
 //=======================================================================
 BOPAlgo_BuilderFace::BOPAlgo_BuilderFace()
 :
-  BOPAlgo_BuilderArea()
+  BOPAlgo_BuilderArea(), myOrientation(TopAbs_EXTERNAL)
 {
-  myOrientation=TopAbs_EXTERNAL;
+  
 }
 //=======================================================================
 //function : 
@@ -77,9 +79,9 @@ BOPAlgo_BuilderFace::BOPAlgo_BuilderFace()
 BOPAlgo_BuilderFace::BOPAlgo_BuilderFace
   (const Handle(NCollection_BaseAllocator)& theAllocator)
 :
-  BOPAlgo_BuilderArea(theAllocator)
+  BOPAlgo_BuilderArea(theAllocator), myOrientation(TopAbs_EXTERNAL)
 { 
-  myOrientation=TopAbs_EXTERNAL;
+  
 }
 //=======================================================================
 //function : ~
@@ -166,8 +168,8 @@ void BOPAlgo_BuilderFace::Perform(const Message_ProgressRange& theRange)
 //=======================================================================
 void BOPAlgo_BuilderFace::PerformShapesToAvoid(const Message_ProgressRange& theRange)
 {
-  Standard_Boolean bFound;
-  Standard_Integer i, iCnt, aNbV, aNbE;
+  Standard_Boolean bFound = 0;
+  Standard_Integer i = 0, iCnt = 0, aNbV = 0, aNbE = 0;
   TopTools_IndexedDataMapOfShapeListOfShape aMVE;
   TopTools_ListIteratorOfListOfShape aIt;
   //
@@ -244,8 +246,8 @@ void BOPAlgo_BuilderFace::PerformShapesToAvoid(const Message_ProgressRange& theR
 //=======================================================================
 void BOPAlgo_BuilderFace::PerformLoops(const Message_ProgressRange& theRange)
 {
-  Standard_Boolean bFlag;
-  Standard_Integer i, aNbEA;
+  Standard_Boolean bFlag = 0;
+  Standard_Integer i = 0, aNbEA = 0;
   TopTools_ListIteratorOfListOfShape aIt;
   TopTools_IndexedDataMapOfShapeListOfShape aVEMap;
   TopTools_MapOfOrientedShape aMAdded;
@@ -456,7 +458,7 @@ void BOPAlgo_BuilderFace::PerformAreas(const Message_ProgressRange& theRange)
 
   // Prepare tree with the boxes of the hole faces
   BOPTools_Box2dTree aBoxTree;
-  Standard_Integer i, aNbH = aHoleFaces.Extent();
+  Standard_Integer i = 0, aNbH = aHoleFaces.Extent();
   aBoxTree.SetSize (aNbH);
   for (i = 1; i <= aNbH; ++i)
   {
@@ -746,7 +748,7 @@ void BOPAlgo_BuilderFace::PerformInternalShapes(const Message_ProgressRange& the
 void MakeInternalWires(const TopTools_IndexedMapOfShape& theME,
                        TopTools_ListOfShape& theWires)
 {
-  Standard_Integer i, aNbE;
+  Standard_Integer i = 0, aNbE = 0;
   TopTools_MapOfShape aAddedMap;
   TopTools_ListIteratorOfListOfShape aItE;
   TopTools_IndexedDataMapOfShapeListOfShape aMVE;
@@ -828,7 +830,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theWire,
       return isInside;
 
     // Get 2d curve of the edge on the face
-    Standard_Real aT1, aT2;
+    Standard_Real aT1 = NAN, aT2 = NAN;
     const Handle(Geom2d_Curve)& aC2D = BRep_Tool::CurveOnSurface(aE, aF, aT1, aT2);
     if (aC2D.IsNull())
       continue;
index 05db2286c5fd57b8ace1fcd502eb6c640ba4cb7f..7fd69339eb8d9f745905e81dddd1beedcd97df8e 100644 (file)
@@ -141,8 +141,8 @@ void BOPAlgo_BuilderSolid::Perform(const Message_ProgressRange& theRange)
 //=======================================================================
 void BOPAlgo_BuilderSolid::PerformShapesToAvoid(const Message_ProgressRange& theRange)
 {
-  Standard_Boolean bFound;
-  Standard_Integer i, iCnt, aNbE, aNbF;
+  Standard_Boolean bFound = 0;
+  Standard_Integer i = 0, iCnt = 0, aNbE = 0, aNbF = 0;
   TopAbs_Orientation aOrE;
   TopTools_IndexedDataMapOfShapeListOfShape aMEF;
   TopTools_ListIteratorOfListOfShape aIt;
@@ -226,7 +226,7 @@ void BOPAlgo_BuilderSolid::PerformShapesToAvoid(const Message_ProgressRange& the
 //=======================================================================
 void BOPAlgo_BuilderSolid::PerformLoops(const Message_ProgressRange& theRange)
 {
-  Standard_Integer i, aNbSh;
+  Standard_Integer i = 0, aNbSh = 0;
   TopTools_ListIteratorOfListOfShape aIt;
   TopoDS_Iterator aItS;
   Handle(NCollection_BaseAllocator) aAlr;
@@ -446,7 +446,7 @@ void BOPAlgo_BuilderSolid::PerformAreas(const Message_ProgressRange& theRange)
 
   // Prepare tree with the boxes of the hole shells
   BOPTools_BoxTree aBBTree;
-  Standard_Integer i, aNbH = aHoleShells.Extent();
+  Standard_Integer i = 0, aNbH = aHoleShells.Extent();
   aBBTree.SetSize (aNbH);
   for (i = 1; i <= aNbH; ++i)
   {
@@ -632,7 +632,7 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes(const Message_ProgressRange& th
 
   // Prepare list of faces to classify
   TopTools_ListOfShape aLFaces;
-  Standard_Integer i, aNbF = aMFs.Extent();
+  Standard_Integer i = 0, aNbF = aMFs.Extent();
   for (i = 1; i <= aNbF; ++i)
     aLFaces.Append(aMFs(i));
 
@@ -725,7 +725,7 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes(const Message_ProgressRange& th
 void MakeInternalShells(const TopTools_IndexedMapOfShape& theMF,
                         TopTools_ListOfShape& theShells)
 {
-  Standard_Integer i, aNbF;
+  Standard_Integer i = 0, aNbF = 0;
   BRep_Builder aBB;
   TopTools_ListIteratorOfListOfShape aItF;
   TopTools_IndexedDataMapOfShapeListOfShape aMEF;
@@ -733,7 +733,7 @@ void MakeInternalShells(const TopTools_IndexedMapOfShape& theMF,
   //
   aNbF = theMF.Extent();
   for (i = 1; i <= aNbF; ++i) {
-    TopoDS_Shape aF = theMF(i);
+    const TopoDS_Shape& aF = theMF(i);
     TopExp::MapShapesAndAncestors(aF, 
         TopAbs_EDGE, TopAbs_FACE, 
         aMEF);
index df89fac43a4e43655d7d37fc3438847830cfb89b..381f98aba043ef42a9cc7ef011926d5e96b5028e 100644 (file)
@@ -69,7 +69,7 @@ void BOPAlgo_Builder::FillImagesVertices(const Message_ProgressRange& theRange)
 //=======================================================================
   void BOPAlgo_Builder::FillImagesEdges(const Message_ProgressRange& theRange)
 {
-  Standard_Integer i, aNbS = myDS->NbSourceShapes();
+  Standard_Integer i = 0, aNbS = myDS->NbSourceShapes();
   Message_ProgressScope aPS(theRange, "Filling splits of edges", aNbS);
   for (i = 0; i < aNbS; ++i, aPS.Next()) {
     const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i);
@@ -160,7 +160,7 @@ void BOPAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
 //=======================================================================
   void BOPAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType, const Message_ProgressRange& theRange)
 {
-  Standard_Integer i, aNbS;
+  Standard_Integer i = 0, aNbS = 0;
   TopTools_MapOfShape aMFP(100, myAllocator);
   //
   aNbS=myDS->NbSourceShapes();
@@ -183,7 +183,7 @@ void BOPAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
 //=======================================================================
   void BOPAlgo_Builder::FillImagesCompounds(const Message_ProgressRange& theRange)
 {
-  Standard_Integer i, aNbS;
+  Standard_Integer i = 0, aNbS = 0;
   TopTools_MapOfShape aMFP(100, myAllocator);
   //
   aNbS=myDS->NbSourceShapes();
@@ -266,7 +266,7 @@ void BOPAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
   void BOPAlgo_Builder::FillImagesCompound(const TopoDS_Shape& theS,
                                            TopTools_MapOfShape& theMFP)
 { 
-  Standard_Boolean bInterferred;
+  Standard_Boolean bInterferred = 0;
   TopAbs_Orientation aOrX;
   TopoDS_Iterator aIt;
   BRep_Builder aBB;
index f2ebfef1719f126f278c24355cbc1d1ad32129ce..2cd27184e2e58279a73d6e03f03ef9b45b918b27 100644 (file)
@@ -16,6 +16,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BOPAlgo_Builder.hxx>
 #include <BOPAlgo_Alerts.hxx>
 #include <BOPAlgo_BuilderFace.hxx>
@@ -72,7 +74,7 @@ class BOPAlgo_PairOfShapeBoolean : public BOPAlgo_ParallelAlgo {
     myFlag(Standard_False) {
   }
   //
-  virtual ~BOPAlgo_PairOfShapeBoolean() {
+  ~BOPAlgo_PairOfShapeBoolean() override {
   }
   //
   TopoDS_Shape& Shape1() {
@@ -95,7 +97,7 @@ class BOPAlgo_PairOfShapeBoolean : public BOPAlgo_ParallelAlgo {
     return myContext;
   }
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
@@ -142,7 +144,7 @@ public:
 
 private:
   //! Disable the range enabled method
-  virtual void Perform(const Message_ProgressRange& /*theRange*/) {};
+  void Perform(const Message_ProgressRange& /*theRange*/) override {};
 
 private:
   Message_ProgressRange myRange;
@@ -163,7 +165,7 @@ class BOPAlgo_VFI : public BOPAlgo_ParallelAlgo {
     myIsInternal(Standard_False) {
   }
   //
-  virtual ~BOPAlgo_VFI(){
+  ~BOPAlgo_VFI() override{
   }
   //
   void SetVertex(const TopoDS_Vertex& aV) {
@@ -194,14 +196,14 @@ class BOPAlgo_VFI : public BOPAlgo_ParallelAlgo {
     return myContext;
   }
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
       return;
     }
 
-    Standard_Real aT1, aT2, dummy;
+    Standard_Real aT1 = NAN, aT2 = NAN, dummy = NAN;
     //
     Standard_Integer iFlag =
       myContext->ComputeVF(myV, myF, aT1, aT2, dummy, myFuzzyValue);
@@ -242,8 +244,8 @@ void BOPAlgo_Builder::FillImagesFaces(const Message_ProgressRange& theRange)
 //=======================================================================
 void BOPAlgo_Builder::BuildSplitFaces(const Message_ProgressRange& theRange)
 {
-  Standard_Boolean bHasFaceInfo, bIsClosed, bIsDegenerated, bToReverse;
-  Standard_Integer i, j, k, aNbS, aNbPBIn, aNbPBOn, aNbPBSc, aNbAV, nSp;
+  Standard_Boolean bHasFaceInfo = 0, bIsClosed = 0, bIsDegenerated = 0, bToReverse = 0;
+  Standard_Integer i = 0, j = 0, k = 0, aNbS = 0, aNbPBIn = 0, aNbPBOn = 0, aNbPBSc = 0, aNbAV = 0, nSp = 0;
   TopoDS_Face aFF, aFSD;
   TopoDS_Edge aSp, aEE;
   TopAbs_Orientation anOriF, anOriE;
index 390b762625067b49338f22bfa27bcd9ebd97aac7..e5944afcdc6bfce3be02217bf0c9fa26bc21cf49 100644 (file)
@@ -116,7 +116,7 @@ void BOPAlgo_Builder::FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids
   // Get all faces
   TopTools_ListOfShape aLFaces(anAlloc);
 
-  Standard_Integer i, aNbS = myDS->NbSourceShapes();
+  Standard_Integer i = 0, aNbS = myDS->NbSourceShapes();
   for (i = 0; i < aNbS; ++i)
   {
     const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i);
@@ -248,8 +248,8 @@ void BOPAlgo_Builder::BuildDraftSolid(const TopoDS_Shape& theSolid,
                                       TopoDS_Shape& theDraftSolid,
                                       TopTools_ListOfShape& theLIF)
 {
-  Standard_Boolean bToReverse;
-  Standard_Integer iFlag;
+  Standard_Boolean bToReverse = 0;
+  Standard_Integer iFlag = 0;
   TopAbs_Orientation aOrF, aOrSh, aOrSd;
   TopoDS_Iterator aIt1, aIt2;
   TopoDS_Shell aShD;
@@ -365,7 +365,7 @@ public:
 
 private:
   //! Disable the range enabled method
-  virtual void Perform(const Message_ProgressRange&/* theRange*/) {}
+  void Perform(const Message_ProgressRange&/* theRange*/) override {}
 
 private:
   TopoDS_Solid mySolid; //!< Solid to split
@@ -382,8 +382,8 @@ typedef NCollection_Vector<BOPAlgo_SplitSolid> BOPAlgo_VectorOfBuilderSolid;
 void BOPAlgo_Builder::BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSolids,
                                        const Message_ProgressRange& theRange)
 {
-  Standard_Boolean bFlagSD;
-  Standard_Integer i, aNbS;
+  Standard_Boolean bFlagSD = 0;
+  Standard_Integer i = 0, aNbS = 0;
   TopExp_Explorer aExp;
   TopTools_ListIteratorOfListOfShape aIt;
   //
@@ -473,7 +473,7 @@ void BOPAlgo_Builder::BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSol
     aBS.SetRunParallel(myRunParallel);
   }//for (i=0; i<aNbS; ++i) {
   //
-  Standard_Integer k, aNbBS;
+  Standard_Integer k = 0, aNbBS = 0;
   //
   aNbBS=aVBS.Length();
   // Set progress range for each task to be run in parallel
@@ -569,7 +569,7 @@ void BOPAlgo_Builder::BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSol
 //=======================================================================
 void BOPAlgo_Builder::FillInternalShapes(const Message_ProgressRange& theRange)
 {
-  Standard_Integer i, j,  aNbS, aNbSI, aNbSx;
+  Standard_Integer i = 0, j = 0,  aNbS = 0, aNbSI = 0, aNbSx = 0;
   TopAbs_ShapeEnum aType;
   TopAbs_State aState; 
   TopoDS_Iterator aItS;
index ee8b58f2b8f0a52b2554bf27f1c693c7bb0feea8..833e5f5000d3a060ffbb2d2a7ba5fa42b085645f 100644 (file)
@@ -196,7 +196,7 @@ void BOPAlgo_CellsBuilder::IndexParts()
   // for the multi-dimensional case
   // add sub-shapes of the splits into the <myIndex> map
   //
-  Standard_Integer i, aNbS = myIndex.Extent();
+  Standard_Integer i = 0, aNbS = myIndex.Extent();
   for (i = 1; i <= aNbS; ++i) {
     const TopoDS_Shape& aSP = myIndex.FindKey(i);
     const TopTools_ListOfShape& aLSOr = myIndex(i);
@@ -780,7 +780,7 @@ Standard_Boolean BOPAlgo_CellsBuilder::RemoveInternals(const TopTools_ListOfShap
     }
     //
     // Unify same domain
-    Standard_Boolean bFaces, bEdges;
+    Standard_Boolean bFaces = 0, bEdges = 0;
     //
     bFaces = (aType == TopAbs_FACE);
     bEdges = (aType == TopAbs_EDGE);
@@ -808,7 +808,7 @@ Standard_Boolean BOPAlgo_CellsBuilder::RemoveInternals(const TopTools_ListOfShap
     //
     // fill map of modified shapes
     TopTools_IndexedMapOfShape aMG;
-    Standard_Integer i, aNb;
+    Standard_Integer i = 0, aNb = 0;
     //
     TopExp::MapShapes(aShape, TopAbs_VERTEX, aMG);
     TopExp::MapShapes(aShape, TopAbs_EDGE,   aMG);
@@ -881,7 +881,7 @@ Standard_Boolean BOPAlgo_CellsBuilder::RemoveInternals(const TopTools_ListOfShap
       //
       // to build unified solid, select only faces attached to only one solid
       TopTools_ListOfShape aLFUnique;
-      Standard_Integer i, aNb = aDMFS.Extent();
+      Standard_Integer i = 0, aNb = aDMFS.Extent();
       for (i = 1; i <= aNb; ++i) {
         if (aDMFS(i).Extent() == 1) {
           aLFUnique.Append(aDMFS.FindKey(i));
index 0f7db656d106f4ca46bb0c00b5efe0ffaa2eed09..ef301df84dacc3441c5d1a1d746a056a1a32d64a 100644 (file)
@@ -57,7 +57,7 @@ class BOPAlgo_FaceSelfIntersect :
     myIF(-1), myTolF(1.e-7) {
   }
   //
-  virtual ~BOPAlgo_FaceSelfIntersect() {
+  ~BOPAlgo_FaceSelfIntersect() override {
   }
   //
   void SetIndex(const Standard_Integer nF) {
@@ -84,7 +84,7 @@ class BOPAlgo_FaceSelfIntersect :
     return myTolF;
   }
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
@@ -110,9 +110,9 @@ typedef NCollection_Vector<BOPAlgo_FaceSelfIntersect> BOPAlgo_VectorOfFaceSelfIn
 //=======================================================================
 BOPAlgo_CheckerSI::BOPAlgo_CheckerSI()
 :
-  BOPAlgo_PaveFiller()
+  BOPAlgo_PaveFiller(), myLevelOfCheck(BOPDS_DS::NbInterfTypes()-1)
 {
-  myLevelOfCheck=BOPDS_DS::NbInterfTypes()-1;
+  
   myNonDestructive=Standard_True;
   SetAvoidBuildPCurve(Standard_True);
 }
@@ -129,7 +129,7 @@ BOPAlgo_CheckerSI::~BOPAlgo_CheckerSI()
 //=======================================================================
 void BOPAlgo_CheckerSI::SetLevelOfCheck(const Standard_Integer theLevel)
 {
-  Standard_Integer aNbLists;
+  Standard_Integer aNbLists = 0;
   //
   aNbLists=BOPDS_DS::NbInterfTypes();
   if (theLevel >= 0 && theLevel < aNbLists) {
@@ -215,7 +215,7 @@ void BOPAlgo_CheckerSI::Perform(const Message_ProgressRange& theRange)
 //=======================================================================
 void BOPAlgo_CheckerSI::PostTreat()
 {
-  Standard_Integer i, aNb, n1, n2
+  Standard_Integer i = 0, aNb = 0, n1 = 0, n2 = 0
   BOPDS_Pair aPK;
   //
   BOPDS_MapOfPair& aMPK=
@@ -293,8 +293,8 @@ void BOPAlgo_CheckerSI::PostTreat()
   BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
   aNb=aFFs.Length();
   for (i=0; i!=aNb; ++i) {
-    Standard_Boolean bTangentFaces, bFlag;
-    Standard_Integer aNbC, aNbP, j, iFound;
+    Standard_Boolean bTangentFaces = 0, bFlag = 0;
+    Standard_Integer aNbC = 0, aNbP = 0, j = 0, iFound = 0;
     //
     const BOPDS_InterfFF& aFF=aFFs(i);
     aFF.Indices(n1, n2);
index a033ba61011f40404d26d1dbeecf9ec3fd7de05d..27c1a02354ff079941cb783e5e6b4c84c568ddc4 100644 (file)
@@ -15,6 +15,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BOPAlgo_CheckerSI.hxx>
 
 #include <BOPDS_DS.hxx>
@@ -103,7 +105,7 @@ class BOPAlgo_VertexSolid {
       return;
     }
 
-    Standard_Real aTol;
+    Standard_Real aTol = NAN;
     gp_Pnt aPV;
     //
     BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(myZ);
@@ -179,7 +181,7 @@ class BOPAlgo_ShapeSolid {
       return;
     }
 
-    Standard_Boolean bHasInterf;
+    Standard_Boolean bHasInterf = 0;
     //
     myHasInterf=Standard_False;
     //
@@ -212,17 +214,17 @@ class BOPAlgo_SolidSolid : public  BOPAlgo_ShapeSolid {
     BOPAlgo_ShapeSolid() {
   };
   //
-  virtual ~BOPAlgo_SolidSolid(){
+  ~BOPAlgo_SolidSolid() override{
   };
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (!aPS.More())
     {
       return;
     }
 
-    Standard_Boolean bFlag;
+    Standard_Boolean bFlag = 0;
     //
     bFlag=Standard_False;
     myHasInterf=Standard_False;
@@ -244,7 +246,7 @@ void BOPAlgo_CheckerSI::PerformVZ(const Message_ProgressRange& theRange)
 {
   Message_ProgressScope aPSOuter(theRange, NULL, 1);
 
-  Standard_Integer iSize, nV, nZ, k, aNbVVS;
+  Standard_Integer iSize = 0, nV = 0, nZ = 0, k = 0, aNbVVS = 0;
   TopAbs_State aState;
   BOPDS_MapOfPair aMPK;
   //
@@ -339,8 +341,8 @@ void BOPAlgo_CheckerSI::PerformZZ(const Message_ProgressRange& theRange)
 {
   Message_ProgressScope aPSOuter(theRange, NULL, 1);
 
-  Standard_Boolean bHasInterf;
-  Standard_Integer iSize, nZ1, nZ, k, aNbSolidSolid;
+  Standard_Boolean bHasInterf = 0;
+  Standard_Integer iSize = 0, nZ1 = 0, nZ = 0, k = 0, aNbSolidSolid = 0;
   //
   myIterator->Initialize(TopAbs_SOLID, TopAbs_SOLID);
   iSize=myIterator->ExpectedLength();
@@ -398,8 +400,8 @@ void BOPAlgo_CheckerSI::PerformSZ(const TopAbs_ShapeEnum theTS, const Message_Pr
 {
   Message_ProgressScope aPSOuter(theRange, NULL, 1);
 
-  Standard_Boolean bHasInterf;
-  Standard_Integer iSize, nS, nZ, k, aNbShapeSolid;
+  Standard_Boolean bHasInterf = 0;
+  Standard_Integer iSize = 0, nS = 0, nZ = 0, k = 0, aNbShapeSolid = 0;
   //
   myIterator->Initialize(theTS, TopAbs_SOLID);
   iSize=myIterator->ExpectedLength();
index 58e480dc281a217d68dbeb9617cc6552eff37951..58106ddbafaaeb2062b5ba9c845ce57cdb8d7268 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BOPAlgo_BuilderSolid.hxx>
 #include <BOPAlgo_MakerVolume.hxx>
@@ -211,7 +213,7 @@ void BOPAlgo_MakerVolume::fillPISteps(BOPAlgo_PISteps& theSteps) const
 void BOPAlgo_MakerVolume::CollectFaces()
 {
   //
-  Standard_Integer i, aNbShapes;
+  Standard_Integer i = 0, aNbShapes = 0;
   TopTools_ListIteratorOfListOfShape aIt;
   TopTools_MapOfShape aMFence;
   //
@@ -249,7 +251,7 @@ void BOPAlgo_MakerVolume::CollectFaces()
 void BOPAlgo_MakerVolume::MakeBox(TopTools_MapOfShape& theBoxFaces)
 {
   //
-  Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax, anExt;
+  Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN, anExt = NAN;
   //
   anExt = sqrt(myBBox.SquareExtent()) * 0.5;
   myBBox.Enlarge(anExt);
@@ -302,7 +304,7 @@ void BOPAlgo_MakerVolume::RemoveBox(TopTools_ListOfShape&      theLSR,
   //
   TopTools_ListIteratorOfListOfShape aIt;
   TopExp_Explorer aExp;
-  Standard_Boolean bFound;
+  Standard_Boolean bFound = 0;
   //
   bFound = Standard_False;
   aIt.Initialize(theLSR);
index be31c116d8b8af515ce786d83e06a3a9e9d8440e..672e9ce0463dc10cc81a511a41f442bb91c21913 100644 (file)
@@ -58,14 +58,14 @@ namespace
 //=======================================================================
 BOPAlgo_PaveFiller::BOPAlgo_PaveFiller()
   :
-  BOPAlgo_Algo()
+  BOPAlgo_Algo(), myDS(NULL), myIterator(NULL), myNonDestructive(Standard_False), myIsPrimary(Standard_True), myAvoidBuildPCurve(Standard_False), myGlue(BOPAlgo_GlueOff)
 {
-  myDS = NULL;
-  myIterator = NULL;
-  myNonDestructive = Standard_False;
-  myIsPrimary = Standard_True;
-  myAvoidBuildPCurve = Standard_False;
-  myGlue = BOPAlgo_GlueOff;
+  
+  
+  
+  
+  
+  
 }
 //=======================================================================
 //function : 
@@ -75,17 +75,17 @@ BOPAlgo_PaveFiller::BOPAlgo_PaveFiller
 (const Handle (NCollection_BaseAllocator)& theAllocator)
   :
   BOPAlgo_Algo (theAllocator),
-  myFPBDone (1, theAllocator),
+  myDS(NULL), myIterator(NULL), myNonDestructive(Standard_False), myIsPrimary(Standard_True), myAvoidBuildPCurve(Standard_False), myGlue(BOPAlgo_GlueOff), myFPBDone (1, theAllocator),
   myIncreasedSS (1, theAllocator),
   myVertsToAvoidExtension (1, theAllocator),
   myDistances (1, theAllocator)
 {
-  myDS = NULL;
-  myIterator = NULL;
-  myNonDestructive = Standard_False;
-  myIsPrimary = Standard_True;
-  myAvoidBuildPCurve = Standard_False;
-  myGlue = BOPAlgo_GlueOff;
+  
+  
+  
+  
+  
+  
 }
 //=======================================================================
 //function : ~
@@ -387,7 +387,7 @@ void BOPAlgo_PaveFiller::RepeatIntersection (const Message_ProgressRange& theRan
     }
 
     // Check if the vertex created a new vertex with greater tolerance
-    Standard_Integer nVSD;
+    Standard_Integer nVSD = 0;
     if (!myDS->HasShapeSD (i, nVSD))
       continue;
 
index 9435f46ec625e112ed483ee1ec4e15cdad2511e5..156af606c34f12b5a74c084f74c3c80069d47cdf 100644 (file)
@@ -44,7 +44,7 @@
 //=======================================================================
 void BOPAlgo_PaveFiller::PerformVV(const Message_ProgressRange& theRange)
 {
-  Standard_Integer n1, n2, iFlag, aSize;
+  Standard_Integer n1 = 0, n2 = 0, iFlag = 0, aSize = 0;
   Handle(NCollection_BaseAllocator) aAllocator;
   //
   myIterator->Initialize(TopAbs_VERTEX, TopAbs_VERTEX);
@@ -140,7 +140,7 @@ Standard_Integer BOPAlgo_PaveFiller::MakeSDVertices
   TColStd_ListIteratorOfListOfInteger aItLI(theVertIndices);
   TopTools_ListOfShape aLV;
   for (; aItLI.More(); aItLI.Next()) {
-    Standard_Integer nX = aItLI.Value(), nSD1;
+    Standard_Integer nX = aItLI.Value(), nSD1 = 0;
     if (myDS->HasShapeSD(nX, nSD1)) {
       const TopoDS_Shape& aVSD1 = myDS->Shape(nSD1);
       if (nSD == -1) {
@@ -155,10 +155,10 @@ Standard_Integer BOPAlgo_PaveFiller::MakeSDVertices
     aLV.Append(aV);
   }
   BOPTools_AlgoTools::MakeVertex(aLV, aVn);
-  Standard_Integer nV;
+  Standard_Integer nV = 0;
   if (nSD != -1) {
     // update old SD vertex with new value
-    BRep_TVertex* aTVertex = static_cast<BRep_TVertex*>(aVSD.TShape().get());
+    BRep_TVertex* aTVertex = dynamic_cast<BRep_TVertex*>(aVSD.TShape().get());
     aTVertex->Pnt(BRep_Tool::Pnt(aVn));
     aTVertex->Tolerance(BRep_Tool::Tolerance(aVn));
     aVn = aVSD;
index bacc0fbccf3007018a22340cc944ac0840dbff7b..7c028a919e5445062e3a0ee76ac099885f613c67 100644 (file)
@@ -15,6 +15,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BOPAlgo_PaveFiller.hxx>
 
 #include <Precision.hxx>
@@ -44,7 +46,7 @@ void BOPAlgo_PaveFiller::SetNonDestructive()
     return;
   }
   //
-  Standard_Boolean bFlag;
+  Standard_Boolean bFlag = 0;
   TopTools_ListIteratorOfListOfShape aItLS;
   //
   bFlag=Standard_False;
@@ -74,7 +76,7 @@ void BOPAlgo_PaveFiller::UpdateEdgeTolerance (const Standard_Integer nE,
     TColStd_ListIteratorOfListOfInteger itLI(aLI);
     for (; itLI.More(); itLI.Next())
     {
-      Standard_Integer nV = itLI.Value(), nVSD;
+      Standard_Integer nV = itLI.Value(), nVSD = 0;
       if (!myDS->IsNewShape(nV) &&
           !myDS->HasShapeSD(nV, nVSD))
         return;
@@ -104,8 +106,8 @@ Standard_Integer BOPAlgo_PaveFiller::UpdateVertex
   (const Standard_Integer nV,
    const Standard_Real aTolNew)
 {
-  Standard_Integer nVNew;
-  Standard_Real aTolV;
+  Standard_Integer nVNew = 0;
+  Standard_Real aTolV = NAN;
   BRep_Builder aBB;
   
   nVNew = nV;
@@ -176,7 +178,7 @@ void BOPAlgo_PaveFiller::UpdateCommonBlocksWithSDVertices()
     UpdatePaveBlocksWithSDVertices();
     return;
   }
-  Standard_Integer aNbPBP;
+  Standard_Integer aNbPBP = 0;
   //
   BOPDS_VectorOfListOfPaveBlock& aPBP=myDS->ChangePaveBlocksPool();
   aNbPBP=aPBP.Length();
@@ -184,8 +186,8 @@ void BOPAlgo_PaveFiller::UpdateCommonBlocksWithSDVertices()
     return;
   }
   //
-  Standard_Integer i, nV1, nV2;
-  Standard_Real aTolV;
+  Standard_Integer i = 0, nV1 = 0, nV2 = 0;
+  Standard_Real aTolV = NAN;
   BOPDS_MapOfCommonBlock aMCB;
   BOPDS_ListIteratorOfListOfPaveBlock aItPB;
   Handle(BOPDS_PaveBlock) aPB;
@@ -225,10 +227,10 @@ namespace
     for (Standard_Integer i = 0; i < theInterfs.Length(); i++)
     {
       InterfType& anIntf = theInterfs(i);
-      Standard_Integer anInd;
+      Standard_Integer anInd = 0;
       if (anIntf.HasIndexNew(anInd))
       {
-        Standard_Integer anIndSD;
+        Standard_Integer anIndSD = 0;
         if (theDS->HasShapeSD(anInd, anIndSD))
         {
           anIntf.SetIndexNew(anIndSD);
index 7a3f312d1884596ed1b7fea3991f4ac8f1e8981c..daf2496d5515ad2107ec9e7d35e25563f5af901f 100644 (file)
@@ -36,7 +36,7 @@ void BOPAlgo_PaveFiller::CheckSelfInterference()
   //
   BRep_Builder aBB;
   //
-  Standard_Integer i, aNbR = myDS->NbRanges();
+  Standard_Integer i = 0, aNbR = myDS->NbRanges();
   for (i = 0; i < aNbR; ++i) {
     const BOPDS_IndexRange& aR = myDS->Range(i);
     //
@@ -149,7 +149,7 @@ void BOPAlgo_PaveFiller::CheckSelfInterference()
         //
         for (Standard_Integer k = 0; k < 2; ++k) {
           const BOPDS_IndexedMapOfPaveBlock& aMPBF = !k ? aFI.PaveBlocksIn() : aFI.PaveBlocksSc();
-          Standard_Integer iPB, aNbPB = aMPBF.Extent();
+          Standard_Integer iPB = 0, aNbPB = aMPBF.Extent();
           for (iPB = 1; iPB <= aNbPB; ++iPB) {
             const Handle(BOPDS_PaveBlock)& aPB = aMPBF(iPB);
             Standard_ASSERT(aPB->HasEdge(), "Face information is not up to date", continue);
@@ -175,7 +175,7 @@ void BOPAlgo_PaveFiller::CheckSelfInterference()
         TopoDS_Compound aWC;
         aBB.MakeCompound(aWC);
         //
-        Standard_Integer iS, aNbS = aMCS.Extent();
+        Standard_Integer iS = 0, aNbS = aMCS.Extent();
         for (iS = 1; iS <= aNbS; ++iS) {
           const TopoDS_Shape& aSx = aMCS(iS);
           aBB.Add(aWC, aSx);
index eecb0ff9a38de166d91ecfdc46899acbfbb9295a..b06fbbc27f30f42a6c6d75707201e408056dd3ba 100644 (file)
@@ -16,6 +16,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BOPAlgo_PaveFiller.hxx>
 #include <BOPAlgo_Alerts.hxx>
 #include <BOPAlgo_Tools.hxx>
@@ -50,7 +52,7 @@ class BOPAlgo_VertexEdge : public BOPAlgo_ParallelAlgo {
     myIV(-1), myIE(-1), myFlag(-1), myT(-1.), myTolVNew(-1.) {
   };
   //
-  virtual ~BOPAlgo_VertexEdge(){
+  ~BOPAlgo_VertexEdge() override{
   };
   //
   void SetIndices(const Standard_Integer nV,
@@ -109,7 +111,7 @@ class BOPAlgo_VertexEdge : public BOPAlgo_ParallelAlgo {
     return myPB;
   }
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
@@ -164,7 +166,7 @@ void BOPAlgo_PaveFiller::PerformVE(const Message_ProgressRange& theRange)
     {
       return;
     }
-    Standard_Integer nV, nE;
+    Standard_Integer nV = 0, nE = 0;
     myIterator->Value(nV, nE);
     //
     const BOPDS_ShapeInfo& aSIE=myDS->ShapeInfo(nE);
@@ -213,7 +215,7 @@ void BOPAlgo_PaveFiller::IntersectVE
    const Message_ProgressRange& theRange,
    const Standard_Boolean theAddInterfs)
 {
-  Standard_Integer i, aNbVE = theVEPairs.Extent();
+  Standard_Integer i = 0, aNbVE = theVEPairs.Extent();
   if (!aNbVE) {
     return;
   }
@@ -318,7 +320,7 @@ void BOPAlgo_PaveFiller::IntersectVE
       continue;
     }
     //
-    Standard_Integer nV, nE;
+    Standard_Integer nV = 0, nE = 0;
     aVESolver.Indices(nV, nE);
     // Parameter of vertex on edge
     Standard_Real aT = aVESolver.Parameter();
@@ -334,7 +336,7 @@ void BOPAlgo_PaveFiller::IntersectVE
     for (; itPB.More(); itPB.Next())
     {
       aPB = itPB.Value();
-      Standard_Real aT1, aT2;
+      Standard_Real aT1 = NAN, aT2 = NAN;
       aPB->Range (aT1, aT2);
       if (aT > aT1 && aT < aT2)
         break;
@@ -448,7 +450,7 @@ void BOPAlgo_PaveFiller::SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges,
         Standard_Boolean bCheckDist = (bHasValidRange && !aPBN->IsSplittable());
         if (!bHasValidRange || bCheckDist)
         {
-          Standard_Integer nV1, nV2;
+          Standard_Integer nV1 = 0, nV2 = 0;
           aPBN->Indices(nV1, nV2);
           if (nV1 == nV2)
             // Same vertices -> no valid range, no need to unify vertices
@@ -501,7 +503,7 @@ void BOPAlgo_PaveFiller::SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges,
   }
   //
   // Make Common Blocks
-  Standard_Integer i, aNbCB = aMCBNewPB.Extent();
+  Standard_Integer i = 0, aNbCB = aMCBNewPB.Extent();
   for (i = 1; i <= aNbCB; ++i) {
     const Handle(BOPDS_CommonBlock)& aCB = aMCBNewPB.FindKey(i);
     const BOPDS_ListOfPaveBlock& aLPBN = aMCBNewPB(i);
@@ -522,11 +524,11 @@ void BOPAlgo_PaveFiller::SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges,
       pLPBx->Append(aPB);
     }
     //
-    Standard_Integer nV1, nV2;
+    Standard_Integer nV1 = 0, nV2 = 0;
     aCB->PaveBlock1()->Indices(nV1, nV2);
     Standard_Boolean bIsClosed = (nV1 == nV2);
     //
-    Standard_Integer j, aNbPairs = aMInds.Extent();
+    Standard_Integer j = 0, aNbPairs = aMInds.Extent();
     for (j = 1; j <= aNbPairs; ++j) {
       BOPDS_ListOfPaveBlock& aLPB = aMInds(j);
       //
@@ -564,7 +566,7 @@ void BOPAlgo_PaveFiller::SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges,
           const TopoDS_Edge& aE = TopoDS::Edge(myDS->Shape(aPB->OriginalEdge()));
           Standard_Real aTolE = BRep_Tool::MaxTolerance(aE, TopAbs_VERTEX);
           //
-          Standard_Real aTOut, aDist;
+          Standard_Real aTOut = NAN, aDist = NAN;
           Standard_Integer iErr =
             myContext->ComputePE(aPMFirst, aTolEFirst + aTolE + myFuzzyValue, aE, aTOut, aDist);
           if (!iErr && ((aTOut > aPB->Pave1().Parameter()) && (aTOut < aPB->Pave2().Parameter()))) {
index 0e36f380fb96a327f6ac6d0410a3f79ff7795801..731be8e955f635d2f0c9e4f5cb6f68bc39942584 100644 (file)
@@ -16,6 +16,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BOPAlgo_PaveFiller.hxx>
 #include <BOPAlgo_Tools.hxx>
@@ -66,7 +68,7 @@ class BOPAlgo_EdgeEdge :
     BOPAlgo_ParallelAlgo() {
   };
   //
-  virtual ~BOPAlgo_EdgeEdge(){
+  ~BOPAlgo_EdgeEdge() override{
   };
   //
   void SetPaveBlock1(const Handle(BOPDS_PaveBlock)& aPB) {
@@ -96,7 +98,7 @@ class BOPAlgo_EdgeEdge :
     IntTools_EdgeEdge::SetFuzzyValue(theFuzz);
   }
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
@@ -165,10 +167,10 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange)
     return; 
   }
   //
-  Standard_Boolean bExpressCompute, bIsPBSplittable1, bIsPBSplittable2;
-  Standard_Integer i, iX, nE1, nE2, aNbCPrts, k, aNbEdgeEdge;
-  Standard_Integer nV11, nV12, nV21, nV22;
-  Standard_Real aTS11, aTS12, aTS21, aTS22, aT11, aT12, aT21, aT22;
+  Standard_Boolean bExpressCompute = 0, bIsPBSplittable1 = 0, bIsPBSplittable2 = 0;
+  Standard_Integer i = 0, iX = 0, nE1 = 0, nE2 = 0, aNbCPrts = 0, k = 0, aNbEdgeEdge = 0;
+  Standard_Integer nV11 = 0, nV12 = 0, nV21 = 0, nV22 = 0;
+  Standard_Real aTS11 = NAN, aTS12 = NAN, aTS21 = NAN, aTS22 = NAN, aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN;
   TopAbs_ShapeEnum aType;
   BOPDS_ListIteratorOfListOfPaveBlock aIt1, aIt2;
   Handle(NCollection_BaseAllocator) aAllocator;
@@ -367,8 +369,8 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange)
           }
           //
           Standard_Boolean bIsOnPave[4];
-          Standard_Integer nV[4], j;
-          Standard_Real aT1, aT2, aTol;
+          Standard_Integer nV[4], j = 0;
+          Standard_Real aT1 = NAN, aT2 = NAN, aTol = NAN;
           TopoDS_Vertex aVnew;
           IntTools_Range aCR1, aCR2;
           //
@@ -453,8 +455,8 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange)
           }
           // <-LXBR
           {
-            Standard_Integer nVS[2], iFound;
-            Standard_Real aTolVx, aD2, aDT2;
+            Standard_Integer nVS[2], iFound = 0;
+            Standard_Real aTolVx = NAN, aD2 = NAN, aDT2 = NAN;
             TColStd_MapOfInteger aMV;
             gp_Pnt aPx;
             //
@@ -513,7 +515,7 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange)
             break;
           }
           //
-          Standard_Boolean bHasSameBounds;
+          Standard_Boolean bHasSameBounds = 0;
           bHasSameBounds=aPB1->HasSameBounds(aPB2);
           if (!bHasSameBounds) {
             break;
@@ -593,7 +595,7 @@ void BOPAlgo_PaveFiller::PerformNewVertices
   //
     // 4. Compute Extra Paves and split Pave blocks by the Extra paves
   Message_ProgressScope aPS(theRange, NULL, 2);
-  Standard_Integer i, aNb = aImages.Extent();
+  Standard_Integer i = 0, aNb = aImages.Extent();
   Message_ProgressScope aPS1(aPS.Next(), NULL, aNb + aNbV);
   for (i = 1; i <= aNb; ++i, aPS1.Next()) {
     if (UserBreak(aPS))
@@ -663,7 +665,7 @@ void BOPAlgo_PaveFiller::TreatNewVertices
   //
   // Prepare for intersection
   TopTools_IndexedDataMapOfShapeReal aVerts;
-  Standard_Integer i, aNbV = theMVCPB.Extent();
+  Standard_Integer i = 0, aNbV = theMVCPB.Extent();
   for (i = 1; i <= aNbV; ++i) {
     const TopoDS_Shape& aV = theMVCPB.FindKey(i);
     Standard_Real aTol = theMVCPB.FindFromIndex(i).Tolerance();
@@ -691,7 +693,7 @@ void BOPAlgo_PaveFiller::TreatNewVertices
 void BOPAlgo_PaveFiller::FillShrunkData(Handle(BOPDS_PaveBlock)& thePB)
 {
   // Vertices
-  Standard_Integer nV1, nV2;
+  Standard_Integer nV1 = 0, nV2 = 0;
   thePB->Indices(nV1, nV2);
 
   if (nV1 < 0 || nV2 < 0)
@@ -712,7 +714,7 @@ void BOPAlgo_PaveFiller::FillShrunkData(Handle(BOPDS_PaveBlock)& thePB)
 
   const TopoDS_Edge& aE=(*(TopoDS_Edge *)(&myDS->Shape(nE))); 
   // Range
-  Standard_Real aT1, aT2;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   thePB->Range(aT1, aT2);
   //
   IntTools_ShrunkRange aSR;
@@ -734,7 +736,7 @@ void BOPAlgo_PaveFiller::AnalyzeShrunkData(const Handle(BOPDS_PaveBlock)& thePB,
   TopoDS_Shape aWarnShape;
   //
   if (!theSR.IsDone() || !theSR.IsSplittable()) {
-    Standard_Real aEFirst, aELast, aPBFirst, aPBLast;
+    Standard_Real aEFirst = NAN, aELast = NAN, aPBFirst = NAN, aPBLast = NAN;
     BRep_Tool::Range(theSR.Edge(), aEFirst, aELast);
     thePB->Range(aPBFirst, aPBLast);
     bWholeEdge = !(aPBFirst > aEFirst || aPBLast < aELast);
@@ -755,7 +757,7 @@ void BOPAlgo_PaveFiller::AnalyzeShrunkData(const Handle(BOPDS_PaveBlock)& thePB,
         AddWarning (new BOPAlgo_AlertTooSmallEdge (aWarnShape));
       else
         AddWarning (new BOPAlgo_AlertBadPositioning (aWarnShape));
-      Standard_Real aTS1, aTS2;
+      Standard_Real aTS1 = NAN, aTS2 = NAN;
       theSR.ShrunkRange(aTS1, aTS2);
       thePB->SetShrunkData(aTS1, aTS2, Bnd_Box(), Standard_False);
       return;
@@ -767,7 +769,7 @@ void BOPAlgo_PaveFiller::AnalyzeShrunkData(const Handle(BOPDS_PaveBlock)& thePB,
       AddWarning (new BOPAlgo_AlertBadPositioning (aWarnShape));
   }
   //
-  Standard_Real aTS1, aTS2;
+  Standard_Real aTS1 = NAN, aTS2 = NAN;
   theSR.ShrunkRange(aTS1, aTS2);
   Bnd_Box aBox = theSR.BndBox();
   aBox.SetGap(aBox.GetGap() + myFuzzyValue / 2.);
@@ -781,8 +783,8 @@ Standard_Boolean BOPAlgo_PaveFiller::ForceInterfVE(const Standard_Integer nV,
                                                    Handle(BOPDS_PaveBlock)& aPB,
                                                    TColStd_MapOfInteger& theMEdges)
 {
-  Standard_Integer nE, nVx, nVSD, iFlag;
-  Standard_Real aT, aTolVNew;
+  Standard_Integer nE = 0, nVx = 0, nVSD = 0, iFlag = 0;
+  Standard_Real aT = NAN, aTolVNew = NAN;
   //
   nE = aPB->OriginalEdge();
   //
@@ -876,7 +878,7 @@ Standard_Boolean BOPAlgo_PaveFiller::GetPBBox(const TopoDS_Edge& theE,
   //
   // check shrunk data
   if (thePB->HasShrunkData()) {
-    Standard_Boolean bIsSplittable;
+    Standard_Boolean bIsSplittable = 0;
     thePB->ShrunkData(theSFirst, theSLast, theBox, bIsSplittable);
     return bValid;
   }
@@ -997,7 +999,7 @@ void BOPAlgo_PaveFiller::ForceInterfEE(const Message_ProgressRange& theRange)
         continue;
 
       // Get indices
-      Standard_Integer nV1, nV2;
+      Standard_Integer nV1 = 0, nV2 = 0;
       aPBR->Indices(nV1, nV2);
 
       // Add pave block to a map
@@ -1029,7 +1031,7 @@ void BOPAlgo_PaveFiller::ForceInterfEE(const Message_ProgressRange& theRange)
       continue;
 
     const BOPDS_Pair& aPair = aPBMap.FindKey(i);
-    Standard_Integer nV1, nV2;
+    Standard_Integer nV1 = 0, nV2 = 0;
     aPair.Indices(nV1, nV2);
 
     const TopoDS_Vertex& aV1 = TopoDS::Vertex(myDS->Shape(nV1));
@@ -1051,7 +1053,7 @@ void BOPAlgo_PaveFiller::ForceInterfEE(const Message_ProgressRange& theRange)
       const Standard_Integer nE1 = aPB1->OriginalEdge();
       const Standard_Integer iR1 = myDS->Rank(nE1);
       const TopoDS_Edge& aE1 = TopoDS::Edge(myDS->Shape(nE1));
-      Standard_Real aT11, aT12;
+      Standard_Real aT11 = NAN, aT12 = NAN;
       aPB1->Range(aT11, aT12);
       BRepAdaptor_Curve aBAC1(aE1);
       gp_Pnt aPm;
@@ -1088,7 +1090,7 @@ void BOPAlgo_PaveFiller::ForceInterfEE(const Message_ProgressRange& theRange)
         }
 
         const TopoDS_Edge& aE2 = TopoDS::Edge(myDS->Shape(nE2));
-        Standard_Real aT21, aT22;
+        Standard_Real aT21 = NAN, aT22 = NAN;
         aPB2->Range(aT21, aT22);
 
         // Check the angle between edges in the middle point.
index e39b6276a1312bd2f997cf9ab3deb6cef40d7919..611064dc077ec830a10890d56ab6b23b04445ee5 100644 (file)
@@ -16,6 +16,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BOPAlgo_PaveFiller.hxx>
 #include <BOPAlgo_Alerts.hxx>
 #include <BOPDS_DS.hxx>
@@ -46,7 +48,7 @@ class BOPAlgo_VertexFace : public BOPAlgo_ParallelAlgo {
     myFlag(-1), myT1(-1.),  myT2(-1.), myTolVNew(-1.) {
   }
   //
-  virtual ~BOPAlgo_VertexFace(){
+  ~BOPAlgo_VertexFace() override{
   }
   //
   void SetIndices(const Standard_Integer nV,
@@ -99,7 +101,7 @@ class BOPAlgo_VertexFace : public BOPAlgo_ParallelAlgo {
     return myContext;
   }
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
@@ -140,7 +142,7 @@ void BOPAlgo_PaveFiller::PerformVF(const Message_ProgressRange& theRange)
   myIterator->Initialize(TopAbs_VERTEX, TopAbs_FACE);
   Standard_Integer iSize = myIterator->ExpectedLength();
   //
-  Standard_Integer nV, nF;
+  Standard_Integer nV = 0, nF = 0;
   //
   Message_ProgressScope aPSOuter(theRange, NULL, 10);
   if (myGlue == BOPAlgo_GlueFull) {
@@ -164,8 +166,8 @@ void BOPAlgo_PaveFiller::PerformVF(const Message_ProgressRange& theRange)
     return;
   }
   //
-  Standard_Integer nVSD, iFlag, nVx, aNbVF, k;
-  Standard_Real aT1, aT2;
+  Standard_Integer nVSD = 0, iFlag = 0, nVx = 0, aNbVF = 0, k = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   BOPAlgo_VectorOfVertexFace aVVF; 
   //
   aVFs.SetIncrement(iSize);
@@ -292,8 +294,8 @@ void BOPAlgo_PaveFiller::PerformVF(const Message_ProgressRange& theRange)
 //=======================================================================
 void BOPAlgo_PaveFiller::TreatVerticesEE()
 {
-  Standard_Integer i, aNbS,aNbEEs, nF, nV, iFlag;
-  Standard_Real aT1, aT2, dummy;
+  Standard_Integer i = 0, aNbS = 0,aNbEEs = 0, nF = 0, nV = 0, iFlag = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN, dummy = NAN;
   TColStd_ListIteratorOfListOfInteger aItLI;
   Handle(NCollection_BaseAllocator) aAllocator;
   //
index 0e4c6ed89f29137cf47b98962811daf5d48e7e9e..9f527d1ca2d955d017b21ff438d9bb15d0f82b2b 100644 (file)
@@ -16,6 +16,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <Bnd_Tools.hxx>
 #include <BOPAlgo_PaveFiller.hxx>
@@ -67,7 +69,7 @@ class BOPAlgo_EdgeFace :
     myIE(-1), myIF(-1) {
   };
   //
-  virtual ~BOPAlgo_EdgeFace(){
+  ~BOPAlgo_EdgeFace() override{
   };
   //
   void SetIndices(const Standard_Integer nE,
@@ -109,7 +111,7 @@ class BOPAlgo_EdgeFace :
     myBox2 = theBox2;
   }
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
@@ -179,7 +181,7 @@ void BOPAlgo_PaveFiller::PerformEF(const Message_ProgressRange& theRange)
     return; 
   }
   //
-  Standard_Integer nE, nF;
+  Standard_Integer nE = 0, nF = 0;
   //
   if (myGlue == BOPAlgo_GlueFull) {
     // there is no need to intersect edges with faces in this mode
@@ -193,12 +195,12 @@ void BOPAlgo_PaveFiller::PerformEF(const Message_ProgressRange& theRange)
     return;
   }
   //
-  Standard_Boolean bV[2], bIsPBSplittable;
-  Standard_Boolean bV1, bV2, bExpressCompute;
-  Standard_Integer nV1, nV2;
-  Standard_Integer i, aNbCPrts, iX, nV[2];
-  Standard_Integer aNbEdgeFace, k;
-  Standard_Real aTolE, aTolF, aTS1, aTS2, aT1, aT2;
+  Standard_Boolean bV[2], bIsPBSplittable = 0;
+  Standard_Boolean bV1 = 0, bV2 = 0, bExpressCompute = 0;
+  Standard_Integer nV1 = 0, nV2 = 0;
+  Standard_Integer i = 0, aNbCPrts = 0, iX = 0, nV[2];
+  Standard_Integer aNbEdgeFace = 0, k = 0;
+  Standard_Real aTolE = NAN, aTolF = NAN, aTS1 = NAN, aTS2 = NAN, aT1 = NAN, aT2 = NAN;
   Handle(NCollection_BaseAllocator) aAllocator;
   TopAbs_ShapeEnum aType;
   BOPDS_ListIteratorOfListOfPaveBlock aIt;
@@ -388,8 +390,8 @@ void BOPAlgo_PaveFiller::PerformEF(const Message_ProgressRange& theRange)
       switch (aType) {
         case TopAbs_VERTEX: {
           Standard_Boolean bIsOnPave[2];
-          Standard_Integer j;
-          Standard_Real aT, aTolToDecide
+          Standard_Integer j = 0;
+          Standard_Real aT = NAN, aTolToDecide = NAN
           TopoDS_Vertex aVnew;
           //
           IntTools_Tools::VertexParameter(aCPart, aT);
@@ -573,8 +575,8 @@ Standard_Boolean BOPAlgo_PaveFiller::CheckFacePaves
    const TColStd_MapOfInteger& aMIFOn,
    const TColStd_MapOfInteger& aMIFIn)
 {
-  Standard_Boolean bRet;
-  Standard_Integer nV;
+  Standard_Boolean bRet = 0;
+  Standard_Integer nV = 0;
   TColStd_MapIteratorOfMapOfInteger aIt;
   //
   bRet=Standard_False;
@@ -606,8 +608,8 @@ Standard_Boolean BOPAlgo_PaveFiller::CheckFacePaves
   (const TopoDS_Vertex& aVnew,
    const TColStd_MapOfInteger& aMIF)
 {
-  Standard_Boolean bRet;
-  Standard_Integer nV, iFlag;
+  Standard_Boolean bRet = 0;
+  Standard_Integer nV = 0, iFlag = 0;
   TColStd_MapIteratorOfMapOfInteger aIt;
   //
   bRet=Standard_True;
@@ -632,9 +634,9 @@ Standard_Boolean BOPAlgo_PaveFiller::ForceInterfVF
   (const Standard_Integer nV, 
    const Standard_Integer nF)
 {
-  Standard_Boolean bRet;
-  Standard_Integer iFlag, nVx;
-  Standard_Real U, V, aTolVNew;
+  Standard_Boolean bRet = 0;
+  Standard_Integer iFlag = 0, nVx = 0;
+  Standard_Real U = NAN, V = NAN, aTolVNew = NAN;
   //
   bRet = Standard_False;
   const TopoDS_Vertex& aV = *(TopoDS_Vertex*)&myDS->Shape(nV);
@@ -705,8 +707,8 @@ void BOPAlgo_PaveFiller::ReduceIntersectionRange(const Standard_Integer theV1,
     return;
   }
   //
-  Standard_Integer i, nV, nE1, nE2;
-  Standard_Real aTR1, aTR2;
+  Standard_Integer i = 0, nV = 0, nE1 = 0, nE2 = 0;
+  Standard_Real aTR1 = NAN, aTR2 = NAN;
   //
   // get face's edges to check that E/E contains the edge from the face
   TColStd_MapOfInteger aMFE;
@@ -844,9 +846,9 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB
       return;
     }
 
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     Bnd_Box aPBBox;
-    Standard_Boolean isSplit;
+    Standard_Boolean isSplit = 0;
     aPB->ShrunkData(f, l, aPBBox, isSplit);
 
     aBBTree.Add(aPBMap.Add(aPB), Bnd_Tools::Bnd2BVH(aPBBox));
@@ -931,14 +933,14 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB
         continue;
 
       // Check if the face contains both vertices of the pave block
-      Standard_Integer nV1, nV2;
+      Standard_Integer nV1 = 0, nV2 = 0;
       aPB->Indices(nV1, nV2);
       if (!aMVF.Contains(nV1) || !aMVF.Contains(nV2))
         // Face does not contain the vertices
         continue;
 
       // Get the edge
-      Standard_Integer nE;
+      Standard_Integer nE = 0;
       if (!aPB->HasEdge(nE))
       {
         nE = aPB->OriginalEdge();
@@ -962,7 +964,7 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB
 
       Standard_Real aTS[2];
       Bnd_Box aPBBox;
-      Standard_Boolean isSplit;
+      Standard_Boolean isSplit = 0;
       aPB->ShrunkData(aTS[0], aTS[1], aPBBox, isSplit);
 
       // Middle point
@@ -991,7 +993,7 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB
       if (aProjPS.LowerDistance() > aTolCheck + myFuzzyValue)
         continue;
 
-      Standard_Real U, V;
+      Standard_Real U = NAN, V = NAN;
       aProjPS.LowerDistanceParameters(U, V);
       if (!myContext->IsPointInFace(aF, gp_Pnt2d(U, V)))
         continue;
@@ -1119,7 +1121,7 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB
     if (aCP.Type() != TopAbs_EDGE)
       continue;
 
-    Standard_Integer nE, nF;
+    Standard_Integer nE = 0, nF = 0;
     anEdgeFace.Indices(nE, nF);
     if (theAddInterf)
     {
index 68fc9e9e97b5a3e2811c19cbd7d5b7da412341a7..4a9ccf0537c75d97e9e2d87e0dbb0a6f058b5bbd 100644 (file)
@@ -15,6 +15,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BOPAlgo_PaveFiller.hxx>
 #include <Bnd_Box.hxx>
 #include <BOPAlgo_Alerts.hxx>
@@ -98,7 +100,7 @@ class BOPAlgo_FaceFace :
     myIF1(-1), myIF2(-1), myTolFF(1.e-7) {
   }
   //
-  virtual ~BOPAlgo_FaceFace() {
+  ~BOPAlgo_FaceFace() override {
   }
   //
   void SetIndices(const Standard_Integer nF1,
@@ -147,7 +149,7 @@ class BOPAlgo_FaceFace :
   //
   const gp_Trsf& Trsf() const { return myTrsf; }
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
@@ -240,7 +242,7 @@ void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange)
 
   // Collect faces from intersection pairs
   TColStd_MapOfInteger aMIFence;
-  Standard_Integer nF1, nF2;
+  Standard_Integer nF1 = 0, nF2 = 0;
   for (; myIterator->More(); myIterator->Next())
   {
     myIterator->Value(nF1, nF2);
@@ -290,7 +292,7 @@ void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange)
     {
       continue;
     }
-    Standard_Integer nE1, nE2;
+    Standard_Integer nE1 = 0, nE2 = 0;
     aEE.Indices(nE1, nE2);
 
     const Standard_Integer nVN = aEE.IndexNew();
@@ -438,7 +440,7 @@ void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange)
     }
   }//for (; myIterator->More(); myIterator->Next()) {
   //
-  Standard_Integer k, aNbFaceFace = aVFaceFace.Length();;
+  Standard_Integer k = 0, aNbFaceFace = aVFaceFace.Length();;
   Message_ProgressScope aPS(aPSOuter.Next(), "Performing Face-Face intersection", aNbFaceFace);
   for (k = 0; k < aNbFaceFace; k++)
   {
@@ -575,10 +577,10 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange)
     return;
   }
   //
-  Standard_Boolean bExist, bValid2D;
-  Standard_Integer i, nF1, nF2, aNbC, aNbP, j;
-  Standard_Integer nV1, nV2;
-  Standard_Real aT1, aT2;
+  Standard_Boolean bExist = 0, bValid2D = 0;
+  Standard_Integer i = 0, nF1 = 0, nF2 = 0, aNbC = 0, aNbP = 0, j = 0;
+  Standard_Integer nV1 = 0, nV2 = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   Handle(NCollection_BaseAllocator) aAllocator = new NCollection_IncAllocator;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
   TopoDS_Edge aES;
@@ -767,7 +769,7 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange)
           continue;
         }
         //
-        Standard_Integer nEOut;
+        Standard_Integer nEOut = 0;
         Standard_Real aTolNew = -1.;
         bExist = IsExistingPaveBlock(aPB, aNC, aLSE, nEOut, aTolNew);
         if (bExist)
@@ -783,7 +785,7 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange)
         const TopoDS_Vertex& aV2=(*(TopoDS_Vertex *)(&myDS->Shape(nV2)));
         //
         // check if the pave block has a valid range
-        Standard_Real aFirst, aLast;
+        Standard_Real aFirst = NAN, aLast = NAN;
         if (!BRepLib::FindValidRange(GeomAdaptor_Curve(aIC.Curve()), aTolR3D,
                                      aT1, BRep_Tool::Pnt(aV1), Max (aTolR3D, BRep_Tool::Tolerance(aV1)),
                                      aT2, BRep_Tool::Pnt(aV2), Max (aTolR3D, BRep_Tool::Tolerance(aV2)),
@@ -835,7 +837,7 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange)
             // Try fusing the vertices of the existing pave block
             // with the vertices put on the real section curve (except
             // for technological vertices, which will be removed)
-            Standard_Integer nVOut1, nVOut2;
+            Standard_Integer nVOut1 = 0, nVOut2 = 0;
             aPBOut->Indices(nVOut1, nVOut2);
             if (nV1 != nVOut1 && nV1 != nVOut2 && !aMVBounds.Contains(nV1))
             {
@@ -986,14 +988,14 @@ void BOPAlgo_PaveFiller::PostTreatFF
     return;
   }
   //
-  Standard_Boolean bHasPaveBlocks, bOld;
-  Standard_Integer nSx, nVSD, iX, iP, iC, j, nV, iV = 0, iE, k;
-  Standard_Integer aNbLPBx;
+  Standard_Boolean bHasPaveBlocks = 0, bOld = 0;
+  Standard_Integer nSx = 0, nVSD = 0, iX = 0, iP = 0, iC = 0, j = 0, nV = 0, iV = 0, iE = 0, k = 0;
+  Standard_Integer aNbLPBx = 0;
   TopAbs_ShapeEnum aType;
   TopoDS_Shape aV, aE;
   TopTools_ListIteratorOfListOfShape aItLS;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
-  BOPDS_PDS aPDS;
+  BOPDS_PDS aPDS = nullptr;
   Handle(BOPDS_PaveBlock) aPB1;
   BOPDS_Pave aPave[2];
   BOPDS_ShapeInfo aSI;
@@ -1013,7 +1015,7 @@ void BOPAlgo_PaveFiller::PostTreatFF
   for (Standard_Integer i = 0; i < aNbFF; i++)
   {
     BOPDS_InterfFF& aFF = aFFs(i);
-    Standard_Integer nF1, nF2;
+    Standard_Integer nF1 = 0, nF2 = 0;
     aFF.Indices(nF1, nF2);
     
     TColStd_MapOfInteger aMV, aMVEF, aMI;
@@ -1329,7 +1331,7 @@ void BOPAlgo_PaveFiller::PostTreatFF
                 else {
                   // check aPDS to have the SD connection between these vertices
                   const TopoDS_Shape& aVPave = myDS->Shape(aP1.Index());
-                  Standard_Integer nVnewSD, nVnew = aPDS->Index(aVPave);
+                  Standard_Integer nVnewSD = 0, nVnew = aPDS->Index(aVPave);
                   if (aPDS->HasShapeSD(nVnew, nVnewSD)) {
                     if (nVnewSD == nV) {
                       aDMNewSD.Bind(aP1.Index(), iV);
@@ -1415,8 +1417,8 @@ void BOPAlgo_PaveFiller::UpdateFaceInfo
    const TColStd_DataMapOfIntegerInteger& theDMV,
    const BOPAlgo_DataMapOfPaveBlockListOfInteger& thePBFacesMap)
 {
-  Standard_Integer i, j, nV1, nF1, nF2
-                   aNbFF, aNbC, aNbP;
+  Standard_Integer i = 0, j = 0, nV1 = 0, nF1 = 0, nF2 = 0
+                   aNbFF = 0, aNbC = 0, aNbP = 0;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
   TColStd_MapOfInteger aMF;
 
@@ -1585,7 +1587,7 @@ void BOPAlgo_PaveFiller::UpdateFaceInfo
   //
   // 2. Update Face Info information with new vertices and new
   //    pave blocks created in PostTreatFF from existing ones
-  Standard_Integer nV2;
+  Standard_Integer nV2 = 0;
   TColStd_MapIteratorOfMapOfInteger aItMF;
   TColStd_DataMapIteratorOfDataMapOfIntegerInteger aItMV;
   //
@@ -1662,9 +1664,9 @@ Standard_Boolean BOPAlgo_PaveFiller::IsExistingVertex
    const Standard_Real theTolR3D,
    const TColStd_MapOfInteger& aMVOnIn)const
 {
-  Standard_Boolean bRet;
-  Standard_Integer nV, iFlag;
-  Standard_Real aTolCheck;
+  Standard_Boolean bRet = 0;
+  Standard_Integer nV = 0, iFlag = 0;
+  Standard_Real aTolCheck = NAN;
   gp_Pnt aPV;
   Bnd_Box aBoxP;
   TColStd_MapIteratorOfMapOfInteger aIt;
@@ -1705,8 +1707,8 @@ Standard_Boolean BOPAlgo_PaveFiller::IsExistingPaveBlock
   if (theLSE.IsEmpty())
     return Standard_False;
 
-  Standard_Real aT1, aT2, aTm, aTx, aTolE, aTolCheck, aTol, aDist;
-  Standard_Integer nE, iFlag, nV1, nV2;
+  Standard_Real aT1 = NAN, aT2 = NAN, aTm = NAN, aTx = NAN, aTolE = NAN, aTolCheck = NAN, aTol = NAN, aDist = NAN;
+  Standard_Integer nE = 0, iFlag = 0, nV1 = 0, nV2 = 0;
   gp_Pnt aPm;
   Bnd_Box aBoxPm;
   TColStd_ListIteratorOfListOfInteger aItLI;
@@ -1764,10 +1766,10 @@ Standard_Boolean BOPAlgo_PaveFiller::IsExistingPaveBlock
 {
   const IntTools_Curve& aIC=theNC.Curve();
 
-  Standard_Real aT1, aT2;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   thePB->Range(aT1, aT2);
 
-  Standard_Integer nV11, nV12;
+  Standard_Integer nV11 = 0, nV12 = 0;
   thePB->Indices (nV11, nV12);
 
   //first point
@@ -1823,7 +1825,7 @@ Standard_Boolean BOPAlgo_PaveFiller::IsExistingPaveBlock
   {
     const Handle (BOPDS_PaveBlock)& aPB = theMPBOnIn (it.Value());
 
-    Standard_Integer nV21, nV22;
+    Standard_Integer nV21 = 0, nV22 = 0;
     aPB->Indices (nV21, nV22);
 
     const Standard_Real aTolV21 = BRep_Tool::Tolerance (TopoDS::Vertex (myDS->Shape (nV21)));
@@ -1871,7 +1873,7 @@ Standard_Boolean BOPAlgo_PaveFiller::IsExistingPaveBlock
           if (aIC.Type() != GeomAbs_Line ||
             aBAC2.GetType() != GeomAbs_Line)
           {
-            Standard_Real aTldp;
+            Standard_Real aTldp = NAN;
             Standard_Real aTolAdd = 2. * Min(aMaxTolAdd, Max(aRealTol, Max(aTolV1, aTolV2)));
             aPEStatus = myContext->ComputePE(aPm, aTolAdd, aSp, 
                                              aTldp, aDistm1m2);
@@ -1901,7 +1903,7 @@ Standard_Boolean BOPAlgo_PaveFiller::IsExistingPaveBlock
     aBoxTmp.Enlarge(aRealTol);
 
     Standard_Real aDistToSp = 0.;
-    Standard_Real aTx;
+    Standard_Real aTx = NAN;
     if (aBoxSp.IsOut(aBoxTmp) || aPEStatus < 0)
     {
       continue;
@@ -1964,8 +1966,8 @@ static void getBoundPaves(const BOPDS_DS* theDS,
   for (BOPDS_ListIteratorOfListOfPave aItLP(aLP); aItLP.More(); aItLP.Next())
   {
     const BOPDS_Pave& aPv = aItLP.Value();
-    Standard_Integer nV;
-    Standard_Real aTV;
+    Standard_Integer nV = 0;
+    Standard_Real aTV = NAN;
     aPv.Contents(nV, aTV);
     if (aTV < aTmin) {
       theNV[0] = aPv.Index();
@@ -2068,7 +2070,7 @@ void BOPAlgo_PaveFiller::PutPavesOnCurve(const TColStd_MapOfInteger& theMVOnIn,
                                          TColStd_DataMapOfIntegerReal& theMVTol,
                                          TColStd_DataMapOfIntegerListOfInteger& theDMVLV)
 {
-  Standard_Integer nV;
+  Standard_Integer nV = 0;
   TColStd_MapIteratorOfMapOfInteger aIt;
   //
   const Bnd_Box& aBoxC = theNC.Box();
@@ -2130,7 +2132,7 @@ void BOPAlgo_PaveFiller::FilterPavesOnCurves(const BOPDS_VectorOfCurve& theVNC,
   // For each vertex found in ExtPaves of pave blocks of section curves
   // collect list of pave blocks with distance to the curve
   NCollection_IndexedDataMap<Standard_Integer,NCollection_List<PaveBlockDist> > aIDMVertPBs;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   const Standard_Real anEps = gp::Resolution();
   for (i = 0; i < theVNC.Length(); ++i)
   {
@@ -2235,8 +2237,8 @@ Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance
     return bFound;
   }
   //
-  Standard_Integer i, k, aNbLines, aNbInt;
-  Standard_Real aT11, aT12, aD1, aD2, aD;
+  Standard_Integer i = 0, k = 0, aNbLines = 0, aNbInt = 0;
+  Standard_Real aT11 = NAN, aT12 = NAN, aD1 = NAN, aD2 = NAN, aD = NAN;
   TopoDS_Vertex aV;
   gp_Pnt aPV, aP11, aP12;
   //
@@ -2292,8 +2294,8 @@ void BOPAlgo_PaveFiller::GetEFPnts
    const Standard_Integer nF2,
    IntSurf_ListOfPntOn2S& aListOfPnts)
 {
-  Standard_Integer nE, nF, nFOpposite, aNbEFs, i;
-  Standard_Real U1, U2, V1, V2, f, l;
+  Standard_Integer nE = 0, nF = 0, nFOpposite = 0, aNbEFs = 0, i = 0;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN, f = NAN, l = NAN;
   TColStd_MapOfInteger aMI;
   //
   //collect indexes of all shapes from nF1 and nF2.
@@ -2383,7 +2385,7 @@ void BOPAlgo_PaveFiller::GetEFPnts
     return;
   }
   //
-  Standard_Integer nV;
+  Standard_Integer nV = 0;
   TColStd_MapOfInteger aMV;
   //
   aMV.Assign(aMVEF);
@@ -2392,7 +2394,7 @@ void BOPAlgo_PaveFiller::GetEFPnts
     return;
   }
   //
-  Standard_Real aDist;
+  Standard_Real aDist = NAN;
   BOPDS_Pave aPave;
   //
   const Handle(Geom_Curve)& aC3D=aIC.Curve();
@@ -2453,8 +2455,8 @@ void BOPAlgo_PaveFiller::GetEFPnts
   aC2D[0]=aIC.FirstCurve2d();
   aC2D[1]=aIC.SecondCurve2d();
   if (!aC2D[0].IsNull() && !aC2D[1].IsNull()) {
-    Standard_Integer nV, m, n;
-    Standard_Real aTC[2], aD, aD2, u, v, aDT2, aScPr, aDScPr;
+    Standard_Integer nV = 0, m = 0, n = 0;
+    Standard_Real aTC[2], aD = NAN, aD2 = NAN, u = NAN, v = NAN, aDT2 = NAN, aScPr = NAN, aDScPr = NAN;
     gp_Pnt aPC[2], aPV;
     gp_Dir aDN[2];
     gp_Pnt2d aP2D;
@@ -2514,7 +2516,7 @@ void BOPAlgo_PaveFiller::GetStickVertices(const Standard_Integer nF1,
                                           TColStd_MapOfInteger& aMVEF,
                                           TColStd_MapOfInteger& aMI)
 {
-  Standard_Integer nS1, nS2, nVNew, aTypeInt, i;
+  Standard_Integer nS1 = 0, nS2 = 0, nVNew = 0, aTypeInt = 0, i = 0;
   //
   BOPDS_VectorOfInterfVV& aVVs=myDS->InterfVV();
   BOPDS_VectorOfInterfVE& aVEs=myDS->InterfVE();
@@ -2571,7 +2573,7 @@ void BOPAlgo_PaveFiller::GetFullShapeMap(const Standard_Integer nF,
                                          TColStd_MapOfInteger& aMI)
 {
   TColStd_ListIteratorOfListOfInteger aIt;
-  Standard_Integer nS;
+  Standard_Integer nS = 0;
   //
   const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(nF);
   const TColStd_ListOfInteger& aLI = aSI.SubShapes();
@@ -2626,8 +2628,8 @@ void BOPAlgo_PaveFiller::PutPaveOnCurve
    TColStd_DataMapOfIntegerListOfInteger& aDMVLV,
    const Standard_Integer iCheckExtend)
 {
-  Standard_Boolean bIsVertexOnLine;
-  Standard_Real aT;
+  Standard_Boolean bIsVertexOnLine = 0;
+  Standard_Real aT = NAN;
   //
   const TopoDS_Vertex& aV = (*(TopoDS_Vertex *)(&myDS->Shape(nV)));
   const Handle(BOPDS_PaveBlock)& aPB = aNC.PaveBlocks().First();
@@ -2653,9 +2655,9 @@ void BOPAlgo_PaveFiller::PutPaveOnCurve
   //
   if (bIsVertexOnLine) {
     // check if aPB contains the parameter aT
-    Standard_Boolean bExist;
-    Standard_Integer nVUsed;
-    Standard_Real aPTol, aDTol;
+    Standard_Boolean bExist = 0;
+    Standard_Integer nVUsed = 0;
+    Standard_Real aPTol = NAN, aDTol = NAN;
     //
     aDTol = BOPTools_AlgoTools::DTolerance();
     //
@@ -2773,7 +2775,7 @@ void BOPAlgo_PaveFiller::ProcessExistingPaveBlocks (const Standard_Integer theIn
     if (!pList)
       continue;
 
-    Standard_Real aT1, aT2;
+    Standard_Real aT1 = NAN, aT2 = NAN;
     aPBF->Range (aT1, aT2);
 
     Standard_Real aDist = RealLast();
@@ -2829,8 +2831,8 @@ void BOPAlgo_PaveFiller::ProcessExistingPaveBlocks
     return;
   }
   //
-  Standard_Real aT, dummy;
-  Standard_Integer nV, nE, iC, iFlag;
+  Standard_Real aT = NAN, dummy = NAN;
+  Standard_Integer nV = 0, nE = 0, iC = 0, iFlag = 0;
   TColStd_ListIteratorOfListOfInteger aItLI;
   TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItBV;
   //
@@ -2918,8 +2920,8 @@ void BOPAlgo_PaveFiller::UpdateExistingPaveBlocks
     return;
   }
   //
-  Standard_Integer nE;
-  Standard_Boolean bCB;
+  Standard_Integer nE = 0;
+  Standard_Boolean bCB = 0;
   Handle(BOPDS_PaveBlock) aPB, aPB1, aPB2, aPB2n;
   Handle(BOPDS_CommonBlock) aCB;
   BOPDS_ListIteratorOfListOfPaveBlock aIt, aIt1, aIt2;
@@ -3000,7 +3002,7 @@ void BOPAlgo_PaveFiller::UpdateExistingPaveBlocks
                 // Compute the parameter by projecting the point
                 const TopoDS_Vertex& aV = TopoDS::Vertex(myDS->Shape(nV));
                 const TopoDS_Edge& aEOr = TopoDS::Edge(myDS->Shape(nE));
-                Standard_Real aTOut, aDist;
+                Standard_Real aTOut = NAN, aDist = NAN;
                 Standard_Integer iErr = myContext->ComputeVE(aV, aEOr, aTOut, aDist, myFuzzyValue);
                 if (!iErr) {
                   aPave[i].SetParameter(aTOut);
@@ -3173,7 +3175,7 @@ void BOPAlgo_PaveFiller::PutClosingPaveOnCurve(BOPDS_Curve& aNC)
   }
 
   // Check if there will be valid range on the curve
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   Standard_Real aNewTolV = Max(aTolV, aDistVP + BOPTools_AlgoTools::DTolerance());
   if (!BRepLib::FindValidRange(GeomAdaptor_Curve(aIC.Curve()), aIC.Tolerance(),
                                aT[0], aP[0], aNewTolV,
@@ -3214,7 +3216,7 @@ void BOPAlgo_PaveFiller::PreparePostTreatFF
      TopTools_DataMapOfShapeInteger& aMVI,
      BOPDS_ListOfPaveBlock& aLPBC)
 {
-  Standard_Integer nV1, nV2;
+  Standard_Integer nV1 = 0, nV2 = 0;
   //
   aLPBC.Append(aPB);
   //
@@ -3241,8 +3243,8 @@ Standard_Boolean BOPAlgo_PaveFiller::CheckPlanes
   (const Standard_Integer nF1,
    const Standard_Integer nF2)const
 {
-  Standard_Boolean bToIntersect;
-  Standard_Integer i, nV2, iCnt;
+  Standard_Boolean bToIntersect = 0;
+  Standard_Integer i = 0, nV2 = 0, iCnt = 0;
   TColStd_MapIteratorOfMapOfInteger aIt;
   //
   bToIntersect=Standard_False;
@@ -3284,9 +3286,9 @@ void BOPAlgo_PaveFiller::UpdatePaveBlocks
     return;
   }
   //
-  Standard_Integer nSp, aNbPBP, nV[2], i, j;
+  Standard_Integer nSp = 0, aNbPBP = 0, nV[2], i = 0, j = 0;
   Standard_Real aT[2];
-  Standard_Boolean bCB, bRebuild;
+  Standard_Boolean bCB = 0, bRebuild = 0;
   BOPDS_ListIteratorOfListOfPaveBlock aItPB;
   BOPDS_MapOfPaveBlock aMPB;
   TColStd_MapOfInteger aMicroEdges;
@@ -3399,7 +3401,7 @@ void BOPAlgo_PaveFiller::RemovePaveBlocks(const TColStd_MapOfInteger& theEdges)
   //
   // 1. from the Pave Blocks Pool
   BOPDS_VectorOfListOfPaveBlock& aPBP = myDS->ChangePaveBlocksPool();
-  Standard_Integer aNbPBP = aPBP.Length(), i;
+  Standard_Integer aNbPBP = aPBP.Length(), i = 0;
   for (i = 0; i < aNbPBP; ++i) {
     BOPDS_ListOfPaveBlock& aLPB = aPBP(i);
     //
@@ -3416,7 +3418,7 @@ void BOPAlgo_PaveFiller::RemovePaveBlocks(const TColStd_MapOfInteger& theEdges)
   // 2. from section curves
   TColStd_MapOfInteger aMPassed;
   BOPDS_VectorOfInterfFF& aFFs = myDS->InterfFF();
-  Standard_Integer aNbFF = aFFs.Length(), j;
+  Standard_Integer aNbFF = aFFs.Length(), j = 0;
   for (i = 0; i < aNbFF; ++i) {
     BOPDS_InterfFF& aFF = aFFs(i);
     // remove from Section pave blocks
@@ -3451,7 +3453,7 @@ void BOPAlgo_PaveFiller::RemovePaveBlocks(const TColStd_MapOfInteger& theEdges)
                                              &aFI.ChangePaveBlocksSc() };
     for (Standard_Integer k = 0; k < 3; k++)
     {
-      Standard_Integer aNbPB = aIMPB[k]->Extent(), m;
+      Standard_Integer aNbPB = aIMPB[k]->Extent(), m = 0;
       for (m = 1; m <= aNbPB; ++m)
       {
         const Handle(BOPDS_PaveBlock)& aPB = aIMPB[k]->FindKey(m);
@@ -3485,7 +3487,7 @@ Standard_Real ToleranceFF(const BRepAdaptor_Surface& aBAS1,
   Standard_Real aTol2 = aBAS2.Tolerance();
   Standard_Real aTolFF = Max(aTol1, aTol2);
   //
-  Standard_Boolean isAna1, isAna2;
+  Standard_Boolean isAna1 = 0, isAna2 = 0;
   isAna1 = (aBAS1.GetType() == GeomAbs_Plane ||
             aBAS1.GetType() == GeomAbs_Cylinder ||
             aBAS1.GetType() == GeomAbs_Cone ||
@@ -3513,7 +3515,7 @@ void BOPAlgo_PaveFiller::UpdateBlocksWithSharedVertices()
     return;
   }
   //
-  Standard_Integer aNbFF;
+  Standard_Integer aNbFF = 0;
   //
   BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
   aNbFF=aFFs.Length();
@@ -3521,9 +3523,9 @@ void BOPAlgo_PaveFiller::UpdateBlocksWithSharedVertices()
     return;
   }
   //
-  Standard_Boolean bOnCurve, bHasShapeSD;
-  Standard_Integer i, nF1, nF2, aNbC, j, nV, nVSD;
-  Standard_Real aTolV;
+  Standard_Boolean bOnCurve = 0, bHasShapeSD = 0;
+  Standard_Integer i = 0, nF1 = 0, nF2 = 0, aNbC = 0, j = 0, nV = 0, nVSD = 0;
+  Standard_Real aTolV = NAN;
   TColStd_MapOfInteger aMF;
   //
   for (i=0; i<aNbFF; ++i) {
@@ -3609,8 +3611,8 @@ Standard_Boolean BOPAlgo_PaveFiller::EstimatePaveOnCurve
    const BOPDS_Curve& aNC,
    const Standard_Real aTolR3D)
 {
-  Standard_Boolean bIsVertexOnLine;
-  Standard_Real aT;
+  Standard_Boolean bIsVertexOnLine = 0;
+  Standard_Real aT = NAN;
   //
   const TopoDS_Vertex& aV=*((TopoDS_Vertex *)&myDS->Shape(nV));
   const IntTools_Curve& aIC=aNC.Curve();
@@ -3632,19 +3634,19 @@ void BOPAlgo_PaveFiller::CorrectToleranceOfSE()
   BOPDS_MapOfPaveBlock aMPB;
   //
   // 1. iterate on all sections F-F
-  Standard_Integer aNb = aFFs.Length(), i;
+  Standard_Integer aNb = aFFs.Length(), i = 0;
   for (i = 0; i < aNb; ++i) {
     BOPDS_InterfFF& aFF = aFFs(i);
     //
     BOPDS_VectorOfCurve& aVNC = aFF.ChangeCurves();
-    Standard_Integer aNbC = aVNC.Length(), k;
+    Standard_Integer aNbC = aVNC.Length(), k = 0;
     for (k = 0; k < aNbC; ++k) {
       BOPDS_Curve& aNC = aVNC(k);
       BOPDS_ListOfPaveBlock& aLPB = aNC.ChangePaveBlocks();
       BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPB);
       for (; aItLPB.More(); ) {
         const Handle(BOPDS_PaveBlock)& aPB = aItLPB.Value();
-        Standard_Integer nE;
+        Standard_Integer nE = 0;
         if (!aPB->HasEdge(nE)) {
           aLPB.Remove(aItLPB);
           continue;
@@ -3672,7 +3674,7 @@ void BOPAlgo_PaveFiller::CorrectToleranceOfSE()
             Standard_Real aTolE = BRep_Tool::Tolerance(aE);
             if (aTolC < aTolE) {
               // reduce edge tolerance
-              static_cast<BRep_TEdge*>(aE.TShape().get())->Tolerance(aTolC);
+              dynamic_cast<BRep_TEdge*>(aE.TShape().get())->Tolerance(aTolC);
               bIsReduced = Standard_True;
             }
           }
@@ -3713,7 +3715,7 @@ void BOPAlgo_PaveFiller::CorrectToleranceOfSE()
     BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPB);
     for (; aItLPB.More(); aItLPB.Next()) {
       const Handle(BOPDS_PaveBlock)& aPB = aItLPB.Value();
-      Standard_Integer nE;
+      Standard_Integer nE = 0;
       if (!aPB->HasEdge(nE)) {
         continue;
       }
@@ -3790,7 +3792,7 @@ void BOPAlgo_PaveFiller::CorrectToleranceOfSE()
     }
     //
     if (aMaxTol < aTolV) {
-      static_cast<BRep_TVertex*>(aV.TShape().get())->Tolerance(aMaxTol);
+      dynamic_cast<BRep_TVertex*>(aV.TShape().get())->Tolerance(aMaxTol);
     }
   }
 }
@@ -3933,7 +3935,7 @@ void BOPAlgo_PaveFiller::RemoveMicroEdges()
 
       if (aMPBFence.Add(aPBR))
       {
-        Standard_Integer nV1, nV2;
+        Standard_Integer nV1 = 0, nV2 = 0;
         aPBR->Indices(nV1, nV2);
         if (nV1 == nV2)
         {
index c78e87804f049c2ad1ff911cf46240c5529fbb0b..43ef3e84012708490dd652ca6451d4f719694e90 100644 (file)
@@ -15,6 +15,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BOPAlgo_PaveFiller.hxx>
 #include <BOPAlgo_Alerts.hxx>
 #include <BOPAlgo_SectionAttribute.hxx>
@@ -76,13 +78,13 @@ class BOPAlgo_SplitEdge : public BOPAlgo_ParallelAlgo  {
   DEFINE_STANDARD_ALLOC
 
   BOPAlgo_SplitEdge() :
-    BOPAlgo_ParallelAlgo() {
-    myT1=0.;
-    myT2=0.;
-    myTol = 0.;
+    BOPAlgo_ParallelAlgo(), myT1(0.), myT2(0.), myTol(0.) {
+    
+    
+    
   }
   //
-  virtual ~BOPAlgo_SplitEdge() {
+  ~BOPAlgo_SplitEdge() override {
   }
   //
   void SetData(const TopoDS_Edge& aE,
@@ -134,7 +136,7 @@ class BOPAlgo_SplitEdge : public BOPAlgo_ParallelAlgo  {
     myContext = aContext;
   }
   //
-  virtual void Perform () {
+  void Perform () override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
@@ -164,7 +166,7 @@ class BOPAlgo_SplitEdge : public BOPAlgo_ParallelAlgo  {
   Bnd_Box myBox;
   Standard_Real myTol;
   //
-  BOPDS_PDS   myDS;
+  BOPDS_PDS   myDS{};
   Handle(IntTools_Context) myContext;
 };
 //
@@ -185,7 +187,7 @@ class BOPAlgo_MPC : public BOPAlgo_ParallelAlgo  {
     myFlag(Standard_False) {
   };
   //
-  virtual ~BOPAlgo_MPC(){
+  ~BOPAlgo_MPC() override{
   };
   //
   void SetEdge(const TopoDS_Edge& aE) {
@@ -232,7 +234,7 @@ class BOPAlgo_MPC : public BOPAlgo_ParallelAlgo  {
     return myContext;
   }
   //
-  virtual void Perform() {
+  void Perform() override {
     Message_ProgressScope aPS(myProgressRange, NULL, 1);
     if (UserBreak(aPS))
     {
@@ -245,7 +247,7 @@ class BOPAlgo_MPC : public BOPAlgo_ParallelAlgo  {
       // Check if edge has pcurve. If no then make its copy to avoid data races,
       // and use it to build pcurve.
       TopoDS_Edge aCopyE = myE;
-      Standard_Real f, l;
+      Standard_Real f = NAN, l = NAN;
       Handle(Geom2d_Curve) aC2d = BRep_Tool::CurveOnSurface(aCopyE, myF, f, l);
       if (aC2d.IsNull())
       {
@@ -316,11 +318,11 @@ class BOPAlgo_MPC : public BOPAlgo_ParallelAlgo  {
   TopoDS_Face myF;
   TopoDS_Edge myEz;
   TopoDS_Vertex myV1;
-  Standard_Real myT1;
+  Standard_Real myT1{};
   TopoDS_Vertex myV2;
-  Standard_Real myT2;
+  Standard_Real myT2{};
   Handle(Geom2d_Curve) myNewC2d;
-  Standard_Real myNewTol;
+  Standard_Real myNewTol{};
   //
   Handle(IntTools_Context) myContext;
 };
@@ -378,7 +380,7 @@ class BOPAlgo_BPC {
   TopoDS_Edge myE;
   TopoDS_Face myF;
   Handle(Geom2d_Curve) myCurve;
-  Standard_Boolean myToUpdate;
+  Standard_Boolean myToUpdate{};
 private:
   Message_ProgressRange myRange;
 };
@@ -398,8 +400,8 @@ void BOPAlgo_PaveFiller::MakeSplitEdges(const Message_ProgressRange& theRange)
     return;
   }
   //
-  Standard_Integer i, nE, nV1, nV2, nSp, aNbVBSE, k;
-  Standard_Real aT1, aT2;
+  Standard_Integer i = 0, nE = 0, nV1 = 0, nV2 = 0, nSp = 0, aNbVBSE = 0, k = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   BOPDS_ListIteratorOfListOfPaveBlock aItPB;
   Handle(BOPDS_PaveBlock) aPB;
   BOPDS_MapOfCommonBlock aMCB(100);
@@ -566,7 +568,7 @@ Standard_Integer BOPAlgo_PaveFiller::SplitEdge(const Standard_Integer nE,
                                                const Standard_Integer nV2, 
                                                const Standard_Real aT2)
 {
-  Standard_Integer nSp;
+  Standard_Integer nSp = 0;
   TopoDS_Vertex aV1, aV2;
   TopoDS_Edge aE, aSp;
   BOPDS_ShapeInfo aSI;
@@ -603,9 +605,9 @@ void BOPAlgo_PaveFiller::MakePCurves(const Message_ProgressRange& theRange)
   if (myAvoidBuildPCurve ||
       (!mySectionAttribute.PCurveOnS1() && !mySectionAttribute.PCurveOnS2()))
     return;
-  Standard_Boolean bHasPC;
-  Standard_Integer i, nF1, aNbC, k, nE, aNbFF, aNbFI, nEx;
-  Standard_Integer j, aNbPBIn, aNbPBOn;
+  Standard_Boolean bHasPC = 0;
+  Standard_Integer i = 0, nF1 = 0, aNbC = 0, k = 0, nE = 0, aNbFF = 0, aNbFI = 0, nEx = 0;
+  Standard_Integer j = 0, aNbPBIn = 0, aNbPBOn = 0;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
   TopoDS_Face aF1F, aF2F;
   BOPAlgo_VectorOfMPC aVMPC;
@@ -673,8 +675,8 @@ void BOPAlgo_PaveFiller::MakePCurves(const Message_ProgressRange& theRange)
               continue;
             }
             //
-            Standard_Integer nV1x, nV2x;
-            Standard_Real aT1x, aT2x;
+            Standard_Integer nV1x = 0, nV2x = 0;
+            Standard_Real aT1x = NAN, aT2x = NAN;
             TopoDS_Vertex aV1x, aV2x;
             TopoDS_Edge aEz;
             //
@@ -804,8 +806,8 @@ void BOPAlgo_PaveFiller::MakePCurves(const Message_ProgressRange& theRange)
 void UpdateVertices(const TopoDS_Edge& aE, 
                     const TopoDS_Face& aF)
 {
-  Standard_Integer j;
-  Standard_Real aT[2], aUx, aVx, aTolV2, aD2, aD;
+  Standard_Integer j = 0;
+  Standard_Real aT[2], aUx = NAN, aVx = NAN, aTolV2 = NAN, aD2 = NAN, aD = NAN;
   gp_Pnt aP3D, aP3Dx;
   gp_Pnt2d aP2Dx;
   Handle(Geom_Surface) aS;
@@ -854,8 +856,8 @@ void BOPAlgo_PaveFiller::Prepare(const Message_ProgressRange& theRange)
     TopAbs_EDGE,
     TopAbs_FACE
   };
-  Standard_Boolean bIsBasedOnPlane;
-  Standard_Integer i, aNb, n1, nF, aNbF;
+  Standard_Boolean bIsBasedOnPlane = 0;
+  Standard_Integer i = 0, aNb = 0, n1 = 0, nF = 0, aNbF = 0;
   TopExp_Explorer aExp;
   TopTools_IndexedMapOfShape aMF;
   //
index 6a90599df38abcad8a66423747635ee8c847e995..ef39a464ff7db8114246e057c2330480d72e79ac 100644 (file)
@@ -15,6 +15,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BOPAlgo_PaveFiller.hxx>
 #include <BOPDS_DS.hxx>
 #include <BOPDS_FaceInfo.hxx>
@@ -58,7 +60,7 @@ void BOPAlgo_PaveFiller::ProcessDE(const Message_ProgressRange& theRange)
 {
   Message_ProgressScope aPSOuter(theRange, NULL, 1);
 
-  Standard_Integer nF, aNb, nE, nV, nVSD, aNbPB;
+  Standard_Integer nF = 0, aNb = 0, nE = 0, nV = 0, nVSD = 0, aNbPB = 0;
   Handle(NCollection_BaseAllocator) aAllocator;
   Handle(BOPDS_PaveBlock) aPBD;
   TColStd_ListIteratorOfListOfInteger aItLI;
@@ -106,7 +108,7 @@ void BOPAlgo_PaveFiller::ProcessDE(const Message_ProgressRange& theRange)
         }
         if (aSIF.ShapeType() == TopAbs_EDGE) {
           Standard_Real aTol=1.e-7;
-          Standard_Integer nEn;
+          Standard_Integer nEn = 0;
           BRep_Builder BB;
           const TopoDS_Edge& aDE=(*(TopoDS_Edge *)(&myDS->Shape(nE))); 
           const TopoDS_Vertex& aVn = (*(TopoDS_Vertex *)(&myDS->Shape(nV)));
@@ -141,7 +143,7 @@ void BOPAlgo_PaveFiller::ProcessDE(const Message_ProgressRange& theRange)
                                           const Standard_Integer nF,
                                           BOPDS_ListOfPaveBlock& aLPBOut)
 {
-  Standard_Integer i, aNbPBOn, aNbPBIn, aNbPBSc, nV1, nV2;
+  Standard_Integer i = 0, aNbPBOn = 0, aNbPBIn = 0, aNbPBSc = 0, nV1 = 0, nV2 = 0;
   //
   const BOPDS_FaceInfo& aFI=myDS->ChangeFaceInfo(nF);
   // In
@@ -183,8 +185,8 @@ void BOPAlgo_PaveFiller::ProcessDE(const Message_ProgressRange& theRange)
   void BOPAlgo_PaveFiller::MakeSplitEdge (const Standard_Integer nDE,
                                           const Standard_Integer nDF)
 { 
-  Standard_Integer nSp, nV1, nV2, aNbPB;
-  Standard_Real aT1, aT2;
+  Standard_Integer nSp = 0, nV1 = 0, nV2 = 0, aNbPB = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   TopoDS_Edge aDE, aSp;
   TopoDS_Vertex aV1, aV2;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
@@ -271,7 +273,7 @@ void BOPAlgo_PaveFiller::ProcessDE(const Message_ProgressRange& theRange)
   // in the direction of the 2D curve of degenerated edge
   Standard_Real aTolCmp = Precision::PConfusion();
   // Get 2D curve
-  Standard_Real aTD1, aTD2;
+  Standard_Real aTD1 = NAN, aTD2 = NAN;
   Handle(Geom2d_Curve) aC2DDE = BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2);
   // Get direction of the curve
   Standard_Boolean bUDir = Abs(aC2DDE->Value(aTD1).Y() - aC2DDE->Value(aTD2).Y()) < Precision::PConfusion();
@@ -290,7 +292,7 @@ void BOPAlgo_PaveFiller::ProcessDE(const Message_ProgressRange& theRange)
       continue;
     }
     const TopoDS_Edge& aE = (*(TopoDS_Edge *)(&myDS->Shape(nE)));
-    Standard_Real aT1, aT2;
+    Standard_Real aT1 = NAN, aT2 = NAN;
     Handle(Geom2d_Curve) aC2D = BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2);
     if (aC2D.IsNull()) {
       continue;
@@ -311,7 +313,7 @@ void BOPAlgo_PaveFiller::ProcessDE(const Message_ProgressRange& theRange)
     if (aGInter.IsDone() && aGInter.NbPoints())
     {
       // Analyze intersection points
-      Standard_Integer i, aNbPoints = aGInter.NbPoints();
+      Standard_Integer i = 0, aNbPoints = aGInter.NbPoints();
       for (i = 1; i <= aNbPoints; ++i) {
         Standard_Real aX = aGInter.Point(i).ParamOnFirst();
         aPave.SetParameter(aX);
@@ -376,7 +378,7 @@ Standard_Boolean AddSplitPoint(const Handle(BOPDS_PaveBlock)& thePBD,
                                const BOPDS_Pave& thePave,
                                const Standard_Real theTol)
 {
-  Standard_Real aTD1, aTD2;
+  Standard_Real aTD1 = NAN, aTD2 = NAN;
   thePBD->Range(aTD1, aTD2);
 
   Standard_Real aT = thePave.Parameter();
@@ -385,7 +387,7 @@ Standard_Boolean AddSplitPoint(const Handle(BOPDS_PaveBlock)& thePBD,
     return Standard_False;
 
   // Check that the pave block does not contain the same parameter
-  Standard_Integer anInd;
+  Standard_Integer anInd = 0;
   if (thePBD->ContainsParameter(aT, theTol, anInd))
     return Standard_False;
 
index 50a2efb8c5cea5557b45bd9f71eb45dc9a88181f..54ab2e6967227622d19683d98b3aea9644c0fae1 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BOPAlgo_PaveFiller.hxx>
 #include <BOPDS_DS.hxx>
 #include <BOPDS_Iterator.hxx>
@@ -38,7 +40,7 @@ class BOPAlgo_ShrunkRange : public IntTools_ShrunkRange {
   : IntTools_ShrunkRange() {
   }
   //
-  virtual ~BOPAlgo_ShrunkRange() {
+  ~BOPAlgo_ShrunkRange() override {
   }
   //
   void SetPaveBlock(const Handle(BOPDS_PaveBlock)& aPB) {
@@ -73,8 +75,8 @@ void BOPAlgo_PaveFiller::FillShrunkData(const TopAbs_ShapeEnum aType1,
     return; 
   }
   //
-  Standard_Integer i, nS[2], nE, nV1, nV2, aNbVSD, k;
-  Standard_Real aT1, aT2;
+  Standard_Integer i = 0, nS[2], nE = 0, nV1 = 0, nV2 = 0, aNbVSD = 0, k = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
   TColStd_MapOfInteger aMI; 
   BOPAlgo_VectorOfShrunkRange aVSD;
index 12b972b3a18f155bcf2d34b1726f604ff4fbeb09..b928e52d95f6ec368261b9e0ee04c41c32c3eada 100644 (file)
@@ -783,8 +783,8 @@ private: //! @name Fields
   // Inputs
   Standard_Boolean myRunParallel;                     //!< Defines the mode of processing of the single feature
   TopoDS_Shape myFeature;                             //!< Feature to remove
-  TopTools_IndexedDataMapOfShapeListOfShape* myEFMap; //!< EF Connection map to find adjacent faces
-  TopTools_IndexedDataMapOfShapeListOfShape* myFSMap; //!< FS Connection map to find solids participating in the feature removal
+  TopTools_IndexedDataMapOfShapeListOfShape* myEFMap{}; //!< EF Connection map to find adjacent faces
+  TopTools_IndexedDataMapOfShapeListOfShape* myFSMap{}; //!< FS Connection map to find solids participating in the feature removal
   Message_ProgressRange                      myRange; //!< Indication of progress
 
   // Results
index 47b97ef5a24e4fd11fc622b8ef3ff830ad4b8a57..6dd50f329e39205bcb379c7a68a975332f1f8b50 100644 (file)
@@ -66,7 +66,7 @@ BOPAlgo_Section::~BOPAlgo_Section()
 //=======================================================================
 void BOPAlgo_Section::CheckData()
 {
-  Standard_Integer aNbArgs;
+  Standard_Integer aNbArgs = 0;
   //
   aNbArgs=myArguments.Extent();
   if (!aNbArgs) {
@@ -174,8 +174,8 @@ void BOPAlgo_Section::PerformInternal1
 void BOPAlgo_Section::BuildSection(const Message_ProgressRange& theRange)
 {
   Message_ProgressScope aPS(theRange, "Building the result of Section operation", 1);
-  Standard_Integer i, aNbMS, aNbLE;
-  Standard_Integer j,  nE, nV, aNb, aNbF, aNbPBSc;
+  Standard_Integer i = 0, aNbMS = 0, aNbLE = 0;
+  Standard_Integer j = 0,  nE = 0, nV = 0, aNb = 0, aNbF = 0, aNbPBSc = 0;
   TopoDS_Shape aRC, aRC1;
   BRep_Builder aBB;
   TopExp_Explorer aExp;
index 3cec99060dbbcbfa5edd7c588a8ba25f6c37c6e4..1f51ea66004bbbf05bec4e7f75c1c690cc29c9f2 100644 (file)
@@ -165,8 +165,8 @@ void BOPAlgo_ShellSplitter::Perform(const Message_ProgressRange& theRange)
 //=======================================================================
 void BOPAlgo_ShellSplitter::SplitBlock(BOPTools_ConnexityBlock& aCB)
 {
-  Standard_Integer aNbLF, aNbOff, aNbFP;
-  Standard_Integer i;
+  Standard_Integer aNbLF = 0, aNbOff = 0, aNbFP = 0;
+  Standard_Integer i = 0;
   TopAbs_Orientation anOr;
   TopoDS_Edge aEL;
   BRep_Builder aBB;
@@ -437,7 +437,7 @@ void RefineShell(TopoDS_Shell& theShell,
   // edges on which the input shell should be split
   TopTools_MapOfShape aMEStop;
   //
-  Standard_Integer i, aNbMEF = theMEF.Extent();
+  Standard_Integer i = 0, aNbMEF = theMEF.Extent();
   for (i = 1; i <= aNbMEF; ++i) {
     const TopoDS_Edge& aE = TopoDS::Edge(theMEF.FindKey(i));
     const TopTools_ListOfShape& aLF = theMEF(i);
@@ -579,8 +579,8 @@ void RefineShell(TopoDS_Shell& theShell,
 //=======================================================================
 void BOPAlgo_ShellSplitter::MakeShells(const Message_ProgressRange& theRange)
 {
-  Standard_Boolean bIsRegular;
-  Standard_Integer aNbVCBK, k;
+  Standard_Boolean bIsRegular = 0;
+  Standard_Integer aNbVCBK = 0, k = 0;
   BOPTools_ListIteratorOfListOfConnexityBlock aItCB;
   TopTools_ListIteratorOfListOfShape aIt;
   BOPAlgo_VectorOfCBK aVCBK;
index 13151f8413131bb2575142688c26d8b4fdbb94e8..10b26dafb738db9d3039018f83c15fbaf7157cad 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BOPAlgo_Tools.hxx>
 
 #include <BOPAlgo_Builder.hxx>
@@ -111,7 +113,7 @@ void BOPAlgo_Tools::PerformCommonBlocks(BOPDS_IndexedDataMapOfPaveBlockListOfPav
                                         BOPDS_PDS& pDS,
                                         const Handle(IntTools_Context)& theContext)
 {
-  Standard_Integer aNbCB;
+  Standard_Integer aNbCB = 0;
   //
   aNbCB=aMPBLPB.Extent();
   if (!aNbCB) {
@@ -183,7 +185,7 @@ void BOPAlgo_Tools::PerformCommonBlocks(const BOPDS_IndexedDataMapOfPaveBlockLis
                                         BOPDS_PDS& pDS,
                                         const Handle(IntTools_Context)& theContext)
 {
-  Standard_Integer nF, i, aNb;
+  Standard_Integer nF = 0, i = 0, aNb = 0;
   TColStd_ListIteratorOfListOfInteger aItLI;
   Handle(BOPDS_PaveBlock) aPB;
   Handle(BOPDS_CommonBlock) aCB;
@@ -250,7 +252,7 @@ Standard_Real BOPAlgo_Tools::ComputeToleranceOfCB
   }
   //
   const Standard_Integer aNbPnt = 11;
-  Standard_Real aTol, aT, aT1, aT2, aDt;
+  Standard_Real aTol = NAN, aT = NAN, aT1 = NAN, aT2 = NAN, aDt = NAN;
   gp_Pnt aP;
   //
   const Handle(Geom_Curve)& aC3D = BRep_Tool::Curve(aEOr, aT1, aT2);
@@ -436,7 +438,7 @@ Standard_Integer BOPAlgo_Tools::EdgesToWires(const TopoDS_Shape& theEdges,
   TopTools_MapOfShape aMEFence;
   //
   // look for a planes on the single edges
-  Standard_Integer i, j, aNbPlanes = aDMEdgePln.Extent(), aNbEdges = aDMEdgeTgt.Extent();
+  Standard_Integer i = 0, j = 0, aNbPlanes = aDMEdgePln.Extent(), aNbEdges = aDMEdgeTgt.Extent();
   for (i = 1; i <= aNbPlanes; ++i) {
     const TopoDS_Shape& aEI = aDMEdgePln.FindKey(i);
     if (!aMEFence.Add(aEI)) {
@@ -629,7 +631,7 @@ Standard_Boolean BOPAlgo_Tools::WiresToFaces(const TopoDS_Shape& theWires,
     }
   }
   //
-  Standard_Integer i, j, aNb = aDMWirePln.Extent();
+  Standard_Integer i = 0, j = 0, aNb = aDMWirePln.Extent();
   for (i = 1; i <= aNb; ++i) {
     const TopoDS_Shape& aWireI = aDMWirePln.FindKey(i);
     if (aMFence.Contains(aWireI)) {
@@ -732,7 +734,7 @@ void MakeWires(const TopTools_IndexedMapOfShape& theEdges,
 {
   TopoDS_Compound aCE;
   BRep_Builder().MakeCompound(aCE);
-  Standard_Integer i, aNbE = theEdges.Extent();
+  Standard_Integer i = 0, aNbE = theEdges.Extent();
   for (i = 1; i <= aNbE; ++i) {
     BRep_Builder().Add(aCE, theEdges(i));
   }
@@ -800,7 +802,7 @@ Standard_Boolean FindEdgeTangent(const BRepAdaptor_Curve& theCurve,
   }
   //
   // for other curves take D1 and check for its length
-  Standard_Real aT, aT1(theCurve.FirstParameter()), aT2(theCurve.LastParameter());
+  Standard_Real aT = NAN, aT1(theCurve.FirstParameter()), aT2(theCurve.LastParameter());
   const Standard_Integer aNbP = 11;
   const Standard_Real aDt = (aT2 - aT1) / aNbP;
   //
@@ -847,7 +849,7 @@ Standard_Boolean FindPlane(const BRepAdaptor_Curve& theCurve,
       // for all other types of curve compute two tangent vectors
       // on the curve and cross them
       bFound = Standard_False;
-      Standard_Real aT, aT1(theCurve.FirstParameter()), aT2(theCurve.LastParameter());
+      Standard_Real aT = NAN, aT1(theCurve.FirstParameter()), aT2(theCurve.LastParameter());
       const Standard_Integer aNbP = 11;
       const Standard_Real aDt = (aT2 - aT1) / aNbP;
       //
@@ -971,7 +973,7 @@ public:
   }
 
   //! Checks and accepts the pair of elements.
-  virtual Standard_Boolean Accept (const Standard_Integer theID1,
+  Standard_Boolean Accept (const Standard_Integer theID1,
                                    const Standard_Integer theID2) Standard_OVERRIDE
   {
     if (!RejectElement (theID1, theID2))
@@ -1145,14 +1147,14 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Constructor
-  BOPAlgo_FillIn3DParts()
+  BOPAlgo_FillIn3DParts() : myBBTree(NULL), myVShapeBox(NULL)
   {
-    myBBTree = NULL;
-    myVShapeBox = NULL;
+    
+    
   };
 
   //! Destructor
-  virtual ~BOPAlgo_FillIn3DParts() {};
+  ~BOPAlgo_FillIn3DParts() override {};
 
   //! Sets the solid
   void SetSolid(const TopoDS_Solid& theSolid)
@@ -1215,7 +1217,7 @@ public:
   }
 
   //! Performs the classification
-  virtual void Perform();
+  void Perform() override;
 
   //! Returns the faces classified as IN for solid
   const TopTools_ListOfShape& InFaces() const
@@ -1309,7 +1311,7 @@ void BOPAlgo_FillIn3DParts::Perform()
   // 4. Classify faces relatively solid.
   //    Store faces that are IN mySolid into <myInFaces>
 
-  Standard_Integer k, aNbFP = aIVec.Length();
+  Standard_Integer k = 0, aNbFP = aIVec.Length();
   // Sort indices if necessary
   if (aNbFP > 1)
     std::sort(aIVec.begin(), aIVec.end());
index c9dfc05ad0d72b281463491c17f6e910ad93b356..b66d39e6b694c237238e98b6175ba2abee7f8806 100644 (file)
@@ -185,8 +185,8 @@ typedef NCollection_Vector<BOPAlgo_WS_ConnexityBlock> BOPAlgo_VectorOfConnexityB
 //=======================================================================
 void BOPAlgo_WireSplitter::MakeWires(const Message_ProgressRange& theRange)
 {
-  Standard_Boolean bIsRegular;
-  Standard_Integer aNbVCB, k;
+  Standard_Boolean bIsRegular = 0;
+  Standard_Integer aNbVCB = 0, k = 0;
   TopoDS_Wire aW;
   BOPTools_ListIteratorOfListOfConnexityBlock aItCB;
   TopTools_ListIteratorOfListOfShape aIt;
index 6225ae596aae553f09008a59423983af566f065e..5636ceba7eceae3f8fbb86d127353712af01842c 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BOPAlgo_WireEdgeSet.hxx>
 #include <BOPAlgo_WireSplitter.hxx>
 #include <BOPTools_AlgoTools2D.hxx>
@@ -144,9 +146,9 @@ void BOPAlgo_WireSplitter::SplitBlock(const TopoDS_Face& myFace,
                                       BOPTools_ConnexityBlock& aCB,
                                       const Handle(IntTools_Context)& theContext)
 {
-  Standard_Boolean bNothingToDo, bIsClosed, bIsIN;
-  Standard_Integer aIx, aNb, i, aCntIn, aCntOut;
-  Standard_Real aAngle;
+  Standard_Boolean bNothingToDo = 0, bIsClosed = 0, bIsIN = 0;
+  Standard_Integer aIx = 0, aNb = 0, i = 0, aCntIn = 0, aCntOut = 0;
+  Standard_Real aAngle = NAN;
   TopAbs_Orientation aOr;
   TopoDS_Iterator aItS;
   TopoDS_Vertex aVV;
@@ -238,8 +240,8 @@ void BOPAlgo_WireSplitter::SplitBlock(const TopoDS_Face& myFace,
   // We must check edges on TShape coincidence.
   // If there are such edges there is something to do with.
   if (bNothingToDo) {
-    Standard_Integer aNbE, aNbMapEE;
-    Standard_Boolean bFlag;
+    Standard_Integer aNbE = 0, aNbMapEE = 0;
+    Standard_Boolean bFlag = 0;
     //
     TopTools_IndexedDataMapOfShapeListOfShape aMapEE(100);
     aNbE=myEdges.Extent();
@@ -321,7 +323,7 @@ void BOPAlgo_WireSplitter::SplitBlock(const TopoDS_Face& myFace,
   //
   // 4. Do
   //
-  Standard_Boolean bIsOut, bIsNotPassed;
+  Standard_Boolean bIsOut = 0, bIsNotPassed = 0;
   TopTools_SequenceOfShape aLS, aVertVa;
   TColgp_SequenceOfPnt2d aCoordVa;
   //
@@ -363,11 +365,11 @@ void Path (const GeomAdaptor_Surface& aGAS,
            BOPTools_ConnexityBlock& aCB,
            BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo& mySmartMap)
 {
-  Standard_Integer i, j, aNb, aNbj;
-  Standard_Real anAngleIn, anAngleOut, anAngle, aMinAngle;
-  Standard_Real aTol2D, aTol2D2, aD2, aTwoPI;
-  Standard_Boolean anIsSameV2d, anIsSameV, anIsOut, anIsNotPassed;
-  Standard_Boolean bIsClosed;
+  Standard_Integer i = 0, j = 0, aNb = 0, aNbj = 0;
+  Standard_Real anAngleIn = NAN, anAngleOut = NAN, anAngle = NAN, aMinAngle = NAN;
+  Standard_Real aTol2D = NAN, aTol2D2 = NAN, aD2 = NAN, aTwoPI = NAN;
+  Standard_Boolean anIsSameV2d = 0, anIsSameV = 0, anIsOut = 0, anIsNotPassed = 0;
+  Standard_Boolean bIsClosed = 0;
   TopoDS_Vertex aVa, aVb;
   TopoDS_Edge aEOuta;
   BOPAlgo_ListIteratorOfListOfEdgeInfo anIt;
@@ -452,7 +454,7 @@ void Path (const GeomAdaptor_Surface& aGAS,
         }//if (anIsSameV) {
         //
         if (anIsSameV && anIsSameV2d) {
-          Standard_Integer iPriz;
+          Standard_Integer iPriz = 0;
           iPriz=1;
           if (aBuf.Extent()==2) {
             if(aBuf.First().IsSame(aBuf.Last())) {
@@ -592,7 +594,7 @@ void Path (const GeomAdaptor_Surface& aGAS,
                               const Standard_Real aAngleOut)
 {
   Standard_Real aTwoPi=M_PI+M_PI;
-  Standard_Real dA, A1, A2, AIn, AOut ;
+  Standard_Real dA = NAN, A1 = NAN, A2 = NAN, AIn = NAN, AOut = NAN ;
 
   AIn=aAngleIn;
   AOut=aAngleOut;
@@ -631,7 +633,7 @@ void Path (const GeomAdaptor_Surface& aGAS,
                    const TopoDS_Edge& aE1,
                    const TopoDS_Face& aF)
 {
-  Standard_Real aT, aFirst, aLast;
+  Standard_Real aT = NAN, aFirst = NAN, aLast = NAN;
   Handle(Geom2d_Curve) aC2D;
   gp_Pnt2d aP2D1;
   //
@@ -671,7 +673,7 @@ void Path (const GeomAdaptor_Surface& aGAS,
 //=======================================================================
 Standard_Integer NbWaysOut(const BOPAlgo_ListOfEdgeInfo& aLEInfo)
 {
-  Standard_Boolean bIsOut, bIsNotPassed;
+  Standard_Boolean bIsOut = 0, bIsNotPassed = 0;
   Standard_Integer iCnt=0;
   BOPAlgo_ListIteratorOfListOfEdgeInfo anIt;
   //
@@ -695,8 +697,8 @@ Standard_Integer NbWaysOut(const BOPAlgo_ListOfEdgeInfo& aLEInfo)
  Standard_Real AngleIn(const TopoDS_Edge& aEIn,
                        const BOPAlgo_ListOfEdgeInfo& aLEInfo)
 {
-  Standard_Real anAngleIn;
-  Standard_Boolean anIsIn;
+  Standard_Real anAngleIn = NAN;
+  Standard_Boolean anIsIn = 0;
   BOPAlgo_ListIteratorOfListOfEdgeInfo anIt;
 
   anIt.Initialize(aLEInfo);
@@ -744,7 +746,7 @@ Standard_Integer NbWaysOut(const BOPAlgo_ListOfEdgeInfo& aLEInfo)
                          const Standard_Boolean bIsIN,
                          const Handle(IntTools_Context)& theContext)
 {
-  Standard_Real aFirst, aLast, aToler, dt, aTV, aTV1, anAngle, aTX;
+  Standard_Real aFirst = NAN, aLast = NAN, aToler = NAN, dt = NAN, aTV = NAN, aTV1 = NAN, anAngle = NAN, aTX = NAN;
   gp_Pnt2d aPV, aPV1;
   gp_Vec2d aV2D;
   Handle(Geom2d_Curve) aC2D;
@@ -813,7 +815,7 @@ Standard_Integer NbWaysOut(const BOPAlgo_ListOfEdgeInfo& aLEInfo)
 Standard_Real Angle (const gp_Dir2d& aDir2D)
 {
   gp_Dir2d aRefDir(1., 0.);
-  Standard_Real anAngle;
+  Standard_Real anAngle = NAN;
   
   anAngle = aRefDir.Angle(aDir2D);
   if (anAngle < 0.)
@@ -827,7 +829,7 @@ Standard_Real Angle (const gp_Dir2d& aDir2D)
  Standard_Real Tolerance2D (const TopoDS_Vertex& aV,
                             const GeomAdaptor_Surface& aGAS)        
 {
-  Standard_Real aTol2D, anUr, aVr, aTolV3D;
+  Standard_Real aTol2D = NAN, anUr = NAN, aVr = NAN, aTolV3D = NAN;
   GeomAbs_SurfaceType aType;
   //
   aType=aGAS.GetType();
@@ -905,9 +907,9 @@ void RefineAngles(const TopoDS_Vertex& aV,
                   BOPAlgo_ListOfEdgeInfo& aLEI,
                   const Handle(IntTools_Context)& theContext)
 {
-  Standard_Boolean bIsIn, bIsBoundary, bRefined
-  Standard_Integer iCntBnd, iCntInt;
-  Standard_Real aA, aA1, aA2;
+  Standard_Boolean bIsIn = 0, bIsBoundary = 0, bRefined = 0
+  Standard_Integer iCntBnd = 0, iCntInt = 0;
+  Standard_Real aA = NAN, aA1 = NAN, aA2 = NAN;
   TopTools_DataMapOfShapeReal aDMSR;
   BOPAlgo_ListIteratorOfListOfEdgeInfo aItLEI;
   //
@@ -1004,10 +1006,10 @@ Standard_Boolean RefineAngle2D(const TopoDS_Vertex& aV,
                                Standard_Real& aA,
                                const Handle(IntTools_Context)& theContext)
 {
-  Standard_Boolean bRet;
-  Standard_Integer i, j, aNbP;
-  Standard_Real aTV, aTol, aT1, aT2, dT, aAngle, aT, aTOp;
-  Standard_Real aTolInt, aAi, aXi, aYi, aT1j, aT2j, aT1max, aT2max, aCf
+  Standard_Boolean bRet = 0;
+  Standard_Integer i = 0, j = 0, aNbP = 0;
+  Standard_Real aTV = NAN, aTol = NAN, aT1 = NAN, aT2 = NAN, dT = NAN, aAngle = NAN, aT = NAN, aTOp = NAN;
+  Standard_Real aTolInt = NAN, aAi = NAN, aXi = NAN, aYi = NAN, aT1j = NAN, aT2j = NAN, aT1max = NAN, aT2max = NAN, aCf = NAN
   gp_Pnt2d aPV, aP, aP1, aP2;
   Handle(Geom2d_Curve) aC2D;
   Handle(Geom2d_Line) aLi;
index 4625fbe98e62171face2d2169f3f0cbb36413f15..fdec86c1e3ec36cb41d6972696d0494707c36204 100644 (file)
@@ -143,7 +143,7 @@ void BOPDS_CommonBlock::SetRealPaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
 {
   static Handle(BOPDS_PaveBlock) aPBs;
   //
-  Standard_Integer aIOr;
+  Standard_Integer aIOr = 0;
   BOPDS_ListIteratorOfListOfPaveBlock anIt;
   //
   anIt.Initialize(myPaveBlocks);
@@ -162,8 +162,8 @@ void BOPDS_CommonBlock::SetRealPaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
 //=======================================================================
   Standard_Boolean BOPDS_CommonBlock::IsPaveBlockOnFace(const Standard_Integer aIx)const
 {
-  Standard_Boolean bFound;
-  Standard_Integer nF;
+  Standard_Boolean bFound = 0;
+  Standard_Integer nF = 0;
   TColStd_ListIteratorOfListOfInteger anIt;
   //
   bFound=Standard_False;
@@ -182,8 +182,8 @@ void BOPDS_CommonBlock::SetRealPaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
 //=======================================================================
   Standard_Boolean BOPDS_CommonBlock::IsPaveBlockOnEdge(const Standard_Integer aIx)const
 {
-  Standard_Boolean bFound;
-  Standard_Integer aIOr;
+  Standard_Boolean bFound = 0;
+  Standard_Integer aIOr = 0;
   BOPDS_ListIteratorOfListOfPaveBlock anIt;
   //
   bFound=Standard_False;
@@ -229,8 +229,8 @@ void BOPDS_CommonBlock::SetRealPaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
 //=======================================================================
   Standard_Boolean BOPDS_CommonBlock::Contains(const Handle(BOPDS_PaveBlock)& aPBx)const
 {
-  Standard_Boolean bFound;
-  Standard_Integer aNb1;
+  Standard_Boolean bFound = 0;
+  Standard_Integer aNb1 = 0;
   BOPDS_ListIteratorOfListOfPaveBlock anIt;
   //
   bFound=Standard_False;
@@ -255,7 +255,7 @@ void BOPDS_CommonBlock::SetRealPaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
 //=======================================================================
   Standard_Boolean BOPDS_CommonBlock::Contains(const Standard_Integer theF)const
 {
-  Standard_Boolean bFound;
+  Standard_Boolean bFound = 0;
   TColStd_ListIteratorOfListOfInteger aIt;
   //
   bFound=Standard_False;
@@ -273,7 +273,7 @@ void BOPDS_CommonBlock::SetRealPaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
 //=======================================================================
   void BOPDS_CommonBlock::Dump()const
 {
-  Standard_Integer nF;
+  Standard_Integer nF = 0;
   TColStd_ListIteratorOfListOfInteger aIt;
   BOPDS_ListIteratorOfListOfPaveBlock aItPB;
   //
index 9ad33e6fdd3107ad9d56c89140ba3dfb202fa782..7140f3c0b7c7536cc05264f6840babf4d8e83cf8 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BOPDS_DS.hxx>
 #include <BOPDS_FaceInfo.hxx>
 #include <BOPDS_IndexRange.hxx>
@@ -63,7 +65,7 @@ BOPDS_DS::BOPDS_DS()
 :
   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
   myArguments(myAllocator),
-  myRanges(0,myAllocator),
+  myNbShapes(0), myNbSourceShapes(0), myRanges(0,myAllocator),
   myLines(0, myAllocator), 
   myMapShapeIndex(100, myAllocator),
   myPaveBlocksPool(0,myAllocator),
@@ -84,8 +86,8 @@ BOPDS_DS::BOPDS_DS()
   myInterfZZ(0, myAllocator),
   myInterfered(100, myAllocator)
 {
-  myNbShapes=0;
-  myNbSourceShapes=0;
+  
+  
 }
 //=======================================================================
 //function : 
@@ -95,7 +97,7 @@ BOPDS_DS::BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator)
 :
   myAllocator(theAllocator),
   myArguments(myAllocator),
-  myRanges(0, myAllocator),
+  myNbShapes(0), myNbSourceShapes(0), myRanges(0, myAllocator),
   myLines(0, myAllocator),
   myMapShapeIndex(100, myAllocator),
   myPaveBlocksPool(0, myAllocator),
@@ -116,8 +118,8 @@ BOPDS_DS::BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator)
   myInterfZZ(0, myAllocator),
   myInterfered(100, myAllocator)
 {
-  myNbShapes=0;
-  myNbSourceShapes=0;
+  
+  
 }
 //=======================================================================
 //function : ~
@@ -221,7 +223,7 @@ const BOPDS_IndexRange& BOPDS_DS::Range(const Standard_Integer theI)const
 //=======================================================================
 Standard_Integer BOPDS_DS::Rank(const Standard_Integer theI)const
 {
-  Standard_Integer i, aNb, iErr;
+  Standard_Integer i = 0, aNb = 0, iErr = 0;
   //
   iErr=-1;
   aNb=NbRanges();
@@ -247,7 +249,7 @@ Standard_Boolean BOPDS_DS::IsNewShape(const Standard_Integer theI)const
 //=======================================================================
 Standard_Integer BOPDS_DS::Append(const BOPDS_ShapeInfo& theSI)
 {
-  Standard_Integer iX;
+  Standard_Integer iX = 0;
   //
   myLines.Appended()=theSI;
   iX=myLines.Length()-1;
@@ -261,7 +263,7 @@ Standard_Integer BOPDS_DS::Append(const BOPDS_ShapeInfo& theSI)
 //=======================================================================
 Standard_Integer BOPDS_DS::Append(const TopoDS_Shape& theS)
 {
-  Standard_Integer iX;
+  Standard_Integer iX = 0;
   //
   myLines.Appended().SetShape(theS);
   iX=myLines.Length()-1;
@@ -283,7 +285,7 @@ const BOPDS_ShapeInfo& BOPDS_DS::ShapeInfo
 //=======================================================================
 BOPDS_ShapeInfo& BOPDS_DS::ChangeShapeInfo(const Standard_Integer theI)
 {
-  BOPDS_ShapeInfo *pSI;
+  BOPDS_ShapeInfo *pSI = nullptr;
   //
   const BOPDS_ShapeInfo& aSI=ShapeInfo(theI);
   pSI=(BOPDS_ShapeInfo *)&aSI;
@@ -305,7 +307,7 @@ const TopoDS_Shape& BOPDS_DS::Shape(const Standard_Integer theI)const
 //=======================================================================
 Standard_Integer BOPDS_DS::Index(const TopoDS_Shape& theS)const
 {
-  Standard_Integer iRet;
+  Standard_Integer iRet = 0;
   //
   iRet=-1;
   if (myMapShapeIndex.IsBound(theS)) {
@@ -319,9 +321,9 @@ Standard_Integer BOPDS_DS::Index(const TopoDS_Shape& theS)const
 //=======================================================================
 void BOPDS_DS::Init(const Standard_Real theFuzz)
 {
-  Standard_Integer i1, i2, j, aI, aNb, aNbS, aNbE, aNbSx;
-  Standard_Integer n1, n2, n3, nV, nW, nE, aNbF;
-  Standard_Real aTol, aTolAdd;
+  Standard_Integer i1 = 0, i2 = 0, j = 0, aI = 0, aNb = 0, aNbS = 0, aNbE = 0, aNbSx = 0;
+  Standard_Integer n1 = 0, n2 = 0, n3 = 0, nV = 0, nW = 0, nE = 0, aNbF = 0;
+  Standard_Real aTol = NAN, aTolAdd = NAN;
   TopAbs_ShapeEnum aTS;
   TopoDS_Iterator aItS;
   TColStd_ListIteratorOfListOfInteger aIt1, aIt2, aIt3;
@@ -408,9 +410,9 @@ void BOPDS_DS::Init(const Standard_Real theFuzz)
       aTol = BRep_Tool::Tolerance(aE);
       //
       if (!BRep_Tool::Degenerated(aE)) {
-        Standard_Boolean bInf1, bInf2;
-        Standard_Integer aIx;
-        Standard_Real aT1, aT2;
+        Standard_Boolean bInf1 = 0, bInf2 = 0;
+        Standard_Integer aIx = 0;
+        Standard_Real aT1 = NAN, aT2 = NAN;
         gp_Pnt aPx;
         Handle(Geom_Curve) aC3D;
         TopoDS_Vertex aVx; 
@@ -645,7 +647,7 @@ void BOPDS_DS::InitShape
   (const Standard_Integer aI,
    const TopoDS_Shape& aS)
 {
-  Standard_Integer aIx;
+  Standard_Integer aIx = 0;
   TopoDS_Iterator aIt;
   TColStd_ListIteratorOfListOfInteger aIt1;
   //
@@ -683,8 +685,8 @@ Standard_Boolean BOPDS_DS::HasInterfShapeSubShapes
    const Standard_Integer theI2,
    const Standard_Boolean theFlag)const
 {
-  Standard_Boolean bRet;
-  Standard_Integer n2;
+  Standard_Boolean bRet = 0;
+  Standard_Integer n2 = 0;
   TColStd_ListIteratorOfListOfInteger aIt;
   bRet = Standard_False;
   //
@@ -715,8 +717,8 @@ Standard_Boolean BOPDS_DS::HasInterfSubShapes
   (const Standard_Integer theI1,
    const Standard_Integer theI2)const
 {
-  Standard_Boolean bRet;
-  Standard_Integer n1;
+  Standard_Boolean bRet = 0;
+  Standard_Integer n1 = 0;
   TColStd_ListIteratorOfListOfInteger aIt;
   bRet = Standard_False;
   //
@@ -766,7 +768,7 @@ const BOPDS_ListOfPaveBlock& BOPDS_DS::PaveBlocks
   (const Standard_Integer theI)const
 {
   static BOPDS_ListOfPaveBlock sLPB;
-  Standard_Integer aRef;
+  Standard_Integer aRef = 0;
   //
   if (HasPaveBlocks(theI)) { 
     aRef=ShapeInfo(theI).Reference();
@@ -783,8 +785,8 @@ const BOPDS_ListOfPaveBlock& BOPDS_DS::PaveBlocks
 BOPDS_ListOfPaveBlock& BOPDS_DS::ChangePaveBlocks
   (const Standard_Integer theI)
 {
-  Standard_Boolean bHasReference;
-  Standard_Integer aRef;
+  Standard_Boolean bHasReference = 0;
+  Standard_Integer aRef = 0;
   //
   BOPDS_ShapeInfo& aSI=ChangeShapeInfo(theI);
   bHasReference=aSI.HasReference();
@@ -801,8 +803,8 @@ BOPDS_ListOfPaveBlock& BOPDS_DS::ChangePaveBlocks
 //=======================================================================
 void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
 {
-  Standard_Integer nV=0, iRef, aNbV, nVSD;
-  Standard_Real aT;
+  Standard_Integer nV=0, iRef = 0, aNbV = 0, nVSD = 0;
+  Standard_Real aT = NAN;
   TopAbs_Orientation aOrE;
   TopoDS_Vertex aV;
   TColStd_ListIteratorOfListOfInteger aIt;
@@ -894,7 +896,7 @@ void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
 //=======================================================================
 void BOPDS_DS::UpdatePaveBlocks()
 {
-  Standard_Integer i, aNbPBP;
+  Standard_Integer i = 0, aNbPBP = 0;
   BOPDS_ListOfPaveBlock aLPBN(myAllocator);
   BOPDS_ListIteratorOfListOfPaveBlock aItPB;
   //
@@ -932,7 +934,7 @@ void BOPDS_DS::UpdatePaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
     return;
   }
   //
-  Standard_Integer nE, iRef;
+  Standard_Integer nE = 0, iRef = 0;
   BOPDS_ListIteratorOfListOfPaveBlock aItPB, aItPBN;
   BOPDS_ListOfPaveBlock aLPBN(myAllocator);
   Handle(BOPDS_PaveBlock) aPB;
@@ -962,7 +964,7 @@ void BOPDS_DS::UpdatePaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
 void BOPDS_DS::UpdateCommonBlock(const Handle(BOPDS_CommonBlock)& theCB,
                                  const Standard_Real theFuzz)
 {
-  Standard_Integer nE, iRef, n1, n2;
+  Standard_Integer nE = 0, iRef = 0, n1 = 0, n2 = 0;
   BOPDS_ListIteratorOfListOfPaveBlock aItPB, aItPBCB, aItPBN;
   BOPDS_ListOfPaveBlock aLPBN;
   NCollection_DataMap<BOPDS_Pair, BOPDS_ListOfPaveBlock, BOPDS_PairMapHasher> aMPKLPB;
@@ -1024,7 +1026,7 @@ void BOPDS_DS::UpdateCommonBlock(const Handle(BOPDS_CommonBlock)& theCB,
     BOPDS_ListOfPaveBlock& aLPBx=aItMPKLPB.ChangeValue();
     //
     while (aLPBx.Extent()) {
-      Standard_Boolean bCoinside;
+      Standard_Boolean bCoinside = 0;
       BOPDS_ListOfPaveBlock aLPBxN;
       //
       aItPB.Initialize(aLPBx);
@@ -1152,7 +1154,7 @@ Standard_Boolean BOPDS_DS::HasFaceInfo(const Standard_Integer theI)const
 const BOPDS_FaceInfo& BOPDS_DS::FaceInfo(const Standard_Integer theI)const
 {
   static BOPDS_FaceInfo sFI;
-  Standard_Integer aRef;
+  Standard_Integer aRef = 0;
   //
   if (HasFaceInfo(theI)) { 
     aRef=ShapeInfo(theI).Reference();
@@ -1167,9 +1169,9 @@ const BOPDS_FaceInfo& BOPDS_DS::FaceInfo(const Standard_Integer theI)const
 //=======================================================================
 BOPDS_FaceInfo& BOPDS_DS::ChangeFaceInfo(const Standard_Integer theI)
 {
-  Standard_Boolean bHasReference;
-  Standard_Integer aRef;
-  BOPDS_FaceInfo* pFI;
+  Standard_Boolean bHasReference = 0;
+  Standard_Integer aRef = 0;
+  BOPDS_FaceInfo* pFI = nullptr;
   //
   BOPDS_ShapeInfo& aSI=ChangeShapeInfo(theI);
   bHasReference=aSI.HasReference();
@@ -1188,7 +1190,7 @@ BOPDS_FaceInfo& BOPDS_DS::ChangeFaceInfo(const Standard_Integer theI)
 //=======================================================================
 void BOPDS_DS::InitFaceInfo(const Standard_Integer theI)
 {
-  Standard_Integer iRef;
+  Standard_Integer iRef = 0;
   //
   BOPDS_ShapeInfo& aSI=ChangeShapeInfo(theI);
   BOPDS_FaceInfo &aFI=myFaceInfoPool.Appended();
@@ -1229,7 +1231,7 @@ void BOPDS_DS::InitFaceInfoIn (const Standard_Integer theI)
 //=======================================================================
 void BOPDS_DS::UpdateFaceInfoIn(const Standard_Integer theI)
 {
-  Standard_Integer iRef;
+  Standard_Integer iRef = 0;
   //
   BOPDS_ShapeInfo& aSI=ChangeShapeInfo(theI);
   if (aSI.HasReference()) {
@@ -1249,7 +1251,7 @@ void BOPDS_DS::UpdateFaceInfoIn(const Standard_Integer theI)
 //=======================================================================
 void BOPDS_DS::UpdateFaceInfoOn(const Standard_Integer theI)
 {
-  Standard_Integer iRef;
+  Standard_Integer iRef = 0;
   //
   BOPDS_ShapeInfo& aSI=ChangeShapeInfo(theI);
   if (aSI.HasReference()) {
@@ -1271,7 +1273,7 @@ void BOPDS_DS::FaceInfoOn(const Standard_Integer theF,
                           BOPDS_IndexedMapOfPaveBlock& theMPB,
                           TColStd_MapOfInteger& theMI)
 {
-  Standard_Integer nS, nSD, nV1, nV2;
+  Standard_Integer nS = 0, nSD = 0, nV1 = 0, nV2 = 0;
   TColStd_ListIteratorOfListOfInteger aIt;
   BOPDS_ListIteratorOfListOfPaveBlock aItPB;
   //
@@ -1310,7 +1312,7 @@ void BOPDS_DS::FaceInfoIn(const Standard_Integer theF,
                           BOPDS_IndexedMapOfPaveBlock& theMPB,
                           TColStd_MapOfInteger& theMI)
 {
-  Standard_Integer i, aNbVF, aNbEF, nV, nE, nVSD;
+  Standard_Integer i = 0, aNbVF = 0, aNbEF = 0, nV = 0, nE = 0, nVSD = 0;
   TopoDS_Iterator aItS;
   BOPDS_ListIteratorOfListOfPaveBlock aItPB;
   //
@@ -1421,7 +1423,7 @@ void BOPDS_DS::UpdateFaceInfoIn (const TColStd_MapOfInteger& theFaces)
     if (theFaces.Contains (nF))
     {
       BOPDS_FaceInfo& aFI = myFaceInfoPool (ShapeInfo (nF).Reference());
-      Standard_Integer nVNew;
+      Standard_Integer nVNew = 0;
       if (aEF.HasIndexNew (nVNew))
       {
         HasShapeSD (nVNew, nVNew);
@@ -1478,7 +1480,7 @@ void BOPDS_DS::UpdateFaceInfoOn (const TColStd_MapOfInteger& theFaces)
 //=======================================================================
 void BOPDS_DS::RefineFaceInfoOn()
 {
-  Standard_Integer i, aNb, nF, aNbPB, j;
+  Standard_Integer i = 0, aNb = 0, nF = 0, aNbPB = 0, j = 0;
   BOPDS_IndexedMapOfPaveBlock aMPB;
   //
   aNb=myFaceInfoPool.Length();
@@ -1548,7 +1550,7 @@ void BOPDS_DS::AloneVertices(const Standard_Integer theI,
 {
   if (HasFaceInfo(theI)) {
     //
-    Standard_Integer i, j, nV1, nV2, nV, aNbPB;
+    Standard_Integer i = 0, j = 0, nV1 = 0, nV2 = 0, nV = 0, aNbPB = 0;
     TColStd_MapIteratorOfMapOfInteger aItMI;
     //
     TColStd_MapOfInteger aMI(100, myAllocator);
@@ -1593,7 +1595,7 @@ void BOPDS_DS::SubShapesOnIn(const Standard_Integer theNF1,
                              BOPDS_IndexedMapOfPaveBlock& thePBOnIn,
                              BOPDS_MapOfPaveBlock& theCommonPB)const
 {
-  Standard_Integer i, j, nV, nV1, nV2, aNbPB;
+  Standard_Integer i = 0, j = 0, nV = 0, nV1 = 0, nV2 = 0, aNbPB = 0;
   TColStd_MapIteratorOfMapOfInteger aIt;
   BOPDS_IndexedMapOfPaveBlock pMPB[4];
   //
@@ -1660,7 +1662,7 @@ void BOPDS_DS::SharedEdges(const Standard_Integer nF1,
       TColStd_ListOfInteger& theLI,
       const Handle(NCollection_BaseAllocator)& aAllocator)
 {
-  Standard_Integer nE, nSp;
+  Standard_Integer nE = 0, nSp = 0;
   TColStd_ListIteratorOfListOfInteger aItLI;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
   TColStd_MapOfInteger aMI(100, aAllocator);
@@ -1759,7 +1761,7 @@ Standard_Boolean BOPDS_DS::HasShapeSD
 //=======================================================================
 void BOPDS_DS::Dump()const
 {
-  Standard_Integer i, aNb, aNbSS;
+  Standard_Integer i = 0, aNb = 0, aNbSS = 0;
   //
   printf(" *** DS ***\n");
   aNb=NbRanges();
@@ -1794,9 +1796,9 @@ Standard_Boolean BOPDS_DS::CheckCoincidence
    const Handle(BOPDS_PaveBlock)& aPB2,
    const Standard_Real theFuzz)
 {
-  Standard_Boolean bRet;
-  Standard_Integer nE1, nE2, aNbPoints;
-  Standard_Real aT11, aT12, aT21, aT22, aT1m, aD, aTol, aT2x;
+  Standard_Boolean bRet = 0;
+  Standard_Integer nE1 = 0, nE2 = 0, aNbPoints = 0;
+  Standard_Real aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN, aT1m = NAN, aD = NAN, aTol = NAN, aT2x = NAN;
   gp_Pnt aP1m;
   //
   bRet=Standard_False;
@@ -1811,7 +1813,7 @@ Standard_Boolean BOPDS_DS::CheckCoincidence
   nE2=aPB2->OriginalEdge();
   const TopoDS_Edge& aE2=(*(TopoDS_Edge*)(&Shape(nE2)));
   //
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   Handle(Geom_Curve)aC2 = BRep_Tool::Curve (aE2, f, l);
   GeomAPI_ProjectPointOnCurve aPPC;
   aPPC.Init(aC2, f, l);
@@ -1839,8 +1841,8 @@ Standard_Boolean BOPDS_DS::IsSubShape
   (const Standard_Integer theI1,
    const Standard_Integer theI2)
 {
-  Standard_Boolean bRet;
-  Standard_Integer nS;
+  Standard_Boolean bRet = 0;
+  Standard_Integer nS = 0;
   bRet = Standard_False;
   //
   TColStd_ListIteratorOfListOfInteger aItLI;
@@ -1865,7 +1867,7 @@ Standard_Boolean BOPDS_DS::IsSubShape
 void BOPDS_DS::Paves(const Standard_Integer theEdge,
                      BOPDS_ListOfPave& theLP)
 {
-  Standard_Integer aNb, i;
+  Standard_Integer aNb = 0, i = 0;
   BOPDS_ListIteratorOfListOfPaveBlock aIt;
   BOPDS_MapOfPave aMP;
   //
@@ -1929,7 +1931,7 @@ void TotalShapes(const TopoDS_Shape& aS,
 Standard_Real ComputeParameter(const TopoDS_Vertex& aV,
                                const TopoDS_Edge& aE)
 {
-  Standard_Real aT1, aT2, aTRet, aTolE2, aD2;
+  Standard_Real aT1 = NAN, aT2 = NAN, aTRet = NAN, aTolE2 = NAN, aD2 = NAN;
   gp_Pnt aPC, aPV;
   Handle(Geom_Curve) aC3D;
   TopoDS_Edge aEE;
@@ -1968,9 +1970,9 @@ void BOPDS_DS::BuildBndBoxSolid(const Standard_Integer theIndex,
                                 Bnd_Box& aBoxS,
                                 const Standard_Boolean theCheckInverted)
 {
-  Standard_Boolean bIsOpenBox, bIsInverted;
-  Standard_Integer nSh, nFc;
-  Standard_Real aTolS, aTolFc;
+  Standard_Boolean bIsOpenBox = 0, bIsInverted = 0;
+  Standard_Integer nSh = 0, nFc = 0;
+  Standard_Real aTolS = NAN, aTolFc = NAN;
   TColStd_ListIteratorOfListOfInteger aItLI, aItLI1;
   //
   const BOPDS_ShapeInfo& aSI=ShapeInfo(theIndex);
@@ -2044,7 +2046,7 @@ void BOPDS_DS::BuildBndBoxSolid(const Standard_Integer theIndex,
 //=======================================================================
 void BOPDS_DS::UpdatePaveBlocksWithSDVertices()
 {
-  Standard_Integer i, aNbPBP;
+  Standard_Integer i = 0, aNbPBP = 0;
   BOPDS_ListIteratorOfListOfPaveBlock aItPB;
   //
   BOPDS_VectorOfListOfPaveBlock& aPBP=myPaveBlocksPool;
@@ -2067,7 +2069,7 @@ void BOPDS_DS::UpdatePaveBlocksWithSDVertices()
 void BOPDS_DS::UpdatePaveBlockWithSDVertices
   (const Handle(BOPDS_PaveBlock)& thePB)
 {
-  Standard_Integer nV1, nV2;
+  Standard_Integer nV1 = 0, nV2 = 0;
   BOPDS_Pave aPave1, aPave2;
   //
   aPave1 = thePB->Pave1();
@@ -2142,7 +2144,7 @@ void BOPDS_DS::ReleasePaveBlocks()
     if (aLPB.Extent() == 1) {
       const Handle(BOPDS_PaveBlock)& aPB = aLPB.First();
       if (!IsCommonBlock(aPB)) {
-        Standard_Integer nV1, nV2;
+        Standard_Integer nV1 = 0, nV2 = 0;
         aPB->Indices(nV1, nV2);
         if (!IsNewShape(nV1) && !IsNewShape(nV2)) {
           // Both vertices are original, thus the PB is untouched.
@@ -2174,7 +2176,7 @@ Standard_Boolean BOPDS_DS::IsValidShrunkData(const Handle(BOPDS_PaveBlock)& theP
   // Shrunk range
   Standard_Real aTS[2];
   Bnd_Box aBox;
-  Standard_Boolean bIsSplit;
+  Standard_Boolean bIsSplit = 0;
   //
   thePB->ShrunkData(aTS[0], aTS[1], aBox, bIsSplit);
   //
index b0adff25bccc3f60763dbd3bb4784507cadbcd96..51473956bc908a0ef40e6d3e5226799254d71df6 100644 (file)
@@ -43,7 +43,7 @@ class BOPDS_TSR : public BOPTools_BoxTreeSelector
     myHasBRep(Standard_False), 
     myIndex(-1) {}
   //
-  virtual ~BOPDS_TSR() {
+  ~BOPDS_TSR() override {
   }
   //
   void SetHasBRep(const Standard_Boolean bFlag) {
@@ -76,13 +76,13 @@ typedef NCollection_Vector<BOPDS_TSR> BOPDS_VectorOfTSR;
 BOPDS_Iterator::BOPDS_Iterator()
 :
   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
-  myRunParallel(Standard_False),
+  myDS(NULL), myLength(0), myRunParallel(Standard_False),
   myUseExt(Standard_False)
 {
-  Standard_Integer i, aNb;
+  Standard_Integer i = 0, aNb = 0;
   //
-  myDS=NULL;
-  myLength=0;
+  
+  
   //
   aNb=BOPDS_DS::NbInterfTypes();
   myLists.SetIncrement(aNb);
@@ -104,15 +104,15 @@ BOPDS_Iterator::BOPDS_Iterator
   (const Handle(NCollection_BaseAllocator)& theAllocator)
 :
   myAllocator(theAllocator),
-  myLists(0, theAllocator),
+  myDS(NULL), myLength(0), myLists(0, theAllocator),
   myRunParallel(Standard_False),
   myExtLists(0, theAllocator),
   myUseExt(Standard_False)
 {
-  Standard_Integer i, aNb;
+  Standard_Integer i = 0, aNb = 0;
   //
-  myDS=NULL; 
-  myLength=0;
+  
+  
   //
   aNb=BOPDS_DS::NbInterfTypes();
   myLists.SetIncrement(aNb);
@@ -179,7 +179,7 @@ Standard_Integer BOPDS_Iterator::ExpectedLength() const
 //=======================================================================
 Standard_Integer BOPDS_Iterator::BlockLength() const
 {
-  Standard_Integer aNbIIs;
+  Standard_Integer aNbIIs = 0;
   Standard_Real aCfPredict=.5;
   
   aNbIIs=ExpectedLength();
@@ -198,7 +198,7 @@ Standard_Integer BOPDS_Iterator::BlockLength() const
 void BOPDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1,
     const TopAbs_ShapeEnum aType2)
 {
-  Standard_Integer iX;
+  Standard_Integer iX = 0;
   //
   myLength=0;
   iX=BOPDS_Tools::TypeToInteger(aType1, aType2);
@@ -236,7 +236,7 @@ void BOPDS_Iterator::Next()
 void BOPDS_Iterator::Value(Standard_Integer& theI1,
                            Standard_Integer& theI2) const
 {
-  Standard_Integer iT1, iT2, n1, n2;
+  Standard_Integer iT1 = 0, iT2 = 0, n1 = 0, n2 = 0;
   //
   const BOPDS_Pair& aPair = myIterator.Value();
   aPair.Indices(n1, n2);
@@ -259,7 +259,7 @@ void BOPDS_Iterator::Prepare(const Handle(IntTools_Context)& theCtx,
                              const Standard_Boolean theCheckOBB,
                              const Standard_Real theFuzzyValue)
 {
-  Standard_Integer i, aNbInterfTypes;
+  Standard_Integer i = 0, aNbInterfTypes = 0;
   //
   aNbInterfTypes=BOPDS_DS::NbInterfTypes();
   myLength=0;
index 581c74569d34ba04e27444e7afdb8557b533f3f7..7419a776be6a4fa0f2c9ddbb975449e86f41cc72 100644 (file)
@@ -57,7 +57,7 @@ BOPDS_IteratorSI::~BOPDS_IteratorSI()
 //=======================================================================
 void BOPDS_IteratorSI::UpdateByLevelOfCheck(const Standard_Integer theLevel)
 {
-  Standard_Integer i, aNbInterfTypes;
+  Standard_Integer i = 0, aNbInterfTypes = 0;
   //
   aNbInterfTypes=BOPDS_DS::NbInterfTypes();
   for (i=theLevel+1; i<aNbInterfTypes; ++i) {
old mode 100755 (executable)
new mode 100644 (file)
index df2dd6e..ea5f562
@@ -30,13 +30,13 @@ IMPLEMENT_STANDARD_RTTIEXT(BOPDS_PaveBlock,Standard_Transient)
   BOPDS_PaveBlock::BOPDS_PaveBlock()
 :
   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
-  myExtPaves(myAllocator)
+  myEdge(-1), myOriginalEdge(-1), myExtPaves(myAllocator), myTS1(-99.), myTS2(myTS1), myIsSplittable(Standard_False)
 {
-  myEdge=-1;
-  myOriginalEdge=-1;
-  myTS1=-99.;
-  myTS2=myTS1;
-  myIsSplittable=Standard_False;
+  
+  
+  
+  
+  
 }
 //=======================================================================
 //function : 
@@ -45,14 +45,14 @@ IMPLEMENT_STANDARD_RTTIEXT(BOPDS_PaveBlock,Standard_Transient)
   BOPDS_PaveBlock::BOPDS_PaveBlock(const Handle(NCollection_BaseAllocator)& theAllocator)
 :
   myAllocator(theAllocator),
-  myExtPaves(theAllocator),
-  myMFence(100, theAllocator)
+  myEdge(-1), myOriginalEdge(-1), myExtPaves(theAllocator),
+  myTS1(-99.), myTS2(myTS1), myMFence(100, theAllocator), myIsSplittable(Standard_False)
 {
-  myEdge=-1;
-  myOriginalEdge=-1;
-  myTS1=-99.;
-  myTS2=myTS1;
-  myIsSplittable=Standard_False;
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -171,8 +171,8 @@ IMPLEMENT_STANDARD_RTTIEXT(BOPDS_PaveBlock,Standard_Transient)
 //=======================================================================
   Standard_Boolean BOPDS_PaveBlock::HasSameBounds(const Handle(BOPDS_PaveBlock)& theOther)const
 {
-  Standard_Boolean bFlag1, bFlag2;
-  Standard_Integer n11, n12, n21, n22;
+  Standard_Boolean bFlag1 = 0, bFlag2 = 0;
+  Standard_Integer n11 = 0, n12 = 0, n21 = 0, n22 = 0;
   //
   Indices(n11, n12);
   theOther->Indices(n21, n22);
@@ -256,7 +256,7 @@ void BOPDS_PaveBlock::RemoveExtPave(const Standard_Integer theVertNum)
                                                       const Standard_Real theTol,
                                                       Standard_Integer& theInd) const
 {
-  Standard_Boolean bRet;
+  Standard_Boolean bRet = 0;
   BOPDS_ListIteratorOfListOfPave aIt;
   //
   bRet = Standard_False;
@@ -278,7 +278,7 @@ void BOPDS_PaveBlock::RemoveExtPave(const Standard_Integer theVertNum)
   void BOPDS_PaveBlock::Update(BOPDS_ListOfPaveBlock& theLPB,
                                const Standard_Boolean theFlag)
 {
-  Standard_Integer i, aNb;
+  Standard_Integer i = 0, aNb = 0;
   BOPDS_Pave aPave1, aPave2;
   Handle(BOPDS_PaveBlock) aPB;
   BOPDS_ListIteratorOfListOfPave aIt;
index 479c65f778dc29b70b277d1d8a94235adbe6f04b..95a528ac8db657e54529d5c320b4f7871c4b7338 100644 (file)
@@ -32,9 +32,9 @@
   BOPDS_SubIterator::BOPDS_SubIterator()
 :
   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
-  myList(1, myAllocator)
+  myDS(NULL), myList(1, myAllocator)
 {
-  myDS=NULL;
+  
 }
 //=======================================================================
 //function : BOPDS_SubIterator
@@ -43,9 +43,9 @@
   BOPDS_SubIterator::BOPDS_SubIterator(const Handle(NCollection_BaseAllocator)& theAllocator)
 :
   myAllocator(theAllocator),
-  myList(1, myAllocator)
+  myDS(NULL), myList(1, myAllocator)
 {
-  myDS=NULL;
+  
 }
 //=======================================================================
 //function : ~
@@ -72,7 +72,7 @@ void BOPDS_SubIterator::Initialize()
   void BOPDS_SubIterator::Value(Standard_Integer& theI1,
                                 Standard_Integer& theI2) const
 {
-  Standard_Integer iT1, iT2, n1, n2;
+  Standard_Integer iT1 = 0, iT2 = 0, n1 = 0, n2 = 0;
   //
   const BOPDS_Pair& aPKB = myIterator.Value();
   aPKB.Indices(n1, n2);
index df3070771fd1bd70a7cc59c65745589f51086fd4..b87b74642ed799afebb6c8d01dd70cf07960f15b 100644 (file)
@@ -121,8 +121,8 @@ protected:
   BOPDS_PDS myDS;
   BOPDS_VectorOfPair myList;
   BOPDS_VectorOfPair::Iterator myIterator;
-  TColStd_ListOfInteger* mySubSet1;
-  TColStd_ListOfInteger* mySubSet2;
+  TColStd_ListOfInteger* mySubSet1{};
+  TColStd_ListOfInteger* mySubSet2{};
 
 private:
 
index 78322a73c5380c3ab318d9a679777db4cb6b8517..19a6de34ccdcf9dc2b5f32e282f148630d0a7419 100644 (file)
@@ -16,6 +16,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BOPTools_AlgoTools.hxx>
 #include <BOPAlgo_Alerts.hxx>
 #include <BOPTools_AlgoTools2D.hxx>
@@ -355,8 +357,8 @@ void BOPTools_AlgoTools::OrientEdgesOnWire(TopoDS_Shape& theWire)
 //=======================================================================
 void BOPTools_AlgoTools::OrientFacesOnShell (TopoDS_Shape& aShell)
 {
-  Standard_Boolean bIsProcessed1, bIsProcessed2;
-  Standard_Integer i, aNbE, aNbF, j;
+  Standard_Boolean bIsProcessed1 = 0, bIsProcessed2 = 0;
+  Standard_Integer i = 0, aNbE = 0, aNbF = 0, j = 0;
   TopAbs_Orientation anOrE1, anOrE2;
   TopoDS_Face aF1x, aF2x;
   TopoDS_Shape aShellNew;
@@ -509,7 +511,7 @@ void BOPTools_AlgoTools::MakeConnexityBlock
    TopTools_ListOfShape& theLCB,
    const Handle(NCollection_BaseAllocator)& theAllocator)
 {
-  Standard_Integer  aNbF, aNbAdd1, aNbAdd, i;
+  Standard_Integer  aNbF = 0, aNbAdd1 = 0, aNbAdd = 0, i = 0;
   TopExp_Explorer aExp;
   TopTools_ListIteratorOfListOfShape aIt;
   //
@@ -701,7 +703,7 @@ TopAbs_State BOPTools_AlgoTools::ComputeState
    const Standard_Real theTol,
    const Handle(IntTools_Context)& theContext)
 {
-  Standard_Real aT1, aT2, aT = 0.;
+  Standard_Real aT1 = NAN, aT2 = NAN, aT = 0.;
   TopAbs_State aState;
   Handle(Geom_Curve) aC3D;
   gp_Pnt aP3D; 
@@ -717,7 +719,7 @@ TopAbs_State BOPTools_AlgoTools::ComputeState
     aP3D=BRep_Tool::Pnt(aV);
   }
   else {//usual case
-    Standard_Boolean bF2Inf, bL2Inf;
+    Standard_Boolean bF2Inf = 0, bL2Inf = 0;
     Standard_Real dT=10.;
     //
     bF2Inf = Precision::IsNegativeInfinite(aT1);
@@ -773,7 +775,7 @@ Standard_Boolean BOPTools_AlgoTools::IsInternalFace
    const Standard_Real theTol,
    const Handle(IntTools_Context)& theContext)
 {
-  Standard_Boolean bDegenerated;
+  Standard_Boolean bDegenerated = 0;
   TopAbs_Orientation aOr;
   TopoDS_Edge aE1;
   TopExp_Explorer aExp;
@@ -854,7 +856,7 @@ Standard_Integer BOPTools_AlgoTools::IsInternalFace
    TopTools_ListOfShape& theLF,
    const Handle(IntTools_Context)& theContext)
 {
-  Standard_Integer aNbF, iRet;
+  Standard_Integer aNbF = 0, iRet = 0;
   //
   iRet=0;
   //
@@ -949,9 +951,9 @@ Standard_Boolean BOPTools_AlgoTools::GetFaceOff
    TopoDS_Face& theFOff,
    const Handle(IntTools_Context)& theContext)
 {
-  Standard_Boolean bRet, bIsComputed;
-  Standard_Real aT, aT1, aT2, aAngle, aTwoPI, aAngleMin, aDt3D;
-  Standard_Real aUmin, aUsup, aVmin, aVsup;
+  Standard_Boolean bRet = 0, bIsComputed = 0;
+  Standard_Real aT = NAN, aT1 = NAN, aT2 = NAN, aAngle = NAN, aTwoPI = NAN, aAngleMin = NAN, aDt3D = NAN;
+  Standard_Real aUmin = NAN, aUsup = NAN, aVmin = NAN, aVsup = NAN;
   gp_Pnt aPn1, aPn2, aPx;
   gp_Dir aDN1, aDN2, aDBF, aDBF2, aDTF;
   gp_Vec aVTgt;
@@ -1044,7 +1046,7 @@ Standard_Boolean BOPTools_AlgoTools::GetEdgeOff(const TopoDS_Edge& theE1,
                                                 const TopoDS_Face& theF2,
                                                 TopoDS_Edge& theE2)
 {
-  Standard_Boolean bFound;
+  Standard_Boolean bFound = 0;
   TopAbs_Orientation aOr1, aOr1C, aOr2;
   TopExp_Explorer anExp;
   //
@@ -1191,7 +1193,7 @@ Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse
    const Handle(IntTools_Context)& theContext,
    Standard_Integer *theError)
 {
-  Standard_Boolean bRet;
+  Standard_Boolean bRet = 0;
   TopAbs_ShapeEnum aType;
   //
   bRet=Standard_False;
@@ -1229,7 +1231,7 @@ Standard_Boolean BOPTools_AlgoTools::IsSplitToReverseWithWarn(const TopoDS_Shape
                                                               const Handle(IntTools_Context)& theContext,
                                                               const Handle(Message_Report)& theReport)
 {
-  Standard_Integer anErr;
+  Standard_Integer anErr = 0;
   Standard_Boolean isToReverse = BOPTools_AlgoTools::IsSplitToReverse(theSplit, theShape, theContext, &anErr);
   if (anErr != 0 && !theReport.IsNull())
   {
@@ -1271,7 +1273,7 @@ Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse
   gp_Pnt2d aP2DFSp;
   //
   // Error status
-  Standard_Integer iErr;
+  Standard_Integer iErr = 0;
   // Use the hatcher to find the point in the middle of the face
   iErr = BOPTools_AlgoTools3D::PointInFace(theFSp, aPFSp, aP2DFSp, theContext);
   if (iErr) {
@@ -1323,7 +1325,7 @@ Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse
     return bDone;
   }
   // UV coordinates of the point on the original face
-  Standard_Real aU, aV;
+  Standard_Real aU = NAN, aV = NAN;
   aProjector.LowerDistanceParameters(aU, aV);
   //
   // Compute normal direction for the original face in this point
@@ -1370,7 +1372,7 @@ Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse
     *theError = 0;
 
   // Get the curves from the edges
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   Handle(Geom_Curve) aCSp = BRep_Tool::Curve(theESp, f, l);
   Handle(Geom_Curve) aCOr = BRep_Tool::Curve(theEOr, f, l);
 
@@ -1402,7 +1404,7 @@ Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse
     }
 
     // Find corresponding parameter on the original edge
-    Standard_Real aTmOr;
+    Standard_Real aTmOr = NAN;
     if (!theContext->ProjectPointOnEdge(aCSp->Value(aTm), theEOr, aTmOr))
     {
       // Unable to project the point inside the split edge
@@ -1439,11 +1441,11 @@ Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse
 Standard_Boolean BOPTools_AlgoTools::IsHole(const TopoDS_Shape& aW,
                                             const TopoDS_Shape& aFace)
 {
-  Standard_Boolean bIsHole;
-  Standard_Integer i, aNbS;
-  Standard_Real aT1, aT2, aS;
-  Standard_Real aU1, aU, dU;
-  Standard_Real aX1, aY1, aX0, aY0;
+  Standard_Boolean bIsHole = 0;
+  Standard_Integer i = 0, aNbS = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN, aS = NAN;
+  Standard_Real aU1 = NAN, aU = NAN, dU = NAN;
+  Standard_Real aX1 = NAN, aY1 = NAN, aX0 = NAN, aY0 = NAN;
   TopAbs_Orientation aOr;
   
   gp_Pnt2d aP2D0, aP2D1;
@@ -1566,12 +1568,12 @@ void BOPTools_AlgoTools::MakePCurve(const TopoDS_Edge& aE,
                                     const Handle(IntTools_Context)& theContext)
 
 {
-  Standard_Integer i;
-  Standard_Real aTolE, aT1, aT2, aOutFirst, aOutLast, aOutTol;
+  Standard_Integer i = 0;
+  Standard_Real aTolE = NAN, aT1 = NAN, aT2 = NAN, aOutFirst = NAN, aOutLast = NAN, aOutTol = NAN;
   Handle(Geom2d_Curve) aC2D, aC2DA, aC2Dx1;
   TopoDS_Face aFFWD; 
   BRep_Builder aBB;
-  Standard_Boolean bPC;
+  Standard_Boolean bPC = 0;
   //
   aTolE=BRep_Tool::Tolerance(aE);
   //
@@ -1649,7 +1651,7 @@ Standard_Integer BOPTools_AlgoTools::ComputeVV(const TopoDS_Vertex& aV1,
                                                const gp_Pnt& aP2,
                                                const Standard_Real aTolP2)
 {
-  Standard_Real aTolV1, aTolSum, aTolSum2, aD2;
+  Standard_Real aTolV1 = NAN, aTolSum = NAN, aTolSum2 = NAN, aD2 = NAN;
   gp_Pnt aP1;
   //
   aTolV1=BRep_Tool::Tolerance(aV1);
@@ -1673,7 +1675,7 @@ Standard_Integer BOPTools_AlgoTools::ComputeVV(const TopoDS_Vertex& aV1,
                                                const TopoDS_Vertex& aV2,
                                                const Standard_Real aFuzz)
 {
-  Standard_Real aTolV1, aTolV2, aTolSum, aTolSum2, aD2;
+  Standard_Real aTolV1 = NAN, aTolV2 = NAN, aTolSum = NAN, aTolSum2 = NAN, aD2 = NAN;
   gp_Pnt aP1, aP2;
   Standard_Real aFuzz1 = (aFuzz > Precision::Confusion() ? aFuzz : Precision::Confusion());
   //
@@ -1703,7 +1705,7 @@ void BOPTools_AlgoTools::MakeVertex(const TopTools_ListOfShape& aLV,
     aVnew=*((TopoDS_Vertex*)(&aLV.First()));
   else if (aNb > 1)
   {
-    Standard_Real aNTol;
+    Standard_Real aNTol = NAN;
     gp_Pnt aNC;
     BRepLib::BoundingVertex(aLV, aNC, aNTol);
     BRep_Builder aBB;
@@ -1719,7 +1721,7 @@ Standard_Boolean BOPTools_AlgoTools::GetEdgeOnFace
  const TopoDS_Face& theF2,
  TopoDS_Edge& theE2)
 {
-  Standard_Boolean bFound;
+  Standard_Boolean bFound = 0;
   TopoDS_Iterator aItF, aItW;
   //
   bFound=Standard_False;
@@ -1748,8 +1750,8 @@ Standard_Boolean FindFacePairs (const TopoDS_Edge& theE,
                                 BOPTools_ListOfCoupleOfShape& theLCFF,
                                 const Handle(IntTools_Context)& theContext)
 {
-  Standard_Boolean bFound;
-  Standard_Integer i, aNbCEF;
+  Standard_Boolean bFound = 0;
+  Standard_Integer i = 0, aNbCEF = 0;
   TopAbs_Orientation aOr, aOrC = TopAbs_FORWARD;
   TopTools_MapOfShape aMFP;
   TopoDS_Face aF1, aF2;
@@ -1839,7 +1841,7 @@ Standard_Real AngleWithRef(const gp_Dir& theD1,
                            const gp_Dir& theD2,
                            const gp_Dir& theDRef)
 {
-  Standard_Real aCosinus, aSinus, aBeta, aHalfPI, aScPr;
+  Standard_Real aCosinus = NAN, aSinus = NAN, aBeta = NAN, aHalfPI = NAN, aScPr = NAN;
   gp_XYZ aXYZ;
   //
   aHalfPI=0.5*M_PI;
@@ -1874,13 +1876,13 @@ Standard_Boolean BOPTools_AlgoTools::IsBlockInOnFace
    const TopoDS_Edge& aE1,
    const Handle(IntTools_Context)& aContext)
 {
-  Standard_Boolean bFlag;
-  Standard_Real f1, l1, ULD, VLD;
+  Standard_Boolean bFlag = 0;
+  Standard_Real f1 = NAN, l1 = NAN, ULD = NAN, VLD = NAN;
   gp_Pnt2d aP2D;
   gp_Pnt aP11, aP12;
   //
   aShrR.Range(f1, l1);
-  Standard_Real dt=0.0075,  k;//dt=0.001,  k;
+  Standard_Real dt=0.0075,  k = NAN;//dt=0.001,  k;
   k=dt*(l1-f1);
   f1=f1+k;
   l1=l1-k;
@@ -1925,7 +1927,7 @@ Standard_Boolean BOPTools_AlgoTools::IsBlockInOnFace
   }
   //
   // Treatment intemediate
-  Standard_Real m1, aTolF, aTolE, aTol, aDist;
+  Standard_Real m1 = NAN, aTolF = NAN, aTolE = NAN, aTol = NAN, aDist = NAN;
   m1=IntTools_Tools::IntermediatePoint(f1, l1);
   BOPTools_AlgoTools::PointOnEdge(aE1, m1, aP12);
   //
@@ -1964,8 +1966,8 @@ Standard_Boolean BOPTools_AlgoTools::IsMicroEdge
    const Handle(IntTools_Context)& aCtx,
    const Standard_Boolean bCheckSplittable)
 {
-  Standard_Boolean bRet;
-  Standard_Real aT1, aT2, aTmp;
+  Standard_Boolean bRet = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN, aTmp = NAN;
   Handle(Geom_Curve) aC3D;
   TopoDS_Vertex aV1, aV2;
   //
@@ -2013,7 +2015,7 @@ Standard_Boolean GetFaceDir(const TopoDS_Edge& aE,
                             GeomAPI_ProjectPointOnSurf& aProjPL,
                             const Standard_Real aDt)
 {
-  Standard_Real aTolE;
+  Standard_Real aTolE = NAN;
   gp_Pnt aPx;
   //
   BOPTools_AlgoTools3D::GetNormalToFaceOnEdge(aE, aF, aT, aDN, theContext);
@@ -2058,9 +2060,9 @@ Standard_Boolean FindPointInFace(const TopoDS_Face& aF,
                                  const Standard_Real aDt,
                                  const Standard_Real aTolE)
 {
-  Standard_Integer aNbItMax;
-  Standard_Real aDist, aDTol, aPM, anEps;
-  Standard_Boolean bRet;
+  Standard_Integer aNbItMax = 0;
+  Standard_Real aDist = NAN, aDTol = NAN, aPM = NAN, anEps = NAN;
+  Standard_Boolean bRet = 0;
   gp_Pnt aP1, aPS;
   //
   aDTol = Precision::Angular();
@@ -2126,7 +2128,7 @@ Standard_Real MinStep3D(const TopoDS_Edge& theE1,
                         const Handle(IntTools_Context)& theContext,
                         Standard_Boolean& theSmallFaces)
 {
-  Standard_Real aDt, aTolE, aTolF, aDtMax, aDtMin;
+  Standard_Real aDt = NAN, aTolE = NAN, aTolF = NAN, aDtMax = NAN, aDtMin = NAN;
   //
   // add the current pair of edge/face for checking as well
   BOPTools_CoupleOfShape aCS1;
@@ -2197,7 +2199,7 @@ Standard_Real MinStep3D(const TopoDS_Edge& theE1,
     //
     const BRepAdaptor_Surface& aBAS = theContext->SurfaceAdaptor(aF);
     //
-    Standard_Real aUMin, aUMax, aVMin, aVMax;
+    Standard_Real aUMin = NAN, aUMax = NAN, aVMin = NAN, aVMax = NAN;
     theContext->UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
     //
     Standard_Real aDU = aUMax - aUMin;
@@ -2227,8 +2229,8 @@ Standard_Real MinStep3D(const TopoDS_Edge& theE1,
 //=======================================================================
 Standard_Boolean BOPTools_AlgoTools::IsOpenShell(const TopoDS_Shell& aSh)
 {
-  Standard_Boolean bRet;
-  Standard_Integer i, aNbE, aNbF;
+  Standard_Boolean bRet = 0;
+  Standard_Integer i = 0, aNbE = 0, aNbF = 0;
   TopAbs_Orientation aOrF;
   TopTools_IndexedDataMapOfShapeListOfShape aMEF; 
   TopTools_ListIteratorOfListOfShape aItLS;
@@ -2271,7 +2273,7 @@ Standard_Boolean BOPTools_AlgoTools::IsOpenShell(const TopoDS_Shell& aSh)
 Standard_Boolean BOPTools_AlgoTools::IsInvertedSolid
   (const TopoDS_Solid& aSolid)
 {
-  Standard_Real aTolS;
+  Standard_Real aTolS = NAN;
   TopAbs_State aState;
   BRepClass3d_SolidClassifier aSC(aSolid);
   //
index 9bcafe1c332ca90f4b9b723a1dbd06fef8c539cf..127069afbd9dde4f32441a1e29dc50a77a9678eb 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BOPTools_AlgoTools2D.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -55,9 +57,9 @@ void BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace (const TopoDS_Edge& aE,
 {
   BRep_Builder aBB;
   Handle(Geom2d_Curve) aC2D;
-  Standard_Real  aTolPC, aTolFact, aTolEdge, aFirst, aLast;
+  Standard_Real  aTolPC = NAN, aTolFact = NAN, aTolEdge = NAN, aFirst = NAN, aLast = NAN;
   
-  Standard_Boolean aHasOld;
+  Standard_Boolean aHasOld = 0;
   aHasOld=BOPTools_AlgoTools2D::HasCurveOnSurface (aE, aF, aC2D, 
                                                    aFirst, aLast, 
                                                    aTolEdge);
@@ -85,8 +87,8 @@ Standard_Boolean BOPTools_AlgoTools2D::EdgeTangent
    const Standard_Real aT,
    gp_Vec& aTau)
 {
-  Standard_Boolean isdgE;
-  Standard_Real first, last;
+  Standard_Boolean isdgE = 0;
+  Standard_Real first = NAN, last = NAN;
   
   isdgE = BRep_Tool::Degenerated(anEdge); 
   if (isdgE) {
@@ -123,7 +125,7 @@ void BOPTools_AlgoTools2D::PointOnSurface (const TopoDS_Edge& aE,
 {
   gp_Pnt2d aP2D;
   Handle(Geom2d_Curve) aC2D;
-  Standard_Real aToler, aFirst, aLast;
+  Standard_Real aToler = NAN, aFirst = NAN, aLast = NAN;
 
   BOPTools_AlgoTools2D::CurveOnSurface (aE, aF, aC2D, aFirst, aLast, aToler, theContext);
   aC2D->D0(aParameter, aP2D);
@@ -142,7 +144,7 @@ void BOPTools_AlgoTools2D::CurveOnSurface (const TopoDS_Edge& aE,
                                            Standard_Real& aToler,
                                            const Handle(IntTools_Context)& theContext)
 {
-  Standard_Real aFirst, aLast
+  Standard_Real aFirst = NAN, aLast = NAN
   //
   BOPTools_AlgoTools2D::CurveOnSurface(aE, aF, aC2D, aFirst, aLast, aToler, theContext); 
   //
@@ -160,7 +162,7 @@ void BOPTools_AlgoTools2D::CurveOnSurface (const TopoDS_Edge& aE,
                                            Standard_Real& aToler,
                                            const Handle(IntTools_Context)& theContext)
 {
-  Standard_Boolean aHasOld;
+  Standard_Boolean aHasOld = 0;
   Handle(Geom2d_Curve) C2D;
 
   aHasOld=BOPTools_AlgoTools2D::HasCurveOnSurface (aE, aF, C2D, 
@@ -187,7 +189,7 @@ Standard_Boolean BOPTools_AlgoTools2D::HasCurveOnSurface
    Standard_Real& aLast,
    Standard_Real& aToler)
 {
-  Standard_Boolean aHasOld;
+  Standard_Boolean aHasOld = 0;
   
   aToler=BRep_Tool::Tolerance(aE);
   BRep_Tool::Range(aE, aFirst, aLast);
@@ -208,9 +210,9 @@ Standard_Boolean BOPTools_AlgoTools2D::HasCurveOnSurface
   (const TopoDS_Edge& aE,
    const TopoDS_Face& aF)
 {
-  Standard_Boolean bHasOld;
+  Standard_Boolean bHasOld = 0;
   Handle(Geom2d_Curve) aC2D;
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   //
   BRep_Tool::Range(aE, aFirst, aLast);
   //
@@ -252,7 +254,7 @@ void BOPTools_AlgoTools2D::AdjustPCurveOnFace
    const Handle(IntTools_Context)& theContext)
 {
   BRepAdaptor_Surface aBASTmp;
-  const BRepAdaptor_Surface* pBAS;
+  const BRepAdaptor_Surface* pBAS = nullptr;
   if (!theContext.IsNull()) {
     pBAS = &theContext->SurfaceAdaptor(theF);
   }
@@ -274,9 +276,9 @@ void BOPTools_AlgoTools2D::AdjustPCurveOnSurf
    const Handle(Geom2d_Curve)& aC2D,
    Handle(Geom2d_Curve)& aC2DA)
 {
-  Standard_Boolean mincond, maxcond;
-  Standard_Real UMin, UMax, VMin, VMax, aT, u2, v2, du, dv, aDelta;
-  Standard_Real aUPeriod;
+  Standard_Boolean mincond = 0, maxcond = 0;
+  Standard_Real UMin = NAN, UMax = NAN, VMin = NAN, VMax = NAN, aT = NAN, u2 = NAN, v2 = NAN, du = NAN, dv = NAN, aDelta = NAN;
+  Standard_Real aUPeriod = NAN;
   //
   const TopoDS_Face& aF=aBAS.Face();
   UMin=aBAS.FirstUParameter();
@@ -312,7 +314,7 @@ void BOPTools_AlgoTools2D::AdjustPCurveOnSurf
     //
     if (du==0.) {
       if (aBAS.GetType()==GeomAbs_Cylinder) {
-        Standard_Real aR, dFi, aTol;
+        Standard_Real aR = NAN, dFi = NAN, aTol = NAN;
         //
         gp_Cylinder aCylinder=aBAS.Cylinder();
         aR=aCylinder.Radius();
@@ -334,7 +336,7 @@ void BOPTools_AlgoTools2D::AdjustPCurveOnSurf
   // dv
   dv = 0.;
   if (aBAS.IsVPeriodic()) {
-    Standard_Real aVPeriod, aVm, aVr, aVmid, dVm, dVr;
+    Standard_Real aVPeriod = NAN, aVm = NAN, aVr = NAN, aVmid = NAN, dVm = NAN, dVr = NAN;
     //
     aVPeriod = aBAS.VPeriod();
     mincond = (VMin - v2 > aDelta);
@@ -358,7 +360,7 @@ void BOPTools_AlgoTools2D::AdjustPCurveOnSurf
   //
   {
     //check the point with classifier
-    Standard_Real u,v;
+    Standard_Real u = NAN,v = NAN;
     u = u2 + du;
     v = v2 + dv;
     if (aBAS.IsUPeriodic()) {
@@ -415,7 +417,7 @@ Standard_Real BOPTools_AlgoTools2D::IntermediatePoint
 {
   //define parameter division number as 10*e^(-PI) = 0.43213918
   const Standard_Real PAR_T = 0.43213918;
-  Standard_Real aParm;
+  Standard_Real aParm = NAN;
   aParm=(1.-PAR_T)*aFirst + PAR_T*aLast;
   return aParm;
 }
@@ -427,7 +429,7 @@ Standard_Real BOPTools_AlgoTools2D::IntermediatePoint
   (const TopoDS_Edge& aE)
                                                 
 {
-  Standard_Real aT, aT1, aT2;
+  Standard_Real aT = NAN, aT1 = NAN, aT2 = NAN;
 
   Handle(Geom_Curve)aC1=BRep_Tool::Curve(aE, aT1, aT2);
   if (aC1.IsNull())
@@ -448,8 +450,8 @@ void BOPTools_AlgoTools2D::Make2D (const TopoDS_Edge& aE,
                                    Standard_Real& aToler,
                                    const Handle(IntTools_Context)& theContext)
 {
-  Standard_Boolean aLocIdentity;
-  Standard_Real f3d, l3d;
+  Standard_Boolean aLocIdentity = 0;
+  Standard_Real f3d = NAN, l3d = NAN;
   TopLoc_Location aLoc;
 
   Handle(Geom2d_Curve) C2D; 
@@ -497,7 +499,7 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace (const TopoDS_Face& aF,
                                              Standard_Real& TolReached2d,
                                              const Handle(IntTools_Context)& theContext)
 {
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
 
   aFirst = aC3D -> FirstParameter();
   aLast  = aC3D -> LastParameter();
@@ -522,7 +524,7 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
    const Handle(IntTools_Context)& theContext)
 {
   BRepAdaptor_Surface aBASTmp;
-  const BRepAdaptor_Surface* pBAS;
+  const BRepAdaptor_Surface* pBAS = nullptr;
   if (!theContext.IsNull()) {
     pBAS = &theContext->SurfaceAdaptor(aF);
   }
@@ -534,7 +536,7 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
   Handle(BRepAdaptor_Surface) aBAHS = new BRepAdaptor_Surface(*pBAS);
   Handle(GeomAdaptor_Curve) aBAHC = new GeomAdaptor_Curve(aC3D, aT1, aT2);
   //
-  Standard_Real aTolR;
+  Standard_Real aTolR = NAN;
   Standard_Real aTR = Precision::Confusion();//1.e-7;
   Standard_Real aMaxTol = 1.e3 * aTR; //0.0001
   Standard_Boolean isAnaSurf =  ProjLib::IsAnaSurf(aBAHS);
@@ -642,7 +644,7 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
   Handle(Geom_Surface) aS = pBAS->Surface().Surface();
   aS = Handle(Geom_Surface)::DownCast(aS->Transformed(pBAS->Trsf()));
   //
-  Standard_Real aT;
+  Standard_Real aT = NAN;
   if (IntTools_Tools::ComputeTolerance
       (aC3D, aC2D, aS, aT1, aT2, aTolR, aT)) {
     if (aTolR > TolReached2d) {
@@ -657,7 +659,7 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
 //=======================================================================
 Standard_Real MaxToleranceEdge (const TopoDS_Face& aF) 
 {
-  Standard_Real aTol, aTolMax;
+  Standard_Real aTol = NAN, aTolMax = NAN;
   TopExp_Explorer aExp;
   //
   aTolMax=0.;
index 1d4d5252de8b5980e1540b3bd12c678252a39e12..0f34de75eefb0ab47e930a2cd90e51a3b7d300c7 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BOPTools_AlgoTools2D.hxx>
 
 #include <gp_Vec2d.hxx>
@@ -54,10 +56,10 @@ Standard_Integer BOPTools_AlgoTools2D::AttachExistingPCurve
    const TopoDS_Face& theF, 
    const Handle(IntTools_Context)& aCtx)
 {
-  Standard_Boolean bIsToReverse, bIsClosed, bComp;
-  Standard_Integer iRet;
-  Standard_Real aTol, aT11, aT12, aT21, aT22, aTolPPC;
-  Standard_Real aTolSP, aTMax;
+  Standard_Boolean bIsToReverse = 0, bIsClosed = 0, bComp = 0;
+  Standard_Integer iRet = 0;
+  Standard_Real aTol = NAN, aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN, aTolPPC = NAN;
+  Standard_Real aTolSP = NAN, aTMax = NAN;
   Handle(Geom2d_Curve) aC2Dold, aC2DoldC;
   Handle(Geom2d_Curve) aC2DT;
   BRep_Builder aBB;
@@ -81,7 +83,7 @@ Standard_Integer BOPTools_AlgoTools2D::AttachExistingPCurve
   //
   bIsToReverse = BOPTools_AlgoTools::IsSplitToReverse(aE1, aE2, aCtx);
   if (bIsToReverse) {
-    Standard_Real aT21r, aT22r;
+    Standard_Real aT21r = NAN, aT22r = NAN;
     //
     aC2DoldC->Reverse();
     //
@@ -166,10 +168,10 @@ Standard_Integer UpdateClosedPCurve(const TopoDS_Edge& aEold,
                                     const TopoDS_Face& aF, 
                                     const Handle(IntTools_Context)& aCtx)
 {
-  Standard_Boolean bUClosed, bRevOrder;
-  Standard_Integer aNbPoints, iRet;
-  Standard_Real aTS1, aTS2, aTS, aScPr, aUS1, aVS1, aUS2, aVS2, aT, aU, aV;
-  Standard_Real aT1, aT2, aTol;
+  Standard_Boolean bUClosed = 0, bRevOrder = 0;
+  Standard_Integer aNbPoints = 0, iRet = 0;
+  Standard_Real aTS1 = NAN, aTS2 = NAN, aTS = NAN, aScPr = NAN, aUS1 = NAN, aVS1 = NAN, aUS2 = NAN, aVS2 = NAN, aT = NAN, aU = NAN, aV = NAN;
+  Standard_Real aT1 = NAN, aT2 = NAN, aTol = NAN;
   gp_Pnt2d aP2DS1, aP2DS2, aP2D; 
   gp_Vec2d aV2DT, aV2D, aV2DS1, aV2DS2;
   gp_Pnt aP;
@@ -281,11 +283,11 @@ Standard_Integer UpdateClosedPCurve(const TopoDS_Edge& aEold,
 Standard_Boolean IsClosed(const TopoDS_Edge& aE,
                           const TopoDS_Face& aF)
 {
-  Standard_Boolean bRet;
+  Standard_Boolean bRet = 0;
   //
   bRet=BRep_Tool::IsClosed(aE, aF);
   if (bRet) {
-    Standard_Integer iCnt;
+    Standard_Integer iCnt = 0;
     //
     iCnt=0;
     TopExp_Explorer aExp(aF, TopAbs_EDGE);
index c620cbd7013856a2cf555631e92ce4b9c59375b5..a293b585385e66a7b5334816c36bddba8f956dbd 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BOPTools_AlgoTools2D.hxx>
 #include <BOPTools_AlgoTools3D.hxx>
@@ -61,11 +63,11 @@ static
 Standard_Boolean BOPTools_AlgoTools3D::DoSplitSEAMOnFace (const TopoDS_Edge& aSplit,
                                                           const TopoDS_Face& aF)
 {
-  Standard_Boolean bIsUPeriodic, bIsVPeriodic, bIsLeft;
+  Standard_Boolean bIsUPeriodic = 0, bIsVPeriodic = 0, bIsLeft = 0;
   Standard_Real anUPeriod = 0., anVPeriod = 0.;
-  Standard_Real aTol, a, b, aT, anU, dU, anU1;
-  Standard_Real aScPr, anV, dV, anV1;
-  Standard_Real aUmin, aUmax, aVmin, aVmax;
+  Standard_Real aTol = NAN, a = NAN, b = NAN, aT = NAN, anU = NAN, dU = NAN, anU1 = NAN;
+  Standard_Real aScPr = NAN, anV = NAN, dV = NAN, anV1 = NAN;
+  Standard_Real aUmin = NAN, aUmax = NAN, aVmin = NAN, aVmax = NAN;
   gp_Pnt2d aP2D;
   gp_Vec2d aVec2D;
   Handle(Geom2d_Curve) aTmpC1, aTmpC2;
@@ -119,7 +121,7 @@ Standard_Boolean BOPTools_AlgoTools3D::DoSplitSEAMOnFace (const TopoDS_Edge& aSp
       {
         Standard_Boolean bIsUClosed = aSB->IsUClosed();
         Standard_Boolean bIsVClosed = aSB->IsVClosed();
-        Standard_Real aGlobalUmin, aGlobalUmax, aGlobalVmin, aGlobalVmax;
+        Standard_Real aGlobalUmin = NAN, aGlobalUmax = NAN, aGlobalVmin = NAN, aGlobalVmax = NAN;
         aSB->Bounds(aGlobalUmin, aGlobalUmax, aGlobalVmin, aGlobalVmax);
 
         if (bIsUClosed &&
@@ -238,12 +240,12 @@ Standard_Boolean BOPTools_AlgoTools3D::DoSplitSEAMOnFace (const TopoDS_Edge& the
   TopoDS_Face aFace = theFace;
   aFace.Orientation (TopAbs_FORWARD);
 
-  Standard_Real aTS1, aTS2;
+  Standard_Real aTS1 = NAN, aTS2 = NAN;
   Handle(Geom2d_Curve) aC2DSplit = BRep_Tool::CurveOnSurface (aESplit, aFace, aTS1, aTS2);
   if (aC2DSplit.IsNull())
     return Standard_False;
 
-  Standard_Real aT1, aT2;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   Handle(Geom2d_Curve) aC2D1 = BRep_Tool::CurveOnSurface (
     TopoDS::Edge (theEOrigin.Oriented (TopAbs_FORWARD)), aFace, aT1, aT2);
   Handle(Geom2d_Curve) aC2D2 = BRep_Tool::CurveOnSurface (
@@ -314,7 +316,7 @@ void BOPTools_AlgoTools3D::GetNormalToFaceOnEdge (const TopoDS_Edge& aE,
                                                   gp_Dir& aDNF,
                                                   const Handle(IntTools_Context)& theContext)
 {
-  Standard_Real aT, aT1, aT2;
+  Standard_Real aT = NAN, aT1 = NAN, aT2 = NAN;
   
   BRep_Tool::CurveOnSurface(aE, aF, aT1, aT2);
   aT=BOPTools_AlgoTools2D::IntermediatePoint(aT1, aT2);
@@ -335,7 +337,7 @@ void BOPTools_AlgoTools3D::GetNormalToFaceOnEdge (const TopoDS_Edge& aE,
                                                   gp_Dir& aDNF1,
                                                   const Handle(IntTools_Context)& theContext)
 {
-  Standard_Real U, V, aTolPC;
+  Standard_Real U = NAN, V = NAN, aTolPC = NAN;
   gp_Pnt2d aP2D;
   gp_Pnt aP;
   gp_Vec aD1U, aD1V;
@@ -362,14 +364,14 @@ void BOPTools_AlgoTools3D::GetNormalToFaceOnEdge (const TopoDS_Edge& aE,
 Standard_Integer BOPTools_AlgoTools3D::SenseFlag (const gp_Dir& aDNF1,
                                                   const gp_Dir& aDNF2)
 {
-  Standard_Boolean bIsDirsCoinside;
+  Standard_Boolean bIsDirsCoinside = 0;
   //
   bIsDirsCoinside=IntTools_Tools::IsDirsCoinside(aDNF1, aDNF2);
   if (!bIsDirsCoinside) {
     return 0;
   }
   
-  Standard_Real aScPr;
+  Standard_Real aScPr = NAN;
   
   aScPr=aDNF1*aDNF2;
   if (aScPr<0.) {
@@ -510,7 +512,7 @@ Standard_Integer BOPTools_AlgoTools3D::PointNearEdge
    gp_Pnt2d& aPx2DNear,
    gp_Pnt& aPxNear)
 {
-  Standard_Real aFirst, aLast, aETol, aFTol, transVal;
+  Standard_Real aFirst = NAN, aLast = NAN, aETol = NAN, aFTol = NAN, transVal = NAN;
   GeomAbs_SurfaceType aTS;
   Handle(Geom2d_Curve) aC2D;
   Handle(Geom_Surface) aS;
@@ -555,7 +557,7 @@ Standard_Integer BOPTools_AlgoTools3D::PointNearEdge
       gp_Vec2d transVec( aDP );
       transVal = aDt2D + aETol + aFTol;
       if (aTS==GeomAbs_Cylinder) {// pkv/909/F8
-        Standard_Real aR, dT;
+        Standard_Real aR = NAN, dT = NAN;
         //
         gp_Cylinder aCyl=aGAS.Cylinder();
         aR=aCyl.Radius();
@@ -594,7 +596,7 @@ Standard_Integer BOPTools_AlgoTools3D::PointNearEdge
    gp_Pnt& aPxNear,
    const Handle(IntTools_Context)& theContext)
 {
-  Standard_Real aTolE, aTolF, dTx, dT2D;
+  Standard_Real aTolE = NAN, aTolF = NAN, dTx = NAN, dT2D = NAN;
   Handle(Geom_Surface) aS;
   GeomAdaptor_Surface aGAS;
   //
@@ -677,7 +679,7 @@ Standard_Integer BOPTools_AlgoTools3D::PointNearEdge
    gp_Pnt& aPInFace,
    const Handle(IntTools_Context)& theContext)
 {
-  Standard_Real aT, aT1, aT2;
+  Standard_Real aT = NAN, aT1 = NAN, aT2 = NAN;
   //
   // 1. compute parameter on edge
   BRep_Tool::Range(aE, aT1, aT2);
@@ -726,7 +728,7 @@ void Add(const TopoDS_Shape& aS,
          TopTools_IndexedMapOfShape& myShapes, 
          Standard_Boolean& bHasGeometry)
 {
-  Standard_Integer anIndex; 
+  Standard_Integer anIndex = 0
   //
   if (bHasGeometry) {
     return;
@@ -736,7 +738,7 @@ void Add(const TopoDS_Shape& aS,
     return;
   }
   //
-  TopoDS_Shape aSx = aS;
+  const TopoDS_Shape& aSx = aS;
   //
   anIndex=myShapes.FindIndex(aSx);
   if (!anIndex) {
@@ -867,8 +869,8 @@ Standard_Integer BOPTools_AlgoTools3D::PointInFace
    gp_Pnt2d& theP2D,
    const Handle(IntTools_Context)& theContext)
 {
-  Standard_Integer i, iErr = 1;
-  Standard_Real aUMin, aUMax, aVMin, aVMax, aUx;
+  Standard_Integer i = 0, iErr = 1;
+  Standard_Real aUMin = NAN, aUMax = NAN, aVMin = NAN, aVMax = NAN, aUx = NAN;
   //
   theContext->UVBounds(theF, aUMin, aUMax, aVMin, aVMax);
   //
@@ -906,8 +908,8 @@ Standard_Integer BOPTools_AlgoTools3D::PointInFace
    gp_Pnt2d& theP2D,
    const Handle(IntTools_Context)& theContext)
 {
-  Standard_Integer iErr;
-  Standard_Real f, l;
+  Standard_Integer iErr = 0;
+  Standard_Real f = NAN, l = NAN;
   Handle(Geom2d_Curve) aC2D;
   //
   iErr = 0;
@@ -955,9 +957,9 @@ Standard_Integer BOPTools_AlgoTools3D::PointInFace
    const Handle(IntTools_Context)& theContext,
    const Standard_Real theDt2D)
 {
-  Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
-  Standard_Integer iErr, aIH, aNbDomains;
-  Standard_Real aVx, aV1, aV2;
+  Standard_Boolean bIsDone = 0, bHasFirstPoint = 0, bHasSecondPoint = 0;
+  Standard_Integer iErr = 0, aIH = 0, aNbDomains = 0;
+  Standard_Real aVx = NAN, aV1 = NAN, aV2 = NAN;
   //
   Geom2dHatch_Hatcher& aHatcher = theContext->Hatcher(theF);
   //
index 49357bf62f1bf79ccdd5b676e7c64cb5c5b1a3b0..1c8050caf6a0275f84fbc78e6bd69dbb5bef7d4c 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <BOPTools_AlgoTools.hxx>
 #include <BOPTools_Parallel.hxx>
@@ -542,8 +544,8 @@ static
     return aMaxDist;
   }
   //
-  Standard_Real aT1, aT2, aTint1, aTint2, aHalfR1, aHalfR2, aDist;
-  Standard_Integer i, aNb;
+  Standard_Real aT1 = NAN, aT2 = NAN, aTint1 = NAN, aTint2 = NAN, aHalfR1 = NAN, aHalfR2 = NAN, aDist = NAN;
+  Standard_Integer i = 0, aNb = 0;
   gp_Pnt aP, aPV;
   gp_Pnt2d aP2d;
   NCollection_List<IntRes2d_IntersectionPoint> aLP;
@@ -613,8 +615,8 @@ static
 void CorrectWires(const TopoDS_Face& aFx,
                   const TopTools_IndexedMapOfShape& aMapToAvoid)
 {
-  Standard_Integer i, aNbV;
-  Standard_Real aTol, aTol2, aD2, aD2max, aT1, aT2;
+  Standard_Integer i = 0, aNbV = 0;
+  Standard_Real aTol = NAN, aTol2 = NAN, aD2 = NAN, aD2max = NAN, aT1 = NAN, aT2 = NAN;
   gp_Pnt aP, aPV;
   gp_Pnt2d aP2D;
   TopoDS_Face aF;
@@ -708,7 +710,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
 
   Handle(BRep_TEdge)& TEx = *((Handle(BRep_TEdge)*)&myShape.TShape());
   BRep_ListIteratorOfListOfCurveRepresentation itcrx(TEx->Curves());
-  Standard_Boolean Degenerated, SameParameterx, SameRangex;
+  Standard_Boolean Degenerated = 0, SameParameterx = 0, SameRangex = 0;
 
   Standard_Integer unique = 0;
 
@@ -757,7 +759,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
   
   if (!myCref.IsNull()) {
     Handle(BRep_GCurve) GCref (Handle(BRep_GCurve)::DownCast (myCref));
-    Standard_Real First,Last;
+    Standard_Real First = NAN,Last = NAN;
     GCref->Range(First,Last);
     if (Last<=First) {
       myCref.Nullify();
@@ -815,7 +817,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
       if (cr != myCref && cr->IsCurveOnSurface(Su,L)) {
         pcurvefound = Standard_True;
         Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
-        Standard_Real f,l;
+        Standard_Real f = NAN,l = NAN;
         GC->Range(f,l);
         if (SameRange && (f != First || l != Last)) {
           return ;//BRepCheck_InvalidSameRangeFlag;
@@ -924,7 +926,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
 void CorrectVertexTolerance(const TopoDS_Edge& aE,
                             const TopTools_IndexedMapOfShape& aMapToAvoid)
 {
-  Standard_Real aTolE, aTolV;
+  Standard_Real aTolE = NAN, aTolV = NAN;
   TopoDS_Iterator aIt;
   //
   aTolE=BRep_Tool::Tolerance(aE);
@@ -944,7 +946,7 @@ void CorrectVertexTolerance(const TopoDS_Edge& aE,
 void UpdateEdges(const TopoDS_Face& aF,
                  const TopTools_IndexedMapOfShape& aMapToAvoid)
 {
-  Standard_Real aTolF, aTolE, aTolV;
+  Standard_Real aTolF = NAN, aTolE = NAN, aTolV = NAN;
   TopoDS_Iterator aItF, aItW, aItE;
   //
   aTolE=aTolF= BRep_Tool::Tolerance(aF);
index f066189c5209164d2c56fe5addbc412fd1381984..5cf26855d720b7b987c9c12537122f4425406642 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BOPTools_AlgoTools.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -40,7 +42,7 @@ void BOPTools_AlgoTools::UpdateVertex
   (const TopoDS_Vertex& aVF,
    const TopoDS_Vertex& aNewVertex)
 {
-  Standard_Real aTolVF, aTolNewVertex, aDist, aNewTol;
+  Standard_Real aTolVF = NAN, aTolNewVertex = NAN, aDist = NAN, aNewTol = NAN;
   //
   gp_Pnt aPVF=BRep_Tool::Pnt(aVF);
   gp_Pnt aPNewVertex=BRep_Tool::Pnt(aNewVertex);
@@ -64,7 +66,7 @@ void BOPTools_AlgoTools::UpdateVertex (const TopoDS_Edge& aE,
                                        const Standard_Real  aT,
                                        const TopoDS_Vertex& aV)
 {
-  Standard_Real aTolV, aDist, aFirst, aLast;
+  Standard_Real aTolV = NAN, aDist = NAN, aFirst = NAN, aLast = NAN;
   gp_Pnt  aPc; 
 
   gp_Pnt aPv=BRep_Tool::Pnt(aV);
@@ -87,7 +89,7 @@ void BOPTools_AlgoTools::UpdateVertex (const IntTools_Curve& aC,
                                        const Standard_Real  aT,
                                        const TopoDS_Vertex& aV)
 {
-  Standard_Real aTolV, aDist;
+  Standard_Real aTolV = NAN, aDist = NAN;
   gp_Pnt  aPc; 
 
   gp_Pnt aPv=BRep_Tool::Pnt(aV);
@@ -112,7 +114,7 @@ void BOPTools_AlgoTools::MakeSectEdge(const IntTools_Curve& aIC,
                                       const Standard_Real  aP2,
                                       TopoDS_Edge& aNewEdge)
 {
-  Handle(Geom_Curve) aC=aIC.Curve ();
+  const Handle(Geom_Curve)& aC=aIC.Curve ();
   
   BRepBuilderAPI_MakeEdge aMakeEdge(aC, aV1, aV2, aP1, aP2);
   
@@ -197,7 +199,7 @@ void BOPTools_AlgoTools::MakeNewVertex(const TopoDS_Vertex& aV1,
   gp_Pnt aPnt2=BRep_Tool::Pnt(aV2);
   Standard_Real aTol2=BRep_Tool::Tolerance(aV2);
 
-  Standard_Real aMaxTol, aDist;
+  Standard_Real aMaxTol = NAN, aDist = NAN;
         
   aDist=aPnt1.Distance(aPnt2);
   aMaxTol=(aTol1>aTol2)? aTol1 : aTol2;
@@ -233,7 +235,7 @@ void BOPTools_AlgoTools::MakeNewVertex(const TopoDS_Edge& aE1,
                                        const Standard_Real aParm2,
                                        TopoDS_Vertex& aNewVertex)
 {
-  Standard_Real aTol1, aTol2, aMaxTol, aDist
+  Standard_Real aTol1 = NAN, aTol2 = NAN, aMaxTol = NAN, aDist = NAN
   gp_Pnt aPnt1, aPnt2;
 
   PointOnEdge (aE1, aParm1, aPnt1);
@@ -263,7 +265,7 @@ void BOPTools_AlgoTools::MakeNewVertex(const TopoDS_Edge& aE1,
                                        const TopoDS_Face& aF1,
                                        TopoDS_Vertex& aNewVertex)
 {
-  Standard_Real aTol1, aTol2, aMaxTol;
+  Standard_Real aTol1 = NAN, aTol2 = NAN, aMaxTol = NAN;
   gp_Pnt aPnt;
 
   PointOnEdge (aE1, aParm1, aPnt);
@@ -285,7 +287,7 @@ void BOPTools_AlgoTools::PointOnEdge(const TopoDS_Edge& aE,
                                      const Standard_Real aParm,
                                      gp_Pnt& aPnt)
 {
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   Handle(Geom_Curve) C1=BRep_Tool::Curve(aE, f, l);
   C1->D0(aParm, aPnt);
 }
@@ -299,8 +301,8 @@ void BOPTools_AlgoTools::CorrectRange(const TopoDS_Edge& aE1,
                                       const IntTools_Range& aSR,
                                       IntTools_Range& aNewSR)
 {
-  Standard_Integer i;
-  Standard_Real aRes, aTolE1, aTolE2, aTF, aTL, dT;
+  Standard_Integer i = 0;
+  Standard_Real aRes = NAN, aTolE1 = NAN, aTolE2 = NAN, aTF = NAN, aTL = NAN, dT = NAN;
   BRepAdaptor_Curve aBC;
   GeomAbs_CurveType aCT;
   gp_Pnt aP;
@@ -372,8 +374,8 @@ void BOPTools_AlgoTools::CorrectRange(const TopoDS_Edge& aE,
                                       const IntTools_Range& aSR,
                                       IntTools_Range& aNewSR)
 {
-  Standard_Integer i;
-  Standard_Real aRes, aTolF, aTF, aTL, dT;
+  Standard_Integer i = 0;
+  Standard_Real aRes = NAN, aTolF = NAN, aTF = NAN, aTL = NAN, dT = NAN;
   BRepAdaptor_Curve aBC;
   GeomAbs_CurveType aCT;
   gp_Pnt aP;
@@ -500,7 +502,7 @@ void BOPTools_AlgoTools::Dimensions (const TopoDS_Shape& theS,
 //=======================================================================
 Standard_Integer BOPTools_AlgoTools::Dimension(const TopoDS_Shape& theS)
 {
-  Standard_Integer aDMin, aDMax;
+  Standard_Integer aDMin = 0, aDMax = 0;
   Dimensions (theS, aDMin, aDMax);
   return (aDMin == aDMax) ? aDMin : -1;
 }
index d6a146aef0e223f3d9779eb310bcd2b6a8292a6e..0ebc53b7766331b319a8b9e8d9b010599001e88c 100644 (file)
@@ -31,11 +31,11 @@ static
 BOPTools_Set::BOPTools_Set() 
 :
   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
-  myShapes(myAllocator)
+  myShapes(myAllocator), myNbShapes(0), mySum(0), myUpper(432123)
 {
-  myNbShapes=0;
-  mySum=0;
-  myUpper=432123;
+  
+  
+  
 }
 //=======================================================================
 //function : 
@@ -45,11 +45,11 @@ BOPTools_Set::BOPTools_Set
   (const Handle(NCollection_BaseAllocator)& theAllocator) 
 :
   myAllocator(theAllocator),
-  myShapes(myAllocator)
+  myShapes(myAllocator), myNbShapes(0), mySum(0), myUpper(432123)
 { 
-  myNbShapes=0;
-  mySum=0;  
-  myUpper=432123;
+  
+   
+  
 }
 
 //=======================================================================
@@ -143,7 +143,7 @@ Standard_Integer BOPTools_Set::HashCode (const Standard_Integer theUpperBound) c
 Standard_Boolean BOPTools_Set::IsEqual
   (const BOPTools_Set& theOther)const
 {
-  Standard_Boolean bRet;
+  Standard_Boolean bRet = 0;
   //
   bRet=Standard_False;
   //
@@ -177,7 +177,7 @@ Standard_Boolean BOPTools_Set::IsEqual
 void BOPTools_Set::Add(const TopoDS_Shape& theS,
                        const TopAbs_ShapeEnum theType)
 {
-  Standard_Integer aId, aIdN;
+  Standard_Integer aId = 0, aIdN = 0;
   TopAbs_Orientation aOr;
   TopExp_Explorer aExp;
   //
@@ -235,7 +235,7 @@ void BOPTools_Set::Add(const TopoDS_Shape& theS,
 Standard_Integer NormalizedIds(const Standard_Integer aId,
                                const Standard_Integer aDiv)
 {
-  Standard_Integer aMax, aTresh, aIdRet;
+  Standard_Integer aMax = 0, aTresh = 0, aIdRet = 0;
   //
   aIdRet=aId;
   aMax=::IntegerLast();
index f4d4c59df4590511093b3c1211a62eecf6fb0b4b..237b0efee68cc5f3717f256595f278a196d738a2 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Curve3D.hxx>
 #include <BRep_CurveOnClosedSurface.hxx>
 #include <BRep_CurveOnSurface.hxx>
@@ -77,7 +79,7 @@ static
 const Handle(Geom_Surface)& BRep_Tool::Surface(const TopoDS_Face& F,
                                                TopLoc_Location& L)
 {
-  const BRep_TFace* TF = static_cast<const BRep_TFace*>(F.TShape().get());
+  const BRep_TFace* TF = dynamic_cast<const BRep_TFace*>(F.TShape().get());
   L = F.Location() * TF->Location();
   return TF->Surface();
 }
@@ -90,7 +92,7 @@ const Handle(Geom_Surface)& BRep_Tool::Surface(const TopoDS_Face& F,
 
 Handle(Geom_Surface) BRep_Tool::Surface(const TopoDS_Face& F)
 {
-  const BRep_TFace* TF = static_cast<const BRep_TFace*>(F.TShape().get());
+  const BRep_TFace* TF = dynamic_cast<const BRep_TFace*>(F.TShape().get());
   const Handle(Geom_Surface)& S = TF->Surface();
 
   if(S.IsNull()) return S;
@@ -98,7 +100,7 @@ Handle(Geom_Surface) BRep_Tool::Surface(const TopoDS_Face& F)
   TopLoc_Location L = F.Location() * TF->Location();
   if (!L.IsIdentity()) {
     Handle(Geom_Geometry) aCopy = S->Transformed(L.Transformation());
-    Geom_Surface* aGS = static_cast<Geom_Surface*>(aCopy.get());
+    Geom_Surface* aGS = dynamic_cast<Geom_Surface*>(aCopy.get());
     return Handle(Geom_Surface)(aGS);
   }
   return S;
@@ -113,7 +115,7 @@ const Handle(Poly_Triangulation)& BRep_Tool::Triangulation (const TopoDS_Face& t
                                                             const Poly_MeshPurpose theMeshPurpose)
 {
   theLocation = theFace.Location();
-  const BRep_TFace* aTFace = static_cast<const BRep_TFace*>(theFace.TShape().get());
+  const BRep_TFace* aTFace = dynamic_cast<const BRep_TFace*>(theFace.TShape().get());
   return aTFace->Triangulation (theMeshPurpose);
 }
 
@@ -125,7 +127,7 @@ const Poly_ListOfTriangulation& BRep_Tool::Triangulations (const TopoDS_Face& th
                                                            TopLoc_Location&   theLocation)
 {
   theLocation = theFace.Location();
-  const BRep_TFace* aTFace = static_cast<const BRep_TFace*>(theFace.TShape().get());
+  const BRep_TFace* aTFace = dynamic_cast<const BRep_TFace*>(theFace.TShape().get());
   return aTFace->Triangulations();
 }
 
@@ -136,7 +138,7 @@ const Poly_ListOfTriangulation& BRep_Tool::Triangulations (const TopoDS_Face& th
 
 Standard_Real  BRep_Tool::Tolerance(const TopoDS_Face& F)
 {
-  const BRep_TFace* TF = static_cast<const BRep_TFace*>(F.TShape().get());
+  const BRep_TFace* TF = dynamic_cast<const BRep_TFace*>(F.TShape().get());
   Standard_Real p = TF->Tolerance();
   Standard_Real pMin = Precision::Confusion();
   if (p > pMin) return p;
@@ -150,7 +152,7 @@ Standard_Real  BRep_Tool::Tolerance(const TopoDS_Face& F)
 
 Standard_Boolean  BRep_Tool::NaturalRestriction(const TopoDS_Face& F)
 {
-  const BRep_TFace* TF = static_cast<const BRep_TFace*>(F.TShape().get());
+  const BRep_TFace* TF = dynamic_cast<const BRep_TFace*>(F.TShape().get());
   return TF->NaturalRestriction();
 }
 
@@ -169,13 +171,13 @@ const Handle(Geom_Curve)&  BRep_Tool::Curve(const TopoDS_Edge& E,
                                             Standard_Real& Last)
 {
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves()); 
 
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsCurve3D()) {
-      const BRep_Curve3D* GC = static_cast<const BRep_Curve3D*>(cr.get());
+      const BRep_Curve3D* GC = dynamic_cast<const BRep_Curve3D*>(cr.get());
       L = E.Location() * GC->Location();
       GC->Range(First,Last);
       return GC->Curve3D();
@@ -203,7 +205,7 @@ Handle(Geom_Curve)  BRep_Tool::Curve(const TopoDS_Edge& E,
   if ( !C.IsNull() ) {
     if ( !L.IsIdentity() ) {
       Handle(Geom_Geometry) aCopy = C->Transformed(L.Transformation());
-      Geom_Curve* aGC = static_cast<Geom_Curve*>(aCopy.get());
+      Geom_Curve* aGC = dynamic_cast<Geom_Curve*>(aCopy.get());
       return Handle(Geom_Curve)(aGC);
     }
   }
@@ -216,7 +218,7 @@ Handle(Geom_Curve)  BRep_Tool::Curve(const TopoDS_Edge& E,
 //=======================================================================
 Standard_Boolean BRep_Tool::IsGeometric (const TopoDS_Face& F)
 {
-  const BRep_TFace* TF = static_cast<const BRep_TFace*>(F.TShape().get());
+  const BRep_TFace* TF = dynamic_cast<const BRep_TFace*>(F.TShape().get());
   const Handle(Geom_Surface)& S = TF->Surface();
   return !S.IsNull();
 }
@@ -230,7 +232,7 @@ Standard_Boolean BRep_Tool::IsGeometric (const TopoDS_Face& F)
 Standard_Boolean  BRep_Tool::IsGeometric(const TopoDS_Edge& E)
 {
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
@@ -258,13 +260,13 @@ const Handle(Poly_Polygon3D)& BRep_Tool::Polygon3D(const TopoDS_Edge& E,
                                                    TopLoc_Location&   L)
 {
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsPolygon3D()) {
-      const BRep_Polygon3D* GC = static_cast<const BRep_Polygon3D*>(cr.get());
+      const BRep_Polygon3D* GC = dynamic_cast<const BRep_Polygon3D*>(cr.get());
       L = E.Location() * GC->Location();
       return GC->Polygon3D();
     }
@@ -320,13 +322,13 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
     *theIsStored = Standard_True;
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsCurveOnSurface(S,loc)) {
-      const BRep_GCurve* GC = static_cast<const BRep_GCurve*>(cr.get());
+      const BRep_GCurve* GC = dynamic_cast<const BRep_GCurve*>(cr.get());
       GC->Range(First,Last);
       if (GC->IsCurveOnClosedSurface() && Eisreversed)
         return GC->PCurve2();
@@ -368,7 +370,7 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnPlane(const TopoDS_Edge& E,
     return nullPCurve;
 
   // Check existence of 3d curve in edge
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   TopLoc_Location aCurveLocation;
   Handle(Geom_Curve) C3D = BRep_Tool::Curve(E, aCurveLocation, f, l);
 
@@ -422,13 +424,13 @@ void  BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
                                 Standard_Real& Last)
 {
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsCurveOnSurface()) {
-      const BRep_GCurve* GC = static_cast<const BRep_GCurve*>(cr.get());
+      const BRep_GCurve* GC = dynamic_cast<const BRep_GCurve*>(cr.get());
       C = GC->PCurve();
       S = GC->Surface();
       L = E.Location() * GC->Location();
@@ -462,14 +464,14 @@ void  BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
 
   Standard_Integer i = 0;
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
   for (; itcr.More(); itcr.Next())
   {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsCurveOnSurface())
     {
-      const BRep_GCurve* GC = static_cast<const BRep_GCurve*>(cr.get());
+      const BRep_GCurve* GC = dynamic_cast<const BRep_GCurve*>(cr.get());
       ++i;
       // Compare index taking into account the fact that for the curves on
       // closed surfaces there are two PCurves
@@ -533,7 +535,7 @@ Handle(Poly_Polygon2D) BRep_Tool::PolygonOnSurface(const TopoDS_Edge& E,
   Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
@@ -561,13 +563,13 @@ void BRep_Tool::PolygonOnSurface(const TopoDS_Edge&      E,
                                  TopLoc_Location&        L)
 {
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsPolygonOnSurface()) {
-      const BRep_PolygonOnSurface* PS = static_cast<const BRep_PolygonOnSurface*>(cr.get());
+      const BRep_PolygonOnSurface* PS = dynamic_cast<const BRep_PolygonOnSurface*>(cr.get());
       P = PS->Polygon();
       S = PS->Surface();
       L = E.Location() * PS->Location();
@@ -595,13 +597,13 @@ void BRep_Tool::PolygonOnSurface(const TopoDS_Edge&      E,
   Standard_Integer i = 0;
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsPolygonOnSurface()) {
-      const BRep_PolygonOnSurface* PS = static_cast<const BRep_PolygonOnSurface*>(cr.get());
+      const BRep_PolygonOnSurface* PS = dynamic_cast<const BRep_PolygonOnSurface*>(cr.get());
       i++;
       if (i > Index) break;
       if (i == Index) {
@@ -637,7 +639,7 @@ BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge&                E,
   Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
@@ -666,14 +668,14 @@ BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge&                   E,
                                   TopLoc_Location&                     L)
 {
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsPolygonOnTriangulation()) {
       const BRep_PolygonOnTriangulation* PT =
-        static_cast<const BRep_PolygonOnTriangulation*>(cr.get());
+        dynamic_cast<const BRep_PolygonOnTriangulation*>(cr.get());
       P = PT->PolygonOnTriangulation();
       T = PT->Triangulation();
       L = E.Location() * PT->Location();
@@ -702,14 +704,14 @@ BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge&                   E,
   Standard_Integer i = 0;
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsPolygonOnTriangulation()) {
       const BRep_PolygonOnTriangulation* PT =
-        static_cast<const BRep_PolygonOnTriangulation*>(cr.get());
+        dynamic_cast<const BRep_PolygonOnTriangulation*>(cr.get());
       i++;
       if (i > Index) break;
       if (i == Index) {
@@ -764,7 +766,7 @@ Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge& E,
   TopLoc_Location      l = L.Predivided(E.Location());
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
@@ -790,7 +792,7 @@ Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge&                E,
   TopLoc_Location l = L.Predivided(E.Location());
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
@@ -810,7 +812,7 @@ Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge&                E,
 
 Standard_Real  BRep_Tool::Tolerance(const TopoDS_Edge& E)
 {
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   Standard_Real p = TE->Tolerance();
   Standard_Real pMin = Precision::Confusion();
   if (p > pMin) return p;
@@ -824,7 +826,7 @@ Standard_Real  BRep_Tool::Tolerance(const TopoDS_Edge& E)
 
 Standard_Boolean  BRep_Tool::SameParameter(const TopoDS_Edge& E)
 {
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   return TE->SameParameter();
 }
 
@@ -835,7 +837,7 @@ Standard_Boolean  BRep_Tool::SameParameter(const TopoDS_Edge& E)
 
 Standard_Boolean  BRep_Tool::SameRange(const TopoDS_Edge& E)
 {
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   return TE->SameRange();
 }
 
@@ -846,7 +848,7 @@ Standard_Boolean  BRep_Tool::SameRange(const TopoDS_Edge& E)
 
 Standard_Boolean  BRep_Tool::Degenerated(const TopoDS_Edge& E)
 {
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   return TE->Degenerated();
 }
 
@@ -860,13 +862,13 @@ void  BRep_Tool::Range(const TopoDS_Edge& E,
                        Standard_Real& Last)
 {
   //  set the range to all the representations
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
   
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsCurve3D()) {
-      const BRep_Curve3D* CR = static_cast<const BRep_Curve3D*>(cr.get());
+      const BRep_Curve3D* CR = dynamic_cast<const BRep_Curve3D*>(cr.get());
       if (!CR->Curve3D().IsNull()) {
         First = CR->First(); 
         Last = CR->Last();
@@ -874,7 +876,7 @@ void  BRep_Tool::Range(const TopoDS_Edge& E,
       }
     }
     else if (cr->IsCurveOnSurface()) {
-      const BRep_GCurve* CR = static_cast<const BRep_GCurve*>(cr.get());
+      const BRep_GCurve* CR = dynamic_cast<const BRep_GCurve*>(cr.get());
       First = CR->First(); 
       Last = CR->Last();
       return;
@@ -898,13 +900,13 @@ void  BRep_Tool::Range(const TopoDS_Edge& E,
   TopLoc_Location l = L.Predivided(E.Location());
   
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
   
   while (itcr.More()) {
     const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
     if (cr->IsCurveOnSurface(S,l)) {
-      const BRep_CurveOnSurface* CR = static_cast<const BRep_CurveOnSurface*>(cr.get());
+      const BRep_CurveOnSurface* CR = dynamic_cast<const BRep_CurveOnSurface*>(cr.get());
       CR->Range(First,Last);
       break;
     }
@@ -946,7 +948,7 @@ void  BRep_Tool::UVPoints(const TopoDS_Edge& E,
   Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
@@ -955,13 +957,13 @@ void  BRep_Tool::UVPoints(const TopoDS_Edge& E,
       if (cr->IsCurveOnClosedSurface() && Eisreversed)
       {
         const BRep_CurveOnClosedSurface* CR =
-          static_cast<const BRep_CurveOnClosedSurface*>(cr.get());
+          dynamic_cast<const BRep_CurveOnClosedSurface*>(cr.get());
         CR->UVPoints2(PFirst, PLast);
       }
       else
       {
         const BRep_CurveOnSurface* CR =
-          static_cast<const BRep_CurveOnSurface*>(cr.get());
+          dynamic_cast<const BRep_CurveOnSurface*>(cr.get());
         CR->UVPoints(PFirst, PLast);
       }
       return;
@@ -987,7 +989,7 @@ void  BRep_Tool::UVPoints(const TopoDS_Edge& E,
     TopLoc_Location Linverted = L.Inverted();
     Vf.Move(Linverted, Standard_False);
     Vl.Move(Linverted, Standard_False);
-    Standard_Real u,v;
+    Standard_Real u = NAN,v = NAN;
     gp_Pln pln = GP->Pln();
 
     u=v=0.;
@@ -1049,7 +1051,7 @@ void  BRep_Tool::SetUVPoints(const TopoDS_Edge& E,
   Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
@@ -1057,12 +1059,12 @@ void  BRep_Tool::SetUVPoints(const TopoDS_Edge& E,
     if (cr->IsCurveOnSurface(S,l)) {
       if (cr->IsCurveOnClosedSurface() && Eisreversed)
       {
-        BRep_CurveOnClosedSurface* CS = static_cast<BRep_CurveOnClosedSurface*>(cr.get());
+        BRep_CurveOnClosedSurface* CS = dynamic_cast<BRep_CurveOnClosedSurface*>(cr.get());
         CS->SetUVPoints2(PFirst, PLast);
       }
       else
       {
-        BRep_CurveOnSurface* CS = static_cast<BRep_CurveOnSurface*>(cr.get());
+        BRep_CurveOnSurface* CS = dynamic_cast<BRep_CurveOnSurface*>(cr.get());
         CS->SetUVPoints(PFirst, PLast);
       }
     }
@@ -1139,7 +1141,7 @@ Standard_Boolean BRep_Tool::HasContinuity(const TopoDS_Edge& E,
   TopLoc_Location l2 = L2.Predivided(Eloc);
 
   // find the representation
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   while (itcr.More()) {
@@ -1185,7 +1187,7 @@ GeomAbs_Shape  BRep_Tool::Continuity(const TopoDS_Edge& E,
 
 Standard_Boolean BRep_Tool::HasContinuity(const TopoDS_Edge& E)
 {
-  const BRep_TEdge* TE = static_cast<const BRep_TEdge*>(E.TShape().get());
+  const BRep_TEdge* TE = dynamic_cast<const BRep_TEdge*>(E.TShape().get());
   BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
 
   for (; itcr.More(); itcr.Next())
@@ -1227,7 +1229,7 @@ GeomAbs_Shape BRep_Tool::MaxContinuity (const TopoDS_Edge& theEdge)
 
 gp_Pnt  BRep_Tool::Pnt(const TopoDS_Vertex& V)
 {
-  const BRep_TVertex* TV = static_cast<const BRep_TVertex*>(V.TShape().get());
+  const BRep_TVertex* TV = dynamic_cast<const BRep_TVertex*>(V.TShape().get());
   
   if (TV == 0)
   {
@@ -1250,7 +1252,7 @@ gp_Pnt  BRep_Tool::Pnt(const TopoDS_Vertex& V)
 
 Standard_Real  BRep_Tool::Tolerance(const TopoDS_Vertex& V)
 {
-  const BRep_TVertex* aTVert = static_cast<const BRep_TVertex*>(V.TShape().get());
+  const BRep_TVertex* aTVert = dynamic_cast<const BRep_TVertex*>(V.TShape().get());
 
   if (aTVert == 0)
   {
@@ -1306,7 +1308,7 @@ Standard_Boolean BRep_Tool::Parameter (const TopoDS_Vertex& theV,
 
   if (!VF.IsNull()) orient = VF.Orientation();
 
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
 
   if (orient == TopAbs_FORWARD) {
     BRep_Tool::Range(theE, f, l);
@@ -1325,7 +1327,7 @@ Standard_Boolean BRep_Tool::Parameter (const TopoDS_Vertex& theV,
     const Handle(Geom_Curve)& C = BRep_Tool::Curve(theE, L, f, l);
     L = L.Predivided(theV.Location());
     if (!C.IsNull() || BRep_Tool::Degenerated(theE)) {
-      const BRep_TVertex* TV = static_cast<const BRep_TVertex*>(theV.TShape().get());
+      const BRep_TVertex* TV = dynamic_cast<const BRep_TVertex*>(theV.TShape().get());
       BRep_ListIteratorOfListOfPointRepresentation itpr(TV->Points());
 
       while (itpr.More()) {
@@ -1368,7 +1370,7 @@ Standard_Boolean BRep_Tool::Parameter (const TopoDS_Vertex& theV,
       Handle(Geom_Surface) S;
       BRep_Tool::CurveOnSurface(theE, PC, S, L, f, l);
       L = L.Predivided(theV.Location());
-      const BRep_TVertex* TV = static_cast<const BRep_TVertex*>(theV.TShape().get());
+      const BRep_TVertex* TV = dynamic_cast<const BRep_TVertex*>(theV.TShape().get());
       BRep_ListIteratorOfListOfPointRepresentation itpr(TV->Points());
 
       while (itpr.More()) {
@@ -1402,7 +1404,7 @@ Standard_Boolean BRep_Tool::Parameter (const TopoDS_Vertex& theV,
 Standard_Real  BRep_Tool::Parameter(const TopoDS_Vertex& V, 
                                     const TopoDS_Edge& E)
 {
-  Standard_Real p;
+  Standard_Real p = NAN;
   if (Parameter(V, E, p)) return p;
   throw Standard_NoSuchObject("BRep_Tool:: no parameter on edge");
 }
@@ -1454,7 +1456,7 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
  TopAbs_Orientation orient = TopAbs_INTERNAL;
   if (!VF.IsNull()) orient = VF.Orientation();
  
- Standard_Real f,l;
+ Standard_Real f = NAN,l = NAN;
 
  if (orient ==  TopAbs_FORWARD) {
    BRep_Tool::Range(E,S,L,f,l);
@@ -1468,7 +1470,7 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
 
  else {
    Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(E,S,L,f,l);
-   const BRep_TVertex* TV = static_cast<const BRep_TVertex*>(V.TShape().get());
+   const BRep_TVertex* TV = dynamic_cast<const BRep_TVertex*>(V.TShape().get());
    BRep_ListIteratorOfListOfPointRepresentation itpr(TV->Points());
 
    while (itpr.More()) {
@@ -1484,7 +1486,7 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
   const Handle(Geom_Curve)& C = BRep_Tool::Curve(E,L1,f,l);
   L1 = L1.Predivided(V.Location());
   if (!C.IsNull() || Degenerated(E)) {
-    const BRep_TVertex* TV = static_cast<const BRep_TVertex*>(V.TShape().get());
+    const BRep_TVertex* TV = dynamic_cast<const BRep_TVertex*>(V.TShape().get());
     BRep_ListIteratorOfListOfPointRepresentation itpr(TV->Points());
 
     while (itpr.More()) {
@@ -1528,7 +1530,7 @@ gp_Pnt2d  BRep_Tool::Parameters(const TopoDS_Vertex& V,
   TopLoc_Location L;
   const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,L);
   L = L.Predivided(V.Location());
-  const BRep_TVertex* TV = static_cast<const BRep_TVertex*>(V.TShape().get());
+  const BRep_TVertex* TV = dynamic_cast<const BRep_TVertex*>(V.TShape().get());
   BRep_ListIteratorOfListOfPointRepresentation itpr(TV->Points());
   
   // It is checked if there is PointRepresentation (case non Manifold)
@@ -1611,7 +1613,7 @@ Standard_Boolean BRep_Tool::IsClosed (const TopoDS_Shape& theShape)
 //=======================================================================
 Standard_Boolean IsPlane(const Handle(Geom_Surface)& aS)
 {
-  Standard_Boolean bRet;
+  Standard_Boolean bRet = 0;
   Handle(Geom_Plane) aGP;
   Handle(Geom_RectangularTrimmedSurface) aGRTS;
   Handle(Geom_OffsetSurface) aGOFS;
index 92a732e37ce7f40a3b707687a542cc25770f63e2..a9299a97cf7ee097ab2e078306d6352978f59c63 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepAdaptor_CompCurve.hxx>
 
 #include <BRep_Tool.hxx>
@@ -105,7 +107,7 @@ Handle(Adaptor3d_Curve) BRepAdaptor_CompCurve::ShallowCopy() const
  void BRepAdaptor_CompCurve::Initialize(const TopoDS_Wire& W,
                                        const Standard_Boolean AC)
 {
-  Standard_Integer ii, NbEdge;
+  Standard_Integer ii = 0, NbEdge = 0;
   BRepTools_WireExplorer wexp;
   TopoDS_Edge E;
 
@@ -174,8 +176,8 @@ Handle(Adaptor3d_Curve) BRepAdaptor_CompCurve::ShallowCopy() const
 
   // Trim the extremal curves.
   Handle (BRepAdaptor_Curve) HC;
-  Standard_Integer i1, i2;
-  Standard_Real f=TFirst, l=TLast, d;
+  Standard_Integer i1 = 0, i2 = 0;
+  Standard_Real f=TFirst, l=TLast, d = NAN;
   i1 = i2 = CurIndex;
   Prepare(f, d, i1);
   Prepare(l, d, i2);
@@ -190,7 +192,7 @@ Handle(Adaptor3d_Curve) BRepAdaptor_CompCurve::ShallowCopy() const
   else {
     const BRepAdaptor_Curve& c1 = myCurves->Value(i1);
     const BRepAdaptor_Curve& c2 = myCurves->Value(i2);
-    Standard_Real k;
+    Standard_Real k = NAN;
 
     k = c1.LastParameter();
     if (k>f)
@@ -217,7 +219,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
                                  TopoDS_Edge& E,
                                  Standard_Real& UonE) const
 {
-  Standard_Real d;
+  Standard_Real d = NAN;
   Standard_Integer index = CurIndex;
   UonE = U;
   Prepare(UonE, d, index);
@@ -242,7 +244,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
 
  Standard_Integer BRepAdaptor_CompCurve::NbIntervals(const GeomAbs_Shape S) const
 {
-  Standard_Integer NbInt, ii;
+  Standard_Integer NbInt = 0, ii = 0;
   for (ii=1, NbInt=0; ii<=myCurves->Length(); ii++)
     NbInt += myCurves->ChangeValue(ii).NbIntervals(S);
 
@@ -252,8 +254,8 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
  void BRepAdaptor_CompCurve::Intervals(TColStd_Array1OfReal& T,
                                        const GeomAbs_Shape S) const
 {
-  Standard_Integer ii, jj, kk, n;
-  Standard_Real f, F, delta;
+  Standard_Integer ii = 0, jj = 0, kk = 0, n = 0;
+  Standard_Real f = NAN, F = NAN, delta = NAN;
 
   // First curve (direction of parsing of the edge)
   n = myCurves->ChangeValue(1).NbIntervals(S);
@@ -318,7 +320,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
 
  gp_Pnt BRepAdaptor_CompCurve::Value(const Standard_Real U) const
 {
-  Standard_Real u = U, d;
+  Standard_Real u = U, d = NAN;
   Standard_Integer index = CurIndex;
   Prepare(u, d, index);
   return myCurves->Value(index).Value(u);
@@ -327,7 +329,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
  void BRepAdaptor_CompCurve::D0(const Standard_Real U,
                                gp_Pnt& P) const
 {
-  Standard_Real u = U, d;
+  Standard_Real u = U, d = NAN;
   Standard_Integer index = CurIndex;
   Prepare(u, d, index);
   myCurves->Value(index).D0(u, P);
@@ -337,7 +339,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
                                gp_Pnt& P,
                                gp_Vec& V) const
 {
-  Standard_Real u = U, d;
+  Standard_Real u = U, d = NAN;
   Standard_Integer index = CurIndex;
   Prepare(u, d, index);
   myCurves->Value(index).D1(u, P, V);
@@ -349,7 +351,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
                                gp_Vec& V1,
                                gp_Vec& V2) const
 {
-  Standard_Real u = U, d;
+  Standard_Real u = U, d = NAN;
   Standard_Integer index = CurIndex;
   Prepare(u, d, index);
   myCurves->Value(index).D2(u, P, V1, V2);
@@ -362,7 +364,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
                                gp_Vec& V2,
                                gp_Vec& V3) const
 {
-  Standard_Real u = U, d;
+  Standard_Real u = U, d = NAN;
   Standard_Integer index = CurIndex;
   Prepare(u, d, index);
   myCurves->Value(index).D3(u, P, V1, V2, V3);
@@ -374,7 +376,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
  gp_Vec BRepAdaptor_CompCurve::DN(const Standard_Real U,
                                  const Standard_Integer N) const
 {
-  Standard_Real u = U, d;
+  Standard_Real u = U, d = NAN;
   Standard_Integer index = CurIndex;
   Prepare(u, d, index);
 
@@ -383,8 +385,8 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
 
  Standard_Real BRepAdaptor_CompCurve::Resolution(const Standard_Real R3d) const
 {
-  Standard_Real Res = 1.e200, r;
-  Standard_Integer ii, L = myCurves->Length();
+  Standard_Real Res = 1.e200, r = NAN;
+  Standard_Integer ii = 0, L = myCurves->Length();
   for (ii=1; ii<=L; ii++) {
     r = myCurves->Value(ii).Resolution(R3d);
     if (r < Res) Res = r;
@@ -467,8 +469,8 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
                                     Standard_Real& Delta,
                                     Standard_Integer& theCurIndex) const
 {
-  Standard_Real f,l, Wtest, Eps;
-  Standard_Integer ii;
+  Standard_Real f = NAN,l = NAN, Wtest = NAN, Eps = NAN;
+  Standard_Integer ii = 0;
   if (W-TFirst < TLast-W) { Eps = PTol; }
   else                    { Eps = -PTol;}
 
@@ -498,7 +500,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
   // Invert ?
   const TopoDS_Edge& E = myCurves->Value(theCurIndex).Edge();
   TopAbs_Orientation Or = E.Orientation();
-  Standard_Boolean Reverse;
+  Standard_Boolean Reverse = 0;
   Reverse = (Forward && (Or == TopAbs_REVERSED)) ||
             (!Forward && (Or != TopAbs_REVERSED));
 
@@ -523,13 +525,13 @@ void  BRepAdaptor_CompCurve::InvPrepare(const Standard_Integer index,
   // Invert?
   const TopoDS_Edge& E = myCurves->Value(index).Edge();
   TopAbs_Orientation Or = E.Orientation();
-  Standard_Boolean Reverse;
+  Standard_Boolean Reverse = 0;
   Reverse = (Forward && (Or == TopAbs_REVERSED)) ||
             (!Forward && (Or != TopAbs_REVERSED));
 
   // Calculate the parameters of reparametrisation
   // such as : T = Ti + (t-First)*Delta
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   BRep_Tool::Range(E, f, l);
   Delta = myKnots->Value(index+1) - myKnots->Value(index);
   if (l-f > PTol*1.e-9) Delta /= (l-f);
index d82c69d26faf185a944a806f2a610177cb020e8a..cf7b404b0d8a49b333ffeb5224b1e9e775f1190a 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepAdaptor_Curve.hxx>
 
 #include <Adaptor3d_CurveOnSurface.hxx>
@@ -114,7 +116,7 @@ void BRepAdaptor_Curve::Initialize(const TopoDS_Edge& E)
 {
   myConSurf.Nullify();
   myEdge = E;
-  Standard_Real pf,pl;
+  Standard_Real pf = NAN,pl = NAN;
 
   TopLoc_Location L;
   Handle(Geom_Curve) C = BRep_Tool::Curve(E,L,pf,pl);
@@ -153,7 +155,7 @@ void BRepAdaptor_Curve::Initialize(const TopoDS_Edge& E,
 
   myEdge = E;
   TopLoc_Location L;
-  Standard_Real pf,pl;
+  Standard_Real pf = NAN,pl = NAN;
   Handle(Geom_Surface) S = BRep_Tool::Surface(F,L);
   Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(E,F,pf,pl); 
 
index b1a938bc32be7fd5ec51ae6ba51d8f4fdbe605bf..857d3e7ad412595fb31c977acedc90f0a90c1f6a 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve2d.hxx>
 #include <TopoDS_Edge.hxx>
@@ -74,7 +76,7 @@ void  BRepAdaptor_Curve2d::Initialize(const TopoDS_Edge& E,
 {
   myEdge = E;
   myFace = F;
-  Standard_Real pf,pl;
+  Standard_Real pf = NAN,pl = NAN;
   const Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(E,F,pf,pl);
   Geom2dAdaptor_Curve::Load(PC,pf,pl);
 }
index 66d769c10391834341d327be2a1e1e8d1a778248..6d9688fd4781c69076486054bd4cfe6389310f2a 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepAdaptor_Surface.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -93,7 +95,7 @@ void BRepAdaptor_Surface::Initialize(const TopoDS_Face& F,
     return;
 
   if (Restriction) {
-    Standard_Real umin,umax,vmin,vmax;
+    Standard_Real umin = NAN,umax = NAN,vmin = NAN,vmax = NAN;
     BRepTools::UVBounds(F,umin,umax,vmin,vmax);
     mySurf.Load(aSurface,umin,umax,vmin,vmax);
   }
index 845b4f4e20dd1648e6625e8a079f02030fa6b67b..09b05a2005b34e05c41ff5982b88bb68082f428d 100644 (file)
@@ -219,8 +219,8 @@ void BRepAlgoAPI_BooleanOperation::Build(const Message_ProgressRange& theRange)
   {
     myBuilder = new BOPAlgo_BOP(myAllocator);
     myBuilder->SetArguments(myArguments);
-    ((BOPAlgo_BOP*)myBuilder)->SetTools(myTools);
-    ((BOPAlgo_BOP*)myBuilder)->SetOperation(myOperation);
+    (dynamic_cast<BOPAlgo_BOP*>(myBuilder))->SetTools(myTools);
+    (dynamic_cast<BOPAlgo_BOP*>(myBuilder))->SetOperation(myOperation);
   }
 
   // Build the result
index 740a7fa66bdd236f11f7dd9d1345f8106086bdbb..c0b7383fdabdefb94dddd76f6ccde9e5c021b9ac 100644 (file)
@@ -48,9 +48,9 @@ BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo(const BOPAlgo_PaveFiller& aPF)
   myCheckInverted(Standard_True),
   myFillHistory(Standard_True),
   myIsIntersectionNeeded(Standard_False),
-  myBuilder(NULL)
+  myDSFiller((BOPAlgo_PaveFiller*)&aPF), myBuilder(NULL)
 {
-  myDSFiller = (BOPAlgo_PaveFiller*)&aPF;
+  
 }
 //=======================================================================
 // function: ~
index 032a3eb82b0708fb8234cc8a09b6faa6ca83a200..ba8bed7c72db71e84c9848630e9a6b36200285b6 100644 (file)
@@ -282,7 +282,7 @@ Standard_Boolean BRepAlgoAPI_Section::HasAncestorFaceOn1
   (const TopoDS_Shape& aE, 
    TopoDS_Shape& aF) const
 {
-  Standard_Boolean bRes;
+  Standard_Boolean bRes = 0;
   //
   bRes = HasAncestorFace(myDSFiller,1 , aE, aF);
   return bRes;
@@ -295,7 +295,7 @@ Standard_Boolean BRepAlgoAPI_Section::HasAncestorFaceOn2
   (const TopoDS_Shape& aE,
    TopoDS_Shape& aF) const
 {
-  Standard_Boolean bRes;
+  Standard_Boolean bRes = 0;
   //
   bRes = HasAncestorFace(myDSFiller, 2, aE, aF);
   return bRes;
@@ -309,7 +309,7 @@ Standard_Boolean HasAncestorFace (const BOPAlgo_PPaveFiller& pPF,
                                   const TopoDS_Shape& aE,
                                   TopoDS_Shape& aF) 
 {
-  Standard_Boolean bRes;
+  Standard_Boolean bRes = 0;
   //
   bRes = Standard_False;
   if(aE.IsNull()) {
@@ -340,7 +340,7 @@ Standard_Boolean HasAncestorFaces (const BOPAlgo_PPaveFiller& pPF,
                                    TopoDS_Shape& aF2) 
 {
   
-  Standard_Integer aNbFF, i, j, nE, nF1, nF2, aNbVC;
+  Standard_Integer aNbFF = 0, i = 0, j = 0, nE = 0, nF1 = 0, nF2 = 0, aNbVC = 0;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
   //
   const BOPDS_PDS& pDS = pPF->PDS();
index 78e525f8b73ebe9439c28aa004f0ce0904d5071e..fe689934d4236bdfb9583875218d7c8ad260e3e4 100644 (file)
@@ -203,9 +203,9 @@ protected:
 
 private:
 
-  Standard_Boolean myApprox;
-  Standard_Boolean myComputePCurve1;
-  Standard_Boolean myComputePCurve2;
+  Standard_Boolean myApprox{};
+  Standard_Boolean myComputePCurve1{};
+  Standard_Boolean myComputePCurve2{};
 
 };
 
index bd5a978792842187ba837641b2558a7026e21a8c..849ea9848adaf07fcf7e29e5a23835210715e2d2 100644 (file)
@@ -67,7 +67,7 @@ void BRepAlgoAPI_Splitter::Build(const Message_ProgressRange& theRange)
   // Initialization of the building tool
   myBuilder = new BOPAlgo_Splitter(myAllocator);
   myBuilder->SetArguments(myArguments);
-  ((BOPAlgo_Splitter*)myBuilder)->SetTools(myTools);
+  (dynamic_cast<BOPAlgo_Splitter*>(myBuilder))->SetTools(myTools);
 
   // Build result shape basing on the intersection results
   BuildResult(aPS.Next(30));
index 595b48f1b43a76069fd6eba0d9b72d8f3faf145f..5edfcaee4cb2027de4e242c30528ac0f31083fdf 100644 (file)
@@ -32,11 +32,11 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepApprox_ApproxLine,Standard_Transient)
 BRepApprox_ApproxLine::BRepApprox_ApproxLine
    (const Handle(Geom_BSplineCurve)&    CurveXYZ,
     const Handle(Geom2d_BSplineCurve)&  CurveUV1,
-    const Handle(Geom2d_BSplineCurve)&  CurveUV2) 
+    const Handle(Geom2d_BSplineCurve)&  CurveUV2) : myCurveXYZ(CurveXYZ), myCurveUV1(CurveUV1), myCurveUV2(CurveUV2) 
 { 
-  myCurveXYZ = CurveXYZ;
-  myCurveUV1 = CurveUV1;
-  myCurveUV2 = CurveUV2;
+  
+  
+  
 }
 
 
index f3ab8ed86042bb6502deed0240a54c0993e0e30c..0bc451d1dc4f66d8dcfd0fc093b779f7b4dfacaa 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BndLib_Add3dCurve.hxx>
 #include <BndLib_AddSurface.hxx>
@@ -47,7 +49,7 @@
 //
 static Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS);
 //
-static void FindExactUVBounds(const TopoDS_Face F, 
+static void FindExactUVBounds(const TopoDS_Face& F, 
                               Standard_Real& umin, Standard_Real& umax, 
                               Standard_Real& vmin, Standard_Real& vmax,
                               const Standard_Real Tol, 
@@ -78,7 +80,7 @@ void BRepBndLib::Add(const TopoDS_Shape& S, Bnd_Box& B, Standard_Boolean useTria
   // Add the faces
   BRepAdaptor_Surface BS;
   TopLoc_Location l, aDummyLoc;
-  Standard_Integer i, nbNodes;
+  Standard_Integer i = 0, nbNodes = 0;
   BRepAdaptor_Curve BC;
 
   for (ex.Init(S,TopAbs_FACE); ex.More(); ex.Next()) {
@@ -237,7 +239,7 @@ void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
   BRepAdaptor_Surface BS;
   Handle(Poly_Triangulation) T;
   TopLoc_Location l;
-  Standard_Integer i, nbNodes;
+  Standard_Integer i = 0, nbNodes = 0;
   BRepAdaptor_Curve BC;
 
   for (ex.Init(S,TopAbs_FACE); ex.More(); ex.Next()) {
@@ -248,7 +250,7 @@ void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
     {
       //       B.Enlarge(T->Deflection());
       aLocBox.Enlarge(T->Deflection() + BRep_Tool::Tolerance(F));
-      Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+      Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
       aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
       B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
     }
@@ -266,7 +268,7 @@ void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
           }
           else
           {
-            Standard_Real Tol;
+            Standard_Real Tol = NAN;
             for (;ex2.More();ex2.Next()) {
               Bnd_Box anEBox;
               const TopoDS_Edge& anE = TopoDS::Edge(ex2.Current());
@@ -283,7 +285,7 @@ void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
         }
         else
         {
-          Standard_Real umin, umax, vmin, vmax;
+          Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
           Standard_Boolean isNaturalRestriction = Standard_False;
           Standard_Real Tol = useShapeTolerance?  BRep_Tool::Tolerance(F) : 0.;
           FindExactUVBounds(F, umin, umax, vmin, vmax, Tol, isNaturalRestriction);
@@ -314,7 +316,7 @@ void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
 
         if (!aLocBox.IsVoid())
         {
-          Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+          Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
           aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
           B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
         }
@@ -375,7 +377,7 @@ void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
     }
     if (!aLocBox.IsVoid())
     {
-      Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+      Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
       aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
       B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
     }
@@ -389,7 +391,7 @@ void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
     aLocBox.Add(BRep_Tool::Pnt(aV));
     Standard_Real Tol = useShapeTolerance?  BRep_Tool::Tolerance(aV) : 0.;
     aLocBox.Enlarge(Tol);
-    Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+    Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
     aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
     B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
   }
@@ -460,7 +462,7 @@ Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS)
 //function : FindExactUVBounds
 //purpose  : 
 //=======================================================================
-void FindExactUVBounds(const TopoDS_Face FF, 
+void FindExactUVBounds(const TopoDS_Face& FF, 
                        Standard_Real& umin, Standard_Real& umax, 
                        Standard_Real& vmin, Standard_Real& vmax,
                        const Standard_Real Tol, 
@@ -481,7 +483,7 @@ void FindExactUVBounds(const TopoDS_Face FF,
     vmin = aBAS.FirstVParameter();
     vmax = aBAS.LastVParameter();
     Standard_Boolean isUperiodic = aBAS.IsUPeriodic(), isVperiodic = aBAS.IsVPeriodic();
-    Standard_Real aT1, aT2;
+    Standard_Real aT1 = NAN, aT2 = NAN;
     Standard_Real TolU = Max(aBAS.UResolution(Tol), Precision::PConfusion());
     Standard_Real TolV = Max(aBAS.VResolution(Tol), Precision::PConfusion());
     Standard_Integer Nu = 0, Nv = 0, NbEdges = 0;
@@ -574,7 +576,7 @@ void FindExactUVBounds(const TopoDS_Face FF,
   }
 
   // fill box for the given face
-  Standard_Real aT1, aT2;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   Standard_Real TolU = Max(aBAS.UResolution(Tol), Precision::PConfusion());
   Standard_Real TolV = Max(aBAS.VResolution(Tol), Precision::PConfusion());
   Standard_Real TolUV = Max(TolU, TolV);
@@ -596,7 +598,7 @@ void FindExactUVBounds(const TopoDS_Face FF,
   //
   TopLoc_Location aLoc;
   Handle(Geom_Surface) aS = BRep_Tool::Surface(FF, aLoc);
-  Standard_Real aUmin, aUmax, aVmin, aVmax;
+  Standard_Real aUmin = NAN, aUmax = NAN, aVmin = NAN, aVmax = NAN;
   aS->Bounds(aUmin, aUmax, aVmin, aVmax);
   if(!aS->IsUPeriodic())
   {
@@ -652,7 +654,7 @@ Standard_Boolean IsModifySize(const BRepAdaptor_Surface& theBS,
                               const BRepTopAdaptor_FClass2d& theFClass,
                               const Standard_Real theTolU, const Standard_Real theTolV)
 {
-  Standard_Real pu1 = 0, pu2, pv1 = 0, pv2;
+  Standard_Real pu1 = 0, pu2 = NAN, pv1 = 0, pv2 = NAN;
   ElSLib::PlaneParameters(thePln.Position(), theP, pu2, pv2);
   Reorder(pu1, pu2);
   Reorder(pv1, pv2);
@@ -663,7 +665,7 @@ Standard_Boolean IsModifySize(const BRepAdaptor_Surface& theBS,
   {
     if(anExtr.NbExt() > 0)
     {
-      Standard_Integer i, imin = 0;
+      Standard_Integer i = 0, imin = 0;
       Standard_Real dmin = RealLast();
       Standard_Real uextr = 0., vextr = 0.;
       Extrema_POnSurf P1, P2;
@@ -722,8 +724,8 @@ void AdjustFaceBox(const BRepAdaptor_Surface& BS,
     return;
   }
 
-  Standard_Real fxmin, fymin, fzmin, fxmax, fymax, fzmax;
-  Standard_Real exmin, eymin, ezmin, exmax, eymax, ezmax;
+  Standard_Real fxmin = NAN, fymin = NAN, fzmin = NAN, fxmax = NAN, fymax = NAN, fzmax = NAN;
+  Standard_Real exmin = NAN, eymin = NAN, ezmin = NAN, exmax = NAN, eymax = NAN, ezmax = NAN;
   //
   FaceBox.Get(fxmin, fymin, fzmin, fxmax, fymax, fzmax);
   EdgeBox.Get(exmin, eymin, ezmin, exmax, eymax, ezmax);
index 2f54913e2c6b1b3251014fd99f103bd6d1f36f59..c179841760b56500468e89a3b2f8be6a06d362a7 100644 (file)
@@ -58,7 +58,7 @@ static void BuildBack (const TopTools_DataMapOfShapeListOfShape& M1,
 //=======================================================================
 
 static void  Replace (      TopTools_ListOfShape& L,
-                     const TopoDS_Shape          Old,
+                     const TopoDS_Shape&          Old,
                      const TopTools_ListOfShape& New)
 {
   //-----------------------------------
@@ -150,7 +150,7 @@ static void Update (   TopTools_DataMapOfShapeListOfShape& Mod,
     if (!LIG.IsEmpty()) {
       if (ModBack.IsBound(S)) {
        // Generation de modif  => generation du shape initial
-       TopoDS_Shape IS = ModBack(S);
+       const TopoDS_Shape& IS = ModBack(S);
        StoreImage (Gen,IS,GenBack,LIG);
       }
       else {
index a4ac6438fc56556da04283375d15e271f92e18c5..fa945c79a133fc3a24249ff80896a942cdae6f4e 100644 (file)
@@ -584,10 +584,10 @@ BRepBuilderAPI_FastSewing::NodeInspector::
                                     const Standard_Real theTol)
 : myVecOfVertexes(theVec),
   myPoint(thePnt),
-  myResID(-1),
+  mySQToler(theTol*theTol), myResID(-1),
   myIsFindingEnable(Standard_False)
 {
-  mySQToler = theTol*theTol;
+  
 }
 
 //=======================================================================
index 0f4e35eeac8b1d53aec9b87384c144be9cc52003..008aad2bd45441ee95e9e19aa34817666b362385 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepBuilderAPI_FindPlane.hxx>
 #include <Geom_BezierCurve.hxx>
@@ -77,11 +79,11 @@ void BRepBuilderAPI_FindPlane::Init(const TopoDS_Shape&    S,
   Standard_Real tol2 = tolerance*tolerance;
   // try to find an analytical curve and calculate points
   TopLoc_Location loc;
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   Standard_Boolean found = Standard_False;  
   Handle(Geom_Plane) P;
   TColgp_SequenceOfPnt points;
-  Standard_Integer nbPnts;
+  Standard_Integer nbPnts = 0;
 
   for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) {
     Handle(Geom_Curve) c3d = 
index 5d74c718568f760fcfbadb451c496a6c32803e6d..8f919bfa6efc7c47450860c2c08bd4e799a1a923 100644 (file)
@@ -237,7 +237,7 @@ void BRepBuilderAPI_MakeShapeOnMesh::Build(const Message_ProgressRange& theRange
     gp_Pln aPln(myMesh->Node(anIdx[0]), aNorm);
 
     BRepBuilderAPI_MakeFace aFaceMaker(aPln, aWire);
-    const TopoDS_Face aFace = aFaceMaker.Face();
+    const TopoDS_Face& aFace = aFaceMaker.Face();
 
     aBB.Add(aResult, aFace);
   }
index 7ab53d2f76d610128c8dc34b75d19ebf7150eee8..4bda8f1f6b3e517aaf6a8b6b14ec6cdc79b59b76 100644 (file)
@@ -43,9 +43,9 @@ BRepBuilderAPI_ModifyShape::BRepBuilderAPI_ModifyShape (const TopoDS_Shape& S):
 //=======================================================================
 
 BRepBuilderAPI_ModifyShape::BRepBuilderAPI_ModifyShape 
-    (const Handle(BRepTools_Modification)& M)
+    (const Handle(BRepTools_Modification)& M) : myModification(M)
 {
-  myModification = M;
+  
 }
 
 
@@ -56,9 +56,9 @@ BRepBuilderAPI_ModifyShape::BRepBuilderAPI_ModifyShape
 
 BRepBuilderAPI_ModifyShape::BRepBuilderAPI_ModifyShape 
   (const TopoDS_Shape& S,
-   const Handle(BRepTools_Modification)& M): myModifier(S),myInitialShape(S)
+   const Handle(BRepTools_Modification)& M): myModifier(S),myInitialShape(S), myModification(M)
 {
-  myModification = M;
+  
   DoModif();
 }
 
index 65bb5ab958766bc4c5e7ba9dd58b98103ed17f6b..7e8a3c931a422d5270efe028249b1c62d24da61a 100644 (file)
@@ -42,6 +42,8 @@
 #define TEST 1
 
 
+#include <math.h>
+
 #include <Bnd_Box2d.hxx>
 #include <BndLib_Add2dCurve.hxx>
 #include <BndLib_Add3dCurve.hxx>
 #include <TopTools_ListOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
 #include <TopTools_SequenceOfShape.hxx>
+#include <utility>
 
 IMPLEMENT_STANDARD_RTTIEXT(BRepBuilderAPI_Sewing,Standard_Transient)
 
@@ -171,7 +174,7 @@ static Standard_Boolean IsClosedShape(const TopoDS_Shape& theshape,
     TopExp::Vertices(aedge,ve1,ve2);
     if (!ve1.IsSame(v1) && !ve1.IsSame(v2)) continue;
     if (BRep_Tool::Degenerated(aedge)) continue;
-    Standard_Real first,last;
+    Standard_Real first = NAN,last = NAN;
     Handle(Geom_Curve) c3d = BRep_Tool::Curve(TopoDS::Edge(aedge), first, last);
     if (!c3d.IsNull()) {
       GeomAdaptor_Curve cAdapt(c3d);
@@ -248,7 +251,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::IsUClosedSurface(const Handle(Geom_Surfa
   else {
     Standard_Boolean isClosed = tmpsurf->IsUClosed();
     if(!isClosed) {
-      Standard_Real f2d, l2d;
+      Standard_Real f2d = NAN, l2d = NAN;
       Handle(Geom2d_Curve) acrv2d = BRep_Tool::CurveOnSurface(TopoDS::Edge(theEdge), surf,theloc, f2d, l2d);
       if(!acrv2d.IsNull())
         isClosed = IsClosedByIsos(tmpsurf,acrv2d,f2d, l2d,Standard_False );
@@ -277,7 +280,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::IsVClosedSurface(const Handle(Geom_Surfa
   else {
     Standard_Boolean isClosed = tmpsurf->IsVClosed();
     if(!isClosed) {
-      Standard_Real f2d, l2d;
+      Standard_Real f2d = NAN, l2d = NAN;
       Handle(Geom2d_Curve) acrv2d = BRep_Tool::CurveOnSurface(TopoDS::Edge(theEdge), surf,theloc, f2d, l2d);
       if(!acrv2d.IsNull())
         isClosed = IsClosedByIsos(tmpsurf,acrv2d,f2d, l2d,Standard_True );
@@ -374,7 +377,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Shape& edge,
   for (Standard_Integer i = 1; i <= seqEdges.Length(); i++) {
 
     // Retrieve candidate section
-    TopoDS_Shape oedge2 = seqEdges(i);
+    const TopoDS_Shape& oedge2 = seqEdges(i);
 
     if (mySewing) {
 
@@ -442,7 +445,7 @@ static Standard_Boolean findNMVertices(const TopoDS_Edge& theEdge,
   Standard_Integer nbV = theSeqNMVert.Length();
   if(!nbV)
     return Standard_False;
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   Handle(Geom_Curve) c3d = BRep_Tool::Curve(theEdge,first, last);
   GeomAdaptor_Curve GAC(c3d);
   Extrema_ExtPC locProj;
@@ -461,7 +464,7 @@ static Standard_Boolean findNMVertices(const TopoDS_Edge& theEdge,
     locProj.Perform(pt);
     if (locProj.IsDone() && locProj.NbExt() > 0) {
          Standard_Real dist2Min = Min(distF2,distL2);
-         Standard_Integer ind, indMin = 0;
+         Standard_Integer ind = 0, indMin = 0;
          for (ind = 1; ind <= locProj.NbExt(); ind++) {
            Standard_Real dProj2 = locProj.SquareDistance(ind);
            if (dProj2 < dist2Min) { 
@@ -481,15 +484,15 @@ static Standard_Boolean findNMVertices(const TopoDS_Edge& theEdge,
 static void ComputeToleranceVertex(TopoDS_Vertex theV1, TopoDS_Vertex theV2,
                                    TopoDS_Vertex& theNewV)
 {
-  Standard_Integer m, n;
-  Standard_Real aR[2], dR, aD, aEps;
+  Standard_Integer m = 0, n = 0;
+  Standard_Real aR[2], dR = NAN, aD = NAN, aEps = NAN;
   TopoDS_Vertex aV[2];
   gp_Pnt aP[2];
   BRep_Builder aBB;
   //
   aEps = RealEpsilon();
-  aV[0] = theV1;
-  aV[1] = theV2;
+  aV[0] = std::move(theV1);
+  aV[1] = std::move(theV2);
   for (m = 0; m < 2; ++m) {
     aP[m] = BRep_Tool::Pnt(aV[m]);
     aR[m] = BRep_Tool::Tolerance(aV[m]);
@@ -510,7 +513,7 @@ static void ComputeToleranceVertex(TopoDS_Vertex theV1, TopoDS_Vertex theV2,
     aBB.MakeVertex (theNewV, aP[m], aR[m]);
   }
   else {
-    Standard_Real aRr;
+    Standard_Real aRr = NAN;
     gp_XYZ aXYZr;
     gp_Pnt aPr;
     //
@@ -526,15 +529,15 @@ static void ComputeToleranceVertex(TopoDS_Vertex theV1, TopoDS_Vertex theV2,
 static void ComputeToleranceVertex(TopoDS_Vertex theV1, TopoDS_Vertex theV2,
                                    TopoDS_Vertex theV3, TopoDS_Vertex& theNewV)
 {
-  Standard_Real aDi, aDmax;
+  Standard_Real aDi = NAN, aDmax = NAN;
   gp_Pnt aCenter;
   gp_Pnt aP[3];
   Standard_Real aR[3];
   TopoDS_Vertex aV[3];
   gp_XYZ aXYZ(0.,0.,0.);
-  aV[0] = theV1;
-  aV[1] = theV2;
-  aV[2] = theV3;
+  aV[0] = std::move(theV1);
+  aV[1] = std::move(theV2);
+  aV[2] = std::move(theV3);
   for (Standard_Integer i = 0; i < 3; ++i) {
     aP[i] = BRep_Tool::Pnt(aV[i]);
     aR[i] = BRep_Tool::Tolerance(aV[i]);
@@ -572,7 +575,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
   TopoDS_Edge edge1, edge2;
   if (firstCall) {
     // Take the longest edge as first
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     Handle(Geom_Curve) c3d1 = BRep_Tool::Curve(TopoDS::Edge(edgeFirst), f, l);
     GeomAdaptor_Curve cAdapt1(c3d1);
     Standard_Real len1 = GCPnts_AbscissaPoint::Length(cAdapt1, f, l);
@@ -603,7 +606,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
     }
   }
 
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   BRep_Tool::Range(edge1, first, last);
   BRep_Builder aBuilder;
 
@@ -621,7 +624,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
 
   // Retrieve edge curve
   TopLoc_Location loc3d;
-  Standard_Real first3d, last3d;
+  Standard_Real first3d = NAN, last3d = NAN;
   Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge1, loc3d, first3d, last3d);
   if (!loc3d.IsIdentity()) {
     c3d = Handle(Geom_Curve)::DownCast(c3d->Copy());
@@ -740,7 +743,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
   TopoDS_Face fac2;
   for (; itf2.More(); itf2.Next()) {
     Handle(Geom2d_Curve) c2d2, c2d21;
-    Standard_Real firstOld, lastOld;
+    Standard_Real firstOld = NAN, lastOld = NAN;
     fac2 = TopoDS::Face(itf2.Value());
 
     surf2 = BRep_Tool::Surface(fac2, loc2);
@@ -799,7 +802,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
       TopLoc_Location loc1;
       Handle(Geom_Surface) surf1 = BRep_Tool::Surface(fac1, loc1);
       
-      Standard_Real first2d, last2d;
+      Standard_Real first2d = NAN, last2d = NAN;
       Standard_Boolean isSeam1 = ((IsUClosedSurface(surf1,edge1,loc1) || IsVClosedSurface(surf1,edge1,loc1)) &&
         BRep_Tool::IsClosed(TopoDS::Edge(edge1),fac1));
       c2d1 = BRep_Tool::CurveOnSurface(edge1, fac1, first2d, last2d);
@@ -834,7 +837,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
             gp_Pnt2d p21n = c2d2->Value(Max(first,c2d2->FirstParameter()));
             gp_Pnt2d p22n = c2d2->Value(Min(last,c2d2->LastParameter()));
             Standard_Real aDist = Min(p1n.Distance(p21n), p1n.Distance(p22n));
-            Standard_Real U1, U2, V1, V2;
+            Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
             surf2->Bounds(U1, U2, V1, V2);
             isSeam = ((uclosed && aDist > 0.75*(fabs(U2-U1))) ||
               (vclosed && aDist > 0.75*(fabs(V2-V1))));
@@ -915,7 +918,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
       GeomAdaptor_Curve c3dAdapt(c3d);
 
       // Discretize edge curve
-      Standard_Integer i, j, nbp = 23;
+      Standard_Integer i = 0, j = 0, nbp = 23;
       Standard_Real deltaT = (last3d - first3d) / (nbp -1);
       TColgp_Array1OfPnt c3dpnt(1,nbp);
       for (i = 1; i <= nbp; i++) 
@@ -953,7 +956,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
         if (tolReached > MaxTolerance())
         {
           // Set tolerance directly to overwrite too large tolerance
-          static_cast<BRep_TEdge*>(edge.TShape().get())->Tolerance(maxTol);
+          dynamic_cast<BRep_TEdge*>(edge.TShape().get())->Tolerance(maxTol);
         }
         else
         {
@@ -982,12 +985,12 @@ void BRepBuilderAPI_Sewing::EvaluateAngulars(TopTools_SequenceOfShape& sequenceS
 {
   tabAng.Init(-1.0);
 
-  Standard_Integer i, j, npt = 4, lengSec = sequenceSec.Length();
+  Standard_Integer i = 0, j = 0, npt = 4, lengSec = sequenceSec.Length();
 
   TopoDS_Edge edge;
   TopoDS_Face face;
   TopLoc_Location loc;
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   Handle(Geom_Curve) c3d;
   Handle(Geom2d_Curve) c2d;
   Handle(Geom_Surface) surf;
@@ -1064,7 +1067,7 @@ void BRepBuilderAPI_Sewing::EvaluateDistances(TopTools_SequenceOfShape& sequence
   const Standard_Integer npt = 8; // Number of points for curve discretization
   TColgp_Array1OfPnt ptsRef(1, npt), ptsSec(1, npt);
 
-  Standard_Integer i, j, lengSec = sequenceSec.Length();
+  Standard_Integer i = 0, j = 0, lengSec = sequenceSec.Length();
   TColgp_SequenceOfPnt seqSec;
 
   Handle(Geom_Curve) c3dRef;
@@ -1076,7 +1079,7 @@ void BRepBuilderAPI_Sewing::EvaluateDistances(TopTools_SequenceOfShape& sequence
     const TopoDS_Edge& sec = TopoDS::Edge(sequenceSec(i));
 
     TopLoc_Location loc;
-    Standard_Real first, last;
+    Standard_Real first = NAN, last = NAN;
     Handle(Geom_Curve) c3d = BRep_Tool::Curve(sec, loc, first, last);
     if (c3d.IsNull()) continue;
     if (!loc.IsIdentity()) {
@@ -1091,7 +1094,7 @@ void BRepBuilderAPI_Sewing::EvaluateDistances(TopTools_SequenceOfShape& sequence
     Standard_Real dist = Precision::Infinite(), distFor = -1.0, distRev = -1.0;
     Standard_Real aMinDist = Precision::Infinite();
 
-    Standard_Real T, deltaT = (last - first) / (npt - 1);
+    Standard_Real T = NAN, deltaT = (last - first) / (npt - 1);
     Standard_Real aLenSec2 = 0.;
    
     Standard_Integer nbFound = 0;
@@ -1262,7 +1265,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::IsMergedClosed(const TopoDS_Edge& Edge1,
   Handle(Geom_Curve) C3d2 = BRep_Tool::Curve(Edge2,first2,last2);
   if (C3d1.IsNull() || C3d2.IsNull()) return Standard_False;
   */
-  Standard_Real first2d1,last2d1,first2d2,last2d2;
+  Standard_Real first2d1 = NAN,last2d1 = NAN,first2d2 = NAN,last2d2 = NAN;
   Handle(Geom2d_Curve) C2d1 = BRep_Tool::CurveOnSurface(Edge1,face,first2d1,last2d1);
   Handle(Geom2d_Curve) C2d2 = BRep_Tool::CurveOnSurface(Edge2,face,first2d2,last2d2);
   if (C2d1.IsNull() || C2d2.IsNull()) return Standard_False;
@@ -1277,10 +1280,10 @@ Standard_Boolean BRepBuilderAPI_Sewing::IsMergedClosed(const TopoDS_Edge& Edge1,
   Standard_Real distSurf = Max(Ads.UResolution(dist), Ads.VResolution(dist));
   return (dist2d*0.2 >= distSurf);
   */
-  Standard_Integer isULongC1, isULongC2, isVLongC1, isVLongC2;
-  Standard_Real SUmin, SUmax, SVmin, SVmax;
-  Standard_Real C1Umin, C1Vmin, C1Umax, C1Vmax;
-  Standard_Real C2Umin, C2Vmin, C2Umax, C2Vmax;
+  Standard_Integer isULongC1 = 0, isULongC2 = 0, isVLongC1 = 0, isVLongC2 = 0;
+  Standard_Real SUmin = NAN, SUmax = NAN, SVmin = NAN, SVmax = NAN;
+  Standard_Real C1Umin = NAN, C1Vmin = NAN, C1Umax = NAN, C1Vmax = NAN;
+  Standard_Real C2Umin = NAN, C2Vmin = NAN, C2Umax = NAN, C2Vmax = NAN;
   { //szv: Use brackets to destroy local variables
     Bnd_Box2d B1, B2;
     Geom2dAdaptor_Curve aC2d1(C2d1), aC2d2(C2d2);
@@ -1288,7 +1291,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::IsMergedClosed(const TopoDS_Edge& Edge1,
     BndLib_Add2dCurve::Add(aC2d2,first2d2,last2d2,Precision::PConfusion(),B2);
     B1.Get(C1Umin,C1Vmin,C1Umax,C1Vmax);
     B2.Get(C2Umin,C2Vmin,C2Umax,C2Vmax);
-    Standard_Real du, dv;
+    Standard_Real du = NAN, dv = NAN;
     du = (C1Umax - C1Umin); dv = (C1Vmax - C1Vmin);
     isULongC1 = (dv <= du); isVLongC1 = (du <= dv);
     du = (C2Umax - C2Umin); dv = (C2Vmax - C2Vmin);
@@ -1393,7 +1396,7 @@ void BRepBuilderAPI_Sewing::AnalysisNearestEdges(const TopTools_SequenceOfShape&
   // (they have other nearest edges belonging to the work face)
   for(Standard_Integer k = 1; k<= seqNotCandidate.Length(); k++) {
     Standard_Integer index1 = seqNotCandidate.Value(k);
-    TopoDS_Shape edge = sequenceSec.Value(index1);
+    const TopoDS_Shape& edge = sequenceSec.Value(index1);
     TopTools_SequenceOfShape tmpSeq;
     tmpSeq.Append(edge);
     for(Standard_Integer kk = 1; kk <= seqIndCandidate.Length();kk++) 
@@ -1449,7 +1452,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::FindCandidates(TopTools_SequenceOfShape&
                                                        TColStd_SequenceOfInteger& seqCandidates,
                                                        TColStd_SequenceOfBoolean& seqOrientations)
 {
-  Standard_Integer i, nbSections = seqSections.Length();
+  Standard_Integer i = 0, nbSections = seqSections.Length();
   if(nbSections <= 1)
     return Standard_False;
   // Retrieve last reference index
@@ -1704,9 +1707,9 @@ BRepBuilderAPI_Sewing::BRepBuilderAPI_Sewing(const Standard_Real tolerance,
                                 const Standard_Boolean optionSewing,
                                 const Standard_Boolean optionAnalysis,
                                 const Standard_Boolean optionCutting,
-                                const Standard_Boolean optionNonmanifold)
+                                const Standard_Boolean optionNonmanifold) : myReShape(new BRepTools_ReShape)
 {
-  myReShape = new BRepTools_ReShape;
+  
   Init(tolerance, optionSewing, optionAnalysis, optionCutting, optionNonmanifold);
 }
 
@@ -2168,7 +2171,7 @@ TopoDS_Shape BRepBuilderAPI_Sewing::ModifiedSubShape(const TopoDS_Shape& aShape)
 
 void BRepBuilderAPI_Sewing::Dump() const
 {
-  Standard_Integer i, NbBounds = myBoundFaces.Extent(), NbSections = 0;
+  Standard_Integer i = 0, NbBounds = myBoundFaces.Extent(), NbSections = 0;
   TopTools_MapOfShape mapVertices, mapEdges;
   for (i = 1; i <= NbBounds; i++) {
     TopoDS_Shape bound = myBoundFaces.FindKey(i);
@@ -2272,7 +2275,7 @@ void BRepBuilderAPI_Sewing::FaceAnalysis(const Message_ProgressRange& theProgres
          if (!isSmall) {
 
            // Check for small edge
-           Standard_Real first, last;
+           Standard_Real first = NAN, last = NAN;
            Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge,first,last);
            if (c3d.IsNull()) {
 #ifdef OCCT_DEBUG
@@ -2283,7 +2286,7 @@ void BRepBuilderAPI_Sewing::FaceAnalysis(const Message_ProgressRange& theProgres
              // Evaluate curve compactness
              const Standard_Integer npt = 5;
              gp_Pnt cp((c3d->Value(first).XYZ()+c3d->Value(last).XYZ())*0.5);
-             Standard_Real dist, maxdist = 0.0;
+             Standard_Real dist = NAN, maxdist = 0.0;
              Standard_Real delta = (last - first)/(npt - 1);
              for (Standard_Integer idx = 0; idx < npt; idx++) {
                dist = cp.Distance(c3d->Value(first + idx*delta));
@@ -2362,7 +2365,7 @@ void BRepBuilderAPI_Sewing::FaceAnalysis(const Message_ProgressRange& theProgres
            // Create new degenerated edge
             aTmpShape = edge.Oriented(TopAbs_FORWARD);
            TopoDS_Edge fedge = TopoDS::Edge(aTmpShape);
-           Standard_Real pfirst, plast;
+           Standard_Real pfirst = NAN, plast = NAN;
            Handle(Geom2d_Curve) c2d = BRep_Tool::CurveOnSurface(fedge,face,pfirst,plast);
            if (!c2d.IsNull()) {
              TopoDS_Edge nedge;
@@ -2461,7 +2464,7 @@ void BRepBuilderAPI_Sewing::FindFreeBoundaries()
   }
   // Create map Edge -> Faces
   TopTools_IndexedDataMapOfShapeListOfShape EdgeFaces;
-  Standard_Integer i, nbShapes = myOldShapes.Extent();
+  Standard_Integer i = 0, nbShapes = myOldShapes.Extent();
   for (i = 1; i <= nbShapes; i++) {
     // Retrieve new shape
     const TopoDS_Shape& shape = myOldShapes(i);
@@ -2531,7 +2534,7 @@ void BRepBuilderAPI_Sewing::FindFreeBoundaries()
           
 
 
-          Standard_Real first2d,last2d;
+          Standard_Real first2d = NAN,last2d = NAN;
           Handle(Geom2d_Curve) c2dold = 
             BRep_Tool::CurveOnSurface(TopoDS::Edge(edge),TopoDS::Face(listFaces.First()),first2d,last2d);
 
@@ -2540,7 +2543,7 @@ void BRepBuilderAPI_Sewing::FindFreeBoundaries()
           B.UpdateEdge(TopoDS::Edge(anewEdge),c2d,c2d,TopoDS::Face(listFaces.First()),0);
           B.UpdateEdge(TopoDS::Edge(anewEdge),c2dold,TopoDS::Face(listFaces.First()),0);
           
-          Standard_Real aFirst, aLast;
+          Standard_Real aFirst = NAN, aLast = NAN;
           BRep_Tool::Range(TopoDS::Edge(edge),aFirst, aLast);
           aB.Range(TopoDS::Edge(anewEdge),aFirst, aLast);
           aB.Range(TopoDS::Edge(anewEdge),TopoDS::Face(listFaces.First()),first2d,last2d);
@@ -2924,11 +2927,11 @@ void BRepBuilderAPI_Sewing::VerticesAssembling(const Message_ProgressRange& theP
   Message_ProgressScope aPS (theProgress, "Vertices assembling", 2);
   if (nbVert || nbVertFree) {
     // Fill map node -> sections
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 1; i <= myBoundFaces.Extent(); i++) {
       TopoDS_Shape bound = myBoundFaces.FindKey(i);
       for (TopoDS_Iterator itv(bound,Standard_False); itv.More(); itv.Next()) {
-       TopoDS_Shape node = itv.Value();
+       const TopoDS_Shape& node = itv.Value();
        if (myNodeSections.IsBound(node))
          myNodeSections(node).Append(bound);
        else {
@@ -2971,7 +2974,7 @@ static void replaceNMVertices(const TopoDS_Edge& theEdge,
   Standard_Boolean hasNMVert = findNMVertices(theEdge,aSeqNMVert,aSeqNMPars);
   if(!hasNMVert)
     return;
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   BRep_Tool::Range(theEdge, first, last);
   TopLoc_Location aLoc;
   Handle(Geom_Curve) c3d = BRep_Tool::Curve(theEdge,aLoc,first, last);
@@ -2991,7 +2994,7 @@ static void replaceNMVertices(const TopoDS_Edge& theEdge,
       theReShape->Replace(aSeqNMVert.Value(i),theV2);
       continue;
     }
-    TopoDS_Shape aV = aSeqNMVert.Value(i);
+    const TopoDS_Shape& aV = aSeqNMVert.Value(i);
     Standard_Integer j =1;
     for( ; j <= aEdParams.Length();j++) {
       Standard_Real apar2 = aEdParams.Value(j);
@@ -3508,7 +3511,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::MergedNearestEdges(const TopoDS_Shape& e
   TopTools_MapOfShape mapEdges;
   mapEdges.Add(edge);
   for (Standard_Integer i = 1; i <= mapVert1.Extent(); i++) {
-    TopoDS_Shape node1 = mapVert1.FindKey(i);
+    const TopoDS_Shape& node1 = mapVert1.FindKey(i);
     if (!myNodeSections.IsBound(node1)) continue;
     TopTools_ListIteratorOfListOfShape ilsec(myNodeSections(node1));
     for (; ilsec.More(); ilsec.Next()) {
@@ -3553,11 +3556,11 @@ Standard_Boolean BRepBuilderAPI_Sewing::MergedNearestEdges(const TopoDS_Shape& e
   Standard_Integer nbSection = seqEdges.Length();
   if (nbSection > 1) {
     // Find the longest edge CCI60011
-    Standard_Integer i, indRef = 1;
+    Standard_Integer i = 0, indRef = 1;
     if (myNonmanifold) {
       Standard_Real lenRef = 0.;
       for (i = 1; i <= nbSection; i++) {
-        Standard_Real f, l;
+        Standard_Real f = NAN, l = NAN;
         Handle(Geom_Curve) c3d = BRep_Tool::Curve(TopoDS::Edge(seqEdges(i)), f, l);
         GeomAdaptor_Curve cAdapt(c3d);
         Standard_Real len = GCPnts_AbscissaPoint::Length(cAdapt, f, l);
@@ -3603,7 +3606,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::MergedNearestEdges(const TopoDS_Shape& e
 
 void BRepBuilderAPI_Sewing::Cutting(const Message_ProgressRange& theProgress)
 {
-  Standard_Integer i, nbVertices = myVertexNode.Extent();
+  Standard_Integer i = 0, nbVertices = myVertexNode.Extent();
   if (!nbVertices) return;
   // Create a box tree with vertices
   Standard_Real eps = myTolerance*0.5;
@@ -3621,7 +3624,7 @@ void BRepBuilderAPI_Sewing::Cutting(const Message_ProgressRange& theProgress)
 
   Handle(Geom_Curve) c3d;
   TopLoc_Location loc;
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   // Iterate on all boundaries
   Standard_Integer nbBounds = myBoundFaces.Extent();
   Message_ProgressScope aPS (theProgress, "Cutting bounds", nbBounds);
@@ -3739,7 +3742,7 @@ static void GetSeqEdges(const TopoDS_Shape& edge,
         const TopoDS_Shape& edge1 = lIt.Value();
         if (edge1.IsSame(edge)) continue;
         Standard_Boolean isContained = Standard_False;
-        Standard_Integer i, index = 1;
+        Standard_Integer i = 0, index = 1;
         for (i = 1; i <= seqEdges.Length() && !isContained; i++) {
           isContained = seqEdges.Value(i).IsSame(edge1);
           if (!isContained && seqEdges.Value(i).IsSame(edge)) index = i;
@@ -3779,7 +3782,7 @@ void BRepBuilderAPI_Sewing::GetFreeWires(TopTools_IndexedMapOfShape& MapFreeEdge
     }
   }
   BRep_Builder B;
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   for (i = 1; i <= seqFreeEdges.Length(); i++) {
     TopTools_SequenceOfShape seqEdges;
     const TopoDS_Shape& edge = seqFreeEdges.Value(i);
@@ -3811,7 +3814,7 @@ static Standard_Boolean IsDegeneratedWire(const TopoDS_Shape& wire)
   //Standard_Real tol = Max(BRep_Tool::Tolerance(V1),BRep_Tool::Tolerance(V2));
   Standard_Real wireLength = 0.0;
   TopLoc_Location loc;
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   Standard_Integer nume = 0;
   Standard_Integer isSmall = 0;
   for (TopoDS_Iterator aIt(wire,Standard_False); aIt.More(); aIt.Next()) {
@@ -3875,7 +3878,7 @@ static TopoDS_Edge DegeneratedSection(const TopoDS_Shape& section, const TopoDS_
 
   // Retrieve edge curve
   TopLoc_Location loc;
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   Handle(Geom_Curve) c3d = BRep_Tool::Curve(TopoDS::Edge(section), loc, first, last);
   if (c3d.IsNull()) { //gka
     BRep_Builder aB;
@@ -3941,7 +3944,7 @@ static TopoDS_Edge DegeneratedSection(const TopoDS_Shape& section, const TopoDS_
   aBuilder.Degenerated(edge, Standard_True);
   Handle(Geom_Curve) aC3dNew;
   if (!face.IsNull()) {
-    Standard_Real af,al;
+    Standard_Real af = NAN,al = NAN;
     Handle(Geom2d_Curve) aC2dt = BRep_Tool::CurveOnSurface(TopoDS::Edge(section),TopoDS::Face(face),af,al);
     aBuilder.UpdateEdge(edge,aC3dNew,0);
     Handle(Geom2d_Curve) aC2dn = BRep_Tool::CurveOnSurface(edge,TopoDS::Face(face),af,al);
@@ -4207,7 +4210,7 @@ void BRepBuilderAPI_Sewing::CreateSewedShape()
 void BRepBuilderAPI_Sewing::CreateOutputInformations()
 {
   // Construct edgeSections
-  Standard_Integer i;
+  Standard_Integer i = 0;
   //TopTools_DataMapOfShapeListOfShape edgeSections;
   TopTools_IndexedDataMapOfShapeListOfShape edgeSections; //use index map for regulating free edges
   for (i = 1; i <= myBoundFaces.Extent(); i++) {
@@ -4307,7 +4310,7 @@ void BRepBuilderAPI_Sewing::ProjectPointsOnCurve(const TColgp_Array1OfPnt& arrPn
       locProj.Perform(pt);
       if (locProj.IsDone() && locProj.NbExt() > 0) {
         Standard_Real dist2Min = (isConsiderEnds || i1 == find || i1 == lind ? Min(distF2,distL2) : Precision::Infinite());
-        Standard_Integer ind, indMin = 0;
+        Standard_Integer ind = 0, indMin = 0;
         for (ind = 1; ind <= locProj.NbExt(); ind++) {
           Standard_Real dProj2 = locProj.SquareDistance(ind);
           if (dProj2 < dist2Min) { indMin = ind; dist2Min = dProj2; }
@@ -4380,7 +4383,7 @@ void BRepBuilderAPI_Sewing::CreateCuttingNodes(const TopTools_IndexedMapOfShape&
                                                TopTools_SequenceOfShape& seqVert,
                                                TColStd_SequenceOfReal& seqPara)
 {
-  Standard_Integer i, j, nbProj = MapVert.Extent();
+  Standard_Integer i = 0, j = 0, nbProj = MapVert.Extent();
 
   // Reorder projections by distance
   TColStd_SequenceOfInteger seqOrderedIndex;
@@ -4414,7 +4417,7 @@ void BRepBuilderAPI_Sewing::CreateCuttingNodes(const TopTools_IndexedMapOfShape&
   { //szv: Use brackets to destroy local variables
     // Retrieve bound curve
     TopLoc_Location loc;
-    Standard_Real first,last;
+    Standard_Real first = NAN,last = NAN;
     Handle(Geom_Curve) c3d = BRep_Tool::Curve(TopoDS::Edge(bound), loc, first, last);
     if (!loc.IsIdentity()) {
       c3d = Handle(Geom_Curve)::DownCast(c3d->Copy());
@@ -4440,7 +4443,7 @@ void BRepBuilderAPI_Sewing::CreateCuttingNodes(const TopTools_IndexedMapOfShape&
 
     // Find the closest vertex
     Standard_Integer indexMin = 1;
-    Standard_Real dist, distMin = pntProj.Distance(seqPnt(1));
+    Standard_Real dist = NAN, distMin = pntProj.Distance(seqPnt(1));
     for (j = 2; j <= seqPnt.Length(); j++) {
       dist = pntProj.Distance(seqPnt(j));
       if (dist < distMin) { distMin = dist; indexMin = j; }
@@ -4453,7 +4456,7 @@ void BRepBuilderAPI_Sewing::CreateCuttingNodes(const TopTools_IndexedMapOfShape&
       if (jdist < 0.0) {
         // Bind new cutting node (end vertex only)
         seqDist.SetValue(indexMin,disProj);
-        TopoDS_Shape cvertex = seqVert.Value(indexMin);
+        const TopoDS_Shape& cvertex = seqVert.Value(indexMin);
         NodeCuttingVertex.Add(node,cvertex);
       }
       else {
@@ -4536,13 +4539,13 @@ void BRepBuilderAPI_Sewing::CreateSections(const TopoDS_Shape& section,
 
   BRep_Builder aBuilder;
 
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   BRep_Tool::Range(sec, first, last);
 
   // Create cutting sections
-  Standard_Real par1, par2;
+  Standard_Real par1 = NAN, par2 = NAN;
   TopoDS_Shape V1, V2;
-  Standard_Integer i, len = seqPara.Length() + 1;
+  Standard_Integer i = 0, len = seqPara.Length() + 1;
   for (i = 1; i <= len; i++) {
 
     TopoDS_Edge edge = sec;
@@ -4743,7 +4746,7 @@ NCollection_CellFilter_Action BRepBuilderAPI_VertexInspector::Inspect (const Sta
     myResInd.Append (theTarget);*/
 
   const gp_XYZ& aPnt = myPoints.Value (theTarget - 1);
-  Standard_Real aDx, aDy, aDz;
+  Standard_Real aDx = NAN, aDy = NAN, aDz = NAN;
   aDx = myCurrent.X() - aPnt.X();
   aDy = myCurrent.Y() - aPnt.Y();
   aDz = myCurrent.Z() - aPnt.Z();
index 883f3d6c3f3193849ce66106d947e8c28c73eeb8..ba730bd4a04054cddb2b1d3daf2f72a60a0fc7ca 100644 (file)
@@ -333,11 +333,11 @@ protected:
   //! This method is called from Perform only
   Standard_EXPORT virtual void SameParameterShape();
 
-  Standard_Real myTolerance;
-  Standard_Boolean mySewing;
-  Standard_Boolean myAnalysis;
-  Standard_Boolean myCutting;
-  Standard_Boolean myNonmanifold;
+  Standard_Real myTolerance{};
+  Standard_Boolean mySewing{};
+  Standard_Boolean myAnalysis{};
+  Standard_Boolean myCutting{};
+  Standard_Boolean myNonmanifold{};
   TopTools_IndexedDataMapOfShapeShape myOldShapes;
   TopoDS_Shape mySewedShape;
   TopTools_IndexedMapOfShape myDegenerated;
@@ -345,9 +345,9 @@ protected:
   TopTools_IndexedMapOfShape myMultipleEdges;
   TopTools_IndexedDataMapOfShapeListOfShape myContigousEdges;
   TopTools_DataMapOfShapeShape myContigSecBound;
-  Standard_Integer myNbShapes;
-  Standard_Integer myNbVertices;
-  Standard_Integer myNbEdges;
+  Standard_Integer myNbShapes{};
+  Standard_Integer myNbVertices{};
+  Standard_Integer myNbEdges{};
   TopTools_IndexedDataMapOfShapeListOfShape myBoundFaces;
   TopTools_DataMapOfShapeListOfShape myBoundSections;
   TopTools_DataMapOfShapeShape mySectionBound;
@@ -363,12 +363,12 @@ protected:
 private:
 
 
-  Standard_Boolean myFaceMode;
-  Standard_Boolean myFloatingEdgesMode;
-  Standard_Boolean mySameParameterMode;
-  Standard_Boolean myLocalToleranceMode;
-  Standard_Real myMinTolerance;
-  Standard_Real myMaxTolerance;
+  Standard_Boolean myFaceMode{};
+  Standard_Boolean myFloatingEdgesMode{};
+  Standard_Boolean mySameParameterMode{};
+  Standard_Boolean myLocalToleranceMode{};
+  Standard_Real myMinTolerance{};
+  Standard_Real myMaxTolerance{};
   TopTools_MapOfShape myMergedEdges;
 
 
index b0cdaa1813ca3d0856bbc0ee15c341552e9be3da..fed5409b9cc543990008a3e4f698fd89d0c62315 100644 (file)
@@ -104,7 +104,7 @@ private:
 
   gp_Trsf myTrsf;
   TopLoc_Location myLocation;
-  Standard_Boolean myUseModif;
+  Standard_Boolean myUseModif{};
 
 
 };
index 32d55b8cd75236a94a0219d87027e3c0cc5fbb4d..9f3e612ee7cac0322b9f42c6756ea21ea5e235ff 100644 (file)
@@ -17,6 +17,8 @@
 
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <Adaptor3d_Curve.hxx>
+#include <math.h>
+
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <BRep_GCurve.hxx>
 #include <BRepLib_ValidateEdge.hxx>
@@ -64,11 +66,11 @@ static const Standard_Integer NCONTROL=23;
 //purpose  : 
 //=======================================================================
 
-BRepCheck_Edge::BRepCheck_Edge(const TopoDS_Edge& E)
+BRepCheck_Edge::BRepCheck_Edge(const TopoDS_Edge& E) : myGctrl(Standard_True), myIsExactMethod(Standard_False)
 {
   Init(E);
-  myGctrl = Standard_True;
-  myIsExactMethod = Standard_False;
+  
+  
 }
 
 //=======================================================================
@@ -141,7 +143,7 @@ void BRepCheck_Edge::Minimum()
     if (!myCref.IsNull()) {
       Handle(BRep_GCurve) GCref (Handle(BRep_GCurve)::DownCast (myCref));
       Standard_Real eps = Precision::PConfusion();
-      Standard_Real First,Last;
+      Standard_Real First = NAN,Last = NAN;
       GCref->Range(First,Last);
       if (Last<=First) {
         myCref.Nullify();
@@ -321,7 +323,7 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
         if (cr != myCref && cr->IsCurveOnSurface(Su,L)) {
           pcurvefound = Standard_True;
           Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast(cr));
-          Standard_Real f,l;
+          Standard_Real f = NAN,l = NAN;
           GC->Range(f,l);
           Standard_Real ff = f, ll = l;
           if(myCref->IsCurve3D())
@@ -567,12 +569,12 @@ void BRepCheck_Edge::SetStatus(const BRepCheck_Status theStatus)
 Standard_Real BRepCheck_Edge::Tolerance()
 {
   Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&myShape.TShape());
-  Standard_Integer it, iRep=1, nbRep=(TE->Curves()).Extent();
+  Standard_Integer it = 0, iRep=1, nbRep=(TE->Curves()).Extent();
   if (nbRep<=1) {
     return Precision::Confusion();
   }
   TColStd_Array1OfTransient theRep(1, nbRep*2);
-  Standard_Real First, Last;
+  Standard_Real First = NAN, Last = NAN;
   if (!myHCurve.IsNull()) {
     First = myHCurve->FirstParameter();
     Last=  myHCurve->LastParameter();
@@ -634,9 +636,9 @@ Standard_Real BRepCheck_Edge::Tolerance()
     }
   }
 
-  Standard_Real dist2, tol2, tolCal=0., prm;
+  Standard_Real dist2 = NAN, tol2 = NAN, tolCal=0., prm = NAN;
   gp_Pnt center, othP;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i= 0; i< NCONTROL; i++) {
     prm = ((NCONTROL-1-i)*First + i*Last)/(NCONTROL-1);
     tol2=dist2=0.;
index f128ec6d4d96336b31b611a6b16511c624c6ad05..86de687b5889c63f024dd6cdb3e980445424ef8c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box2d.hxx>
 #include <BndLib_Add2dCurve.hxx>
 #include <BRep_Builder.hxx>
@@ -79,15 +81,15 @@ static Standard_Boolean CheckThin(const TopoDS_Shape& w,
 //=======================================================================
 
 BRepCheck_Face::BRepCheck_Face (const TopoDS_Face& F)
-: myIntres(BRepCheck_NoError),
-  myImbres(BRepCheck_NoError),
-  myOrires(BRepCheck_NoError)
+: myIntdone(Standard_False), myIntres(BRepCheck_NoError),
+  myImbdone(Standard_False), myImbres(BRepCheck_NoError),
+  myOridone(Standard_False), myOrires(BRepCheck_NoError), myGctrl(Standard_True)
 {
   Init(F);
-  myIntdone = Standard_False;
-  myImbdone = Standard_False;
-  myOridone = Standard_False;
-  myGctrl   = Standard_True;
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -217,7 +219,7 @@ BRepCheck_Status BRepCheck_Face::IntersectWires(const Standard_Boolean Update)
   }
 
   Geom2dAdaptor_Curve aC;
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   DataMapOfShapeBox2d aMapShapeBox2d;
   for (exp1.Init (myShape, TopAbs_WIRE); exp1.More(); exp1.Next()) 
   {
@@ -245,7 +247,7 @@ BRepCheck_Status BRepCheck_Face::IntersectWires(const Standard_Boolean Update)
     aMapShapeBox2d.Bind (aWire, aBoxW);
   }
 
-  Standard_Integer Nbwire, Index,Indexbis;
+  Standard_Integer Nbwire = 0, Index = 0,Indexbis = 0;
   Nbwire = myMapImb.Extent();
 
   Index = 1;
@@ -625,7 +627,7 @@ static Standard_Boolean Intersect(const TopoDS_Wire& wir1,
     MapW1.Add( exp1.Current() );
   for (exp2.Init( wir2, TopAbs_VERTEX ); exp2.More(); exp2.Next())
     {
-      TopoDS_Shape V = exp2.Current();
+      const TopoDS_Shape& V = exp2.Current();
       if (MapW1.Contains( V ))
        CommonVertices.Append( V );
     }
@@ -635,7 +637,7 @@ static Standard_Boolean Intersect(const TopoDS_Wire& wir1,
   BRepAdaptor_Surface Surf(F,Standard_False);
 
   TColgp_SequenceOfPnt PntSeq;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= CommonVertices.Length(); i++)
     {
       TopoDS_Vertex V = TopoDS::Vertex( CommonVertices(i) );
@@ -646,7 +648,7 @@ static Standard_Boolean Intersect(const TopoDS_Wire& wir1,
 
   Geom2dAdaptor_Curve   C1,C2;
   gp_Pnt2d              pfirst1,plast1,pfirst2,plast2;
-  Standard_Real         first1,last1,first2,last2;
+  Standard_Real         first1 = NAN,last1 = NAN,first2 = NAN,last2 = NAN;
   Geom2dInt_GInter      Inter;
   IntRes2d_Domain myDomain1,myDomain2;
   Bnd_Box2d Box1, Box2;
@@ -774,7 +776,7 @@ static Standard_Boolean IsInside(const TopoDS_Wire& theWire,
                                 const BRepTopAdaptor_FClass2d& FClass2d,
                                 const TopoDS_Face& theFace)
 {
-  Standard_Real aParameter, aFirst, aLast;
+  Standard_Real aParameter = NAN, aFirst = NAN, aLast = NAN;
 
   TopExp_Explorer anExplorer(theWire, TopAbs_EDGE);
   for( ; anExplorer.More(); anExplorer.Next() )
@@ -796,7 +798,7 @@ static Standard_Boolean IsInside(const TopoDS_Wire& theWire,
       }
 
          //Edge is skipped if its length is too small
-         Standard_Real aFirst3D, aLast3D;
+         Standard_Real aFirst3D = NAN, aLast3D = NAN;
          Handle(Geom_Curve) aCurve = BRep_Tool::Curve( anEdge, aFirst3D, aLast3D );      
       if ( aCurve.IsNull() )
       {
index d94e5226ad857ff8c2bbc34746949397daf7ff0d..b274566002461d3f62e13e307fee17b90341daef 100644 (file)
@@ -288,7 +288,7 @@ BRepCheck_Status BRepCheck_Shell::Closed(const Standard_Boolean Update)
 
   myCstat = BRepCheck_NoError;
   //
-  Standard_Integer index, aNbF;
+  Standard_Integer index = 0, aNbF = 0;
   TopExp_Explorer exp, ede;
   TopTools_IndexedMapOfShape mapS;
   TopTools_MapOfShape aMEToAvoid;
@@ -394,7 +394,7 @@ BRepCheck_Status BRepCheck_Shell::Closed(const Standard_Boolean Update)
   }
   //
   //
-  Standard_Integer i, Nbedges, nboc, nbSet;
+  Standard_Integer i = 0, Nbedges = 0, nboc = 0, nbSet = 0;
   //
   Nbedges = myMapEF.Extent();
   for (i = 1; i<=Nbedges; ++i)
@@ -884,7 +884,7 @@ Standard_Integer BRepCheck_Shell::NbConnectedSet(TopTools_ListOfShape& theSets)
   TopExp_Explorer exsh(myShape, TopAbs_FACE);
   for (; exsh.More(); exsh.Next()) theFaces.Add(exsh.Current());
   // The edges that are not oriented or have more than 2 connections are missing
-  Standard_Integer iCur;
+  Standard_Integer iCur = 0;
   TopTools_MapOfShape theMultiEd;
   TopTools_MapOfShape theUnOriEd;
   for (iCur=1; iCur<=parents.Extent(); iCur++) {
index 43baa11a32be8442f3d9389a147e9d85fa848dc6..0c55529d4069c7eab73a4b3d809bbee29d0747a7 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepCheck.hxx>
 #include <BRepCheck_ListOfStatus.hxx>
@@ -50,7 +52,7 @@ class BRepCheck_HSC : public Standard_Transient {
     };
   //
   Standard_EXPORT
-    virtual ~BRepCheck_HSC(){
+    ~BRepCheck_HSC() override{
   };
   //
   Standard_EXPORT
@@ -74,9 +76,9 @@ class BRepCheck_ToolSolid  {
  public:
   DEFINE_STANDARD_ALLOC
 
-  BRepCheck_ToolSolid() {
-    myIsHole=Standard_False;
-    myPntTol=Precision::Confusion();
+  BRepCheck_ToolSolid() : myIsHole(Standard_False), myPntTol(Precision::Confusion()) {
+    
+    
     myPnt.SetCoord(-1.,-1.,-1.);
   };
    
@@ -105,7 +107,7 @@ class BRepCheck_ToolSolid  {
   //
   // IsOut
   Standard_Boolean IsOut(BRepCheck_ToolSolid& aOther)  {
-    Standard_Boolean bFlag;
+    Standard_Boolean bFlag = 0;
     TopAbs_State aState;
     //
     BRepClass3d_SolidClassifier& aSC=myHSC->SolidClassifier();
@@ -119,7 +121,7 @@ class BRepCheck_ToolSolid  {
   //
   // Init
   void Init() {
-    Standard_Real aT, aT1, aT2, aPAR_T;
+    Standard_Real aT = NAN, aT1 = NAN, aT2 = NAN, aPAR_T = NAN;
     TopExp_Explorer aExp;
     //
     // 0.myHSC
@@ -197,8 +199,8 @@ void BRepCheck_Solid::Minimum()
   }
   myMin = Standard_True;
   //
-  Standard_Boolean bFound, bIsHole, bFlag;
-  Standard_Integer i, j, aNbVTS, aNbVTS1, iCntSh, iCntShInt;
+  Standard_Boolean bFound = 0, bIsHole = 0, bFlag = 0;
+  Standard_Integer i = 0, j = 0, aNbVTS = 0, aNbVTS1 = 0, iCntSh = 0, iCntShInt = 0;
   TopoDS_Solid aZ;
   TopoDS_Iterator aIt, aItF;
   TopoDS_Builder aBB;
index 10e40a816597a76aabdf5c78e170123e643face6..deecf2988935c50cb24b6d02203df6a357d768e6 100644 (file)
@@ -64,6 +64,7 @@
 #include <TopTools_MapOfOrientedShape.hxx>
 #include <TopTools_MapOfShape.hxx>
 
+#include <math.h>
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(BRepCheck_Wire,BRepCheck_Result)
 
@@ -593,8 +594,8 @@ BRepCheck_Status BRepCheck_Wire::Closed2d(const TopoDS_Face& theFace,
 // Check distance between 2d ends of first and last edges
 //  Modified by Sergey KHROMOV - Mon May 13 12:42:10 2002 Begin
 //   First check if first and last edges are infinite:
-  Standard_Real      aF;
-  Standard_Real      aL;
+  Standard_Real      aF = NAN;
+  Standard_Real      aL = NAN;
   Standard_Boolean   isFirstInfinite = Standard_False;
   Standard_Boolean   isLastInfinite  = Standard_False;
   TopAbs_Orientation anOri;
@@ -763,7 +764,7 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F,
       // find edges that make a chain on VL if !VL.IsNull 
       // otherwise on VF.
       
-      Standard_Integer ind;
+      Standard_Integer ind = 0;
       if (!VL.IsNull()) {
         ind = myMapVE.FindIndex(VL);
       }
@@ -999,8 +1000,8 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
   }
   BRepCheck_ListOfStatus& aStatusList = *aHList;
 
-  Standard_Integer i,j,Nbedges;
-  Standard_Real first1,last1,first2,last2, tolint;
+  Standard_Integer i = 0,j = 0,Nbedges = 0;
+  Standard_Real first1 = NAN,last1 = NAN,first2 = NAN,last2 = NAN, tolint = NAN;
   gp_Pnt2d pfirst1,plast1,pfirst2,plast2;
   gp_Pnt P3d, P3d2;
   Handle(BRepAdaptor_Surface) HS;
@@ -1089,7 +1090,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
           //-- If the point of intersection is within the tolearnce of a vertex
           //-- this intersection is considered correct (no error)
           Standard_Boolean localok = Standard_False;
-          Standard_Real f,l;
+          Standard_Real f = NAN,l = NAN;
           TopLoc_Location L;
           const Handle(Geom_Curve) ConS = BRep_Tool::Curve(E1,L,f,l);
           if(!ConS.IsNull()) {
@@ -1108,7 +1109,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
               localok==Standard_False && ExplVtx.More();
               ExplVtx.Next()) {
             gp_Pnt p3dvtt;
-            Standard_Real tolvtt, p3dvttDistanceP3d;
+            Standard_Real tolvtt = NAN, p3dvttDistanceP3d = NAN;
             //
             const TopoDS_Vertex& vtt = TopoDS::Vertex(ExplVtx.Current());
             p3dvtt = BRep_Tool::Pnt(vtt);
@@ -1187,8 +1188,8 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
       Inter.Perform(C1,myDomain1,C2,tabDom[j-1],tolint,tolint);
       //
       if(Inter.IsDone()) { 
-       Standard_Integer nbp, nbs;
-       Standard_Real IP_ParamOnFirst, IP_ParamOnSecond;
+       Standard_Integer nbp = 0, nbs = 0;
+       Standard_Real IP_ParamOnFirst = NAN, IP_ParamOnSecond = NAN;
        IntRes2d_Transition Tr1,Tr2;
        TopTools_ListOfShape CommonVertices;
        TopTools_ListIteratorOfListOfShape itl;
@@ -1225,7 +1226,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
            //-- If the point of intersection is within the tolerance of a vertex
            //-- this intersection is considered correct (no error)
            Standard_Boolean localok = Standard_False;  
-           Standard_Real f1,l1, f2, l2;
+           Standard_Real f1 = NAN,l1 = NAN, f2 = NAN, l2 = NAN;
            TopLoc_Location L, L2;
            //
            const Handle(Geom_Curve) ConS = BRep_Tool::Curve(E1,L,f1,l1);    
@@ -1258,7 +1259,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
            //  Modified by Sergey KHROMOV - Mon Apr 15 12:34:22 2002 End
            itl.Initialize( CommonVertices );
            for (; itl.More(); itl.Next()) {
-             Standard_Real p3dvttDistanceP3d, p3dvttDistanceP3d2;
+             Standard_Real p3dvttDistanceP3d = NAN, p3dvttDistanceP3d2 = NAN;
              gp_Pnt p3dvtt;
              //
              const TopoDS_Vertex& vtt = TopoDS::Vertex(itl.Value());
@@ -1286,7 +1287,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
              std::cout << "\n--- BRepCheck Wire: AutoIntersection Phase1 -> Erreur \n" <<std::endl;
              
 #endif
-             Standard_Real distauvtxleplusproche,VParaOnEdge1,VParaOnEdge2;
+             Standard_Real distauvtxleplusproche = NAN,VParaOnEdge1 = NAN,VParaOnEdge2 = NAN;
              gp_Pnt VertexLePlusProche;
              //
              VParaOnEdge1 =0.;
@@ -1295,7 +1296,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
              //Find the nearest common vertex
              itl.Initialize( CommonVertices );
              for (; itl.More(); itl.Next())   {
-               Standard_Real disptvtx;
+               Standard_Real disptvtx = NAN;
                gp_Pnt p3dvtt;
                //
                const TopoDS_Vertex& vtt = TopoDS::Vertex(itl.Value());
@@ -1333,7 +1334,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
                Standard_Real du1 = 0.1*(IP_ParamOnFirst -VParaOnEdge1);
                Standard_Real du2 = 0.1*(IP_ParamOnSecond-VParaOnEdge2);
                Standard_Real maxd1 = 0., maxd2 = 0.;
-               Standard_Integer k;
+               Standard_Integer k = 0;
                
                localok = Standard_True;
                Standard_Real tole1 = BRep_Tool::Tolerance(E1);
@@ -1427,8 +1428,8 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
        for (Standard_Integer s = 1; s <= nbs; ++s) {
          const IntRes2d_IntersectionSegment& Seg = Inter.Segment(s);
          if (Seg.HasFirstPoint() && Seg.HasLastPoint())   { 
-           Standard_Boolean localok;
-           Standard_Integer k;
+           Standard_Boolean localok = 0;
+           Standard_Integer k = 0;
            IntRes2d_IntersectionPoint PSeg [2];
            IntRes2d_Position aPCR1, aPCR2;
            //
@@ -1452,8 +1453,8 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
                aCT2=C2.GetType();
                if (aCT1==GeomAbs_Line && aCT2==GeomAbs_Line) {
                  // check for the two lines coincidence
-                 Standard_Real aPAR_T, aT11, aT12, aT21, aT22, aT1m, aT2m;
-                 Standard_Real aD2, aTolE1, aTolE2,  aTol2;
+                 Standard_Real aPAR_T = NAN, aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN, aT1m = NAN, aT2m = NAN;
+                 Standard_Real aD2 = NAN, aTolE1 = NAN, aTolE2 = NAN,  aTol2 = NAN;
                  gp_Lin2d aL1, aL2;
                  gp_Pnt2d aP1m;
                  //
@@ -1494,7 +1495,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
                break;
              }
              //
-             Standard_Real f,l, tolvtt;
+             Standard_Real f = NAN,l = NAN, tolvtt = NAN;
              TopLoc_Location L, L2;
              const Handle(Geom_Curve)& ConS = BRep_Tool::Curve(E1,L,f,l);    
              const Handle(Geom_Curve)& ConS2 = BRep_Tool::Curve(E2,L2,f,l);    
@@ -1516,7 +1517,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
              //  Modified by Sergey KHROMOV - Mon Apr 15 12:34:22 2002 End
              itl.Initialize( CommonVertices );
              for (; itl.More(); itl.Next()) {
-               Standard_Real p3dvttDistanceP3d, p3dvttDistanceP3d2;
+               Standard_Real p3dvttDistanceP3d = NAN, p3dvttDistanceP3d2 = NAN;
                gp_Pnt p3dvtt;
                //
                const TopoDS_Vertex& vtt = TopoDS::Vertex(itl.Value());
@@ -1688,7 +1689,7 @@ void ChoixUV(const TopoDS_Vertex& theVertex,
   TopoDS_Edge anEFound;
   gp_Pnt2d aPntRef, aPnt;
   gp_Vec2d aDerRef, aDer;
-  Standard_Real aMinAngle, aMaxAngle, anAngle;
+  Standard_Real aMinAngle = NAN, aMaxAngle = NAN, anAngle = NAN;
   Standard_Real a_gpResolution=gp::Resolution();
   TopAbs_Orientation aVOrientation, anEdgOrientation;
   Standard_Real aParam = 0.0, aFirstParam = 0.0, aLastParam = 0.0, aParPiv = 0.0;
@@ -1826,7 +1827,7 @@ void CurveDirForParameter(const Geom2dAdaptor_Curve& aC2d,
                           gp_Vec2d& aVec2d)
 {
   Standard_Real aTol=gp::Resolution();
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   aC2d.D1(aPrm, Pnt, aVec2d);
   //
@@ -1855,9 +1856,9 @@ static Standard_Boolean GetPnt2d(const TopoDS_Vertex    &theVertex,
                                       gp_Pnt2d         &aPnt)
 {
   Handle(Geom2d_Curve) aPCurve;
-  Standard_Real        aFPar;
-  Standard_Real        aLPar;
-  Standard_Real        aParOnEdge;
+  Standard_Real        aFPar = NAN;
+  Standard_Real        aLPar = NAN;
+  Standard_Real        aParOnEdge = NAN;
   TopoDS_Vertex        aFirstVtx;
   TopoDS_Vertex        aLastVtx;
 
@@ -1937,7 +1938,7 @@ static Standard_Boolean IsClosed2dForPeriodicFace
       if (IsOriented(aVtx) && aVtx.IsSame(theVertex)) {
        gp_Pnt2d         aPnt1;
        gp_Pnt2d         aPnt2;
-       Standard_Real    a2dTol;
+       Standard_Real    a2dTol = NAN;
 
        if (!GetPnt2d(theVertex, aSeamEdge, theFace, aPnt1))
          continue;
index b3736626f2353f07fb4c2447134eb58208bb6f61..87c5a2d12fcadf29e18e19c44d26d5ad7fc2f18d 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepClass_FaceClassifier.hxx>
 
 #include <BRepAdaptor_Surface.hxx>
@@ -97,8 +99,8 @@ void  BRepClass_FaceClassifier::Perform(const TopoDS_Face& theF,
           const Standard_Boolean theUseBndBox,
           const Standard_Real theGapCheckTol)
 {
-  Standard_Integer aNbExt, aIndice, i
-  Standard_Real aU1, aU2, aV1, aV2, aMaxDist, aD;
+  Standard_Integer aNbExt = 0, aIndice = 0, i = 0
+  Standard_Real aU1 = NAN, aU2 = NAN, aV1 = NAN, aV2 = NAN, aMaxDist = NAN, aD = NAN;
   gp_Pnt2d aPuv;
   Extrema_ExtPS aExtrema;
   //
index 88ad99afb83b7cde1922b9483bec426cf4a9d058..515259759d5f1d4f14fac1099f63bd52827206aa 100644 (file)
@@ -17,6 +17,8 @@
 //  Modified by skv - Thu Jul 13 17:42:58 2006 OCC12627
 //  Total rewriting of the method Segment; add the method OtherSegment.
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepClass_Edge.hxx>
 #include <BRepClass_FaceExplorer.hxx>
@@ -143,13 +145,13 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
                                                      Standard_Real& Par)
 {
   TopExp_Explorer      anExpF(myFace, TopAbs_EDGE);
-  Standard_Integer     i;
-  Standard_Real        aFPar;
-  Standard_Real        aLPar;
+  Standard_Integer     i = 0;
+  Standard_Real        aFPar = NAN;
+  Standard_Real        aLPar = NAN;
   Handle(Geom2d_Curve) aC2d;
   Standard_Real        aTolParConf2 = Precision::PConfusion() * Precision::PConfusion();
   gp_Pnt2d             aPOnC;
-  Standard_Real        aParamIn;
+  Standard_Real        aParamIn = NAN;
 
   for (i = 1; anExpF.More(); anExpF.Next(), i++) {
     if (i != myCurEdgeInd)
index b0665864e119c5bfb30ca390a177e5be19f651c7..13bfa28df01eae11d3e40d87737d7409b0cececb 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box2d.hxx>
 #include <BndLib_Add2dCurve.hxx>
 #include <BRep_Tool.hxx>
@@ -103,7 +105,7 @@ Standard_Real MaxTol2DCurEdge(const TopoDS_Vertex& theV1,
                               const TopoDS_Face& theF,
                               const Standard_Real theTol)
 {
-  Standard_Real aTolV3D1, aTolV3D2;
+  Standard_Real aTolV3D1 = NAN, aTolV3D2 = NAN;
   if (theV1.IsNull())
   {
     aTolV3D1 = 0.0;
@@ -120,7 +122,7 @@ Standard_Real MaxTol2DCurEdge(const TopoDS_Vertex& theV1,
   {
     aTolV3D2 = BRep_Tool::Tolerance(theV2);
   }
-  Standard_Real aTol2D, anUr, aVr;
+  Standard_Real aTol2D = NAN, anUr = NAN, aVr = NAN;
  
   Standard_Real aTolV3D = Max(aTolV3D1, aTolV3D2);
   BRepAdaptor_Surface aS(theF, Standard_False);
@@ -248,8 +250,7 @@ void CheckSkip(Geom2dInt_GInter& theInter,
   {
     return;
   }
-  const TopoDS_Edge anEl = theE.NextEdge(); // the next edge
-  if (!(BRep_Tool::Tolerance(aVl) > theMaxTol) || theE.NextEdge().IsNull())
+   if (!(BRep_Tool::Tolerance(aVl) > theMaxTol) || theE.NextEdge().IsNull())
   {
     return;
   }
@@ -261,8 +262,8 @@ void CheckSkip(Geom2dInt_GInter& theInter,
   {
     return;
   }
-  Standard_Real anA, aB, aC; // coefficients of the straight line
-  Standard_Real aX1, anY1, aX2, anY2; // coordinates of the ends of edges
+  Standard_Real anA = NAN, aB = NAN, aC = NAN; // coefficients of the straight line
+  Standard_Real aX1 = NAN, anY1 = NAN, aX2 = NAN, anY2 = NAN; // coordinates of the ends of edges
   gp_Pnt2d aP1, aP2; // the ends of edges
 
   theL.Coefficients(anA, aB, aC);
@@ -466,7 +467,7 @@ void  BRepClass_Intersector::LocalGeometry(const BRepClass_Edge& E,
                                            gp_Dir2d& Norm, 
                                            Standard_Real& C) const 
 {
-  Standard_Real fpar, lpar;
+  Standard_Real fpar = NAN, lpar = NAN;
   Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(E.Edge(), E.Face(), fpar, lpar);
   Geom2dLProp_CLProps2d Prop(aPCurve, U, 2, Precision::PConfusion());
 
@@ -501,7 +502,7 @@ void RefineTolerance(const TopoDS_Face& aF,
   //
   aTypeS=aBAS.GetType();
   if (aTypeS==GeomAbs_Cylinder) {
-    Standard_Real aURes, aVRes, aTolX;
+    Standard_Real aURes = NAN, aVRes = NAN, aTolX = NAN;
     gp_Pnt2d aP2D;
     gp_Vec2d aV2D;
     //
index 4385164b1ea71624749553cd21825b3d65759f50..e62e5f91393aac155f952cbea816cf1536c41976 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepClass3d.hxx>
 
 #include <BRep_Builder.hxx>
@@ -33,8 +35,8 @@ static
 //=======================================================================
 TopoDS_Shell BRepClass3d::OuterShell(const TopoDS_Solid& aSolid)
 {
-  Standard_Boolean bFound;
-  Standard_Real aTol;
+  Standard_Boolean bFound = 0;
+  Standard_Real aTol = NAN;
   TopoDS_Solid aSDx;
   TopoDS_Shell aShell, aDummy;
   TopoDS_Iterator aIt;
@@ -98,7 +100,7 @@ TopoDS_Shell BRepClass3d::OuterShell(const TopoDS_Solid& aSolid)
 //=======================================================================
 Standard_Boolean IsInternal(const TopoDS_Shell& aSx)
 {
-  Standard_Boolean bInternal;
+  Standard_Boolean bInternal = 0;
   TopAbs_Orientation aOr;
   TopoDS_Iterator aIt; 
   //
index eb01f8f22f82c7ff5f87795d91e3d6f4c4d7c2aa..3821c293b50ffb382c1d7570fe3d39c18111b2af 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepClass3d_BndBoxTree.hxx>
 
 #include <TopoDS.hxx>
@@ -37,7 +39,7 @@ Standard_Boolean BRepClass3d_BndBoxTreeSelectorPoint::Accept (const Standard_Int
     const TopoDS_Edge& E = TopoDS::Edge(shp);
     Standard_Real EdgeTSq  = BRep_Tool::Tolerance(E);
     EdgeTSq *= EdgeTSq;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     BRepAdaptor_Curve C(E);
     BRep_Tool::Range(E,f,l);
 
@@ -85,7 +87,7 @@ Standard_Boolean BRepClass3d_BndBoxTreeSelectorLine::Accept (const Standard_Inte
     const TopoDS_Edge& E = TopoDS::Edge(shp);
     Standard_Real EdgeTSq = BRep_Tool::Tolerance(E);
     EdgeTSq *= EdgeTSq;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     BRepAdaptor_Curve C(E);
     BRep_Tool::Range(E, f, l);
 
@@ -133,7 +135,7 @@ Standard_Boolean BRepClass3d_BndBoxTreeSelectorLine::Accept (const Standard_Inte
       if (ExtPL.SquareDistance(1) < VertTSq)
       {
         Extrema_POnCurv PP;
-        Standard_Real paramL;
+        Standard_Real paramL = NAN;
         PP = ExtPL.Point(1);
         paramL = PP.Parameter();
         VertParam VP;
index 1cbf729b2308460576d9c030248dfc83f371d009..094d4821ad2986e41ff14dcb080a202e5fff0ff3 100644 (file)
@@ -16,6 +16,8 @@
 
 //  Modified by skv - Thu Sep  4 11:22:05 2003 OCC578
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepClass3d_Intersector3d.hxx>
 #include <BRepClass3d_SClassifier.hxx>
@@ -46,7 +48,7 @@ static
 
 //gets transition of line <L> passing through/near the edge <e> of faces <f1>, <f2>. <param> is
 // a parameter on the edge where the minimum distance between <l> and <e> was found
-static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge e,
+static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge& e,
                      Standard_Real param, const gp_Lin& L, IntCurveSurface_TransitionOnCurve& trans);
 
 static Standard_Boolean GetNormalOnFaceBound(const TopoDS_Edge& E, const TopoDS_Face& F, Standard_Real param, gp_Dir& OutDir);
@@ -103,8 +105,8 @@ void BRepClass3d_SClassifier::PerformInfinitePoint(BRepClass3d_SolidExplorer& aS
   //
   //------------------------------------------------------------
   // 1
-  Standard_Boolean bFound;
-  Standard_Real aParam, aU = 0., aV = 0.;
+  Standard_Boolean bFound = 0;
+  Standard_Real aParam = NAN, aU = 0., aV = 0.;
   gp_Pnt aPoint;
   gp_Dir aDN;
 
@@ -225,14 +227,14 @@ void BRepClass3d_SClassifier::Perform(BRepClass3d_SolidExplorer& SolidExplorer,
   myState = 0;
 
   gp_Lin L;
-  Standard_Real Par;
+  Standard_Real Par = NAN;
 
   // We compute the intersection between the line built in the Solid Explorer and the shape.
   //-- --------------------------------------------------------------------------------
   // Calculate intersection with the face closest to the direction of bounding boxes 
   // by priority so that to have the smallest possible parmin.
   // Optimization to produce as much as possible rejections with other faces.
-  Standard_Integer iFlag;
+  Standard_Integer iFlag = 0;
 
   // If found line passes through a bound of any face, it means that the line
   // is not found properly and it is necessary to repeat whole procedure.
@@ -359,7 +361,7 @@ void BRepClass3d_SClassifier::Perform(BRepClass3d_SolidExplorer& SolidExplorer,
               // The box must be finite in order to correctly prolong the segment to its bounds.
               if (!aBoxF.IsVoid() && !aBoxF.IsWhole())
               {
-                Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+                Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN;
                 aBoxF.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
 
                 Standard_Real boxaddW = GetAddToParam(L, Par, aBoxF);
@@ -380,7 +382,7 @@ void BRepClass3d_SClassifier::Perform(BRepClass3d_SolidExplorer& SolidExplorer,
                     Extrema_ExtPS aProj(P, aBAS, Precision::PConfusion(), Precision::PConfusion());
                     if (aProj.IsDone() && aProj.NbExt() > 0)
                     {
-                      Standard_Integer i, indmin = 0;
+                      Standard_Integer i = 0, indmin = 0;
                       Standard_Real d = RealLast();
                       for (i = 1; i <= aProj.NbExt(); ++i)
                       {
@@ -395,7 +397,7 @@ void BRepClass3d_SClassifier::Perform(BRepClass3d_SolidExplorer& SolidExplorer,
                         if (d <= Tol * Tol)
                         {
                           const Extrema_POnSurf& aPonS = aProj.Point(indmin);
-                          Standard_Real anU, anV;
+                          Standard_Real anU = NAN, anV = NAN;
                           aPonS.Parameter(anU, anV);
                           gp_Pnt2d aP2d(anU, anV);
                           TopAbs_State aSt = Intersector3d.ClassifyUVPoint(aP2d);
@@ -527,7 +529,7 @@ Standard_Real GetAddToParam(const gp_Lin&       L,
                             const Standard_Real P,
                             const Bnd_Box&      B)
 {
-  Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+  Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN;
   B.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
   Standard_Real x[2] = {aXmin,aXmax}, y[2] = {aYmin,aYmax}, z[2] = {aZmin,aZmax};
   Standard_Integer i = 0, j = 0, k = 0;
@@ -607,7 +609,7 @@ static Standard_Boolean GetNormalOnFaceBound(const TopoDS_Edge& E,
 //=======================================================================
 static Standard_Integer GetTransi(const TopoDS_Face& f1,
                                   const TopoDS_Face& f2,
-                                  const TopoDS_Edge e,
+                                  const TopoDS_Edge& e,
                                   const Standard_Real param,
                                   const gp_Lin& L,
                                   IntCurveSurface_TransitionOnCurve& trans)
index 9e33ed99cf47d2243c3c3e0cda68e7877e51afeb..a1639b4a6ba2b717297c8c7a73274497c6940532 100644 (file)
@@ -116,11 +116,11 @@ BRepClass3d_SolidClassifier::BRepClass3d_SolidClassifier(const TopoDS_Shape& S)
 BRepClass3d_SolidClassifier::BRepClass3d_SolidClassifier(const TopoDS_Shape& S,
                                                         const gp_Pnt&       P,
                                                         const Standard_Real Tol) 
-: explorer(S) { 
+: aSolidLoaded(Standard_True), explorer(S) { 
 #if LBRCOMPT
   STAT.NbConstrShapePnt++;
 #endif
-  aSolidLoaded = Standard_True;
+  
 #if MARCHEPASSIUNESEULEFACE  
   PerformInfinitePoint(1e-7);
   if(State()==TopAbs_OUT) { 
index 420c14182efa5b8627e700feb09eb35051101dc3..1aad9e76791f690dce7342e1ab87b7a01fbebfae 100644 (file)
@@ -77,7 +77,7 @@ private:
 
   Standard_Boolean aSolidLoaded;
   BRepClass3d_SolidExplorer explorer;
-  Standard_Boolean isaholeinspace;
+  Standard_Boolean isaholeinspace{};
 
 
 };
index 43b657b3365d94db288a266a94f22871cd98d319..8ceddaee8527b5b22a101953c7f9290f3a043ab3 100644 (file)
@@ -49,6 +49,7 @@
 #include <TopoDS_Shell.hxx>
 #include <TopExp.hxx>
 
+#include <math.h>
 #include <stdio.h>
 //OCC454(apo)->
 //<-OCC454(apo)
@@ -63,7 +64,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::FindAPointInTheFace
  gp_Pnt& APoint_,
  Standard_Real& param_)
 {
-  Standard_Real u,v;
+  Standard_Real u = NAN,v = NAN;
   Standard_Boolean r = FindAPointInTheFace(_face,APoint_,u,v,param_);
   return r;
 }
@@ -259,8 +260,8 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
  gp_Vec& theVecD1U,
  gp_Vec& theVecD1V) const
 {
-  Standard_Real u,du = (U2-U1)/6.0;
-  Standard_Real v,dv = (V2-V1)/6.0;
+  Standard_Real u = NAN,du = (U2-U1)/6.0;
+  Standard_Real v = NAN,dv = (V2-V1)/6.0;
   if(du<1e-12) du=1e-12;
   if(dv<1e-12) dv=1e-12;
   Standard_Boolean IsNotUper = !surf->IsUPeriodic(), IsNotVper = !surf->IsVPeriodic();
@@ -450,8 +451,8 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P,
   gp_Vec aVecD1U, aVecD1V;
   Standard_Real maxscal=0;
   Standard_Boolean ptfound=Standard_False;
-  Standard_Real Par;
-  Standard_Real _u,_v;
+  Standard_Real Par = NAN;
+  Standard_Real _u = NAN,_v = NAN;
   Standard_Integer IndexPoint=0;
   Standard_Integer NbPointsOK=0;
   Standard_Integer NbFacesInSolid=0;
@@ -492,7 +493,7 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P,
         }
       }
       surf->Initialize(face, aRestr);
-      Standard_Real U1,V1,U2,V2;
+      Standard_Real U1 = NAN,V1 = NAN,U2 = NAN,V2 = NAN;
       U1 = surf->FirstUParameter();
       V1 = surf->FirstVParameter();
       U2 = surf->LastUParameter();
@@ -519,8 +520,8 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P,
       Extrema_ExtPS Ext(P, GA, TolU, TolV);
       //
       if (Ext.IsDone() && Ext.NbExt() > 0) {
-        Standard_Integer i, iNear,  iEnd;
-        Standard_Real  aUx, aVx, Dist2, Dist2Min;
+        Standard_Integer i = 0, iNear = 0,  iEnd = 0;
+        Standard_Real  aUx = NAN, aVx = NAN, Dist2 = NAN, Dist2Min = NAN;
         Extrema_POnSurf aPx;
         //
         iNear = 1;
@@ -546,8 +547,8 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P,
           } 
           else {
             BRepClass_FaceClassifier classifier2d;
-            Standard_Real            aU;
-            Standard_Real            aV;
+            Standard_Real            aU = NAN;
+            Standard_Real            aV = NAN;
 
             (Ext.Point(iNear)).Parameter(aU, aV);
 
@@ -708,7 +709,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
   Face.Orientation(TopAbs_FORWARD);
   Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface();
   surf->Initialize(Face);
-  Standard_Real U1,V1,U2,V2;//,u,v;
+  Standard_Real U1 = NAN,V1 = NAN,U2 = NAN,V2 = NAN;//,u,v;
   U1 = surf->FirstUParameter();
   V1 = surf->FirstVParameter();
   U2 = surf->LastUParameter();
@@ -740,7 +741,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::FindAPointInTheFace
 Standard_Boolean BRepClass3d_SolidExplorer::FindAPointInTheFace
 (const TopoDS_Face& _face,
  gp_Pnt& APoint_) 
-{ Standard_Real u,v;
+{ Standard_Real u = NAN,v = NAN;
   Standard_Boolean r = FindAPointInTheFace(_face,APoint_,u,v);
   return r;
 }
@@ -887,7 +888,7 @@ void BRepClass3d_SolidExplorer::InitShape(const TopoDS_Shape& S)
   // Fill mapEV with vertices and edges from shape
   NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller (myTree);
   //
-  Standard_Integer i, aNbEV = myMapEV.Extent();
+  Standard_Integer i = 0, aNbEV = myMapEV.Extent();
   for (i = 1; i <= aNbEV; ++i) {
     const TopoDS_Shape& aS = myMapEV(i);
     //
@@ -1023,7 +1024,7 @@ Standard_Integer  BRepClass3d_SolidExplorer::Segment(const gp_Pnt& P,
                                                      gp_Lin& L, 
                                                      Standard_Real& Par)  
 {
-  Standard_Integer bRetFlag;
+  Standard_Integer bRetFlag = 0;
   myFirstFace = 0;
   bRetFlag=OtherSegment(P,L,Par);
   return bRetFlag;
index 8daba7883e7507c5178476575c3b6dffd29d05f9..8e9a16efd85bac9d54f3aad8cd2db3473b54c650 100644 (file)
@@ -157,9 +157,9 @@ private:
 
   Bnd_Box myBox;
   TopoDS_Shape myShape;
-  Standard_Boolean myReject;
-  Standard_Integer myFirstFace;
-  Standard_Real myParamOnEdge;
+  Standard_Boolean myReject{};
+  Standard_Integer myFirstFace{};
+  Standard_Real myParamOnEdge{};
   TopExp_Explorer myShellExplorer;
   TopExp_Explorer myFaceExplorer;
   BRepClass3d_MapOfInter myMapOfInter;
index fdf1594598e8aea8afe9bec9b016592e1264d036..79e9b4dad0a343ab6abae6a14f569d03e66d6bb4 100644 (file)
@@ -16,6 +16,8 @@
 
 // Modified: Mps(10-04-97) portage WNT
 
+#include <math.h>
+
 #include <BRepExtrema_DistShapeShape.hxx>
 
 #include <Standard_OStream.hxx>
@@ -65,8 +67,8 @@ namespace
     }
   }
 
-  inline Standard_Real DistanceInitiale(const TopoDS_Vertex V1,
-                                        const TopoDS_Vertex V2)
+  inline Standard_Real DistanceInitiale(const TopoDS_Vertex& V1,
+                                        const TopoDS_Vertex& V2)
   {
     return (BRep_Tool::Pnt(V1).Distance(BRep_Tool::Pnt(V2)));
   }
@@ -1117,8 +1119,8 @@ void BRepExtrema_DistShapeShape::ParOnFaceS2(const Standard_Integer N,  Standard
 
 void BRepExtrema_DistShapeShape::Dump(Standard_OStream& o) const 
 {
-  Standard_Integer i;
-  Standard_Real r1,r2;
+  Standard_Integer i = 0;
+  Standard_Real r1 = NAN,r2 = NAN;
   
   o<< "the distance  value is :  " << Value()<<std::endl;
   o<< "the number of solutions is :"<<NbSolution()<<std::endl;
index c287d05ba336dee9258904fb175c97a1fabbef16..e8e014bee1ccd222d675c2cfad15e50e65c61bb1 100644 (file)
@@ -16,6 +16,8 @@
 
 // Modified: Sergey ZERCHANINOV
 
+#include <math.h>
+
 #include <BRepExtrema_DistanceSS.hxx>
 
 #include <TopExp.hxx>
@@ -104,7 +106,7 @@ static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, Topo
     return;
 
   aResEdge = S2;
-  Standard_Real aFirst1, aLast1, aFirst2, aLast2;
+  Standard_Real aFirst1 = NAN, aLast1 = NAN, aFirst2 = NAN, aLast2 = NAN;
   Handle(Geom_Curve) pCurv1 = BRep_Tool::Curve(S1, aFirst1, aLast1);
   Handle(Geom_Curve) pCurv2 = BRep_Tool::Curve(S2, aFirst2, aLast2);
 
@@ -115,7 +117,7 @@ static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, Topo
     return;
 
   Standard_Real Umin = 0., Umax = 0.;
-  Standard_Boolean bUmin, bUmax;
+  Standard_Boolean bUmin = 0, bUmax = 0;
   bUmin = bUmax = Standard_False;
 
   Handle(Geom_Curve) pCurv;
@@ -156,7 +158,7 @@ static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, Topo
       BRepBndLib::Add(S2, aEdgeBox);
     if (bIsTrim2)
       BRepBndLib::Add(S1, aEdgeBox);
-    Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
+    Standard_Real Xmin = NAN, Ymin = NAN, Zmin = NAN, Xmax = NAN, Ymax = NAN, Zmax = NAN;
     aEdgeBox.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
 
     const gp_Pnt aPnt0(Xmin, Ymin, Zmin);
@@ -252,9 +254,9 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2,
 
   const Standard_Boolean bRestrict = BRep_Tool::NaturalRestriction(aF);
 
-  Standard_Real U1, V1, U2, V2;
+  Standard_Real U1 = NAN, V1 = NAN, U2 = NAN, V2 = NAN;
   Standard_Real Umin = RealLast(), Umax = RealFirst(), Vmin = RealLast(), Vmax = RealFirst();
-  Standard_Boolean bUmin, bUmax, bVmin, bVmax;
+  Standard_Boolean bUmin = 0, bUmax = 0, bVmin = 0, bVmax = 0;
   bUmin = bUmax = bVmin = bVmax = Standard_False;
   Standard_Boolean bIsTrim = Standard_False;
 
@@ -311,7 +313,7 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2,
     if (aEdgeBox.IsWhole())
       return;
 
-    Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
+    Standard_Real Xmin = NAN, Ymin = NAN, Zmin = NAN, Xmax = NAN, Ymax = NAN, Zmax = NAN;
     aEdgeBox.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
 
     const gp_Pnt aPnt0(Xmin, Ymin, Zmin);
@@ -400,7 +402,7 @@ static void PERFORM_C0(const TopoDS_Edge& S1, const TopoDS_Edge& S2,
   if (BRep_Tool::Degenerated(S1) || BRep_Tool::Degenerated(S2))
     return;
 
-  Standard_Integer iE;
+  Standard_Integer iE = 0;
   for (iE = 0; iE < 2; iE++)
   {
     TopoDS_Edge E, Eother;
@@ -415,10 +417,10 @@ static void PERFORM_C0(const TopoDS_Edge& S1, const TopoDS_Edge& S2,
       Eother = S1;
     }
 
-    Standard_Real aFirst, aLast;
+    Standard_Real aFirst = NAN, aLast = NAN;
     Handle(Geom_Curve) pCurv = BRep_Tool::Curve(E, aFirst, aLast);
 
-    Standard_Real aFOther, aLOther;
+    Standard_Real aFOther = NAN, aLOther = NAN;
     Handle(Geom_Curve) pCurvOther = BRep_Tool::Curve(Eother, aFOther, aLOther);
 
     if (pCurv->Continuity() == GeomAbs_C0)
@@ -436,11 +438,11 @@ static void PERFORM_C0(const TopoDS_Edge& S1, const TopoDS_Edge& S2,
       TColStd_Array1OfReal arrInterOther(1, 1 + nbIntervalsOther);
       aAdaptorCurveOther.Intervals(arrInterOther, GeomAbs_C1);
 
-      Standard_Real Udeb, Ufin;
+      Standard_Real Udeb = NAN, Ufin = NAN;
       BRep_Tool::Range(Eother, Udeb, Ufin);
 
       gp_Pnt P1, Pt;
-      Standard_Integer i, ii;
+      Standard_Integer i = 0, ii = 0;
       BRepClass_FaceClassifier classifier;
       for (i = 1; i <= arrInter.Length(); i++)
       {
@@ -612,7 +614,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& theS1, const TopoDS_Sha
         {
           TopoDS_Face aF2 = TopoDS::Face (theS2);
           TopoDS_Face aTrimFace;
-          Standard_Boolean bIsInfinit;
+          Standard_Boolean bIsInfinit = 0;
           TRIM_INFINIT_FACE (aE1, aF2, aTrimFace, bIsInfinit);
           if (bIsInfinit)
             aF2 = aTrimFace;
@@ -639,7 +641,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& theS1, const TopoDS_Sha
         {
           TopoDS_Edge aE2 = TopoDS::Edge (theS2);
           TopoDS_Face aTrimFace;
-          Standard_Boolean bIsInfinit;
+          Standard_Boolean bIsInfinit = 0;
           TRIM_INFINIT_FACE (aF1, aE2, aTrimFace, bIsInfinit);
           if (bIsInfinit)
             aF1 = aTrimFace;
@@ -704,7 +706,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Vertex& theS1,
   if (NbExtrema > 0)
   {
     // Search minimum distance Dstmin
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real Dstmin = Ext.SquareDistance(1);
     for (i = 2; i <= NbExtrema; i++)
     {
@@ -758,7 +760,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& theS1,
   if (NbExtrema > 0)
   {
     // Search minimum distance Dstmin
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real Dstmin = Ext.SquareDistance(1);
     for (i = 2; i <= NbExtrema; i++)
     {
@@ -769,7 +771,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& theS1,
     Dstmin = sqrt(Dstmin);
     if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin - myDstRef) < myEps))
     {
-      Standard_Real U, V;
+      Standard_Real U = NAN, V = NAN;
       gp_Pnt Pt, P1 = BRep_Tool::Pnt(theS1);
       BRepClass_FaceClassifier classifier;
       const Standard_Real tol = BRep_Tool::Tolerance(theS2);
@@ -821,7 +823,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1,
   if (NbExtrema > 0)
   {
     // Search minimum distance Dstmin
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real Dstmin = Ext.SquareDistance(1);
     for (i = 2; i <= NbExtrema; i++)
     {
@@ -910,7 +912,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac
   if (NbExtrema > 0)
   {
     // Search minimum distance Dstmin
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real Dstmin = Ext.SquareDistance(1);
     for (i = 2; i <= NbExtrema; i++)
     {
@@ -921,7 +923,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac
     Dstmin = sqrt(Dstmin);
     if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin - myDstRef) < myEps))
     {
-      Standard_Real U, V;
+      Standard_Real U = NAN, V = NAN;
       const Standard_Real tol = BRep_Tool::Tolerance(theS2);
 
       gp_Pnt Pt1, Pt2;
@@ -959,7 +961,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac
     }
   }
 
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   Handle(Geom_Curve) pCurv = BRep_Tool::Curve(theS1, aFirst, aLast);
   if (pCurv->Continuity() == GeomAbs_C0)
   {
@@ -973,10 +975,10 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac
     aAdaptorCurve.Intervals(arrInter, GeomAbs_C1);
 
     gp_Pnt Pt;
-    Standard_Real U, V;
+    Standard_Real U = NAN, V = NAN;
     const Standard_Real tol = BRep_Tool::Tolerance(theS2);
 
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 1; i <= arrInter.Length(); i++)
     {
       const Standard_Real aParameter = arrInter(i);
@@ -988,7 +990,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac
       if (NbExtremaPF > 0)
       {
         // Search minimum distance Dstmin
-        Standard_Integer ii;
+        Standard_Integer ii = 0;
         Standard_Real Dstmin = ExtPF.SquareDistance(1);
         for (ii = 2; ii <= NbExtremaPF; ii++)
         {
@@ -1051,7 +1053,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Face& theS1,
   if (NbExtrema > 0)
   {
     // Search minimum distance Dstmin
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real Dstmin = Ext.SquareDistance(1);
     for (i = 2; i <= NbExtrema; i++)
     {
@@ -1067,7 +1069,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Face& theS1,
 
       gp_Pnt Pt1, Pt2;
       gp_Pnt2d PUV;
-      Standard_Real U1, V1, U2, V2;
+      Standard_Real U1 = NAN, V1 = NAN, U2 = NAN, V2 = NAN;
       BRepClass_FaceClassifier classifier;
 
       for (i = 1; i <= NbExtrema; i++)
index d4c24eb0e8dc0cd499b24c443fdbb3811b00607f..03d4a89b5294cf4c22004767987ee6b5e25a9ac0 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepExtrema_ExtCC.hxx>
 
 #include <BRep_Tool.hxx>
@@ -41,7 +43,7 @@ void BRepExtrema_ExtCC::Initialize(const TopoDS_Edge& E2)
 {
   if (!BRep_Tool::IsGeometric(E2))
     return;  // protect against non-geometric type (e.g. polygon)
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   BRepAdaptor_Curve Curv(E2);
   myHC = new BRepAdaptor_Curve(Curv);
   Standard_Real Tol = Min(BRep_Tool::Tolerance(E2), Precision::Confusion());
@@ -60,7 +62,7 @@ void BRepExtrema_ExtCC::Perform(const TopoDS_Edge& E1)
 {
   if (!BRep_Tool::IsGeometric(E1))
     return;  // protect against non-geometric type (e.g. polygon)
-  Standard_Real U1, U2;
+  Standard_Real U1 = NAN, U2 = NAN;
   BRepAdaptor_Curve Curv(E1);
   Handle(BRepAdaptor_Curve) HC = new BRepAdaptor_Curve(Curv);
   Standard_Real Tol = Min(BRep_Tool::Tolerance(E1), Precision::Confusion());
index 44e2c2fa3efcfd74e770f6d2a3cfca4fa059b7c9..1006529c063b11835181544c355474dfda8dadac 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepExtrema_ExtCF.hxx>
 
 #include <BRep_Tool.hxx>
@@ -47,7 +49,7 @@ void BRepExtrema_ExtCF::Initialize(const TopoDS_Edge& E, const TopoDS_Face& F)
     return; // protect against non-geometric type (e.g. triangulation)
   BRepAdaptor_Curve aC(E);
   myHS = new BRepAdaptor_Surface(Surf);
-  Standard_Real aTolC, aTolS;
+  Standard_Real aTolC = NAN, aTolS = NAN;
   //
   aTolS = Min(BRep_Tool::Tolerance(F), Precision::Confusion());
   aTolS = Min(Surf.UResolution(aTolS), Surf.VResolution(aTolS));
@@ -57,7 +59,7 @@ void BRepExtrema_ExtCF::Initialize(const TopoDS_Edge& E, const TopoDS_Face& F)
   aTolC = aC.Resolution(aTolC);
   aTolC = Max(aTolC, Precision::PConfusion());
   //
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   BRepTools::UVBounds(F, U1, U2, V1, V2);
   myExtCS.Initialize (*myHS, U1, U2, V1, V2, aTolC, aTolS);
 }
@@ -76,7 +78,7 @@ void BRepExtrema_ExtCF::Perform(const TopoDS_Edge& E, const TopoDS_Face& F2)
   if (myHS.IsNull())
     return; // protect against non-geometric type (e.g. triangulation)
 
-  Standard_Real U1, U2;
+  Standard_Real U1 = NAN, U2 = NAN;
   BRep_Tool::Range(E, U1, U2);
 
   BRepAdaptor_Curve Curv(E);
index 377e3e1e721b7256a3c935c92f02b6161bfd0211..3087b98bb6d8c4aeca4020175e21077cdc6ea31e 100644 (file)
@@ -17,6 +17,8 @@
 // modified by mps (juillet 96 ): on utilise BRepAdaptor a la place de 
 // GeomAdaptor dans Initialize et Perform.
 
+#include <math.h>
+
 #include <BRepExtrema_ExtFF.hxx>
 
 #include <BRep_Tool.hxx>
@@ -52,7 +54,7 @@ void BRepExtrema_ExtFF::Initialize(const TopoDS_Face& F2)
   Standard_Real Tol = Min(BRep_Tool::Tolerance(F2), Precision::Confusion());
   Tol = Min(Surf.UResolution(Tol), Surf.VResolution(Tol));
   Tol = Max(Tol, Precision::PConfusion());
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   BRepTools::UVBounds(F2, U1, U2, V1, V2);
   myExtSS.Initialize (*myHS, U1, U2, V1, V2, Tol);
 }
@@ -76,7 +78,7 @@ void BRepExtrema_ExtFF::Perform(const TopoDS_Face& F1, const TopoDS_Face& F2)
   Standard_Real Tol1 = Min(BRep_Tool::Tolerance(F1), Precision::Confusion());
   Tol1 = Min(Surf1.UResolution(Tol1), Surf1.VResolution(Tol1));
   Tol1 = Max(Tol1, Precision::PConfusion());
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   BRepTools::UVBounds(F1, U1, U2, V1, V2);
   myExtSS.Perform (*HS1, U1, U2, V1, V2, Tol1);
 
@@ -92,7 +94,7 @@ void BRepExtrema_ExtFF::Perform(const TopoDS_Face& F1, const TopoDS_Face& F2)
     const Standard_Real Tol2 = BRep_Tool::Tolerance(F2);
     Extrema_POnSurf P1, P2;
 
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 1; i <= myExtSS.NbExt(); i++)
     {
       myExtSS.Points(i, P1, P2);
index 23b6fb62d7fc52160854d694eb21a92d520a86ae..27f2fdb93317787c23030bbc875207b1325b6774 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepExtrema_ExtPC.hxx>
 
 #include <BRep_Tool.hxx>
@@ -40,7 +42,7 @@ void BRepExtrema_ExtPC::Initialize(const TopoDS_Edge& E)
 {
   if (!BRep_Tool::IsGeometric(E))
     return;  // protect against non-geometric type (e.g. polygon)
-  Standard_Real U1, U2;
+  Standard_Real U1 = NAN, U2 = NAN;
   myHC = new BRepAdaptor_Curve(E);
   Standard_Real Tol = Min(BRep_Tool::Tolerance(E), Precision::Confusion());
   Tol = Max(myHC->Resolution(Tol), Precision::PConfusion());
index 41493900b9e5e41af41213e161ae45614fcb1cc1..8811128b130fc6bce636c44b9bbaddc3850d2168 100644 (file)
@@ -17,6 +17,8 @@
 // modified by MPS (june 96) : on utilise BRepClass_FaceClassifier seulement 
 //  si IsDone de Extrema est vrai  
 
+#include <math.h>
+
 #include <BRepExtrema_ExtPF.hxx>
 
 #include <BRep_Tool.hxx>
@@ -54,10 +56,10 @@ void BRepExtrema_ExtPF::Initialize(const TopoDS_Face& TheFace,
     return;  // protect against non-geometric type (e.g. triangulation)
 
   Standard_Real Tol = Min(BRep_Tool::Tolerance(TheFace), Precision::Confusion());
-  Standard_Real aTolU, aTolV;
+  Standard_Real aTolU = NAN, aTolV = NAN;
   aTolU = Max(mySurf.UResolution(Tol), Precision::PConfusion());
   aTolV = Max(mySurf.VResolution(Tol), Precision::PConfusion()); 
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   BRepTools::UVBounds(TheFace, U1, U2, V1, V2);
   myExtPS.SetFlag(TheFlag);
   myExtPS.SetAlgo(TheAlgo);
@@ -84,7 +86,7 @@ void BRepExtrema_ExtPF::Perform(const TopoDS_Vertex& TheVertex, const TopoDS_Fac
   if (myExtPS.IsDone())
   {
     BRepClass_FaceClassifier classifier;
-    Standard_Real U1, U2;
+    Standard_Real U1 = NAN, U2 = NAN;
     const Standard_Real Tol = BRep_Tool::Tolerance(TheFace);
     for (Standard_Integer i = 1; i <= myExtPS.NbExt(); i++)
     {
index 8dd8252c2f1182244f6118b45bf993b5dba16c32..2e9044afac68ce4cab1e9d21615dc2e03206e988 100644 (file)
@@ -23,9 +23,9 @@
 //=======================================================================
 BRepExtrema_OverlapTool::BRepExtrema_OverlapTool()
 : myFilter (NULL),
-  myTolerance (0.0)
+  myIsDone(Standard_False), myTolerance (0.0)
 {
-  myIsDone = Standard_False;
+  
 }
 
 //=======================================================================
@@ -77,7 +77,7 @@ namespace
     BVH_Vec3d EdgeNormals[3];
 
     //! Is prism initialized?
-    Standard_Boolean IsInited;
+    Standard_Boolean IsInited{};
 
   public:
 
@@ -348,8 +348,8 @@ namespace
     }
     else // triangles are co-planar
     {
-      Standard_Integer anX;
-      Standard_Integer anY;
+      Standard_Integer anX = 0;
+      Standard_Integer anY = 0;
 
       if (fabs (aTrng1Normal[0]) > fabs (aTrng1Normal[1]))
       {
index d2cf6f55c26f4a117ca064ea2719980ccb9d43c1..db92fbdf82db5403c3f0df6dfad4ee378bd4e40b 100644 (file)
@@ -126,7 +126,7 @@ private:
 #endif
 
   //! Is overlap test test completed?
-  Standard_Boolean myIsDone;
+  Standard_Boolean myIsDone{};
 
   Standard_Real myTolerance;
 };
index 63a507290289356e6c691b9e469f4ac32b5a145d..684c9bca8df62a48ca1f9abc44ba4ad678cbfc44 100644 (file)
@@ -62,7 +62,7 @@ Standard_Boolean BRepExtrema_Poly::Distance (const TopoDS_Shape& S1, const TopoD
   }
   if (nbn2 == 0) return Standard_False;
 
-  Standard_Integer i,n;
+  Standard_Integer i = 0,n = 0;
 
   TColgp_Array1OfPnt TP1(1,nbn1);
   nbn1 = 0;
@@ -106,7 +106,7 @@ Standard_Boolean BRepExtrema_Poly::Distance (const TopoDS_Shape& S1, const TopoD
     }
   }
 
-  Standard_Integer i1,i2;
+  Standard_Integer i1 = 0,i2 = 0;
   for (i1 = 1; i1 <= nbn1; i1++)
   {
     const gp_Pnt& PP1 = TP1(i1);
index 5607617f184af00af961c59ae48f5642dd24256c..6ccd66b980d7d23824c678d934ad0f39bb0e878e 100644 (file)
@@ -280,7 +280,7 @@ Standard_Boolean BRepExtrema_ProximityDistTool::IsNodeOnBorder (const Standard_I
 {
   Poly_Connect aPolyConnect (theTr);
 
-  Standard_Integer aContTrg; //index of triangle containing exploring node
+  Standard_Integer aContTrg = 0; //index of triangle containing exploring node
   for (aPolyConnect.Initialize (theNodeIdx); aPolyConnect.More(); aPolyConnect.Next())
   {
     aContTrg = aPolyConnect.Value();
index da6d5de076e363e939c8ffabc53a1b13b00d06ba..c0fbac62fa083902c375448aa52ee7fb90ca2db7 100644 (file)
@@ -209,7 +209,7 @@ private:
   Standard_Integer myNbSamples1; //!< Number of samples points on the first shape
 
   //! Is vertex corresponding to proximity point of 1st shape from additional set
-  Standard_Integer myIsProxVtx1FromAddSet;
+  Standard_Integer myIsProxVtx1FromAddSet{};
   BVH_Array3d myAddVertices1; //!< Additional vertices on the 1st shape
   NCollection_Vector<ProxPnt_Status> myAddStatus1; //!< Status of additional vertices on the 1st shape
 
index 66a2bd1d4f663171cf82bcd780a074579e9af528..01c948709778c70d4dc62e591734680d0bcaca96 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepExtrema_ProximityValueTool.hxx>
 #include <BRepExtrema_ProximityDistTool.hxx>
 
@@ -351,9 +353,9 @@ static void getNodesOfTrg (const Standard_Integer theTriIdx,
                            const Handle (Poly_Triangulation)& theTr,
                            gp_Pnt (&theTrg)[3])
 {
-  Standard_Integer aVtxIdx1;
-  Standard_Integer aVtxIdx2;
-  Standard_Integer aVtxIdx3;
+  Standard_Integer aVtxIdx1 = 0;
+  Standard_Integer aVtxIdx2 = 0;
+  Standard_Integer aVtxIdx3 = 0;
 
   theTr->Triangle (theTriIdx).Get (aVtxIdx1, aVtxIdx2, aVtxIdx3);
 
@@ -575,7 +577,7 @@ NCollection_CellFilter_Action BRepExtrema_VertexInspector::Inspect (const Standa
   myIsNeedAdd = Standard_True;
 
   const gp_XYZ& aPnt = myPoints.Value (theTarget - 1);
-  Standard_Real aDx, aDy, aDz;
+  Standard_Real aDx = NAN, aDy = NAN, aDz = NAN;
   aDx = myCurrent.X() - aPnt.X();
   aDy = myCurrent.Y() - aPnt.Y();
   aDz = myCurrent.Z() - aPnt.Z();
index ca65c281046d9882005c7e097b14e2cff62b2909..706d9fff87e748d53bfb10d1cda16b1c1537845e 100644 (file)
@@ -207,17 +207,17 @@ private:
   NCollection_Vector<ProxPnt_Status> myAddStatus1; //!< Status of additional vertices on the 1st shape.
   NCollection_Vector<ProxPnt_Status> myAddStatus2; //!< Status of additional vertices on the 2nd shape.
 
-  Standard_Boolean myIsInitS1; //!< Is the 1st shape initialized?
-  Standard_Boolean myIsInitS2; //!< Is the 2nd shape initialized?
+  Standard_Boolean myIsInitS1{}; //!< Is the 1st shape initialized?
+  Standard_Boolean myIsInitS2{}; //!< Is the 2nd shape initialized?
 
   Standard_Boolean myIsRefinementRequired1; //!< Flag about the need to refine the 1st shape.
   Standard_Boolean myIsRefinementRequired2; //!< Flag about the need to refine the 2nd shape.
 
-  Standard_Integer myNbNodes1; //!< Number of nodes in triangulation of the 1st shape.
-  Standard_Integer myNbNodes2; //!< Number of nodes in triangulation of the 2nd shape.
+  Standard_Integer myNbNodes1{}; //!< Number of nodes in triangulation of the 1st shape.
+  Standard_Integer myNbNodes2{}; //!< Number of nodes in triangulation of the 2nd shape.
 
-  Standard_Real myStep1; //!< Step for getting vertices on the 1st shape.
-  Standard_Real myStep2; //!< Step for getting vertices on the 2nd shape.
+  Standard_Real myStep1{}; //!< Step for getting vertices on the 1st shape.
+  Standard_Real myStep2{}; //!< Step for getting vertices on the 2nd shape.
 
   BRepExtrema_CellFilter myCells;
   BRepExtrema_VertexInspector myInspector;
index 1f99c205e68a7620bf6e2757aade41312917019e..a124fe28a0c4381ac1c7821605d42f102459819c 100644 (file)
@@ -23,9 +23,9 @@
 //purpose  :
 //=======================================================================
 BRepExtrema_SelfIntersection::BRepExtrema_SelfIntersection (const Standard_Real theTolerance)
-: myTolerance (theTolerance)
+: myTolerance (theTolerance), myIsInit(Standard_False)
 {
-  myIsInit = Standard_False;
+  
 }
 
 //=======================================================================
@@ -148,8 +148,8 @@ BRepExtrema_ElementFilter::FilterResult BRepExtrema_SelfIntersection::isRegularS
   BVH_Vec3d aCrossLine = BVH_Vec3d::Cross (aTrng0Normal,
                                            aTrng1Normal);
 
-  Standard_Integer anX;
-  Standard_Integer anY;
+  Standard_Integer anX = 0;
+  Standard_Integer anY = 0;
 
   if (aCrossLine.SquareModulus() < Precision::SquareConfusion()) // coplanar case
   {
@@ -223,8 +223,8 @@ BRepExtrema_ElementFilter::FilterResult BRepExtrema_SelfIntersection::isRegularS
     return BRepExtrema_ElementFilter::NoCheck;
   }
 
-  Standard_Integer anX;
-  Standard_Integer anY;
+  Standard_Integer anX = 0;
+  Standard_Integer anY = 0;
 
   getProjectionAxes (aTrng0Normal, anX, anY);
 
index efb1b39fd02248a1d2e024eab7ba49afc2c95604..a338151fe3f1fbaa1dc6beaed7505cb4e805c9e1 100644 (file)
@@ -120,7 +120,7 @@ private:
   Standard_Real myTolerance;
 
   //! Is the input shape inited?
-  Standard_Boolean myIsInit;
+  Standard_Boolean myIsInit{};
 
   //! List of triangulated faces of the shape.
   BRepExtrema_ShapeList myFaceList;
index 63f56a941f17cd187fb6919d65eebd4350b2e5b1..dc738112a488dc2e1378d325f3e3525d77043b3b 100644 (file)
@@ -171,9 +171,9 @@ private:
   Standard_Real myTolerance;
 
   //! Is the 1st shape initialized?
-  Standard_Boolean myIsInitS1;
+  Standard_Boolean myIsInitS1{};
   //! Is the 2nd shape initialized?
-  Standard_Boolean myIsInitS2;
+  Standard_Boolean myIsInitS2{};
 
   //! List of subshapes of the 1st shape.
   BRepExtrema_ShapeList myShapeList1;
index e1f843d8095d23e1f3de1d3ddce0d4ac98033fb3..e40d3a47a5a1a3c30662fb5b6bf67920561d3afc 100644 (file)
@@ -273,9 +273,9 @@ Standard_Boolean BRepExtrema_TriangleSet::initFace (const TopoDS_Face& theFace,
 
   for (Standard_Integer aTriIdx = 1; aTriIdx <= aTriangulation->NbTriangles(); ++aTriIdx)
   {
-    Standard_Integer aVertex1;
-    Standard_Integer aVertex2;
-    Standard_Integer aVertex3;
+    Standard_Integer aVertex1 = 0;
+    Standard_Integer aVertex2 = 0;
+    Standard_Integer aVertex3 = 0;
 
     aTriangulation->Triangle (aTriIdx).Get (aVertex1,
                                             aVertex2,
index 43c9d08129c913e1eb83963c53d889dc60582146..4ce90c80451f971b39d1158da0b106d5d94a2a6d 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepGProp.hxx>
 #include <BRepGProp_Cinert.hxx>
 #include <BRepGProp_Sinert.hxx>
@@ -33,7 +35,7 @@ static Standard_Integer AffichEps = 0;
 #endif
 
 static gp_Pnt roughBaryCenter(const TopoDS_Shape& S){
-  Standard_Integer i;  TopExp_Explorer ex;
+  Standard_Integer i = 0;  TopExp_Explorer ex;
   gp_XYZ xyz(0,0,0);
   for (ex.Init(S,TopAbs_VERTEX), i = 0; ex.More(); ex.Next(), i++) 
     xyz += BRep_Tool::Pnt(TopoDS::Vertex(ex.Current())).XYZ();
@@ -113,11 +115,11 @@ void  BRepGProp::LinearProperties(const TopoDS_Shape& S, GProp_GProps& SProps, c
 static Standard_Real surfaceProperties(const TopoDS_Shape& S, GProp_GProps& Props, const Standard_Real Eps, const Standard_Boolean SkipShared,
                                        const Standard_Boolean UseTriangulation)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 #ifdef OCCT_DEBUG
   Standard_Integer iErrorMax = 0;
 #endif
-  Standard_Real ErrorMax = 0.0, Error;
+  Standard_Real ErrorMax = 0.0, Error = NAN;
   TopExp_Explorer ex; 
   gp_Pnt P(roughBaryCenter(S));
   BRepGProp_Sinert G;  G.SetLocation(P);
@@ -216,7 +218,7 @@ Standard_Real BRepGProp::SurfaceProperties(const TopoDS_Shape& S, GProp_GProps&
 static Standard_Real volumeProperties(const TopoDS_Shape& S, GProp_GProps& Props, const Standard_Real Eps, const Standard_Boolean SkipShared,
                                       const Standard_Boolean UseTriangulation)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 #ifdef OCCT_DEBUG
   Standard_Integer iErrorMax = 0;
 #endif
@@ -337,7 +339,7 @@ Standard_Real BRepGProp::VolumeProperties(const TopoDS_Shape& S, GProp_GProps& P
   // find the origin
   gp_Pnt P(0,0,0);  P.Transform(S.Location());
   Props = GProp_GProps(P);
-  Standard_Integer i;
+  Standard_Integer i = 0;
 #ifdef OCCT_DEBUG
   Standard_Integer iErrorMax = 0;
 #endif
@@ -393,7 +395,7 @@ static Standard_Real volumePropertiesGK(const TopoDS_Shape     &theShape,
   BRepGProp_VinertGK aVProps;
   BRepGProp_Face   aPropFace(IsUseSpan);
   BRepGProp_Domain aPropDomain;
-  Standard_Real    aLocalError;
+  Standard_Real    aLocalError = NAN;
   Standard_Real    anError = 0.;
   TopTools_MapOfShape aFwdFMap;
   TopTools_MapOfShape aRvsFMap;
@@ -495,7 +497,7 @@ Standard_Real BRepGProp::VolumePropertiesGK(const TopoDS_Shape     &S,
 
     // Compute the properties for each closed shell.
     Standard_Real aTol    = Eps;
-    Standard_Real aLocalError;
+    Standard_Real aLocalError = NAN;
     TopTools_ListIteratorOfListOfShape anIter(aClosedShells);
 
     for (; anIter.More(); anIter.Next()) {
@@ -540,7 +542,7 @@ static Standard_Real volumePropertiesGK(const TopoDS_Shape     &theShape,
   BRepGProp_VinertGK aVProps;
   BRepGProp_Face   aPropFace(IsUseSpan);
   BRepGProp_Domain aPropDomain;
-  Standard_Real    aLocalError;
+  Standard_Real    aLocalError = NAN;
   Standard_Real    anError = 0.;
   TopTools_MapOfShape aFwdFMap;
   TopTools_MapOfShape aRvsFMap;
@@ -643,7 +645,7 @@ Standard_Real BRepGProp::VolumePropertiesGK(const TopoDS_Shape     &S,
 
     // Compute the properties for each closed shell.
     Standard_Real aTol    = Eps;
-    Standard_Real aLocalError;
+    Standard_Real aLocalError = NAN;
     TopTools_ListIteratorOfListOfShape anIter(aClosedShells);
 
     for (; anIter.More(); anIter.Next()) {
index c9b349e293846c57ab47b7d9a454262fa4c72803..8500e4d0b23bb469d2e49f1f730dabc187720c4a 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRepAdaptor_Curve.hxx>
 #include <BRepGProp_Cinert.hxx>
 #include <BRepGProp_EdgeTool.hxx>
@@ -30,7 +32,7 @@ void BRepGProp_Cinert::SetLocation(const gp_Pnt& CLocation)
 void BRepGProp_Cinert::Perform (const BRepAdaptor_Curve& C)
 {
 
-  Standard_Real Ix, Iy, Iz, Ixx, Iyy, Izz, Ixy, Ixz, Iyz;
+  Standard_Real Ix = NAN, Iy = NAN, Iz = NAN, Ixx = NAN, Iyy = NAN, Izz = NAN, Ixy = NAN, Ixz = NAN, Iyz = NAN;
   dim = Ix = Iy = Iz = Ixx = Iyy = Izz = Ixy = Ixz = Iyz = 0.0;
 
   Standard_Real Lower    = BRepGProp_EdgeTool::FirstParameter  (C);
@@ -40,10 +42,10 @@ void BRepGProp_Cinert::Perform (const BRepAdaptor_Curve& C)
 
   gp_Pnt P;    //value on the curve
   gp_Vec V1;   //first derivative on the curve
-  Standard_Real ds;  //curvilign abscissae
-  Standard_Real ur, um, u;
-  Standard_Real x, y, z
-  Standard_Real xloc, yloc, zloc;
+  Standard_Real ds = NAN;  //curvilign abscissae
+  Standard_Real ur = NAN, um = NAN, u = NAN;
+  Standard_Real x = NAN, y = NAN, z = NAN
+  Standard_Real xloc = NAN, yloc = NAN, zloc = NAN;
 
   math_Vector GaussP (1, Order);
   math_Vector GaussW (1, Order);
@@ -77,13 +79,13 @@ void BRepGProp_Cinert::Perform (const BRepAdaptor_Curve& C)
       Upper = UU2;
     }
 
-    Standard_Real dimLocal, IxLocal, IyLocal, IzLocal, IxxLocal, IyyLocal, IzzLocal, IxyLocal, IxzLocal, IyzLocal;
+    Standard_Real dimLocal = NAN, IxLocal = NAN, IyLocal = NAN, IzLocal = NAN, IxxLocal = NAN, IyyLocal = NAN, IzzLocal = NAN, IxyLocal = NAN, IxzLocal = NAN, IyzLocal = NAN;
     dimLocal = IxLocal = IyLocal = IzLocal = IxxLocal = IyyLocal = IzzLocal = IxyLocal = IxzLocal = IyzLocal = 0.0;
     // modified by NIZHNY-MKK  Thu Jun  9 12:13:32 2005.END
 
     loc.Coord (xloc, yloc, zloc);
 
-    Standard_Integer i;
+    Standard_Integer i = 0;
 
     // Calcul des integrales aux points de gauss :
     um = 0.5 * (Upper + Lower);
index 38892ac8a59e6ac6698862839f9c58138728bca0..ffd6213f7e2d0c66efb1fc98c1d703c42df64856 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box2d.hxx>
 #include <BndLib_Add2dCurve.hxx>
 #include <BRepGProp_Face.hxx>
@@ -41,7 +43,7 @@ static const Standard_Real Epsilon1 = Epsilon(1.);
 //=======================================================================
 Standard_Integer BRepGProp_Face::UIntegrationOrder() const {
 
-  Standard_Integer Nu;
+  Standard_Integer Nu = 0;
   switch (mySurface.GetType())
   {
 
@@ -77,7 +79,7 @@ Standard_Integer BRepGProp_Face::UIntegrationOrder() const {
 
 Standard_Integer BRepGProp_Face::VIntegrationOrder() const
 {
- Standard_Integer Nv;
+ Standard_Integer Nv = 0;
  switch (mySurface.GetType()) {
 
  case GeomAbs_Plane :
@@ -113,7 +115,7 @@ Standard_Integer BRepGProp_Face::VIntegrationOrder() const
 
 Standard_Integer BRepGProp_Face::IntegrationOrder() const 
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
 
   switch (myCurve.GetType()) {
     
@@ -176,7 +178,7 @@ void BRepGProp_Face::Bounds(Standard_Real& U1,
 
 bool BRepGProp_Face::Load(const TopoDS_Edge& E)
 { 
-  Standard_Real a,b;
+  Standard_Real a = NAN,b = NAN;
   Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface(E, mySurface.Face(), a,b);
   if (C.IsNull())
   {
@@ -240,7 +242,7 @@ static inline Standard_Real LCoeff(const Standard_Real Eps){
 
 Standard_Integer BRepGProp_Face::SIntOrder(const Standard_Real Eps) const
 {
-  Standard_Integer Nv, Nu;
+  Standard_Integer Nv = 0, Nu = 0;
   switch (mySurface.GetType()) {
   case GeomAbs_Plane:  
     Nu = 1; Nv = 1; break;
@@ -273,7 +275,7 @@ Standard_Integer BRepGProp_Face::SIntOrder(const Standard_Real Eps) const
 
 Standard_Integer BRepGProp_Face::SUIntSubs() const
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
   switch (mySurface.GetType()) {
   case GeomAbs_Plane:  
     N = 2;  break;
@@ -302,7 +304,7 @@ Standard_Integer BRepGProp_Face::SUIntSubs() const
 
 Standard_Integer BRepGProp_Face::SVIntSubs() const
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
   switch (mySurface.GetType()) {
   case GeomAbs_Plane:  
     N = 2;  break;
@@ -389,7 +391,7 @@ Standard_Integer BRepGProp_Face::LIntOrder(const Standard_Real Eps) const
   Bnd_Box2d aBox;
 
   BndLib_Add2dCurve::Add(myCurve, 1.e-7, aBox);
-  Standard_Real aXmin, aXmax, aYmin, aYmax;
+  Standard_Real aXmin = NAN, aXmax = NAN, aYmin = NAN, aYmax = NAN;
   aBox.Get(aXmin, aYmin, aXmax, aYmax);
   Standard_Real aVmin = mySurface.FirstVParameter();
   Standard_Real aVmax = mySurface.LastVParameter();
@@ -403,7 +405,7 @@ Standard_Integer BRepGProp_Face::LIntOrder(const Standard_Real Eps) const
 
 
 //  Standard_Real NL, NS = Max(SIntOrder(1.0)*anRInt/LIntSubs(), 1);
-  Standard_Real NL, NS = Max(SIntOrder(1.)*anRInt/aLSubs, 1);
+  Standard_Real NL = NAN, NS = Max(SIntOrder(1.)*anRInt/aLSubs, 1);
   switch (myCurve.GetType()) {
   case GeomAbs_Line:  
     NL = 1;  break;
@@ -441,7 +443,7 @@ Standard_Integer BRepGProp_Face::LIntOrder(const Standard_Real Eps) const
 
 Standard_Integer BRepGProp_Face::LIntSubs() const
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
   switch (myCurve.GetType()) {
   case GeomAbs_Line:  
     N = 2;  break;
@@ -496,11 +498,11 @@ void BRepGProp_Face::LKnots(TColStd_Array1OfReal& Knots) const
 void BRepGProp_Face::Load(const Standard_Boolean IsFirstParam,
                          const GeomAbs_IsoType  theIsoType) 
 {
-  Standard_Real aLen;
-  Standard_Real aU1;
-  Standard_Real aU2;
-  Standard_Real aV1;
-  Standard_Real aV2;
+  Standard_Real aLen = NAN;
+  Standard_Real aU1 = NAN;
+  Standard_Real aU2 = NAN;
+  Standard_Real aV1 = NAN;
+  Standard_Real aV2 = NAN;
   gp_Pnt2d      aLoc;
   gp_Dir2d      aDir;
 
@@ -565,7 +567,7 @@ static void GetRealKnots(const Standard_Real                  theMin,
     aStartI = iU;
 
   Standard_Integer aNbNode = Max(0, aEndI - aStartI + 1) + 2;
-  Standard_Integer j;
+  Standard_Integer j = 0;
 
   theRealKnots = new TColStd_HArray1OfReal(1, aNbNode);
   theRealKnots->SetValue(1,       theMin);
@@ -590,7 +592,7 @@ static void GetCurveKnots(const Standard_Real                  theMin,
 
   if (isSBSpline) {
     Handle(Geom2d_BSplineCurve)   aCrv;
-    Standard_Integer              aNbKnots;
+    Standard_Integer              aNbKnots = 0;
     Handle(TColStd_HArray1OfReal) aCrvKnots;
 
     aCrv     = Handle(Geom2d_BSplineCurve)::DownCast(theCurve.Curve());
@@ -632,7 +634,7 @@ void BRepGProp_Face::GetUKnots
   if (myIsUseSpan && (isSBSpline || isCBSpline)) {
     // Using span decomposition for BSpline.
     Handle(TColStd_HArray1OfReal) aKnots;
-    Standard_Integer              aNbKnots;
+    Standard_Integer              aNbKnots = 0;
 
     if (isSBSpline) {
       // Get U knots of BSpline surface.
@@ -682,7 +684,7 @@ void BRepGProp_Face::GetTKnots
   if (myIsUseSpan && isBSpline) {
     // Using span decomposition for BSpline.
     Handle(TColStd_HArray1OfReal) aSurfKnots;
-    Standard_Integer              aNbKnots;
+    Standard_Integer              aNbKnots = 0;
 
     // Get V knots of BSpline surface.
     Handle(Geom_Surface)        aSurf = mySurface.Surface().Surface();
index 800783d8b173c5cdcc5c30e103463aae26c67f67..780c22f2e33d653f3fd5893d5893edb881d914c0 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <math.hxx>
 #include <Standard_Assert.hxx>
 #include <BRepGProp_Face.hxx>
@@ -153,10 +155,10 @@ void BRepGProp_Gauss::Inertia::Reset()
 //purpose  : Constructor
 //=======================================================================
 BRepGProp_Gauss::BRepGProp_Gauss(const BRepGProp_GaussType theType)
-: myType(theType)
+: myType(theType), add(::Add), mult(::Mult)
 {
-  add  = (::Add );
-  mult = (::Mult);
+  
+  
 }
 
 //=======================================================================
@@ -576,7 +578,7 @@ Standard_Real BRepGProp_Gauss::Compute(
   NCollection_Handle<math_Vector> ErrUL = new math_Vector(1, SM, 0.0);
 
   // Face parametrization in U and V direction
-  Standard_Real BV1, BV2, BU1, BU2;
+  Standard_Real BV1 = NAN, BV2 = NAN, BU1 = NAN, BU2 = NAN;
   theSurface.Bounds(BU1, BU2, BV1, BV2);
   checkBounds(BU1, BU2, BV1, BV2);
 
@@ -585,22 +587,22 @@ Standard_Real BRepGProp_Gauss::Compute(
   const TopoDS_Face& aF = theSurface.GetFace(); 
   const Standard_Boolean isNaturalRestriction = (aF.NbChildren () == 0); //theSurface.NaturalRestriction();
 
-  Standard_Real CIx, CIy, CIz, CIxy, CIxz, CIyz;
+  Standard_Real CIx = NAN, CIy = NAN, CIz = NAN, CIxy = NAN, CIxz = NAN, CIyz = NAN;
   Standard_Real CDim[2], CIxx[2], CIyy[2], CIzz[2];
 
   // Boundary curve parametrization
-  Standard_Real u1 = BU1, u2, l1, l2, lm, lr, l, v;
+  Standard_Real u1 = BU1, u2 = NAN, l1 = NAN, l2 = NAN, lm = NAN, lr = NAN, l = NAN, v = NAN;
 
   // On the boundary curve u-v
   gp_Pnt2d Puv;
   gp_Vec2d Vuv;
-  Standard_Real Dul;  // Dul = Du / Dl
+  Standard_Real Dul = NAN;  // Dul = Du / Dl
 
-  Standard_Integer iLS, iLSubEnd, iGL, iGLEnd, NbLGaussP[2], LRange[2], iL, kL, kLEnd, IL, JL;
-  Standard_Integer i, iUSubEnd, NbUGaussP[2], URange[2], kU, kUEnd, IU, JU;
-  Standard_Integer UMaxSubs, LMaxSubs;
+  Standard_Integer iLS = 0, iLSubEnd = 0, iGL = 0, iGLEnd = 0, NbLGaussP[2], LRange[2], iL = 0, kL = 0, kLEnd = 0, IL = 0, JL = 0;
+  Standard_Integer i = 0, iUSubEnd = 0, NbUGaussP[2], URange[2], kU = 0, kUEnd = 0, IU = 0, JU = 0;
+  Standard_Integer UMaxSubs = 0, LMaxSubs = 0;
 
-  Standard_Real ErrorU, ErrorL, ErrorLMax = 0.0, Eps = 0.0, EpsL = 0.0, EpsU = 0.0;
+  Standard_Real ErrorU = NAN, ErrorL = NAN, ErrorLMax = 0.0, Eps = 0.0, EpsL = 0.0, EpsU = 0.0;
   iGLEnd = isErrorCalculation ? 2 : 1;
 
   NbUGaussP[0] = theSurface.SIntOrder(anEpsilon);
@@ -1097,7 +1099,7 @@ void BRepGProp_Gauss::Compute(BRepGProp_Face&   theSurface,
 {
   Standard_ASSERT_RAISE(myType == Sinert, "BRepGProp_Gauss: Incorrect type");
 
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
   theSurface.Bounds (u1, u2, v1, v2);
   checkBounds(u1, u2, v1, v2);
 
@@ -1195,7 +1197,7 @@ void BRepGProp_Gauss::Compute(BRepGProp_Face&         theSurface,
 {
   Standard_ASSERT_RAISE(myType == Vinert, "BRepGProp_Gauss: Incorrect type");
 
-  Standard_Real u1, v1, u2, v2;
+  Standard_Real u1 = NAN, v1 = NAN, u2 = NAN, v2 = NAN;
   theSurface.Bounds (u1, u2, v1, v2);
   checkBounds(u1, u2, v1, v2);
 
@@ -1287,7 +1289,7 @@ void BRepGProp_Gauss::Compute(const BRepGProp_Face&  theSurface,
                               gp_Pnt&                theOutGravityCenter,
                               gp_Mat&                theOutInertia)
 {
-  Standard_Real LowerU, UpperU, LowerV, UpperV;
+  Standard_Real LowerU = NAN, UpperU = NAN, LowerV = NAN, UpperV = NAN;
   theSurface.Bounds(LowerU, UpperU, LowerV, UpperV);
   checkBounds(LowerU, UpperU, LowerV, UpperV);
 
index be7a9dcc757239fd28a51ed22f79f24b5db23641..004330e03d85f015b502c9b59fe8e659640e895c 100644 (file)
@@ -11,6 +11,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRepGProp_MeshCinert.hxx>
 #include <gp_Pnt.hxx>
 #include <math.hxx>
@@ -42,16 +44,16 @@ void BRepGProp_MeshCinert::SetLocation(const gp_Pnt& CLocation)
 void BRepGProp_MeshCinert::Perform(const TColgp_Array1OfPnt& theNodes)
 {
 
-  Standard_Real Ix, Iy, Iz, Ixx, Iyy, Izz, Ixy, Ixz, Iyz;
+  Standard_Real Ix = NAN, Iy = NAN, Iz = NAN, Ixx = NAN, Iyy = NAN, Izz = NAN, Ixy = NAN, Ixz = NAN, Iyz = NAN;
   dim = Ix = Iy = Iz = Ixx = Iyy = Izz = Ixy = Ixz = Iyz = 0.0;
 
   Standard_Integer Order = 2; 
 
-  Standard_Real ds;  
-  Standard_Real ur, um, u;
-  Standard_Real x, y, z
-  Standard_Real xloc, yloc, zloc;
-  Standard_Real Upper;
+  Standard_Real ds = NAN;  
+  Standard_Real ur = NAN, um = NAN, u = NAN;
+  Standard_Real x = NAN, y = NAN, z = NAN
+  Standard_Real xloc = NAN, yloc = NAN, zloc = NAN;
+  Standard_Real Upper = NAN;
   gp_XYZ P, D;
 
   math_Vector GaussP (1, Order);
@@ -66,12 +68,12 @@ void BRepGProp_MeshCinert::Perform(const TColgp_Array1OfPnt& theNodes)
   {
     const gp_XYZ& aP1 = theNodes(nIndex).XYZ();
     const gp_XYZ& aP2 = theNodes(nIndex + 1).XYZ();
-    Standard_Real dimLocal, IxLocal, IyLocal, IzLocal, IxxLocal, IyyLocal, IzzLocal, IxyLocal, IxzLocal, IyzLocal;
+    Standard_Real dimLocal = NAN, IxLocal = NAN, IyLocal = NAN, IzLocal = NAN, IxxLocal = NAN, IyyLocal = NAN, IzzLocal = NAN, IxyLocal = NAN, IxzLocal = NAN, IyzLocal = NAN;
     dimLocal = IxLocal = IyLocal = IzLocal = IxxLocal = IyyLocal = IzzLocal = IxyLocal = IxzLocal = IyzLocal = 0.0;
 
     loc.Coord (xloc, yloc, zloc);
 
-    Standard_Integer i;
+    Standard_Integer i = 0;
 
     Upper = (aP2 - aP1).Modulus();
     if (Upper < gp::Resolution())
@@ -151,7 +153,7 @@ void BRepGProp_MeshCinert::PreparePolygon(const TopoDS_Edge& theE,
   {
     const TColgp_Array1OfPnt& aNodes = aPolyg->Nodes();
     thePolyg = new TColgp_HArray1OfPnt(1, aNodes.Length());
-    Standard_Integer i;
+    Standard_Integer i = 0;
     if (aLoc.IsIdentity())
     {
       for (i = 1; i <= aNodes.Length(); ++i)
@@ -179,7 +181,7 @@ void BRepGProp_MeshCinert::PreparePolygon(const TopoDS_Edge& theE,
     Standard_Integer aNbNodes = aPOnTri->NbNodes();
     thePolyg = new TColgp_HArray1OfPnt(1, aNbNodes);
     const TColStd_Array1OfInteger& aNodeInds = aPOnTri->Nodes();
-    Standard_Integer i;
+    Standard_Integer i = 0;
     if (aLoc.IsIdentity())
     {
       for (i = 1; i <= aNbNodes; ++i)
@@ -207,7 +209,7 @@ void BRepGProp_MeshCinert::PreparePolygon(const TopoDS_Edge& theE,
     Standard_Integer aNbNodes = aPolyg2D->NbNodes();
     thePolyg = new TColgp_HArray1OfPnt(1, aNbNodes);
     const TColgp_Array1OfPnt2d& aNodes2D = aPolyg2D->Nodes();
-    Standard_Integer i;
+    Standard_Integer i = 0;
     if (aLoc.IsIdentity())
     {
       for (i = 1; i <= aNbNodes; ++i)
index c1f51a6670543259bb71d3249202c17ad9293758..e742a55e751a0da12af7f5b9eea06b6377cafa07 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepGProp_MeshProps.hxx>
 
 #include <BRepGProp.hxx>
@@ -39,7 +41,7 @@ static void CalculateElSProps(const Standard_Real x,
   //GProps[4] = Ixx, GProps[5] = Iyy, GProps[6] = Izz,
   //GProps[7] = Ixy, aGProps[8] = Ixz, GProps[9] = Iyz,
   //
-  Standard_Real x2, y2, z2;
+  Standard_Real x2 = NAN, y2 = NAN, z2 = NAN;
   x2 = x * x;
   y2 = y * y;
   z2 = z * z;
@@ -65,7 +67,7 @@ static void CalculateElVProps(const Standard_Real x,
   const Standard_Real y,
   const Standard_Real z, const Standard_Real dv, Standard_Real* GProps)
 {
-  Standard_Real x2, y2, z2;
+  Standard_Real x2 = NAN, y2 = NAN, z2 = NAN;
   x2 = x * x;
   y2 = y * y;
   z2 = z * z;
@@ -117,15 +119,15 @@ static void CalculateElVProps(const Standard_Real x,
   gp_Dir aDN(aNorm);
   gp_Ax3 aPosPln(aPC, aDN);
   //Coordinates of nodes on plane
-  Standard_Real x1, y1, x2, y2, x3, y3;
+  Standard_Real x1 = NAN, y1 = NAN, x2 = NAN, y2 = NAN, x3 = NAN, y3 = NAN;
   ElSLib::PlaneParameters(aPosPln, p1, x1, y1);
   ElSLib::PlaneParameters(aPosPln, p2, x2, y2);
   ElSLib::PlaneParameters(aPosPln, p3, x3, y3);
   //
-  Standard_Real l1, l2; //barycentriche coordinates
-  Standard_Real x, y, z;
-  Standard_Real w; //weight
-  Standard_Integer i;
+  Standard_Real l1 = NAN, l2 = NAN; //barycentriche coordinates
+  Standard_Real x = NAN, y = NAN, z = NAN;
+  Standard_Real w = NAN; //weight
+  Standard_Integer i = 0;
   for (i = 0; i < NbGaussPoints; ++i)
   {
     Standard_Integer ind = 3 * i;
@@ -260,7 +262,7 @@ void BRepGProp_MeshProps::Perform (const Handle(Poly_Triangulation)& theMesh,
   //aGProps[7] = Ixy, aGProps[8] = Ixz, aGProps[9] = Iyz,
 
   Standard_Boolean isVolume = myType == Vinert;
-  Standard_Integer n1, n2, n3; //node indices
+  Standard_Integer n1 = 0, n2 = 0, n3 = 0; //node indices
   for (Standard_Integer i = 1; i <= theMesh->NbTriangles(); ++i)
   {
     const Poly_Triangle aTri = theMesh->Triangle (i);
index 654ef3acd4a40c50908e902e5b9b76257b237a48..ce031d967627731e75e29dc854cf0a0e97514aa9 100644 (file)
@@ -80,7 +80,7 @@ private:
 
 
 
-  Standard_Real myEpsilon;
+  Standard_Real myEpsilon{};
 
 
 };
index e8a8674d03ec9fb645321cf3b58b511a92ab0b2f..ffc0755f42c1e12f2da74f8d33a270cf70fe0422 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRepGProp_TFunction.hxx>
 #include <gp_Pnt.hxx>
 #include <math_KronrodSingleIntegration.hxx>
@@ -67,7 +69,7 @@ Standard_Boolean BRepGProp_TFunction::Value(const Standard_Real X,
 
   gp_Pnt2d                      aP2d;
   gp_Vec2d                      aV2d;
-  Standard_Real                 aUMax;
+  Standard_Real                 aUMax = NAN;
   Handle(TColStd_HArray1OfReal) anUKnots;
 
   mySurface.D12d(X, aP2d, aV2d);
@@ -83,7 +85,7 @@ Standard_Boolean BRepGProp_TFunction::Value(const Standard_Real X,
   myUFunction.SetVParam(aP2d.Y());
 
   // Compute the integral from myUMin to aUMax of myUFunction.
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real    aCoeff        = aV2d.Y();
   //Standard_Integer aNbUIntervals = anUKnots->Length() - 1;
   //Standard_Real    aTol          = myTolerance/aNbUIntervals;
@@ -123,7 +125,7 @@ Standard_Boolean BRepGProp_TFunction::Value(const Standard_Real X,
   //  aTol = 0.1;
 
   Standard_Integer              iU           = anUKnots->Upper();
-  Standard_Integer              aNbPntsStart;
+  Standard_Integer              aNbPntsStart = 0;
   Standard_Integer              aNbMaxIter   = 1000;
   math_KronrodSingleIntegration anIntegral;
   Standard_Real                 aLocalErr    = 0.;
index 5083b266b97e132ea5ca81639af8b01ad7b16c08..8178e1ae3c29087dbb896d89b8164079f1f4069c 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRepGProp_UFunction.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_XYZ.hxx>
@@ -46,8 +48,8 @@ Standard_Boolean BRepGProp_UFunction::Value(const Standard_Real  X,
   // Volume computation
   if (myValueType == GProp_Mass) {
     gp_XYZ        aPMP0;
-    Standard_Real aTmpPar1;
-    Standard_Real aTmpPar2;
+    Standard_Real aTmpPar1 = NAN;
+    Standard_Real aTmpPar2 = NAN;
 
     F = VolumeValue(X, aPMP0, aTmpPar1, aTmpPar2);
 
@@ -112,8 +114,8 @@ Standard_Boolean BRepGProp_UFunction::CenterMassValue(const Standard_Real  X,
                                                       Standard_Real &F)
 {
   gp_XYZ        aPmP0;
-  Standard_Real aS;
-  Standard_Real aD1;
+  Standard_Real aS = NAN;
+  Standard_Real aD1 = NAN;
 
   F = VolumeValue(X, aPmP0, aS, aD1);
 
@@ -153,10 +155,10 @@ Standard_Boolean BRepGProp_UFunction::InertiaValue(const Standard_Real  X,
                                                    Standard_Real &F)
 {
   gp_XYZ        aPmP0;
-  Standard_Real aS;
-  Standard_Real aD1;
-  Standard_Real aParam1;
-  Standard_Real aParam2;
+  Standard_Real aS = NAN;
+  Standard_Real aD1 = NAN;
+  Standard_Real aParam1 = NAN;
+  Standard_Real aParam2 = NAN;
   const Standard_Real* aCoeffs = myCoeffs;
 
   F = VolumeValue(X, aPmP0, aS, aD1);
@@ -196,10 +198,10 @@ Standard_Boolean BRepGProp_UFunction::InertiaValue(const Standard_Real  X,
   // Inertia computation for ByPlane mode.
   Standard_Real aD2 = aD1*aD1;
   Standard_Real aD3 = aD1*aD2/3.;
-  Standard_Real aPPar1;
-  Standard_Real aPPar2;
-  Standard_Real aCoeff1;
-  Standard_Real aCoeff2;
+  Standard_Real aPPar1 = NAN;
+  Standard_Real aPPar2 = NAN;
+  Standard_Real aCoeff1 = NAN;
+  Standard_Real aCoeff2 = NAN;
 
   // Inertia computation for XX, YY and ZZ.
   if (myValueType == GProp_InertiaXX ||
index 5c4cf05c131d6eecc244ab04240b2a8a5f423cbe..ee238ad14afffab23ad21afd61d755d61b7090d9 100644 (file)
@@ -211,7 +211,7 @@ private:
 
 
 
-  Standard_Real myEpsilon;
+  Standard_Real myEpsilon{};
 
 
 };
index bf8b8d867756a926972037689ed78c0d0c2cf749..73b9ef5be842c4f690d0aa95c9400e7d04eb4b71 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRepGProp_Domain.hxx>
 #include <BRepGProp_TFunction.hxx>
 #include <BRepGProp_VinertGK.hxx>
@@ -217,9 +219,9 @@ Standard_Real BRepGProp_VinertGK::Perform(BRepGProp_Face        &theSurface,
 
 {
   Standard_Real aCoeff[4];
-  Standard_Real aXLoc;
-  Standard_Real aYLoc;
-  Standard_Real aZLoc;
+  Standard_Real aXLoc = NAN;
+  Standard_Real aYLoc = NAN;
+  Standard_Real aZLoc = NAN;
 
   loc.Coord(aXLoc, aYLoc, aZLoc);
   thePlane.Coefficients (aCoeff[0], aCoeff[1], aCoeff[2], aCoeff[3]);
@@ -244,9 +246,9 @@ Standard_Real BRepGProp_VinertGK::Perform(BRepGProp_Face        &theSurface,
 
 {
   Standard_Real aCoeff[4];
-  Standard_Real aXLoc;
-  Standard_Real aYLoc;
-  Standard_Real aZLoc;
+  Standard_Real aXLoc = NAN;
+  Standard_Real aYLoc = NAN;
+  Standard_Real aZLoc = NAN;
 
   loc.Coord(aXLoc, aYLoc, aZLoc);
   thePlane.Coefficients (aCoeff[0], aCoeff[1], aCoeff[2], aCoeff[3]);
@@ -299,21 +301,21 @@ Standard_Real BRepGProp_VinertGK::PrivatePerform
 
   //Standard_Real    aCrvTol = 0.5*theTolerance/aNbCurves;
   Standard_Real    aCrvTol = 0.1*theTolerance;
-  Standard_Real    aUMin;
-  Standard_Real    aUMax;
-  Standard_Real    aTMin;
-  Standard_Real    aTMax;
-  Standard_Integer aNbPnts;
+  Standard_Real    aUMin = NAN;
+  Standard_Real    aUMax = NAN;
+  Standard_Real    aTMin = NAN;
+  Standard_Real    aTMax = NAN;
+  Standard_Integer aNbPnts = 0;
   Standard_Integer aNbMaxIter = 1000;
   Standard_Integer aNbVal = 10;
-  Standard_Integer k;
+  Standard_Integer k = 0;
   math_Vector      aLocalValue(1, aNbVal);
   math_Vector      aLocalTolReached(1, aNbVal);
   math_Vector      aValue(1, aNbVal);
   math_Vector      aTolReached(1, aNbVal);
   TColStd_Array1OfBoolean CFlags(1, aNbVal); 
   CFlags.Init(Standard_False);
-  Standard_Boolean isMore;
+  Standard_Boolean isMore = 0;
 
   //aNbVal = 1;
   aValue.Init(0.);
@@ -323,12 +325,12 @@ Standard_Real BRepGProp_VinertGK::PrivatePerform
   CFlags(1) = Standard_True;
 
   if(theCGFlag || theIFlag) {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for(i = 2; i <= 4; ++i) {CFlags(i) = Standard_True;}
   }
 
   if(theIFlag) {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for(i = 5; i <= 10; ++i) {CFlags(i) = Standard_True;}
   }
 
index 1593ace13bde02d91e747f9609898edba4581660..390c55433faf210b0e25ec6f4cd923bb5c4e285d 100644 (file)
@@ -157,7 +157,7 @@ private:
 
 
   Standard_Real myErrorReached;
-  Standard_Real myAbsolutError;
+  Standard_Real myAbsolutError{};
 };
 
 
index 8d4fef7bbd1d43b5cf6d1307f7bc33bc0ec66de7..cc9fbb0e6bef316a5676b00ec689e631fbddbddb 100644 (file)
@@ -34,9 +34,9 @@
 //function :BRepIntCurveSurface_Inter::BRepIntCurveSurface_Inte
 //purpose  : 
 //===========================================================================
-BRepIntCurveSurface_Inter::BRepIntCurveSurface_Inter()
+BRepIntCurveSurface_Inter::BRepIntCurveSurface_Inter() : myFastClass(new  BRepTopAdaptor_TopolTool())
 {
-  myFastClass = new  BRepTopAdaptor_TopolTool();
+  
   Clear();
 }
 
index 1694ed1ca9494aba29562206021303dc91e7d6b3..b6985291d9f8b933adc82d1e4023979b0c547c33 100644 (file)
@@ -132,17 +132,17 @@ private:
 
 
 
-  Standard_Real myTolerance;
+  Standard_Real myTolerance{};
   Handle(GeomAdaptor_Curve) myCurve;
   IntCurveSurface_HInter myIntcs;
-  Standard_Integer myCurrentindex;
-  Standard_Integer myCurrentnbpoints;
+  Standard_Integer myCurrentindex{};
+  Standard_Integer myCurrentnbpoints{};
   Handle(BRepTopAdaptor_TopolTool) myFastClass;
   TopAbs_State myCurrentstate;
-  Standard_Real myCurrentU;
-  Standard_Real myCurrentV;
+  Standard_Real myCurrentU{};
+  Standard_Real myCurrentV{};
   Bnd_Box myCurveBox;
-  Standard_Integer myIndFace;
+  Standard_Integer myIndFace{};
   TopTools_SequenceOfShape myFaces;
   Handle(Bnd_HArray1OfBox) myFaceBoxes;
 
index 3eec4083091ef843db389c9c50fe202d94d0fef9..3a06aedb779ba0d6c3b7dc3b736f501522b65e4e 100644 (file)
@@ -17,6 +17,8 @@
 //pmn 26/09/97 Add parameters of approximation in BuildCurve3d
 //  Modified by skv - Thu Jun  3 12:39:19 2004 OCC5898
 
+#include <math.h>
+
 #include <BRepLib.hxx>
 
 #include <AdvApprox_ApproxAFunction.hxx>
@@ -159,7 +161,7 @@ Standard_Boolean  BRepLib::CheckSameRange(const TopoDS_Edge& AnEdge,
   BRep_ListIteratorOfListOfCurveRepresentation an_Iterator
     ((*((Handle(BRep_TEdge)*)&AnEdge.TShape()))->ChangeCurves());
 
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   Standard_Real current_first =0., current_last =0. ;
   Handle(BRep_GCurve) geometric_representation_ptr ;
 
@@ -200,13 +202,13 @@ void BRepLib::SameRange(const TopoDS_Edge& AnEdge,
   TopLoc_Location LocalLoc ;
 
   Standard_Boolean first_time_in = Standard_True,
-    has_curve,
-    has_closed_curve ;
+    has_curve = 0,
+    has_closed_curve = 0 ;
   Handle(BRep_GCurve) geometric_representation_ptr ;
-  Standard_Real first,
-    current_first,
-    last,
-    current_last ;
+  Standard_Real first = NAN,
+    current_first = NAN,
+    last = NAN,
+    current_last = NAN ;
 
   const Handle(Geom_Curve) C = BRep_Tool::Curve(AnEdge,
     LocalLoc,
@@ -288,8 +290,8 @@ static Standard_Integer evaluateMaxSegment(const Standard_Integer aMaxSegment,
 {
   if (aMaxSegment != 0) return aMaxSegment;
 
-  Handle(Adaptor3d_Surface) aSurf   = aCurveOnSurface.GetSurface();
-  Handle(Adaptor2d_Curve2d) aCurv2d = aCurveOnSurface.GetCurve();
+  const Handle(Adaptor3d_Surface)& aSurf   = aCurveOnSurface.GetSurface();
+  const Handle(Adaptor2d_Curve2d)& aCurv2d = aCurveOnSurface.GetCurve();
 
   Standard_Real aNbSKnots = 0, aNbC2dKnots = 0;
 
@@ -317,19 +319,19 @@ Standard_Boolean  BRepLib::BuildCurve3d(const TopoDS_Edge& AnEdge,
 {
   Standard_Integer //ErrorCode,
     //                   ReturnCode = 0,
-    ii,
+    ii = 0,
     //                   num_knots,
-    jj;
+    jj = 0;
 
   TopLoc_Location LocalLoc,L[2],LC;
-  Standard_Real f,l,fc,lc, first[2], last[2],
-    tolerance,
-    max_deviation,
-    average_deviation ;
+  Standard_Real f = NAN,l = NAN,fc = NAN,lc = NAN, first[2], last[2],
+    tolerance = NAN,
+    max_deviation = NAN,
+    average_deviation = NAN ;
   Handle(Geom2d_Curve) Curve2dPtr, Curve2dArray[2]  ;
   Handle(Geom_Surface) SurfacePtr, SurfaceArray[2]  ;
 
-  Standard_Integer not_done ;
+  Standard_Integer not_done = 0 ;
   // if the edge has a 3d curve returns true
 
 
@@ -375,7 +377,7 @@ Standard_Boolean  BRepLib::BuildCurve3d(const TopoDS_Edge& AnEdge,
     if (C3d.IsNull())
       return Standard_False;
     // update the edge
-    Standard_Real First, Last;
+    Standard_Real First = NAN, Last = NAN;
 
     BRep_Builder B;
     B.UpdateEdge(AnEdge,C3d,LocalLoc,0.0e0);
@@ -484,7 +486,7 @@ Standard_Boolean  BRepLib::BuildCurves3d(const TopoDS_Shape& S,
   const Standard_Integer MaxDegree,
   const Standard_Integer MaxSegment)
 {
-  Standard_Boolean boolean_value,
+  Standard_Boolean boolean_value = 0,
     ok = Standard_True;
   TopTools_MapOfShape a_counter ;
   TopExp_Explorer ex(S,TopAbs_EDGE);
@@ -511,13 +513,13 @@ Standard_Boolean  BRepLib::UpdateEdgeTol(const TopoDS_Edge& AnEdge,
   const Standard_Real MaxToleranceToCheck)
 {
 
-  Standard_Integer curve_on_surface_index,
-    curve_index,
-    not_done,
-    has_closed_curve,
-    has_curve,
-    jj,
-    ii,
+  Standard_Integer curve_on_surface_index = 0,
+    curve_index = 0,
+    not_done = 0,
+    has_closed_curve = 0,
+    has_curve = 0,
+    jj = 0,
+    ii = 0,
     geom_reference_curve_flag = 0,
     max_sampling_points = 90,
     min_sampling_points = 30 ;
@@ -525,10 +527,10 @@ Standard_Boolean  BRepLib::UpdateEdgeTol(const TopoDS_Edge& AnEdge,
   Standard_Real factor = 100.0e0,
     //     sampling_array[2],
     safe_factor = 1.4e0,
-    current_last,
-    current_first,
-    max_distance,
-    coded_edge_tolerance,
+    current_last = NAN,
+    current_first = NAN,
+    max_distance = NAN,
+    coded_edge_tolerance = NAN,
     edge_tolerance = 0.0e0 ;
   Handle(TColStd_HArray1OfReal) parameters_ptr ;
   Handle(BRep_GCurve) geometric_representation_ptr ;
@@ -720,7 +722,7 @@ Standard_Boolean BRepLib::UpdateEdgeTolerance(const TopoDS_Shape& S,
   TopTools_MapOfShape  a_counter ;
 
   Standard_Boolean     return_status = Standard_False,
-    local_flag ;
+    local_flag = 0 ;
 
   while (ex.More()) {
     if (a_counter.Add(ex.Current())) {
@@ -769,7 +771,7 @@ static void GetEdgeTol(const TopoDS_Edge& theEdge,
   Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface();
 
   TopLoc_Location LC;
-  Standard_Real First, Last;
+  Standard_Real First = NAN, Last = NAN;
   HC->Load(BRep_Tool::Curve(theEdge,LC,First,Last));
   LC = L.Predivided(LC);
 
@@ -814,7 +816,7 @@ static void UpdTolMap(const TopoDS_Shape& theSh, Standard_Real theNewTol,
   TopTools_DataMapOfShapeReal& theShToTol)
 {
   TopAbs_ShapeEnum aSt = theSh.ShapeType();
-  Standard_Real aShTol;
+  Standard_Real aShTol = NAN;
   if (aSt == TopAbs_VERTEX)
     aShTol = BRep_Tool::Tolerance(TopoDS::Vertex(theSh));
   else if (aSt == TopAbs_EDGE)
@@ -1017,7 +1019,7 @@ static Standard_Boolean EvalTol(const Handle(Geom2d_Curve)& pc,
   Standard_Real l = gac.LastParameter();
   Extrema_LocateExtPC Projector;
   Projector.Initialize(gac,f,l,tol);
-  Standard_Real u,v;
+  Standard_Real u = NAN,v = NAN;
   gp_Pnt p;
   tolbail = tol;
   for(Standard_Integer i = 1; i <= 5; i++){
@@ -1188,7 +1190,7 @@ static void GetCurve3d(const TopoDS_Edge& theEdge, Handle(Geom_Curve)& theC3d, S
 //function : UpdateVTol
 //purpose  : 
 //=======================================================================
-void UpdateVTol(const TopoDS_Vertex theV1, const TopoDS_Vertex& theV2, Standard_Real theTol)
+void UpdateVTol(const TopoDS_Vertex& theV1, const TopoDS_Vertex& theV2, Standard_Real theTol)
 {
   BRep_Builder aB;
   if (!theV1.IsNull())
@@ -1384,7 +1386,7 @@ TopoDS_Edge BRepLib::SameParameter(const TopoDS_Edge& theEdge,
             }
 
             if(bs2d->Continuity() == GeomAbs_C0) {
-              Standard_Real tolbail;
+              Standard_Real tolbail = NAN;
               if(EvalTol(curPC,S,GAC,theTolerance,tolbail)){
                 bs2d = bs2dsov;
                 Standard_Real UResbail = GAS.UResolution(tolbail);
@@ -1475,7 +1477,7 @@ TopoDS_Edge BRepLib::SameParameter(const TopoDS_Edge& theEdge,
                 Standard_Real critratio = 10.; 
                 Standard_Real dtprev = Knots(2) - Knots(1), dtratio = 1.;
                 Standard_Real dtmin = dtprev;
-                Standard_Real dtcur;
+                Standard_Real dtcur = NAN;
                 for(Standard_Integer j = 2; j < NbKnots; j++) {
                   dtcur = Knots(j+1) - Knots(j);
                   dtmin = Min(dtmin, dtcur);
@@ -1629,7 +1631,7 @@ static void InternalUpdateTolerances(const TopoDS_Shape& theOldShape,
     TopLoc_Location l;
     TopExp_Explorer ex;
     Bnd_Box aB;
-    Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax, dMax;
+    Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN, dMax = NAN;
     for (ex.Init(theOldShape, TopAbs_FACE); ex.More(); ex.Next()) {
       const TopoDS_Face& curf=TopoDS::Face(ex.Current());
       S = BRep_Tool::Surface(curf, l);
@@ -1678,13 +1680,13 @@ static void InternalUpdateTolerances(const TopoDS_Shape& theOldShape,
   TopTools_IndexedDataMapOfShapeListOfShape parents;
   TopExp::MapShapesAndAncestors(theOldShape, TopAbs_EDGE, TopAbs_FACE, parents);
   TopTools_ListIteratorOfListOfShape lConx;
-  Standard_Integer iCur;
+  Standard_Integer iCur = 0;
   for (iCur=1; iCur<=parents.Extent(); iCur++) {
     tol=0;
     for (lConx.Initialize(parents(iCur)); lConx.More(); lConx.Next()) 
     {
       const TopoDS_Face& FF = TopoDS::Face(lConx.Value());
-      Standard_Real Ftol;
+      Standard_Real Ftol = NAN;
       if (IsVerifyTolerance && aShToTol.IsBound(FF)) //first condition for speed-up
         Ftol = aShToTol(FF);
       else
@@ -1821,7 +1823,7 @@ void  BRepLib::UpdateInnerTolerances(const TopoDS_Shape& aShape)
 
     TopoDS_Vertex V1, V2;
     TopExp::Vertices(anEdge, V1, V2);
-    Standard_Real fpar, lpar;
+    Standard_Real fpar = NAN, lpar = NAN;
     BRep_Tool::Range(anEdge, fpar, lpar);
     Standard_Real TolEdge = BRep_Tool::Tolerance(anEdge);
     gp_Pnt Pnt1, Pnt2;
@@ -2016,7 +2018,7 @@ GeomAbs_Shape BRepLib::ContinuityOfFaces(const TopoDS_Edge&  theEdge,
   TopoDS_Edge anEdgeInFace1, anEdgeInFace2;
   Handle(Geom2d_Curve) aCurve1, aCurve2;
   
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   
   if (!theFace1.IsSame (theFace2) &&
       BRep_Tool::IsClosed (theEdge, theFace1) &&
@@ -2082,7 +2084,7 @@ GeomAbs_Shape BRepLib::ContinuityOfFaces(const TopoDS_Edge&  theEdge,
   SurfaceProperties aSP1(aSurface1, aSurf1Trsf, aCurve1, theFace1.Orientation() == TopAbs_REVERSED);
   SurfaceProperties aSP2(aSurface2, aSurf2Trsf, aCurve2, theFace2.Orientation() == TopAbs_REVERSED);
 
-  Standard_Real f, l, eps;
+  Standard_Real f = NAN, l = NAN, eps = NAN;
   BRep_Tool::Range (theEdge,f,l);
   Extrema_LocateExtPC ext;
   Handle(BRepAdaptor_Curve) aHC2;
@@ -2094,13 +2096,13 @@ GeomAbs_Shape BRepLib::ContinuityOfFaces(const TopoDS_Edge&  theEdge,
   const Standard_Real anAngleTol2 = theAngleTol * theAngleTol;
 
   gp_Vec aDer1, aDer2;
-  Standard_Real aSqLen1, aSqLen2;
+  Standard_Real aSqLen1 = NAN, aSqLen2 = NAN;
   gp_Dir aCrvDir1[2], aCrvDir2[2];
   Standard_Real aCrvLen1[2], aCrvLen2[2];
 
   GeomAbs_Shape aCont = (isElementary ? GeomAbs_CN : GeomAbs_C2);
   GeomAbs_Shape aCurCont;
-  Standard_Real u;
+  Standard_Real u = NAN;
   for (Standard_Integer i = 0; i <= 20 && aCont > GeomAbs_C0; i++)
   {
     // First suppose that this is sameParameter
@@ -2235,7 +2237,7 @@ static void EncodeRegularity(const TopoDS_Shape&        theShape,
     TopTools_ListIteratorOfListOfShape It;
     TopExp_Explorer Ex;
     TopoDS_Face F1,F2;
-    Standard_Boolean found;
+    Standard_Boolean found = 0;
     for (Standard_Integer i = 1; i <= M.Extent(); i++){
       TopoDS_Edge E = TopoDS::Edge(M.FindKey(i));
       if (!theEdgesToEncode.IsEmpty())
@@ -2502,7 +2504,7 @@ namespace
   //! Represents link of triangulation.
   struct Link
   {
-    Standard_Integer Node[2];
+    Standard_Integer Node[2]{};
 
     //! Constructor
     Link (const Standard_Integer theNode1, const Standard_Integer theNode2)
@@ -2763,7 +2765,7 @@ void  BRepLib::ReverseSortFaces (const TopoDS_Shape& Sh,
 void BRepLib::BoundingVertex(const NCollection_List<TopoDS_Shape>& theLV,
                              gp_Pnt& theNewCenter, Standard_Real& theNewTol)
 {
-  Standard_Integer aNb;
+  Standard_Integer aNb = 0;
   //
   aNb=theLV.Extent();
   if (aNb < 2) {
@@ -2771,8 +2773,8 @@ void BRepLib::BoundingVertex(const NCollection_List<TopoDS_Shape>& theLV,
   }
   //
   else if (aNb==2) {
-    Standard_Integer m, n;
-    Standard_Real aR[2], dR, aD, aEps;
+    Standard_Integer m = 0, n = 0;
+    Standard_Real aR[2], dR = NAN, aD = NAN, aEps = NAN;
     TopoDS_Vertex aV[2];
     gp_Pnt aP[2];
     //
@@ -2801,7 +2803,7 @@ void BRepLib::BoundingVertex(const NCollection_List<TopoDS_Shape>& theLV,
       theNewTol = aR[m];
     }
     else {
-      Standard_Real aRr;
+      Standard_Real aRr = NAN;
       gp_XYZ aXYZr;
       gp_Pnt aPr;
       //
@@ -2821,7 +2823,7 @@ void BRepLib::BoundingVertex(const NCollection_List<TopoDS_Shape>& theLV,
     //
     // issue 0027540 - sum of doubles may depend on the order
     // of addition, thus sort the coordinates for stable result
-    Standard_Integer i;
+    Standard_Integer i = 0;
     NCollection_Array1<gp_Pnt> aPoints(0, aNb-1);
     NCollection_List<TopoDS_Edge>::Iterator aIt(theLV);
     for (i = 0; aIt.More(); aIt.Next(), ++i) {
@@ -2841,7 +2843,7 @@ void BRepLib::BoundingVertex(const NCollection_List<TopoDS_Shape>& theLV,
     gp_Pnt aP(aXYZ);
     //
     // compute the tolerance for the new vertex
-    Standard_Real aTi, aDi, aDmax;
+    Standard_Real aTi = NAN, aDi = NAN, aDmax = NAN;
     //
     aDmax=-1.;
     aIt.Initialize(theLV);
@@ -2898,7 +2900,7 @@ void BRepLib::ExtendFace(const TopoDS_Face& theF,
       DownCast(aBAS.Surface().Surface()->Transformed(aBAS.Trsf()));
 
     // Get bounds of the basis surface
-    Standard_Real aSUMin, aSUMax, aSVMin, aSVMax;
+    Standard_Real aSUMin = NAN, aSUMax = NAN, aSVMin = NAN, aSVMax = NAN;
     aSurf->Bounds(aSUMin, aSUMax, aSVMin, aSVMax);
 
     Standard_Boolean isUPeriodic = aBAS.IsUPeriodic();
@@ -2962,7 +2964,7 @@ void BRepLib::ExtendFace(const TopoDS_Face& theF,
     }
 
     // Get surfaces bounds
-    Standard_Real aSUMin, aSUMax, aSVMin, aSVMax;
+    Standard_Real aSUMin = NAN, aSUMax = NAN, aSVMin = NAN, aSVMax = NAN;
     aSB->Bounds(aSUMin, aSUMax, aSVMin, aSVMax);
 
     Standard_Boolean isUClosed = aSB->IsUClosed();
index 5fe6d8c177195a0fbd03600047df70f7eef329f5..c0292b13df02f8d77d6c596c160457bf4a5baaac 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepLib.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -213,7 +215,7 @@ Standard_Boolean BRepLib::FindValidRange
   (const TopoDS_Edge& theEdge, Standard_Real& theFirst, Standard_Real& theLast)
 {
   TopLoc_Location aLoc;
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   if (BRep_Tool::Curve(theEdge, aLoc, f, l).IsNull())
     return Standard_False;
   BRepAdaptor_Curve anAC(theEdge);
@@ -256,8 +258,8 @@ Standard_Boolean BRepLib::FindValidRange
 void BRepLib::BuildPCurveForEdgeOnPlane(const TopoDS_Edge& aE,
                                         const TopoDS_Face& aF)
 {
-  Standard_Boolean bToUpdate;
-  Standard_Real aTolE;
+  Standard_Boolean bToUpdate = 0;
+  Standard_Real aTolE = NAN;
   Handle(Geom2d_Curve) aC2D;
   BRep_Builder aBB;
   //
@@ -277,8 +279,8 @@ void BRepLib::BuildPCurveForEdgeOnPlane(const TopoDS_Edge& aE,
                                         Handle(Geom2d_Curve)& aC2D,
                                         Standard_Boolean& bToUpdate)
 {
-  Standard_Real aT1, aT2;
-  Standard_Boolean isStored;
+  Standard_Real aT1 = NAN, aT2 = NAN;
+  Standard_Boolean isStored = 0;
   aC2D = BRep_Tool::CurveOnSurface(aE, aF, aT1, aT2, &isStored);
   bToUpdate = !isStored && !aC2D.IsNull();
 }
index 335e4b748acff45e06bd0aeac36e4bbf13bfd091..9cc742236b355cbe7d2dcf6f33ee70aff619325b 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
@@ -61,7 +63,7 @@ void BRepLib_CheckCurveOnSurface::Init(const TopoDS_Edge& theEdge, const TopoDS_
   // Surface initialization
 
   TopLoc_Location aLocation;
-  Standard_Real aFirstParam, aLastParam;
+  Standard_Real aFirstParam = NAN, aLastParam = NAN;
 
   Handle(Geom2d_Curve) aGeom2dCurve = BRep_Tool::CurveOnSurface(theEdge, theFace, aFirstParam, aLastParam);
   Handle(Geom_Surface) aGeomSurface = BRep_Tool::Surface(theFace);
index 029abf4df33c2fa5393477aa8ebb214501cf55d7..18ce57be38a07cf02e6548e2e3399dfa8d66e5e1 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
@@ -55,8 +57,8 @@ static Standard_Real Controle(const TColgp_SequenceOfPnt& thePoints,
                              const Handle(Geom_Plane)& thePlane)
 {
   Standard_Real dfMaxDist=0.;
-  Standard_Real a,b,c,d, dist;
-  Standard_Integer ii;
+  Standard_Real a = NAN,b = NAN,c = NAN,d = NAN, dist = NAN;
+  Standard_Integer ii = 0;
   thePlane->Coefficients(a,b,c,d);
   for (ii=1; ii<=thePoints.Length(); ii++) {
     const gp_XYZ& xyz = thePoints(ii).XYZ();
@@ -77,7 +79,7 @@ inline static Standard_Boolean Is2DConnected(const TopoDS_Edge& theEdge1,
                                             const Handle(Geom_Surface)& theSurface,
                                             const TopLoc_Location& theLocation)
 {
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   //TopLoc_Location aLoc;
   Handle(Geom2d_Curve) aCurve;
   gp_Pnt2d p1, p2;
@@ -210,7 +212,7 @@ static void fillPoints (const BRepAdaptor_Curve&                 theCurve,
                         TColgp_SequenceOfPnt&                    thePoints,
                         TColStd_SequenceOfReal&                  theWeights)
 {
-  Standard_Real aDistPrev = 0., aDistNext;
+  Standard_Real aDistPrev = 0., aDistNext = NAN;
   gp_Pnt aPPrev (theCurve.Value (theParams (0))), aPNext;
 
   for (Standard_Integer iP = 1; iP <= theParams.Length(); ++iP)
@@ -260,11 +262,11 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape&    S,
   if (!ex.More()) return;    // no edges ....
 
   TopoDS_Edge E = TopoDS::Edge(ex.Current());
-  Standard_Real f,l,ff,ll;
+  Standard_Real f = NAN,l = NAN,ff = NAN,ll = NAN;
   Handle(Geom2d_Curve) PC,aPPC;
   Handle(Geom_Surface) SS;
   TopLoc_Location L;
-  Standard_Integer i = 0,j;
+  Standard_Integer i = 0,j = 0;
 
   // iterate on the surfaces of the first edge
   for(;;) {
@@ -398,7 +400,7 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape&    S,
 
   // ======================= Step #2
   myLocation.Identity();
-  Standard_Integer iPoint;
+  Standard_Integer iPoint = 0;
   math_Matrix aMat (1,3,1,3, 0.);
   math_Vector aVec (1,3, 0.);
   // Find the barycenter and normalize weights 
index dc682feee8e4fd15ba4d12d214f81ae38203dac8..f717a6308118b8ff775e2e3609f8eb1512bfd4dd 100644 (file)
@@ -101,9 +101,9 @@ private:
 
 
   Handle(Geom_Surface) mySurface;
-  Standard_Real myTolerance;
-  Standard_Real myTolReached;
-  Standard_Boolean isExisted;
+  Standard_Real myTolerance{};
+  Standard_Real myTolReached{};
+  Standard_Boolean isExisted{};
   TopLoc_Location myLocation;
 
 
index a1b802143c2fb9fa3f4ac14eea85bf9b14c78e99..c059a452a09428a31a229e579d46559f0522a41c 100644 (file)
@@ -19,6 +19,8 @@
 // Modif : Thu Jan 21 11:40:20 1999. Add trace context #if DEB
 //           add test to avoid loop while in NextConnexEdge (in case of a closed connex wire)
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepLib.hxx>
@@ -79,7 +81,7 @@ static void BCSmoothing(Handle(Geom_BSplineCurve)& theC,
 
     theC->Multiplicities(aMults);
     theC->Knots(aKnots);
-    Standard_Integer i, m = theC->Degree();
+    Standard_Integer i = 0, m = theC->Degree();
     m = m - theCont;
 
     if(m < 1) return;
@@ -146,7 +148,7 @@ static void MakeClosedCurve(Handle(Geom_Curve)& C, const gp_Pnt& PF,
   aBC->SetPeriodic();
   Standard_Integer fk = aBC->FirstUKnotIndex();
   Standard_Integer lk = aBC->LastUKnotIndex();
-  Standard_Integer k;
+  Standard_Integer k = 0;
   Standard_Real eps = Precision::Confusion();
   eps *= eps;
   Standard_Real porig = 2.*l;
@@ -298,7 +300,7 @@ Standard_Integer BRepLib_FuseEdges::NbVertices()
 {
 
   Standard_NullObject_Raise_if(myShape.IsNull(),"FuseEdges : No Shape");
-  Standard_Integer nbedges, nbvertices = 0;
+  Standard_Integer nbedges = 0, nbvertices = 0;
 
   if (!myEdgesDone) {
     BuildListEdges();
@@ -364,7 +366,7 @@ void BRepLib_FuseEdges::BuildListEdges()
   TopExp::MapShapesAndUniqueAncestors(myShape,TopAbs_VERTEX,TopAbs_EDGE,myMapVerLstEdg);
   TopExp::MapShapesAndAncestors(myShape,TopAbs_EDGE,TopAbs_FACE,myMapEdgLstFac);
 
-  Standard_Integer iEdg;
+  Standard_Integer iEdg = 0;
   TopTools_MapOfShape mapUniqEdg;
 
   // for each edge of myMapEdgLstFac
@@ -403,7 +405,7 @@ void BRepLib_FuseEdges::BuildListResultEdges()
     TopoDS_Vertex VF,VL;
     Handle(Geom_Curve) C;
     TopLoc_Location loc;
-    Standard_Real f,l;
+    Standard_Real f = NAN,l = NAN;
     TopoDS_Edge NewEdge;
 
     myMapEdg.Clear();
@@ -730,7 +732,7 @@ Standard_Boolean BRepLib_FuseEdges::SameSupport(const TopoDS_Edge& E1,
 
   Handle(Geom_Curve) C1,C2;
   TopLoc_Location loc;
-  Standard_Real f1,l1,f2,l2;
+  Standard_Real f1 = NAN,l1 = NAN,f2 = NAN,l2 = NAN;
   Handle(Standard_Type) typC1,typC2;
   
   C1 = BRep_Tool::Curve(E1,loc,f1,l1);
@@ -986,7 +988,7 @@ Standard_Boolean BRepLib_FuseEdges::UpdatePCurve(const TopoDS_Edge& theOldEdge,
   Handle(Geom2d_Curve) Curv2d;
   Handle(Geom_Surface) Surf;
   TopLoc_Location loc,locbid;
-  Standard_Real ef,el,cf,cl;
+  Standard_Real ef = NAN,el = NAN,cf = NAN,cl = NAN;
   Standard_Integer iedg = 1;
 
   // take care that we want only Pcurve that maps on the surface where the 3D edges lies.
@@ -1042,7 +1044,7 @@ Standard_Boolean BRepLib_FuseEdges::UpdatePCurve(const TopoDS_Edge& theOldEdge,
        // update the new edge 
        if (Curv2d->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
          Curv2d = Handle(Geom2d_TrimmedCurve)::DownCast (Curv2d)->BasisCurve();
-       Standard_Real f, l;
+       Standard_Real f = NAN, l = NAN;
        f = Curv2d->FirstParameter();
        l = Curv2d->LastParameter();
        if (l-f + 2.* Epsilon(l-f) < el-ef)
@@ -1056,7 +1058,7 @@ Standard_Boolean BRepLib_FuseEdges::UpdatePCurve(const TopoDS_Edge& theOldEdge,
            for (; iter.More(); iter.Next())
              {
                TopoDS_Edge& E = TopoDS::Edge(iter.Value());
-               Standard_Real first, last;
+               Standard_Real first = NAN, last = NAN;
                Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface( E, Surf, loc, first, last );
                Handle(Geom2d_BoundedCurve) BC = Handle(Geom2d_BoundedCurve)::DownCast(C);
                if (BC.IsNull())
index f1ddbdcefb6474f1e7e734f9e176b867f2e42274..c13cfe789007eb66bf2a887c68b5f22e149ef7fd 100644 (file)
@@ -17,6 +17,8 @@
 // Modified:   Wed Oct 23 09:17:47 1996
 //             check ponctuallity (PRO4896)
 
+#include <math.h>
+
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -65,7 +67,7 @@ static Standard_Boolean Project(const Handle(Geom_Curve)& C,
   GeomAdaptor_Curve GAC(C);
   
   // Afin de faire les extremas, on verifie les distances en bout
-  Standard_Real D1,D2;
+  Standard_Real D1 = NAN,D2 = NAN;
   gp_Pnt P1,P2;
   P1 = GAC.Value(GAC.FirstParameter());
   P2 = GAC.Value(GAC.LastParameter());
@@ -84,8 +86,8 @@ static Standard_Boolean Project(const Handle(Geom_Curve)& C,
 
   Extrema_ExtPC extrema(P,GAC);
   if (extrema.IsDone()) {
-    Standard_Integer i, index = 0, n = extrema.NbExt();
-    Standard_Real Dist2 = RealLast(), dist2min;
+    Standard_Integer i = 0, index = 0, n = extrema.NbExt();
+    Standard_Real Dist2 = RealLast(), dist2min = NAN;
 
     for (i = 1; i <= n; i++) {
       dist2min = extrema.SquareDistance(i);
@@ -124,7 +126,7 @@ static Standard_Boolean Project(const Handle(Geom2d_Curve)& C,
   Handle(GeomAdaptor_Surface) HGAHS = new GeomAdaptor_Surface (S);
   Adaptor3d_CurveOnSurface ACOS(HG2AHC,HGAHS);
 
-  Standard_Real D1,D2;
+  Standard_Real D1 = NAN,D2 = NAN;
   gp_Pnt P1,P2;
   P1 = ACOS.Value(ACOS.FirstParameter());
   P2 = ACOS.Value(ACOS.LastParameter());
@@ -143,8 +145,8 @@ static Standard_Boolean Project(const Handle(Geom2d_Curve)& C,
   Extrema_ExtPC extrema(P,ACOS);
   
   if (extrema.IsDone()) {
-    Standard_Integer i, index = 0, n = extrema.NbExt();
-    Standard_Real Dist2 = RealLast(), dist2min;
+    Standard_Integer i = 0, index = 0, n = extrema.NbExt();
+    Standard_Real Dist2 = RealLast(), dist2min = NAN;
     
     for (i = 1; i <= n; i++) {
       dist2min = extrema.SquareDistance(i);
@@ -711,7 +713,7 @@ void  BRepLib_MakeEdge::Init(const Handle(Geom_Curve)& C,
 {
   // try projecting the vertices on the curve
 
-  Standard_Real p1,p2;
+  Standard_Real p1 = NAN,p2 = NAN;
   
   if (V1.IsNull())
     p1 = C->FirstParameter();
@@ -986,7 +988,7 @@ void  BRepLib_MakeEdge::Init(const Handle(Geom2d_Curve)& C,
 {
   // try projecting the vertices on the curve
 
-  Standard_Real p1,p2;
+  Standard_Real p1 = NAN,p2 = NAN;
   
   if (V1.IsNull())
     p1 = C->FirstParameter();
index f04af3e5a8d3b8a966662c6f02b0c110c268c32a..b20368d45c4bae744814587ae02e54f72cf03922 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepLib.hxx>
@@ -61,7 +63,7 @@ static gp_Pnt Point(const gp_Pnt2d& P)
 static gp_Pnt2d Project(const TopoDS_Vertex& Ve)
 {
   gp_Pnt P = BRep_Tool::Pnt(Ve); 
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
   ElSLib::Parameters(BRepLib::Plane()->Pln(),P,U,V);
   return gp_Pnt2d(U,V);
 }
@@ -86,7 +88,7 @@ static Standard_Boolean Project(const Handle(Geom2d_Curve)& C,
   else {
     Extrema_ExtPC2d extrema(P,AC);
     if (extrema.IsDone()) {
-      Standard_Integer i,n = extrema.NbExt();
+      Standard_Integer i = 0,n = extrema.NbExt();
       
       Standard_Real d2 = RealLast();
       for (i = 1; i <= n; i++) {
@@ -523,7 +525,7 @@ void  BRepLib_MakeEdge2d::Init(const Handle(Geom2d_Curve)& C,
 {
   // try projecting the vertices on the curve
 
-  Standard_Real p1,p2;
+  Standard_Real p1 = NAN,p2 = NAN;
   
   if (V1.IsNull())
     p1 = C->FirstParameter();
index 632372c33bb1509de82fa1cfa13cbe652be1e9ed..69974ae073371bdb94024b750656b9be02bb189f 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRepLib.hxx>
 #include <BRepLib_FindSurface.hxx>
@@ -439,7 +441,7 @@ void  BRepLib_MakeFace::Init(const Handle(Geom_Surface)& S,
 {
   myError = BRepLib_FaceDone;
   if (Bound) {
-    Standard_Real UMin,UMax,VMin,VMax;
+    Standard_Real UMin = NAN,UMax = NAN,VMin = NAN,VMax = NAN;
     S->Bounds(UMin,UMax,VMin,VMax);
     Init(S,UMin,UMax,VMin,VMax,TolDegen);
   }
@@ -532,7 +534,7 @@ void  BRepLib_MakeFace::Init(const Handle(Geom_Surface)& SS,
   Standard_Real VMin = Vm;
   Standard_Real VMax = VM;
 
-  Standard_Real umin,umax,vmin,vmax,T;
+  Standard_Real umin = NAN,umax = NAN,vmin = NAN,vmax = NAN,T = NAN;
 
   Handle(Geom_Surface) S = SS, BS = SS;
   Handle(Geom_RectangularTrimmedSurface) RS = 
@@ -612,7 +614,7 @@ void  BRepLib_MakeFace::Init(const Handle(Geom_Surface)& SS,
   // compute 3d curves and degenerate flag
   Standard_Real maxTol = TolDegen;
   Handle(Geom_Curve) Cumin,Cumax,Cvmin,Cvmax;
-  Standard_Boolean Dumin,Dumax,Dvmin,Dvmax;
+  Standard_Boolean Dumin = 0,Dumax = 0,Dvmin = 0,Dvmax = 0;
   Dumin = Dumax = Dvmin = Dvmax = Standard_False;
   Standard_Real uminTol = Precision::Confusion(), 
                 umaxTol = Precision::Confusion(), 
index e29094422bf3ed980cea446d0c242cd805910afd..22e2cea1451972b886acae893405b2aa35349fb5 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRepLib.hxx>
 #include <BRepLib_MakeFace.hxx>
@@ -55,7 +57,7 @@ BRepLib_MakeShell::BRepLib_MakeShell() :
 BRepLib_MakeShell::BRepLib_MakeShell(const Handle(Geom_Surface)& S,
                                     const Standard_Boolean Segment)
 {
-  Standard_Real UMin,UMax,VMin,VMax;
+  Standard_Real UMin = NAN,UMax = NAN,VMin = NAN,VMax = NAN;
   S->Bounds(UMin,UMax,VMin,VMax);
   Init(S,UMin,UMax,VMin,VMax,Segment);
 }
@@ -115,7 +117,7 @@ void BRepLib_MakeShell::Init(const Handle(Geom_Surface)& S,
   TColGeom2d_Array1OfCurve uisos(1,nu+1);
   TColGeom2d_Array1OfCurve visos(1,nv+1);
 
-  Standard_Integer iu,iv;
+  Standard_Integer iu = 0,iv = 0;
 
   GS.UIntervals(upars,GeomAbs_C2);
   gp_Dir2d dv(0,1);
@@ -356,10 +358,10 @@ void BRepLib_MakeShell::Init(const Handle(Geom_Surface)& S,
   myShape.Closed (BRep_Tool::IsClosed (myShape));
 
   // Additional checking for degenerated edges
-  Standard_Boolean isDegenerated;
-  Standard_Real aFirst, aLast;
+  Standard_Boolean isDegenerated = 0;
+  Standard_Real aFirst = NAN, aLast = NAN;
   Standard_Real aTol = Precision::Confusion();
-  Standard_Real anActTol;
+  Standard_Real anActTol = NAN;
   TopExp_Explorer anExp(myShape, TopAbs_EDGE);
   for ( ; anExp.More(); anExp.Next())
   {
index b91b7d0d032cb417d5c88d506a13e3f6b85c9a7d..54db994122b6294a83b84bc036d330a92b912905 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepLib_MakeWire.hxx>
@@ -293,13 +295,13 @@ void  BRepLib_MakeWire::Add(const TopoDS_Edge& E, Standard_Boolean IsCheckGeomet
           for (Standard_Integer i = 1; i <= myVertices.Extent(); i++) {
             const TopoDS_Vertex& VW = TopoDS::Vertex(myVertices.FindKey(i));
            gp_Pnt PW = BRep_Tool::Pnt(VW);
-           Standard_Real l = PE.Distance(PW), tolE, tolW;
+           Standard_Real l = PE.Distance(PW), tolE = NAN, tolW = NAN;
            tolW = BRep_Tool::Tolerance(VW);
            tolE = BRep_Tool::Tolerance(VE);
            
            if ((l < tolE) || (l < tolW)) {
 
-             Standard_Real maxtol = .5*(tolW + tolE + l), cW, cE;
+             Standard_Real maxtol = .5*(tolW + tolE + l), cW = NAN, cE = NAN;
              if(maxtol > tolW && maxtol > tolE) {
                cW = (maxtol - tolE)/l; 
                cE = 1. - cW;
index 7e3f332ecbb989d157eec41df3f89c2c2176cc6e..6dc56f1b705bc63211923096b443a8bfcfcdf23c 100644 (file)
@@ -353,7 +353,7 @@ void BRepLib_MakeWire::CreateNewListOfEdges(const TopTools_ListOfShape& theL,
   TopTools_ListOfShape& theNewEList)
 {
   ///create the new list (theNewEList) from the input list L
-  Standard_Boolean IsNewEdge;
+  Standard_Boolean IsNewEdge = 0;
   NCollection_List<TopoDS_Vertex> aVList;
   TopExp_Explorer exp;
   BRep_Builder aBB;
index 0dcb94a095960ea7424cda486b4a80669934cfae..68b62d6d82e59002227efc60f41ef419717b4f47 100644 (file)
@@ -205,7 +205,7 @@ Standard_Boolean BRepLib_PointCloudShape::addDensityPoints (const TopoDS_Shape&
   BRepTools::UVBounds (aFace, anUMin, anUMax, aVMin, aVMax);
   BRepTopAdaptor_FClass2d aClassifier (aFace, Precision::Confusion());
 
-  TopLoc_Location aLoc = theFace.Location();
+  const TopLoc_Location& aLoc = theFace.Location();
   const gp_Trsf& aTrsf = aLoc.Transformation();
   TopLoc_Location aLoc1;
   Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aFace, aLoc1);
index 2b55aa7c217d6a5a7621d3adccbd804dcf8e6075..586a8ea7f3b1bc1e81e33689ffa9abff51d0c80e 100644 (file)
@@ -17,6 +17,7 @@
 #include <BRepCheck.hxx>
 #include <Extrema_LocateExtPC.hxx>
 #include <GeomLib_CheckCurveOnSurface.hxx>
+#include <utility>
 
 //=============================================================================
 //function : BRepLib_ValidateEdge
@@ -25,8 +26,8 @@
 BRepLib_ValidateEdge::BRepLib_ValidateEdge(Handle(Adaptor3d_Curve) theReferenceCurve, 
                                            Handle(Adaptor3d_CurveOnSurface) theOtherCurve, 
                                            Standard_Boolean theSameParameter):
-  myReferenceCurve(theReferenceCurve),
-  myOtherCurve(theOtherCurve),
+  myReferenceCurve(std::move(theReferenceCurve)),
+  myOtherCurve(std::move(theOtherCurve)),
   mySameParameter(theSameParameter),
   myControlPointsNumber(22),
   myToleranceForChecking(0),
index dcbd1e4084957365e6a358be3dd443556690c808..06806a673ceb6194ccd4df912a1aca5c722ed3a3 100644 (file)
@@ -65,7 +65,7 @@ void BRepMAT2d_BisectingLocus::Compute(BRepMAT2d_Explorer&        anExplo,
   MAT2d_Mat2d                        TheMAT( IsOpenResult );
   Handle(MAT_ListOfBisector)         TheRoots = new MAT_ListOfBisector();
   MAT2d_SequenceOfSequenceOfGeometry Figure;
-  Standard_Integer                   i;
+  Standard_Integer                   i = 0;
 
   nbSect.Clear();
   theGraph = new MAT_Graph();
@@ -169,10 +169,10 @@ void BRepMAT2d_BisectingLocus::RenumerationAndFusion
          Standard_Integer&             IndexLast,
          MAT_DataMapOfIntegerBasicElt& NewMap)
 {
-  Standard_Integer IndFirst;
-  Standard_Integer i,j;
-  Standard_Integer GeomIndexArc1,GeomIndexArc2,GeomIndexArc3,GeomIndexArc4;
-  Standard_Boolean MergeArc1,MergeArc2;
+  Standard_Integer IndFirst = 0;
+  Standard_Integer i = 0,j = 0;
+  Standard_Integer GeomIndexArc1 = 0,GeomIndexArc2 = 0,GeomIndexArc3 = 0,GeomIndexArc4 = 0;
+  Standard_Boolean MergeArc1 = 0,MergeArc2 = 0;
 
   for ( i = 1; i <= LengthLine; i++) {
     const TColStd_SequenceOfInteger& S = theTool.Circuit()->RefToEqui(ILine,i);
@@ -259,7 +259,7 @@ Handle(MAT_BasicElt) BRepMAT2d_BisectingLocus::BasicElt
        const Standard_Integer Index  ) 
      const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer Ind = Index;
 
   for (i = 1 ; i < IndLine ; i++){
@@ -323,9 +323,9 @@ static void CutSketch (MAT2d_SequenceOfSequenceOfGeometry&    Figure,
                       MAT2d_DataMapOfBiIntInteger&           NbSect)
 {
   MAT2d_CutCurve   Cuter;
-  Standard_Integer i,j,k,ico;
-  Standard_Integer ICurveInit;
-  Standard_Integer NbSection;
+  Standard_Integer i = 0,j = 0,k = 0,ico = 0;
+  Standard_Integer ICurveInit = 0;
+  Standard_Integer NbSection = 0;
 
   for ( i = 1; i <= Figure.Length(); i++) {
     TColGeom2d_SequenceOfGeometry& Contour = Figure.ChangeValue(i);  
index 32ba12c3be2b186c5d1763b0e8b292970fc7af95..e1e4948759f5a201b19da6fb075837eb18268b13 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepBuilderAPI_MakeFace.hxx>
@@ -132,7 +134,7 @@ void BRepMAT2d_Explorer::Add(const TopoDS_Wire& Spine,
 
   TopoDS_Edge                 aFirstEdge = anExp.Current();
   TopoDS_Edge                 aPrevEdge = aFirstEdge;
-  Standard_Real               UFirst,ULast, aD;
+  Standard_Real               UFirst = NAN,ULast = NAN, aD = NAN;
   Handle(Geom2d_Curve)        C2d;
   Handle(Geom2d_TrimmedCurve) CT2d;
   Handle(Geom2d_TrimmedCurve) aFirstCurve;
@@ -163,7 +165,7 @@ void BRepMAT2d_Explorer::Add(const TopoDS_Wire& Spine,
 
   // Treatment of the next edges:
   for (; anExp.More(); anExp.Next()) {
-    TopoDS_Edge  anEdge = anExp.Current();
+    const TopoDS_Edge&  anEdge = anExp.Current();
 
     anOldNewE.Add(anEdge, anEdge);
     C2d  = BRep_Tool::CurveOnSurface (anEdge, aFace, UFirst, ULast);
@@ -294,7 +296,7 @@ void BRepMAT2d_Explorer::Add(const TopoDS_Wire& Spine,
   BRep_Builder aBuilder;
 
   if (isModif) {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Integer aNbEdges = anOldNewE.Extent();
 
     aBuilder.MakeWire(aNewWire);
index 9c530d18226ed9d7370f5aafe05c493cac26ab1c..19a704f3e0a8fbf95693c3acb276b17b154ecd76 100644 (file)
@@ -121,8 +121,8 @@ private:
 
 
   MAT2d_SequenceOfSequenceOfCurve theCurves;
-  Standard_Integer current;
-  Standard_Integer currentContour;
+  Standard_Integer current{};
+  Standard_Integer currentContour{};
   TopoDS_Shape myShape;
   TColStd_SequenceOfBoolean myIsClosed;
   TopTools_IndexedDataMapOfShapeShape myModifShapes;
index b28b253baac07b791c2346ec841e0aeb84e57db3..2ac41ad384c7b417fc08746dba3409378bfcd772 100644 (file)
@@ -164,7 +164,7 @@ void BRepMAT2d_LinkTopoBilo::LinkToWire(const TopoDS_Wire&              W,
                                        const BRepMAT2d_BisectingLocus& BiLo)
 {
   BRepTools_WireExplorer       TheExp (W);
-  Standard_Integer             KC;
+  Standard_Integer             KC = 0;
   TopoDS_Vertex                VF,VL;
   TopoDS_Shape                 S;
   Handle(MAT_BasicElt)         BE;
@@ -234,7 +234,7 @@ void LinkToContour (const BRepMAT2d_Explorer&              Explo,
   Handle (Standard_Type)   Type;
   Standard_Boolean         DirectSense   = Standard_True;
   Standard_Boolean         LastPoint     = Standard_False;
-  Standard_Integer         NbSect,ISect;     
+  Standard_Integer         NbSect = 0,ISect = 0;     
 
   //---------------------------------------------------
   // NbSect : number of sections on the current curve.
index 98ff365f5af93f1f4979570048796ef33c3bea06..77e1ead67cfdc01bb054a36fc6f9994de4e6c04d 100644 (file)
@@ -88,8 +88,8 @@ private:
   BRepMAT2d_DataMapOfShapeSequenceOfBasicElt myMap;
   BRepMAT2d_DataMapOfBasicEltShape myBEShape;
   TopoDS_Shape myKey;
-  Standard_Integer current;
-  Standard_Boolean isEmpty;
+  Standard_Integer current{};
+  Standard_Boolean isEmpty{};
 
 
 };
index da37dfca9b65b1d606c14bacc51710e13bcce03b..47e77f86b6f82f17f55adbb93a096eb2c9463791 100644 (file)
@@ -182,7 +182,7 @@ Standard_Integer BRepMesh_BaseMeshAlgo::addLinkToMesh(
   const Standard_Integer   theLastNodeId,
   const TopAbs_Orientation theOrientation)
 {
-  Standard_Integer aLinkIndex;
+  Standard_Integer aLinkIndex = 0;
   if (theOrientation == TopAbs_REVERSED)
     aLinkIndex = myStructure->AddLink(BRepMesh_Edge(theLastNodeId, theFirstNodeId, BRepMesh_Frontier));
   else if (theOrientation == TopAbs_INTERNAL)
index 67aa20ee60ae04c37379b8039f226f6c21426f5c..9fa2370fab2284d1e00c6eb418a710412cb27875 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_CircleTool.hxx>
 #include <BRepMesh_GeomTool.hxx>
 #include <gp_Circ2d.hxx>
@@ -147,7 +149,7 @@ Standard_Boolean BRepMesh_CircleTool::Bind(const Standard_Integer theIndex,
                                            const gp_XY&           thePoint3)
 {
   gp_XY aLocation;
-  Standard_Real aRadius;
+  Standard_Real aRadius = NAN;
   if (!MakeCircle(thePoint1, thePoint2, thePoint3, aLocation, aRadius))
     return Standard_False;
 
index 30f853cb84ef9dc41715de3b8cf56633a0886b03..7a8e349bfc663a57f6807c09463bfaa59f2adfd3 100644 (file)
@@ -88,7 +88,7 @@ void BRepMesh_Classifier::RegisterWire(
   // Accumulate angle
   TColgp_Array1OfPnt2d aPClass(1, aNbPnts);
   Standard_Real anAngle = 0.0;
-  const gp_Pnt2d *p1 = theWire(1), *p2 = theWire(2), *p3;
+  const gp_Pnt2d *p1 = theWire(1), *p2 = theWire(2), *p3 = nullptr;
   aPClass(1) = *p1;
   aPClass(2) = *p2;
 
index cc61eedb9d1a8e72845319c78f1f1812de33359b..5cf3606d9a332858a1a6eb6ad2e96d121536cd09 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_ConeRangeSplitter.hxx>
 
 #include <GCPnts_TangentialDeflection.hxx>
@@ -35,7 +37,7 @@ std::pair<Standard_Real, Standard_Real> BRepMesh_ConeRangeSplitter::GetSplitStep
   Standard_Real aRadius = Max(Abs(aRefR + aRangeV.first  * Sin(aSAng)),
                               Abs(aRefR + aRangeV.second * Sin(aSAng)));
 
-  Standard_Real Dv, Du = GCPnts_TangentialDeflection::ArcAngularStep(
+  Standard_Real Dv = NAN, Du = GCPnts_TangentialDeflection::ArcAngularStep(
     aRadius, GetDFace()->GetDeflection(),
     theParameters.Angle, theParameters.MinSize);
 
index c8e942ec3a686f217139febcdfd93c40d0c5fa88..8bb71c4a0067d11217887309fdcc76517f0e0412 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_CurveTessellator.hxx>
 #include <gp_Pnt.hxx>
 #include <TopoDS_Edge.hxx>
@@ -183,7 +185,7 @@ void BRepMesh_CurveTessellator::splitByDeflection2d ()
 
       const TopoDS_Edge aCurrEdge = TopoDS::Edge(myEdge.Oriented(aPCurve->GetOrientation()));
 
-      Standard_Real aF, aL;
+      Standard_Real aF = NAN, aL = NAN;
       Handle (Geom2d_Curve) aCurve2d = BRep_Tool::CurveOnSurface (aCurrEdge, aFace, aF, aL);
       TColStd_Array1OfReal aParamArray (1, aNodesNb);
       for (Standard_Integer i = 1; i <= aNodesNb; ++i)
@@ -305,7 +307,7 @@ void BRepMesh_CurveTessellator::splitSegment (
 
   gp_Pnt2d uvf, uvl, uvm;
   gp_Pnt   P3dF, P3dL, midP3d, midP3dFromSurf;
-  Standard_Real midpar;
+  Standard_Real midpar = NAN;
 
   if (Abs(theLast - theFirst) < 2 * Precision::PConfusion())
   {
index d9406a842309f94096212a60f858953df1e89535..a5386b31be122d9364e7888e05f1258df8f14392 100644 (file)
@@ -102,11 +102,11 @@ private:
   GCPnts_TangentialDeflection   myDiscretTool;
   TopoDS_Vertex                 myFirstVertex;
   TopoDS_Vertex                 myLastVertex;
-  Standard_Real                 mySquareEdgeDef;
-  Standard_Real                 mySquareMinSize;
-  Standard_Real                 myEdgeSqTol;
-  Standard_Real                 myFaceRangeU[2];
-  Standard_Real                 myFaceRangeV[2];
+  Standard_Real                 mySquareEdgeDef{};
+  Standard_Real                 mySquareMinSize{};
+  Standard_Real                 myEdgeSqTol{};
+  Standard_Real                 myFaceRangeU[2]{};
+  Standard_Real                 myFaceRangeV[2]{};
 };
 
 #endif
\ No newline at end of file
index dee351928b0eb1c6f6cc01b34b71ba3bd7f97ad4..b84600cc25c65a57972aef2c27883e4320f2be22 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_DefaultRangeSplitter.hxx>
 
 #include <GeomAdaptor_Curve.hxx>
@@ -162,8 +164,8 @@ Standard_Real BRepMesh_DefaultRangeSplitter::computeLengthU()
 
   Standard_Real du     = 0.05 * (myRangeU.second - myRangeU.first);
   Standard_Real dfvave = 0.5  * (myRangeV.second + myRangeV.first);
-  Standard_Real dfucur;
-  Standard_Integer i1;
+  Standard_Real dfucur = NAN;
+  Standard_Integer i1 = 0;
 
   const Handle(BRepAdaptor_Surface)& gFace = GetSurface();
   gFace->D0(myRangeU.first, myRangeV.first,  P11);
@@ -194,8 +196,8 @@ Standard_Real BRepMesh_DefaultRangeSplitter::computeLengthV()
 
   Standard_Real dv     = 0.05 * (myRangeV.second - myRangeV.first);
   Standard_Real dfuave = 0.5  * (myRangeU.second + myRangeU.first);
-  Standard_Real dfvcur;
-  Standard_Integer i1;
+  Standard_Real dfvcur = NAN;
+  Standard_Integer i1 = 0;
 
   const Handle(BRepAdaptor_Surface)& gFace = GetSurface();
   gFace->D0(myRangeU.first,  myRangeV.first, P11);
index 7e274d7b01d32e2ccc36a10cfc7ddf07d3b515f9..2980861266d2f6f5685caa484020de87f30566ec 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_Deflection.hxx>
 
 #include <BRepBndLib.hxx>
@@ -47,7 +49,7 @@ Standard_Real BRepMesh_Deflection::ComputeAbsoluteDeflection(
 
   // Adjust resulting value in relation to the total size
 
-  Standard_Real aX1, aY1, aZ1, aX2, aY2, aZ2;
+  Standard_Real aX1 = NAN, aY1 = NAN, aZ1 = NAN, aX2 = NAN, aY2 = NAN, aZ2 = NAN;
   aBox.Get(aX1, aY1, aZ1, aX2, aY2, aZ2);
   const Standard_Real aMaxShapeSize = (theMaxShapeSize > 0.0) ? theMaxShapeSize :
                                        Max(aX2 - aX1, Max(aY2 - aY1, aZ2 - aZ1));
@@ -87,7 +89,7 @@ void BRepMesh_Deflection::ComputeDeflection (
   TopExp::Vertices(anEdge, aFirstVertex, aLastVertex);
 
   Handle(Geom_Curve) aCurve;
-  Standard_Real aFirstParam, aLastParam;
+  Standard_Real aFirstParam = NAN, aLastParam = NAN;
   if (BRepMesh_ShapeTool::Range(anEdge, aCurve, aFirstParam, aLastParam))
   {
     const Standard_Real aDistF = aFirstVertex.IsNull() ? -1.0 : 
index 0aa1eeb2bab2fcb502cbc4dbe44f4ca8d8a63490..a0e7febd1f870ff3009880ed78cd9a9827bc3a78 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_Delaun.hxx>
 
 #include <gp_XY.hxx>
@@ -226,7 +228,7 @@ void BRepMesh_Delaun::initCirclesTool (const Bnd_Box2d&       theBox,
                                        const Standard_Integer theCellsCountU,
                                        const Standard_Integer theCellsCountV)
 {
-  Standard_Real aMinX, aMinY, aMaxX, aMaxY;
+  Standard_Real aMinX = NAN, aMinY = NAN, aMaxX = NAN, aMaxY = NAN;
   theBox.Get  ( aMinX, aMinY, aMaxX, aMaxY );
   const Standard_Real aDeltaX = aMaxX - aMinX;
   const Standard_Real aDeltaY = aMaxY - aMinY;
@@ -287,7 +289,7 @@ void BRepMesh_Delaun::perform(IMeshData::VectorOfInteger& theVertexIndices,
 //=======================================================================
 void BRepMesh_Delaun::superMesh(const Bnd_Box2d& theBox)
 {
-  Standard_Real aMinX, aMinY, aMaxX, aMaxY;
+  Standard_Real aMinX = NAN, aMinY = NAN, aMaxX = NAN, aMaxY = NAN;
   theBox.Get  ( aMinX, aMinY, aMaxX, aMaxY );
   Standard_Real aDeltaX = aMaxX - aMinX;
   Standard_Real aDeltaY = aMaxY - aMinY;
@@ -548,7 +550,7 @@ void BRepMesh_Delaun::createTrianglesOnNewVertices(
   Handle(NCollection_IncAllocator) aAllocator =
     new NCollection_IncAllocator(IMeshData::MEMORY_BLOCK_SIZE_HUGE);
 
-  Standard_Real aTolU, aTolV;
+  Standard_Real aTolU = NAN, aTolV = NAN;
   myMeshData->Data()->GetTolerance(aTolU, aTolV);
   const Standard_Real aSqTol = aTolU * aTolU + aTolV * aTolV;
 
@@ -979,7 +981,7 @@ Standard_Boolean BRepMesh_Delaun::meshLeftPolygonOf(
   const BRepMesh_Edge& aRefEdge = GetEdge( theStartEdgeId );
 
   IMeshData::SequenceOfInteger aPolygon;
-  Standard_Integer aStartNode, aPivotNode;
+  Standard_Integer aStartNode = 0, aPivotNode = 0;
   if ( isForward )
   {
     aPolygon.Append( theStartEdgeId );
@@ -1103,7 +1105,7 @@ Standard_Integer BRepMesh_Delaun::findNextPolygonLink(
   const gp_Vec2d&                       theRefLinkDir,
   const IMeshData::SequenceOfBndB2d&    theBoxes,
   const IMeshData::SequenceOfInteger&   thePolygon,
-  const Handle(IMeshData::MapOfInteger) theSkipped,
+  const Handle(IMeshData::MapOfInteger)& theSkipped,
   const Standard_Boolean&               isSkipLeprous,
   IMeshData::MapOfInteger&              theLeprousLinks,
   IMeshData::MapOfInteger&              theDeadLinks,
@@ -2182,14 +2184,14 @@ void BRepMesh_Delaun::RemoveVertex( const BRepMesh_Vertex& theVertex )
   {
     const BRepMesh_Edge& anEdge = GetEdge( aLoopEdgesIt.Key() );
     Standard_Integer aFirstNode = anEdge.FirstNode();
-    Standard_Integer aLastNode;
+    Standard_Integer aLastNode = 0;
     Standard_Integer aPivotNode = anEdge.LastNode();
     Standard_Integer anEdgeId   = aLoopEdgesIt.Key();
     
     Standard_Boolean isPositive = aLoopEdges( anEdgeId ) != 0;
     if ( !isPositive )
     {
-      Standard_Integer aTmp;
+      Standard_Integer aTmp = 0;
       aTmp       = aFirstNode;
       aFirstNode = aPivotNode;
       aPivotNode = aTmp;
@@ -2212,7 +2214,7 @@ void BRepMesh_Delaun::RemoveVertex( const BRepMesh_Vertex& theVertex )
         if ( aLinkIt.Value() != anEdgeId &&
              aLoopEdges.IsBound( aLinkIt.Value() ) )
         {
-          Standard_Integer aCurrentNode;
+          Standard_Integer aCurrentNode = 0;
           anEdgeId = aLinkIt.Value();
           const BRepMesh_Edge& anEdge1 = GetEdge( anEdgeId );
           
@@ -2446,8 +2448,8 @@ Standard_Boolean BRepMesh_Delaun::Contains( const Standard_Integer theTriangleId
   Standard_Real aDistance[3];
   Standard_Real aSqModulus[3];
 
-  Standard_Real aSqMinDist;
-  Standard_Integer aEdgeOnId;
+  Standard_Real aSqMinDist = NAN;
+  Standard_Integer aEdgeOnId = 0;
   aSqMinDist = calculateDist( aVEdges, aPoints, theVertex, aDistance, aSqModulus, aEdgeOnId );
   if ( aSqMinDist < 0 )
     return Standard_False;
old mode 100755 (executable)
new mode 100644 (file)
index fb57554..8106590
@@ -214,7 +214,7 @@ private:
                                         const gp_Vec2d&                       theRefLinkDir,
                                         const IMeshData::SequenceOfBndB2d&    theBoxes,
                                         const IMeshData::SequenceOfInteger&   thePolygon,
-                                        const Handle(IMeshData::MapOfInteger) theSkipped,
+                                        const Handle(IMeshData::MapOfInteger)& theSkipped,
                                         const Standard_Boolean&               isSkipLeprous,
                                         IMeshData::MapOfInteger&              theLeprousLinks,
                                         IMeshData::MapOfInteger&              theDeadLinks,
index 31c7963c5983f4d42d546aaf946d4bd7a68e4c97..803ede971e6e14b077f436bac12e0f2768753402 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_EdgeDiscret.hxx>
 #include <BRepMesh_Deflection.hxx>
 #include <IMeshData_Model.hxx>
@@ -258,7 +260,7 @@ void BRepMesh_EdgeDiscret::Tessellate3d(
   if (theUpdateEnds)
   {
     gp_Pnt aPoint;
-    Standard_Real aParam;
+    Standard_Real aParam = NAN;
     theTessellator->Value(1, aPoint, aParam);
     aCurve->AddPoint(BRep_Tool::Pnt(aFirstVertex), aParam);
   }
@@ -268,7 +270,7 @@ void BRepMesh_EdgeDiscret::Tessellate3d(
     for (Standard_Integer i = 2; i < theTessellator->PointsNb(); ++i)
     {
       gp_Pnt aPoint;
-      Standard_Real aParam;
+      Standard_Real aParam = NAN;
       if (!theTessellator->Value(i, aPoint, aParam))
         continue;
 
@@ -286,7 +288,7 @@ void BRepMesh_EdgeDiscret::Tessellate3d(
   if (theUpdateEnds)
   {
     gp_Pnt aPoint;
-    Standard_Real aParam;
+    Standard_Real aParam = NAN;
     theTessellator->Value(theTessellator->PointsNb(), aPoint, aParam);
     aCurve->AddPoint(BRep_Tool::Pnt(aLastVertex), aParam);
   }
@@ -311,7 +313,7 @@ void BRepMesh_EdgeDiscret::Tessellate2d(
 
     const Handle(Adaptor2d_Curve2d)& aGeomPCurve = aProvider.GetPCurve();
 
-    Standard_Integer aParamIdx, aParamNb;
+    Standard_Integer aParamIdx = 0, aParamNb = 0;
     if (theUpdateEnds)
     {
       aParamIdx = 0;
index b78238d692857d6fc3910d8cd37f3e7fda43eddc..32563d78bffc60e7899c8a880a04e32160f8f8c6 100644 (file)
@@ -132,13 +132,13 @@ namespace
     }
 
     //! Indicates should the given box be rejected or not.
-    virtual Standard_Boolean Reject(const Bnd_Box2d& theBox) const
+    Standard_Boolean Reject(const Bnd_Box2d& theBox) const override
     {
       return myBox.IsOut(theBox);
     }
 
     //! Accepts segment with the given index in case if it fits conditions.
-    virtual Standard_Boolean Accept(const Standard_Integer& theSegmentIndex)
+    Standard_Boolean Accept(const Standard_Integer& theSegmentIndex) override
     {
       const BRepMesh_FaceChecker::Segment& aSegment = mySegments->Value(theSegmentIndex);
 
index ffa764943389daa0757ed251d98daf41e6cf7bd9..b5e05194867150e6b28b3d1a1e7f0b0be0cfdbf4 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_GeomTool.hxx>
 
 #include <BRepMesh_DefaultRangeSplitter.hxx>
@@ -210,7 +212,7 @@ Standard_Boolean BRepMesh_GeomTool::Value(
 
   const TopoDS_Face& aFace = theSurface->Face();
 
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   Handle(Geom2d_Curve) aCurve = 
     BRep_Tool::CurveOnSurface(*myEdge, aFace, aFirst, aLast);
 
@@ -445,14 +447,14 @@ std::pair<Standard_Integer, Standard_Integer> BRepMesh_GeomTool::CellsCount (
 
   const GeomAbs_SurfaceType aType = theSurface->GetType ();
 
-  Standard_Real anErrFactorU, anErrFactorV;
+  Standard_Real anErrFactorU = NAN, anErrFactorV = NAN;
   ComputeErrFactors(theDeflection, theSurface, anErrFactorU, anErrFactorV);
 
   const std::pair<Standard_Real, Standard_Real>& aRangeU = theRangeSplitter->GetRangeU();
   const std::pair<Standard_Real, Standard_Real>& aRangeV = theRangeSplitter->GetRangeV();
   const std::pair<Standard_Real, Standard_Real>& aDelta  = theRangeSplitter->GetDelta ();
 
-  Standard_Integer aCellsCountU, aCellsCountV;
+  Standard_Integer aCellsCountU = 0, aCellsCountV = 0;
   if (aType == GeomAbs_Torus)
   {
     aCellsCountU = (Standard_Integer)Ceiling(Pow(2, Log10(
index 3853c84075761257ed05a609ac931a942e835325..71d0f5f4d5ae97dc21f6abbe36c2ba9651fcd6ae 100644 (file)
@@ -144,8 +144,8 @@ public: //! @name plugin API
 protected:
 
   IMeshTools_Parameters myParameters;
-  Standard_Boolean      myModified;
-  Standard_Integer      myStatus;
+  Standard_Boolean      myModified{};
+  Standard_Integer      myStatus{};
 };
 
 #endif
index 79c25f8de9acf5073819be23aef2cee41b741a37..57bf0404e6b6133246b00cb59093b2f46c678a95 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_ModelBuilder.hxx>
 #include <BRepMeshData_Model.hxx>
 #include <BRepMesh_ShapeVisitor.hxx>
@@ -60,7 +62,7 @@ Handle (IMeshData_Model) BRepMesh_ModelBuilder::performInternal (
 
     if (theParameters.Relative)
     {
-      Standard_Real aMaxSize;
+      Standard_Real aMaxSize = NAN;
       BRepMesh_ShapeTool::BoxMaxDimension (aBox, aMaxSize);
       aModel->SetMaxSize(aMaxSize);
     }
index e987376b2cc8fff60fa174da3da4eb842369d9d8..66be29774c48803c8b4eeab5cdd3e6d10c1558eb 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_ModelPreProcessor.hxx>
 
 #include <BRepMesh_Deflection.hxx>
@@ -186,7 +188,7 @@ namespace
       TopoDS_Edge aE = theDEdge->GetEdge();
       const TopoDS_Face& aF = theDFace->GetFace();
 
-      Standard_Real aFParam, aLParam;
+      Standard_Real aFParam = NAN, aLParam = NAN;
 
       Handle(Geom_Curve) aHC = BRep_Tool::Curve (aE, aFParam, aLParam);
 
@@ -212,7 +214,7 @@ namespace
 
       // Define two pcurves of the seam-edge.
       Handle(Geom2d_Curve) aPC1, aPC2;
-      Standard_Real af, al;
+      Standard_Real af = NAN, al = NAN;
 
       aE.Orientation (TopAbs_FORWARD);
       aPC1 = BRep_Tool::CurveOnSurface (aE, aF, af, al);
index 0f78d5e924f3361656f10584b1e2fed1a7d6af6e..809dce4efdade01e4720e9d7e6c2dba439c7c9dc 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_NURBSRangeSplitter.hxx>
 
 #include <algorithm>
@@ -57,7 +59,7 @@ namespace
     {
       myParameters = theParameters;
 
-      Standard_Integer aStartIndex, aEndIndex;
+      Standard_Integer aStartIndex = 0, aEndIndex = 0;
       if (myIsoU)
       {
         aStartIndex = 1;
@@ -589,7 +591,7 @@ Handle(IMeshData::SequenceOfReal) BRepMesh_NURBSRangeSplitter::filterParameters(
   }
 
   TColStd_Array1OfReal aParamArray(1, anInitLen);
-  Standard_Integer j;
+  Standard_Integer j = 0;
   for (j = 1; j <= anInitLen; j++)
     aParamArray(j) = theParams(j);
 
@@ -607,7 +609,7 @@ Handle(IMeshData::SequenceOfReal) BRepMesh_NURBSRangeSplitter::filterParameters(
   }
 
   //perform filtering on series
-  Standard_Real aLastAdded, aLastCandidate;
+  Standard_Real aLastAdded = NAN, aLastCandidate = NAN;
   Standard_Boolean isCandidateDefined = Standard_False;
   aLastAdded = aParamArray(1);
   aLastCandidate = aLastAdded;
index bb3f924d2fea9d60636b92d020c0f5d757c5112c..a90321be4c878146a9c7fb37b7eb09ddd1a7d551 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_ShapeTool.hxx>
 #include <IMeshData_Edge.hxx>
 #include <IMeshData_PCurve.hxx>
@@ -89,7 +91,7 @@ void BRepMesh_ShapeTool::BoxMaxDimension(const Bnd_Box& theBox,
   if (theBox.IsVoid())
     return;
 
-  Standard_Real aMinX, aMinY, aMinZ, aMaxX, aMaxY, aMaxZ;
+  Standard_Real aMinX = NAN, aMinY = NAN, aMinZ = NAN, aMaxX = NAN, aMaxY = NAN, aMaxZ = NAN;
   theBox.Get(aMinX, aMinY, aMinZ, aMaxX, aMaxY, aMaxZ);
 
   theMaxDimension = Max(aMaxX - aMinX, Max(aMaxY - aMinY, aMaxZ - aMinZ));
@@ -115,7 +117,7 @@ void BRepMesh_ShapeTool::CheckAndUpdateFlags (
   const TopoDS_Face& aFace = thePCurve->GetFace ()->GetFace ();
 
   Handle (Geom_Curve) aCurve;
-  Standard_Real aFirstParam, aLastParam;
+  Standard_Real aFirstParam = NAN, aLastParam = NAN;
   Range (aEdge, aCurve, aFirstParam, aLastParam);
   if (aCurve.IsNull())
   {
@@ -326,7 +328,7 @@ Standard_Boolean BRepMesh_ShapeTool::UVPoints (
 {
 
   Handle (Geom2d_Curve) aCurve2d;
-  Standard_Real aFirstParam, aLastParam;
+  Standard_Real aFirstParam = NAN, aLastParam = NAN;
   if (!Range(theEdge, theFace, aCurve2d, aFirstParam, aLastParam, isConsiderOrientation))
   {
     return Standard_False;
index 455a473aba94171787f8644bff0f5329a04a1ff8..914d0823690a0f9dd1a4aebb30ab1b67fc44e3a6 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepMesh_TorusRangeSplitter.hxx>
 #include <GCPnts_TangentialDeflection.hxx>
 
@@ -42,7 +44,7 @@ Handle(IMeshData::ListOfPnt2d) BRepMesh_TorusRangeSplitter::GenerateSurfaceNodes
   const Standard_Integer nbV = Max((Standard_Integer) (aDiffV / Dv), 2);
   Dv = aDiffV / (nbV + 1);
 
-  Standard_Real Du;
+  Standard_Real Du = NAN;
   const Standard_Real ru = R + r;
   if (ru > 1.e-16)
   {
@@ -188,8 +190,8 @@ Handle(IMeshData::SequenceOfReal) BRepMesh_TorusRangeSplitter::fillParams(
 Standard_Real BRepMesh_TorusRangeSplitter::FUN_CalcAverageDUV(
   TColStd_Array1OfReal& P, const Standard_Integer PLen) const
 {
-  Standard_Integer i, j, n = 0;
-  Standard_Real p, result = 0.;
+  Standard_Integer i = 0, j = 0, n = 0;
+  Standard_Real p = NAN, result = 0.;
 
   for (i = 1; i <= PLen; i++)
   {
index 3393f924970265ade4fb19ee4f9fe5b4524a17b0..33e758b7e43c822fd510d386b769bbafebe2cdb1 100644 (file)
@@ -33,7 +33,7 @@ NCollection_CellFilter_Action BRepMesh_VertexInspector::Inspect(
   }
   
   gp_XY aVec = (myPoint - aVertex.Coord());
-  Standard_Boolean inTol;
+  Standard_Boolean inTol = 0;
   if (Abs(myTolerance[1]) < Precision::Confusion())
   {
     inTol = aVec.SquareModulus() < myTolerance[0];
index 68abb52863c70fc65ef3f6f30b8e8692193a94ab..d2c66c1aee833cd7189a648ebec59527bad9c653 100644 (file)
@@ -179,7 +179,7 @@ private:
   Handle(NCollection_IncAllocator) myAllocator;
   IMeshData::VertexCellFilter      myCellFilter;
   BRepMesh_VertexInspector         mySelector;
-  Standard_Real                    myTolerance[2];
+  Standard_Real                    myTolerance[2]{};
 };
 
 #endif
index c4b6f9cfb45867c5d3fb9a475ee0456f450366bb..cb068d411fdff400cbe51f17fda9b2977ccb07f2 100644 (file)
@@ -89,7 +89,7 @@ struct Vect
 
        Norm cross (const Vect& v) const // cross prod
        {
-               Norm n;
+               Norm n{};
                n.x = (Signed45)y*v.z - (Signed45)z*v.y;
                n.y = (Signed45)z*v.x - (Signed45)x*v.z;
                n.z = (Signed29)x*v.y - (Signed29)y*v.x;
@@ -108,7 +108,7 @@ struct CDelaBella : IDelaBella
 
                Vect operator - (const Vert& v) const // diff
                {
-                       Vect d;
+                       Vect d{};
                        d.x = (Signed15)x - (Signed15)v.x;
                        d.y = (Signed15)y - (Signed15)v.y;
                        d.z = (Signed29)z - (Signed29)v.z;
@@ -192,20 +192,20 @@ struct CDelaBella : IDelaBella
                }
        };
 
-       Vert* vert_alloc;
-       Face* face_alloc;
-       int max_verts;
-       int max_faces;
+       Vert* vert_alloc{};
+       Face* face_alloc{};
+       int max_verts{};
+       int max_faces{};
 
-       Face* first_dela_face;
-       Face* first_hull_face;
-       Vert* first_hull_vert;
+       Face* first_dela_face{};
+       Face* first_hull_face{};
+       Vert* first_hull_vert{};
 
-       int inp_verts;
-       int out_verts;
+       int inp_verts{};
+       int out_verts{};
 
-       int(*errlog_proc)(void* file, const char* fmt, ...);
-       void* errlog_file;
+       int(*errlog_proc)(void* file, const char* fmt, ...){};
+       void* errlog_file{};
 
        virtual ~CDelaBella ()
        {
@@ -294,7 +294,7 @@ struct CDelaBella : IDelaBella
                Face* cache = face_alloc;
                Face* hull = 0;
 
-               Face f; // tmp
+               Face f{}; // tmp
                f.v[0] = vert_alloc + 0;
                f.v[1] = vert_alloc + 1;
                f.v[2] = vert_alloc + 2;
@@ -835,7 +835,7 @@ struct CDelaBella : IDelaBella
                return true;
        }
 
-       virtual int Triangulate(int points, const float* x, const float* y = 0, int advance_bytes = 0)
+       int Triangulate(int points, const float* x, const float* y = 0, int advance_bytes = 0) override
        {
                if (!x)
                        return 0;
@@ -862,7 +862,7 @@ struct CDelaBella : IDelaBella
                return out_verts;
        }
 
-       virtual int Triangulate(int points, const double* x, const double* y, int advance_bytes)
+       int Triangulate(int points, const double* x, const double* y, int advance_bytes) override
        {
                if (!x)
                        return 0;
@@ -889,7 +889,7 @@ struct CDelaBella : IDelaBella
                return out_verts;
        }
 
-       virtual void Destroy()
+       void Destroy() override
        {
                if (face_alloc)
                        free(face_alloc);
@@ -899,33 +899,33 @@ struct CDelaBella : IDelaBella
        }
 
        // num of points passed to last call to Triangulate()
-       virtual int GetNumInputPoints() const
+       int GetNumInputPoints() const override
        {
                return inp_verts;
        }
 
        // num of verts returned from last call to Triangulate()
-       virtual int GetNumOutputVerts() const
+       int GetNumOutputVerts() const override
        {
                return out_verts;
        }
 
-       virtual const DelaBella_Triangle* GetFirstDelaunayTriangle() const
+       const DelaBella_Triangle* GetFirstDelaunayTriangle() const override
        {
                return first_dela_face;
        }
 
-       virtual const DelaBella_Triangle* GetFirstHullTriangle() const
+       const DelaBella_Triangle* GetFirstHullTriangle() const override
        {
                return first_hull_face;
        }
 
-       virtual const DelaBella_Vertex* GetFirstHullVertex() const
+       const DelaBella_Vertex* GetFirstHullVertex() const override
        {
                return first_hull_vert;
        }
 
-       virtual void SetErrLog(int(*proc)(void* stream, const char* fmt, ...), void* stream)
+       void SetErrLog(int(*proc)(void* stream, const char* fmt, ...), void* stream) override
        {
                errlog_proc = proc;
                errlog_file = stream;
index ef1270d2f23266d6022a044ca642ae4956e3dba1..a40de6ee1645090c13d2db56d8d3d3ee0a2bcabd 100644 (file)
@@ -96,8 +96,8 @@ private:
   Standard_EXPORT void SetParameters (const Standard_Real R1, const Standard_Real R2, const Standard_Real H);
 
 
-  Standard_Real myHalfAngle;
-  Standard_Real myRadius;
+  Standard_Real myHalfAngle{};
+  Standard_Real myRadius{};
 
 
 };
index 70be5502001ece35781684c63f3b7c89055d2332..2c80646b50ccc4e3b0d57680644eafd95695f4c8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRepPrim_FaceBuilder.hxx>
 #include <Geom2d_Line.hxx>
@@ -72,7 +74,7 @@ BRepPrim_FaceBuilder::BRepPrim_FaceBuilder(const BRep_Builder& B,
 void BRepPrim_FaceBuilder::Init(const BRep_Builder& B,
                                const Handle(Geom_Surface)& S)
 { 
-  Standard_Real UMin,UMax,VMin,VMax;
+  Standard_Real UMin = NAN,UMax = NAN,VMin = NAN,VMax = NAN;
   S->Bounds(UMin,UMax,VMin,VMax);
   Init(B,S,UMin,UMax,VMin,VMax);
 }
@@ -90,7 +92,7 @@ void BRepPrim_FaceBuilder::Init(const BRep_Builder& B,
                                const Standard_Real VMax) 
 {
   // Check the values
-  Standard_Real USMin,USMax,VSMin,VSMax;
+  Standard_Real USMin = NAN,USMax = NAN,VSMin = NAN,VSMax = NAN;
   S->Bounds(USMin,USMax,VSMin,VSMax);
   
   if (UMin >= UMax) throw Standard_ConstructionError("BRepPrim_FaceBuilder");
index c8343464ae2b67c38d1a1a95326706a4dcb678c3..cc604d4dd5f215505ea169c3647b70ad47c6e020 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRepPrim_GWedge.hxx>
 #include <ElCLib.hxx>
 #include <ElSLib.hxx>
@@ -95,7 +97,7 @@ static void BRepPrim_Wedge_Check(const Standard_Boolean V[],
                                   const Standard_Boolean W[],
                                   const Standard_Boolean F[])
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 0; i < NBVERTICES; i++)
     if (V[i]) throw Standard_DomainError();
   for (i = 0; i < NBEDGES; i++)
@@ -117,7 +119,7 @@ static void BRepPrim_Wedge_Init(Standard_Boolean& S,
                                  Standard_Boolean W[],
                                  Standard_Boolean F[])
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   S = Standard_False;
   for (i = 0; i < NBVERTICES; i++)
     V[i] = Standard_False;
@@ -482,7 +484,7 @@ const TopoDS_Face& BRepPrim_GWedge::Face
     gp_Lin L;
     gp_Dir DX = P.XAxis().Direction();
     gp_Dir DY = P.YAxis().Direction();
-    Standard_Real U,V,DU,DV;
+    Standard_Real U = NAN,V = NAN,DU = NAN,DV = NAN;
     if (HasEdge(d1,dd4)) {
       L = Line(d1,dd4);
     ElSLib::Parameters(P,L.Location(),U,V);
index 854f1470043dde81dd03886171cfd525c0eaccf1..d720ac3d860f9c6737c05f8a3b7ca054e82aa4c7 100644 (file)
@@ -211,16 +211,16 @@ private:
   Standard_Real X2Min;
   Standard_Real X2Max;
   TopoDS_Shell myShell;
-  Standard_Boolean ShellBuilt;
+  Standard_Boolean ShellBuilt{};
   TopoDS_Vertex myVertices[8];
-  Standard_Boolean VerticesBuilt[8];
+  Standard_Boolean VerticesBuilt[8]{};
   TopoDS_Edge myEdges[12];
-  Standard_Boolean EdgesBuilt[12];
+  Standard_Boolean EdgesBuilt[12]{};
   TopoDS_Wire myWires[6];
-  Standard_Boolean WiresBuilt[6];
+  Standard_Boolean WiresBuilt[6]{};
   TopoDS_Face myFaces[6];
-  Standard_Boolean FacesBuilt[6];
-  Standard_Boolean myInfinite[6];
+  Standard_Boolean FacesBuilt[6]{};
+  Standard_Boolean myInfinite[6]{};
 
 
 };
index f3a1e71add637fc12687db44d44172ad3d10a3a0..ff55754814b53340a9bc76f85851eefb7a3b435e 100644 (file)
@@ -75,7 +75,7 @@ static void BRepPrim_OneAxis_Check(const Standard_Boolean V[],
                                     const Standard_Boolean W[],
                                     const Standard_Boolean F[])
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 0; i < NBVERTICES; i++)
     if (V[i]) throw Standard_DomainError();
   for (i = 0; i < NBEDGES; i++)
@@ -100,12 +100,12 @@ BRepPrim_OneAxis::BRepPrim_OneAxis(const BRepPrim_Builder& B,
        myAngle(2*M_PI),
        myVMin(VMin),
        myVMax(VMax),
-       myMeridianOffset(0)
+       myMeridianOffset(0), ShellBuilt(Standard_False)
 
 {
   // init Built flags
-  Standard_Integer i;
-  ShellBuilt = Standard_False;
+  Standard_Integer i = 0;
+  
   for (i = 0; i < NBVERTICES; i++)
     VerticesBuilt[i] = Standard_False;
   for (i = 0; i < NBEDGES; i++)
index ea07e580a1b1de82d425809c492b5e74f0b5fdbc..675d089a3e489722d8da01f4ebe8f84d787949a0 100644 (file)
@@ -287,13 +287,13 @@ private:
   TopoDS_Shell myShell;
   Standard_Boolean ShellBuilt;
   TopoDS_Vertex myVertices[6];
-  Standard_Boolean VerticesBuilt[6];
+  Standard_Boolean VerticesBuilt[6]{};
   TopoDS_Edge myEdges[9];
-  Standard_Boolean EdgesBuilt[9];
+  Standard_Boolean EdgesBuilt[9]{};
   TopoDS_Wire myWires[9];
-  Standard_Boolean WiresBuilt[9];
+  Standard_Boolean WiresBuilt[9]{};
   TopoDS_Face myFaces[5];
-  Standard_Boolean FacesBuilt[5];
+  Standard_Boolean FacesBuilt[5]{};
 
 
 };
index 880be6166dfea76908ee5bcd18e32e625e219d35..c97bb47e52fe82d63caa79f5d77c836e75729b41 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepBuilderAPI_MakeVertex.hxx>
@@ -66,7 +68,7 @@ static Standard_Boolean  getNormalFromEdge(const TopoDS_Shape& theShape,
     TopExp_Explorer ex1(aF, TopAbs_EDGE);
     for (; ex1.More(); ex1.Next()) {
       if (ex1.Current().IsSame(theEdge)) {
-        Standard_Real f, l;
+        Standard_Real f = NAN, l = NAN;
         Handle(Geom2d_Curve) aC2d = BRep_Tool::CurveOnSurface(theEdge, aF, f, l);
         gp_Pnt2d aP2d = aC2d->Value(thePar);
         gp_Dir aNorm = getNormalOnFace(aF, aP2d.X(), aP2d.Y());
@@ -138,7 +140,7 @@ static Standard_Boolean FindExtrema(const gp_Pnt&        thePnt,
     if (ext.SupportTypeShape2(iext) == BRepExtrema_IsInFace) {
       TopoDS_Face aF = TopoDS::Face(ext.SupportOnShape2(iext));
       theMinPnt = ext.PointOnShape2(iext);
-      Standard_Real aU, aV;
+      Standard_Real aU = NAN, aV = NAN;
       ext.ParOnFaceS2(iext, aU, aV);
       theNormal = getNormalOnFace(aF, aU, aV);
       return Standard_True;
@@ -149,7 +151,7 @@ static Standard_Boolean FindExtrema(const gp_Pnt&        thePnt,
   for (Standard_Integer iext = 1; iext <= nbext; iext++) {
     if (ext.SupportTypeShape2(iext) == BRepExtrema_IsOnEdge) {
       theMinPnt = ext.PointOnShape2(iext);
-      Standard_Real aPar;
+      Standard_Real aPar = NAN;
       ext.ParOnEdgeS2(iext, aPar);
       TopoDS_Edge aE = TopoDS::Edge(ext.SupportOnShape2(iext));
       if (getNormalFromEdge(theShape, aE, aPar, theNormal))
index 8385f5aa13bc43c89bb397f784984899025d8ec0..ca104e6471192329ed5074aaaab73c21b768231e 100644 (file)
@@ -17,6 +17,8 @@
 // Modified by skv - Fri Mar  4 15:50:09 2005
 // Add methods for supporting history.
 
+#include <math.h>
+
 #include <BRep_TEdge.hxx>
 #include <BRepLib.hxx>
 #include <BRepPrimAPI_MakeRevol.hxx>
@@ -314,7 +316,7 @@ Standard_Boolean BRepPrimAPI_MakeRevol::CheckValidity(const TopoDS_Shape& theSha
     }
 
     TopLoc_Location L;
-    Standard_Real First, Last;
+    Standard_Real First = NAN, Last = NAN;
     Handle(Geom_Curve) C = BRep_Tool::Curve(anE, L, First, Last);
     gp_Trsf Tr = L.Transformation();
     C = Handle(Geom_Curve)::DownCast(C->Copy());
@@ -326,7 +328,7 @@ Standard_Boolean BRepPrimAPI_MakeRevol::CheckValidity(const TopoDS_Shape& theSha
     //Checking coincidence axe of revolution and basis curve
     //This code is taken directly from GeomAdaptor_SurfaceOfRevolution
     Standard_Integer Ratio = 1;
-    Standard_Real Dist;
+    Standard_Real Dist = NAN;
     gp_Pnt PP;
     do {
       PP = HC->Value(First + (Last - First) / Ratio);
index 590d80fd11442fd16a1363ca93a27c5a791fdf77..b572c271cc07b8101115f47766ac061192028dd2 100644 (file)
@@ -523,7 +523,7 @@ Standard_Boolean BRepSweep_NumLinearRegularSweep::IsUsed(const TopoDS_Shape& aGe
   {
     return Standard_False;
   }
-  Standard_Integer j;
+  Standard_Integer j = 0;
   Standard_Boolean isBuilt = Standard_False;
   Standard_Boolean isUsed = Standard_False;
   for (j = 2; j <= myBuiltShapes.UpperCol(); ++j)
index 679b850ff7fb0d346b8e435f505d43a40fafea06..32cd3af9b0c28ce0fc91c46e2cd1da77acaf985d 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepSweep_Rotation.hxx>
 
 #include <GeomAdaptor_SurfaceOfRevolution.hxx>
@@ -74,7 +76,7 @@ static Standard_Real ComputeTolerance(TopoDS_Edge& E,
 {
   if(BRep_Tool::Degenerated(E)) return BRep_Tool::Tolerance(E);
 
-  Standard_Real first,last;
+  Standard_Real first = NAN,last = NAN;
   
   Handle(Geom_Surface) surf = BRep_Tool::Surface(F);
   Handle(Geom_Curve)   c3d  = BRep_Tool::Curve(E,first,last);
@@ -109,7 +111,7 @@ static void SetThePCurve(const BRep_Builder& B,
                         const Handle(Geom2d_Curve)& C)
 {
   // check if there is already a pcurve
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   Handle(Geom2d_Curve) OC;
   TopLoc_Location SL;
   Handle(Geom_Plane) GP = Handle(Geom_Plane)::DownCast(BRep_Tool::Surface(F,SL));
@@ -231,7 +233,7 @@ TopoDS_Shape  BRepSweep_Rotation::MakeEmptyGeneratingEdge
   }
   else
   {
-    Standard_Real First,Last;
+    Standard_Real First = NAN,Last = NAN;
     TopLoc_Location Loc;
     Handle(Geom_Curve) C = Handle(Geom_Curve)::DownCast
       (BRep_Tool::Curve(TopoDS::Edge(aGenE),Loc,First,Last)->Copy());
@@ -328,12 +330,12 @@ TopoDS_Shape  BRepSweep_Rotation::MakeEmptyFace
   (const TopoDS_Shape& aGenS, 
    const Sweep_NumShape& aDirS)
 {
-  Standard_Real toler;
+  Standard_Real toler = NAN;
   TopoDS_Face F;
   Handle(Geom_Surface) S;
   if(aGenS.ShapeType()==TopAbs_EDGE){
     TopLoc_Location L;
-    Standard_Real First,Last;
+    Standard_Real First = NAN,Last = NAN;
     Handle(Geom_Curve) C = BRep_Tool::Curve(TopoDS::Edge(aGenS),L,First,Last);
     toler = BRep_Tool::Tolerance(TopoDS::Edge(aGenS));
     gp_Trsf Tr = L.Transformation();
@@ -419,7 +421,7 @@ void  BRepSweep_Rotation::SetPCurve
 {
   //Set on edges of cap faces the same pcurves as 
   //on edges of the generator face.
-  Standard_Real First,Last;
+  Standard_Real First = NAN,Last = NAN;
   SetThePCurve(myBuilder.Builder(),
               TopoDS::Edge(aNewEdge),
               TopoDS::Face(aNewFace),
@@ -444,8 +446,8 @@ void  BRepSweep_Rotation::SetGeneratingPCurve
 {
   TopLoc_Location Loc;
   GeomAdaptor_Surface AS(BRep_Tool::Surface(TopoDS::Face(aNewFace),Loc));
-  Standard_Real First,Last;
-  Standard_Real u,v;
+  Standard_Real First = NAN,Last = NAN;
+  Standard_Real u = NAN,v = NAN;
   gp_Pnt point;
   gp_Pnt2d pnt2d;
   gp_Dir2d dir2d;
@@ -550,7 +552,7 @@ void  BRepSweep_Rotation::SetDirectingPCurve
     par = BRep_Tool::Parameter(TopoDS::Vertex(aGenV),TopoDS::Edge(aGenE));
   gp_Pnt p2 = BRep_Tool::Pnt(TopoDS::Vertex(aGenV));
   gp_Pnt2d p22d;
-  Standard_Real u,v;
+  Standard_Real u = NAN,v = NAN;
   Handle(Geom2d_Curve) thePCurve;
 
   switch(AS.GetType()){
@@ -596,7 +598,7 @@ void  BRepSweep_Rotation::SetDirectingPCurve
   case GeomAbs_Torus : 
     {
       gp_Pnt p1;
-      Standard_Real u1,u2,v1,v2;
+      Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
       gp_Torus tor = AS.Torus();
       BRepAdaptor_Curve BC(TopoDS::Edge(aGenE));
       p1 = BC.Value(BC.FirstParameter());
@@ -660,7 +662,7 @@ TopAbs_Orientation
   BRepSweep_Rotation::DirectSolid (const TopoDS_Shape& aGenS,
                                   const Sweep_NumShape&)
 {  // compare the face normal and the direction
-  Standard_Real aU1, aU2, aV1, aV2, aUx, aVx, aX, aMV2, aTol2, aTx;
+  Standard_Real aU1 = NAN, aU2 = NAN, aV1 = NAN, aV2 = NAN, aUx = NAN, aVx = NAN, aX = NAN, aMV2 = NAN, aTol2 = NAN, aTx = NAN;
   TopAbs_Orientation aOr;
   gp_Pnt aP;
   gp_Vec du,dv;
@@ -856,7 +858,7 @@ Standard_Boolean  BRepSweep_Rotation::HasShape
     //
     if(BRep_Tool::Degenerated(anEdge)) return Standard_False;
 
-    Standard_Real aPFirst, aPLast;
+    Standard_Real aPFirst = NAN, aPLast = NAN;
     TopLoc_Location aLoc;
     Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, aLoc, aPFirst, aPLast);
     if(aCurve.IsNull()) return Standard_False;
index 388f7a2b71281a9378674e86b0e61bcdd2e9a2f9..cd09dcec770802eb25af365cf1893665e65c67c5 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepSweep_Translation.hxx>
 
 #include <GeomAdaptor_SurfaceOfLinearExtrusion.hxx>
@@ -56,7 +58,7 @@ static void SetThePCurve(const BRep_Builder& B,
                         const Handle(Geom2d_Curve)& C)
 {
   // check if there is already a pcurve on non planar faces
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   Handle(Geom2d_Curve) OC;
   TopLoc_Location SL;
   Handle(Geom_Plane) GP = Handle(Geom_Plane)::DownCast(BRep_Tool::Surface(F,SL));
@@ -158,7 +160,7 @@ TopoDS_Shape  BRepSweep_Translation::MakeEmptyGeneratingEdge
   else
   {
     TopLoc_Location L;
-    Standard_Real First,Last;
+    Standard_Real First = NAN,Last = NAN;
     Handle(Geom_Curve) C = BRep_Tool::Curve(TopoDS::Edge(aGenE),L,First,Last);
     if(!C.IsNull())
     {
@@ -244,12 +246,12 @@ TopoDS_Shape  BRepSweep_Translation::MakeEmptyFace
   (const TopoDS_Shape& aGenS, 
    const Sweep_NumShape& aDirS)
 {
-  Standard_Real toler;
+  Standard_Real toler = NAN;
   TopoDS_Face F;
   Handle(Geom_Surface) S;
   if (myDirShapeTool.Type(aDirS)==TopAbs_EDGE){
     TopLoc_Location L;
-    Standard_Real First,Last;
+    Standard_Real First = NAN,Last = NAN;
     Handle(Geom_Curve) C = BRep_Tool::Curve(TopoDS::Edge(aGenS),L,First,Last);
     toler = BRep_Tool::Tolerance(TopoDS::Edge(aGenS));
     gp_Trsf Tr = L.Transformation();
@@ -311,7 +313,7 @@ void  BRepSweep_Translation::SetPCurve
   Standard_Boolean isclosed = BRep_Tool::IsClosed(TopoDS::Edge(aGenE), TopoDS::Face(aGenF));
   if(isclosed)
   {
-    Standard_Real First, Last;
+    Standard_Real First = NAN, Last = NAN;
     TopoDS_Edge anE = TopoDS::Edge(aGenE.Oriented(TopAbs_FORWARD));
     Handle(Geom2d_Curve) aC1 = BRep_Tool::CurveOnSurface(anE, TopoDS::Face(aGenF), First, Last);
     anE.Reverse();
@@ -320,7 +322,7 @@ void  BRepSweep_Translation::SetPCurve
   }
   else
   {
-    Standard_Real First,Last;
+    Standard_Real First = NAN,Last = NAN;
     myBuilder.Builder().UpdateEdge(TopoDS::Edge(aNewEdge),
       BRep_Tool::CurveOnSurface(TopoDS::Edge(aGenE),TopoDS::Face(aGenF),First,Last),
          TopoDS::Face(aNewFace),Precision::PConfusion());
index b1649a7dd94fdd635ae49edb0c4a741a76ff5633..e33358160989c854f8e8dc74460a3e7f12436f57 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
 #include <BRepLProp.hxx>
@@ -89,7 +91,7 @@ Standard_Boolean BRepSweep_Trsf::Process(const TopoDS_Shape& aGenS,
 void BRepSweep_Trsf::SetContinuity(const TopoDS_Shape& aGenS, 
                                   const Sweep_NumShape& aDirS)
 {
-  Standard_Real tl = Precision::Confusion(), tol3d;
+  Standard_Real tl = Precision::Confusion(), tol3d = NAN;
   //angular etant un peu severe pour les contours sketches.
   Standard_Real ta = 0.00175;//environ 0.1 degre
   GeomAbs_Shape cont;
@@ -98,7 +100,7 @@ void BRepSweep_Trsf::SetContinuity(const TopoDS_Shape& aGenS,
     if (HasShape(aGenS,aDirS)){
       TopoDS_Edge E = TopoDS::Edge(aGenS);
       BRepAdaptor_Curve e;
-      Standard_Real ud,uf;
+      Standard_Real ud = NAN,uf = NAN;
       TopoDS_Vertex d,f;
       TopExp::Vertices(E,d,f);
       if(d.IsSame(f)){
@@ -122,7 +124,7 @@ void BRepSweep_Trsf::SetContinuity(const TopoDS_Shape& aGenS,
                           Shape(aGenS,dirv),
                           aGenS,aDirS,dirv)){
          TopLoc_Location Lo;
-         Standard_Real fi,la;
+         Standard_Real fi = NAN,la = NAN;
          cont = BRep_Tool::Curve(E,Lo,fi,la)->Continuity();
          if(cont >= 1){
            TopoDS_Shape s_wnt = Shape(aGenS,dirv);
@@ -138,7 +140,7 @@ void BRepSweep_Trsf::SetContinuity(const TopoDS_Shape& aGenS,
   else if(aGenS.ShapeType() == TopAbs_WIRE){
     TopoDS_Edge E1,E2;
     BRepAdaptor_Curve e1,e2;
-    Standard_Real u1,u2;
+    Standard_Real u1 = NAN,u2 = NAN;
     TopTools_IndexedDataMapOfShapeListOfShape M;
     TopExp::MapShapesAndAncestors(aGenS,TopAbs_VERTEX,TopAbs_EDGE,M);
     TopTools_ListIteratorOfListOfShape It,Jt;    
index 7f2c71c14bd689233214b05aa0578731127ef42a..8323c1b2172978a57f50f8a1e43754054303ea91 100644 (file)
@@ -51,6 +51,7 @@
 #include <TopoDS_Wire.hxx>
 #include <GeomLib_CheckCurveOnSurface.hxx>
 #include <errno.h>
+#include <math.h>
 #include <BRepTools_Modifier.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 
@@ -140,7 +141,7 @@ void  BRepTools::AddUVBounds(const TopoDS_Face& FF, Bnd_Box2d& B)
   // if the box is empty (face without edges or without pcurves),
   // get natural bounds
   if (aBox.IsVoid()) {
-    Standard_Real UMin,UMax,VMin,VMax;
+    Standard_Real UMin = NAN,UMax = NAN,VMin = NAN,VMax = NAN;
     TopLoc_Location L;
     const Handle(Geom_Surface)& aSurf = BRep_Tool::Surface(F, L);
     if (aSurf.IsNull())
@@ -180,8 +181,8 @@ void BRepTools::AddUVBounds(const TopoDS_Face& aF,
                             const TopoDS_Edge& aE,
                             Bnd_Box2d& aB)
 {
-  Standard_Real aT1, aT2, aXmin = 0.0, aYmin = 0.0, aXmax = 0.0, aYmax = 0.0;
-  Standard_Real aUmin, aUmax, aVmin, aVmax;
+  Standard_Real aT1 = NAN, aT2 = NAN, aXmin = 0.0, aYmin = 0.0, aXmax = 0.0, aYmax = 0.0;
+  Standard_Real aUmin = NAN, aUmax = NAN, aVmin = NAN, aVmax = NAN;
   Bnd_Box2d aBoxC, aBoxS; 
   TopLoc_Location aLoc;
   //
@@ -599,8 +600,8 @@ TopoDS_Wire  BRepTools::OuterWire(const TopoDS_Face& F)
     Wres = TopoDS::Wire(expw.Current());
     expw.Next();
     if (expw.More()) {
-      Standard_Real UMin, UMax, VMin, VMax;
-      Standard_Real umin, umax, vmin, vmax;
+      Standard_Real UMin = NAN, UMax = NAN, VMin = NAN, VMax = NAN;
+      Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
       BRepTools::UVBounds(F,Wres,UMin,UMax,VMin,VMax);
         while (expw.More()) {
           const TopoDS_Wire& W = TopoDS::Wire(expw.Current());
@@ -838,7 +839,7 @@ void BRepTools::Clean (const TopoDS_Shape& theShape, const Standard_Boolean theF
     if (theForce)
     {
       Handle(BRep_CurveRepresentation) aCR;
-      BRep_TEdge* aTE = static_cast<BRep_TEdge*>(anEdge.TShape().get());
+      BRep_TEdge* aTE = dynamic_cast<BRep_TEdge*>(anEdge.TShape().get());
       BRep_ListOfCurveRepresentation& aLCR = aTE->ChangeCurves();
       BRep_ListIteratorOfListOfCurveRepresentation anIterCR(aLCR);
 
@@ -919,7 +920,7 @@ void BRepTools::RemoveUnusedPCurves(const TopoDS_Shape& S)
   TopTools_IndexedMapOfShape Emap;
   TopExp::MapShapes(S, TopAbs_EDGE, Emap);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= Emap.Extent(); i++)
   {
     const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &Emap(i).TShape());
@@ -1278,7 +1279,7 @@ void BRepTools::DetectClosedness(const TopoDS_Face& theFace,
     if (BRep_Tool::IsClosed(anEdge, theFace) &&
         BRepTools::IsReallyClosed(anEdge, theFace))
     {
-      Standard_Real fpar, lpar;
+      Standard_Real fpar = NAN, lpar = NAN;
       Handle(Geom2d_Curve) PCurve1 = BRep_Tool::CurveOnSurface(anEdge, theFace, fpar, lpar);
       Handle(Geom2d_Curve) PCurve2 = BRep_Tool::CurveOnSurface(TopoDS::Edge(anEdge.Reversed()),
                                                                theFace, fpar, lpar);
@@ -1300,7 +1301,7 @@ void BRepTools::DetectClosedness(const TopoDS_Face& theFace,
 
 Standard_Real BRepTools::EvalAndUpdateTol(const TopoDS_Edge& theE, 
                                  const Handle(Geom_Curve)& C3d, 
-                                 const Handle(Geom2d_Curve) C2d, 
+                                 const Handle(Geom2d_Curve)& C2d, 
                                  const Handle(Geom_Surface)& S,
                                  const Standard_Real f,
                                  const Standard_Real l)
@@ -1343,7 +1344,7 @@ Standard_Real BRepTools::EvalAndUpdateTol(const TopoDS_Edge& theE,
       Standard_Integer nbint = 22;
       Standard_Real dt = (last - first) / nbint;
       dt = Max(dt, Precision::Confusion());
-      Standard_Real d, dmax = 0.;
+      Standard_Real d = NAN, dmax = 0.;
       gp_Pnt2d aP2d;
       gp_Pnt aPC, aPS;
       Standard_Integer cnt = 0; 
@@ -1529,7 +1530,7 @@ void BRepTools::CheckLocations(const TopoDS_Shape& theS,
   TopTools_IndexedMapOfShape aMapS;
   TopExp::MapShapes(theS, aMapS, Standard_False, Standard_False);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= aMapS.Extent(); ++i)
   {
     const TopoDS_Shape& anS = aMapS(i);
index aad8edf62c0cb5367c1291f7d3bbe4b1be45e11f..579dc9244a2fb67b18d87735a1a1e68266a69836 100644 (file)
@@ -330,7 +330,7 @@ public:
   //! Method returns actual tolerance of edge
   Standard_EXPORT static Standard_Real EvalAndUpdateTol(const TopoDS_Edge& theE, 
                                                         const Handle(Geom_Curve)& theC3d, 
-                                                        const Handle(Geom2d_Curve) theC2d, 
+                                                        const Handle(Geom2d_Curve)& theC2d, 
                                                         const Handle(Geom_Surface)& theS,
                                                         const Standard_Real theF,
                                                         const Standard_Real theL);
index 7d9a7b293304b4095857c79025f0cc1ea16c3ce5..b76bb529a50615c50600584a0a3a183adcd094ab 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRepTools_CopyModification.hxx>
 
 #include <BRep_Tool.hxx>
@@ -85,7 +87,7 @@ Standard_Boolean BRepTools_CopyModification::NewCurve(const TopoDS_Edge&  theEdg
                                                       TopLoc_Location&    theLoc,
                                                       Standard_Real&      theTol)
 {
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   theCurve = BRep_Tool::Curve(theEdge, theLoc, aFirst, aLast);
   theTol = BRep_Tool::Tolerance(theEdge);
 
@@ -171,7 +173,7 @@ Standard_Boolean BRepTools_CopyModification::NewCurve2d(const TopoDS_Edge&    th
                                                         Standard_Real&        theTol)
 {
   theTol = BRep_Tool::Tolerance(theEdge);
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   theCurve = BRep_Tool::CurveOnSurface(theEdge, theFace, aFirst, aLast);
 
   if (!theCurve.IsNull() && myCopyGeom)
index 7f2d9731d601243afa604526dc43c7863ae1888c..ca7500f4883cf8ef6e149a3a3666c2bfb357e72d 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepTools_GTrsfModification.hxx>
 #include <Geom2d_Curve.hxx>
@@ -47,7 +49,7 @@ BRepTools_GTrsfModification::BRepTools_GTrsfModification(const gp_GTrsf& T) :
 myGTrsf(T)
 {
   // on prend comme dilatation maximale pour la tolerance la norme sup
-  Standard_Real loc1, loc2, loc3, loc4;
+  Standard_Real loc1 = NAN, loc2 = NAN, loc3 = NAN, loc4 = NAN;
 
   loc1 = Max(Abs(T.Value(1,1)), Abs(T.Value(1,2)));
   loc2 = Max(Abs(T.Value(2,1)), Abs(T.Value(2,2)));
@@ -145,7 +147,7 @@ Standard_Boolean BRepTools_GTrsfModification::NewCurve
  TopLoc_Location& L, 
  Standard_Real& Tol)
 {
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   gp_GTrsf gtrsf;
   gtrsf.SetVectorialPart(myGTrsf.VectorialPart());
   gtrsf.SetTranslationPart(myGTrsf.TranslationPart());
@@ -219,7 +221,7 @@ Standard_Boolean BRepTools_GTrsfModification::NewCurve2d
   TopLoc_Location loc;
   Tol = BRep_Tool::Tolerance(E);
   Tol *= myGScale;
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   C = BRep_Tool::CurveOnSurface(E,F,f,l);
   if (C.IsNull())
   {
@@ -299,7 +301,7 @@ Standard_Boolean BRepTools_GTrsfModification::NewTriangulation(const TopoDS_Face
     for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbTriangles(); ++anInd)
     {
       Poly_Triangle aTria = theTriangulation->Triangle(anInd);
-      Standard_Integer aN1, aN2, aN3;
+      Standard_Integer aN1 = 0, aN2 = 0, aN3 = 0;
       aTria.Get(aN1, aN2, aN3);
       aTria.Set(aN1, aN3, aN2);
       theTriangulation->SetTriangle(anInd, aTria);
index df686dd4cc79a147a9098c93dfdc00c63f29fc56..d658edbeb2ba17aabb4c5fc3194d0d7778769028 100644 (file)
@@ -16,6 +16,8 @@
 
 // IFV 04.06.99 - PRO18974 - processing of INTERNAL shapes.
 
+#include <math.h>
+
 #include <BRepTools_Modification.hxx>
 #include <BRepTools_Modifier.hxx>
 #include <TColStd_ListOfTransient.hxx>
@@ -138,7 +140,7 @@ void BRepTools_Modifier::Perform(const Handle(BRepTools_Modification)& M,
   if (!myMutableInput)
     CreateOtherVertices(aMVE, aMEF, M);
 
-  Standard_Boolean aNewGeom;
+  Standard_Boolean aNewGeom = 0;
   Rebuild(myShape, M, aNewGeom, aPS.Next());
 
   if (!aPS.More())
@@ -251,7 +253,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild
   Standard_Boolean rebuild = Standard_False, RevWires = Standard_False;
   TopAbs_Orientation ResOr = TopAbs_FORWARD;
   BRep_Builder B;
-  Standard_Real tol;
+  Standard_Real tol = NAN;
   Standard_Boolean No3DCurve = Standard_False; // en fait, si on n`a pas de 
   //modif geometry 3d , it is necessary to test the existence of a curve 3d.
 
@@ -454,7 +456,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild
             aLocalResult.Orientation(TopAbs_FORWARD);
             TopoDS_Face CurF = TopoDS::Face(aLocalResult);
             Handle(Geom2d_Curve) curve2d1, currcurv;
-            Standard_Real f,l;
+            Standard_Real f = NAN,l = NAN;
             if ((!RevWires && fcor != edge.Orientation()) ||
               ( RevWires && fcor == edge.Orientation())) {
                 CurE.Orientation(TopAbs_FORWARD);
@@ -478,10 +480,10 @@ Standard_Boolean BRepTools_Modifier::Rebuild
           }
 
           TopLoc_Location theLoc;
-          Standard_Real theF,theL;
+          Standard_Real theF = NAN,theL = NAN;
           Handle(Geom_Curve) C3D = BRep_Tool::Curve(TopoDS::Edge(myMap(ex.Current())), theLoc, theF, theL);
           if (C3D.IsNull()) { // Update vertices
-            Standard_Real param;
+            Standard_Real param = NAN;
             TopExp_Explorer ex2(edge,TopAbs_VERTEX);
             while (ex2.More()) {
               const TopoDS_Vertex& vertex = TopoDS::Vertex(ex2.Current());
@@ -548,7 +550,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild
 //    else if (ts == TopAbs_EDGE) {
     else if (ts == TopAbs_EDGE && !No3DCurve) {
       // Vertices
-      Standard_Real param;
+      Standard_Real param = NAN;
       const TopoDS_Edge& edge = TopoDS::Edge(S);
       TopAbs_Orientation edor = edge.Orientation();
       if(edor != TopAbs_REVERSED) edor = TopAbs_FORWARD;
@@ -599,7 +601,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild
 
 void BRepTools_Modifier::CreateNewVertices( const TopTools_IndexedDataMapOfShapeListOfShape& theMVE, const Handle(BRepTools_Modification)& M)
 {
-  double aToler;
+  double aToler = NAN;
   BRep_Builder aBB;
   gp_Pnt aPnt;  
   for (int i = 1; i <= theMVE.Extent(); i++ )
@@ -625,7 +627,7 @@ void BRepTools_Modifier::FillNewCurveInfo(const TopTools_IndexedDataMapOfShapeLi
   Handle(Geom_Curve) aCurve;
   TopLoc_Location aLocation;
   BRepTools_Modifier::NewCurveInfo aNCinfo;
-  double aToler;
+  double aToler = NAN;
   for (int i = 1; i <= theMEF.Extent(); i++ )
   {
     const TopoDS_Edge& anE = TopoDS::Edge(theMEF.FindKey(i));
@@ -649,11 +651,11 @@ void BRepTools_Modifier::FillNewSurfaceInfo(const Handle(BRepTools_Modification)
   for (int i = 1; i <= aMF.Extent(); i++ )
   {
     const TopoDS_Face& aF = TopoDS::Face(aMF(i));
-    Standard_Boolean RevFace;
-    Standard_Boolean RevWires;
+    Standard_Boolean RevFace = 0;
+    Standard_Boolean RevWires = 0;
     Handle(Geom_Surface) aSurface;
     TopLoc_Location aLocation;
-    double aToler1;
+    double aToler1 = NAN;
     Standard_Boolean IsNewSur = M->NewSurface(aF, aSurface, aLocation, aToler1, RevWires,RevFace);
     if (IsNewSur)
     {
@@ -705,7 +707,7 @@ void BRepTools_Modifier::CreateOtherVertices(const TopTools_IndexedDataMapOfShap
                                              const TopTools_IndexedDataMapOfShapeListOfShape& theMEF, 
                                              const Handle(BRepTools_Modification)& M)
 {
-  double aToler;
+  double aToler = NAN;
   //The following logic in some ways repeats the logic from the Rebuild() method.
   //If the face with its subshapes is not going to be modified 
   //(i.e. NewSurface() for this face and NewCurve(), NewPoint() for its edges/vertices returns false)
index 85a30c63c6e754013988d742e58503db26a99b99..b5c72a55179d4801c266ba1d523cc2c712a5a0ff 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BRepTools_NurbsConvertModification.hxx>
 
 #include <BRep_GCurve.hxx>
@@ -233,8 +235,8 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewSurface
        Standard_Boolean& RevWires,
        Standard_Boolean& RevFace)
 {
-  Standard_Real U1, U2, curvU1, curvU2, surfU1, surfU2, UTol;
-  Standard_Real V1, V2, curvV1, curvV2, surfV1, surfV2, VTol;
+  Standard_Real U1 = NAN, U2 = NAN, curvU1 = NAN, curvU2 = NAN, surfU1 = NAN, surfU2 = NAN, UTol = NAN;
+  Standard_Real V1 = NAN, V2 = NAN, curvV1 = NAN, curvV2 = NAN, surfV1 = NAN, surfV2 = NAN, VTol = NAN;
   RevWires = Standard_False;
   RevFace = Standard_False;
   Handle(Geom_Surface) SS = BRep_Tool::Surface(F,L);
@@ -432,7 +434,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve
     L.Identity();
     return Standard_True;
   }
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
 
   Handle(Geom_Curve) Caux = BRep_Tool::Curve(E, L, f, l);
 
@@ -472,7 +474,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve
 
   C = GeomConvert::CurveToBSplineCurve(C);
 
-  Standard_Real fnew = C->FirstParameter(), lnew = C->LastParameter(), UTol;
+  Standard_Real fnew = C->FirstParameter(), lnew = C->LastParameter(), UTol = NAN;
 
   Handle(Geom_BSplineCurve) BC = Handle(Geom_BSplineCurve)::DownCast(C) ;
 
@@ -509,7 +511,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewPolygon(const TopoDS_Edg
   if (thePoly->HasParameters())
   {
     Standard_Real aTol = BRep_Tool::Tolerance(theEdge);
-    Standard_Real aFirst, aLast;
+    Standard_Real aFirst = NAN, aLast = NAN;
     Handle(Geom_Curve) aCurve = BRep_Tool::Curve(theEdge, aFirst, aLast);
     Handle(Geom_Curve) aNewCurve = newCurve(myMap, theEdge, aFirst, aLast);
     if (!aCurve.IsNull() && !aNewCurve.IsNull()) // skip processing degenerated edges
@@ -553,9 +555,9 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
 {
 
   Tol = BRep_Tool::Tolerance(E);
-  Standard_Real f2d,l2d;
+  Standard_Real f2d = NAN,l2d = NAN;
   Handle(Geom2d_Curve) aBaseC2d = BRep_Tool::CurveOnSurface(E,F,f2d,l2d);
-  Standard_Real f3d,l3d;
+  Standard_Real f3d = NAN,l3d = NAN;
   TopLoc_Location Loc;
   Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, Loc, f3d,l3d);
   Standard_Boolean isConvert2d = ((!C3d.IsNull() && !C3d->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) &&
@@ -605,7 +607,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
     GeomAdaptor_Curve   G3dAC(C3d, f3d, l3d);
     Handle(GeomAdaptor_Curve) G3dAHC = new GeomAdaptor_Curve(G3dAC);
     
-    Standard_Real Uinf, Usup, Vinf, Vsup, u = 0, v = 0;
+    Standard_Real Uinf = NAN, Usup = NAN, Vinf = NAN, Vsup = NAN, u = 0, v = 0;
     Handle(Geom_Surface) S = BRep_Tool::Surface(F);
     Handle(Standard_Type) myT = S->DynamicType();
     if(myT != STANDARD_TYPE(Geom_Plane)) {
@@ -754,7 +756,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
     }
     if (!itled.More()) { // on stocke l`edge et la curve2d
       Handle(Geom2d_Curve) C2dBis;
-      Standard_Real f2dBis,l2dBis;
+      Standard_Real f2dBis = NAN,l2dBis = NAN;
       C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d);
       Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d);
       Handle(Geom2dAdaptor_Curve) G2dAHC = new Geom2dAdaptor_Curve(G2dAC);
@@ -817,7 +819,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
       else {
         S = BRep_Tool::Surface(newF);// S est une BSplineSurface : pas besoin de la trimmed
       }
-      Standard_Real Uinf, Usup, Vinf, Vsup, u = 0, v = 0;
+      Standard_Real Uinf = NAN, Usup = NAN, Vinf = NAN, Vsup = NAN, u = 0, v = 0;
       S->Bounds(Uinf, Usup, Vinf, Vsup);
       //Uinf -= 1e-9; Usup += 1e-9; Vinf -= 1e-9; Vsup += 1e-9;
       u = (Usup - Uinf)*0.1;
@@ -907,7 +909,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewPolygonOnTriangulation(
     TopLoc_Location aLoc;
     Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace, aLoc);
     Handle(Geom_Surface) aNewSurf = newSurface(myMap, theFace);
-    Standard_Real aFirst, aLast;
+    Standard_Real aFirst = NAN, aLast = NAN;
     Handle(Geom2d_Curve) aC2d = BRep_Tool::CurveOnSurface(theEdge, theFace, aFirst, aLast);
     Handle(Geom2d_Curve) aNewC2d = newCurve(myMap, theEdge, theFace, aFirst, aLast);
     if (!aSurf.IsNull() && !aC2d.IsNull() && !aNewSurf.IsNull() && !aNewC2d.IsNull())
@@ -949,7 +951,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewParameter
 
   gp_Pnt pnt = BRep_Tool::Pnt(V);
   P = BRep_Tool::Parameter(V,E);
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   Handle(Geom_Curve) aNewCurve = newCurve(myMap, E, aFirst, aLast);
   return !aNewCurve.IsNull() && newParameter(pnt, aNewCurve, aFirst, aLast, Tol, P);
 }
index c7359b73eb1b05b70e33e535057e0dc92a5d865a..dfe775b6ffbfb747811419895b69f3642ed1ad51 100644 (file)
@@ -42,7 +42,7 @@ Standard_Boolean BRepTools_PurgeLocations::Perform(const TopoDS_Shape& theShape)
   AddShape(myShape);
 
   //Check locations;
-  Standard_Integer ind;
+  Standard_Integer ind = 0;
   NCollection_Vector<Standard_Integer> aBadTrsfInds;
   for (ind = 1; ; ++ind)
   {
@@ -67,7 +67,7 @@ Standard_Boolean BRepTools_PurgeLocations::Perform(const TopoDS_Shape& theShape)
 
   Standard_Integer aNbShapes = myMapShapes.Extent();
   myMapNewShapes.Clear();
-  Standard_Integer inds;
+  Standard_Integer inds = 0;
   for (inds = 1; inds <= aNbShapes; ++inds)
   {
     const TopoDS_Shape& anS = myMapShapes(inds);
@@ -76,7 +76,7 @@ Standard_Boolean BRepTools_PurgeLocations::Perform(const TopoDS_Shape& theShape)
     {
       continue;
     }
-    Standard_Integer il;
+    Standard_Integer il = 0;
     for (il = 0; il < aBadTrsfInds.Size(); ++il)
     {
       if (aBadTrsfInds(il) == aLocInd)
index d36202ab25e7222324204ccb228d4e54e6b0d69f..c4f2fa05a0068a643088486842b0cc15e2fcab03 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepTools_Quilt.hxx>
@@ -79,7 +81,7 @@ static void CopyShape(const TopoDS_Edge& E,TopTools_IndexedDataMapOfShapeShape&
     }
   }
   // set the 3d range
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   BRep_Tool::Range(E,f,l);
   B.Range(NE,f,l);
   myBounds.Add(E,NE.Oriented(TopAbs_FORWARD));
@@ -209,7 +211,7 @@ void BRepTools_Quilt::Add(const TopoDS_Shape& S)
          TopoDS_Wire NW;
          B.MakeWire(NW);
          TopoDS_Iterator ite(W,Standard_False);
-         Standard_Real   UFirst,ULast;
+         Standard_Real   UFirst = NAN,ULast = NAN;
          
          // Reconstruction des wires.
          
@@ -462,7 +464,7 @@ TopoDS_Shape BRepTools_Quilt::Shells() const
 //              itm.More(); ) {
               if(!M.IsBound(aexp.Current()))
                  continue;
-              TopoDS_Shape ae = aexp.Current();
+              const TopoDS_Shape& ae = aexp.Current();
               TopoDS_Shape as = M.Find(ae);
              if (as.IsSame(oldShell)) {
                // update the orientation of free edges in SH.
index 7b282a98501910b8e092ae4d6c22d9f2b5424e92..89ff3a136c1b8556d89ca3d69f7f118392d473f1 100644 (file)
@@ -109,9 +109,9 @@ static void CopyRanges (const TopoDS_Shape& toedge, const TopoDS_Shape& fromedge
 //=======================================================================
 
 BRepTools_ReShape::BRepTools_ReShape()
-: myStatus(-1)
+: myStatus(-1), myConsiderLocation(Standard_False)
 {
-  myConsiderLocation = Standard_False;
+  
 }
 
 
@@ -388,7 +388,7 @@ TopoDS_Shape BRepTools_ReShape::Apply (const TopoDS_Shape& shape,
   // apply recorded modifications to subshapes
   Standard_Boolean isEmpty = Standard_True;
   for ( TopoDS_Iterator it(shape,Standard_False); it.More(); it.Next() ) {
-    TopoDS_Shape sh = it.Value();
+    const TopoDS_Shape& sh = it.Value();
     newsh = Apply ( sh, until );
     if ( newsh != sh ) {
       if ( myStatus & EncodeStatus(4)) //ShapeExtend::DecodeStatus ( myStatus, ShapeExtend_DONE4 ) )
@@ -408,7 +408,7 @@ TopoDS_Shape BRepTools_ReShape::Apply (const TopoDS_Shape& shape,
     }
     Standard_Integer nitems = 0;
     for ( TopoDS_Iterator subit(newsh); subit.More(); subit.Next(), nitems++ ) {
-      TopoDS_Shape subsh = subit.Value();
+      const TopoDS_Shape& subsh = subit.Value();
       if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh );//fix for SAMTECH bug OCC322 about abcense internal vertices after sewing.
       else locStatus |= EncodeStatus(10);//ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 );
     }
index 4473b78cad9b7a44e4b7247854bc25662ce8fbcf..c5b4cbd2969014eb0dacbd9b632dc168dadb7c74 100644 (file)
@@ -16,6 +16,8 @@
 
 // Modified:     Portage NT 7-5-97 DPF (strcasecmp)
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_CurveOnClosedSurface.hxx>
 #include <BRep_CurveOnSurface.hxx>
@@ -409,7 +411,7 @@ void  BRepTools_ShapeSet::DumpGeometry(const TopoDS_Shape& S,
     if (TE->SameRange())     OS << "     same range on curves\n";
     if (TE->Degenerated())   OS << "     degenerated\n";
     
-    Standard_Real first, last;
+    Standard_Real first = NAN, last = NAN;
     BRep_ListIteratorOfListOfCurveRepresentation itrc = TE->Curves();
     while (itrc.More()) {
       const Handle(BRep_CurveRepresentation)& CR = itrc.Value();
@@ -571,7 +573,7 @@ void  BRepTools_ShapeSet::WriteGeometry (const TopoDS_Shape& S, Standard_OStream
     OS << ((TE->SameRange())     ? 1 : 0) << " ";
     OS << ((TE->Degenerated())   ? 1 : 0) << "\n";
     
-    Standard_Real first, last;
+    Standard_Real first = NAN, last = NAN;
     BRep_ListIteratorOfListOfCurveRepresentation itrc = TE->Curves();
     while (itrc.More()) {
       const Handle(BRep_CurveRepresentation)& CR = itrc.Value();
@@ -754,11 +756,11 @@ void  BRepTools_ShapeSet::ReadGeometry (const TopAbs_ShapeEnum T,
 {
   // Read the geometry
 
-  Standard_Integer val,c,pc,pc2 = 0,s,s2,l,l2,t, pt, pt2 = 0;
-  Standard_Real tol,X,Y,Z,first,last,p1,p2;
-  Standard_Real PfX,PfY,PlX,PlY;
+  Standard_Integer val = 0,c = 0,pc = 0,pc2 = 0,s = 0,s2 = 0,l = 0,l2 = 0,t = 0, pt = 0, pt2 = 0;
+  Standard_Real tol = NAN,X = NAN,Y = NAN,Z = NAN,first = NAN,last = NAN,p1 = NAN,p2 = NAN;
+  Standard_Real PfX = NAN,PfY = NAN,PlX = NAN,PlY = NAN;
   gp_Pnt2d aPf, aPl;
-  Standard_Boolean closed;
+  Standard_Boolean closed = 0;
   GeomAbs_Shape reg = GeomAbs_C0;
   switch (T) {
 
@@ -1170,7 +1172,7 @@ void BRepTools_ShapeSet::WritePolygonOnTriangulation(Standard_OStream&      OS,
                                                      const Standard_Boolean Compact,
                                                      const Message_ProgressRange& theProgress)const
 {
-  Standard_Integer i, j, nbpOntri = myNodes.Extent();
+  Standard_Integer i = 0, j = 0, nbpOntri = myNodes.Extent();
 
   Message_ProgressScope aPS(theProgress, "Polygons On Triangulation", nbpOntri);
   if (Compact)
@@ -1237,9 +1239,9 @@ void BRepTools_ShapeSet::ReadPolygonOnTriangulation(Standard_IStream& IS,
   char buffer[255];
   IS >> buffer;
   if (strstr(buffer,"PolygonOnTriangulations") == NULL) return;
-  Standard_Integer i, j, val, nbpol = 0, nbnodes =0;
-  Standard_Integer hasparameters;
-  Standard_Real par;
+  Standard_Integer i = 0, j = 0, val = 0, nbpol = 0, nbnodes =0;
+  Standard_Integer hasparameters = 0;
+  Standard_Real par = NAN;
   Handle(TColStd_HArray1OfReal) Param;
   Handle(Poly_PolygonOnTriangulation) Poly;
   IS >> nbpol;
@@ -1254,7 +1256,7 @@ void BRepTools_ShapeSet::ReadPolygonOnTriangulation(Standard_IStream& IS,
     }
     IS >> buffer;
 //      if (!strcasecmp(buffer, "p")) {
-      Standard_Real def;
+      Standard_Real def = NAN;
       GeomTools::GetReal(IS, def);
       IS >> hasparameters;
       if (hasparameters) {
@@ -1289,7 +1291,7 @@ void BRepTools_ShapeSet::WritePolygon3D(Standard_OStream&      OS,
                                         const Standard_Boolean Compact,
                                         const Message_ProgressRange& theProgress)const
 {
-  Standard_Integer i, j, nbpol = myPolygons3D.Extent();
+  Standard_Integer i = 0, j = 0, nbpol = myPolygons3D.Extent();
   
   Message_ProgressScope aPS(theProgress, "3D Polygons", nbpol);
 
@@ -1321,7 +1323,7 @@ void BRepTools_ShapeSet::WritePolygon3D(Standard_OStream&      OS,
     // write the nodes
     if (!Compact) OS << "\nNodes :\n";
     
-    Standard_Integer i1, nbNodes = P->NbNodes();
+    Standard_Integer i1 = 0, nbNodes = P->NbNodes();
     const TColgp_Array1OfPnt& Nodes = P->Nodes();
     for (j = 1; j <= nbNodes; j++) {
       if (!Compact) OS << std::setw(10) << j << " : ";
@@ -1367,8 +1369,8 @@ void BRepTools_ShapeSet::ReadPolygon3D(Standard_IStream& IS, const Message_Progr
 {
   char buffer[255];
   //  Standard_Integer i, j, p, val, nbpol, nbnodes, hasparameters;
-  Standard_Integer i, j, p, nbpol=0, nbnodes =0, hasparameters = Standard_False;
-  Standard_Real d, x, y, z;
+  Standard_Integer i = 0, j = 0, p = 0, nbpol=0, nbnodes =0, hasparameters = Standard_False;
+  Standard_Real d = NAN, x = NAN, y = NAN, z = NAN;
 
   IS >> buffer;
   if (strstr(buffer,"Polygon3D") == NULL) return;
@@ -1411,8 +1413,8 @@ void BRepTools_ShapeSet::WriteTriangulation(Standard_OStream&      OS,
                                             const Standard_Boolean Compact,
                                             const Message_ProgressRange& theProgress)const
 {
-  Standard_Integer i, j, nbNodes, nbtri = myTriangulations.Extent();
-  Standard_Integer nbTriangles = 0, n1, n2, n3;
+  Standard_Integer i = 0, j = 0, nbNodes = 0, nbtri = myTriangulations.Extent();
+  Standard_Integer nbTriangles = 0, n1 = 0, n2 = 0, n3 = 0;
 
   Message_ProgressScope aPS(theProgress, "Triangulations", nbtri);
 
@@ -1547,8 +1549,8 @@ void BRepTools_ShapeSet::DumpTriangulation(Standard_OStream& OS)const
 void BRepTools_ShapeSet::ReadTriangulation(Standard_IStream& IS, const Message_ProgressRange& theProgress)
 {
   char buffer[255];
-  Standard_Integer i, j, nbtri =0;
-  Standard_Real d, x, y, z;
+  Standard_Integer i = 0, j = 0, nbtri =0;
+  Standard_Real d = NAN, x = NAN, y = NAN, z = NAN;
   Standard_Integer nbNodes =0, nbTriangles=0;
   Standard_Boolean hasUV= Standard_False;
   Standard_Boolean hasNormals= Standard_False;
@@ -1588,7 +1590,7 @@ void BRepTools_ShapeSet::ReadTriangulation(Standard_IStream& IS, const Message_P
     }
       
     // read the triangles
-    Standard_Integer n1,n2,n3;
+    Standard_Integer n1 = 0,n2 = 0,n3 = 0;
     for (j = 1; j <= nbTriangles; j++) {
       IS >> n1 >> n2 >> n3;
       T->SetTriangle (j, Poly_Triangle (n1, n2, n3));
index 0ee437456f42a16e8ba71adbf11be0d96a2aeeac..3d710043e5925519afd04a7f370eee597aba8cc8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepTools_Substitution.hxx>
@@ -89,7 +91,7 @@ void BRepTools_Substitution::Build(const TopoDS_Shape& S)
     NewS.EmptyCopy();
 
     if (NewS.ShapeType() == TopAbs_EDGE) {
-      Standard_Real f,l;
+      Standard_Real f = NAN,l = NAN;
       BRep_Tool::Range(TopoDS::Edge(S),f,l);
       B.Range(TopoDS::Edge(NewS),f,l);
     }
index 238afe6970cd29f55b396c7a14ea563a6c3245a0..26a90f2d1d28c5273dd612d308a0776f4260a9cf 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepTools_TrsfModification.hxx>
 #include <Geom2d_Curve.hxx>
@@ -162,7 +164,7 @@ Standard_Boolean BRepTools_TrsfModification::NewTriangulation
     for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbTriangles(); ++anInd)
     {
       Poly_Triangle aTria = theTriangulation->Triangle(anInd);
-      Standard_Integer aN1, aN2, aN3;
+      Standard_Integer aN1 = 0, aN2 = 0, aN3 = 0;
       aTria.Get(aN1, aN2, aN3);
       aTria.Set(aN1, aN3, aN2);
       theTriangulation->SetTriangle(anInd, aTria);
@@ -221,7 +223,7 @@ Standard_Boolean BRepTools_TrsfModification::NewPolygon
   if (theP->HasParameters())
   {
     TopLoc_Location aCurveLoc;
-    Standard_Real aFirst, aLast;
+    Standard_Real aFirst = NAN, aLast = NAN;
     Handle(Geom_Curve) aCurve = BRep_Tool::Curve(theE, aCurveLoc, aFirst, aLast);
     if (!aCurve.IsNull())
     {
@@ -272,7 +274,7 @@ Standard_Boolean BRepTools_TrsfModification::NewPolygonOnTriangulation
 
   // transform the parametrization
   Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theF, aLoc);
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   Handle(Geom2d_Curve) aC2d = BRep_Tool::CurveOnSurface(theE, theF, aFirst, aLast);
   if (!aSurf.IsNull() && !aC2d.IsNull() && Abs(Abs(myTrsf.ScaleFactor()) - 1.0) > TopLoc_Location::ScalePrec())
   {
@@ -305,7 +307,7 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve
      TopLoc_Location& L, 
      Standard_Real& Tol)
 {
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   C = BRep_Tool::Curve(E,L,f,l);
   if (C.IsNull())
   {
@@ -373,12 +375,12 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve2d
   if (GAsurf.GetType() == GeomAbs_Plane)
     return Standard_False;
 
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   Handle(Geom2d_Curve) NewC = BRep_Tool::CurveOnSurface(E,F,f,l);
   if (NewC.IsNull())
     return Standard_False;
   
-  Standard_Real newf,newl;
+  Standard_Real newf = NAN,newl = NAN;
 
   Handle(Standard_Type) TheType = NewC->DynamicType();
     
@@ -426,7 +428,7 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve2d
   TopExp::Vertices(E,V1,V2);
   TopoDS_Shape initEFOR = E.Oriented(TopAbs_FORWARD); // skl
   TopoDS_Edge EFOR = TopoDS::Edge(initEFOR/*E.Oriented(TopAbs_FORWARD)*/); //skl
-  Standard_Real aTolV;
+  Standard_Real aTolV = NAN;
   NewParameter(V1, EFOR, f, aTolV);
   NewParameter(V2, EFOR, l, aTolV);
   GeomLib::SameRange(Precision::PConfusion(), NewC, newf, newl, f, l, C);
@@ -452,7 +454,7 @@ Standard_Boolean BRepTools_TrsfModification::NewParameter
   Tol *= Abs(myTrsf.ScaleFactor());
   P = BRep_Tool::Parameter(V,E);
 
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
 
   Handle(Geom_Curve) C = BRep_Tool::Curve(E,loc,f,l);
   if (!C.IsNull()) {
index 0cd69bc4864b14fee3f8b634dba794d769d3cd99..c8caa24aa4697998c85ef058513fd19e879418f8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Surface.hxx>
 #include <BRepTools.hxx>
@@ -180,7 +182,7 @@ void  BRepTools_WireExplorer::Init(const TopoDS_Wire& W,
       gp_Pnt aP;
       gp_Vec aD1U, aD1V;
       aGAS.D1(UMin, VMin, aP, aD1U, aD1V);
-      Standard_Real tol1, tol2, maxtol = .0005*(UMax - UMin);
+      Standard_Real tol1 = NAN, tol2 = NAN, maxtol = .0005*(UMax - UMin);
       Standard_Real a = aD1U.Magnitude();
 
       if (a <= Precision::Confusion())
@@ -322,8 +324,8 @@ void  BRepTools_WireExplorer::Init(const TopoDS_Wire& W,
       for (; itt.More(); itt.Next()) {
         TopoDS_Edge        anEdge = TopoDS::Edge(itt.Key());
         TopAbs_Orientation anOri = anEdge.Orientation();
-        Standard_Real      aF;
-        Standard_Real      aL;
+        Standard_Real      aF = NAN;
+        Standard_Real      aL = NAN;
 
         BRep_Tool::Range(anEdge, aF, aL);
         if ((anOri == TopAbs_FORWARD  && aF == -Precision::Infinite()) ||
@@ -408,11 +410,11 @@ void  BRepTools_WireExplorer::Next()
     if (!myFace.IsNull() && aV1.IsSame(aV2)) {
       Handle(Geom2d_Curve) aPrevPC;
       Handle(Geom2d_Curve) aNextPC;
-      Standard_Real        aPar11, aPar12;
-      Standard_Real        aPar21, aPar22;
-      Standard_Real        aPrevPar;
-      Standard_Real        aNextFPar;
-      Standard_Real        aNextLPar;
+      Standard_Real        aPar11 = NAN, aPar12 = NAN;
+      Standard_Real        aPar21 = NAN, aPar22 = NAN;
+      Standard_Real        aPrevPar = NAN;
+      Standard_Real        aNextFPar = NAN;
+      Standard_Real        aNextLPar = NAN;
 
       aPrevPC = BRep_Tool::CurveOnSurface(myEdge, myFace, aPar11, aPar12);
       aNextPC = BRep_Tool::CurveOnSurface(aNextEdge, myFace, aPar21, aPar22);
index 0800a002bda41fd48168245e568212ec525679d4..334d0ba637f5432b037fc6504dbc91636e972549 100644 (file)
@@ -116,9 +116,9 @@ private:
   TopoDS_Vertex myVertex;
   TopoDS_Face myFace;
   TopTools_MapOfShape myDoubles;
-  Standard_Boolean myReverse;
-  Standard_Real myTolU;
-  Standard_Real myTolV;
+  Standard_Boolean myReverse{};
+  Standard_Real myTolU{};
+  Standard_Real myTolV{};
 
 
 };
index 76804d510767c651e2f8099844c618208e1f361b..1607c8dfa0083afc6ae102471adfd1fb252c0151 100644 (file)
@@ -19,6 +19,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
 #include <BRepAdaptor_Curve2d.hxx>
@@ -104,7 +106,7 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const
   
   TopoDS_Edge  edge;
   TopAbs_Orientation Or;
-  Standard_Real u,du,Tole = 0.0,Tol=0.0;
+  Standard_Real u = NAN,du = NAN,Tole = 0.0,Tol=0.0;
   BRepTools_WireExplorer WireExplorer;
   TopExp_Explorer FaceExplorer;
 
@@ -139,7 +141,7 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const
          Or = edge.Orientation();
          if(Or == TopAbs_FORWARD || Or == TopAbs_REVERSED)
            {
-             Standard_Real pfbid,plbid;
+             Standard_Real pfbid = NAN,plbid = NAN;
              if(BRep_Tool::CurveOnSurface(edge,Face,pfbid,plbid).IsNull()) return;
              BRepAdaptor_Curve2d C(edge,Face);
        
@@ -344,7 +346,7 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const
                   Or = edge.Orientation();
                   if (Or == TopAbs_FORWARD || Or == TopAbs_REVERSED)
                   {
-                    Standard_Real pfbid, plbid;
+                    Standard_Real pfbid = NAN, plbid = NAN;
                     BRep_Tool::Range(edge, Face, pfbid, plbid);
                     if (Abs(plbid - pfbid) < 1.e-9) continue;
                     BRepAdaptor_Curve2d C(edge, Face);
@@ -499,7 +501,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::Perform(const gp_Pnt2d& _Puv,
   STAT.NbPerform++;
 #endif
   
-  Standard_Integer dedans;
+  Standard_Integer dedans = 0;
   Standard_Integer nbtabclass = TabClass.Length();
   
   if(nbtabclass==0) { 
@@ -633,7 +635,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::TestOnRestriction(const gp_Pnt2d& _Puv,
   STAT.NbConstrShape++;
 #endif
   
-  Standard_Integer dedans;
+  Standard_Integer dedans = 0;
   Standard_Integer nbtabclass = TabClass.Length();
   
   if(nbtabclass==0) { 
index d8da86887a5ecc136a245a20f6b08b96a9f92ba9..5f633ef6bfed0bed027f5e8578764d6641ab29f6 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve2d.hxx>
 #include <BRepAdaptor_Surface.hxx>
@@ -53,7 +55,7 @@ Standard_Real BRepTopAdaptor_HVertex::Resolution
   const TopoDS_Face& F = brhc->Face();
   BRepAdaptor_Surface S(F,0);
   Standard_Real tv = BRep_Tool::Tolerance(myVtx);
-  Standard_Real pp, p = BRep_Tool::Parameter (myVtx, brhc->Edge(), brhc->Face());
+  Standard_Real pp = NAN, p = BRep_Tool::Parameter (myVtx, brhc->Edge(), brhc->Face());
   TopAbs_Orientation Or = Orientation();
   gp_Pnt2d p2d; gp_Vec2d v2d;
   C->D1(p,p2d,v2d);
@@ -61,7 +63,7 @@ Standard_Real BRepTopAdaptor_HVertex::Resolution
   gp_Vec DU, DV, DC;
   S.D1(p2d.X(),p2d.Y(),P,DU,DV);
   DC.SetLinearForm(v2d.X(),DU,v2d.Y(),DV);
-  Standard_Real ResUV, mag = DC.Magnitude();
+  Standard_Real ResUV = NAN, mag = DC.Magnitude();
 
   Standard_Real URes = S.UResolution(tv);
   Standard_Real VRes = S.VResolution(tv);
@@ -96,7 +98,7 @@ Standard_Real BRepTopAdaptor_HVertex::Resolution
   Standard_Real Dist=P.Distance(P1);
   if ((Dist>1e-12) && ((Dist > 1.1*tv) || (Dist< 0.8*tv))) {
   // Refine if possible
-    Standard_Real Dist1;
+    Standard_Real Dist1 = NAN;
     if (Or == TopAbs_REVERSED) pp = p+tv/Dist;
     else pp = p-tv/Dist;
 
index 1fbdc1509b0d4639a957af04b4b45f1867fa8747..436eca0f18516c0b5f3c0fdada37bb255d175a71 100644 (file)
 #include <BRepTopAdaptor_TopolTool.hxx>
 #include <TopoDS_Face.hxx>
 
-BRepTopAdaptor_Tool::BRepTopAdaptor_Tool() { 
-  myTopolTool = new BRepTopAdaptor_TopolTool();
+BRepTopAdaptor_Tool::BRepTopAdaptor_Tool() : myloaded(Standard_False), myTopolTool(new BRepTopAdaptor_TopolTool()) 
+  
 
-  myloaded=Standard_False;
+  
 }
 
 BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const TopoDS_Face& F,
-                                         const Standard_Real /*Tol2d*/) { 
-  myTopolTool = new BRepTopAdaptor_TopolTool();
+                                         const Standard_Real /*Tol2d*/) : myloaded(Standard_True), myTopolTool(new BRepTopAdaptor_TopolTool()) 
+  
 
   Handle(BRepAdaptor_Surface) surface = new BRepAdaptor_Surface();
   surface->Initialize(F,Standard_True);
   const Handle(Adaptor3d_Surface)& aSurf = surface; // to avoid ambiguity
   myTopolTool->Initialize(aSurf);
   myHSurface = surface;
-  myloaded=Standard_True;
+  
 }
 
 BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const Handle(Adaptor3d_Surface)& surface,
-                                         const Standard_Real /*Tol2d*/)
+                                         const Standard_Real /*Tol2d*/) : myloaded(Standard_True), myTopolTool(new BRepTopAdaptor_TopolTool()), myHSurface(surface)
 { 
-  myTopolTool = new BRepTopAdaptor_TopolTool();
+  
   myTopolTool->Initialize(surface);
-  myHSurface = surface;
-  myloaded=Standard_True;
+  
+  
 }
 
 void BRepTopAdaptor_Tool::Init(const TopoDS_Face& F,
@@ -96,7 +96,7 @@ void BRepTopAdaptor_Tool::SetTopolTool(const Handle(BRepTopAdaptor_TopolTool)& T
 }
 
 void BRepTopAdaptor_Tool::Destroy() { 
-  int i;
+  int i = 0;
   i=0;
   i++;
   
index 8be3506a8f63c916c9411e377e9a70f5842511cc..1d3c7e469414b043e4578a32b8bbbe15abca19eb 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor2d_Curve2d.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Surface.hxx>
@@ -255,7 +257,7 @@ void Analyse(const TColgp_Array2OfPnt& array2,
             Standard_Integer& myNbSamplesV) 
 { 
   gp_Vec Vi,Vip1;
-  Standard_Integer sh,nbch,i,j;
+  Standard_Integer sh = 0,nbch = 0,i = 0,j = 0;
   
   sh = 1;
   nbch = 0;
@@ -329,7 +331,7 @@ void Analyse(const TColgp_Array2OfPnt& array2,
 //=======================================================================
   void BRepTopAdaptor_TopolTool::ComputeSamplePoints() 
 { 
-  Standard_Real uinf,usup,vinf,vsup;
+  Standard_Real uinf = NAN,usup = NAN,vinf = NAN,vsup = NAN;
   uinf = myS->FirstUParameter();  usup = myS->LastUParameter();
   vinf = myS->FirstVParameter();  vsup = myS->LastVParameter();
   if (usup < uinf) { Standard_Real temp=uinf; uinf=usup; usup=temp; }
@@ -342,7 +344,7 @@ void Analyse(const TColgp_Array2OfPnt& array2,
   else if (vinf == RealFirst()) { vinf=vsup-2.e5;  }
   else if (vsup == RealLast()) {  vsup=vinf+2.e5;  }
   
-  Standard_Integer nbsu,nbsv;
+  Standard_Integer nbsu = 0,nbsv = 0;
   GeomAbs_SurfaceType typS = myS->GetType();
   switch(typS) { 
   case GeomAbs_Plane:          { nbsv=2; nbsu=2; } break;
@@ -474,7 +476,7 @@ void Analyse(const TColgp_Array2OfPnt& array2,
 //=======================================================================
   Standard_Boolean BRepTopAdaptor_TopolTool::DomainIsInfinite() 
 {
-  Standard_Real uinf,usup,vinf,vsup;
+  Standard_Real uinf = NAN,usup = NAN,vinf = NAN,vsup = NAN;
   uinf = myS->FirstUParameter();  usup = myS->LastUParameter();
   vinf = myS->FirstVParameter();  vsup = myS->LastVParameter();
   if(Precision::IsNegativeInfinite(uinf)) return(Standard_True);
index f5f17b1847bcf67b29cc20edb7868cd7c30d973f..648c33742bb08d61e20f62aa6ae0fff5564e8879 100644 (file)
@@ -140,10 +140,10 @@ private:
   Handle(BRepAdaptor_Curve2d) myCurve;
   TColStd_ListOfTransient myCurves;
   TColStd_ListIteratorOfListOfTransient myCIterator;
-  Standard_Real myU0;
-  Standard_Real myV0;
-  Standard_Real myDU;
-  Standard_Real myDV;
+  Standard_Real myU0{};
+  Standard_Real myV0{};
+  Standard_Real myDU{};
+  Standard_Real myDV{};
 
 
 };
index 6a2aa5f1122c671fc2ed7c10a7998a6a391e76f5..8d9dc2143987a05836d927cc9b8b50ed9e4d161a 100644 (file)
@@ -27,6 +27,8 @@
 // jct : 24-Apr-97 : correction on computation of Tbord and NewFlatKnots
 //                   in TangExtendToConstraint; Continuity can be equal to 0
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <ElCLib.hxx>
 #include <gp_Pnt.hxx>
@@ -62,7 +64,7 @@ public:
  private:
   // local buffer, to be sufficient for addressing by index [Degree+1][Degree+1]
   // (see math_Matrix implementation)
-  Standard_Real myBuffer[27*27];
+  Standard_Real myBuffer[27*27]{};
 };
 
 //=======================================================================
@@ -154,7 +156,7 @@ Standard_Integer  BSplCLib::FlatIndex
    const TColStd_Array1OfInteger& Mults,
    const Standard_Boolean Periodic)
 {
-  Standard_Integer i, index = Index;
+  Standard_Integer i = 0, index = Index;
   const Standard_Integer MLower = Mults.Lower();
   const Standard_Integer *pmu = &Mults(MLower);
   pmu -= MLower;
@@ -253,7 +255,7 @@ void BSplCLib::LocateParameter
   If Ki <= U < K(i+1) then KnotIndex should be equal to sum (M1+M2+...+Mi).
   */
 
-  Standard_Integer First,Last;
+  Standard_Integer First = 0,Last = 0;
   if (FromK1 < ToK2) {
     First = FromK1;
     Last  = ToK2;
@@ -269,7 +271,7 @@ void BSplCLib::LocateParameter
   
   BSplCLib::Hunt (Knots, NewU, KnotIndex);
   
-  Standard_Real val;
+  Standard_Real val = NAN;
   const Standard_Integer  KLower = Knots.Lower(),
                           KUpper = Knots.Upper();
 
@@ -321,7 +323,7 @@ void BSplCLib::LocateParameter
  Standard_Integer&              KnotIndex,
  Standard_Real&                 NewU) 
 {
-  Standard_Integer first,last;
+  Standard_Integer first = 0,last = 0;
   if (Mults) {
     if (Periodic) {
       first = Knots.Lower();
@@ -394,7 +396,7 @@ Standard_Integer BSplCLib::NbPoles(const Standard_Integer Degree,
                                   const Standard_Boolean Periodic,
                                   const TColStd_Array1OfInteger& Mults)
 {
-  Standard_Integer i,sigma = 0;
+  Standard_Integer i = 0,sigma = 0;
   Standard_Integer f = Mults.Lower();
   Standard_Integer l = Mults.Upper();
   const Standard_Integer * pmu = &Mults(f);
@@ -434,7 +436,7 @@ Standard_Integer BSplCLib::KnotSequenceLength
  const Standard_Integer         Degree,
  const Standard_Boolean         Periodic)
 {
-  Standard_Integer i,l = 0;
+  Standard_Integer i = 0,l = 0;
   Standard_Integer MLower = Mults.Lower();
   Standard_Integer MUpper = Mults.Upper();
   const Standard_Integer * pmu = &Mults(MLower);
@@ -472,8 +474,8 @@ void BSplCLib::KnotSequence
  const Standard_Boolean         Periodic,
  TColStd_Array1OfReal&          KnotSeq)
 {
-  Standard_Real K;
-  Standard_Integer Mult;
+  Standard_Real K = NAN;
+  Standard_Integer Mult = 0;
   Standard_Integer MLower = Mults.Lower();
   const Standard_Integer * pmu = &Mults(MLower);
   pmu -= MLower;
@@ -482,7 +484,7 @@ void BSplCLib::KnotSequence
   const Standard_Real * pkn = &Knots(KLower);
   pkn -= KLower;
   Standard_Integer M1 = Degree + 1 - pmu[MLower];  // for periodic
-  Standard_Integer i,j,index = Periodic ? M1 + 1 : 1;
+  Standard_Integer i = 0,j = 0,index = Periodic ? M1 + 1 : 1;
 
   for (i = KLower; i <= KUpper; i++) {
     Mult = pmu[i];
@@ -495,7 +497,7 @@ void BSplCLib::KnotSequence
   }
   if (Periodic) {
     Standard_Real period = pkn[KUpper] - pkn[KLower];
-    Standard_Integer m;
+    Standard_Integer m = 0;
     m = 1;
     j = KUpper - 1;
 
@@ -586,7 +588,7 @@ BSplCLib_KnotDistribution BSplCLib::KnotForm
  const Standard_Integer       FromK1,
  const Standard_Integer       ToK2)
 {
-   Standard_Real DU0,DU1,Ui,Uj,Eps0,val;
+   Standard_Real DU0 = NAN,DU1 = NAN,Ui = NAN,Uj = NAN,Eps0 = NAN,val = NAN;
    BSplCLib_KnotDistribution  KForm = BSplCLib_Uniform;
 
    if (FromK1 + 1 > Knots.Upper())
@@ -630,7 +632,7 @@ BSplCLib_MultDistribution BSplCLib::MultForm
  const Standard_Integer          FromK1,
  const Standard_Integer          ToK2)
 {
-  Standard_Integer First,Last;
+  Standard_Integer First = 0,Last = 0;
   if (FromK1 < ToK2) {
     First = FromK1;
     Last  = ToK2;
@@ -719,7 +721,7 @@ void BSplCLib::KnotAnalysis (const Standard_Integer         Degree,
     Periodic ? CKnots.Upper() :  BSplCLib::LastUKnotIndex (Degree,CMults);
   MaxKnotMult = 0;
   if (LastKM - FirstKM != 1) {
-    Standard_Integer Multi;
+    Standard_Integer Multi = 0;
     for (Standard_Integer i = FirstKM + 1; i < LastKM; i++) {
       Multi = CMults (i);
       MaxKnotMult = Max (MaxKnotMult, Multi);
@@ -752,8 +754,8 @@ void BSplCLib::Reparametrize
     }
   }
   else {
-    Standard_Real K2;
-    Standard_Real Ratio;
+    Standard_Real K2 = NAN;
+    Standard_Real Ratio = NAN;
     Standard_Real K1 = Knots (Lower);
     Standard_Real Length = Knots (Upper) - Knots (Lower);
     Knots (Lower) = UFirst;
@@ -810,7 +812,7 @@ void  BSplCLib::Reverse(TColStd_Array1OfInteger& Mults)
 {
   Standard_Integer first = Mults.Lower();
   Standard_Integer last  = Mults.Upper();
-  Standard_Integer temp;
+  Standard_Integer temp = 0;
 
   while (first < last) {
     temp = Mults(first);
@@ -829,7 +831,7 @@ void  BSplCLib::Reverse(TColStd_Array1OfInteger& Mults)
 void  BSplCLib::Reverse(TColStd_Array1OfReal& Weights,
                        const Standard_Integer L)
 {
-  Standard_Integer i, l = L;
+  Standard_Integer i = 0, l = L;
   l = Weights.Lower()+(l-Weights.Lower())%(Weights.Upper()-Weights.Lower()+1);
 
   TColStd_Array1OfReal temp(0,Weights.Length()-1);
@@ -855,7 +857,7 @@ Standard_Boolean  BSplCLib::IsRational(const TColStd_Array1OfReal& Weights,
 //                                    const Standard_Real Epsi)
                                       const Standard_Real )
 {
-  Standard_Integer i, f = Weights.Lower(), l = Weights.Length();
+  Standard_Integer i = 0, f = Weights.Lower(), l = Weights.Length();
   Standard_Integer I3 = I2 - f;
   const Standard_Real * WG = &Weights(f);
   WG -= f;
@@ -877,8 +879,8 @@ void  BSplCLib::Eval(const Standard_Real U,
                     const Standard_Integer Dimension, 
                     Standard_Real& Poles)
 {
-  Standard_Integer step,i,Dms,Dm1,Dpi,Sti;
-  Standard_Real X, Y, *poles, *knots = &Knots;
+  Standard_Integer step = 0,i = 0,Dms = 0,Dm1 = 0,Dpi = 0,Sti = 0;
+  Standard_Real X = NAN, Y = NAN, *poles = nullptr, *knots = &Knots;
   Dm1 = Dms = Degree;
   Dm1--;
   Dms++;
@@ -967,7 +969,7 @@ void  BSplCLib::Eval(const Standard_Real U,
     break;
   }
     default : {
-      Standard_Integer k;
+      Standard_Integer k = 0;
       
       for (step = - 1; step < Dm1; step++) {
        Dms--;
@@ -1032,9 +1034,9 @@ void  BSplCLib::BoorScheme(const Standard_Real U,
   //  P(0,0) P(1,0) P(2,0) ...... P(2,l-1) P(1,l-1) P(0,l)
   //
 
-  Standard_Integer i,k,step;
+  Standard_Integer i = 0,k = 0,step = 0;
   Standard_Real *knots = &Knots;
-  Standard_Real *pole, *firstpole = &Poles - 2 * Dimension;
+  Standard_Real *pole = nullptr, *firstpole = &Poles - 2 * Dimension;
   // the steps of recursion
 
   for (step = 0; step < Depth; step++) {
@@ -1073,9 +1075,9 @@ Standard_Boolean  BSplCLib::AntiBoorScheme(const Standard_Real    U,
 {
   // do the Boor scheme reverted.
 
-  Standard_Integer i,k,step, half_length;
+  Standard_Integer i = 0,k = 0,step = 0, half_length = 0;
   Standard_Real *knots = &Knots;
-  Standard_Real z,X,Y,*pole, *firstpole = &Poles + (Depth-1) * Dimension;
+  Standard_Real z = NAN,X = NAN,Y = NAN,*pole = nullptr, *firstpole = &Poles + (Depth-1) * Dimension;
 
   // Test the special case length = 1 
   // only verification of the central point
@@ -1152,7 +1154,7 @@ void  BSplCLib::Derivative(const Standard_Integer Degree,
                           const Standard_Integer Order, 
                           Standard_Real& Poles)
 {
-  Standard_Integer i,k,step,span = Degree;
+  Standard_Integer i = 0,k = 0,step = 0,span = Degree;
   Standard_Real *knot = &Knots;
 
   for (step = 1; step <= Order; step++) {
@@ -1184,8 +1186,8 @@ void  BSplCLib::Bohm(const Standard_Real U,
                     Standard_Real& Poles)
 {
   // First phase independent of U, compute the poles of the derivatives
-  Standard_Integer i,j,iDim,min,Dmi,DDmi,jDmi,Degm1;
-  Standard_Real *knot = &Knots, *pole, coef, *tbis, *psav, *psDD, *psDDmDim;
+  Standard_Integer i = 0,j = 0,iDim = 0,min = 0,Dmi = 0,DDmi = 0,jDmi = 0,Degm1 = 0;
+  Standard_Real *knot = &Knots, *pole = nullptr, coef = NAN, *tbis = nullptr, *psav = nullptr, *psDD = nullptr, *psDDmDim = nullptr;
   psav     = &Poles;
   if (N < Degree) min = N;
   else            min = Degree;
@@ -1391,7 +1393,7 @@ void  BSplCLib::Bohm(const Standard_Real U,
     break;
   }
     default : {
-      Standard_Integer k;
+      Standard_Integer k = 0;
       Standard_Integer Dim2 = Dimension << 1;
       psDD     = psav + Degree * Dimension;
       psDDmDim = psDD - Dimension;
@@ -1533,7 +1535,7 @@ void BSplCLib::BuildKnots(const Standard_Integer         Degree,
       break;
     }
       default : {
-       Standard_Integer i,j;
+       Standard_Integer i = 0,j = 0;
        Standard_Integer Deg2 = Degree << 1;
        j = Index - Degree;
        
@@ -1545,7 +1547,7 @@ void BSplCLib::BuildKnots(const Standard_Integer         Degree,
     }
   }
   else {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Integer Deg1 = Degree - 1;
     Standard_Integer KUpper = Knots.Upper();
     Standard_Integer MLower = Mults->Lower();
@@ -1611,7 +1613,7 @@ Standard_Integer BSplCLib::PoleIndex(const Standard_Integer         Degree,
                                     const Standard_Boolean         Periodic,
                                     const TColStd_Array1OfInteger& Mults)
 {
-  Standard_Integer i, pindex = 0;
+  Standard_Integer i = 0, pindex = 0;
 
   for (i = Mults.Lower(); i <= Index; i++)
     pindex += Mults(i);
@@ -1635,7 +1637,7 @@ void  BSplCLib::BuildBoor(const Standard_Integer         Index,
                          Standard_Real&                 LP)
 {
   Standard_Real *poles = &LP;
-  Standard_Integer i,k, ip = Poles.Lower() + Index * Dimension;
+  Standard_Integer i = 0,k = 0, ip = Poles.Lower() + Index * Dimension;
   
   for (i = 0; i < Length+1; i++) {
 
@@ -1675,7 +1677,7 @@ void  BSplCLib::GetPole(const Standard_Integer         Index,
                        Standard_Integer&              Position,
                        TColStd_Array1OfReal&          Pole)
 {
-  Standard_Integer k;
+  Standard_Integer k = 0;
   Standard_Real* pole = &LP + BoorIndex(Index,Length,Depth) * Dimension;
 
   for (k = 0; k < Dimension; k++) {
@@ -1704,7 +1706,7 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
 {
   Standard_Boolean addflat = AddMults == NULL;
   
-  Standard_Integer first,last;
+  Standard_Integer first = 0,last = 0;
   if (Periodic) {
     first = Knots.Lower();
     last  = Knots.Upper();
@@ -1718,7 +1720,7 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
   if (adeltaK1 > Tolerance) return Standard_False;
   if (adeltaK2  > Tolerance) return Standard_False;
   
-  Standard_Integer sigma = 0, mult, amult;
+  Standard_Integer sigma = 0, mult = 0, amult = 0;
   NbKnots = 0;
   Standard_Integer  k  = Knots.Lower() - 1;
   Standard_Integer  ak = AddKnots.Lower();
@@ -1733,7 +1735,7 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
   }
   
   Standard_Integer aLastKnotMult = Mults (Knots.Upper());
-  Standard_Real au,oldau = AddKnots(ak),Eps;
+  Standard_Real au = NAN,oldau = AddKnots(ak),Eps = NAN;
   
   while (ak <= AddKnots.Upper()) {
     au = AddKnots(ak);
@@ -1855,7 +1857,7 @@ static void Copy(const Standard_Integer      NbPoles,
     (NewFirst - NewPoles.Lower()) % (NewPoles.Upper() - NewPoles.Lower() + 1);
 
   // copy
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   for (i = 1; i <= NbPoles; i++) {
     NewPoles(NewFirst) = OldPoles(OldFirst);
@@ -1888,12 +1890,12 @@ void BSplCLib::InsertKnots
 {
   Standard_Boolean addflat  = AddMults == NULL;
   
-  Standard_Integer i,k,mult,firstmult;
-  Standard_Integer index,kn,curnk,curk;
-  Standard_Integer p,np, curp, curnp, length, depth;
-  Standard_Real u;
-  Standard_Integer need;
-  Standard_Real Eps;
+  Standard_Integer i = 0,k = 0,mult = 0,firstmult = 0;
+  Standard_Integer index = 0,kn = 0,curnk = 0,curk = 0;
+  Standard_Integer p = 0,np = 0, curp = 0, curnp = 0, length = 0, depth = 0;
+  Standard_Real u = NAN;
+  Standard_Integer need = 0;
+  Standard_Real Eps = NAN;
 
   // -------------------
   // create local arrays
@@ -2137,12 +2139,12 @@ Standard_Boolean BSplCLib::RemoveKnot
  TColStd_Array1OfInteger&       NewMults,
  const Standard_Real            Tolerance)
 {
-  Standard_Integer index,i,j,k,p,np;
+  Standard_Integer index = 0,i = 0,j = 0,k = 0,p = 0,np = 0;
 
   Standard_Integer TheIndex = Index;
 
   // protection
-  Standard_Integer first,last;
+  Standard_Integer first = 0,last = 0;
   if (Periodic) {
     first = Knots.Lower();
     last  = Knots.Upper();
@@ -2299,7 +2301,7 @@ Standard_Integer  BSplCLib::IncreaseDegreeCountKnots
   if (Periodic) return Mults.Length();
   Standard_Integer f = FirstUKnotIndex(Degree,Mults);
   Standard_Integer l = LastUKnotIndex(Degree,Mults);
-  Standard_Integer m,i,removed = 0, step = NewDegree - Degree;
+  Standard_Integer m = 0,i = 0,removed = 0, step = NewDegree - Degree;
   
   i = Mults.Lower();
   m = Degree + (f - i + 1) * step + 1;
@@ -2370,7 +2372,7 @@ void BSplCLib::IncreaseDegree
   // create the working curve
   //-------------------------
 
-  Standard_Integer i,k,f,l,m,pf,pl,firstknot;
+  Standard_Integer i = 0,k = 0,f = 0,l = 0,m = 0,pf = 0,pl = 0,firstknot = 0;
 
   pf = 0; // number of null poles added at beginning
   pl = 0; // number of null poles added at end
@@ -2485,7 +2487,7 @@ void BSplCLib::IncreaseDegree
   // Loop on degree incrementation
   //------------------------------
 
-  Standard_Integer step,curDeg;
+  Standard_Integer step = 0,curDeg = 0;
   Standard_Integer nbp = nbwpoles;
   nbwp = nbp;
 
@@ -2653,7 +2655,7 @@ void  BSplCLib::PrepareUnperiodize
  Standard_Integer&        NbKnots, 
  Standard_Integer&        NbPoles)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   // initialize NbKnots and NbPoles
   NbKnots = Mults.Length();
   NbPoles = - Degree - 1;
@@ -2661,7 +2663,7 @@ void  BSplCLib::PrepareUnperiodize
   for (i = Mults.Lower(); i <= Mults.Upper(); i++) 
     NbPoles += Mults(i);
 
-  Standard_Integer sigma, k;
+  Standard_Integer sigma = 0, k = 0;
   // Add knots at the beginning of the curve to raise Multiplicities 
   // to Degre + 1;
   sigma = Mults(Mults.Lower());
@@ -2710,7 +2712,7 @@ void  BSplCLib::Unperiodize
  TColStd_Array1OfReal&    NewKnots,
  TColStd_Array1OfReal&    NewPoles)
 {
-  Standard_Integer sigma, k, index = 0;
+  Standard_Integer sigma = 0, k = 0, index = 0;
   // evaluation of index : number of knots to insert before knot(1) to
   // raise sum of multiplicities to <Degree + 1>
   sigma = Mults(Mults.Lower());
@@ -2768,8 +2770,8 @@ void BSplCLib::PrepareTrimming(const Standard_Integer         Degree,
                                     Standard_Integer&        NbKnots,
                                     Standard_Integer&        NbPoles)
 {
-  Standard_Integer i;
-  Standard_Real NewU1, NewU2;
+  Standard_Integer i = 0;
+  Standard_Real NewU1 = NAN, NewU2 = NAN;
   Standard_Integer index1 = 0, index2 = 0;
 
   // Eval index1, index2 : position of U1 and U2 in the Array Knots
@@ -2810,7 +2812,7 @@ void BSplCLib::Trimming(const Standard_Integer         Degree,
                              TColStd_Array1OfInteger& NewMults,
                              TColStd_Array1OfReal&    NewPoles)
 {
-  Standard_Integer i, nbpoles=0, nbknots=0;
+  Standard_Integer i = 0, nbpoles=0, nbknots=0;
   Standard_Real    kk[2] = { U1, U2 };
   Standard_Integer mm[2] = { Degree, Degree };
   TColStd_Array1OfReal    K( kk[0], 1, 2 );
@@ -2833,8 +2835,8 @@ void BSplCLib::Trimming(const Standard_Integer         Degree,
              Standard_False);
 
   // find in TempPoles the index of the pole corresponding to U1
-  Standard_Integer Kindex = 0, Pindex;
-  Standard_Real NewU1;
+  Standard_Integer Kindex = 0, Pindex = 0;
+  Standard_Real NewU1 = NAN;
   LocateParameter( Degree, TempKnots, TempMults, U1, Periodic,
                   TempKnots.Lower(), TempKnots.Upper(), Kindex, NewU1);
   Pindex = PoleIndex ( Degree, Kindex, Periodic, TempMults);
@@ -2862,15 +2864,15 @@ BSplCLib::SolveBandedSystem(const math_Matrix&  Matrix,
                            const Standard_Integer ArrayDimension,
                            Standard_Real&   Array) 
 {
-  Standard_Integer ii,
-  jj,
-  kk,
-  MinIndex,
-  MaxIndex,
+  Standard_Integer ii = 0,
+  jj = 0,
+  kk = 0,
+  MinIndex = 0,
+  MaxIndex = 0,
   ReturnCode = 0 ;
   
   Standard_Real   *PolesArray = &Array ;
-  Standard_Real   Inverse ;
+  Standard_Real   Inverse = NAN ;
   
   
   if (Matrix.LowerCol() != 1 || 
@@ -2940,12 +2942,12 @@ BSplCLib::SolveBandedSystem(const math_Matrix&  Matrix,
                            Standard_Real&   Poles,
                            Standard_Real&   Weights) 
 {
-  Standard_Integer ii,
-  kk,
+  Standard_Integer ii = 0,
+  kk = 0,
   ErrorCode = 0,
   ReturnCode = 0 ;
   
-  Standard_Real   Inverse,
+  Standard_Real   Inverse = NAN,
   *PolesArray   = &Poles,
   *WeightsArray = &Weights ;
   
@@ -3006,9 +3008,9 @@ void  BSplCLib::BuildSchoenbergPoints(const Standard_Integer         Degree,
                                      const TColStd_Array1OfReal&    FlatKnots,
                                      TColStd_Array1OfReal&          Parameters) 
 {
-  Standard_Integer ii,
-  jj ;
-  Standard_Real Inverse ;
+  Standard_Integer ii = 0,
+  jj = 0 ;
+  Standard_Real Inverse = NAN ;
   Inverse = 1.0e0 / (Standard_Real)Degree ;
   
   for (ii = Parameters.Lower() ;   ii <= Parameters.Upper() ; ii++) {
@@ -3034,9 +3036,9 @@ void  BSplCLib::Interpolate(const Standard_Integer         Degree,
                            Standard_Real&                 Poles,
                            Standard_Integer&              InversionProblem) 
 {
-  Standard_Integer ErrorCode,
-  UpperBandWidth,
-  LowerBandWidth ;
+  Standard_Integer ErrorCode = 0,
+  UpperBandWidth = 0,
+  LowerBandWidth = 0 ;
 //  Standard_Real *PolesArray = &Poles ;
   math_Matrix InterpolationMatrix(1, Parameters.Length(),
                                  1, 2 * Degree + 1) ;
@@ -3083,9 +3085,9 @@ void  BSplCLib::Interpolate(const Standard_Integer         Degree,
                            Standard_Real&                 Weights,
                            Standard_Integer&              InversionProblem) 
 {
-  Standard_Integer ErrorCode,
-  UpperBandWidth,
-  LowerBandWidth ;
+  Standard_Integer ErrorCode = 0,
+  UpperBandWidth = 0,
+  LowerBandWidth = 0 ;
 
   math_Matrix InterpolationMatrix(1, Parameters.Length(),
                                  1, 2 * Degree + 1) ;
@@ -3142,28 +3144,28 @@ void  BSplCLib::Eval
  Standard_Real&                        PolesResults,
  Standard_Real&                        WeightsResults)
 {
-  Standard_Integer ii,
-  jj,
+  Standard_Integer ii = 0,
+  jj = 0,
   kk=0,
-  Index,
-  Index1,
-  Index2,
-  *ExtrapModeArray,
-  Modulus,
-  NewRequest,
+  Index = 0,
+  Index1 = 0,
+  Index2 = 0,
+  *ExtrapModeArray = nullptr,
+  Modulus = 0,
+  NewRequest = 0,
   ExtrapolatingFlag[2],
-  ErrorCode,
+  ErrorCode = 0,
   Order = Degree + 1,
-  FirstNonZeroBsplineIndex,
+  FirstNonZeroBsplineIndex = 0,
   LocalRequest = DerivativeRequest ;
-  Standard_Real  *PResultArray,
-  *WResultArray,
-  *PolesArray,
-  *WeightsArray,
-  LocalParameter,
-  Period,
-  Inverse,
-  Delta ;
+  Standard_Real  *PResultArray = nullptr,
+  *WResultArray = nullptr,
+  *PolesArray = nullptr,
+  *WeightsArray = nullptr,
+  LocalParameter = NAN,
+  Period = NAN,
+  Inverse = NAN,
+  Delta = NAN ;
   PolesArray = &Poles     ;
   WeightsArray = &Weights ;
   ExtrapModeArray = &ExtrapMode ;
@@ -3341,26 +3343,26 @@ void  BSplCLib::Eval
  Standard_Real&                        Poles,
  Standard_Real&                        Results) 
 {
-  Standard_Integer ii,
-  jj,
-  kk,
-  Index,
-  Index1,
-  *ExtrapModeArray,
-  Modulus,
-  NewRequest,
+  Standard_Integer ii = 0,
+  jj = 0,
+  kk = 0,
+  Index = 0,
+  Index1 = 0,
+  *ExtrapModeArray = nullptr,
+  Modulus = 0,
+  NewRequest = 0,
   ExtrapolatingFlag[2],
-  ErrorCode,
+  ErrorCode = 0,
   Order = Degree + 1,
-  FirstNonZeroBsplineIndex,
+  FirstNonZeroBsplineIndex = 0,
   LocalRequest = DerivativeRequest ;
 
-  Standard_Real  *ResultArray,
-  *PolesArray,
-  LocalParameter,
-  Period,
-  Inverse,
-  Delta ;
+  Standard_Real  *ResultArray = nullptr,
+  *PolesArray = nullptr,
+  LocalParameter = NAN,
+  Period = NAN,
+  Inverse = NAN,
+  Delta = NAN ;
          
   PolesArray = &Poles ;
   ExtrapModeArray = &ExtrapMode ;
@@ -3543,7 +3545,7 @@ void  BSplCLib::TangExtendToConstraint
 
 
 //  position at the node of connection
-  Standard_Real Tbord ;
+  Standard_Real Tbord = NAN ;
   if (After) {
     Tbord = FlatKnots(FlatKnots.Upper()-CDegree);
   }
@@ -3551,7 +3553,7 @@ void  BSplCLib::TangExtendToConstraint
     Tbord = FlatKnots(FlatKnots.Lower()+CDegree);
   }
   Standard_Boolean periodic_flag = Standard_False ;
-  Standard_Integer ipos, extrap_mode[2], derivative_request = Max(Continuity,1);
+  Standard_Integer ipos = 0, extrap_mode[2], derivative_request = Max(Continuity,1);
   extrap_mode[0] = extrap_mode[1] = CDegree;
   TColStd_Array1OfReal  EvalBS(1, CDimension * (derivative_request+1)) ; 
   Standard_Real * Eadr = (Standard_Real *) &EvalBS(1) ;
@@ -3591,7 +3593,7 @@ void  BSplCLib::TangExtendToConstraint
   }
 
 //  calculate the coefficients of extension
-  Standard_Integer ii, jj, kk;
+  Standard_Integer ii = 0, jj = 0, kk = 0;
   TColStd_Array1OfReal ExtraCoeffs(1,Csize*CDimension);
   ExtraCoeffs.Init(0.);
 
@@ -3666,7 +3668,7 @@ void  BSplCLib::TangExtendToConstraint
 ////////////////////////////////////////////////////////////////////////
 
 //  ratio of reparametrization
-  Standard_Real Ratio=1, Delta;
+  Standard_Real Ratio=1, Delta = NAN;
   if ( (L1 > Precision::Confusion()) && (L2 > Precision::Confusion()) ) {
     Ratio = L2 / L1;
   }
@@ -3688,7 +3690,7 @@ void  BSplCLib::TangExtendToConstraint
   TColStd_Array1OfReal NewFlats (1, NbK1+NbK2-CDegree-2);
 
 //  poles
-  Standard_Integer indNP, indP, indEP;
+  Standard_Integer indNP = 0, indP = 0, indEP = 0;
   if (After) {
 
     for (ii=1;  ii<=NbP1+NbP2-1; ii++) {
@@ -3918,15 +3920,15 @@ void BSplCLib::Resolution(      Standard_Real&        Poles,
                          const Standard_Real         Tolerance3D,
                          Standard_Real&              UTolerance) 
 {
-  Standard_Integer ii,num_poles,ii_index,jj_index,ii_inDim;
-  Standard_Integer lower,upper,ii_minus,jj,ii_miDim;
+  Standard_Integer ii = 0,num_poles = 0,ii_index = 0,jj_index = 0,ii_inDim = 0;
+  Standard_Integer lower = 0,upper = 0,ii_minus = 0,jj = 0,ii_miDim = 0;
   Standard_Integer Deg1 = Degree + 1;
   Standard_Integer Deg2 = (Degree << 1) + 1;
-  Standard_Real value,factor,W,min_weights,inverse;
-  Standard_Real pa_ii_inDim_0, pa_ii_inDim_1, pa_ii_inDim_2, pa_ii_inDim_3;
-  Standard_Real pa_ii_miDim_0, pa_ii_miDim_1, pa_ii_miDim_2, pa_ii_miDim_3;
-  Standard_Real wg_ii_index, wg_ii_minus;
-  Standard_Real *PA,max_derivative;
+  Standard_Real value = NAN,factor = NAN,W = NAN,min_weights = NAN,inverse = NAN;
+  Standard_Real pa_ii_inDim_0 = NAN, pa_ii_inDim_1 = NAN, pa_ii_inDim_2 = NAN, pa_ii_inDim_3 = NAN;
+  Standard_Real pa_ii_miDim_0 = NAN, pa_ii_miDim_1 = NAN, pa_ii_miDim_2 = NAN, pa_ii_miDim_3 = NAN;
+  Standard_Real wg_ii_index = NAN, wg_ii_minus = NAN;
+  Standard_Real *PA = nullptr,max_derivative = NAN;
   const Standard_Real * FK = &FlatKnots(FlatKnots.Lower());
   PA = &Poles;
   max_derivative = 0.0e0;
@@ -4164,7 +4166,7 @@ void BSplCLib::Resolution(      Standard_Real&        Poles,
     break;
   }
     default : {
-      Standard_Integer kk;
+      Standard_Integer kk = 0;
       if (Weights != NULL) {
         const Standard_Real * WG = &(*Weights)(Weights->Lower());
        min_weights = WG[0];
@@ -4302,7 +4304,7 @@ Standard_Integer BSplCLib::Intervals (const TColStd_Array1OfReal& theKnots,
   // locate the left and nearest knot for boundaries
   Standard_Integer anIndex1 = 0;
   Standard_Integer anIndex2 = 0;
-  Standard_Real aDummyDouble;
+  Standard_Real aDummyDouble = NAN;
   // we use version of LocateParameter that doesn't need multiplicities
   LocateParameter(theDegree, aNewKnots, TColStd_Array1OfInteger(), aCurFirst, Standard_False, 1, aNbNewKnots, anIndex1, aDummyDouble);
   LocateParameter(theDegree, aNewKnots, TColStd_Array1OfInteger(), aCurLast, Standard_False, 1, aNbNewKnots, anIndex2, aDummyDouble);
index 0ae8628e5c8d7b37777d659570cbb90e68390456..7d406cbcdcf9818c120737ca5359edbbc938fdcc 100644 (file)
@@ -18,6 +18,8 @@
 //                            EvalBsplineBasis,
 //                            EvalPolynomial : Horners method
 
+#include <math.h>
+
 #include <Standard_Stream.hxx>
 
 #include <BSplCLib.hxx>
@@ -46,9 +48,9 @@ struct BSplCLib_DataContainer
         "BSplCLib: bspline degree is greater than maximum supported");
   }
 
-  Standard_Real poles[2*(25+1)];
-  Standard_Real knots[2*25];
-  Standard_Real ders[4];
+  Standard_Real poles[2*(25+1)]{};
+  Standard_Real knots[2*25]{};
+  Standard_Real ders[4]{};
 };
 
 // methods for 1 dimensional BSplines
@@ -66,9 +68,9 @@ void  BSplCLib::BuildEval(const Standard_Integer         Degree,
 {
   Standard_Integer PLower = Poles.Lower();
   Standard_Integer PUpper = Poles.Upper();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer ip = PLower + Index - 1;
-  Standard_Real w, *pole = &LP;
+  Standard_Real w = NAN, *pole = &LP;
   if (Weights == NULL) {
     
     for (i = 0; i <= Degree; i++) {
@@ -153,9 +155,9 @@ void BSplCLib::D0
  const TColStd_Array1OfInteger* Mults,  
  Standard_Real&                 P) 
 {                    
-  Standard_Integer dim,index = Index;
+  Standard_Integer dim = 0,index = Index;
   Standard_Real    u = U;
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
   BSplCLib_DataContainer dc(Degree);
   PrepareEval(u,index,dim,rational,Degree,Periodic,Poles,Weights,Knots,Mults,dc);
   BSplCLib::Eval(u,Degree,*dc.knots,dim,*dc.poles);
@@ -180,9 +182,9 @@ void BSplCLib::D1
  Standard_Real&                 P,
  Standard_Real&                 V) 
 {                    
-  Standard_Integer dim,index = Index;
+  Standard_Integer dim = 0,index = Index;
   Standard_Real    u = U;
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
   BSplCLib_DataContainer dc(Degree);
   PrepareEval(u,index,dim,rational,Degree,Periodic,Poles,Weights,Knots,Mults,dc);
   BSplCLib::Bohm(u,Degree,1,*dc.knots,dim,*dc.poles);
@@ -213,9 +215,9 @@ void BSplCLib::D2
  Standard_Real&                 V1,
  Standard_Real&                 V2) 
 {                    
-  Standard_Integer dim,index = Index;
+  Standard_Integer dim = 0,index = Index;
   Standard_Real    u = U;
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
   BSplCLib_DataContainer dc(Degree);
   PrepareEval(u,index,dim,rational,Degree,Periodic,Poles,Weights,Knots,Mults,dc);
   BSplCLib::Bohm(u,Degree,2,*dc.knots,dim,*dc.poles);
@@ -249,9 +251,9 @@ void BSplCLib::D3
  Standard_Real&                 V2,
  Standard_Real&                 V3) 
 {                    
-  Standard_Integer dim,index = Index;
+  Standard_Integer dim = 0,index = Index;
   Standard_Real    u = U;
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
   BSplCLib_DataContainer dc(Degree);
   PrepareEval(u,index,dim,rational,Degree,Periodic,Poles,Weights,Knots,Mults,dc);
   BSplCLib::Bohm(u,Degree,3,*dc.knots,dim,*dc.poles);
@@ -285,14 +287,14 @@ void BSplCLib::DN
  const TColStd_Array1OfInteger* Mults,  
  Standard_Real&                 VN) 
 {                    
-  Standard_Integer dim,index = Index;
+  Standard_Integer dim = 0,index = Index;
   Standard_Real    u = U;
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
   BSplCLib_DataContainer dc(Degree);
   PrepareEval(u,index,dim,rational,Degree,Periodic,Poles,Weights,Knots,Mults,dc);
   BSplCLib::Bohm(u,Degree,N,*dc.knots,dim,*dc.poles);
   if (rational) {
-    Standard_Real v;
+    Standard_Real v = NAN;
     PLib::RationalDerivative(Degree,N,1,*dc.poles,v,Standard_False);
     VN = v;
   }
@@ -316,15 +318,15 @@ BSplCLib::BuildBSpMatrix(const  TColStd_Array1OfReal&     Parameters,
                         Standard_Integer&                UpperBandWidth,
                         Standard_Integer&                LowerBandWidth) 
 {
-  Standard_Integer ii,
-  jj,
-  Index,
-  ErrorCode,
+  Standard_Integer ii = 0,
+  jj = 0,
+  Index = 0,
+  ErrorCode = 0,
   ReturnCode = 0,
-  FirstNonZeroBsplineIndex,
-  BandWidth,
+  FirstNonZeroBsplineIndex = 0,
+  BandWidth = 0,
   MaxOrder = BSplCLib::MaxDegree() + 1,
-  Order ;
+  Order = 0 ;
   
   math_Matrix   BSplineBasis(1, MaxOrder,
                              1, MaxOrder) ;
@@ -384,16 +386,16 @@ BSplCLib::FactorBandedMatrix(math_Matrix&   Matrix,
                             const Standard_Integer LowerBandWidth,
                             Standard_Integer&  PivotIndexProblem) 
 {
-  Standard_Integer ii,
-  jj,
-  kk,
-  Index,
-  MinIndex,
-  MaxIndex,
+  Standard_Integer ii = 0,
+  jj = 0,
+  kk = 0,
+  Index = 0,
+  MinIndex = 0,
+  MaxIndex = 0,
   ReturnCode = 0,
   BandWidth = UpperBandWidth + LowerBandWidth + 1 ;
   
-  Standard_Real Inverse ;
+  Standard_Real Inverse = NAN ;
   PivotIndexProblem = 0 ;
 
   for (ii = Matrix.LowerRow() + 1 ; ii <= Matrix.UpperRow() ; ii++) {
@@ -460,20 +462,20 @@ BSplCLib::EvalBsplineBasis
   //    i       i+1                       i+k-1
   //
   Standard_Integer  
-    ReturnCode,
-  ii,
-  pp,
-  qq,
-  ss,
-  NumPoles,
-  LocalRequest ;
+    ReturnCode = 0,
+  ii = 0,
+  pp = 0,
+  qq = 0,
+  ss = 0,
+  NumPoles = 0,
+  LocalRequest = 0 ;
 //  ,Index ;
   
-  Standard_Real NewParameter,
-  Inverse,
-  Factor,
-  LocalInverse,
-  Saved ;
+  Standard_Real NewParameter = NAN,
+  Inverse = NAN,
+  Factor = NAN,
+  LocalInverse = NAN,
+  Saved = NAN ;
 // , *FlatKnotsArray ;
   
   ReturnCode = 0 ;
@@ -575,30 +577,30 @@ void BSplCLib::MovePointAndTangent(const Standard_Real    U,
                                   Standard_Real&        NewPoles,
                                   Standard_Integer&     ErrorStatus) 
 {
-  Standard_Integer num_poles,
-  num_knots,
-  ii,
-  jj,
-  conditions,
-  start_num_poles,
-  end_num_poles,
-  index,
-  start_index,
-  end_index,
-  other_index,
-  type,
-  order ;
+  Standard_Integer num_poles = 0,
+  num_knots = 0,
+  ii = 0,
+  jj = 0,
+  conditions = 0,
+  start_num_poles = 0,
+  end_num_poles = 0,
+  index = 0,
+  start_index = 0,
+  end_index = 0,
+  other_index = 0,
+  type = 0,
+  order = 0 ;
   
-  Standard_Real    new_parameter,
-  value,
-  divide,
-  end_value,
-  start_value,
-  *poles_array,
-  *new_poles_array,
-  *delta_array,
-  *derivatives_array,
-  *weights_array ;
+  Standard_Real    new_parameter = NAN,
+  value = NAN,
+  divide = NAN,
+  end_value = NAN,
+  start_value = NAN,
+  *poles_array = nullptr,
+  *new_poles_array = nullptr,
+  *delta_array = nullptr,
+  *derivatives_array = nullptr,
+  *weights_array = nullptr ;
   
   ErrorStatus = 0 ;
   weights_array = NULL ;
@@ -883,18 +885,18 @@ void BSplCLib::FunctionMultiply
  Standard_Real &                    NewPoles,
  Standard_Integer &                 theStatus)
 {
-  Standard_Integer ii,
-  jj,
-  index ;
+  Standard_Integer ii = 0,
+  jj = 0,
+  index = 0 ;
   Standard_Integer extrap_mode[2],
-  error_code,
-  num_new_poles,
+  error_code = 0,
+  num_new_poles = 0,
   derivative_request = 0 ;
   Standard_Boolean  periodic_flag = Standard_False ;
-  Standard_Real  result,
+  Standard_Real  result = NAN,
   start_end[2],
-  *array_of_poles,
-  *array_of_new_poles ;
+  *array_of_poles = nullptr,
+  *array_of_new_poles = nullptr ;
   
   array_of_poles = (Standard_Real *) &NewPoles ;
   extrap_mode[0] = 
@@ -982,18 +984,18 @@ void BSplCLib::FunctionReparameterise
  Standard_Real &                    NewPoles,
  Standard_Integer &                 theStatus)
 {
-  Standard_Integer ii,
+  Standard_Integer ii = 0,
 //  jj,
-  index ;
+  index = 0 ;
   Standard_Integer extrap_mode[2],
-  error_code,
-  num_new_poles,
+  error_code = 0,
+  num_new_poles = 0,
   derivative_request = 0 ;
   Standard_Boolean  periodic_flag = Standard_False ;
-  Standard_Real  result,
+  Standard_Real  result = NAN,
   start_end[2],
-  *array_of_poles,
-  *array_of_new_poles ;
+  *array_of_poles = nullptr,
+  *array_of_new_poles = nullptr ;
   
   array_of_poles = (Standard_Real *) &NewPoles ;
   extrap_mode[0] = 
@@ -1149,13 +1151,13 @@ void BSplCLib::MergeBSplineKnots
  Handle(TColStd_HArray1OfReal) &     NewKnots,
  Handle(TColStd_HArray1OfInteger) &  NewMults) 
 {
-  Standard_Integer ii,
-  jj,
-  continuity,
-  set_mults_flag,
-  degree,
-  index,
-  num_knots ;
+  Standard_Integer ii = 0,
+  jj = 0,
+  continuity = 0,
+  set_mults_flag = 0,
+  degree = 0,
+  index = 0,
+  num_knots = 0 ;
   if (StartValue < EndValue - Tolerance) {
     TColStd_Array1OfReal knots1(1, Knots1.Length());
     TColStd_Array1OfReal knots2(1, Knots2.Length());
index 5a386157f9bcbd51c56d2a2ed509cfd77c69dc08..2f460c3d9197ceb48d5678edac9bfef5e2cd12d4 100644 (file)
@@ -39,8 +39,8 @@ class BSplCLib_BezierArrays
   }
 
  private:
-  Standard_Real aKnots[2];
-  Standard_Integer aMults[2];
+  Standard_Real aKnots[2]{};
+  Standard_Integer aMults[2]{};
   
  public:
   TColStd_Array1OfReal    knots;
index 2669af759dad1a116b2ac514b9e366a818b551cb..ad6004e55e402058773cde15baea5fda346577e8 100644 (file)
@@ -21,6 +21,8 @@
 // pmn  07-10-96 : Correction de DN dans le cas rationnal.
 // pmn  06-02-97 : Correction des poids dans RationalDerivative. (PRO700)
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <BSplSLib.hxx>
 #include <gp_Pnt.hxx>
@@ -52,10 +54,10 @@ struct BSplSLib_DataContainer
         VDegree > BSplCLib::MaxDegree() || BSplCLib::MaxDegree() > 25,
         "BSplSLib: bspline degree is greater than maximum supported");
   }
-  Standard_Real poles[4*(25+1)*(25+1)];
-  Standard_Real knots1[2*25];
-  Standard_Real knots2[2*25];
-  Standard_Real ders[48];
+  Standard_Real poles[4*(25+1)*(25+1)]{};
+  Standard_Real knots1[2*25]{};
+  Standard_Real knots2[2*25]{};
+  Standard_Real ders[48]{};
 };
 
 //**************************************************************************
@@ -122,10 +124,10 @@ void  BSplSLib::RationalDerivative(const Standard_Integer UDeg,
   //     Numerator     Denominator      ...         Numerator          Denominator
   //
   //
-  Standard_Integer ii,jj,pp,qq,index,index1,index2;
-  Standard_Integer M1,M3,M4,N1,iiM1,iiM3,jjM1,ppM1,ppM3;
-  Standard_Integer MinN,MinN1,MinM,MinM1;
-  Standard_Integer index_u,index_u1,index_v,index_v1,index_w;
+  Standard_Integer ii = 0,jj = 0,pp = 0,qq = 0,index = 0,index1 = 0,index2 = 0;
+  Standard_Integer M1 = 0,M3 = 0,M4 = 0,N1 = 0,iiM1 = 0,iiM3 = 0,jjM1 = 0,ppM1 = 0,ppM3 = 0;
+  Standard_Integer MinN = 0,MinN1 = 0,MinM = 0,MinM1 = 0;
+  Standard_Integer index_u = 0,index_u1 = 0,index_v = 0,index_v1 = 0,index_w = 0;
 
   M1 = M + 1;
   N1 = N + 1;
@@ -137,7 +139,7 @@ void  BSplSLib::RationalDerivative(const Standard_Integer UDeg,
   Standard_Real *RArray = (All ? &RDerivatives : (Standard_Real*)StoreDerivatives);
   NCollection_LocalArray<Standard_Real> StoreW (ii);  
   Standard_Real *HomogeneousArray = &HDerivatives; 
-  Standard_Real denominator,Pii,Pip,Pjq;
+  Standard_Real denominator = NAN,Pii = NAN,Pip = NAN,Pjq = NAN;
   
   denominator = 1.0e0 / HomogeneousArray[3];
   index_u  = 0;
@@ -322,8 +324,8 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
       vindex  = BSplCLib::PoleIndex(VDegree,vindex,VPer,*VMults);
 
     // get the poles
-    Standard_Integer i,j,ip,jp;
-    Standard_Real w, *pole = dc.poles;
+    Standard_Integer i = 0,j = 0,ip = 0,jp = 0;
+    Standard_Real w = NAN, *pole = dc.poles;
     d1 = UDegree;
     d2 = VDegree;
     Standard_Integer PLowerRow = Poles.LowerRow();
@@ -343,7 +345,7 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
       
       w  = Weights->Value(ip,jp);
       Standard_Real eps = Epsilon(w);
-      Standard_Real dw;
+      Standard_Real dw = NAN;
 
       for (i = 0; i <= UDegree && !rational; i++)
         {
@@ -473,8 +475,8 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
       vindex  = BSplCLib::PoleIndex(VDegree,vindex,VPer,*VMults);
 
     // get the poles
-    Standard_Integer i,j,ip,jp;
-    Standard_Real w, *pole = dc.poles;
+    Standard_Integer i = 0,j = 0,ip = 0,jp = 0;
+    Standard_Real w = NAN, *pole = dc.poles;
     d1 = VDegree;
     d2 = UDegree;
     Standard_Integer PLowerRow = Poles.LowerRow();
@@ -497,7 +499,7 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
 
       w  = Weights->Value(ip,jp);
       Standard_Real eps = Epsilon(w);
-      Standard_Real dw;
+      Standard_Real dw = NAN;
 
       for (i = 0; i <= UDegree && !rational; i++)
         {
@@ -625,7 +627,7 @@ void  BSplSLib::D0
  gp_Pnt& P)
 {
 //  Standard_Integer k ;
-  Standard_Real W ;
+  Standard_Real W = NAN ;
   HomogeneousD0(U,
                V, 
                 UIndex, 
@@ -674,11 +676,11 @@ void  BSplSLib::HomogeneousD0
  Standard_Real & W,
  gp_Pnt& P)
 {
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
 //  Standard_Integer k,dim;
-  Standard_Integer dim;
-  Standard_Real u1,u2;
-  Standard_Integer d1,d2;
+  Standard_Integer dim = 0;
+  Standard_Real u1 = NAN,u2 = NAN;
+  Standard_Integer d1 = 0,d2 = 0;
   W = 1.0e0 ;
   
   BSplSLib_DataContainer dc (UDegree, VDegree);
@@ -730,12 +732,12 @@ void  BSplSLib::D1
  gp_Vec& Vu,
  gp_Vec& Vv)
 {
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
 //  Standard_Integer k,dim,dim2;
-  Standard_Integer dim,dim2;
-  Standard_Real u1,u2;
-  Standard_Integer d1,d2;
-  Standard_Real *result, *resVu, *resVv;
+  Standard_Integer dim = 0,dim2 = 0;
+  Standard_Real u1 = NAN,u2 = NAN;
+  Standard_Integer d1 = 0,d2 = 0;
+  Standard_Real *result = nullptr, *resVu = nullptr, *resVv = nullptr;
   BSplSLib_DataContainer dc (UDegree, VDegree);
   if (PrepareEval
     (U,V,UIndex,VIndex,UDegree,VDegree,URat,VRat,UPer,VPer,
@@ -831,11 +833,11 @@ void  BSplSLib::HomogeneousD1
  Standard_Real& Du,
  Standard_Real& Dv)
 {
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
 //  Standard_Integer k,dim;
-  Standard_Integer dim;
-  Standard_Real u1,u2;
-  Standard_Integer d1,d2;
+  Standard_Integer dim = 0;
+  Standard_Real u1 = NAN,u2 = NAN;
+  Standard_Integer d1 = 0,d2 = 0;
   
   D = 1.0e0 ;
   Du = 0.0e0 ;
@@ -851,7 +853,7 @@ void  BSplSLib::HomogeneousD1
   BSplCLib::Bohm(u2,d2,1,*dc.knots2,dim,*dc.poles);
   BSplCLib::Eval(u2,d2,*dc.knots2,dim,*(dc.poles+dim*(d2+1)));
   
-  Standard_Real *result, *resVu, *resVv;
+  Standard_Real *result = nullptr, *resVu = nullptr, *resVv = nullptr;
   result = dc.poles;
   resVu  = result + (ufirst ? dim*(d2+1) : dim);
   resVv  = result + (ufirst ? dim : dim*(d2+1));
@@ -904,12 +906,12 @@ void  BSplSLib::D2
  gp_Vec& Vvv,
  gp_Vec& Vuv)
 {
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
 //  Standard_Integer k,dim,dim2;
-  Standard_Integer dim,dim2;
-  Standard_Real u1,u2;
-  Standard_Integer d1,d2;
-  Standard_Real *result, *resVu, *resVv, *resVuu, *resVvv, *resVuv;
+  Standard_Integer dim = 0,dim2 = 0;
+  Standard_Real u1 = NAN,u2 = NAN;
+  Standard_Integer d1 = 0,d2 = 0;
+  Standard_Real *result = nullptr, *resVu = nullptr, *resVv = nullptr, *resVuu = nullptr, *resVvv = nullptr, *resVuv = nullptr;
   BSplSLib_DataContainer dc (UDegree, VDegree);
   if (PrepareEval
       (U,V,UIndex,VIndex,UDegree,VDegree,URat,VRat,UPer,VPer,
@@ -1042,13 +1044,13 @@ void  BSplSLib::D3
  gp_Vec& Vuuv,
  gp_Vec& Vuvv)
 {
-  Standard_Boolean rational;
+  Standard_Boolean rational = 0;
 //  Standard_Integer k,dim,dim2;
-  Standard_Integer dim,dim2;
-  Standard_Real u1,u2;
-  Standard_Integer d1,d2;
-  Standard_Real *result, *resVu, *resVv, *resVuu, *resVvv, *resVuv,
-  *resVuuu, *resVvvv, *resVuuv, *resVuvv;
+  Standard_Integer dim = 0,dim2 = 0;
+  Standard_Real u1 = NAN,u2 = NAN;
+  Standard_Integer d1 = 0,d2 = 0;
+  Standard_Real *result = nullptr, *resVu = nullptr, *resVv = nullptr, *resVuu = nullptr, *resVvv = nullptr, *resVuv = nullptr,
+  *resVuuu = nullptr, *resVvvv = nullptr, *resVuuv = nullptr, *resVuvv = nullptr;
   BSplSLib_DataContainer dc (UDegree, VDegree);
   if (PrepareEval
     (U,V,UIndex,VIndex,UDegree,VDegree,URat,VRat,UPer,VPer,
@@ -1234,10 +1236,10 @@ void  BSplSLib::DN
  const Standard_Boolean VPer,
  gp_Vec& Vn)
 {
-  Standard_Boolean rational;
-  Standard_Integer k,dim;
-  Standard_Real u1,u2;
-  Standard_Integer d1,d2;
+  Standard_Boolean rational = 0;
+  Standard_Integer k = 0,dim = 0;
+  Standard_Real u1 = NAN,u2 = NAN;
+  Standard_Integer d1 = 0,d2 = 0;
   
   BSplSLib_DataContainer dc (UDegree, VDegree);
   Standard_Boolean ufirst = PrepareEval
@@ -1263,7 +1265,7 @@ void  BSplSLib::DN
   for (k = 0; k <= Min(n1,d1); k++) 
     BSplCLib::Bohm(u2,d2,n2,*dc.knots2,dim,*(dc.poles+k*dim*(d2+1)));
   
-  Standard_Real *result;
+  Standard_Real *result = nullptr;
   if (rational) {
     BSplSLib::RationalDerivative(d1,d2,n1,n2,*dc.poles,*dc.ders,Standard_False);
     result = dc.ders; // because Standard_False ci-dessus.
@@ -1321,7 +1323,7 @@ void  BSplSLib::Iso(const Standard_Real            Param,
   // copy the local poles
   
 //  Standard_Integer f1,l1,f2,l2,i,j,k;
-  Standard_Integer f1,l1,f2,l2,i,j;
+  Standard_Integer f1 = 0,l1 = 0,f2 = 0,l2 = 0,i = 0,j = 0;
   
   if (IsU) {
     f1 = Poles.LowerRow();
@@ -1338,7 +1340,7 @@ void  BSplSLib::Iso(const Standard_Real            Param,
   
   NCollection_LocalArray<Standard_Real> locpoles ((Degree+1) * (l2-f2+1) * dim);
   
-  Standard_Real w, *pole = locpoles;
+  Standard_Real w = NAN, *pole = locpoles;
   index += f1;
 
   for (i = 0; i <= Degree; i++) {
@@ -1402,7 +1404,7 @@ void  BSplSLib::Reverse(      TColgp_Array2OfPnt& Poles,
                        const Standard_Integer    Last, 
                        const Standard_Boolean    UDirection)
 {
-  Standard_Integer i,j, l = Last;
+  Standard_Integer i = 0,j = 0, l = Last;
   if ( UDirection) {
     l = Poles.LowerRow() + 
       (l - Poles.LowerRow())%(Poles.ColLength());
@@ -1468,7 +1470,7 @@ void  BSplSLib::Reverse(      TColStd_Array2OfReal& Weights,
                        const Standard_Integer      Last, 
                        const Standard_Boolean      UDirection)
 {
-  Standard_Integer i,j, l = Last;
+  Standard_Integer i = 0,j = 0, l = Last;
   if ( UDirection) {
     l = Weights.LowerRow() + 
       (l - Weights.LowerRow())%(Weights.ColLength());
@@ -1539,7 +1541,7 @@ Standard_Boolean BSplSLib::IsRational
  const Standard_Real         Epsi)
 {
   Standard_Real eps = (Epsi > 0.0) ? Epsi : Epsilon(Weights(I1,I2));
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   Standard_Integer fi = Weights.LowerRow(), li = Weights.ColLength();
   Standard_Integer fj = Weights.LowerCol(), lj = Weights.RowLength();
 
@@ -1562,7 +1564,7 @@ void  BSplSLib::SetPoles(const TColgp_Array2OfPnt&   Poles,
                         TColStd_Array1OfReal& FP,
                         const Standard_Boolean      UDirection)
 {
-  Standard_Integer i, j, l = FP.Lower();
+  Standard_Integer i = 0, j = 0, l = FP.Lower();
   Standard_Integer PLowerRow = Poles.LowerRow();
   Standard_Integer PUpperRow = Poles.UpperRow();
   Standard_Integer PLowerCol = Poles.LowerCol();
@@ -1603,7 +1605,7 @@ void  BSplSLib::SetPoles(const TColgp_Array2OfPnt&   Poles,
                         TColStd_Array1OfReal& FP,
                         const Standard_Boolean      UDirection)
 {
-  Standard_Integer i, j, l = FP.Lower();
+  Standard_Integer i = 0, j = 0, l = FP.Lower();
   Standard_Integer PLowerRow = Poles.LowerRow();
   Standard_Integer PUpperRow = Poles.UpperRow();
   Standard_Integer PLowerCol = Poles.LowerCol();
@@ -1647,7 +1649,7 @@ void  BSplSLib::GetPoles(const TColStd_Array1OfReal& FP,
                         TColgp_Array2OfPnt&   Poles,
                         const Standard_Boolean      UDirection)
 {
-  Standard_Integer i, j, l = FP.Lower();
+  Standard_Integer i = 0, j = 0, l = FP.Lower();
   Standard_Integer PLowerRow = Poles.LowerRow();
   Standard_Integer PUpperRow = Poles.UpperRow();
   Standard_Integer PLowerCol = Poles.LowerCol();
@@ -1688,7 +1690,7 @@ void  BSplSLib::GetPoles(const TColStd_Array1OfReal& FP,
                         TColStd_Array2OfReal& Weights,
                         const Standard_Boolean      UDirection)
 {
-  Standard_Integer i, j, l = FP.Lower();
+  Standard_Integer i = 0, j = 0, l = FP.Lower();
   Standard_Integer PLowerRow = Poles.LowerRow();
   Standard_Integer PUpperRow = Poles.UpperRow();
   Standard_Integer PLowerCol = Poles.LowerCol();
@@ -1931,9 +1933,9 @@ void BSplSLib::BuildCache
  TColgp_Array2OfPnt&            CachePoles,
  TColStd_Array2OfReal*          CacheWeights)
 {  
-  Standard_Boolean rational,rational_u,rational_v,flag_u_or_v;                  
-  Standard_Integer kk,d1,d1p1,d2,d2p1,ii,jj,iii,jjj,Index;
-  Standard_Real u1,min_degree_domain,max_degree_domain,f,factor[2],u2;
+  Standard_Boolean rational = 0,rational_u = 0,rational_v = 0,flag_u_or_v = 0;                  
+  Standard_Integer kk = 0,d1 = 0,d1p1 = 0,d2 = 0,d2p1 = 0,ii = 0,jj = 0,iii = 0,jjj = 0,Index = 0;
+  Standard_Real u1 = NAN,min_degree_domain = NAN,max_degree_domain = NAN,f = NAN,factor[2],u2 = NAN;
   if (Weights != NULL) 
     rational_u = rational_v = Standard_True;
   else
@@ -2064,11 +2066,11 @@ void BSplSLib::BuildCache(const Standard_Real          theU,
                           const TColStd_Array2OfReal*  theWeights,
                                 TColStd_Array2OfReal&  theCacheArray)
 {
-  Standard_Boolean flag_u_or_v;
-  Standard_Integer d1, d2;
-  Standard_Real    u1, u2;
+  Standard_Boolean flag_u_or_v = 0;
+  Standard_Integer d1 = 0, d2 = 0;
+  Standard_Real    u1 = NAN, u2 = NAN;
   Standard_Boolean isRationalOnParam = (theWeights != NULL);
-  Standard_Boolean isRational;
+  Standard_Boolean isRational = 0;
 
   BSplSLib_DataContainer dc(theUDegree, theVDegree);
   flag_u_or_v =
@@ -2110,8 +2112,8 @@ void BSplSLib::BuildCache(const Standard_Real          theU,
   // aFactors[0] corresponds to variable with minimal degree
   // aFactors[1] corresponds to variable with maximal degree
   aFactors[1] = 1.0;
-  Standard_Integer aRow, aCol, i;
-  Standard_Real aCoeff;
+  Standard_Integer aRow = 0, aCol = 0, i = 0;
+  Standard_Real aCoeff = NAN;
   for (aRow = 0; aRow <= d2; aRow++)
   {
     aFactors[0] = 1.0;
@@ -2168,13 +2170,13 @@ void  BSplSLib::CacheD0(const Standard_Real                  UParameter,
   // 0 and 1 
   Standard_Integer 
 //    ii,
-  dimension,
-  min_degree,
-  max_degree  ;
+  dimension = 0,
+  min_degree = 0,
+  max_degree = 0  ;
   
   Standard_Real 
     new_parameter[2] ,
-  inverse ;
+  inverse = NAN ;
   
   Standard_Real * 
     PArray = (Standard_Real *) 
@@ -2266,13 +2268,13 @@ void  BSplSLib::CacheD1(const Standard_Real                  UParameter,
 //    ii,
 //  jj,
 //  kk,
-  dimension,
-  min_degree,
-  max_degree  ;
+  dimension = 0,
+  min_degree = 0,
+  max_degree = 0  ;
   
   Standard_Real
-    inverse_min,
-  inverse_max, 
+    inverse_min = NAN,
+  inverse_max = NAN
   new_parameter[2]  ;
   
   Standard_Real * 
@@ -2281,9 +2283,9 @@ void  BSplSLib::CacheD1(const Standard_Real                  UParameter,
   Standard_Real local_poles_array[2][2][3],
   local_poles_and_weights_array[2][2][4],
   local_weights_array[2][2]  ;
-  Standard_Real * my_vec_min,
-  * my_vec_max,
-  * my_point ;
+  Standard_Real * my_vec_min = nullptr,
+  * my_vec_max = nullptr,
+  * my_point = nullptr ;
   my_point = (Standard_Real *) &aPoint  ;
   //
   // initialize in case of rational evaluation
@@ -2472,17 +2474,17 @@ void  BSplSLib::CacheD2(const Standard_Real                  UParameter,
   // the SpanLenght     is the normalizing factor so that the polynomial is between
   // 0 and 1 
   Standard_Integer 
-    ii,
+    ii = 0,
 //  jj,
-  kk,
-  index,
-  dimension,
-  min_degree,
-  max_degree  ;
+  kk = 0,
+  index = 0,
+  dimension = 0,
+  min_degree = 0,
+  max_degree = 0  ;
   
   Standard_Real
-    inverse_min,
-  inverse_max, 
+    inverse_min = NAN,
+  inverse_max = NAN
   new_parameter[2]  ;
 
   Standard_Real * 
@@ -2491,12 +2493,12 @@ void  BSplSLib::CacheD2(const Standard_Real                  UParameter,
   Standard_Real local_poles_array[3][3][3],
   local_poles_and_weights_array[3][3][4],
   local_weights_array[3][3]  ;
-  Standard_Real * my_vec_min,
-  * my_vec_max,
-  * my_vec_min_min,
-  * my_vec_max_max,
-  * my_vec_min_max,
-  * my_point ;
+  Standard_Real * my_vec_min = nullptr,
+  * my_vec_max = nullptr,
+  * my_vec_min_min = nullptr,
+  * my_vec_max_max = nullptr,
+  * my_vec_min_max = nullptr,
+  * my_point = nullptr ;
   my_point = (Standard_Real *) &aPoint  ;
   
   //
@@ -2802,7 +2804,7 @@ void BSplSLib::MovePoint (const Standard_Real            U,
                          TColgp_Array2OfPnt&            NewPoles)
 {
   // calculate the UBSplineBasis in the parameter U
-  Standard_Integer UFirstNonZeroBsplineIndex;
+  Standard_Integer UFirstNonZeroBsplineIndex = 0;
   math_Matrix UBSplineBasis(1, 1,
                            1, UDegree+1);
   Standard_Integer ErrorCod1 =  BSplCLib::EvalBsplineBasis(0,
@@ -2812,7 +2814,7 @@ void BSplSLib::MovePoint (const Standard_Real            U,
                                                           UFirstNonZeroBsplineIndex,
                                                           UBSplineBasis);  
   // calculate the VBSplineBasis in the parameter V
-  Standard_Integer VFirstNonZeroBsplineIndex;
+  Standard_Integer VFirstNonZeroBsplineIndex = 0;
   math_Matrix VBSplineBasis(1, 1,
                            1, VDegree+1);
   Standard_Integer ErrorCod2 =  BSplCLib::EvalBsplineBasis(0,
@@ -2836,7 +2838,7 @@ void BSplSLib::MovePoint (const Standard_Real            U,
   if (ULastIndex > UIndex2) ULastIndex = UIndex2;
 
   Standard_Real maxValue = 0.0;
-  Standard_Integer i, ukk1=0, ukk2;
+  Standard_Integer i = 0, ukk1=0, ukk2 = 0;
 
   for (i = UFirstIndex-UFirstNonZeroBsplineIndex+1; i <= ULastIndex-UFirstNonZeroBsplineIndex+1; i++) {
     if (UBSplineBasis(1,i) > maxValue) {
@@ -2862,7 +2864,7 @@ void BSplSLib::MovePoint (const Standard_Real            U,
   if (VLastIndex > VIndex2) VLastIndex = VIndex2;
 
   maxValue = 0.0;
-  Standard_Integer j, vkk1=0, vkk2;
+  Standard_Integer j = 0, vkk1=0, vkk2 = 0;
 
   for (j = VFirstIndex-VFirstNonZeroBsplineIndex+1; j <= VLastIndex-VFirstNonZeroBsplineIndex+1; j++) {
     if (VBSplineBasis(1,j) > maxValue) {
@@ -2883,9 +2885,9 @@ void BSplSLib::MovePoint (const Standard_Real            U,
   // compute the vector of displacement
   Standard_Real D1 = 0.0;
   Standard_Real D2 = 0.0;
-  Standard_Real hN, Coef, DvalU, DvalV;
+  Standard_Real hN = NAN, Coef = NAN, DvalU = NAN, DvalV = NAN;
 
-  Standard_Integer ii, jj;
+  Standard_Integer ii = 0, jj = 0;
 
   for (i = 1; i <= UDegree+1; i++) {
     ii = i + UFirstNonZeroBsplineIndex - 1;
@@ -3020,17 +3022,17 @@ void BSplSLib::Resolution(const TColgp_Array2OfPnt&      Poles,
                          Standard_Real&                 UTolerance,
                          Standard_Real&                 VTolerance)
 {
-  Standard_Real Wij,Wmj,Wji,Wjm;
-  Standard_Real Xij,Xmj,Xji,Xjm,Xpq,Xqp;
-  Standard_Real Yij,Ymj,Yji,Yjm,Ypq,Yqp;
-  Standard_Real Zij,Zmj,Zji,Zjm,Zpq,Zqp;
-  Standard_Real factor,value,min,min_weights=0,inverse,max_derivative[2];
+  Standard_Real Wij = NAN,Wmj = NAN,Wji = NAN,Wjm = NAN;
+  Standard_Real Xij = NAN,Xmj = NAN,Xji = NAN,Xjm = NAN,Xpq = NAN,Xqp = NAN;
+  Standard_Real Yij = NAN,Ymj = NAN,Yji = NAN,Yjm = NAN,Ypq = NAN,Yqp = NAN;
+  Standard_Real Zij = NAN,Zmj = NAN,Zji = NAN,Zjm = NAN,Zpq = NAN,Zqp = NAN;
+  Standard_Real factor = NAN,value = NAN,min = NAN,min_weights=0,inverse = NAN,max_derivative[2];
 
   max_derivative[0] = max_derivative[1] = 0.0e0 ; 
   
-  Standard_Integer PRowLength, PColLength;
-  Standard_Integer ii,jj,pp,qq,ii_index,jj_index,pp_index,qq_index;
-  Standard_Integer ii_minus,upper[2],lower[2],poles_length[2];
+  Standard_Integer PRowLength = 0, PColLength = 0;
+  Standard_Integer ii = 0,jj = 0,pp = 0,qq = 0,ii_index = 0,jj_index = 0,pp_index = 0,qq_index = 0;
+  Standard_Integer ii_minus = 0,upper[2],lower[2],poles_length[2];
   Standard_Integer num_poles[2],num_flat_knots[2];
   
   num_flat_knots[0] = 
@@ -3279,10 +3281,10 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree,
                           TColStd_Array2OfReal& Weights, 
                           Standard_Integer& InversionProblem)
 {
-  Standard_Integer ii, jj, ll, kk, dimension;
+  Standard_Integer ii = 0, jj = 0, ll = 0, kk = 0, dimension = 0;
   Standard_Integer ULength = UParameters.Length();
   Standard_Integer VLength = VParameters.Length();
-  Standard_Real * poles_array;
+  Standard_Real * poles_array = nullptr;
   
   // extraction of iso u
   dimension = 4*ULength;
@@ -3368,10 +3370,10 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree,
                           TColgp_Array2OfPnt& Poles,
                           Standard_Integer& InversionProblem)
 {
-  Standard_Integer ii, jj, ll, kk, dimension;
+  Standard_Integer ii = 0, jj = 0, ll = 0, kk = 0, dimension = 0;
   Standard_Integer ULength = UParameters.Length();
   Standard_Integer VLength = VParameters.Length();
-  Standard_Real * poles_array;
+  Standard_Real * poles_array = nullptr;
   
   // extraction of iso u
   dimension = 3*ULength;
@@ -3463,12 +3465,12 @@ void BSplSLib::FunctionMultiply
  TColStd_Array2OfReal&                       NewDenominator,
  Standard_Integer&                           theStatus)
 {
-  Standard_Integer num_uparameters,
+  Standard_Integer num_uparameters = 0,
 //  ii,jj,kk,
-  ii,jj,
-  error_code,
-  num_vparameters ;
-  Standard_Real    result ;
+  ii = 0,jj = 0,
+  error_code = 0,
+  num_vparameters = 0 ;
+  Standard_Real    result = NAN ;
   
   num_uparameters = UFlatKnots.Length() - UNewDegree - 1 ;
   num_vparameters = VFlatKnots.Length() - VNewDegree - 1 ;
index 5e6abc0ff8e630e8f678aac4041ea2ac21b8e89d..44ecf07699780b51ccce80d53cb7b1b9adf037ad 100644 (file)
@@ -34,7 +34,7 @@ void BSplSLib::PolesCoefficients (const TColgp_Array2OfPnt& Poles,
                                  TColgp_Array2OfPnt& CachePoles, 
                                  TColStd_Array2OfReal* CacheWeights)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer uclas = Poles.ColLength(); 
   Standard_Integer vclas = Poles.RowLength(); 
   TColStd_Array1OfReal biduflatknots(1,uclas << 1);
@@ -61,7 +61,7 @@ void BSplSLib::PolesCoefficients (const TColgp_Array2OfPnt& Poles,
     // BuilCache exige que les resultats soient formates en [MaxCoeff,MinCoeff]
     TColgp_Array2OfPnt   CPoles  (1,vclas, 1, uclas);
     TColStd_Array2OfReal CWeights(1,vclas, 1, uclas);
-    Standard_Integer ii, jj;
+    Standard_Integer ii = 0, jj = 0;
     BSplSLib::BuildCache(0.,0.,
                         1.,1.,0,0,
                         uclas - 1,vclas - 1,0,0,
index 86b48569d43894e475cfbf5cb68a0dc66641d902..dc236dd96af7c6ace773ae4d51a444c0e32241f3 100644 (file)
@@ -21,7 +21,7 @@
 // =======================================================================
 Standard_Integer BVH_BuildQueue::Size()
 {
-  Standard_Integer aSize;
+  Standard_Integer aSize = 0;
 
   myMutex.Lock();
   {
index 8979369fa7821a7f33fafdbb92a5f14a5e4180a6..325dde570b35782ea1b985b534c3ebd5b65adb20 100644 (file)
@@ -196,7 +196,7 @@ static BinTools_OStream& operator <<(BinTools_OStream& OS, const Handle(Geom2d_B
   Standard_Boolean aRational = B->IsRational() ? 1:0;
   OS << aRational; // rational
   // poles and weights
-  Standard_Integer i,aDegree = B->Degree(); 
+  Standard_Integer i = 0,aDegree = B->Degree(); 
   OS << (Standard_ExtCharacter)aDegree; // Degree
   for (i = 1; i <= aDegree+1; i++) {
     OS << B->Pole(i); // Pnt2d
@@ -219,7 +219,7 @@ static BinTools_OStream& operator <<(BinTools_OStream& OS, const Handle(Geom2d_B
   Standard_Boolean aPeriodic = B->IsPeriodic() ? 1:0;
   OS << aPeriodic; //periodic
   // poles and weights
-  Standard_Integer i,aDegree,aNbPoles,aNbKnots;
+  Standard_Integer i = 0,aDegree = 0,aNbPoles = 0,aNbKnots = 0;
   aDegree = B->Degree();
   aNbPoles = B->NbPoles();
   aNbKnots = B->NbKnots();
@@ -325,7 +325,7 @@ void BinTools_Curve2dSet::WriteCurve2d(
 void  BinTools_Curve2dSet::Write (Standard_OStream& OS,
                                   const Message_ProgressRange& theRange) const
 {
-  Standard_Integer i, aNbCurves = myMap.Extent();
+  Standard_Integer i = 0, aNbCurves = myMap.Extent();
   Message_ProgressScope aPS(theRange, "Writing 2D curves",aNbCurves);
   OS << "Curve2ds "<< aNbCurves << "\n";
   BinTools_OStream aStream (OS);
@@ -689,7 +689,7 @@ void  BinTools_Curve2dSet::Read (Standard_IStream& IS,
   }
 
   Handle(Geom2d_Curve) C;
-  Standard_Integer i, aNbCurves;
+  Standard_Integer i = 0, aNbCurves = 0;
   IS >> aNbCurves;
   Message_ProgressScope aPS(theRange, "Reading curves 2d", aNbCurves);
   IS.get();//remove <lf>               
index 1966f12e5ce951663d49e68054895fe8a0374b93..e6fd7e182948c0deddf16e506c3e279a55702c32 100644 (file)
@@ -205,7 +205,7 @@ static BinTools_OStream& operator <<(BinTools_OStream& OS, const Handle(Geom_Bez
   Standard_Boolean aRational = B->IsRational() ? 1:0;
   OS << aRational; // rational
   // poles and weights
-  Standard_Integer i, aDegree = B->Degree(); 
+  Standard_Integer i = 0, aDegree = B->Degree(); 
   OS << (Standard_ExtCharacter)aDegree; //<< Degree
   for (i = 1; i <= aDegree+1; i++) {
     OS << B->Pole(i); // Pnt
@@ -228,7 +228,7 @@ static BinTools_OStream& operator <<(BinTools_OStream& OS, const Handle(Geom_BSp
   Standard_Boolean aPeriodic = B->IsPeriodic() ? 1:0;
   OS << aPeriodic; // periodic
   // poles and weights
-  Standard_Integer i,aDegree,aNbPoles,aNbKnots;
+  Standard_Integer i = 0,aDegree = 0,aNbPoles = 0,aNbKnots = 0;
   aDegree = B->Degree();
   aNbPoles = B->NbPoles();
   aNbKnots = B->NbKnots();
@@ -334,7 +334,7 @@ void BinTools_CurveSet::WriteCurve(const Handle(Geom_Curve)& C,
 void  BinTools_CurveSet::Write (Standard_OStream& OS,
                                 const Message_ProgressRange& theRange)const
 {
-  Standard_Integer i, nbcurv = myMap.Extent();
+  Standard_Integer i = 0, nbcurv = myMap.Extent();
   Message_ProgressScope aPS (theRange, "Writing curves", nbcurv);
   OS << "Curves "<< nbcurv << "\n";
   BinTools_OStream aStream (OS);
@@ -703,7 +703,7 @@ void  BinTools_CurveSet::Read (Standard_IStream& IS,
   }
 
   Handle(Geom_Curve) C;
-  Standard_Integer i, nbcurve;
+  Standard_Integer i = 0, nbcurve = 0;
   IS >> nbcurve;
 
   Message_ProgressScope aPS(theRange, "Reading curves", nbcurve);
index 5d5175c7a70245efe3fa34ec10d550e550e23b7a..12f0c21e3f69ca122e248eaaa8f01a31f21acb93 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BinTools_IStream.hxx>
 #include <Storage_StreamTypeMismatchError.hxx>
 
@@ -175,7 +177,7 @@ BinTools_IStream& BinTools_IStream::operator >> (Standard_Integer& theValue)
 //=======================================================================
 BinTools_IStream& BinTools_IStream::operator >> (gp_Pnt& theValue)
 {
-  Standard_Real aValue;
+  Standard_Real aValue = NAN;
   for (int aCoord = 1; aCoord <= 3; aCoord++)
   {
     if (!myStream->read ((char*)&aValue, sizeof (Standard_Real)))
index e1f5aa286b3083bc99885648b4abc5ffbbd2ec05..a5e4547678eac39274399adaf4d0f141e7fb8fee 100644 (file)
@@ -160,7 +160,7 @@ Standard_Integer  BinTools_LocationSet::NbLocations() const
 void  BinTools_LocationSet::Write(Standard_OStream& OS) const 
 {
   
-  Standard_Integer i, nbLoc = myMap.Extent();
+  Standard_Integer i = 0, nbLoc = myMap.Extent();
   OS << "Locations "<< nbLoc << "\n";
   try {
     OCC_CATCH_SIGNALS
@@ -210,7 +210,7 @@ void  BinTools_LocationSet::Read(Standard_IStream& IS)
 
   myMap.Clear();
   char buffer[255];
-  Standard_Integer l1,p;
+  Standard_Integer l1 = 0,p = 0;
 
   IS >> buffer;
   if (IS.fail() || (strcmp(buffer,"Locations"))) {
@@ -220,7 +220,7 @@ void  BinTools_LocationSet::Read(Standard_IStream& IS)
     return;
   }
 
-  Standard_Integer i, nbLoc;
+  Standard_Integer i = 0, nbLoc = 0;
   IS >> nbLoc;
   IS.get();// remove lf
   TopLoc_Location L;
index 5b2ce395a41218c2c989db5748ff1ce8bdd1bc8b..9309abd2f44f843a5b044276ad8f84ae9359424b 100644 (file)
@@ -79,9 +79,9 @@ public:
 private:
   Standard_OStream* myStream; ///< pointer to the stream
   uint64_t myPosition; ///< the current position relatively to the OStream position at the moment of creation of this class instance
-  Standard_Real myRealBuf[12]; ///< buffer for 12 reals storage
-  Standard_Integer myIntBuf[3]; ///< buffer for 3 integers storage
-  float myFloatBuf[3]; ///< buffer for 3 floats storage
+  Standard_Real myRealBuf[12]{}; ///< buffer for 12 reals storage
+  Standard_Integer myIntBuf[3]{}; ///< buffer for 3 integers storage
+  float myFloatBuf[3]{}; ///< buffer for 3 floats storage
 };
 
 #endif // _BinTools_OStream_HeaderFile
index 336590f90ec5dbbf83949c99956deb4cb59a74cc..60abacd98cbcb6597f6ee2f17eac81220ec09f79 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BinTools_ShapeReader.hxx>
 #include <TopoDS.hxx>
 #include <BRep_PointOnCurve.hxx>
@@ -97,7 +99,7 @@ TopoDS_Shape BinTools_ShapeReader::ReadShape (BinTools_IStream& theStream)
   TopAbs_ShapeEnum aShapeType = theStream.ShapeType();
   TopAbs_Orientation aShapeOrientation = theStream.ShapeOrientation();
   const TopLoc_Location* aShapeLocation = ReadLocation (theStream);
-  Standard_Real aTol;
+  Standard_Real aTol = NAN;
   static BRep_Builder aBuilder;
   try {
     OCC_CATCH_SIGNALS
@@ -164,12 +166,12 @@ TopoDS_Shape BinTools_ShapeReader::ReadShape (BinTools_IStream& theStream)
         aBuilder.MakeEdge(aE);
         // Read the curve geometry 
         theStream >> aTol;
-        Standard_Boolean aSameParameter, aSameRange, aDegenerated;
+        Standard_Boolean aSameParameter = 0, aSameRange = 0, aDegenerated = 0;
         theStream.ReadBools (aSameParameter, aSameRange, aDegenerated);
         aBuilder.SameParameter (aE, aSameParameter);
         aBuilder.SameRange (aE, aSameRange);
         aBuilder.Degenerated (aE, aDegenerated);
-        Standard_Real aFirst, aLast;
+        Standard_Real aFirst = NAN, aLast = NAN;
         while (theStream) {
           Standard_Byte aPrsType = theStream.ReadByte(); //{0|1|2|3|4|5|6|7}
           if (aPrsType == 0)
@@ -308,7 +310,7 @@ TopoDS_Shape BinTools_ShapeReader::ReadShape (BinTools_IStream& theStream)
     throw Standard_Failure (aMsg.str().c_str());
   }
   // read flags and subs
-  Standard_Boolean aFree, aMod, aChecked, anOrient, aClosed, anInf, aConv;
+  Standard_Boolean aFree = 0, aMod = 0, aChecked = 0, anOrient = 0, aClosed = 0, anInf = 0, aConv = 0;
   theStream.ReadBools (aFree, aMod, aChecked, anOrient, aClosed, anInf, aConv);
   // sub-shapes
   for(TopoDS_Shape aSub = ReadShape (theStream); !aSub.IsNull(); aSub = ReadShape (theStream))
index 0460882c7ec41563777064c05c24ebdbbe444a67..3433346cbcb818f9d75454708bfb784fde8d73ee 100644 (file)
@@ -46,6 +46,7 @@
 #include <TopoDS_Vertex.hxx>
 #include <Message_ProgressRange.hxx>
 
+#include <math.h>
 #include <string.h>
 
 //=======================================================================
@@ -317,7 +318,7 @@ void  BinTools_ShapeSet::Write (Standard_OStream& OS,
   // write the shapes
   //-----------------------------------------
 
-  Standard_Integer i, nbShapes = myShapes.Extent();
+  Standard_Integer i = 0, nbShapes = myShapes.Extent();
   Message_ProgressScope aPSinner(aPS.Next(), "Writing shapes", nbShapes);
   OS << "\nTShapes " << nbShapes << "\n";
   
@@ -460,7 +461,7 @@ void BinTools_ShapeSet::ReadFlagsAndSubs(TopoDS_Shape& S, const TopAbs_ShapeEnum
   Standard_IStream& IS, const Standard_Integer nbShapes)
 {
   // Set the flags
-  Standard_Boolean aFree, aMod, aChecked, anOrient, aClosed, anInf, aConv;
+  Standard_Boolean aFree = 0, aMod = 0, aChecked = 0, anOrient = 0, aClosed = 0, anInf = 0, aConv = 0;
   BinTools::GetBool(IS, aFree);
   BinTools::GetBool(IS, aMod);
   BinTools::GetBool(IS, aChecked);
@@ -512,12 +513,12 @@ void BinTools_ShapeSet::ReadSubs(TopoDS_Shape& S, Standard_IStream& IS,
   else {
     TopAbs_Orientation anOrient;
     anOrient = (TopAbs_Orientation)aChar;
-    Standard_Integer anIndx;
+    Standard_Integer anIndx = 0;
     BinTools::GetInteger(IS, anIndx);
     S = Shape (nbshapes - anIndx + 1);
     S.Orientation(anOrient);
 
-    Standard_Integer l;
+    Standard_Integer l = 0;
     BinTools::GetInteger(IS, l);
     S.Location(myLocations.Location(l), Standard_False);
   }
@@ -633,7 +634,7 @@ void BinTools_ShapeSet::WriteShape (const TopoDS_Shape& S,
       aVal = (TE->Degenerated())  ? Standard_True : Standard_False;
       BinTools::PutBool(OS, aVal);
       
-      Standard_Real first, last;
+      Standard_Real first = NAN, last = NAN;
       BRep_ListIteratorOfListOfCurveRepresentation itrc = TE->Curves();
       while (itrc.More()) {
        const Handle(BRep_CurveRepresentation)& CR = itrc.Value();
@@ -778,11 +779,11 @@ void  BinTools_ShapeSet::ReadShape (const TopAbs_ShapeEnum T,
 {
   // Read the geometry
 
-  Standard_Integer val, c, pc, pc2 = 0, s, s2, l, l2, t, pt, pt2 = 0;
-  Standard_Real tol, X, Y, Z, first, last, p1 = 0., p2;
-  Standard_Real PfX, PfY, PlX, PlY;
+  Standard_Integer val = 0, c = 0, pc = 0, pc2 = 0, s = 0, s2 = 0, l = 0, l2 = 0, t = 0, pt = 0, pt2 = 0;
+  Standard_Real tol = NAN, X = NAN, Y = NAN, Z = NAN, first = NAN, last = NAN, p1 = 0., p2 = NAN;
+  Standard_Real PfX = NAN, PfY = NAN, PlX = NAN, PlY = NAN;
   gp_Pnt2d aPf, aPl;
-  Standard_Boolean closed, bval;
+  Standard_Boolean closed = 0, bval = 0;
   GeomAbs_Shape reg = GeomAbs_C0;
   try {
     OCC_CATCH_SIGNALS
index ac604c7bd4813a1f5b2d686c842311b49768747d..80af4cd6dea3b425dc5dea459ddb1bb0b7cd6792 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BinTools_ShapeWriter.hxx>
 #include <BinTools_LocationSet.hxx>
 
@@ -140,7 +142,7 @@ void BinTools_ShapeWriter::WriteShape (BinTools_OStream& theStream, const TopoDS
       Handle(BRep_TEdge) aTE = Handle(BRep_TEdge)::DownCast (aShape.TShape());
       theStream << aTE->Tolerance();
       theStream.PutBools (aTE->SameParameter(), aTE->SameRange(), aTE->Degenerated());
-      Standard_Real aFirst, aLast;
+      Standard_Real aFirst = NAN, aLast = NAN;
       for(BRep_ListIteratorOfListOfCurveRepresentation anIter = aTE->Curves(); anIter.More(); anIter.Next())
       {
         const Handle(BRep_CurveRepresentation)& aCR = anIter.Value();
index d2c118ad65506bebbe7652168bc80a6a3e1a418b..9ed6154310baaec7d6c3c295c960dfbd92ba3e63 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BinTools.hxx>
 #include <BinTools_CurveSet.hxx>
 #include <BinTools_SurfaceSet.hxx>
@@ -242,7 +244,7 @@ static BinTools_OStream& operator <<(BinTools_OStream& OS, const Handle(Geom_Bez
   OS << vrational;
 
   // poles and weights
-  Standard_Integer i,j,udegree,vdegree;
+  Standard_Integer i = 0,j = 0,udegree = 0,vdegree = 0;
   udegree = S->UDegree();
   vdegree = S->VDegree();
   OS << (Standard_ExtCharacter)udegree;
@@ -277,7 +279,7 @@ static BinTools_OStream& operator <<(BinTools_OStream& OS, const Handle(Geom_BSp
   OS << vperiodic;
 
 // poles and weights
-  Standard_Integer i,j,udegree,vdegree,nbupoles,nbvpoles,nbuknots,nbvknots;
+  Standard_Integer i = 0,j = 0,udegree = 0,vdegree = 0,nbupoles = 0,nbvpoles = 0,nbuknots = 0,nbvknots = 0;
   udegree  = S->UDegree();
   vdegree  = S->VDegree();
   nbupoles = S->NbUPoles();
@@ -319,7 +321,7 @@ static BinTools_OStream& operator <<(BinTools_OStream& OS, const Handle(Geom_BSp
 static BinTools_OStream& operator <<(BinTools_OStream& OS, const Handle(Geom_RectangularTrimmedSurface)& S)
 {
   OS << (Standard_Byte)RECTANGULAR;
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   S->Bounds(U1,U2,V1,V2);
   OS << U1 << U2 << V1 << V2;
   BinTools_SurfaceSet::WriteSurface (S->BasisSurface(), OS);
@@ -406,7 +408,7 @@ void  BinTools_SurfaceSet::Write (Standard_OStream& OS,
                                   const Message_ProgressRange& theRange)const
 {
 
-  Standard_Integer i, nbsurf = myMap.Extent();
+  Standard_Integer i = 0, nbsurf = myMap.Extent();
   Message_ProgressScope aPS(theRange, "Writing surfaces", nbsurf);
   OS << "Surfaces "<< nbsurf << "\n";
   BinTools_OStream aStream (OS);
@@ -604,7 +606,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS,
   TColgp_Array2OfPnt poles(1,udegree+1,1,vdegree+1);
   TColStd_Array2OfReal weights(1,udegree+1,1,vdegree+1);
   
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   for (i = 1; i <= udegree+1; i++) {
     for (j = 1; j <= vdegree+1; j++) {
       IS >> poles(i,j);//Pnt
@@ -650,7 +652,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS,
   TColgp_Array2OfPnt poles(1,nbupoles,1,nbvpoles);
   TColStd_Array2OfReal weights(1,nbupoles,1,nbvpoles);
   
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   for (i = 1; i <= nbupoles; i++) {
     for (j = 1; j <= nbvpoles; j++) {
       IS >> poles(i,j);//Pnt
@@ -858,7 +860,7 @@ void  BinTools_SurfaceSet::Read (Standard_IStream& IS,
   }
 
   Handle(Geom_Surface) S;
-  Standard_Integer i, nbsurf;
+  Standard_Integer i = 0, nbsurf = 0;
   IS >> nbsurf;
   Message_ProgressScope aPS(theRange, "Reading surfaces", nbsurf);
   IS.get ();//remove <lf>
index 09f31645089db50cfcc71d2c3d7049e08eac0063..b34f9410bab076cd2dc3ccc73414d121b5ced333 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bisector.hxx>
 #include <Bisector_Bisec.hxx>
 #include <Bisector_BisecAna.hxx>
@@ -86,7 +88,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
   Handle(Standard_Type)  Type1 = afirstcurve ->DynamicType();
   Handle(Standard_Type)  Type2 = asecondcurve->DynamicType();
   Handle(Bisector_Curve) Bis;
-  Standard_Real          UFirst,ULast;
+  Standard_Real          UFirst = NAN,ULast = NAN;
 
   if (Type1 == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
     Type1 = Handle(Geom2d_TrimmedCurve)::DownCast(afirstcurve)
@@ -209,7 +211,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
         gp_Pnt2d aP1 = afirstcurve1->Value(afirstcurve1->LastParameter());
         gp_Pnt2d aP2 = asecondcurve1->Value(asecondcurve1->FirstParameter());
         gp_Pnt2d aPm(.5*(aP1.XY()+aP2.XY()));
-        Standard_Real Nx, Ny;
+        Standard_Real Nx = NAN, Ny = NAN;
         if(aPm.Distance(apoint) > 10.*Precision::Confusion())
         {
           Nx = apoint.X() - aPm.X();
@@ -295,7 +297,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve  ,
 
   Handle(Bisector_Curve) Bis;
   Handle(Standard_Type)  Type1 = afirstcurve ->DynamicType();
-  Standard_Real          UFirst,ULast;
+  Standard_Real          UFirst = NAN,ULast = NAN;
 
   if (Type1 == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
     Type1 = Handle(Geom2d_TrimmedCurve)::DownCast(afirstcurve)
@@ -443,7 +445,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint  ,
 
   Handle(Bisector_Curve) Bis;
   Handle(Standard_Type)  Type1 = asecondcurve ->DynamicType();
-  Standard_Real          UFirst,ULast;
+  Standard_Real          UFirst = NAN,ULast = NAN;
 
   if (Type1 == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
     Type1 = Handle(Geom2d_TrimmedCurve)::DownCast(asecondcurve)
@@ -667,13 +669,13 @@ static Standard_Boolean  IsMaxRC (const Handle(Geom2d_Curve)& C,
   Standard_Real         U,
   Standard_Real&        R)
 {  
-  Standard_Real KF,KL;
+  Standard_Real KF = NAN,KL = NAN;
   Standard_Real US = C->FirstParameter();
   Standard_Real UL = C->LastParameter();
 
   gp_Vec2d      D1,D2;
   gp_Pnt2d      P;
-  Standard_Real Norm2;
+  Standard_Real Norm2 = NAN;
 
   C->D2(US,P,D1,D2);
   Norm2 = D1.SquareMagnitude();
index 64a31618a3369bb78316337e86fa37595012eb3d..2b5e979ebd873926261ddea230ca813479c0811b 100644 (file)
@@ -17,6 +17,8 @@
 //  Modified by skv - Fri Jul  1 16:23:17 2005 IDEM(Airbus)
 //  Modified by skv - Wed Jul  7 17:21:09 2004 IDEM(Airbus)
 
+#include <math.h>
+
 #include <Bisector_BisecAna.hxx>
 #include <ElCLib.hxx>
 #include <GccAna_Circ2dBisec.hxx>
@@ -219,11 +221,11 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
                                const Standard_Boolean      oncurve       )
 {
 
-  Standard_Boolean ok;
-  Standard_Real    distanceptsol,parameter,firstparameter =0.;
-  Standard_Boolean thesense = Standard_False,sense;
-  Standard_Real    distancemini;
-  Standard_Integer nbsolution;
+  Standard_Boolean ok = 0;
+  Standard_Real    distanceptsol = NAN,parameter = NAN,firstparameter =0.;
+  Standard_Boolean thesense = Standard_False,sense = 0;
+  Standard_Real    distancemini = NAN;
+  Standard_Integer nbsolution = 0;
   Standard_Real    PreConf = Precision::Confusion();
 
   Handle(Standard_Type) type1 = afirstcurve->DynamicType();
@@ -370,7 +372,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
                                             parameter,
                                             - Precision::Infinite());
       else {
-       Standard_Real parameter2;
+       Standard_Real parameter2 = NAN;
        parameter2  = ElCLib::Parameter(line,circle1.Location());
        parameter2  += 1.e-8;
        thebisector = new Geom2d_TrimmedCurve(bisectorcurve,
@@ -623,7 +625,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
          // -----------------------------------------------------------------
          gp_Pnt2d      circlecenter;
          gp_Lin2d      gpline;
-         Standard_Real secondparameter;
+         Standard_Real secondparameter = NAN;
          
          circlecenter    = circle1.Location();
          gpline          = TheSol->Line(); 
@@ -746,7 +748,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
     else {
       gp_Lin2d l(apoint,gp_Dir2d(Direc2.XY()-Direc1.XY()));
       Handle(GccInt_Bisec) solution = new GccInt_BLine(l);
-      Standard_Boolean isOk;
+      Standard_Boolean isOk = 0;
       sense = Standard_False;
 //  Modified by skv - Tue Feb 15 17:51:29 2005 Integration Begin
 //       distanceptsol = Distance(apoint,solution,
@@ -806,9 +808,9 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve  ,
                                const Standard_Real         tolerance    ,
                                const Standard_Boolean      oncurve       )
 {
-  Standard_Boolean ok;
-  Standard_Boolean thesense = Standard_False,sense;
-  Standard_Real    distanceptsol,parameter,firstparameter =0.,secondparameter;
+  Standard_Boolean ok = 0;
+  Standard_Boolean thesense = Standard_False,sense = 0;
+  Standard_Real    distanceptsol = NAN,parameter = NAN,firstparameter =0.,secondparameter = NAN;
   gp_Vec2d VecRef(0.,0.);
   Handle(Geom2d_Curve) curve;
   Handle(GccInt_Bisec) TheSol;
@@ -1061,8 +1063,8 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Point)& afirstpoint  ,
                                const Standard_Real             ,
                                const Standard_Boolean      oncurve       )
 {
-  Standard_Boolean sense,ok;
-  Standard_Real parameter;
+  Standard_Boolean sense = 0,ok = 0;
+  Standard_Real parameter = NAN;
   gp_Vec2d VecRef(0.,0.);
 
   GccAna_Pnt2dBisec bisector(afirstpoint->Pnt2d(),asecondpoint->Pnt2d());
index 07f29490cef7b0e030ca99d03f1db864e276dd0e..55253ee573357e2fd7d1fdeb383ca68066fb216e 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bisector.hxx>
 #include <Bisector_BisecCC.hxx>
 #include <Bisector_BisecPC.hxx>
@@ -118,7 +120,7 @@ void  Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
   isConvex1 = Bisector::IsConvex(curve1,sign1);
   isConvex2 = Bisector::IsConvex(curve2,sign2);
 
-  Standard_Real    U,UC1,UC2,Dist,dU,USol;  
+  Standard_Real    U = NAN,UC1 = NAN,UC2 = NAN,Dist = NAN,dU = NAN,USol = NAN;  
   gp_Pnt2d         P;
   Standard_Integer NbPnts    = 21;
   Standard_Real    EpsMin    = 10*Precision::Confusion();
@@ -277,7 +279,7 @@ void  Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
       }
       if (extensionEnd) {
         gp_Pnt2d       P1;
-        Standard_Real  UFirst,ULast;
+        Standard_Real  UFirst = NAN,ULast = NAN;
         P1     = myPolygon.Last().Point();
         UFirst = endIntervals.Last();      
         ULast  = UFirst + pointEnd.Distance(P1);
@@ -553,7 +555,7 @@ static Standard_Real Curvature (const Handle(Geom2d_Curve)& C,
   Standard_Real         U,
   Standard_Real         Tol)
 {
-  Standard_Real K1; 
+  Standard_Real K1 = NAN
   gp_Vec2d      D1,D2;
   gp_Pnt2d      P;
   C->D2(U,P,D1,D2);
@@ -619,7 +621,7 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real  U,
   Standard_Real    UMax = myPolygon.Value(IntervalIndex + 1).ParamOnBis();
   Standard_Real    VMin = myPolygon.Value(IntervalIndex    ).ParamOnC2();
   Standard_Real    VMax = myPolygon.Value(IntervalIndex + 1).ParamOnC2(); 
-  Standard_Real    Alpha,VInit;
+  Standard_Real    Alpha = NAN,VInit = NAN;
 
   if (Abs(UMax - UMin) < gp::Resolution()) {
     VInit = VMin;
@@ -648,7 +650,7 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real  U,
   }
   else {
     Bisector_FunctionH H  (curve2,P1,sign1*sign2*T1);
-    Standard_Real FInit;
+    Standard_Real FInit = NAN;
     H.Value(VInit,FInit);
     if (Abs(FInit) < EpsH) {
       U2 = VInit;
@@ -795,11 +797,11 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real  U,
 
   Standard_Boolean YaSol = Standard_False;
   Standard_Real    DMin  = Precision::Infinite();
-  Standard_Real    USol;
+  Standard_Real    USol = NAN;
   Standard_Real    EpsMax = 1.E-6;
-  Standard_Real    EpsX;
+  Standard_Real    EpsX = NAN;
   Standard_Real    EpsH   = 1.E-8;
-  Standard_Real    DistPP1;
+  Standard_Real    DistPP1 = NAN;
   Standard_Integer NbSamples =20;
   Standard_Real    UFirstOnC2 = curve2->FirstParameter();
   Standard_Real    ULastOnC2  = curve2->LastParameter();
@@ -933,7 +935,7 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real  U,
 void Bisector_BisecCC::D0(const Standard_Real     U,
   gp_Pnt2d&         P) const
 {
-  Standard_Real U1,U2,Dist;
+  Standard_Real U1 = NAN,U2 = NAN,Dist = NAN;
 
   P = ValueAndDist(U,U1,U2,Dist);
 }
@@ -1038,7 +1040,7 @@ void  Bisector_BisecCC::Values (const Standard_Real     U,
   // Calculate the current point on the bisectrice and the parameters on each  
   // curve.
   //-------------------------------------------------------------------------
-  Standard_Real U0,V0,Dist;  
+  Standard_Real U0 = NAN,V0 = NAN,Dist = NAN;  
 
   //-----------------------------------------------
   // is the polygon reduced to a point or empty?
@@ -1080,10 +1082,10 @@ void  Bisector_BisecCC::Values (const Standard_Real     U,
   //-----------------------------
   // Calculate dH/du and dH/dv.
   //-----------------------------
-  Standard_Real TuTu,TvTv,TuTv;
-  Standard_Real TuPuPv,TvPuPv  ;
-  Standard_Real TuuPuPv,TuTuu  ;
-  Standard_Real TvvPuPv,TvTvv  ;
+  Standard_Real TuTu = NAN,TvTv = NAN,TuTv = NAN;
+  Standard_Real TuPuPv = NAN,TvPuPv = NAN  ;
+  Standard_Real TuuPuPv = NAN,TuTuu = NAN  ;
+  Standard_Real TvvPuPv = NAN,TvTvv = NAN  ;
 
   TuTu    = Tu.Dot(Tu)    ; TvTv   = Tv.Dot(Tv)  ; TuTv = Tu.Dot(Tv);
   TuPuPv  = Tu.Dot(PuPv)  ; TvPuPv = Tv.Dot(PuPv);
@@ -1098,8 +1100,8 @@ void  Bisector_BisecCC::Values (const Standard_Real     U,
   //-----------------------------
   // Calculate dF/du and dF/dv.
   //-----------------------------
-  Standard_Real NorPuPv,NuPuPv,NorTv;
-  Standard_Real A,B,dAdu,dAdv,dBdu,dBdv,BB;
+  Standard_Real NorPuPv = NAN,NuPuPv = NAN,NorTv = NAN;
+  Standard_Real A = NAN,B = NAN,dAdu = NAN,dAdv = NAN,dBdu = NAN,dBdv = NAN,BB = NAN;
 
   NorPuPv = Nor.Dot(PuPv); 
   NuPuPv  = Nu .Dot(PuPv);  
@@ -1273,7 +1275,7 @@ static Standard_Boolean PointByInt(const Handle(Geom2d_Curve)& CA,
   }
 
   Standard_Real    DMin = Precision::Infinite();
-  Standard_Real    UPC;
+  Standard_Real    UPC = NAN;
   Standard_Boolean YaSol = Standard_False; 
   //--------------------------------------------------------------------
   // Construction of the bisectrice point curve and of the straight line passing
@@ -1369,7 +1371,7 @@ void Bisector_BisecCC::SupLastParameter()
   // of curve2 following the values of sign1 and sign2.
   // the bissectrice is limited by the obtained parameters.
   //------------------------------------------------------------------------
-  Standard_Real    UOnC1,UOnC2,Dist;
+  Standard_Real    UOnC1 = NAN,UOnC2 = NAN,Dist = NAN;
   if (sign1 == sign2) {
     UOnC2 =  curve2->FirstParameter();
   }
@@ -1438,7 +1440,7 @@ const Bisector_PolyBis&  Bisector_BisecCC::Polygon() const
 //==========================================================================
 Standard_Real Bisector_BisecCC::Parameter(const gp_Pnt2d& P) const
 {
-  Standard_Real UOnCurve;
+  Standard_Real UOnCurve = NAN;
 
   if (P.IsEqual(Value(FirstParameter()),Precision::Confusion())) {
     UOnCurve = FirstParameter();
@@ -1623,8 +1625,8 @@ void Bisector_BisecCC::LastParameter (const Standard_Real U)
 Standard_Real Bisector_BisecCC::SearchBound (const Standard_Real U1,
   const Standard_Real U2) const
 {
-  Standard_Real UMid,Dist1,Dist2,DistMid,U11,U22;
-  Standard_Real UC1,UC2;
+  Standard_Real UMid = NAN,Dist1 = NAN,Dist2 = NAN,DistMid = NAN,U11 = NAN,U22 = NAN;
+  Standard_Real UC1 = NAN,UC2 = NAN;
   gp_Pnt2d PBis,PBisPrec;
   Standard_Real TolPnt   = Precision::Confusion();
   Standard_Real TolPar   = Precision::PConfusion();
@@ -1756,8 +1758,8 @@ static Standard_Boolean TestExtension (const Handle(Geom2d_Curve)& C1,
 //=============================================================================
 void  Bisector_BisecCC::ComputePointEnd  ()
 {  
-  Standard_Real U1,U2;  
-  Standard_Real KC,RC;
+  Standard_Real U1 = NAN,U2 = NAN;  
+  Standard_Real KC = NAN,RC = NAN;
   U1 = curve1->FirstParameter();
   if (sign1 == sign2) {
     U2 = curve2->LastParameter();
index b18dc89f9fd357236e5e1845b0b3903e6aa3f26f..c72e2e2ae693a0c2d2c2627246660420bbd58fe3 100644 (file)
@@ -216,19 +216,19 @@ private:
 
   Handle(Geom2d_Curve) curve1;
   Handle(Geom2d_Curve) curve2;
-  Standard_Real sign1;
-  Standard_Real sign2;
+  Standard_Real sign1{};
+  Standard_Real sign2{};
   TColStd_SequenceOfReal startIntervals;
   TColStd_SequenceOfReal endIntervals;
-  Standard_Integer currentInterval;
+  Standard_Integer currentInterval{};
   Bisector_PolyBis myPolygon;
-  Standard_Real shiftParameter;
-  Standard_Real distMax;
-  Standard_Boolean isEmpty;
-  Standard_Boolean isConvex1;
-  Standard_Boolean isConvex2;
-  Standard_Boolean extensionStart;
-  Standard_Boolean extensionEnd;
+  Standard_Real shiftParameter{};
+  Standard_Real distMax{};
+  Standard_Boolean isEmpty{};
+  Standard_Boolean isConvex1{};
+  Standard_Boolean isConvex2{};
+  Standard_Boolean extensionStart{};
+  Standard_Boolean extensionEnd{};
   gp_Pnt2d pointStart;
   gp_Pnt2d pointEnd;
 
index 5ee0290a45fd68e969f44be6ee6f33b72f7f111d..a28c9339eeb14a4fc3e68914fd3dfe78bd48d2ed 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bisector.hxx>
 #include <Bisector_BisecPC.hxx>
 #include <ElCLib.hxx>
@@ -70,20 +72,20 @@ Bisector_BisecPC::Bisector_BisecPC(const Handle(Geom2d_Curve)& Cu,
                                   const gp_Pnt2d&             P,
                                   const Standard_Real         Side,
                                   const Standard_Real         UMin,
-                                  const Standard_Real         UMax)
+                                  const Standard_Real         UMax) : point(P), sign(Side), bisInterval(1), extensionStart(Standard_False), extensionEnd(Standard_False), isConvex(Bisector::IsConvex(curve,sign))
 
 {
   curve    = Handle (Geom2d_Curve)::DownCast(Cu->Copy());
-  point    = P;
-  sign     = Side;
+  
+  
   startIntervals.Append(UMin);
   endIntervals  .Append(UMax);  
-  bisInterval    = 1;
-  extensionStart = Standard_False;
-  extensionEnd   = Standard_False; 
+  
+  
+  
   pointStartBis  = Value(UMin);
   pointEndBis    = Value(UMax);
-  isConvex = Bisector::IsConvex(curve,sign);
+  
 }
 
 //=============================================================================
@@ -324,7 +326,7 @@ void Bisector_BisecPC::Extension(const Standard_Real    U,
                                       gp_Vec2d&        V2,
                                       gp_Vec2d&        V3 ) const
 {
-  Standard_Real dU;
+  Standard_Real dU = NAN;
 
   V1.SetCoord(0., 0.);
   V2.SetCoord(0., 0.);
@@ -398,7 +400,7 @@ void Bisector_BisecPC::Values(const Standard_Real    U,
   
   Standard_Real SquarePPC = aPPC.SquareMagnitude();
   Standard_Real NorPPC    = Nor.Dot(aPPC);
-  Standard_Real A1;
+  Standard_Real A1 = NAN;
 
   if (Abs(NorPPC) > gp::Resolution() && (NorPPC*sign) < 0.) {
     A1 = 0.5*SquarePPC/NorPPC;
@@ -608,7 +610,7 @@ gp_Vec2d Bisector_BisecPC::DN (const Standard_Real     U,
 Standard_Real Bisector_BisecPC::SearchBound (const Standard_Real U1,
                                             const Standard_Real U2) const
 {
-  Standard_Real Dist1,DistMid,U11,U22
+  Standard_Real Dist1 = NAN,DistMid = NAN,U11 = NAN,U22 = NAN
   Standard_Real UMid = 0.;
   Standard_Real Tol      = Precision::PConfusion();
   Standard_Real DistMax2 = distMax*distMax;
@@ -646,7 +648,7 @@ void Bisector_BisecPC::ComputeIntervals ()
 {
   Standard_Real U1 =0.,U2 =0.,UProj =0.;
   Standard_Real UStart = 0., UEnd = 0.;
-  Standard_Real Dist1,Dist2,DistProj;
+  Standard_Real Dist1 = NAN,Dist2 = NAN,DistProj = NAN;
   isEmpty        = Standard_False;     
   shiftParameter = 0.;
   Standard_Boolean YaProj   = Standard_False;
index be81b90930114d22600888dd812601eaa040d2ea..f45480eb104915df85c4a87b61e051c43c2d1fe0 100644 (file)
@@ -185,17 +185,17 @@ private:
 
   Handle(Geom2d_Curve) curve;
   gp_Pnt2d point;
-  Standard_Real sign;
+  Standard_Real sign{};
   TColStd_SequenceOfReal startIntervals;
   TColStd_SequenceOfReal endIntervals;
-  Standard_Integer bisInterval;
-  Standard_Integer currentInterval;
-  Standard_Real shiftParameter;
-  Standard_Real distMax;
-  Standard_Boolean isEmpty;
-  Standard_Boolean isConvex;
-  Standard_Boolean extensionStart;
-  Standard_Boolean extensionEnd;
+  Standard_Integer bisInterval{};
+  Standard_Integer currentInterval{};
+  Standard_Real shiftParameter{};
+  Standard_Real distMax{};
+  Standard_Boolean isEmpty{};
+  Standard_Boolean isConvex{};
+  Standard_Boolean extensionStart{};
+  Standard_Boolean extensionEnd{};
   gp_Pnt2d pointStartBis;
   gp_Pnt2d pointEndBis;
 
index 3133d375d597f2ef0c5524b04814299566fc2262..4fcbdbe36a37901db3f31e1dd58f6fe5a03973b3 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bisector_FunctionH.hxx>
 #include <Geom2d_Curve.hxx>
 #include <gp_Pnt2d.hxx>
 Bisector_FunctionH::Bisector_FunctionH (const Handle(Geom2d_Curve)& C2,
                                        const gp_Pnt2d&             P1,
                                        const gp_Vec2d&             T1)
-     :p1(P1),t1(T1)
+     :curve2(C2), p1(P1),t1(T1)
 {
   t1.Normalize();
-  curve2 = C2;
+  
 }
 
 //=============================================================================
@@ -61,7 +63,7 @@ Standard_Boolean Bisector_FunctionH::Value (const Standard_Real  X,
 Standard_Boolean Bisector_FunctionH::Derivative(const Standard_Real  X,
                                                      Standard_Real& D)
 {
-  Standard_Real F;
+  Standard_Real F = NAN;
   return Values (X,F,D);
 }
 
index 82401af84a60a3071e7659879533ca5323818ea1..90dca533c8893730d81a0e2d9f6d4285d93744d4 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bisector_BisecCC.hxx>
 #include <Bisector_BisecPC.hxx>
 #include <Bisector_Curve.hxx>
@@ -39,11 +41,11 @@ Bisector_FunctionInter::Bisector_FunctionInter ()
 //=============================================================================
 Bisector_FunctionInter::Bisector_FunctionInter (const Handle(Geom2d_Curve)&   C  ,
                                                const Handle(Bisector_Curve)& B1 ,
-                                               const Handle(Bisector_Curve)& B2 )
+                                               const Handle(Bisector_Curve)& B2 ) : curve(C), bisector1(B1), bisector2(B2)
 {
-  curve     = C;
-  bisector1 = B1;
-  bisector2 = B2;
+  
+  
+  
 }
 
 //=============================================================================
@@ -82,7 +84,7 @@ Standard_Boolean Bisector_FunctionInter::Value (const Standard_Real  X,
 Standard_Boolean Bisector_FunctionInter::Derivative(const Standard_Real  X,
                                                          Standard_Real& D)
 {
-  Standard_Real F;
+  Standard_Real F = NAN;
   return Values (X,F,D);
 }
 
@@ -96,7 +98,7 @@ Standard_Boolean Bisector_FunctionInter::Values (const Standard_Real  X,
 {
   gp_Pnt2d PC, PB1, PB2;
   gp_Vec2d TC, TB1, TB2;
-  Standard_Real F1, F2, DF1, DF2;
+  Standard_Real F1 = NAN, F2 = NAN, DF1 = NAN, DF2 = NAN;
 
   curve     ->D1(X,PC ,TC);
   bisector1 ->D1(X,PB1,TB1);
index 876a4a501be90747ae2b822f1906a3e36c0006cc..1c79a97e7823e3c44c26f9534480ec752f6026cb 100644 (file)
@@ -16,6 +16,8 @@
 
 //  Modified by skv - Mon May  5 15:06:39 2003 OCC616
 
+#include <math.h>
+
 #include <Bisector_Bisec.hxx>
 #include <Bisector_BisecAna.hxx>
 #include <Bisector_BisecCC.hxx>
@@ -106,8 +108,8 @@ void Bisector_Inter::Perform(const Bisector_Bisec&  C1,
   IntRes2d_Domain*       SD2   = new IntRes2d_Domain [Bis2->NbIntervals()+1];
 
   Standard_Integer NB1 = 0; Standard_Integer NB2 = 0;
-  Standard_Real    MinDomain,MaxDomain;
-  Standard_Real    UMin,UMax;
+  Standard_Real    MinDomain = NAN,MaxDomain = NAN;
+  Standard_Real    UMin = NAN,UMax = NAN;
   gp_Pnt2d         PMin,PMax;
 
   //------------------------------------------------------
@@ -124,7 +126,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec&  C1,
   // continuity taking account of D1
   //----------------------------------------------------------
 //for (Standard_Integer IB1 = 1; IB1 <= Bis1->NbIntervals(); IB1++) {
-  Standard_Integer IB1;
+  Standard_Integer IB1 = 0;
   for ( IB1 = 1; IB1 <= Bis1->NbIntervals(); IB1++) {
     UMin = Bis1->IntervalFirst(IB1);
     UMax = Bis1->IntervalLast (IB1);
@@ -164,7 +166,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec&  C1,
   // continuity taking account of D2
   //----------------------------------------------------------
 //for (Standard_Integer IB2 = 1; IB2 <= Bis2->NbIntervals(); IB2++) {
-  Standard_Integer IB2;
+  Standard_Integer IB2 = 0;
   for ( IB2 = 1; IB2 <= Bis2->NbIntervals(); IB2++) {
     UMin = Bis2->IntervalFirst(IB2);
     UMax = Bis2->IntervalLast  (IB2);
@@ -217,8 +219,8 @@ void Bisector_Inter::SinglePerform(const Handle(Geom2d_Curve)&    CBis1,
                                   const Standard_Real            Tol,
                                   const Standard_Boolean         ComunElement) 
 {
-  Handle(Geom2d_Curve)   Bis1 = CBis1;
-  Handle(Geom2d_Curve)   Bis2 = CBis2;
+  const Handle(Geom2d_Curve)&   Bis1 = CBis1;
+  const Handle(Geom2d_Curve)&   Bis2 = CBis2;
 
   Handle(Standard_Type)  Type1 = Bis1->DynamicType();
   Handle(Standard_Type)  Type2 = Bis2->DynamicType();
@@ -322,7 +324,7 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)&  Bis1,
                                      const IntRes2d_Domain&           D2,
                                      const Standard_Real              Tol)
 {
-  Standard_Real USol,U1,U2,Dist;
+  Standard_Real USol = NAN,U1 = NAN,U2 = NAN,Dist = NAN;
   Standard_Real UMin =0.,UMax =0.;  
   Standard_Real Eps = Precision::PConfusion();
   gp_Pnt2d PSol;
index 0d3a1c0148e9f92ff8d0109bf0bada6c6c36424b..db80f9e8ab08626b8e78541fd2a4fffd5a962714 100644 (file)
@@ -44,9 +44,9 @@ Bisector_PointOnBis::Bisector_PointOnBis(const Standard_Real Param1,
   param2   (Param2),
   paramBis (ParamBis),
   distance (Distance),
-  point    (P)
+  infinite(Standard_False), point    (P)
 {
-  infinite = Standard_False;
+  
 }
 
 //=============================================================================
index 6cddc59389c062416c2651f63f4e697bc91dca26..b84793fd77edac36a399431879d7e976882a3bc6 100644 (file)
@@ -24,9 +24,9 @@
 //function : Bisector_PolyBis
 // purpose :
 //=============================================================================
-Bisector_PolyBis::Bisector_PolyBis()
+Bisector_PolyBis::Bisector_PolyBis() : nbPoints(0)
 {
-  nbPoints = 0;
+  
 }
 
 //=============================================================================
index a9f1fd8ffec01103d40707cfe0e061552e42d537..d69d4ee45b016e5a07bda4196417515ff52d2b8c 100644 (file)
@@ -24,6 +24,7 @@
 #include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
 
+#include <math.h>
 #include <stdio.h>
 //-- ================================================================================
 //--  lbr le 27 fev 97
@@ -219,7 +220,7 @@ BSB_T3Bits::BSB_T3Bits(int size)
   case  16: {  _DECAL=4;   _DECAL2= 8;   _BASE= 16;  _BASEM1= 15;  break; } 
   default : {  _DECAL=3;   _DECAL2= 6;   _BASE=  8;  _BASEM1=  7;  break; } 
   }
-  Standard_Integer i ;    
+  Standard_Integer i = 0 ;    
   unsigned int nb = (size*size*size)>>5;
   Isize = nb;
   ssize = size;
@@ -316,9 +317,9 @@ void BSB_T3Bits::AppendAxisX(const Standard_Integer i,
 //purpose  : 
 //=======================================================================
 Bnd_BoundSortBox::Bnd_BoundSortBox()
-     : discrX(0), discrY(0), discrZ(0)
+     : discrX(0), discrY(0), discrZ(0), TabBits(0)
 {
-  TabBits=0;
+  
 #if DEBUG
   NBCOMPARE=0L;   NBBOITES=0L;   NBBOITESATESTER=0L;
   APPELREJECTION=0L;  REJECTNIV0=0L;  REJECTNIV1=0L;
@@ -336,7 +337,7 @@ void Bnd_BoundSortBox::Initialize(const Bnd_Box& CompleteBox,
   myBndComponents=SetOfBox;
   const Bnd_Array1OfBox & taBox=myBndComponents->Array1();
   discrX=discrY=discrZ=ComputeSize(taBox.Upper()-taBox.Lower());
-  Standard_Real Xmax, Ymax, Zmax;
+  Standard_Real Xmax = NAN, Ymax = NAN, Zmax = NAN;
   if(CompleteBox.IsVoid()) 
     return;
   CompleteBox.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
@@ -353,17 +354,17 @@ void Bnd_BoundSortBox::Initialize(const Handle(Bnd_HArray1OfBox)& SetOfBox)
 {
   myBndComponents=SetOfBox;
   const Bnd_Array1OfBox & taBox=myBndComponents->Array1();
-  Standard_Integer i0,i1;
+  Standard_Integer i0 = 0,i1 = 0;
   i0=taBox.Lower();
   i1=taBox.Upper();
   discrX=discrY=discrZ=ComputeSize(i1-i0);
-  Standard_Integer labox;
+  Standard_Integer labox = 0;
   for (labox=i0; labox<=i1; labox++) {
     if (!taBox(labox).IsVoid()) {
       myBox.Add(taBox(labox));
     }
   }
-  Standard_Real Xmax, Ymax, Zmax;
+  Standard_Real Xmax = NAN, Ymax = NAN, Zmax = NAN;
   if(myBox.IsVoid()) 
     return;
   myBox.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
@@ -378,11 +379,11 @@ void Bnd_BoundSortBox::Initialize(const Handle(Bnd_HArray1OfBox)& SetOfBox)
 //=======================================================================
 void Bnd_BoundSortBox::SortBoxes() 
 {
-  Standard_Integer labox;
-  Standard_Integer lacaseX, firstcaseX, lastcaseX;
-  Standard_Integer lacaseY, firstcaseY, lastcaseY;
-  Standard_Integer lacaseZ, firstcaseZ, lastcaseZ;
-  Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+  Standard_Integer labox = 0;
+  Standard_Integer lacaseX = 0, firstcaseX = 0, lastcaseX = 0;
+  Standard_Integer lacaseY = 0, firstcaseY = 0, lastcaseY = 0;
+  Standard_Integer lacaseZ = 0, firstcaseZ = 0, lastcaseZ = 0;
+  Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
   const Bnd_Array1OfBox & taBox=myBndComponents->Array1();
   Standard_Integer i0=taBox.Lower();
   Standard_Integer i1=taBox.Upper();
@@ -401,7 +402,7 @@ void Bnd_BoundSortBox::SortBoxes()
       Map->ToTest[i]=i0-1;
     }
   }
-  Standard_Real _Xmax,_Xmin,_Ymax,_Ymin,_Zmin,_Zmax;
+  Standard_Real _Xmax = NAN,_Xmin = NAN,_Ymax = NAN,_Ymin = NAN,_Zmin = NAN,_Zmax = NAN;
   myBox.Get(_Xmin,_Ymin,_Zmin,_Xmax,_Ymax,_Zmax);
   Map->Xmax=_Xmax; Map->Ymax=_Ymax; Map->Zmax=_Zmax;
   Map->Xmin=_Xmin; Map->Ymin=_Ymin; Map->Zmin=_Zmin;
@@ -484,7 +485,7 @@ void Bnd_BoundSortBox::Initialize(const Bnd_Box& CompleteBox,
   //***<<< JCD - End  
 
   discrX=discrY=discrZ=ComputeSize(nbComponents);
-  Standard_Real Xmax, Ymax, Zmax;
+  Standard_Real Xmax = NAN, Ymax = NAN, Zmax = NAN;
 
   if(CompleteBox.IsVoid())
     return;
@@ -513,10 +514,10 @@ void Bnd_BoundSortBox::Add(const Bnd_Box& theBox,
   if (!theBox.IsVoid()) {
     Standard_Integer i0=myBndComponents->Lower();
     Standard_Integer i1=myBndComponents->Upper();
-    Standard_Integer theGapX, firstGapX , lastGapX;
-    Standard_Integer theGapY, firstGapY , lastGapY;
-    Standard_Integer theGapZ, firstGapZ , lastGapZ;
-    Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+    Standard_Integer theGapX = 0, firstGapX = 0 , lastGapX = 0;
+    Standard_Integer theGapY = 0, firstGapY = 0 , lastGapY = 0;
+    Standard_Integer theGapZ = 0, firstGapZ = 0 , lastGapZ = 0;
+    Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
     myBndComponents->SetValue(boxIndex, theBox);
     theBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
     BSB_T3Bits* Map = (BSB_T3Bits *)TabBits;
@@ -528,7 +529,7 @@ void Bnd_BoundSortBox::Add(const Bnd_Box& theBox,
        Map->ToTest[i]=i0-1;
       }
     }
-    Standard_Real _Xmax,_Ymax,_Zmax;
+    Standard_Real _Xmax = NAN,_Ymax = NAN,_Zmax = NAN;
     _Xmax=Map->Xmax; _Ymax=Map->Ymax; _Zmax=Map->Zmax;
     if(xmin>Xmin) firstGapX=(Standard_Integer )((xmin-Xmin)*deltaX)-1; else  firstGapX=1;
     if(ymin>Ymin) firstGapY=(Standard_Integer )((ymin-Ymin)*deltaY)-1; else  firstGapY=1;
@@ -629,7 +630,7 @@ static void VerifCompare(const TColStd_ListOfInteger& lastResult,
 const TColStd_ListOfInteger& Bnd_BoundSortBox::Compare (const Bnd_Box& theBox)
 
 {
- Standard_Integer lacase ;
+ Standard_Integer lacase = 0 ;
 #if DEBUG
   NBCOMPARE++;
 #endif
@@ -645,12 +646,12 @@ const TColStd_ListOfInteger& Bnd_BoundSortBox::Compare (const Bnd_Box& theBox)
   //-- Rejection with the table of bits
   Standard_Boolean touch = Standard_True;
   touch = Standard_False;
-  Standard_Real _Xmax,_Ymax,_Zmax;
+  Standard_Real _Xmax = NAN,_Ymax = NAN,_Zmax = NAN;
   BSB_T3Bits* Map = (BSB_T3Bits *)TabBits;
-  Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+  Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
   _Xmax=Map->Xmax; _Ymax=Map->Ymax; _Zmax=Map->Zmax;
   theBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
-  Standard_Integer i0,i1,j0,j1,k0,k1;
+  Standard_Integer i0 = 0,i1 = 0,j0 = 0,j1 = 0,k0 = 0,k1 = 0;
   if(xmin>Xmin) i0=(Standard_Integer )((xmin-Xmin)*deltaX)-1; else  i0=1;
   if(ymin>Ymin) j0=(Standard_Integer )((ymin-Ymin)*deltaY)-1; else  j0=1;
   if(zmin>Zmin) k0=(Standard_Integer )((zmin-Zmin)*deltaZ)-1; else  k0=1;
@@ -770,7 +771,7 @@ const TColStd_ListOfInteger& Bnd_BoundSortBox::Compare(const gp_Pln& thePlane)
 
 {
   lastResult.Clear();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   const Bnd_Array1OfBox& boxes = myBndComponents->Array1();
   for (i = boxes.Lower(); i <= boxes.Upper(); i++) {
     if (!boxes(i).IsOut(thePlane))
index b83e4f566355e5ff354a340f4b1f5a076a3d9424..70c7839929f31bc6a17c31db1aad1be9604e4e36 100644 (file)
@@ -122,16 +122,16 @@ private:
 
   Bnd_Box myBox;
   Handle(Bnd_HArray1OfBox) myBndComponents;
-  Standard_Real Xmin;
-  Standard_Real Ymin;
-  Standard_Real Zmin;
-  Standard_Real deltaX;
-  Standard_Real deltaY;
-  Standard_Real deltaZ;
+  Standard_Real Xmin{};
+  Standard_Real Ymin{};
+  Standard_Real Zmin{};
+  Standard_Real deltaX{};
+  Standard_Real deltaY{};
+  Standard_Real deltaZ{};
   Standard_Integer discrX;
   Standard_Integer discrY;
   Standard_Integer discrZ;
-  Standard_Integer theFound;
+  Standard_Integer theFound{};
   TColStd_DataMapOfIntegerInteger Crible;
   TColStd_ListOfInteger lastResult;
   Standard_Address TabBits;
index eba846a5f54a6595e5804f133ec321c7d6ffee17..ea9e8a5ce7c6fc8de2e3d55cca73546202a6ee3d 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <gp_Dir.hxx>
 #include <gp_Pln.hxx>
@@ -445,7 +447,7 @@ void Bnd_Box::Add (const Bnd_Box& Other)
 
 void Bnd_Box::Add (const gp_Pnt& P)
 {
-  Standard_Real X,Y,Z;
+  Standard_Real X = NAN,Y = NAN,Z = NAN;
   P.Coord(X,Y,Z);
   Update(X,Y,Z);
 }
@@ -469,7 +471,7 @@ void Bnd_Box::Add (const gp_Pnt& P, const gp_Dir& D)
 
 void Bnd_Box::Add (const gp_Dir& D)
 {
-  Standard_Real DX,DY,DZ;
+  Standard_Real DX = NAN,DY = NAN,DZ = NAN;
   D.Coord(DX,DY,DZ);
 
   if (DX < -RealEpsilon()) 
@@ -498,7 +500,7 @@ Standard_Boolean Bnd_Box::IsOut (const gp_Pnt& P) const
   if        (IsWhole())  return Standard_False;
   else if   (IsVoid())   return Standard_True;
   else {
-    Standard_Real X,Y,Z;
+    Standard_Real X = NAN,Y = NAN,Z = NAN;
     P.Coord(X,Y,Z);
     if      (!IsOpenXmin() && (X < (Xmin-Gap))) return Standard_True;
     else if (!IsOpenXmax() && (X > (Xmax+Gap))) return Standard_True;
@@ -521,7 +523,7 @@ Standard_Boolean Bnd_Box::IsOut (const gp_Pln& P) const
   if        (IsWhole())  return Standard_False;
   else if   (IsVoid())   return Standard_True;
   else {
-    Standard_Real A,B,C,D;
+    Standard_Real A = NAN,B = NAN,C = NAN,D = NAN;
     P.Coefficients (A, B ,C ,D);
     Standard_Real d = A * (Xmin-Gap) + B * (Ymin-Gap) + C * (Zmin-Gap) + D;
 //    Standard_Boolean plus = d > 0;
@@ -554,10 +556,10 @@ Standard_Boolean Bnd_Box::IsOut (const gp_Lin& L) const
   if        (IsWhole())  return Standard_False;
   else if   (IsVoid())   return Standard_True;
   else {
-    Standard_Real xmin = 0, xmax = 0, ymin = 0, ymax = 0, zmin, zmax;
-    Standard_Real parmin, parmax, par1, par2;
-    Standard_Boolean xToSet, yToSet;
-    Standard_Real myXmin, myYmin, myZmin, myXmax, myYmax, myZmax;
+    Standard_Real xmin = 0, xmax = 0, ymin = 0, ymax = 0, zmin = NAN, zmax = NAN;
+    Standard_Real parmin = NAN, parmax = NAN, par1 = NAN, par2 = NAN;
+    Standard_Boolean xToSet = 0, yToSet = 0;
+    Standard_Real myXmin = NAN, myYmin = NAN, myZmin = NAN, myXmax = NAN, myYmax = NAN, myZmax = NAN;
     Get (myXmin, myYmin, myZmin, myXmax, myYmax, myZmax);
 
     if (Abs(L.Direction().XYZ().X())>0.) {
@@ -648,8 +650,8 @@ Standard_Boolean Bnd_Box::IsOut (const Bnd_Box& Other) const
 { 
   //modified by NIZNHY-PKV Fri Jul 08 11:03:43 2011f
   if (!Flags && !Other.Flags) {
-    Standard_Boolean bRet;
-    Standard_Real delta;
+    Standard_Boolean bRet = 0;
+    Standard_Real delta = NAN;
     //
     delta = Other.Gap + Gap;
     bRet=((Xmin - Other.Xmax > delta) ||
@@ -766,7 +768,7 @@ Standard_Boolean Bnd_Box::IsOut(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Dir
   else if   (IsVoid())   return Standard_True;
 
   Standard_Real eps = RealSmall();
-  Standard_Real myXmin, myYmin, myZmin, myXmax, myYmax, myZmax;
+  Standard_Real myXmin = NAN, myYmin = NAN, myZmin = NAN, myXmax = NAN, myYmax = NAN, myZmax = NAN;
   Get (myXmin, myYmin, myZmin, myXmax, myYmax, myZmax);
 
   if(Abs(D.X()) < eps && Abs(D.Y()) < eps)
@@ -905,7 +907,7 @@ Standard_Boolean Bnd_Box::IsOut(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Dir
 //=======================================================================
 
 static Standard_Real DistMini2Box( const Standard_Real r1min, const  Standard_Real r1max,  const Standard_Real r2min, const  Standard_Real r2max)
-{  Standard_Real   r1, r2;
+{  Standard_Real   r1 = NAN, r2 = NAN;
 
    r1 = Square(r1min - r2max);
    r2 = Square(r1max - r2min);
@@ -915,9 +917,9 @@ static Standard_Real DistMini2Box( const Standard_Real r1min, const  Standard_Re
 
 
 Standard_Real Bnd_Box::Distance(const Bnd_Box& Other) const 
-{  Standard_Real   xminB1, yminB1, zminB1, xmaxB1, ymaxB1, zmaxB1;
-   Standard_Real   xminB2, yminB2, zminB2, xmaxB2, ymaxB2, zmaxB2;
-   Standard_Real   dist_x, dist_y, dist_z, dist_t;
+{  Standard_Real   xminB1 = NAN, yminB1 = NAN, zminB1 = NAN, xmaxB1 = NAN, ymaxB1 = NAN, zmaxB1 = NAN;
+   Standard_Real   xminB2 = NAN, yminB2 = NAN, zminB2 = NAN, xmaxB2 = NAN, ymaxB2 = NAN, zmaxB2 = NAN;
+   Standard_Real   dist_x = NAN, dist_y = NAN, dist_z = NAN, dist_t = NAN;
 
    Get( xminB1, yminB1, zminB1, xmaxB1, ymaxB1, zmaxB1);
    Other.Get( xminB2, yminB2, zminB2, xmaxB2, ymaxB2, zmaxB2);
index f9390cb87fbf1f8935369729b73991bd2d135836..e18eaf7e4c9d9de5524b1ca8ffe525ee67e5474c 100644 (file)
@@ -323,14 +323,14 @@ protected:
 
 private:
 
-  Standard_Real Xmin;
-  Standard_Real Xmax;
-  Standard_Real Ymin;
-  Standard_Real Ymax;
-  Standard_Real Zmin;
-  Standard_Real Zmax;
+  Standard_Real Xmin{};
+  Standard_Real Xmax{};
+  Standard_Real Ymin{};
+  Standard_Real Ymax{};
+  Standard_Real Zmin{};
+  Standard_Real Zmax{};
   Standard_Real Gap;
-  Standard_Integer Flags;
+  Standard_Integer Flags{};
 
 };
 
index 0790c51dd1a2b864c21e85976812234be48e1502..0c826231558d4bbbe3f8cbf4f02f643ec1a6845c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box2d.hxx>
 #include <gp_Dir2d.hxx>
 #include <gp_Trsf2d.hxx>
@@ -100,7 +102,7 @@ Bnd_Box2d Bnd_Box2d::Transformed (const gp_Trsf2d& T) const
 
   if      (F == gp_Identity) {}
   else if (F == gp_Translation) {
-    Standard_Real DX,DY;
+    Standard_Real DX = NAN,DY = NAN;
     (T.TranslationPart()).Coord(DX,DY);
     if (!(Flags & XminMask))  newb.Xmin += DX;
     if (!(Flags & XmaxMask))  newb.Xmax += DX;
@@ -110,7 +112,7 @@ Bnd_Box2d Bnd_Box2d::Transformed (const gp_Trsf2d& T) const
   else {
     gp_Pnt2d P[4];
     Standard_Boolean Vertex[4];
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Vertex[0] = Standard_True;
     Vertex[1] = Standard_True;
     Vertex[2] = Standard_True;
@@ -264,7 +266,7 @@ Standard_Boolean Bnd_Box2d::IsOut(const gp_Lin2d& theL) const
   {
     return Standard_True;
   }
-  Standard_Real aXMin, aXMax, aYMin, aYMax;
+  Standard_Real aXMin = NAN, aXMax = NAN, aYMin = NAN, aYMax = NAN;
   Get(aXMin, aYMin, aXMax, aYMax);
 
   gp_XY aCenter((aXMin + aXMax) / 2, (aYMin + aYMax) / 2);
@@ -296,7 +298,7 @@ Standard_Boolean Bnd_Box2d::IsOut(const gp_Pnt2d& theP0, const gp_Pnt2d& theP1)
   }
   
   Standard_Boolean aStatus = Standard_True;
-  Standard_Real aLocXMin, aLocXMax, aLocYMin, aLocYMax;
+  Standard_Real aLocXMin = NAN, aLocXMax = NAN, aLocYMin = NAN, aLocYMax = NAN;
   Get(aLocXMin, aLocYMin, aLocXMax, aLocYMax);
 
   //// Intersect the line containing the segment.
@@ -335,7 +337,7 @@ Standard_Boolean Bnd_Box2d::IsOut (const Bnd_Box2d& Other) const
   else if   (Other.IsWhole())  return Standard_False;
   else if   (Other.IsVoid())   return Standard_True;
   else {
-    Standard_Real OXmin,OXmax,OYmin,OYmax;
+    Standard_Real OXmin = NAN,OXmax = NAN,OYmin = NAN,OYmax = NAN;
     Other.Get(OXmin,OYmin,OXmax,OYmax);
     if      (!(Flags & XminMask) && (OXmax < (Xmin-Gap))) return Standard_True;
     else if (!(Flags & XmaxMask) && (OXmin > (Xmax+Gap))) return Standard_True;
index 637edf26a0749bbfd255bcb16a78eb7de6c61254..083a3d217bbf6edbd1f999d21a7d035768422073 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Bnd_OBB.hxx>
 
 #include <Bnd_Tools.hxx>
@@ -73,7 +75,7 @@ public: //! @name Getting the results
 public: //! @name Definition of rejection/acceptance rules
 
   //! Defines the rules for node rejection
-  virtual Standard_Boolean RejectNode (const BVH_Vec3d& theCMin,
+  Standard_Boolean RejectNode (const BVH_Vec3d& theCMin,
                                        const BVH_Vec3d& theCMax,
                                        Bnd_Range& theMetric) const Standard_OVERRIDE
   {
@@ -116,13 +118,13 @@ public: //! @name Definition of rejection/acceptance rules
   }
 
   //! Rules for node rejection by the metric
-  virtual Standard_Boolean RejectMetric (const Bnd_Range& theMetric) const Standard_OVERRIDE
+  Standard_Boolean RejectMetric (const Bnd_Range& theMetric) const Standard_OVERRIDE
   {
     if (myPrmMin > myPrmMax)
       // no parameters computed
       return Standard_False;
 
-    Standard_Real aMin, aMax;
+    Standard_Real aMin = NAN, aMax = NAN;
     if (!theMetric.GetBounds (aMin, aMax))
       // void metric
       return Standard_False;
@@ -132,7 +134,7 @@ public: //! @name Definition of rejection/acceptance rules
   }
 
   //! Defines the rules for leaf acceptance
-  virtual Standard_Boolean Accept (const Standard_Integer theIndex,
+  Standard_Boolean Accept (const Standard_Integer theIndex,
                                    const Bnd_Range&) Standard_OVERRIDE
   {
     const gp_XYZ& theLeaf = myBVHSet->Element (theIndex);
@@ -153,7 +155,7 @@ public: //! @name Definition of rejection/acceptance rules
 public: //! @name Choosing the best branch
 
   //! Returns true if the metric of the left branch is better than the metric of the right
-  virtual Standard_Boolean IsMetricBetter (const Bnd_Range& theLeft,
+  Standard_Boolean IsMetricBetter (const Bnd_Range& theLeft,
                                            const Bnd_Range& theRight) const Standard_OVERRIDE
   {
     if (myPrmMin > myPrmMax)
@@ -357,7 +359,7 @@ private:
 
   //! Points of ditetrahedron
   //! given by their indices in myLExtremalPoints.
-  Standard_Integer myTriIdx[5];
+  Standard_Integer myTriIdx[5]{};
 
   //! List of extremal points
   gp_XYZ myLExtremalPoints[myNbExtremalPoints];
index 844f63f3c90e799646c7d5adffcd180681a6cc24..0921d6204d514ca144a0708525aca4a54fb4abe2 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Bnd_Sphere.hxx>
 
 Bnd_Sphere::Bnd_Sphere()
@@ -100,7 +102,7 @@ Standard_Boolean Bnd_Sphere::IsOut( const Bnd_Sphere& theOther ) const
 Standard_Boolean Bnd_Sphere::IsOut( const gp_XYZ& theXYZ,
                                     Standard_Real& theMaxDist) const
 {
-  Standard_Real aCurMinDist, aCurMaxDist;
+  Standard_Real aCurMinDist = NAN, aCurMaxDist = NAN;
   Distances( theXYZ, aCurMinDist, aCurMaxDist );
   if ( aCurMinDist > theMaxDist )
     return Standard_True;
index adbd0238bc9fb518668010050d9dec60a7629801..9cbdf96c9df34fdbe983a43e92d68bb659b1ee88 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <BndLib.hxx>
 
 #include <Bnd_Box.hxx>
@@ -51,8 +53,8 @@ namespace
                 const PointType& theXd, const PointType& theYd, const PointType& theO,
                 BndBoxType& theB)
   {
-    Standard_Real aTeta1;
-    Standard_Real aTeta2;
+    Standard_Real aTeta1 = NAN;
+    Standard_Real aTeta2 = NAN;
     if(theP2 < theP1)
     { 
       aTeta1 = theP2;
@@ -84,13 +86,13 @@ namespace
     }
 
     // One places already both ends
-    Standard_Real aCn1, aSn1 ,aCn2, aSn2;
+    Standard_Real aCn1 = NAN, aSn1 = NAN ,aCn2 = NAN, aSn2 = NAN;
     aCn1 = Cos(aTeta1); aSn1 = Sin(aTeta1);
     aCn2 = Cos(aTeta2); aSn2 = Sin(aTeta2);
     theB.Add(PointType( theO.Coord() +theRa*aCn1*theXd.Coord() +theRb*aSn1*theYd.Coord()));
     theB.Add(PointType(theO.Coord() +theRa*aCn2*theXd.Coord() +theRb*aSn2*theYd.Coord()));
     
-    Standard_Real aRam, aRbm;
+    Standard_Real aRam = NAN, aRbm = NAN;
     if (aDelta > M_PI/8.)
     {
       // Main radiuses to take into account only 8 points (/cos(Pi/8.))
@@ -433,8 +435,8 @@ void BndLib::Add(const gp_Circ& C,
   gp_XYZ Yd = C.YAxis().Direction().XYZ();
   const gp_Ax2& pos = C.Position();
   //
-  Standard_Real tt;
-  Standard_Real xmin, xmax, txmin, txmax;
+  Standard_Real tt = NAN;
+  Standard_Real xmin = NAN, xmax = NAN, txmin = NAN, txmax = NAN;
   if(Abs(Xd.X()) > gp::Resolution())
   {
     txmin = ATan(Yd.X() / Xd.X());
@@ -457,7 +459,7 @@ void BndLib::Add(const gp_Circ& C,
     txmax = tt;
   }
   //
-  Standard_Real ymin, ymax, tymin, tymax;
+  Standard_Real ymin = NAN, ymax = NAN, tymin = NAN, tymax = NAN;
   if(Abs(Xd.Y()) > gp::Resolution())
   {
     tymin = ATan(Yd.Y() / Xd.Y());
@@ -480,7 +482,7 @@ void BndLib::Add(const gp_Circ& C,
     tymax = tt;
   }
   //
-  Standard_Real zmin, zmax, tzmin, tzmax;
+  Standard_Real zmin = NAN, zmax = NAN, tzmin = NAN, tzmax = NAN;
   if(Abs(Xd.Z()) > gp::Resolution())
   {
     tzmin = ATan(Yd.Z() / Xd.Z());
@@ -513,7 +515,7 @@ void BndLib::Add(const gp_Circ& C,
     B.Add(P);
     P = ElCLib::CircleValue(utrim2, pos, R);
     B.Add(P);
-    Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
+    Standard_Real Xmin = NAN, Ymin = NAN, Zmin = NAN, Xmax = NAN, Ymax = NAN, Zmax = NAN;
     B.FinitePart().Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
     Standard_Real gap = B.GetGap();
     Xmin += gap;
@@ -618,8 +620,8 @@ void BndLib::Add(const gp_Elips& C,
   gp_XYZ Yd = C.YAxis().Direction().XYZ();
   const gp_Ax2& pos = C.Position();
   //
-  Standard_Real tt;
-  Standard_Real xmin, xmax, txmin, txmax;
+  Standard_Real tt = NAN;
+  Standard_Real xmin = NAN, xmax = NAN, txmin = NAN, txmax = NAN;
   if(Abs(Xd.X()) > gp::Resolution())
   {
     txmin = ATan((MinR*Yd.X()) / (MajR*Xd.X()));
@@ -642,7 +644,7 @@ void BndLib::Add(const gp_Elips& C,
     txmax = tt;
   }
   //
-  Standard_Real ymin, ymax, tymin, tymax;
+  Standard_Real ymin = NAN, ymax = NAN, tymin = NAN, tymax = NAN;
   if(Abs(Xd.Y()) > gp::Resolution())
   {
     tymin = ATan((MinR*Yd.Y()) / (MajR*Xd.Y()));
@@ -665,7 +667,7 @@ void BndLib::Add(const gp_Elips& C,
     tymax = tt;
   }
   //
-  Standard_Real zmin, zmax, tzmin, tzmax;
+  Standard_Real zmin = NAN, zmax = NAN, tzmin = NAN, tzmax = NAN;
   if(Abs(Xd.Z()) > gp::Resolution())
   {
     tzmin = ATan((MinR*Yd.Z()) / (MajR*Xd.Z()));
@@ -698,7 +700,7 @@ void BndLib::Add(const gp_Elips& C,
     B.Add(P);
     P = ElCLib::EllipseValue(utrim2, pos, MajR, MinR);
     B.Add(P);
-    Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
+    Standard_Real Xmin = NAN, Ymin = NAN, Zmin = NAN, Xmax = NAN, Ymax = NAN, Zmax = NAN;
     B.FinitePart().Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
     Standard_Real gap = B.GetGap();
     Xmin += gap;
@@ -1136,7 +1138,7 @@ static void ComputeSphere (const gp_Sphere& Sphere,
 {
   gp_Pnt P = Sphere.Location();
   Standard_Real R = Sphere.Radius();
-  Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+  Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
   xmin = P.X() - R;
   xmax = P.X() + R;
   ymin = P.Y() - R;
@@ -1153,7 +1155,7 @@ static void ComputeSphere (const gp_Sphere& Sphere,
   }
   else
   {
-    Standard_Real u, v;
+    Standard_Real u = NAN, v = NAN;
     Standard_Real umax = UMin + 2. * M_PI;
     const gp_Ax3& Pos = Sphere.Position();
     gp_Pnt PExt = P;
@@ -1234,7 +1236,7 @@ static void computeDegeneratedTorus (const gp_Torus& theTorus,
   gp_Pnt aP = theTorus.Location();
   Standard_Real aRa = theTorus.MajorRadius();
   Standard_Real aRi = theTorus.MinorRadius();
-  Standard_Real aXmin,anYmin,aZmin,aXmax,anYmax,aZmax;
+  Standard_Real aXmin = NAN,anYmin = NAN,aZmin = NAN,aXmax = NAN,anYmax = NAN,aZmax = NAN;
   aXmin = aP.X() - aRa - aRi;
   aXmax = aP.X() + aRa + aRi;
   anYmin = aP.Y() - aRa - aRi;
@@ -1253,7 +1255,7 @@ static void computeDegeneratedTorus (const gp_Torus& theTorus,
     return;
   }
   
-  Standard_Real anU,aV;
+  Standard_Real anU = NAN,aV = NAN;
   Standard_Real anUmax = theUMin + 2. * M_PI;
   const gp_Ax3& aPos = theTorus.Position();
   gp_Pnt aPExt = aP;
@@ -1332,7 +1334,7 @@ void BndLib::Add( const gp_Sphere& S,const Standard_Real Tol, Bnd_Box& B)
 {
   gp_Pnt P = S.Location();
   Standard_Real R = S.Radius();
-  Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+  Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
   xmin = P.X() - R;
   xmax = P.X() + R;
   ymin = P.Y() - R;
@@ -1347,8 +1349,8 @@ void BndLib::Add(const gp_Torus& S,const Standard_Real UMin,
    const Standard_Real UMax,const Standard_Real VMin,
    const Standard_Real VMax,const Standard_Real Tol, Bnd_Box& B) {
 
-  Standard_Integer Fi1;
-  Standard_Integer Fi2;
+  Standard_Integer Fi1 = 0;
+  Standard_Integer Fi2 = 0;
   if (VMax<VMin) {
     Fi1 = (Standard_Integer )( VMax/(M_PI/4.));
     Fi2 = (Standard_Integer )( VMin/(M_PI/4.));
@@ -1492,8 +1494,8 @@ Standard_Integer ComputeBox(const gp_Hypr& aHypr,
                             const Standard_Real aT2, 
                             Bnd_Box& aBox)
 {
-  Standard_Integer i, iErr;
-  Standard_Real aRmaj, aRmin, aA, aB, aABP, aBAM, aT3, aCf, aEps;
+  Standard_Integer i = 0, iErr = 0;
+  Standard_Real aRmaj = NAN, aRmin = NAN, aA = NAN, aB = NAN, aABP = NAN, aBAM = NAN, aT3 = NAN, aCf = NAN, aEps = NAN;
   gp_Pnt aP1, aP2, aP3, aP0;
   //
   //
index ad454b8a94a5302b9aeab6cf7fcdd089ac59cb65..fa0d57c5efa1279d52d96fe0c263407d8bdd99e6 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor2d_Curve2d.hxx>
 #include <Bnd_Box2d.hxx>
 #include <BndLib_Add2dCurve.hxx>
@@ -109,12 +111,12 @@ class BndLib_Box2dCurve  {
  protected:
   Handle(Geom2d_Curve) myCurve;
   Bnd_Box2d myBox;
-  Standard_Integer myErrorStatus;
+  Standard_Integer myErrorStatus{};
   Handle(Geom2d_Curve) myCurveBase;
-  Standard_Real myOffsetBase;
-  Standard_Boolean myOffsetFlag;
-  Standard_Real myT1;
-  Standard_Real myT2;
+  Standard_Real myOffsetBase{};
+  Standard_Boolean myOffsetFlag{};
+  Standard_Real myT1{};
+  Standard_Real myT2{};
   GeomAbs_CurveType myTypeBase;
 };
 //
@@ -135,7 +137,7 @@ public:
   }
 
   Standard_Boolean Value (const math_Vector& X,
-                                Standard_Real& F)
+                                Standard_Real& F) override
   {
     if (!CheckInputData(X(1)))
     {
@@ -150,7 +152,7 @@ public:
 
   
 
-  Standard_Integer NbVariables() const
+  Standard_Integer NbVariables() const override
   {
     return 1;
   }
@@ -190,7 +192,7 @@ public:
   }
 
   Standard_Boolean Value (const Standard_Real X,
-                                Standard_Real& F)
+                                Standard_Real& F) override
   {
     if (!CheckInputData(X))
     {
@@ -418,8 +420,8 @@ void BndLib_Box2dCurve::PerformBezier()
     return;
   }
   //
-  Standard_Integer i, aNbPoles;
-  Standard_Real aT1, aT2, aTb[2];
+  Standard_Integer i = 0, aNbPoles = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN, aTb[2];
   gp_Pnt2d aP2D;
   Handle(Geom2d_Geometry) aG;
   Handle(Geom2d_BezierCurve) aCBz, aCBzSeg;
@@ -466,8 +468,8 @@ void BndLib_Box2dCurve::PerformBSpline()
     return;
   }
   //
-  Standard_Integer i, aNbPoles;
-  Standard_Real  aT1, aT2, aTb[2];
+  Standard_Integer i = 0, aNbPoles = 0;
+  Standard_Real  aT1 = NAN, aT2 = NAN, aTb[2];
   gp_Pnt2d aP2D;
   Handle(Geom2d_Geometry) aG;
   Handle(Geom2d_BSplineCurve) aCBS, aCBSs;
@@ -516,8 +518,8 @@ void BndLib_Box2dCurve::PerformBSpline()
 //=======================================================================
 void BndLib_Box2dCurve::PerformOther()
 {
-  Standard_Integer j, aNb;
-  Standard_Real aT, dT;
+  Standard_Integer j = 0, aNb = 0;
+  Standard_Real aT = NAN, dT = NAN;
   gp_Pnt2d aP2D;
   //
   aNb=33;
@@ -537,7 +539,7 @@ void BndLib_Box2dCurve::PerformOther()
 //=======================================================================
 Standard_Integer BndLib_Box2dCurve::NbSamples()
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
   switch (myTypeBase) {
   case GeomAbs_BezierCurve: 
     {
@@ -644,10 +646,10 @@ void BndLib_Box2dCurve::PerformGenCurv(const Standard_Real Tol)
   Standard_Real DeflMax[2] = {-RealLast(), -RealLast()};
   //
   gp_Pnt2d P;
-  Standard_Integer i, k;
+  Standard_Integer i = 0, k = 0;
   Standard_Real du = (myT2 - myT1)/(Nu-1), du2 = du / 2.;
   NCollection_Array1<gp_XY> aPnts(1, Nu);
-  Standard_Real u;
+  Standard_Real u = NAN;
   for (i = 1, u = myT1; i <= Nu; i++, u += du)
   {
     D0(u,P);
@@ -703,7 +705,7 @@ void BndLib_Box2dCurve::PerformGenCurv(const Standard_Real Tol)
     {
       if(aPnts(i).Coord(k+1) - CMin < d)
       {
-        Standard_Real tmin, tmax;
+        Standard_Real tmin = NAN, tmax = NAN;
         tmin = myT1 + Max(0, i-2) * du;
         tmax = myT1 + Min(Nu-1, i) * du;
         Standard_Real cmin = AdjustExtr(tmin, tmax,
@@ -715,7 +717,7 @@ void BndLib_Box2dCurve::PerformGenCurv(const Standard_Real Tol)
       }
       else if(CMax - aPnts(i).Coord(k+1) < d)
       {
-        Standard_Real tmin, tmax;
+        Standard_Real tmin = NAN, tmax = NAN;
         tmin = myT1 + Max(0, i-2) * du;
         tmax = myT1 + Min(Nu-1, i) * du;
         Standard_Real cmax = AdjustExtr(tmin, tmax,
@@ -746,8 +748,8 @@ void BndLib_Box2dCurve::D0(const Standard_Real aU,
   myCurveBase->D1(aU, aP2D, aV1);
   //
   if (myOffsetFlag) {
-    Standard_Integer aIndex, aMaxDegree;
-    Standard_Real aA, aB, aR, aRes;
+    Standard_Integer aIndex = 0, aMaxDegree = 0;
+    Standard_Real aA = NAN, aB = NAN, aR = NAN, aRes = NAN;
     //
     aMaxDegree=9;
     aIndex = 2;
@@ -779,8 +781,8 @@ void BndLib_Box2dCurve::D0(const Standard_Real aU,
 //=======================================================================
 void BndLib_Box2dCurve::GetInfoBase()
 {
-  Standard_Boolean bIsTypeBase;
-  Standard_Integer  iTrimmed, iOffset;
+  Standard_Boolean bIsTypeBase = 0;
+  Standard_Integer  iTrimmed = 0, iOffset = 0;
   GeomAbs_CurveType aTypeB;
   Handle(Geom2d_Curve) aC2DB;
   Handle(Geom2d_TrimmedCurve) aCT2D;
@@ -809,7 +811,7 @@ void BndLib_Box2dCurve::GetInfoBase()
     //
     aCF2D=Handle(Geom2d_OffsetCurve)::DownCast(aC2DB);
     if (!aCF2D.IsNull()) {
-      Standard_Real aOffset;
+      Standard_Real aOffset = NAN;
       //
       aOffset=aCF2D->Offset();
       myOffsetBase=myOffsetBase+aOffset;
@@ -841,7 +843,7 @@ Standard_Boolean BndLib_Box2dCurve::IsTypeBase
   (const Handle(Geom2d_Curve)& aC2D,
    GeomAbs_CurveType& aTypeB)
 {
-  Standard_Boolean bRet; 
+  Standard_Boolean bRet = 0
   Handle(Standard_Type) aType;
   //
   bRet=Standard_True;
@@ -880,7 +882,7 @@ Standard_Boolean BndLib_Box2dCurve::IsTypeBase
 //=======================================================================
 void BndLib_Box2dCurve::PerformLineConic()
 {
-  Standard_Integer i, iInf[2];
+  Standard_Integer i = 0, iInf[2];
   Standard_Real  aTb[2];
   gp_Pnt2d aP2D;
   //
@@ -934,8 +936,8 @@ void BndLib_Box2dCurve::Compute(const Handle(Geom2d_Conic)& aConic2D,
                                const Standard_Real aT2,
                                Bnd_Box2d& aBox2D)
 {
-  Standard_Integer i, aNbT;
-  Standard_Real pT[10], aT, aTwoPI, dT, aEps;
+  Standard_Integer i = 0, aNbT = 0;
+  Standard_Real pT[10], aT = NAN, aTwoPI = NAN, dT = NAN, aEps = NAN;
   gp_Pnt2d aP2D;
   //
   aNbT=Compute(aConic2D, aType, pT);
@@ -987,9 +989,9 @@ Standard_Integer BndLib_Box2dCurve::Compute
    const GeomAbs_CurveType aType,
    Standard_Real *pT)
 {
-  Standard_Integer iRet, i, j;
-  Standard_Real aCosBt, aSinBt, aCosGm, aSinGm;
-  Standard_Real aLx, aLy;
+  Standard_Integer iRet = 0, i = 0, j = 0;
+  Standard_Real aCosBt = NAN, aSinBt = NAN, aCosGm = NAN, aSinGm = NAN;
+  Standard_Real aLx = NAN, aLy = NAN;
   //
   iRet=0;
   //
@@ -1053,8 +1055,8 @@ Standard_Integer BndLib_Box2dCurve::Compute
   }//if (aType==GeomAbs_Ellipse) {
   //
   else if (aType==GeomAbs_Parabola) {
-    Standard_Real aFc, aEps;
-    Standard_Real aA1, aA2;
+    Standard_Real aFc = NAN, aEps = NAN;
+    Standard_Real aA1 = NAN, aA2 = NAN;
     Handle(Geom2d_Parabola) aPR2D;
     //
     aEps=1.e-12;
@@ -1081,9 +1083,9 @@ Standard_Integer BndLib_Box2dCurve::Compute
   }// else if (aType==GeomAbs_Parabola) {
   //
   else if (aType==GeomAbs_Hyperbola) {
-    Standard_Integer k;
-    Standard_Real aR1, aR2
-    Standard_Real aEps, aB1, aB2, aB12, aB22, aZ, aD;
+    Standard_Integer k = 0;
+    Standard_Real aR1 = NAN, aR2 = NAN
+    Standard_Real aEps = NAN, aB1 = NAN, aB2 = NAN, aB12 = NAN, aB22 = NAN, aZ = NAN, aD = NAN;
     Handle(Geom2d_Hyperbola) aHP2D;
     //
     aEps=1.e-12;
@@ -1138,8 +1140,8 @@ Standard_Integer BndLib_Box2dCurve::Compute
 Standard_Real BndLib_Box2dCurve::AdjustToPeriod(const Standard_Real aT,
                                                const Standard_Real aPeriod)
 {
-  Standard_Integer k;
-  Standard_Real aTRet;
+  Standard_Integer k = 0;
+  Standard_Real aTRet = NAN;
   //
   aTRet=aT;
   if (aT<0.) {
@@ -1192,8 +1194,8 @@ void BndLib_Add2dCurve::Add(const Adaptor2d_Curve2d& aC,
   Adaptor2d_Curve2d *pC=(Adaptor2d_Curve2d *)&aC;
   Geom2dAdaptor_Curve *pA=dynamic_cast<Geom2dAdaptor_Curve*>(pC);
   if (!pA) {
-    Standard_Real U, DU;
-    Standard_Integer N, j;
+    Standard_Real U = NAN, DU = NAN;
+    Standard_Integer N = 0, j = 0;
     gp_Pnt2d P;
     N = 33;
     U  = aU1;
@@ -1221,7 +1223,7 @@ void BndLib_Add2dCurve::Add(const Handle(Geom2d_Curve)& aC2D,
                             const Standard_Real aTol,
                             Bnd_Box2d& aBox2D)
 {
-  Standard_Real aT1, aT2;
+  Standard_Real aT1 = NAN, aT2 = NAN;
   //
   aT1=aC2D->FirstParameter();
   aT2=aC2D->LastParameter();
index 5a763ddc4145920499f2ed5a73cf46432dd3b271..74c759f5c00d1da1b9600bec1849468979c4503c 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BndLib.hxx>
 #include <BndLib_Add3dCurve.hxx>
@@ -52,8 +54,8 @@ static void reduceSplineBox(const Adaptor3d_Curve& theCurve,
 {
   // Guaranteed bounding box based on poles of bspline.
   Bnd_Box aPolesBox;
-  Standard_Real aPolesXMin, aPolesYMin, aPolesZMin,
-                aPolesXMax, aPolesYMax, aPolesZMax;
+  Standard_Real aPolesXMin = NAN, aPolesYMin = NAN, aPolesZMin = NAN,
+                aPolesXMax = NAN, aPolesYMax = NAN, aPolesZMax = NAN;
 
   if (theCurve.GetType() == GeomAbs_BSplineCurve)
   {
@@ -83,7 +85,7 @@ static void reduceSplineBox(const Adaptor3d_Curve& theCurve,
   aPolesBox.Get(aPolesXMin, aPolesYMin, aPolesZMin,
                 aPolesXMax, aPolesYMax, aPolesZMax);
 
-  Standard_Real x, y, z, X, Y, Z;
+  Standard_Real x = NAN, y = NAN, z = NAN, X = NAN, Y = NAN, Z = NAN;
   theOrigBox.Get(x, y, z, X, Y, Z);
 
   // Left bound.
@@ -128,7 +130,7 @@ static Standard_Real FillBox(Bnd_Box& B, const Adaptor3d_Curve& C,
   C.D0(first,P1);  B.Add(P1);
   Standard_Real p = first, dp = last-first, tol= 0.;
   if(Abs(dp) > Precision::PConfusion()){
-    Standard_Integer i;
+    Standard_Integer i = 0;
     dp /= 2*N; 
     for(i = 1; i <= N; i++){
       p += dp;  C.D0(p,P2);  B.Add(P2);
@@ -225,12 +227,12 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C,
       }
       //OCC566(apo)->
       Bnd_Box B1;
-      Standard_Integer k, k1 = Bs->FirstUKnotIndex(), k2 = Bs->LastUKnotIndex(),
+      Standard_Integer k = 0, k1 = Bs->FirstUKnotIndex(), k2 = Bs->LastUKnotIndex(),
                        N = Bs->Degree(), NbKnots = Bs->NbKnots();
       TColStd_Array1OfReal Knots(1,NbKnots);
       Bs->Knots(Knots);
       GeomAdaptor_Curve GACurve(Bs);
-      Standard_Real first = Knots(k1), last;
+      Standard_Real first = Knots(k1), last = NAN;
       for(k = k1 + 1; k <= k2; k++){
        last = Knots(k); 
        tol = Max(FillBox(B1,GACurve,first,last,N), tol);
@@ -251,7 +253,7 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C,
       static Standard_Integer N = 33;
       tol = FillBox(B1,C,U1,U2,N);
       B1.Enlarge(weakness*tol);
-      Standard_Real x, y, z, X, Y, Z;
+      Standard_Real x = NAN, y = NAN, z = NAN, X = NAN, Y = NAN, Z = NAN;
       B1.Get(x, y, z, X, Y, Z);
       B.Update(x, y, z, X, Y, Z);
       B.Enlarge(Tol);
@@ -336,10 +338,10 @@ void BndLib_Add3dCurve::AddGenCurv(const Adaptor3d_Curve& C,
   Standard_Real DeflMax[3] = {-RealLast(), -RealLast(), -RealLast()};
   //
   gp_Pnt P;
-  Standard_Integer i, k;
+  Standard_Integer i = 0, k = 0;
   Standard_Real du = (UMax-UMin)/(Nu-1), du2 = du / 2.;
   NCollection_Array1<gp_XYZ> aPnts(1, Nu);
-  Standard_Real u;
+  Standard_Real u = NAN;
   for (i = 1, u = UMin; i <= Nu; i++, u += du)
   {
     C.D0(u,P);
@@ -396,7 +398,7 @@ void BndLib_Add3dCurve::AddGenCurv(const Adaptor3d_Curve& C,
     {
       if(aPnts(i).Coord(k+1) - CMin < d)
       {
-        Standard_Real umin, umax;
+        Standard_Real umin = NAN, umax = NAN;
         umin = UMin + Max(0, i-2) * du;
         umax = UMin + Min(Nu-1, i) * du;
         Standard_Real cmin = AdjustExtr(C, umin, umax,
@@ -408,7 +410,7 @@ void BndLib_Add3dCurve::AddGenCurv(const Adaptor3d_Curve& C,
       }
       else if(CMax - aPnts(i).Coord(k+1) < d)
       {
-        Standard_Real umin, umax;
+        Standard_Real umin = NAN, umax = NAN;
         umin = UMin + Max(0, i-2) * du;
         umax = UMin + Min(Nu-1, i) * du;
         Standard_Real cmax = AdjustExtr(C, umin, umax,
@@ -445,7 +447,7 @@ public:
   }
 
   Standard_Boolean Value (const math_Vector& X,
-                                Standard_Real& F)
+                                Standard_Real& F) override
   {
     if (!CheckInputData(X(1)))
     {
@@ -460,7 +462,7 @@ public:
 
   
 
-  Standard_Integer NbVariables() const
+  Standard_Integer NbVariables() const override
   {
     return 1;
   }
@@ -500,7 +502,7 @@ public:
   }
 
   Standard_Boolean Value (const Standard_Real X,
-                                Standard_Real& F)
+                                Standard_Real& F) override
   {
     if (!CheckInputData(X))
     {
@@ -600,7 +602,7 @@ Standard_Integer NbSamples(const Adaptor3d_Curve& C,
                            const Standard_Real Umin,
                            const Standard_Real Umax) 
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
   GeomAbs_CurveType Type = C.GetType();
   switch (Type) {
   case GeomAbs_BezierCurve: 
index b1ba162eac8164e91a94d180b479deb99b6da6ff..f1afaf909ba9f05ca4fabbc79fbf215aeb4ad653 100644 (file)
@@ -17,6 +17,8 @@
 //  Modified by skv - Fri Aug 27 12:29:04 2004 OCC6503
 
 #include <Adaptor3d_Surface.hxx>
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Bnd_Box.hxx>
 #include <BndLib.hxx>
@@ -87,7 +89,7 @@ void BndLib_AddSurface::Add(const Adaptor3d_Surface& S,
 
 static Standard_Integer NbUSamples(const Adaptor3d_Surface& S) 
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
   GeomAbs_SurfaceType Type = S.GetType();
   switch (Type) {
   case GeomAbs_BezierSurface: 
@@ -114,7 +116,7 @@ static Standard_Integer NbUSamples(const Adaptor3d_Surface& S)
 
 static Standard_Integer NbVSamples(const Adaptor3d_Surface& S) 
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
   GeomAbs_SurfaceType Type = S.GetType();
   switch (Type) {
   case GeomAbs_BezierSurface:
@@ -141,7 +143,7 @@ static gp_Pnt BaryCenter(const gp_Pln        &aPlane,
                         const Standard_Real  aVMin,
                         const Standard_Real  aVMax)
 {
-  Standard_Real aU, aV;
+  Standard_Real aU = NAN, aV = NAN;
   Standard_Boolean isU1Inf = Precision::IsInfinite(aUMin);
   Standard_Boolean isU2Inf = Precision::IsInfinite(aUMax);
   Standard_Boolean isV1Inf = Precision::IsInfinite(aVMin);
@@ -432,7 +434,7 @@ void BndLib_AddSurface::Add(const Adaptor3d_Surface& S,
         }
 
         // Use poles to build convex hull.
-        Standard_Integer ip, jp;
+        Standard_Integer ip = 0, jp = 0;
         for (Standard_Integer i = UMinIdx; i <= UMaxIdx; i++)
         {
           ip = i;
@@ -579,8 +581,8 @@ void BndLib_AddSurface::AddGenSurf(const Adaptor3d_Surface& S,
   Standard_Real du = (UMax-UMin)/(Nu-1), du2 = du / 2.;
   Standard_Real dv = (VMax-VMin)/(Nv-1), dv2 = dv / 2.;
   NCollection_Array2<gp_XYZ> aPnts(1, Nu, 1, Nv);
-  Standard_Real u, v;
-  Standard_Integer i, j, k;
+  Standard_Real u = NAN, v = NAN;
+  Standard_Integer i = 0, j = 0, k = 0;
   gp_Pnt P;
   for (i = 1, u = UMin; i <= Nu; i++, u += du){
     for (j = 1, v = VMin;j <= Nv; j++, v += dv){
@@ -664,7 +666,7 @@ void BndLib_AddSurface::AddGenSurf(const Adaptor3d_Surface& S,
       {
         if(aPnts(i,j).Coord(k+1) - CMin < d)
         {
-          Standard_Real umin, umax, vmin, vmax;
+          Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
           umin = UMin + Max(0, i-2) * du;
           umax = UMin + Min(Nu-1, i) * du;
           vmin = VMin + Max(0, j-2) * dv;
@@ -678,7 +680,7 @@ void BndLib_AddSurface::AddGenSurf(const Adaptor3d_Surface& S,
         }
         else if(CMax - aPnts(i,j).Coord(k+1) < d)
         {
-          Standard_Real umin, umax, vmin, vmax;
+          Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
           umin = UMin + Max(0, i-2) * du;
           umax = UMin + Min(Nu-1, i) * du;
           vmin = VMin + Max(0, j-2) * dv;
@@ -725,7 +727,7 @@ public:
     math_Vector X(1,2);
     X(1) = UMin;
     X(2) = (VMin + VMax) / 2.;
-    Standard_Real F1, F2;
+    Standard_Real F1 = NAN, F2 = NAN;
     Value(X, F1);
     X(1) = UMax;
     Value(X, F2);
@@ -741,7 +743,7 @@ public:
   }
 
   Standard_Boolean Value (const math_Vector& X,
-                                  Standard_Real& F)
+                                  Standard_Real& F) override
   {
     if (CheckInputData(X))
     {
@@ -750,7 +752,7 @@ public:
     }
     else
     {
-      Standard_Real UPen = 0., VPen = 0., u0, v0;
+      Standard_Real UPen = 0., VPen = 0., u0 = NAN, v0 = NAN;
       if(X(1) < myUMin)
       {
         UPen = myPenalty * (myUMin - X(1));
@@ -790,7 +792,7 @@ public:
 
   
 
-  Standard_Integer NbVariables() const
+  Standard_Integer NbVariables() const override
   {
     return 2;
   }
@@ -893,7 +895,7 @@ Standard_Integer NbUSamples(const Adaptor3d_Surface& S,
                             const Standard_Real Umin,
                             const Standard_Real Umax) 
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
   GeomAbs_SurfaceType Type = S.GetType();
   switch (Type) {
   case GeomAbs_BezierSurface: 
@@ -912,7 +914,7 @@ Standard_Integer NbUSamples(const Adaptor3d_Surface& S,
     {
       const Handle(Geom_BSplineSurface)& BS = S.BSpline();
       N = 2*(BS->UDegree() + 1)*(BS->NbUKnots() -1);
-      Standard_Real umin, umax, vmin, vmax;
+      Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
       BS->Bounds(umin, umax, vmin, vmax);
       Standard_Real du = (Umax - Umin) / (umax - umin);
       if(du < .9)
@@ -937,7 +939,7 @@ Standard_Integer NbVSamples(const Adaptor3d_Surface& S,
                             const Standard_Real Vmin,
                             const Standard_Real Vmax) 
 {
-  Standard_Integer N;
+  Standard_Integer N = 0;
   GeomAbs_SurfaceType Type = S.GetType();
   switch (Type) {
   case GeomAbs_BezierSurface:
@@ -956,7 +958,7 @@ Standard_Integer NbVSamples(const Adaptor3d_Surface& S,
     {
       const Handle(Geom_BSplineSurface)& BS = S.BSpline();
       N = 2*(BS->VDegree() + 1)*(BS->NbVKnots() - 1) ;
-      Standard_Real umin, umax, vmin, vmax;
+      Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
       BS->Bounds(umin, umax, vmin, vmax);
       Standard_Real dv = (Vmax - Vmin) / (vmax - vmin);
       if(dv < .9)
index 410f9bb92b9f7db5b2db4edcc95cc356e1951266..9b0b19c68af69c6b67e19290c2d9be9ff03d3a27 100644 (file)
@@ -38,10 +38,10 @@ IMPLEMENT_STANDARD_RTTIEXT(CDF_Application,CDM_Application)
 //function : 
 //purpose  : 
 //=======================================================================
-CDF_Application::CDF_Application():myRetrievableStatus(PCDM_RS_OK) 
+CDF_Application::CDF_Application():myDirectory(new CDF_Directory()), myMetaDataDriver(new CDF_FWOSDriver (MetaDataLookUpTable())), myRetrievableStatus(PCDM_RS_OK) 
 {
-  myDirectory      = new CDF_Directory();
-  myMetaDataDriver = new CDF_FWOSDriver (MetaDataLookUpTable());
+  
+  
 }
 
 //=======================================================================
index 78260c2245482c9c1818b14c2ce7eae1946c7cee..6896378d31e6a426bf8ca2056144f8e265319c0d 100644 (file)
@@ -33,9 +33,9 @@ CDF_Store::CDF_Store()
   myStatus(PCDM_SS_No_Obj)
 {
 }
-CDF_Store::CDF_Store(const Handle(CDM_Document)& aDocument):myHasSubComponents(Standard_False) {
+CDF_Store::CDF_Store(const Handle(CDM_Document)& aDocument):myMainDocument(aDocument), myHasSubComponents(Standard_False) {
+  
   
-  myMainDocument = aDocument;
   Init();
 }
 
index 372de7a81ce1fd7db33b79e38de81e1389d1a321..550db5e94b9ad917733e490798902e0a61699c7f 100644 (file)
@@ -138,7 +138,7 @@ private:
   Handle(CDM_Document) myMainDocument;
   Handle(CDM_Document) myCurrentDocument;
   Standard_Boolean myHasSubComponents;
-  Standard_Boolean myIsMainDocument;
+  Standard_Boolean myIsMainDocument{};
   TCollection_ExtendedString myPath;
   TCollection_ExtendedString myText;
   PCDM_StoreStatus myStatus;
index b1d91602aa95728865a7769f39f08e902d444b78..cf4d1070b1a7e94734a10663d376e29553160ead 100644 (file)
@@ -31,8 +31,8 @@ static void CAUGHT(const Standard_Failure& theException,TCollection_ExtendedStri
   status += theException.GetMessageString();
 }
 
-CDF_StoreList::CDF_StoreList(const Handle(CDM_Document)& aDocument) {
-  myMainDocument = aDocument;
+CDF_StoreList::CDF_StoreList(const Handle(CDM_Document)& aDocument) : myMainDocument(aDocument) {
+  
   Add(aDocument);
 }
 
index 1d842f5189cf3e79c1a0627451508f6686fde128..03db36bbe54a822d94b9cb0c35d25d82dbb8347e 100644 (file)
@@ -31,9 +31,9 @@ IMPLEMENT_STANDARD_RTTIEXT(CDM_Application,Standard_Transient)
 //function : Constructor
 //purpose  : 
 //=======================================================================
-CDM_Application::CDM_Application()
+CDM_Application::CDM_Application() : myMessenger(new Message_Messenger)
 {
-  myMessenger = new Message_Messenger;
+  
 }
 //=======================================================================
 //function : SetDocumentVersion
index 9efef9145323f315fc9daf7945959091ecb477d0..ce406ebcb4469de4774b194db28b38d404187290 100644 (file)
@@ -620,7 +620,7 @@ TCollection_ExtendedString CDM_Document::Folder() const {
 
 void CDM_Document::SetRequestedFolder(const TCollection_ExtendedString& aFolder)
 {
-  TCollection_ExtendedString f(aFolder);
+  const TCollection_ExtendedString& f(aFolder);
   if(f.Length() != 0) {
     myRequestedFolderIsDefined=Standard_True;
     myRequestedFolder=aFolder;
@@ -975,8 +975,8 @@ void CDM_Document::RemoveFromReference(const Standard_Integer aReferenceIdentifi
 //purpose  : 
 //=======================================================================
 
-TCollection_ExtendedString GetResource (const TCollection_ExtendedString aFormat,
-                                        const TCollection_ExtendedString anItem)
+TCollection_ExtendedString GetResource (const TCollection_ExtendedString& aFormat,
+                                        const TCollection_ExtendedString& anItem)
 {
   TCollection_ExtendedString theResource;
   theResource+= aFormat;
index 47e20540ad698de45ccd2deef085d0c4beeedb72..29c07760d7286a54bd983860d78c95a7de8e4ed0 100644 (file)
@@ -68,7 +68,7 @@ void CDM_Reference::Update(const Handle(CDM_MetaData)& aMetaData) {
 }
 
 Standard_Boolean CDM_Reference::IsUpToDate() const {
-  Standard_Integer theActualDocumentVersion;
+  Standard_Integer theActualDocumentVersion = 0;
   if(myToDocument.IsNull())
     theActualDocumentVersion=myMetaData->DocumentVersion(myApplication);
   else
@@ -78,7 +78,7 @@ Standard_Boolean CDM_Reference::IsUpToDate() const {
 }
 void CDM_Reference::SetIsUpToDate() {
   
-  Standard_Integer theActualDocumentVersion;
+  Standard_Integer theActualDocumentVersion = 0;
   if(myToDocument.IsNull())
     theActualDocumentVersion=myMetaData->DocumentVersion(myApplication);
   else
index bd6c7a6cdc8dab213312f543765c63b9295b72f0..4443dda4080fad3f4a278ac8bea1931d0a72e63a 100644 (file)
@@ -170,11 +170,11 @@ private:
 
 
 
-  Standard_Boolean myDone;
-  Standard_Real myL;
-  Standard_Real myParam;
-  Standard_Real myUMin;
-  Standard_Real myUMax;
+  Standard_Boolean myDone{};
+  Standard_Real myL{};
+  Standard_Real myParam{};
+  Standard_Real myUMin{};
+  Standard_Real myUMax{};
   CPnts_MyRootFunction myF;
 
 
index f7e14229359279c6e9d4a192c44c91f68f81066d..7550cd9ab98a403df8659e6fcfe46fa6fcf22c51 100644 (file)
@@ -38,6 +38,8 @@
 //   each iteration calculates at maximum 3 points
 //-------------------------------------------------------------------------
 
+#include <math.h>
+
 #include <Adaptor2d_Curve2d.hxx>
 #include <Adaptor3d_Curve.hxx>
 #include <CPnts_UniformDeflection.hxx>
@@ -87,8 +89,8 @@ void CPnts_UniformDeflection::Perform()
 {
   gp_Pnt P, P1, P2;
   gp_Vec V1, V2, VV;
-  Standard_Real Un1; 
-  Standard_Real NormD1, NormD2;
+  Standard_Real Un1 = NAN
+  Standard_Real NormD1 = NAN, NormD2 = NAN;
 
   myIPoint   = -1;
   myNbPoints = -1;
index 03b290745a5c22243ac4d0e05722568b03a622eb..11ae3ac326dc6b6fd0fa5bbd062833e0cb7cb4fb 100644 (file)
@@ -139,21 +139,21 @@ private:
   Standard_EXPORT void Perform();
 
 
-  Standard_Boolean myDone;
-  Standard_Boolean my3d;
-  Standard_Address myCurve;
-  Standard_Boolean myFinish;
-  Standard_Real myTolCur;
-  Standard_Boolean myControl;
-  Standard_Integer myIPoint;
-  Standard_Integer myNbPoints;
-  Standard_Real myParams[3];
+  Standard_Boolean myDone{};
+  Standard_Boolean my3d{};
+  Standard_Address myCurve{};
+  Standard_Boolean myFinish{};
+  Standard_Real myTolCur{};
+  Standard_Boolean myControl{};
+  Standard_Integer myIPoint{};
+  Standard_Integer myNbPoints{};
+  Standard_Real myParams[3]{};
   gp_Pnt myPoints[3];
-  Standard_Real myDwmax;
-  Standard_Real myDeflection;
-  Standard_Real myFirstParam;
-  Standard_Real myLastParam;
-  Standard_Real myDu;
+  Standard_Real myDwmax{};
+  Standard_Real myDeflection{};
+  Standard_Real myFirstParam{};
+  Standard_Real myLastParam{};
+  Standard_Real myDu{};
 
 
 };
index f526dd54984396e6666c6e912ab44359ec96a9dc..d09c30846fe5e908d83fe5d9c2a646978da46994 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <CSLib.hxx>
 #include <CSLib_NormalPolyDef.hxx>
 #include <gp.hxx>
@@ -177,7 +179,7 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
   Standard_Integer i=0,Order=-1;
   Standard_Boolean Trouve=Standard_False;
 //  theStatus = Singular;
-  Standard_Real Norme;
+  Standard_Real Norme = NAN;
   gp_Vec D;
   //Find k0 such that all derivatives N=dS/du ^ dS/dv are null
   //till order k0-1
@@ -236,11 +238,11 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
       }//end while
       if(!definie)
       {  //All lambda i exist
-         Standard_Integer SP;
-         Standard_Real inf,sup;
+         Standard_Integer SP = 0;
+         Standard_Real inf = NAN,sup = NAN;
          inf = 0.0 - M_PI;
          sup = 0.0 + M_PI;
-         Standard_Boolean FU,LU,FV,LV;
+         Standard_Boolean FU = 0,LU = 0,FV = 0,LV = 0;
 
          //Creation of the domain of definition depending on the position
          //of a single point (medium, border, corner).
@@ -377,7 +379,7 @@ gp_Vec CSLib::DNNUV(const Standard_Integer Nu,
                    const Standard_Integer Nv,
                    const TColgp_Array2OfVec& DerSurf)
 {
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   gp_Vec D(0,0,0),VG,VD,PV;
   for(i=0;i<=Nu;i++)
     for(j=0;j<=Nv;j++){
@@ -399,7 +401,7 @@ gp_Vec CSLib::DNNUV(const Standard_Integer Nu,
                    const TColgp_Array2OfVec& DerSurf1,
                    const TColgp_Array2OfVec& DerSurf2) 
 {
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   gp_Vec D(0,0,0),VG,VD,PV;
   for(i=0;i<=Nu;i++)
     for(j=0;j<=Nv;j++){
index 9bbe360eb8e423c1db93f0d477c0fec0e3bc26e6..8edcf5d8b659c67be45fbcba643151b9bc99f041 100644 (file)
@@ -16,6 +16,8 @@
 
 //#define No_Standard_OutOfRange
 
+#include <math.h>
+
 #include <CSLib_Class2d.hxx>
 #include <gp_Pnt2d.hxx>
 
@@ -51,8 +53,8 @@ void CSLib_Class2d::Init(const TCol_Containers2d& TP2d,
   //
   else
   {
-    Standard_Integer i, iLower;
-    Standard_Real du, dv, aPrc;
+    Standard_Integer i = 0, iLower = 0;
+    Standard_Real du = NAN, dv = NAN, aPrc = NAN;
     //
     aPrc = 1.e-10;
     N = TP2d.Length();
@@ -126,7 +128,7 @@ Standard_Integer CSLib_Class2d::SiDans(const gp_Pnt2d& P) const
     return 0;
   }
   //
-  Standard_Real x,y, aTolu, aTolv;
+  Standard_Real x = NAN,y = NAN, aTolu = NAN, aTolv = NAN;
   //
   x = P.X(); y = P.Y();
   aTolu=Tolu*(Umax-Umin);
@@ -168,7 +170,7 @@ Standard_Integer CSLib_Class2d::SiDans_OnMode(const gp_Pnt2d& P,
     return 0;
   }
   //
-  Standard_Real x,y, aTolu, aTolv;
+  Standard_Real x = NAN,y = NAN, aTolu = NAN, aTolv = NAN;
   //
   x = P.X(); y = P.Y();
   aTolu=Tol; 
@@ -200,8 +202,8 @@ Standard_Integer CSLib_Class2d::SiDans_OnMode(const gp_Pnt2d& P,
 Standard_Integer CSLib_Class2d::InternalSiDans(const Standard_Real Px,
                                               const Standard_Real Py) const
 { 
-  Standard_Integer nbc, i, ip1, SH, NH;
-  Standard_Real  x, y, nx, ny;
+  Standard_Integer nbc = 0, i = 0, ip1 = 0, SH = 0, NH = 0;
+  Standard_Real  x = NAN, y = NAN, nx = NAN, ny = NAN;
   //
   nbc = 0;
   i   = 0;
@@ -240,9 +242,9 @@ Standard_Integer CSLib_Class2d::InternalSiDans(const Standard_Real Px,
 Standard_Integer CSLib_Class2d::InternalSiDansOuOn(const Standard_Real Px,
                                                   const Standard_Real Py) const 
 { 
-  Standard_Integer nbc, i, ip1, SH, NH, iRet;
-  Standard_Real x, y, nx, ny, aX;
-  Standard_Real aYmin;
+  Standard_Integer nbc = 0, i = 0, ip1 = 0, SH = 0, NH = 0, iRet = 0;
+  Standard_Real x = NAN, y = NAN, nx = NAN, ny = NAN, aX = NAN;
+  Standard_Real aYmin = NAN;
   //
   nbc = 0;
   i   = 0;
index d5bc8187ed42139b020e83edc6c4e0abf9dde854..722d77e3d6e29b450d9cf92fe2ab00a1f8844352 100644 (file)
@@ -98,13 +98,13 @@ private:
   const CSLib_Class2d& operator= (const CSLib_Class2d& Other) const;
 
   NCollection_Handle <TColStd_Array1OfReal> MyPnts2dX, MyPnts2dY;
-  Standard_Real Tolu;
-  Standard_Real Tolv;
-  Standard_Integer N;
-  Standard_Real Umin;
-  Standard_Real Vmin;
-  Standard_Real Umax;
-  Standard_Real Vmax;
+  Standard_Real Tolu{};
+  Standard_Real Tolv{};
+  Standard_Integer N{};
+  Standard_Real Umin{};
+  Standard_Real Vmin{};
+  Standard_Real Umax{};
+  Standard_Real Vmax{};
 
 
 };
index 5104fbca9cdb04b114f126a0746644fb84f5a6da..ebe5c83dc4a2aaa36c7f507c528d8f0f8a9ea060 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <CSLib_NormalPolyDef.hxx>
 #include <PLib.hxx>
 
@@ -22,9 +24,9 @@
 CSLib_NormalPolyDef::CSLib_NormalPolyDef(const Standard_Integer k0,
                                                const TColStd_Array1OfReal& li)
 //=============================================================================
- :myTABli(0,k0)
+ :myK0(k0), myTABli(0,k0)
 {
-  myK0=k0;
+  
   for(Standard_Integer i=0;i<=k0;i++)
     myTABli(i)=li(i);
 }
@@ -35,7 +37,7 @@ Standard_Boolean CSLib_NormalPolyDef::Value(const Standard_Real X,
 //=============================================================================
 {
   F=0.0;
-  Standard_Real co,si;
+  Standard_Real co = NAN,si = NAN;
   co=cos(X);
   si=sin(X);
 
@@ -56,7 +58,7 @@ Standard_Boolean CSLib_NormalPolyDef::Derivative(const Standard_Real X,
 //=============================================================================
 {
   D=0.0;
-  Standard_Real co,si;
+  Standard_Real co = NAN,si = NAN;
   co=cos(X);
   si=sin(X);
   if(Abs(co) <= RealSmall() || Abs(si) <= RealSmall())
@@ -78,7 +80,7 @@ Standard_Boolean CSLib_NormalPolyDef::Values(const Standard_Real X,
 {
   F=0;
   D=0;
-  Standard_Real co,si;
+  Standard_Real co = NAN,si = NAN;
   co=cos(X);
   si=sin(X);
   if(Abs(co) <= RealSmall() || Abs(si) <= RealSmall())
index 254467a8ac8109c7e201950c83325064746d12e9..9990b12da51515a3e263cb18c775a7e8fc92b0ce 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Contap_ArcFunction.hxx>
 #include <Contap_HContTool.hxx>
 #include <Contap_HCurve2dTool.hxx>
@@ -34,9 +36,9 @@ myCosAng(0.0)
 void Contap_ArcFunction::Set(const Handle(Adaptor3d_Surface)& S)
 {
   mySurf = S;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer nbs = Contap_HContTool::NbSamplePoints(S);
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
   //  gp_Vec d1u,d1v;
   gp_Vec norm;
   if (nbs > 0) {
index 9e684fbded5a88b1607bf8b009db625a13dd7d8b..e88d5a96c672e3ba601f1603aaf11014cb2ce42b 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Contap_ContAna.hxx>
 #include <gp_Cone.hxx>
 #include <gp_Cylinder.hxx>
@@ -163,7 +165,7 @@ void Contap_ContAna::Perform (const gp_Cylinder& C,
     // and sinus to the solutions are obtained.
 
     prm = Sqrt(norm1 - Coefcst*Coefcst);
-    Standard_Real cost0,sint0,cost1,sint1;
+    Standard_Real cost0 = NAN,sint0 = NAN,cost1 = NAN,sint1 = NAN;
 
     cost0 = (Coefcos*Coefcst - Coefsin*prm)/norm1;
     cost1 = (Coefcos*Coefcst + Coefsin*prm)/norm1;
@@ -252,7 +254,7 @@ void Contap_ContAna::Perform (const gp_Cone& C,
     // and sinus to the solutions are obtained.
 
     prm = Sqrt(norm1 - Coefcst*Coefcst);
-    Standard_Real cost0,sint0,cost1,sint1;
+    Standard_Real cost0 = NAN,sint0 = NAN,cost1 = NAN,sint1 = NAN;
 
     cost0 = (Coefcos*Coefcst - Coefsin*prm)/norm1;
     cost1 = (Coefcos*Coefcst + Coefsin*prm)/norm1;
@@ -314,7 +316,7 @@ void Contap_ContAna::Perform (const gp_Cone& C,
     // and sinus to the solutions are obtained.
 
     prm = Sqrt(norm1 - Coefcst*Coefcst);
-    Standard_Real cost0,sint0,cost1,sint1;
+    Standard_Real cost0 = NAN,sint0 = NAN,cost1 = NAN,sint1 = NAN;
 
     cost0 = (Coefcos*Coefcst - Coefsin*prm)/norm1;
     cost1 = (Coefcos*Coefcst + Coefsin*prm)/norm1;
@@ -346,7 +348,7 @@ void Contap_ContAna::Perform (const gp_Cone& C,
     pt4 = pt3;
 
     prm = Sqrt(norm1 - Coefcst*Coefcst);
-    Standard_Real cost0,sint0,cost1,sint1;
+    Standard_Real cost0 = NAN,sint0 = NAN,cost1 = NAN,sint1 = NAN;
 
     cost0 = (Coefcos*Coefcst - Coefsin*prm)/norm1;
     cost1 = (Coefcos*Coefcst + Coefsin*prm)/norm1;
@@ -416,7 +418,7 @@ void Contap_ContAna::Perform (const gp_Cone& C,
     // and sinus to the solutions are obtained.
 
     prm = Sqrt(norm1 - Coefcst*Coefcst);
-    Standard_Real cost0,sint0,cost1,sint1;
+    Standard_Real cost0 = NAN,sint0 = NAN,cost1 = NAN,sint1 = NAN;
 
     cost0 = (Coefcos*Coefcst - Coefsin*prm)/norm1;
     cost1 = (Coefcos*Coefcst + Coefsin*prm)/norm1;
index 90a00e7779611c390578c4fe93018f0a705d6ca5..428c52bf5dd085895c0a182448dd05cd9d5eb9d4 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Adaptor3d_HSurfaceTool.hxx>
 #include <Adaptor3d_TopolTool.hxx>
@@ -236,10 +238,10 @@ static void ProcessSegments (const Contap_TheSearch&,
 static void Recadre(const Handle(Adaptor3d_Surface)& myHS1,
                     Standard_Real& u1,
                     Standard_Real& v1) { 
-                      Standard_Real f,l,lmf;
+                      Standard_Real f = NAN,l = NAN,lmf = NAN;
                       GeomAbs_SurfaceType typs1 = myHS1->GetType();
 
-                      Standard_Boolean myHS1IsUPeriodic,myHS1IsVPeriodic;
+                      Standard_Boolean myHS1IsUPeriodic = 0,myHS1IsVPeriodic = 0;
                       switch (typs1) { 
   case GeomAbs_Cylinder:
   case GeomAbs_Cone:
@@ -288,7 +290,7 @@ static void LineConstructor(Contap_TheSequenceOfLine& slin,
                               Contap_IType typl = L.TypeContour();
                               //-- std::cout<<"\n ----------- Ligne Constructor "<<std::endl;
                               if(typl == Contap_Walking) { 
-                                Standard_Real u1,v1,u2,v2;
+                                Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
                                 Standard_Integer nbvtx = L.NbVertex();
                                 //-- std::cout<<" WLine -> "<<nbvtx<<" vtx"<<std::endl;
                                 for(Standard_Integer i=1;i<nbvtx;i++) { 
@@ -330,7 +332,7 @@ static void LineConstructor(Contap_TheSequenceOfLine& slin,
                                 }
                               }
                               else if(typl==Contap_Lin) { 
-                                Standard_Real u2,v2;// u1,v1;
+                                Standard_Real u2 = NAN,v2 = NAN;// u1,v1;
                                 Standard_Integer nbvtx = L.NbVertex();
                                 //-- std::cout<<" Lin -> "<<nbvtx<<" vtx"<<std::endl;
                                 for(Standard_Integer i=1;i<nbvtx;i++) { 
@@ -369,7 +371,7 @@ static void LineConstructor(Contap_TheSequenceOfLine& slin,
                                 }
                               }
                               else if(typl==Contap_Circle) { 
-                                Standard_Real u2,v2; //u1,v1,
+                                Standard_Real u2 = NAN,v2 = NAN; //u1,v1,
                                 Standard_Integer nbvtx = L.NbVertex();
                                 //-- std::cout<<" Circ -> "<<nbvtx<<" vtx"<<std::endl;
                                 Standard_Boolean novtx = Standard_True;
@@ -472,10 +474,10 @@ static void KeepInsidePoints(const Contap_TheSearchInside& solins,
 
 {
   Standard_Integer Nba = solrst.NbSegments();
-  Standard_Integer Nbp,indp,inda;
-  Standard_Real U,V,paramproj;
+  Standard_Integer Nbp = 0,indp = 0,inda = 0;
+  Standard_Real U = NAN,V = NAN,paramproj = NAN;
   gp_Pnt2d toproj,Ptproj;
-  Standard_Boolean projok,tokeep;
+  Standard_Boolean projok = 0,tokeep = 0;
   const Handle(Adaptor3d_Surface)& Surf = Func.Surface();
 
   Nbp = solins.NbPoints();
@@ -509,14 +511,14 @@ static void ComputeTangency (const Contap_TheSearch& solrst,
                              TColStd_Array1OfInteger& Destination)
 {
 
-  Standard_Integer i,k;
+  Standard_Integer i = 0,k = 0;
   Standard_Integer NbPoints = solrst.NbPoints();
   Standard_Integer seqlength = 0;
 
-  Standard_Real theparam,test;
-  Standard_Boolean fairpt;
+  Standard_Real theparam = NAN,test = NAN;
+  Standard_Boolean fairpt = 0;
   TopAbs_Orientation arcorien,vtxorien;
-  Standard_Boolean ispassing;
+  Standard_Boolean ispassing = 0;
 
   math_Vector X(1, 2);
   math_Vector F(1, 1);
@@ -545,7 +547,7 @@ static void ComputeTangency (const Contap_TheSearch& solrst,
         SurUneRestrictionSolution==Standard_False && restriction<=solrst.NbSegments(); 
         restriction++) { 
           const Handle(Adaptor2d_Curve2d)& thearcsol = solrst.Segment(restriction).Curve();
-          Standard_Real  paramproj;
+          Standard_Real  paramproj = NAN;
           gp_Pnt2d       pproj;
           Standard_Boolean projok = Contap_HContTool::Project(thearcsol,Ptoproj,paramproj,pproj);
           if(projok) { 
@@ -804,7 +806,7 @@ IntSurf_TypeTrans ComputeTransitionOnLine(Contap_SurfFunction& SFunc,
   //--   Calcul de la tangente dans l espace uv        ---
   //------------------------------------------------------
 
-  Standard_Real det,d1uT,d1vT,normu2,normv2,d1ud1v,alpha,beta;
+  Standard_Real det = NAN,d1uT = NAN,d1vT = NAN,normu2 = NAN,normv2 = NAN,d1ud1v = NAN,alpha = NAN,beta = NAN;
   d1uT = d1u.Dot(tgline);
   d1vT = d1v.Dot(tgline);
   normu2 = d1u.Dot(d1u);
@@ -824,7 +826,7 @@ IntSurf_TypeTrans ComputeTransitionOnLine(Contap_SurfFunction& SFunc,
   //--  pour le contour apparent                       --
   //-----------------------------------------------------
 
-  Standard_Real v1,v2;
+  Standard_Real v1 = NAN,v2 = NAN;
   math_Vector X(1,2);
   math_Matrix Df(1,1,1,2);
   X(1) = u;
@@ -859,17 +861,17 @@ void ProcessSegments (const Contap_TheSearch& solrst,
                       const Handle(Adaptor3d_TopolTool)& Domain)
 
 {     
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
   Standard_Integer nbedg = solrst.NbSegments();
-  Standard_Integer Nblines,Nbpts;
+  Standard_Integer Nblines = 0,Nbpts = 0;
 
   Handle(Adaptor2d_Curve2d) arcRef;
   Contap_Point ptvtx;
 
   Contap_ThePathPointOfTheSearch PStartf,PStartl;
 
-  Standard_Boolean dofirst,dolast,procf,procl;
-  Standard_Real paramf =0.,paraml =0.,U;
+  Standard_Boolean dofirst = 0,dolast = 0,procf = 0,procl = 0;
+  Standard_Real paramf =0.,paraml =0.,U = NAN;
   Contap_Line theline;
 
   gp_Vec tgline;//,norm1,norm2;
@@ -1008,13 +1010,13 @@ void ComputeInternalPointsOnRstr
   // 2eme etape : localisation de la solution par dichotomie
 
 
-  Standard_Integer indexinf,indexsup,i;
+  Standard_Integer indexinf = 0,indexsup = 0,i = 0;
   gp_Vec tgt, vecref, vectest, vtestb, vecregard,d1u,d1v;
   gp_Pnt pcour;
   gp_Pnt2d p2d;
   gp_Vec2d d2d;
-  Standard_Boolean found,ok = Standard_False,toutvu,solution;
-  Standard_Real paramp = 0.,paraminf,paramsup,toler;
+  Standard_Boolean found = 0,ok = Standard_False,toutvu = 0,solution = 0;
+  Standard_Real paramp = 0.,paraminf = NAN,paramsup = NAN,toler = NAN;
 
   if (Line.TypeContour() != Contap_Restriction) {
     return;
@@ -1156,11 +1158,11 @@ void ComputeInternalPoints
   // 2eme etape : localisation de la solution par simili dichotomie
 
 
-  Standard_Integer indexinf,indexsup,index;
+  Standard_Integer indexinf = 0,indexsup = 0,index = 0;
   gp_Vec tgt, vecref, vectest, vtestb, vecregard;
   //gp_Pnt pprec,pcour;
-  Standard_Boolean found,ok = Standard_False,toutvu,solution;
-  Standard_Real paramp = 0.,U,V;
+  Standard_Boolean found = 0,ok = Standard_False,toutvu = 0,solution = 0;
+  Standard_Real paramp = 0.,U = NAN,V = NAN;
 
   math_Vector XInf(1,2),XSup(1,2),X(1,2),F(1,1);
   math_Matrix DF(1,1,1,2);
@@ -1328,7 +1330,7 @@ void ComputeInternalPoints
             }
           }
 
-          Standard_Integer v;
+          Standard_Integer v = 0;
           if (!newpoint) {
             // on est sur un point de cheminement. On regarde alors
             // la correspondance avec un vertex existant.
@@ -1368,15 +1370,15 @@ void Contap_Contour::Perform
   done = Standard_False;
   slin.Clear();
 
-  Standard_Integer i,j,k,Nbvt1,Nbvt2,ivt1,ivt2;
-  Standard_Integer NbPointRst,NbPointIns;
-  Standard_Integer Nblines, Nbpts, indfirst, indlast;
-  Standard_Real U,V;
+  Standard_Integer i = 0,j = 0,k = 0,Nbvt1 = 0,Nbvt2 = 0,ivt1 = 0,ivt2 = 0;
+  Standard_Integer NbPointRst = 0,NbPointIns = 0;
+  Standard_Integer Nblines = 0, Nbpts = 0, indfirst = 0, indlast = 0;
+  Standard_Real U = NAN,V = NAN;
   gp_Pnt2d pt2d;
   gp_Vec2d d2d;
   gp_Pnt ptonsurf;
   gp_Vec d1u,d1v,normale,tgtrst,tgline;
-  Standard_Real currentparam;
+  Standard_Real currentparam = NAN;
   IntSurf_Transition TLine,TArc;
 
   Contap_Line theline;
@@ -1418,7 +1420,7 @@ void Contap_Contour::Perform
   else { 
     BndLib_AddSurface::Add (*Surf, 1e-8, B1);
   }
-  Standard_Real x0,y0,z0,x1,y1,z1,dx,dy,dz;
+  Standard_Real x0 = NAN,y0 = NAN,z0 = NAN,x1 = NAN,y1 = NAN,z1 = NAN,dx = NAN,dy = NAN,dz = NAN;
   if(Box1OK) { 
     B1.Get(x0,y0,z0,x1,y1,z1);
     dx=x1-x0;
@@ -1481,7 +1483,7 @@ void Contap_Contour::Perform
     }
 
     if(bKeepAllPoints) {
-      Standard_Integer Nbp = solins.NbPoints(), indp;
+      Standard_Integer Nbp = solins.NbPoints(), indp = 0;
       for (indp=1; indp <= Nbp; indp++) {
         const IntSurf_InteriorPoint& pti = solins.Value(indp);
         seqpins.Append(pti);
@@ -1667,14 +1669,14 @@ void Contap_Contour::Perform
         for (ivt1=1; ivt1<=Nbvt1; ivt1++) {
           Contap_Point& ptvt = theli.Vertex(ivt1);
           if (!ptvt.IsOnArc() && !ptvt.IsMultiple()) {
-            Standard_Real Up,Vp;
+            Standard_Real Up = NAN,Vp = NAN;
             ptvt.Parameters(Up,Vp);
             gp_Pnt2d toproj(Up,Vp);
-            Standard_Boolean projok;
+            Standard_Boolean projok = 0;
             for (k=1; k<=Nblines;k++) {
               if (slin(k).TypeContour() == Contap_Restriction) {
                 const Handle(Adaptor2d_Curve2d)& thearc = slin(k).Arc();
-                Standard_Real paramproj;
+                Standard_Real paramproj = NAN;
                 gp_Pnt2d Ptproj;
                 projok = Contap_HContTool::Project(thearc,toproj,paramproj,Ptproj);
 
@@ -1745,7 +1747,7 @@ static Standard_Boolean FindLine(Contap_Line& Line,
   //  Standard_Integer i;
   gp_Pnt pt,ptmin;
   gp_Vec tg;
-  Standard_Real para,dist;
+  Standard_Real para = NAN,dist = NAN;
   Standard_Real dismin = RealLast();
 
   Contap_SurfProps::Normale(Surf,Pt2d.X(),Pt2d.Y(),Ptref,Norm);
@@ -1782,13 +1784,13 @@ static void PutPointsOnLine (const Contap_TheSearch& solrst,
                              Contap_TheSequenceOfLine& slin)
 
 {
-  Standard_Integer i,l;//,index; 
+  Standard_Integer i = 0,l = 0;//,index; 
   Standard_Integer NbPoints = solrst.NbPoints();
 
-  Standard_Real theparam;
+  Standard_Real theparam = NAN;
 
   IntSurf_Transition TLine,TArc;
-  Standard_Boolean goon;
+  Standard_Boolean goon = 0;
 
   gp_Pnt2d pt2d;
   gp_Vec2d d2d;
@@ -1924,7 +1926,7 @@ void Contap_Contour::PerformAna(const Handle(Adaptor3d_TopolTool)& Domain)
 
   Standard_Real TolArc = 1.e-5;
 
-  Standard_Integer nbCont, nbPointRst, i;
+  Standard_Integer nbCont = 0, nbPointRst = 0, i = 0;
   //gp_Circ cirsol;
   //gp_Lin linsol;
   Contap_ContAna contana;
index b7c9cb38da986425938653b7f09fa0bf8b68d6f9..04cbffb38660ef8f06b405ce4fca54d1a86fc4a3 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_HVertex.hxx>
 #include <Contap_HContTool.hxx>
 #include <Extrema_EPCOfExtPC2d.hxx>
@@ -29,7 +31,7 @@ Standard_Integer Contap_HContTool::NbSamplesV
  const Standard_Real ,
  const Standard_Real )
 {
-  Standard_Integer nbs;
+  Standard_Integer nbs = 0;
   GeomAbs_SurfaceType typS = S->GetType();
   switch(typS) { 
   case GeomAbs_Plane:
@@ -76,7 +78,7 @@ Standard_Integer Contap_HContTool::NbSamplesU
  const Standard_Real ,
  const Standard_Real )
 {
-  Standard_Integer nbs;
+  Standard_Integer nbs = 0;
   GeomAbs_SurfaceType typS = S->GetType();
   switch(typS) { 
   case GeomAbs_Plane:
@@ -266,7 +268,7 @@ Standard_Boolean Contap_HContTool::Project (const Handle(Adaptor2d_Curve2d)& C,
   Standard_Real epsX = 1.e-8;
   Standard_Integer Nbu = 20;
   Standard_Real Tol = 1.e-5;
-  Standard_Real Dist2;
+  Standard_Real Dist2 = NAN;
 
   Extrema_EPCOfExtPC2d extrema (P, *C, Nbu, epsX, Tol);
   if (!extrema.IsDone()) {
index f8130a6f6859f5fac16044b089808039e15dd6b4..a2efd9f60648219eff4b8036875e5977beaccb41 100644 (file)
@@ -23,9 +23,9 @@
 #include <IntSurf_LineOn2S.hxx>
 #include <Standard_DomainError.hxx>
 
-Contap_Line::Contap_Line () {
-  svtx = new Contap_TheHSequenceOfPoint ();
-  Trans = IntSurf_Undecided;
+Contap_Line::Contap_Line () : svtx(new Contap_TheHSequenceOfPoint ()), Trans(IntSurf_Undecided) {
+  
+  
 }
 
 void Contap_Line::ResetSeqOfVertex() {
index 4c5aeb63af240200d1080645ae82e532b3e0079e..c435d8835f649cf86e014ea88238a1db79132a8a 100644 (file)
@@ -107,7 +107,7 @@ private:
   gp_Pnt pt;
   gp_Dir dir1;
   gp_Dir dir2;
-  Standard_Real rad;
+  Standard_Real rad{};
 
 
 };
index 4d2fadd9af716d36cf4d98b47bf1831c35f7801c..b37940c2543f738916cb1eb255f87a4269d0bd6a 100644 (file)
@@ -16,6 +16,8 @@
 
 // jag 940616 Tolpetit = 1.e-16
 
+#include <math.h>
+
 #include <Adaptor3d_HSurfaceTool.hxx>
 #include <Contap_HContTool.hxx>
 #include <Contap_SurfFunction.hxx>
@@ -47,9 +49,9 @@ Contap_SurfFunction::Contap_SurfFunction ():
 void Contap_SurfFunction::Set(const Handle(Adaptor3d_Surface)& S)
 {
   mySurf = S;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer nbs = Contap_HContTool::NbSamplePoints(S);
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
   gp_Vec norm;
   if (nbs > 0) {
     myMean = 0.;
index 1890f698bd2a2cbfe00d7ecd6e07cb3d91d45d11..190bbaad7d7c1816f4f8a6519d40eaddb9ab7d62 100644 (file)
@@ -14,6 +14,8 @@
 
 //JCV 16/10/91
 
+#include <math.h>
+
 #include <Convert_CircleToBSplineCurve.hxx>
 #include <gp.hxx>
 #include <gp_Ax2d.hxx>
@@ -49,10 +51,10 @@ Convert_CircleToBSplineCurve::Convert_CircleToBSplineCurve
   (const gp_Circ2d& C, const Convert_ParameterisationType Parameterisation)
 :Convert_ConicToBSplineCurve(0,0,0){
 
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
 
-  Standard_Real R,
-  value ;
+  Standard_Real R = NAN,
+  value = NAN ;
   Handle(TColStd_HArray1OfReal) CosNumeratorPtr,
   SinNumeratorPtr ;
 
@@ -133,8 +135,8 @@ Convert_CircleToBSplineCurve::Convert_CircleToBSplineCurve
     throw Standard_DomainError( "Convert_CircleToBSplineCurve");
   }
 
-  Standard_Integer ii;
-  Standard_Real R, value ;
+  Standard_Integer ii = 0;
+  Standard_Real R = NAN, value = NAN ;
   Handle(TColStd_HArray1OfReal) CosNumeratorPtr,SinNumeratorPtr ;
 
 
index 9582478e01ddffd3fde97b9d17487bafb1b215e8..72b1b02cdce6226452350028ffa6e6fb7794cc0c 100644 (file)
@@ -93,7 +93,7 @@ const {
 void  Convert_CompBezierCurves2dToBSplineCurve2d::Poles
   (TColgp_Array1OfPnt2d& Poles) const
 {
-  Standard_Integer i, Lower = Poles.Lower(), Upper = Poles.Upper();
+  Standard_Integer i = 0, Lower = Poles.Lower(), Upper = Poles.Upper();
   Standard_Integer k = 1;
   for (i = Lower; i <= Upper; i++) {
     Poles(i) = CurvePoles(k++);
@@ -121,7 +121,7 @@ void  Convert_CompBezierCurves2dToBSplineCurve2d::KnotsAndMults
   (TColStd_Array1OfReal&    Knots, 
    TColStd_Array1OfInteger& Mults ) const
 {
-  Standard_Integer i, LowerK = Knots.Lower(), UpperK = Knots.Upper();
+  Standard_Integer i = 0, LowerK = Knots.Lower(), UpperK = Knots.Upper();
   Standard_Integer LowerM = Mults.Lower(), UpperM = Mults.Upper();
   Standard_Integer k = 1;
   for (i = LowerK; i <= UpperK; i++) {
@@ -154,7 +154,7 @@ void Convert_CompBezierCurves2dToBSplineCurve2d::Perform()
 //  Standard_Integer NbKnotsSpl = NbrCurv + 1 ;
   TColStd_Array1OfReal     CurveKnVals         (1,NbrCurv);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   myDegree = 0;
   for ( i = 1; i <= mySequence.Length(); i++) {
     myDegree = Max( myDegree, (mySequence(i))->Length() -1);
@@ -162,7 +162,7 @@ void Convert_CompBezierCurves2dToBSplineCurve2d::Perform()
 
   Standard_Real Det=0;
   gp_Pnt2d P1, P2, P3;
-  Standard_Integer Deg, Inc, MaxDegree = myDegree;
+  Standard_Integer Deg = 0, Inc = 0, MaxDegree = myDegree;
   TColgp_Array1OfPnt2d Points(1, myDegree+1);
 
   for (i = LowerI ; i <= UpperI ; i++) {
index 7201ac59ad0538c4a9bd8d12251501ab27975f5b..8fc8a0d20ec8d9eb1ebd0859019fbdd78ef06ab1 100644 (file)
@@ -184,7 +184,7 @@ private:
   TColgp_SequenceOfPnt2d CurvePoles;
   TColStd_SequenceOfReal CurveKnots;
   TColStd_SequenceOfInteger KnotsMultiplicities;
-  Standard_Integer myDegree;
+  Standard_Integer myDegree{};
   Standard_Real myAngular;
   Standard_Boolean myDone;
 
index 8e90f10df9442ec1f428c1c2e72fa472df701fc6..e03e5ec3c65bd113bed81a93a548d2a766519259 100644 (file)
@@ -92,7 +92,7 @@ Standard_Integer  Convert_CompBezierCurvesToBSplineCurve::NbPoles() const
 void  Convert_CompBezierCurvesToBSplineCurve::Poles
   (TColgp_Array1OfPnt& Poles) const
 {
-  Standard_Integer i, Lower = Poles.Lower(), Upper = Poles.Upper();
+  Standard_Integer i = 0, Lower = Poles.Lower(), Upper = Poles.Upper();
   Standard_Integer k = 1;
   for (i = Lower; i <= Upper; i++) {
     Poles(i) = CurvePoles(k++);
@@ -120,7 +120,7 @@ void  Convert_CompBezierCurvesToBSplineCurve::KnotsAndMults
   (TColStd_Array1OfReal&    Knots, 
    TColStd_Array1OfInteger& Mults ) const
 {
-  Standard_Integer i, LowerK = Knots.Lower(), UpperK = Knots.Upper();
+  Standard_Integer i = 0, LowerK = Knots.Lower(), UpperK = Knots.Upper();
   Standard_Integer LowerM = Mults.Lower(), UpperM = Mults.Upper();
   Standard_Integer k = 1;
   for (i = LowerK; i <= UpperK; i++) {
@@ -151,7 +151,7 @@ void Convert_CompBezierCurvesToBSplineCurve::Perform()
 //  Standard_Integer NbKnotsSpl = NbrCurv + 1 ;
   TColStd_Array1OfReal     CurveKnVals         (1,NbrCurv);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   myDegree = 0;
   for ( i = 1; i <= mySequence.Length(); i++) {
     myDegree = Max( myDegree, (mySequence(i))->Length() -1);
@@ -159,7 +159,7 @@ void Convert_CompBezierCurvesToBSplineCurve::Perform()
 
   Standard_Real Det=0;
   gp_Pnt P1, P2, P3;
-  Standard_Integer Deg, Inc, MaxDegree = myDegree;
+  Standard_Integer Deg = 0, Inc = 0, MaxDegree = myDegree;
   TColgp_Array1OfPnt Points(1, myDegree+1);
 
   for (i = LowerI ; i <= UpperI ; i++) {
index adeb2ee59927b88fc28b60132e832610a16e50d4..2553ac5a6c440a2787e5d9ace3b63062b9f59640 100644 (file)
@@ -190,7 +190,7 @@ private:
   TColgp_SequenceOfPnt CurvePoles;
   TColStd_SequenceOfReal CurveKnots;
   TColStd_SequenceOfInteger KnotsMultiplicities;
-  Standard_Integer myDegree;
+  Standard_Integer myDegree{};
   Standard_Real myAngular;
   Standard_Boolean myDone;
 
index 8d0043c45324724e799259f4aa79c49fa14090c6..21daece8dcb727e920a117c7ddfef7f71797b9fd 100644 (file)
@@ -25,6 +25,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <Convert_CompPolynomialToPoles.hxx>
 #include <PLib.hxx>
@@ -49,7 +51,7 @@ Convert_CompPolynomialToPoles::Convert_CompPolynomialToPoles(
     const Handle(TColStd_HArray1OfReal)&    TrueIntervals)
      : myDone(Standard_False) 
 {
- Standard_Integer ii, delta;
+ Standard_Integer ii = 0, delta = 0;
  if (NumCurves <= 0               ||
      NumCoeffPerCurve.IsNull()    ||
      Coefficients.IsNull()        ||
@@ -77,7 +79,7 @@ Convert_CompPolynomialToPoles::Convert_CompPolynomialToPoles(
 //
 //  prepare output
 //
- Standard_Integer Tindex, multiplicities ;
+ Standard_Integer Tindex = 0, multiplicities = 0 ;
 
  myKnots = 
  new TColStd_HArray1OfReal(1, NumCurves + 1) ;
@@ -111,7 +113,7 @@ Convert_CompPolynomialToPoles(const Standard_Integer NumCurves,
                              const TColStd_Array1OfReal& TrueIntervals)
                               : myDone(Standard_False) 
 {
- Standard_Integer ii, delta;
+ Standard_Integer ii = 0, delta = 0;
  if (NumCurves <= 0               ||
      MaxDegree  <= 0              ||
      Dimension  <= 0              ||
@@ -130,7 +132,7 @@ Convert_CompPolynomialToPoles(const Standard_Integer NumCurves,
 //
 //  prepare output
 //
- Standard_Integer Tindex ;
+ Standard_Integer Tindex = 0 ;
 
  myKnots = 
  new TColStd_HArray1OfReal(1, NumCurves + 1) ;
@@ -209,16 +211,16 @@ Perform(const Standard_Integer NumCurves,
        const TColStd_Array2OfReal& PolynomialIntervals,
        const TColStd_Array1OfReal& TrueIntervals)
 {
- Standard_Integer ii, 
- num_flat_knots,
- index, Tindex, Pindex,
- coeff_index,
- inversion_problem,
- poles_index,
- num_poles ;
- Standard_Real normalized_value,
- *coefficient_array,
- *poles_array ;
+ Standard_Integer ii = 0
+ num_flat_knots = 0,
+ index = 0, Tindex = 0, Pindex = 0,
+ coeff_index = 0,
+ inversion_problem = 0,
+ poles_index = 0,
+ num_poles = 0 ;
+ Standard_Real normalized_value = NAN,
+ *coefficient_array = nullptr,
+ *poles_array = nullptr ;
  
  num_flat_knots = 2 * myDegree + 2 ;
  for (ii=2; ii<myMults->Length(); ii++) {
index 5fdf443281e240cb9ff8f854fd83bb41c53b6924..eabc65b5d8efe252f2496eb2013c8bc8bf7c5cfa 100644 (file)
@@ -14,6 +14,8 @@
 
 //JCV 16/10/91
 
+#include <math.h>
+
 #include <Convert_ConeToBSplineSurface.hxx>
 #include <gp.hxx>
 #include <gp_Cone.hxx>
@@ -38,7 +40,7 @@ static void ComputePoles( const Standard_Real R,
 {
   Standard_Real deltaU = U2 - U1;
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
@@ -99,7 +101,7 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
   isuperiodic = Standard_False;
   isvperiodic = Standard_False;
 
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   // construction of cone in the reference mark xOy.
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
@@ -128,7 +130,7 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
 
   // Replace the bspline in the mark of the sphere.
   // and calculate the weight of the bspline.
-  Standard_Real W1;
+  Standard_Real W1 = NAN;
   gp_Trsf Trsf;
   Trsf.SetTransformation( C.Position(), gp::XOY());
 
@@ -160,7 +162,7 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
   Standard_DomainError_Raise_if( Abs(V2-V1) <= Abs(Epsilon(V1)),
                                 "Convert_ConeToBSplineSurface");
 
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
 
   isuperiodic = Standard_True;
   isvperiodic = Standard_False;
@@ -186,7 +188,7 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
 
   // replace bspline in the mark of the cone.
   // and calculate the weight of bspline.
-  Standard_Real W;
+  Standard_Real W = NAN;
   gp_Trsf Trsf;
   Trsf.SetTransformation( C.Position(), gp::XOY());
 
index 01640adbcf0a4d0c6d8d94db893c5f4648cd2a89..05421c84a064e7f219af86c844980d5bec38d605 100644 (file)
@@ -17,6 +17,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <Convert_ConicToBSplineCurve.hxx>
 #include <Convert_CosAndSinEvalFunction.hxx>
@@ -217,8 +219,8 @@ void  CosAndSinQuasiAngular(Standard_Real  Parameter,
                            Standard_Real  Result[2])
 {
   Standard_Real 
-  param,
-  *coeff ;
+  param = NAN,
+  *coeff = nullptr ;
  
    coeff = (Standard_Real *) &EvalPoles(EvalPoles.Lower()) ;
 //
@@ -252,13 +254,13 @@ void AlgorithmicCosAndSin(Standard_Integer               Degree,
                           TColStd_Array1OfReal&          SinNumerator,
                          TColStd_Array1OfReal&          Denominator) 
 {
-   Standard_Integer order,
-   num_poles,
-   pivot_index_problem,
-   ii;
+   Standard_Integer order = 0,
+   num_poles = 0,
+   pivot_index_problem = 0,
+   ii = 0;
  
    Standard_Real  result[2],
-   inverse ;
+   inverse = NAN ;
 
    order = Degree + 1 ;
    num_poles = FlatKnots.Length() - order ;
@@ -321,31 +323,31 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
           Handle(TColStd_HArray1OfInteger)&      MultsPtr)  const 
 {
   Standard_Real delta = ULast - UFirst,
-  direct,
-  inverse,
-  value1,
-  value2,
-  cos_beta,
-  sin_beta,
+  direct = NAN,
+  inverse = NAN,
+  value1 = NAN,
+  value2 = NAN,
+  cos_beta = NAN,
+  sin_beta = NAN,
   alpha=0,
-  alpha_2,
-  alpha_4,
-  tan_alpha_2,
-  beta,
-  p_param,
-  q_param,
-  param ;
+  alpha_2 = NAN,
+  alpha_4 = NAN,
+  tan_alpha_2 = NAN,
+  beta = NAN,
+  p_param = NAN,
+  q_param = NAN,
+  param = NAN ;
 
   Standard_Integer num_poles = 0,
-  ii,
-  jj,
+  ii = 0,
+  jj = 0,
   num_knots = 1,
   num_spans = 1,
-  num_flat_knots,
-  num_temp_knots,
+  num_flat_knots = 0,
+  num_temp_knots = 0,
   temp_degree = 0,
-  tgt_theta_flag,
-  num_temp_poles,
+  tgt_theta_flag = 0,
+  num_temp_poles = 0,
   order  = 0;
 
   Convert_CosAndSinEvalFunction *EvaluatorPtr=NULL ;
@@ -610,27 +612,27 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
           Handle(TColStd_HArray1OfReal)&         KnotsPtr,
           Handle(TColStd_HArray1OfInteger)&      MultsPtr)  const 
 {
-  Standard_Real half_pi,
-  param,
-  first_param,
-  last_param,
+  Standard_Real half_pi = NAN,
+  param = NAN,
+  first_param = NAN,
+  last_param = NAN,
 //  direct,
-  inverse,
-  value1,
-  value2,
-  value3 ;
+  inverse = NAN,
+  value1 = NAN,
+  value2 = NAN,
+  value3 = NAN ;
 
   Standard_Integer 
-  ii,
-  jj,
-  index,
-  num_poles,
-  num_periodic_poles,
-  temp_degree,
-  pivot_index_problem,
-  num_flat_knots,
-  num_knots,
-  order ;
+  ii = 0,
+  jj = 0,
+  index = 0,
+  num_poles = 0,
+  num_periodic_poles = 0,
+  temp_degree = 0,
+  pivot_index_problem = 0,
+  num_flat_knots = 0,
+  num_knots = 0,
+  order = 0 ;
 
   if (Parameterisation != Convert_TgtThetaOver2 &&
       Parameterisation != Convert_RationalC1) {
index 88c219be62d73a936b32010ee16ee8a17b84fa4d..319a37c5d959376528b6131603d82181a54e3df2 100644 (file)
@@ -123,7 +123,7 @@ protected:
   Standard_Integer degree;
   Standard_Integer nbPoles;
   Standard_Integer nbKnots;
-  Standard_Boolean isperiodic;
+  Standard_Boolean isperiodic{};
 
 
 private:
index cc71f19ac1765535c768537f23cea5a2f7e4799f..f9de99642aaf70f9425e8eba7a5173f75dcbbbfd 100644 (file)
@@ -14,6 +14,8 @@
 
 //JCV 16/10/91
 
+#include <math.h>
+
 #include <Convert_CylinderToBSplineSurface.hxx>
 #include <gp.hxx>
 #include <gp_Cylinder.hxx>
@@ -37,7 +39,7 @@ static void ComputePoles( const Standard_Real R,
 {
   Standard_Real deltaU = U2 - U1;
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
@@ -90,7 +92,7 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
   isuperiodic = Standard_False;
   isvperiodic = Standard_False;
 
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   // construction of the cylinder in the reference mark xOy.
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
@@ -118,7 +120,7 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
 
   // Replace bspline in the mark of the sphere.
   // and calculate the weight of the bspline.
-  Standard_Real W1;
+  Standard_Real W1 = NAN;
   gp_Trsf Trsf;
   Trsf.SetTransformation( Cyl.Position(), gp::XOY());
 
@@ -150,7 +152,7 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
   Standard_DomainError_Raise_if( Abs(V2-V1) <= Abs(Epsilon(V1)),
                                 "Convert_CylinderToBSplineSurface");
 
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
 
   isuperiodic = Standard_True;
   isvperiodic = Standard_False;
@@ -175,7 +177,7 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
 
   // Replace the bspline inn the mark of the cone.
   // and calculate the weight of the bspline.
-  Standard_Real W;
+  Standard_Real W = NAN;
   gp_Trsf Trsf;
   Trsf.SetTransformation( Cyl.Position(), gp::XOY());
 
index 22b126bd97353d27e613f330402f08eb5e6a1daf..ad8ddd279f5717f1e47972ac914625dea4c38b23 100644 (file)
@@ -148,8 +148,8 @@ protected:
   Standard_Integer nbVPoles;
   Standard_Integer nbUKnots;
   Standard_Integer nbVKnots;
-  Standard_Boolean isuperiodic;
-  Standard_Boolean isvperiodic;
+  Standard_Boolean isuperiodic{};
+  Standard_Boolean isvperiodic{};
 
 
 private:
index c4e239e632c3fc8ec105bb6f0e10854f6fcc0d03..63fc1566547435ca93005cc2f43bca083bd52457 100644 (file)
@@ -14,6 +14,8 @@
 
 //JCV 16/10/91
 
+#include <math.h>
+
 #include <Convert_EllipseToBSplineCurve.hxx>
 #include <gp.hxx>
 #include <gp_Ax2d.hxx>
@@ -49,11 +51,11 @@ Convert_EllipseToBSplineCurve::Convert_EllipseToBSplineCurve
   (const gp_Elips2d& E, const Convert_ParameterisationType Parameterisation)
 :Convert_ConicToBSplineCurve(0,0,0){
 
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
 
-  Standard_Real R,
-  r,
-  value ;
+  Standard_Real R = NAN,
+  r = NAN,
+  value = NAN ;
   Handle(TColStd_HArray1OfReal) CosNumeratorPtr,
   SinNumeratorPtr ;
 
@@ -135,8 +137,8 @@ Convert_EllipseToBSplineCurve::Convert_EllipseToBSplineCurve
 #endif
   Standard_DomainError_Raise_if( (delta > (2*M_PI+Tol)) || (delta <= 0.0e0),
                                "Convert_EllipseToBSplineCurve");
-  Standard_Integer ii;
-  Standard_Real R, r, value;
+  Standard_Integer ii = 0;
+  Standard_Real R = NAN, r = NAN, value = NAN;
   Handle(TColStd_HArray1OfReal) CosNumeratorPtr, SinNumeratorPtr;
   
   R = E.MajorRadius();
index d95cda3d7313ca1078c2e9b011479e8a66900e0c..43877a9408dcf10d690b0f2f2d055d748d5e9dd4 100644 (file)
@@ -19,6 +19,8 @@
 //              Condition d'extraction corrigee
 //              + positionnement par EvalPoly2Var
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <BSplSLib.hxx>
 #include <Convert_GridPolynomialToPoles.hxx>
@@ -86,13 +88,13 @@ Convert_GridPolynomialToPoles(
                              const Handle(TColStd_HArray1OfReal)& PolynomialVIntervals,
                              const Handle(TColStd_HArray1OfReal)& TrueUIntervals,
                              const Handle(TColStd_HArray1OfReal)& TrueVIntervals) :
-                             myDone(Standard_False)
+                             myUDegree(0), myVDegree(0), myDone(Standard_False)
 {
-  Standard_Integer ii;
+  Standard_Integer ii = 0;
   Standard_Integer RealUDegree = Max(MaxUDegree, 2*UContinuity + 1);
   Standard_Integer RealVDegree = Max(MaxVDegree, 2*VContinuity + 1);
-  myUDegree = 0;
-  myVDegree = 0;
+  
+  
   
   // Les controles
   if((NumCoeffPerSurface->LowerRow()!=1) || 
@@ -167,9 +169,9 @@ void Convert_GridPolynomialToPoles::Perform(const Standard_Integer UContinuity,
 
  // (2) Digitalisation -------------------------------------------------------
 
-   Standard_Integer ii, jj, Uindex=0, Vindex=0;
+   Standard_Integer ii = 0, jj = 0, Uindex=0, Vindex=0;
    Standard_Integer Patch_Indice=0;
-   Standard_Real NValue, UValue, VValue;
+   Standard_Real NValue = NAN, UValue = NAN, VValue = NAN;
    Standard_Integer dimension = 3*( myVDegree+1);
    Standard_Integer SizPatch = 3 * (MaxUDegree+1) * (MaxVDegree+1);
    myPoles = new (TColgp_HArray2OfPnt) (1, UParameters->Length(), 
@@ -202,7 +204,7 @@ void Convert_GridPolynomialToPoles::Perform(const Standard_Integer UContinuity,
 
       // (2.1) Extraction du bon Patch
       if (Patch_Indice != Uindex + (myUKnots->Length()-1)*(Vindex-1)) {
-       Standard_Integer k1, k2, pos, ll=1;
+       Standard_Integer k1 = 0, k2 = 0, pos = 0, ll=1;
        Patch_Indice = Uindex + (myUKnots->Length()-1)*(Vindex-1);
        for (k1 = 1; k1 <= NumCoeffPerSurface->Value(Patch_Indice, 1); k1++) {
          pos = SizPatch*(Patch_Indice-1)+3*(MaxVDegree+1)*(k1-1)+1;
@@ -232,7 +234,7 @@ void Convert_GridPolynomialToPoles::Perform(const Standard_Integer UContinuity,
 
  // (3)Interpolation --------------------------------------------------------------
 
-  Standard_Integer InversionProblem;
+  Standard_Integer InversionProblem = 0;
   BSplSLib::Interpolate(myUDegree, myVDegree, 
                        myUFlatKnots->Array1(),
                        myVFlatKnots->Array1(),
@@ -254,7 +256,7 @@ void  Convert_GridPolynomialToPoles::BuildArray(const Standard_Integer Degree,
  Standard_Integer NumCurves =  Knots->Length()-1;
 
  // Calcul des Multiplicites
- Standard_Integer ii;
+ Standard_Integer ii = 0;
  Standard_Integer multiplicities = Degree - Continuity;
  Mults = new (TColStd_HArray1OfInteger)(1, Knots->Length());
 
index a5ea81029063c732705dcf4f100c7cf8c01303ea..d0204afbabd25a41dcaafd01fbf8f38fadf9d2dc 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Convert_PolynomialCosAndSin.hxx>
 
 #include <gp_Trsf2d.hxx>
@@ -64,18 +66,18 @@ void BuildPolynomialCosAndSin
    Handle(TColStd_HArray1OfReal)& DenominatorPtr)
 {
 
-  Standard_Real  Delta,
-  locUFirst,
+  Standard_Real  Delta = NAN,
+  locUFirst = NAN,
 //  locULast,
 //  temp_value,
-  t_min,
-  t_max,
-  trim_min,
-  trim_max,
-  middle,
-  Angle,
+  t_min = NAN,
+  t_max = NAN,
+  trim_min = NAN,
+  trim_max = NAN,
+  middle = NAN,
+  Angle = NAN,
   PI2 = 2*M_PI ;
-  Standard_Integer ii, degree = num_poles -1 ;
+  Standard_Integer ii = 0, degree = num_poles -1 ;
   locUFirst = UFirst ;
 
   // Return UFirst in [-2PI; 2PI]
index 8373d9392278ef5e5d3c647f32c56cb34dfa922e..a30389c427356ccefc8ec1047af7ab8ea4c0a153 100644 (file)
@@ -14,6 +14,8 @@
 
 //JCV 16/10/91
 
+#include <math.h>
+
 #include <Convert_SphereToBSplineSurface.hxx>
 #include <gp.hxx>
 #include <gp_Sphere.hxx>
@@ -38,7 +40,7 @@ static void ComputePoles ( const Standard_Real R,
   Standard_Real deltaU = U2 - U1;
   Standard_Real deltaV = V2 - V1;
 
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
@@ -107,7 +109,7 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
   isuperiodic = Standard_False;
   isvperiodic = Standard_False;
 
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   // construction of the sphere in the reference mark xOy.
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
@@ -141,7 +143,7 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
 
   // Replace the bspline in the reference of the sphere.
   // and calculate the weight of the bspline.
-  Standard_Real W1, W2;
+  Standard_Real W1 = NAN, W2 = NAN;
   gp_Trsf Trsf;
   Trsf.SetTransformation( Sph.Position(), gp::XOY());
 
@@ -180,15 +182,15 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
   Standard_DomainError_Raise_if( (delta>2*M_PI) || (delta<0.),
                                "Convert_SphereToBSplineSurface");
 
-  Standard_Integer i, j;
-  Standard_Real deltaU, deltaV;
+  Standard_Integer i = 0, j = 0;
+  Standard_Real deltaU = NAN, deltaV = NAN;
 
   isuperiodic = !UTrim;
   isvperiodic = Standard_False;
 
   Standard_Real R = Sph.Radius();
   
-  Standard_Real W1, W2, CosU, CosV;
+  Standard_Real W1 = NAN, W2 = NAN, CosU = NAN, CosV = NAN;
   
   if ( isuperiodic) {
     ComputePoles(R, 0., 2.*M_PI, Param1, Param2, poles);
@@ -276,8 +278,8 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
   isuperiodic = Standard_True;
   isvperiodic = Standard_False;
 
-  Standard_Real W1, W2;
-  Standard_Integer i, j;
+  Standard_Real W1 = NAN, W2 = NAN;
+  Standard_Integer i = 0, j = 0;
 
   nbUPoles = 6;
   nbVPoles = 5;
index dd3487238e8315ba85cc3c0fa53b55ef335b64e9..b975a71c2e7691dc88be8c48e30ba9da8bd39720 100644 (file)
@@ -14,6 +14,8 @@
 
 //JCV 16/10/91
 
+#include <math.h>
+
 #include <Convert_TorusToBSplineSurface.hxx>
 #include <gp.hxx>
 #include <gp_Torus.hxx>
@@ -39,7 +41,7 @@ static void ComputePoles ( const Standard_Real R,
   Standard_Real deltaU = U2 - U1;
   Standard_Real deltaV = V2 - V1;
 
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
@@ -109,7 +111,7 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
   isuperiodic = Standard_False;
   isvperiodic = Standard_False;
 
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   // construction of the torus in the reference mark xOy.
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
@@ -144,7 +146,7 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
 
   // Replace the bspline in the reference of the torus.
   // and calculate the weight of the bspline.
-  Standard_Real W1, W2;
+  Standard_Real W1 = NAN, W2 = NAN;
   gp_Trsf Trsf;
   Trsf.SetTransformation( T.Position(), gp::XOY());
 
@@ -183,8 +185,8 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
   Standard_DomainError_Raise_if( (delta>2*M_PI) || (delta<0.),
                                "Convert_TorusToBSplineSurface");
 
-  Standard_Integer i, j;
-  Standard_Real deltaU, deltaV;
+  Standard_Integer i = 0, j = 0;
+  Standard_Real deltaU = NAN, deltaV = NAN;
 
   isuperiodic = !UTrim;
   isvperiodic =  UTrim;
@@ -192,7 +194,7 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
   Standard_Real R = T.MajorRadius();
   Standard_Real r = T.MinorRadius();
   
-  Standard_Real W1, W2, CosU, CosV;
+  Standard_Real W1 = NAN, W2 = NAN, CosU = NAN, CosV = NAN;
   
   if ( isuperiodic) {
     ComputePoles(R, r, 0, 2.*M_PI, Param1, Param2, poles);
@@ -282,8 +284,8 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
   isuperiodic = Standard_True;
   isvperiodic = Standard_True;
 
-  Standard_Real W1, W2;
-  Standard_Integer i, j;
+  Standard_Real W1 = NAN, W2 = NAN;
+  Standard_Integer i = 0, j = 0;
 
   nbUPoles = 6;
   nbVPoles = 6;
index 9fc4e74a2dc2de6b48b7ccfd42c3534680d7425d..04ce382bbf170b82917ca83017b8d3e7f6070897 100644 (file)
@@ -42,6 +42,7 @@
 #include <TopTools_Array1OfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
 
+#include <math.h>
 #include <stdio.h>
 // memory management
 #ifdef _WIN32
@@ -668,7 +669,7 @@ static Standard_Integer nexplode(Draw_Interpretor& di,
   IMOStmp.Add(S);
   TopExp::MapShapes(S,typ,IMOStmp);
   TopExp_Explorer Exp(S,typ);
-  Standard_Integer MaxShapes, Index = 0;
+  Standard_Integer MaxShapes = 0, Index = 0;
   MaxShapes = IMOStmp.Extent()-1;
   TopTools_Array1OfShape aShapes(1,MaxShapes);
   
@@ -684,7 +685,7 @@ static Standard_Integer nexplode(Draw_Interpretor& di,
   TColStd_Array1OfInteger OrderInd(1,MaxShapes);
   gp_Pnt GPoint;
   GProp_GProps GPr;
-  Standard_Integer aTemp;
+  Standard_Integer aTemp = 0;
   TColStd_Array1OfReal MidXYZ(1,MaxShapes); //X,Y,Z;
   Standard_Boolean NoSort = Standard_True;
   //
@@ -851,7 +852,7 @@ static Standard_Integer numshapes(Draw_Interpretor& di,
 {
   if (n < 2) return 1;
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   TopExp_Explorer ex;
   for (i = 1; i < n; i++) {
     TopoDS_Shape S = DBRep::Get(a[i]);
@@ -888,7 +889,7 @@ static void DumpExtent(const TopoDS_Shape& aS,
     " EDGE      : ",
     " VERTEX    : "
   };
-  Standard_Integer i, aNb, aNbSh;
+  Standard_Integer i = 0, aNb = 0, aNbSh = 0;
   TopAbs_ShapeEnum aType;
   TopTools_IndexedMapOfShape aM;
   //
@@ -914,8 +915,8 @@ static Standard_Integer nbshapes(Draw_Interpretor& di,
 {
   if (n < 2) return 1;
 
-  Standard_Integer i;
-  Standard_Boolean aTotal;
+  Standard_Integer i = 0;
+  Standard_Boolean aTotal = 0;
   TopExp_Explorer ex;
   //
   aTotal = !strcmp(a[n-1], "-t") ? Standard_True : Standard_False;
@@ -948,7 +949,7 @@ static Standard_Integer countshapes(Draw_Interpretor& di,
 {
   if (n < 2) return 1;
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   TopExp_Explorer ex;
   for (i = 1; i < n; i++) {
     TopoDS_Shape Sh = DBRep::Get(a[i]);
@@ -1050,7 +1051,7 @@ static Standard_Integer countshapes(Draw_Interpretor& di,
 //=======================================================================
 void setProp(TopoDS_Shape Sh, const char** a, Standard_Integer n)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = 2; i < n; i++) {
     if (strstr ( a[i], "free" )) {
       if(a[i][0] == '-') {
@@ -1134,17 +1135,17 @@ static Standard_Integer setFlags(Draw_Interpretor& ,
 
   setProp(Sh, a, n);
   for (ex.Init (Sh,TopAbs_VERTEX); ex.More(); ex.Next()) {
-    TopoDS_Shape S = ex.Current();
+    const TopoDS_Shape& S = ex.Current();
     setProp(S, a, n);
   }
 
   for (ex.Init (Sh,TopAbs_EDGE); ex.More(); ex.Next()) {
-    TopoDS_Shape S = ex.Current();
+    const TopoDS_Shape& S = ex.Current();
     setProp(S, a, n);
   }
 
   for (ex.Init (Sh,TopAbs_FACE); ex.More(); ex.Next()) {
-    TopoDS_Shape S = ex.Current();
+    const TopoDS_Shape& S = ex.Current();
     setProp(S, a, n);
   }
 
@@ -1169,7 +1170,7 @@ static Standard_Integer check(Draw_Interpretor& ,
 {
   if (n < 2) return 1;
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   TopExp_Explorer ex;
   for (i = 1; i < n; i++) {
     TopoDS_Shape S = DBRep::Get(a[i]);
@@ -1364,7 +1365,7 @@ TopoDS_Shape DBRep::getShape (Standard_CString& theName,
    && toPick)
   {
     // try to find prom pick
-    Standard_Real u, v;
+    Standard_Real u = NAN, v = NAN;
     DBRep_DrawableShape::LastPick (aShape, u, v);
   }
   if (theType != TopAbs_SHAPE
index 95308e8ee919eb624e24a92fb6c9d1d9406b416f..fcfad10d10cc20b2e6b8b5e44992ba34bb514eca 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DBRep_DrawableShape.hxx>
 
 #include <BRepAdaptor_Curve.hxx>
@@ -81,7 +83,7 @@ DBRep_DrawableShape::DBRep_DrawableShape
    const Standard_Real size,
    const Standard_Integer nbisos,
    const Standard_Integer discret) :
-  mySize(size),
+  myShape(aShape), mySize(size),
   myDiscret(discret),
   myFreeCol(FreeCol),
   myConnCol(ConnCol),
@@ -96,7 +98,7 @@ DBRep_DrawableShape::DBRep_DrawableShape
   myRgN(Standard_False),
   myHid(Standard_False)
 {
-  myShape = aShape;
+  
 }
 
 //=======================================================================
@@ -145,7 +147,7 @@ void DBRep_DrawableShape::updateDisplayData () const
   
   TopTools_IndexedDataMapOfShapeListOfShape edgemap;
   TopExp::MapShapesAndAncestors(myShape,TopAbs_EDGE,TopAbs_FACE,edgemap);
-  Standard_Integer iedge;
+  Standard_Integer iedge = 0;
   
   for (iedge = 1; iedge <= edgemap.Extent(); iedge++) {
     
@@ -359,11 +361,11 @@ void  DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
   }
 
   GeomAbs_IsoType T;
-  Standard_Real Par,T1,T2;
-  Standard_Real U1,U2,V1,V2,stepU=0.,stepV=0.;
+  Standard_Real Par = NAN,T1 = NAN,T2 = NAN;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN,stepU=0.,stepV=0.;
 //  gp_Pnt P, P1;
   gp_Pnt P;
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
 
   // Faces
   Handle(Poly_Triangulation) Tr;
@@ -424,7 +426,7 @@ void  DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
 
       Standard_Integer N = F->NbIsos();
 
-      Standard_Integer Intrv, nbIntv;
+      Standard_Integer Intrv = 0, nbIntv = 0;
       Standard_Integer nbUIntv = S.NbUIntervals(GeomAbs_CN);
       Standard_Integer nbVIntv = S.NbVIntervals(GeomAbs_CN);
       TColStd_Array1OfReal TI(1,Max(nbUIntv, nbVIntv)+1);
@@ -623,7 +625,7 @@ void  DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
 
     // display geometrical curve if exists.
     Standard_Boolean isgeom = BRep_Tool::IsGeometric(E->Edge());
-    Standard_Real aCheckU1, aCheckU2;
+    Standard_Real aCheckU1 = NAN, aCheckU2 = NAN;
 
     if (isgeom) {
       // check the range (to report bad edges)
@@ -661,7 +663,7 @@ void  DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
       Handle(Adaptor3d_Curve) HC = C.Trim(f, l, Precision::Confusion());
       GeomAbs_CurveType CurvType = HC->GetType();
 
-      Standard_Integer intrv, nbintv = HC->NbIntervals(GeomAbs_CN);
+      Standard_Integer intrv = 0, nbintv = HC->NbIntervals(GeomAbs_CN);
       TColStd_Array1OfReal TI(1,nbintv+1);
       HC->Intervals(TI,GeomAbs_CN);
 
@@ -751,7 +753,7 @@ void  DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
       Handle(Poly_Polygon3D) Polyg = BRep_Tool::Polygon3D(E->Edge(), loc);
       if (!Polyg.IsNull()) {
        const TColgp_Array1OfPnt& Points = Polyg->Nodes();
-       Standard_Integer po;
+       Standard_Integer po = 0;
        for (po = Points.Lower()+1; po <= Points.Upper(); po++) {
          dis.Draw((Points.Value(po-1)).Transformed(loc), 
                   (Points.Value(po)).Transformed(loc));
@@ -832,7 +834,7 @@ void DBRep_DrawableShape::DisplayHiddenLines(Draw_Display& dis)
   dout.GetTrsf(id,T);
   Standard_Real focal = -1;
   if (!strcmp(dout.GetType(id),"PERS")) focal = dout.Focal(id);
-  Standard_Real Ang,Def;
+  Standard_Real Ang = NAN,Def = NAN;
   HLRBRep::PolyHLRAngleAndDeflection(myAng,Ang,Def);
   IMeshTools_Parameters aMeshParams;
   aMeshParams.Relative   = Standard_True;
@@ -1098,7 +1100,7 @@ void  DBRep_DrawableShape::display(const Handle(Poly_Triangulation)& T,
     // Build the connect tool
   Poly_Connect pc(T);
 
-  Standard_Integer i,j, nFree, nbTriangles = T->NbTriangles();
+  Standard_Integer i = 0,j = 0, nFree = 0, nbTriangles = T->NbTriangles();
   Standard_Integer t[3];
 
   // count the free edges
@@ -1136,7 +1138,7 @@ void  DBRep_DrawableShape::display(const Handle(Poly_Triangulation)& T,
   // Display the edges
   
   // free edges
-  Standard_Integer nn;
+  Standard_Integer nn = 0;
   dis.SetColor(Draw_rouge);
   nn = Free.Length() / 2;
   for (i = 1; i <= nn; i++) {
index af6f38ea54164767c56a133108da8cd8ba341071..49840e658fe31144b50f7a45109ad5b3a0e57381 100644 (file)
@@ -172,7 +172,7 @@ private:
   Standard_Boolean myRg1;
   Standard_Boolean myRgN;
   Standard_Boolean myHid;
-  Standard_Real myAng;
+  Standard_Real myAng{};
 
 };
 
index ba2783967d68671b0d8a607054cd64caf7d90d84..2da03617158c2b90ddb9bfa27a79d586d40f3c28 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <DBRep_HideData.hxx>
 #include <Draw_Color.hxx>
 #include <Draw_Display.hxx>
@@ -64,14 +66,14 @@ void DBRep_HideData::Set(const Standard_Integer viewID,
   hider->Projector(HLRAlgo_Projector(myTrsf,myFocal > 0.,myFocal));
   hider->Update();
 
-  Standard_Real sta,end,dx,dy,dz;
-  Standard_ShortReal tolsta,tolend;
+  Standard_Real sta = NAN,end = NAN,dx = NAN,dy = NAN,dz = NAN;
+  Standard_ShortReal tolsta = NAN,tolend = NAN;
   HLRAlgo_EdgeIterator It;
   myBiPntVis.Clear();
   myBiPntHid.Clear();
   TopoDS_Shape Sori;
-  Standard_Boolean reg1,regn,outl,intl;
-  Standard_Address Coordinates;
+  Standard_Boolean reg1 = 0,regn = 0,outl = 0,intl = 0;
+  Standard_Address Coordinates = nullptr;
   HLRAlgo_EdgeStatus status;
 
   for (hider->InitHide(); hider->MoreHide(); hider->NextHide()) {
index 03e442b57465544b528504927bfe394bccd47881..0e13e6891603d265f057b1f06fc79615e0496f98 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Surface.hxx>
 #include <BRepTools.hxx>
@@ -111,7 +113,7 @@ Geom2dHatch_Hatcher (Geom2dHatch_Intersector (IntersectorConfusion,
   for (ExpEdges.Init (TopologicalFace, TopAbs_EDGE); ExpEdges.More(); ExpEdges.Next())
   {
     const TopoDS_Edge& TopologicalEdge = TopoDS::Edge (ExpEdges.Current());
-    Standard_Real U1, U2;
+    Standard_Real U1 = NAN, U2 = NAN;
     const Handle(Geom2d_Curve) PCurve = BRep_Tool::CurveOnSurface (TopologicalEdge, TopologicalFace, U1, U2);
 
     if (PCurve.IsNull())
@@ -213,7 +215,7 @@ Geom2dHatch_Hatcher (Geom2dHatch_Intersector (IntersectorConfusion,
   // Loading and trimming the hatchings.
   //-----------------------------------------------------------------------
 
-  Standard_Integer IIso ;
+  Standard_Integer IIso = 0 ;
   Standard_Real DeltaU = Abs (myUMax - myUMin) ;
   Standard_Real DeltaV = Abs (myVMax - myVMin) ;
   Standard_Real confusion = Min (DeltaU, DeltaV) * HatcherConfusion3d ;
@@ -254,7 +256,7 @@ Geom2dHatch_Hatcher (Geom2dHatch_Intersector (IntersectorConfusion,
   myNbDom = 0 ;
   for (IIso = 1 ; IIso <= NbIsos ; IIso++)
   {
-    Standard_Integer Index ;
+    Standard_Integer Index = 0 ;
 
     Index = myUInd(IIso) ;
     if (Index != 0)
@@ -419,7 +421,7 @@ void DBRep_IsoBuilder::FillGaps(const TopoDS_Face& theFace,
       Handle(Geom2d_Curve)& aCurrC2d = *pPC2;
 
       // Get p-curves parameters
-      Standard_Real fp, lp, fc, lc;
+      Standard_Real fp = NAN, lp = NAN, fc = NAN, lc = NAN;
       fp = aPrevC2d->FirstParameter();
       lp = aPrevC2d->LastParameter();
       fc = aCurrC2d->FirstParameter();
@@ -508,7 +510,7 @@ void DBRep_IsoBuilder::FillGaps(const TopoDS_Face& theFace,
           // Collect intersection points
           NCollection_List<IntRes2d_IntersectionPoint> aLPInt;
           // Get bounding points from segments
-          Standard_Integer iP, aNbInt = anInter.NbSegments();
+          Standard_Integer iP = 0, aNbInt = anInter.NbSegments();
           for (iP = 1; iP <= aNbInt; ++iP)
           {
             aLPInt.Append(anInter.Segment(iP).FirstPoint());
@@ -580,7 +582,7 @@ void DBRep_IsoBuilder::FillGaps(const TopoDS_Face& theFace,
               const gp_Pnt aPOnS = aBASurf.Value(aPInt.X(), aPInt.Y());
               if (aTolV2 > Precision::Infinite() || aPOnS.SquareDistance(aPV) < aTolV2)
               {
-                Standard_Real f, l;
+                Standard_Real f = NAN, l = NAN;
 
                 // Trim the curves with found parameters
 
index 14642a5c9dab7ada744066bc45d2772023af5605..3de01a68286cae693624951586813c8e3fe83f26 100644 (file)
@@ -42,7 +42,7 @@ namespace
   {
     TCollection_AsciiString aBuffer;
     Standard_Integer aBufSize = 10;
-    Standard_Integer aLen;
+    Standard_Integer aLen = 0;
     theLine.Clear();
     do
     {
index 2d978fc71ab880d1fffef3b4c6b60d517e2a5169..a73ee468763db64bccae8d628ea137811b645b8c 100644 (file)
@@ -35,10 +35,10 @@ DE_ConfigurationNode::DE_ConfigurationNode() :
 // function : DE_ConfigurationNode
 // purpose  :
 //=======================================================================
-DE_ConfigurationNode::DE_ConfigurationNode(const Handle(DE_ConfigurationNode)& theConfigurationNode)
+DE_ConfigurationNode::DE_ConfigurationNode(const Handle(DE_ConfigurationNode)& theConfigurationNode) : GlobalParameters(theConfigurationNode->GlobalParameters), myIsEnabled(theConfigurationNode->IsEnabled())
 {
-  GlobalParameters = theConfigurationNode->GlobalParameters;
-  myIsEnabled = theConfigurationNode->IsEnabled();
+  
+  
 }
 
 //=======================================================================
index 091fde72d653665f987c32c0ff45aed884494ee6..45bac0b135c6cd47a18a204890d1ab56f148c11a 100644 (file)
@@ -457,7 +457,7 @@ void DE_Wrapper::ChangePriority(const TCollection_AsciiString& theFormat,
     const TCollection_AsciiString& aVendorName = aVendorIter.Key();
     if (!theVendorPriority.Contains(aVendorName))
     {
-      Handle(DE_ConfigurationNode) aNode = aVendorIter.Value();
+      const Handle(DE_ConfigurationNode)& aNode = aVendorIter.Value();
       if (theToDisable)
       {
         aNode->SetEnabled(Standard_False);
index 8bf5fbf0361694601ad535ebc3a123bb76657b5a..70d85d620808abf54b09fcffe6a7552265252ce0 100644 (file)
@@ -36,6 +36,7 @@
 #include <Standard_Version.hxx>
 #include <TCollection_AsciiString.hxx>
 
+#include <math.h>
 #include <tcl.h>
 
 #include <Standard_WarningDisableFunctionCast.hxx>
@@ -602,7 +603,7 @@ Standard_Boolean Draw_Interprete(const char* com)
 
   if (Draw_BeforeCommand) (*Draw_BeforeCommand) ();
 
-  Standard_Integer c;
+  Standard_Integer c = 0;
 
   c = theCommands.RecordAndEval(Tcl_DStringValue(&command));
 
@@ -735,7 +736,7 @@ namespace
   static bool parseNumericalColorComponent (const Standard_CString theColorComponentString,
                                             Standard_Integer&      theIntegerColorComponent)
   {
-    Standard_Integer anIntegerColorComponent;
+    Standard_Integer anIntegerColorComponent = 0;
     if (!Draw::ParseInteger (theColorComponentString, anIntegerColorComponent))
     {
       return false;
@@ -755,7 +756,7 @@ namespace
   static bool parseNumericalColorComponent (const Standard_CString theColorComponentString,
                                             Standard_ShortReal&    theRealColorComponent)
   {
-    Standard_Real aRealColorComponent;
+    Standard_Real aRealColorComponent = NAN;
     if (!Draw::ParseReal (theColorComponentString, aRealColorComponent))
     {
       return false;
@@ -777,7 +778,7 @@ namespace
   static bool parseColorComponent (const Standard_CString theColorComponentString,
                                    Standard_ShortReal&    theColorComponent)
   {
-    Standard_Integer anIntegerColorComponent;
+    Standard_Integer anIntegerColorComponent = 0;
     if (parseNumericalColorComponent (theColorComponentString, anIntegerColorComponent))
     {
       if (anIntegerColorComponent == 1)
@@ -893,7 +894,7 @@ Standard_Integer Draw::parseColor (const Standard_Integer   theArgNb,
     if (theArgNb >= 2 && theToParseAlpha)
     {
       const Standard_CString anAlphaStr = theArgVec[1];
-      Standard_ShortReal     anAlphaComponent;
+      Standard_ShortReal     anAlphaComponent = NAN;
       if (parseColorComponent (anAlphaStr, anAlphaComponent))
       {
         theColor.SetAlpha (anAlphaComponent);
index f115d05982a9d4bd06ca015941f1df3f4c21518b..c7f202ee1b92f1e0ac63f87f0c30263f12da4a25 100644 (file)
@@ -579,7 +579,7 @@ static void cpulimitSignalHandler (int)
 }
 static void *CpuFunc(void* /*threadarg*/)
 {
-  clock_t anElapCurrent;
+  clock_t anElapCurrent = 0;
   for(;;)
   {
     sleep (5);
@@ -635,7 +635,7 @@ static Standard_Integer cpulimit(Draw_Interpretor& di, Standard_Integer n, const
 
 #else 
   // Unix & Linux
-  rlimit rlp;
+  rlimit rlp{};
   rlp.rlim_max = RLIM_INFINITY;
   if (n <= 1)
   {
@@ -655,7 +655,7 @@ static Standard_Integer cpulimit(Draw_Interpretor& di, Standard_Integer n, const
   }
 
   // set signal handler to print a message before death
-  struct sigaction act, oact;
+  struct sigaction act{}, oact{};
   memset (&act, 0, sizeof(act));
   act.sa_handler = cpulimitSignalHandler;
   sigaction (SIGXCPU, &act, &oact);
@@ -663,7 +663,7 @@ static Standard_Integer cpulimit(Draw_Interpretor& di, Standard_Integer n, const
   // cpulimit for elapsed time
   aTimer.Reset();
   aTimer.Start();
-  pthread_t cpulimitThread;
+  pthread_t cpulimitThread = 0;
   if (aFirst) // Launch the thread only at the 1st call.
   {
     aFirst = 0;
index 6f9cd1ef0bd6724a6ac443941817b79d3ae66bd9..527daba4fc962ee42b023544ebf2d232dc58e5ba 100644 (file)
@@ -28,6 +28,7 @@
 #include <Message.hxx>
 #include <Standard_Stream.hxx>
 
+#include <math.h>
 #include <stdio.h>
 #ifdef _WIN32
 extern Draw_Viewer dout;
@@ -126,8 +127,8 @@ static Standard_Integer zoom(Draw_Interpretor& , Standard_Integer n, const char*
 
 static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
 {
-  Standard_Integer id,X,Y,W,H,X1,Y1,X2 = 0,Y2 = 0,b;
-  Standard_Real dX1,dY1,dX2,dY2,zx,zy;
+  Standard_Integer id = 0,X = 0,Y = 0,W = 0,H = 0,X1 = 0,Y1 = 0,X2 = 0,Y2 = 0,b = 0;
+  Standard_Real dX1 = NAN,dY1 = NAN,dX2 = NAN,dY2 = NAN,zx = NAN,zy = NAN;
   if(argc != 1 && argc != 6)
   {
     di<<"Usage : " << argv[0] << " [view-id X1 Y1 X2 Y2]\n";
@@ -234,7 +235,7 @@ static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer argc, const
 
 static Standard_Integer wclick(Draw_Interpretor& di, Standard_Integer, const char**)
 {
-  Standard_Integer id1,X1,Y1,b;
+  Standard_Integer id1 = 0,X1 = 0,Y1 = 0,b = 0;
   dout.Flush();
   di << "Just click.\n";
   dout.Select(id1,X1,Y1,b);
@@ -332,7 +333,7 @@ static Standard_Integer fit(Draw_Interpretor& , Standard_Integer n, const char**
   Standard_Boolean f2d = !strcasecmp(a[0],"2dfit");
   if (n == 1) {
     Standard_Real zoom = RealLast();
-    Standard_Integer id;
+    Standard_Integer id = 0;
     for ( id = 0; id < MAXVIEW; id++) {
       if (dout.HasView(id)) {
        if ((f2d && !dout.Is3D(id)) || (!f2d && dout.Is3D(id))) {
@@ -520,7 +521,7 @@ static Standard_Integer panning(Draw_Interpretor& , Standard_Integer n, const ch
   }
   Standard_Integer DX = 0;
   Standard_Integer DY = 0;
-  Standard_Integer X,Y,W,H;
+  Standard_Integer X = 0,Y = 0,W = 0,H = 0;
 
   Standard_Boolean v2d = (a[0][0] == '2');     // pu2d, pd2d, pr2d, pl2d
   const char* com = a[0];
@@ -555,7 +556,7 @@ static Standard_Integer panning(Draw_Interpretor& , Standard_Integer n, const ch
 
 static Standard_Integer ptv(Draw_Interpretor& , Standard_Integer n, const char** a)
 {
-  Standard_Real X,Y,Z;
+  Standard_Real X = NAN,Y = NAN,Z = NAN;
   Standard_Integer start = 0;
   Standard_Integer end = MAXVIEW-1;
   if (n < 4) return 1;
@@ -594,7 +595,7 @@ static Standard_Integer ptv(Draw_Interpretor& , Standard_Integer n, const char**
 
 static Standard_Integer dptv(Draw_Interpretor& , Standard_Integer n, const char** a)
 {
-  Standard_Real DX,DY,DZ;
+  Standard_Real DX = NAN,DY = NAN,DZ = NAN;
   Standard_Integer start = 0;
   Standard_Integer end = MAXVIEW-1;
   if (n < 4) return 1;
@@ -729,7 +730,7 @@ static Standard_Integer hardcopy(Draw_Interpretor& ,
 
   std::ofstream os(file);
 
-  Standard_Integer vxmin,vymin,vxmax,vymax;
+  Standard_Integer vxmin = 0,vymin = 0,vxmax = 0,vymax = 0;
   if (dout.HasView(iview)) {
     dout.GetFrame(iview,vxmin,vymin,vxmax,vymax);
     Standard_Real kx = (Standard_Real) (pxmax - pxmin) / (vxmax - vxmin);
@@ -853,7 +854,7 @@ static Standard_Integer xwd(Draw_Interpretor& , Standard_Integer n, const char**
 
 static Standard_Integer grid (Draw_Interpretor& , Standard_Integer NbArg, const char **Arg)
 {
-  Standard_Real StepX, StepY, StepZ ;
+  Standard_Real StepX = NAN, StepY = NAN, StepZ = NAN ;
 
   switch (NbArg) {
     case 1 :
@@ -913,9 +914,9 @@ static Standard_Integer dflush (Draw_Interpretor& , Standard_Integer, const char
 static Standard_Integer dtext(Draw_Interpretor& di, Standard_Integer n, const char** a)
 {
   gp_Pnt P;
-  Standard_Boolean is3d;
+  Standard_Boolean is3d = 0;
   if (n == 2) {
-    Standard_Integer id,X,Y,b;
+    Standard_Integer id = 0,X = 0,Y = 0,b = 0;
     di << "Pick position with button 1, other button escape\n";
     dout.Select(id,X,Y,b);
     if (b != 1)
index 27a5270ba3746bcef16caa39217a4761f8c4507f..7dc86c314b646365567a11e4dead76aaf7a0fac0 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Draw_Appli.hxx>
 #include <Draw_Color.hxx>
 #include <Draw_ColorKind.hxx>
@@ -70,17 +72,17 @@ void Draw_Grid::DrawOn (Draw_Display& Out) const
 {
   if (!myIsActive) return ;
   
-  Standard_Integer xmin, xmax, ymin, ymax ;
-  Standard_Integer IndexX, IndexY ;
-  Standard_Real StepX, StepY ;
-  Standard_Integer MinIndexX, MaxIndexX, MinIndexY, MaxIndexY ;
-  Standard_Real Offset ;
-  Standard_Real zoom, Xmin, Xmax, Ymin, Ymax ;
+  Standard_Integer xmin = 0, xmax = 0, ymin = 0, ymax = 0 ;
+  Standard_Integer IndexX = 0, IndexY = 0 ;
+  Standard_Real StepX = NAN, StepY = NAN ;
+  Standard_Integer MinIndexX = 0, MaxIndexX = 0, MinIndexY = 0, MaxIndexY = 0 ;
+  Standard_Real Offset = NAN ;
+  Standard_Real zoom = NAN, Xmin = NAN, Xmax = NAN, Ymin = NAN, Ymax = NAN ;
   gp_Trsf T ;
   gp_Pnt Pnt1, Pnt2 ;
 
-  Standard_Integer IdtView ;
-  char *Type ;
+  Standard_Integer IdtView = 0 ;
+  char *Type = nullptr ;
 
   IdtView = Out.ViewId () ;
   if (!dout.HasView (IdtView)) return ;
index 4fc5d52dd21a9cc0cd6cb51c967a7d69a057e12b..6046f2faf1a204d5e82063c89cfb1e0247a74ce9 100644 (file)
@@ -351,7 +351,7 @@ void Draw_Interpretor::add (const Standard_CString          theCommandName,
 
 Standard_Boolean Draw_Interpretor::Remove(Standard_CString const n)
 {
-  Standard_PCharacter pN;
+  Standard_PCharacter pN = nullptr;
   //
   pN=(Standard_PCharacter)n;
  
@@ -522,7 +522,7 @@ Standard_Integer Draw_Interpretor::PrintHelp (const Standard_CString theCommandN
 
 Standard_Boolean Draw_Interpretor::Complete(const Standard_CString line)
 {
-  Standard_PCharacter pLine;
+  Standard_PCharacter pLine = nullptr;
   //
   pLine=(Standard_PCharacter)line;
   return Tcl_CommandComplete (pLine) != 0;
index a4dfc746d814e9b53b41d6b70809c45ddaae717a..eebf8d5e7701ba57c6072fa40122485fa9174558 100644 (file)
@@ -115,7 +115,7 @@ static void resolveKeys (Draw_MapOfAsciiString& theMap,
   for (Standard_Integer j = 1; j <= aMapExtent; ++j)
   {
     TCollection_AsciiString aValue;
-    const TCollection_AsciiString aResource = theMap.FindKey (j);
+    const TCollection_AsciiString& aResource = theMap.FindKey (j);
     if (theResMgr->Find (aResource, aValue))
     {
     #ifdef OCCT_DEBUG
@@ -204,7 +204,7 @@ static Standard_Integer Pload (Draw_Interpretor& theDI,
   const Standard_Integer aMapExtent = aMap.Extent();
   for (Standard_Integer aResIter = 1; aResIter <= aMapExtent; ++aResIter)
   {
-    const TCollection_AsciiString aResource = aMap.FindKey (aResIter);
+    const TCollection_AsciiString& aResource = aMap.FindKey (aResIter);
   #ifdef OCCT_DEBUG
     std::cout << "aResource = " << aResource << std::endl;
   #endif
index a31a1717a56754ea7f1175a625a9e37dea605eb7..5589e7c5ac5a225ceef32e819b9e11fad22322ef 100644 (file)
@@ -92,7 +92,7 @@ void Draw_ProgressIndicator::Show (const Message_ProgressScope& theScope, const
   {
     if (!myStartTime)
     {
-      time_t aTimeT;
+      time_t aTimeT = 0;
       time(&aTimeT);
       myStartTime = (Standard_Size)aTimeT;
     }
@@ -144,7 +144,7 @@ void Draw_ProgressIndicator::Show (const Message_ProgressScope& theScope, const
   {
     // In addition, write elapsed/estimated/remaining time
     if ( GetPosition() > 0.01 ) { 
-      time_t aTimeT;
+      time_t aTimeT = 0;
       time ( &aTimeT );
       Standard_Size aTime = (Standard_Size)aTimeT;
       aText << "\nElapsed/estimated time: " << (long)(aTime - myStartTime) <<
index 473b212887a2aa1d15c2d241d622be4965127e01..3c1ce3e45231b1934d34c0527baf9f9a98b26980 100644 (file)
@@ -222,7 +222,7 @@ static Standard_Integer erase(Draw_Interpretor& di, Standard_Integer n, const ch
   
   if (n <= 1 || donly) {
     // clear, 2dclear, donly, erase (without arguments)
-    Standard_Integer i;
+    Standard_Integer i = 0;
     
     // solve the names for "." before erasing
     if (donly) {
@@ -319,7 +319,7 @@ static Standard_Integer draw(Draw_Interpretor& , Standard_Integer n, const char*
   Standard_Integer mo = Draw::Atoi(a[2]);
   Draw_Display d = dout.MakeDisplay(id);
   d.SetMode(mo);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 3; i < n; i++) {
     Handle(Draw_Drawable3D) D = Draw::Get(a[i]);
     if (!D.IsNull()) D->DrawOn(d);
@@ -405,8 +405,8 @@ static Standard_Integer dname(Draw_Interpretor& di, Standard_Integer n, const ch
     return 1;
   }
   //
-  Standard_PCharacter pC;
-  Standard_Integer i;
+  Standard_PCharacter pC = nullptr;
+  Standard_Integer i = 0;
   Handle(Draw_Drawable3D) aD;
   //
   for (i = 1; i < n; ++i) {
@@ -430,7 +430,7 @@ static Standard_Integer dname(Draw_Interpretor& di, Standard_Integer n, const ch
 static Standard_Integer dump(Draw_Interpretor& DI, Standard_Integer n, const char** a)
 {
   if(n < 2) return 1;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i < n; i++) {
     Handle(Draw_Drawable3D) D = Draw::Get(a[i]);
     if (!D.IsNull()) {
@@ -589,8 +589,8 @@ Standard_Integer isprot(Draw_Interpretor& di, Standard_Integer n, const char** a
 static Standard_Integer pick(Draw_Interpretor& , Standard_Integer n, const char** a)
 {
   if (n < 6) return 1;
-  Standard_Integer id;
-  Standard_Integer X,Y,b;
+  Standard_Integer id = 0;
+  Standard_Integer X = 0,Y = 0,b = 0;
   Standard_Boolean wait = (n == 6);
   if (!wait) id = Draw::Atoi(a[1]);
   dout.Select(id,X,Y,b,wait);
@@ -1145,7 +1145,7 @@ bool Draw::ParseInteger (const Standard_CString theExpressionString, Standard_In
 //=======================================================================
 void Draw::Set(const Standard_CString Name, const Standard_CString val)
 {
-  Standard_PCharacter pName, pVal;
+  Standard_PCharacter pName = nullptr, pVal = nullptr;
   //
   pName=(Standard_PCharacter)Name;
   pVal=(Standard_PCharacter)val;
@@ -1208,7 +1208,7 @@ void  Draw::VariableCommands(Draw_Interpretor& theCommandsArg)
   Draw_Number::RegisterFactory();
 
   // set up some variables
-  const char* n;
+  const char* n = nullptr;
   Handle(Draw_Axis3D) theAxes3d = new Draw_Axis3D(gp_Pnt(0,0,0),Draw_bleu,20);
   n = "axes";
   Draw::Set(n,theAxes3d);
@@ -1237,7 +1237,7 @@ void  Draw::VariableCommands(Draw_Interpretor& theCommandsArg)
   theGrid->Protected(Standard_True);
   
 
-  const char* g;
+  const char* g = nullptr;
 
   g = "DRAW Numeric functions";
 
index c3acac8bcab3ecb5d5b583a8540e0b6892d82a2f..cd1044f231e54e3befb3875933588a6cb8086633 100644 (file)
@@ -103,7 +103,7 @@ protected:
 
   Standard_Integer       myId;
   Draw_Viewer*           myViewer;
-  char                   myType[5];
+  char                   myType[5]{};
   Standard_Boolean       myIsPers;
   Standard_Boolean       myIs2D;
   Standard_Real          myFocalDistance;
index 283c4658237174eab6b8aa87dcb12e1ce6ded2fe..cee487afbc080e4fb92dd120174adc95064d08ac 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Draw_Viewer.hxx>
 #include <Draw_View.hxx>
 
@@ -61,7 +63,7 @@ static DrawingMode CurrentMode = DRAW;
 Draw_Viewer::Draw_Viewer()
 {
   if (Draw_Batch) return;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for ( i = 0; i < MAXVIEW; i++) myViews[i] = NULL;
   for (i = 0; i < MAXCOLOR; i++) {
     ps_width[i] = 1;
@@ -205,7 +207,7 @@ void Draw_Viewer::SetZoom (const Standard_Integer id, const Standard_Real z)
   {
     Standard_Real zz = z / aView->GetZoom();
     aView->SetZoom(z);
-    Standard_Integer X,Y,W,H;
+    Standard_Integer X = 0,Y = 0,W = 0,H = 0;
     GetPosSize(id,X,Y,W,H);
 
     const Standard_Real w = 0.5 * static_cast<Standard_Real>(W);
@@ -382,7 +384,7 @@ void Draw_Viewer::GetFrame(const Standard_Integer id,
 {
   if (Draw_Batch) return;
   if (myViews[id]) {
-    Standard_Integer X,Y,H,W;
+    Standard_Integer X = 0,Y = 0,H = 0,W = 0;
     GetPosSize(id,X,Y,W,H);
     xminf =   - myViews[id]->GetDx();
     xmaxf = W - myViews[id]->GetDx();
@@ -403,7 +405,7 @@ void Draw_Viewer::FitView(const Standard_Integer id, const Standard_Integer fram
 
     // is this the only view in its category
     Standard_Boolean is2d = myViews[id]->Is2D();
-    Standard_Integer i,nbviews = 0;
+    Standard_Integer i = 0,nbviews = 0;
     for (i = 1; i < MAXVIEW; i++) {
       if (myViews[i]) {
         if (myViews[i]->Is2D() == is2d)
@@ -412,15 +414,15 @@ void Draw_Viewer::FitView(const Standard_Integer id, const Standard_Integer fram
     }
     Standard_Boolean only = (nbviews == 1);
 
-    Standard_Integer X,Y,H,W;
+    Standard_Integer X = 0,Y = 0,H = 0,W = 0;
     GetPosSize(id,X,Y,W,H);
     // compute the min max
     Standard_Integer n = myDrawables.Length();
     if (n == 0) return;
 //    Draw_Display DF;
     curview = myViews[id];
-    Standard_Real umin,umax,vmin,vmax;
-    Standard_Real u1,u2,v1,v2;
+    Standard_Real umin = NAN,umax = NAN,vmin = NAN,vmax = NAN;
+    Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
     umin = vmin = DRAWINFINITE;
     umax = vmax = -DRAWINFINITE;
 
@@ -437,7 +439,7 @@ void Draw_Viewer::FitView(const Standard_Integer id, const Standard_Integer fram
        if (v2 > vmax) vmax = v2;
       }
     }
-    Standard_Real z;
+    Standard_Real z = NAN;
     umin = umin / curview->GetZoom();
     vmin = vmin / curview->GetZoom();
     umax = umax / curview->GetZoom();
@@ -907,7 +909,7 @@ void Draw_Viewer::RemoveDrawable (const Handle(Draw_Drawable3D)& D)
 {
   if (Draw_Batch) return;
   if (!D.IsNull() && D->Visible()) {
-    Standard_Integer index;
+    Standard_Integer index = 0;
     for (index = 1; index <= myDrawables.Length(); index++) {
       if (myDrawables(index) == D) {
        D->Visible(Standard_False);
@@ -1022,7 +1024,7 @@ void Draw_Viewer::Select (Standard_Integer& theId,
   Standard_Boolean again = Standard_True;
   while (again)
   {
-    Draw_Window::Draw_XEvent ev;
+    Draw_Window::Draw_XEvent ev{};
     ev.type = 0;
     Draw_Window::GetNextEvent (ev);
     switch (ev.type)
@@ -1124,7 +1126,7 @@ Standard_Integer Draw_Viewer::Pick(const Standard_Integer id,
 
   // is this the only view in its category
   Standard_Boolean is2d = myViews[id]->Is2D();
-  Standard_Integer i,nbviews = 0;
+  Standard_Integer i = 0,nbviews = 0;
   for (i = 0; i < MAXVIEW; i++)
   {
     if (myViews[i])
@@ -1138,7 +1140,7 @@ Standard_Integer Draw_Viewer::Pick(const Standard_Integer id,
   ypick = Y;
   precpick = Prec;
   found = Standard_False;
-  Standard_Real x1,x2,y1,y2;
+  Standard_Real x1 = NAN,x2 = NAN,y1 = NAN,y2 = NAN;
   for (i = first+1; i <= myDrawables.Length(); i++) {
     Standard_Boolean reject = Standard_False;
     // rejection if only view
@@ -1402,7 +1404,7 @@ void Draw_Display::Project(const gp_Pnt& p, gp_Pnt2d& p2d) const
   if (Draw_Batch) return;
   gp_Pnt pt = p;
   pt.Transform(curview->GetMatrix());
-  Standard_Real xp,yp,zp;
+  Standard_Real xp = NAN,yp = NAN,zp = NAN;
   pt.Coord(xp,yp,zp);
   if (curview->IsPerspective()) {
     const Standard_Real aDistance = curview->GetFocalDistance();
@@ -1473,7 +1475,7 @@ inline  Standard_Integer CalculRegion(const Standard_Real x,
                                      const Standard_Real y1,
                                      const Standard_Real x2,
                                      const Standard_Real y2) {
-  Standard_Integer r;
+  Standard_Integer r = 0;
   if(x<x1) { r=1; }  else { if(x>x2) { r=2; } else { r=0; } }
   if(y<y1) { r|=4; } else { if(y>y2) { r|=8; } }
   return(r);
@@ -1497,7 +1499,7 @@ Standard_Boolean Trim(gp_Pnt2d& P1,gp_Pnt2d& P2,
     dx/=dab;
     dy/=dab;
 
-    Standard_Real xm,ym,mfenx,mfeny;
+    Standard_Real xm = NAN,ym = NAN,mfenx = NAN,mfeny = NAN;
     mfenx=xm=0.5*(x0+x1);
     mfeny=ym=0.5*(y0+y1);
     x1-=x0;     y1-=y0;
@@ -1564,7 +1566,7 @@ void Draw_Display::DrawTo (const gp_Pnt2d& pp2)
   case DRAW : {
 
 #if 1
-    Standard_Integer x0,y0,x1,y1;
+    Standard_Integer x0 = 0,y0 = 0,x1 = 0,y1 = 0;
     curview->GetFrame(x0,y0,x1,y1);
 
 
index 89dbac9ed8fea5e486153fba4006f63d56a6ff2b..e6b463339bdda8350b28910f97abc3c73d57b9b5 100644 (file)
@@ -153,7 +153,7 @@ class Draw_Viewer {
 
   private :
 
-    Draw_View*                myViews[MAXVIEW];
+    Draw_View*                myViews[MAXVIEW]{};
     Draw_SequenceOfDrawable3D myDrawables;
 };
 
index 090fa69b5e60460deb915ab0e8da36214b6f2953..7ac34956848287cb69ea1fa4d944d6ec4867d99c 100644 (file)
@@ -157,7 +157,7 @@ void Draw_Window::RemoveCallbackBeforeTerminate (FCallbackBeforeTerminate theCB)
 //! Side effects: A prompt gets output, and a Tcl script may be evaluated in interp.
 static void Prompt (Tcl_Interp* theInterp, int thePartial)
 {
-  Tcl_Channel errChannel;
+  Tcl_Channel errChannel = nullptr;
   Tcl_Channel outChannel = Tcl_GetStdChannel(TCL_STDOUT);
   const char* promptCmd = Tcl_GetVar (theInterp, thePartial ? "tcl_prompt2" : "tcl_prompt1", TCL_GLOBAL_ONLY);
   if (promptCmd == NULL)
@@ -244,15 +244,19 @@ Draw_Window::Draw_Window (const char* theTitle,
                           const NCollection_Vec2<int>& theSize,
                           Aspect_Drawable theParent,
                           Aspect_Drawable theWin)
-: myWindow (0),
+:
 #if defined(_WIN32)
+  myWindow (0),
   myMemHbm (NULL),
   myCurrPen  (0),
   myCurrMode (0),
 #elif defined(HAVE_XLIB)
+  myWindow((Window )theWin),
   myMother ((Window )theParent),
   myImageBuffer (0),
   myBase (new Base_Window()),
+#else
+  myWindow (0),
 #endif
   myCurrentColor (0),
   myUseBuffer (Standard_False)
@@ -262,7 +266,7 @@ Draw_Window::Draw_Window (const char* theTitle,
   myWindow = (HWND )theWin;
   (void )theParent;
 #elif defined(HAVE_XLIB)
-  myWindow = (Window )theWin;
+  
   if (theParent == 0)
   {
     myMother = RootWindow (Draw_WindowDisplay, Draw_WindowScreen);
@@ -1053,7 +1057,7 @@ Standard_Boolean Draw_Window::Save (const char* theFileName) const
     XWindowAttributes aWinAttrRoot;
     XGetWindowAttributes (Draw_WindowDisplay, XRootWindowOfScreen (aWinAttr.screen), &aWinAttrRoot);
 
-    Window aWinChildDummy;
+    Window aWinChildDummy = 0;
     int aWinLeft = 0, aWinTop = 0;
     XTranslateCoordinates (Draw_WindowDisplay, myWindow, XRootWindowOfScreen (aWinAttr.screen),
                            0, 0, &aWinLeft, &aWinTop, &aWinChildDummy);
index cfe5cbdbf78d5823ded6892b8480d71c5de8ce6c..b42273834d5726b0d5c20906706507c307997163 100644 (file)
@@ -491,7 +491,7 @@ static Standard_Integer transform (Draw_Interpretor& di, Standard_Integer n, con
 {
   if (n < 5) return 1;
   gp_Trsf T;
-  Standard_Integer i,last = n-1;
+  Standard_Integer i = 0,last = n-1;
   if (!strcmp(a[0],"pscale")) {
     Standard_Real s = Draw::Atof(a[last]);
     last--;
@@ -566,7 +566,7 @@ static Standard_Integer d2transform (Draw_Interpretor& di, Standard_Integer n, c
 {
   if (n < 4) return 1;
   gp_Trsf2d T;
-  Standard_Integer i,last = n-1;
+  Standard_Integer i = 0,last = n-1;
   if (!strcmp(a[0],"2dpscale")) {
     Standard_Real s = Draw::Atof(a[last]);
     last--;
@@ -1305,7 +1305,7 @@ void  DrawTrSurf::BasicCommands(Draw_Interpretor& theCommands)
   DrawTrSurf_Surface::RegisterFactory();
   DrawTrSurf_Triangulation::RegisterFactory();
 
-  const char* g;
+  const char* g = nullptr;
   g = "geometric display commands";
   
   theCommands.Add("nbiso",
index 972be5cf745f0d7a9f558f3d99c2148ad5243b95..eb9f2c8b9e176f0d07c001258b80919bce7b5433 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DrawTrSurf_BSplineCurve.hxx>
 
 #include <Draw_Color.hxx>
 IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_BSplineCurve, DrawTrSurf_Curve)
 
 DrawTrSurf_BSplineCurve::DrawTrSurf_BSplineCurve (const Handle(Geom_BSplineCurve)& C)
-: DrawTrSurf_Curve (C, Draw_vert, 16, 0.05, 1)
+: DrawTrSurf_Curve (C, Draw_vert, 16, 0.05, 1), drawKnots(Standard_True), knotsForm(Draw_Losange), knotsDim(5), drawPoles(Standard_True)
 {
 
-  drawKnots = Standard_True;
-  knotsForm = Draw_Losange;
+  
+  
   knotsLook = Draw_violet;
-  knotsDim  = 5;
-  drawPoles = Standard_True;
+  
+  
   polesLook = Draw_rouge;
 }
 
@@ -45,14 +47,14 @@ DrawTrSurf_BSplineCurve::DrawTrSurf_BSplineCurve (const Handle(Geom_BSplineCurve
                                                   const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots,
                                                   const Standard_Integer Discret, const Standard_Real Deflection,
                                                   const Standard_Integer DrawMode)
-: DrawTrSurf_Curve (C, CurvColor, Discret, Deflection, DrawMode)
+: DrawTrSurf_Curve (C, CurvColor, Discret, Deflection, DrawMode), drawKnots(ShowKnots), knotsForm(KnotsShape), knotsLook(KnotsColor), knotsDim(KnotsSize), drawPoles(ShowPoles), polesLook(PolesColor)
 {
-  drawKnots = ShowKnots;
-  knotsForm = KnotsShape;
-  knotsLook = KnotsColor;
-  knotsDim  = KnotsSize;
-  drawPoles = ShowPoles;
-  polesLook = PolesColor;
+  
+  
+  
+  
+  
+  
 }
 
 void DrawTrSurf_BSplineCurve::DrawOn (Draw_Display& dis) const
@@ -134,7 +136,7 @@ void DrawTrSurf_BSplineCurve::DrawOn (Draw_Display& dis,
   Handle(Geom_BSplineCurve) C = Handle(Geom_BSplineCurve)::DownCast(curv);
   Standard_Real Eps1 = Abs(Epsilon (U1));
   Standard_Real Eps2 = Abs(Epsilon (U2));
-  Standard_Integer I1, J1, I2, J2;
+  Standard_Integer I1 = 0, J1 = 0, I2 = 0, J2 = 0;
   C->LocateU (U1, Eps1, I1, J1);
   C->LocateU (U2, Eps2, I2, J2);
   Standard_Integer ka  = C->FirstUKnotIndex ();
@@ -181,11 +183,11 @@ void DrawTrSurf_BSplineCurve::DrawOn (Draw_Display& dis,
   }
   else
   {
-    Standard_Integer NbPoints;
+    Standard_Integer NbPoints = 0;
     Standard_Integer Discret = GetDiscretisation();
     Standard_Real Ustart = C->Knot (ka);
     Standard_Real Uend   = C->Knot (kb);
-    Standard_Real Du, U, Ua, Ub, Uk1, Uk2;
+    Standard_Real Du = NAN, U = NAN, Ua = NAN, Ub = NAN, Uk1 = NAN, Uk2 = NAN;
 
     if (I1 > ka)  { ka = I1;  Uk1 = U1; }
     else
index fff30698848e639e3a8ebf003a8e4966f55e95b4..299cd84cd6898705d8cc5ec05c8ccb0cbd573615 100644 (file)
 IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_BSplineCurve2d, DrawTrSurf_Curve2d)
 
 DrawTrSurf_BSplineCurve2d::DrawTrSurf_BSplineCurve2d (const Handle(Geom2d_BSplineCurve)& C)
-: DrawTrSurf_Curve2d (C, Draw_vert, 100)
+: DrawTrSurf_Curve2d (C, Draw_vert, 100), drawKnots(Standard_True), knotsForm(Draw_Losange), knotsDim(5), drawPoles(Standard_True)
 {
-  drawKnots = Standard_True;
-  knotsForm = Draw_Losange;
+  
+  
   knotsLook = Draw_violet;
-  knotsDim  = 5;
-  drawPoles = Standard_True;
+  
+  
   polesLook = Draw_rouge;
 }
 
@@ -42,14 +42,14 @@ DrawTrSurf_BSplineCurve2d::DrawTrSurf_BSplineCurve2d (const Handle(Geom2d_BSplin
                                                       const Draw_Color& PolesColor, const Draw_Color& KnotsColor,
                                                       const Draw_MarkerShape KnotsShape, const Standard_Integer KnotsSize,
                                                       const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots, const Standard_Integer Discret)
-: DrawTrSurf_Curve2d (C, CurvColor, Discret)
+: DrawTrSurf_Curve2d (C, CurvColor, Discret), drawKnots(ShowKnots), knotsForm(KnotsShape), knotsLook(KnotsColor), knotsDim(KnotsSize), drawPoles(ShowPoles), polesLook(PolesColor)
 {
-  drawKnots = ShowKnots;
-  knotsForm = KnotsShape;
-  knotsLook = KnotsColor;
-  knotsDim  = KnotsSize;
-  drawPoles = ShowPoles;
-  polesLook = PolesColor;
+  
+  
+  
+  
+  
+  
 }
 
 void DrawTrSurf_BSplineCurve2d::DrawOn (Draw_Display& dis) const
index 6bc6d6b01f54c8ca5494031e35b382f65f29bea8..c1fd402e455bfa52f287f4812b8d790dbf4a9b8d 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DrawTrSurf_BSplineSurface.hxx>
 
 #include <Adaptor3d_IsoCurve.hxx>
@@ -32,14 +34,14 @@ IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_BSplineSurface, DrawTrSurf_Surface)
 
 DrawTrSurf_BSplineSurface::DrawTrSurf_BSplineSurface (const Handle(Geom_BSplineSurface)& S)
 : DrawTrSurf_Surface (S, S->NbUKnots()-2, S->NbVKnots()-2,
-                      Draw_jaune, Draw_bleu, 30, 0.05, 0)
+                      Draw_jaune, Draw_bleu, 30, 0.05, 0), drawPoles(Standard_True), drawKnots(Standard_True), knotsIsos(Standard_True), knotsForm(Draw_Losange), knotsDim(5)
 {
-  drawPoles = Standard_True;
-  drawKnots = Standard_True;
-  knotsIsos  = Standard_True;
-  knotsForm = Draw_Losange;
+  
+  
+  
+  
   knotsLook = Draw_violet;
-  knotsDim  = 5;
+  
   polesLook = Draw_rouge;
 }
 
@@ -49,15 +51,15 @@ DrawTrSurf_BSplineSurface::DrawTrSurf_BSplineSurface (const Handle(Geom_BSplineS
                                                       const Standard_Integer KnotsSize, const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots,
                                                       const Standard_Integer Discret, const Standard_Real Deflection, const Standard_Integer DrawMode)
 : DrawTrSurf_Surface (S, S->NbUKnots()-2, S->NbVKnots()-2, BoundsColor,
-                      IsosColor, Discret, Deflection, DrawMode)
+                      IsosColor, Discret, Deflection, DrawMode), knotsIsos(Standard_True), drawPoles(ShowPoles), drawKnots(ShowKnots), knotsForm(KnotsShape), knotsLook(KnotsColor), knotsDim(KnotsSize), polesLook(PolesColor)
 {
-  knotsIsos  = Standard_True;
-  drawPoles = ShowPoles;
-  drawKnots = ShowKnots;
-  knotsForm = KnotsShape;
-  knotsLook = KnotsColor;
-  knotsDim  = KnotsSize;
-  polesLook = PolesColor;
+  
+  
+  
+  
+  
+  
+  
 }
 
 DrawTrSurf_BSplineSurface::DrawTrSurf_BSplineSurface (const Handle(Geom_BSplineSurface)& S, const Standard_Integer NbUIsos,
@@ -67,23 +69,23 @@ DrawTrSurf_BSplineSurface::DrawTrSurf_BSplineSurface (const Handle(Geom_BSplineS
                                                       const Standard_Integer KnotsSize, const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots,
                                                       const Standard_Integer Discret, const Standard_Real Deflection, const Standard_Integer DrawMode) 
 : DrawTrSurf_Surface (S, Abs(NbUIsos), Abs(NbVIsos), BoundsColor,
-                      IsosColor, Discret, Deflection, DrawMode)
+                      IsosColor, Discret, Deflection, DrawMode), knotsIsos(Standard_False), drawPoles(ShowPoles), drawKnots(ShowKnots), knotsForm(KnotsShape), knotsLook(KnotsColor), knotsDim(KnotsSize), polesLook(PolesColor)
 {
-  knotsIsos  = Standard_False;
-  drawPoles  = ShowPoles;
-  drawKnots  = ShowKnots;
-  knotsForm  = KnotsShape;
-  knotsLook  = KnotsColor;
-  knotsDim   = KnotsSize;
-  polesLook  = PolesColor;
+  
+  
+  
+  
+  
+  
+  
 }
 
 void DrawTrSurf_BSplineSurface::DrawOn (Draw_Display& dis) const
 {
   Handle(Geom_BSplineSurface) S = Handle(Geom_BSplineSurface)::DownCast(surf);
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
-  Standard_Real Ua,Ub,Va,Vb;
+  Standard_Real Ua = NAN,Ub = NAN,Va = NAN,Vb = NAN;
   S->Bounds(Ua,Ub,Va,Vb);
 
   if (drawPoles)
@@ -121,7 +123,7 @@ void DrawTrSurf_BSplineSurface::DrawOn (Draw_Display& dis) const
 
   if (knotsIsos)
   {
-    Standard_Integer first, last;
+    Standard_Integer first = 0, last = 0;
     Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface();
     HS->Load(surf);
     
@@ -146,7 +148,7 @@ void DrawTrSurf_BSplineSurface::DrawOn (Draw_Display& dis) const
 
   if (drawKnots)
   {
-    Standard_Integer first, last;
+    Standard_Integer first = 0, last = 0;
     Standard_Integer NbUKnots = S->NbUKnots();
     TColStd_Array1OfReal SUKnots (1, NbUKnots);
     S->UKnots (SUKnots); 
@@ -225,7 +227,7 @@ void DrawTrSurf_BSplineSurface::FindUKnot (const Standard_Real X, const Standard
   gp_Pnt2d p1(X,Y);
   UIndex++;
   Standard_Integer NbUKnots = bs->NbUKnots();
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   surf->Bounds (U1, U2, V1, V2);
   while (UIndex <= NbUKnots)
   {
@@ -245,7 +247,7 @@ void DrawTrSurf_BSplineSurface::FindVKnot (const Standard_Real X, const Standard
   gp_Pnt2d p1(X,Y);
   VIndex++;
   Standard_Integer NbVKnots = bs->NbVKnots();
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   surf->Bounds (U1, U2, V1, V2);
   while (VIndex <= NbVKnots)
   {
index 7f4034967d57ff77d578db102880cabd93a40967..d728665c24fe8d5e81350bce332fd881776a4e7a 100644 (file)
@@ -27,9 +27,9 @@
 IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_BezierCurve, DrawTrSurf_Curve)
 
 DrawTrSurf_BezierCurve::DrawTrSurf_BezierCurve (const Handle(Geom_BezierCurve)& C)
-: DrawTrSurf_Curve (C, Draw_vert, 16, 0.05, 1)
+: DrawTrSurf_Curve (C, Draw_vert, 16, 0.05, 1), drawPoles(Standard_True)
 {
-  drawPoles = Standard_True;
+  
   polesLook = Draw_rouge;
 }
 
@@ -38,10 +38,10 @@ DrawTrSurf_BezierCurve::DrawTrSurf_BezierCurve (
   const Draw_Color& PolesColor, const Standard_Boolean ShowPoles, 
   const Standard_Integer Discret,const Standard_Real Deflection,
   const Standard_Integer DrawMode )
-: DrawTrSurf_Curve (C, CurvColor, Discret, Deflection, DrawMode)
+: DrawTrSurf_Curve (C, CurvColor, Discret, Deflection, DrawMode), drawPoles(ShowPoles), polesLook(PolesColor)
 {
-  drawPoles = ShowPoles;
-  polesLook = PolesColor;
+  
+  
 }
 
 void DrawTrSurf_BezierCurve::DrawOn (Draw_Display& dis) const
index 4d862c783e3f6a2af26aad4af9a852ee8a19309d..a420b27f6381da0fcef5e623441c8588890f23c9 100644 (file)
 IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_BezierCurve2d, DrawTrSurf_Curve2d)
 
 DrawTrSurf_BezierCurve2d::DrawTrSurf_BezierCurve2d (const Handle(Geom2d_BezierCurve)& C)
-: DrawTrSurf_Curve2d (C, Draw_vert, 50)
+: DrawTrSurf_Curve2d (C, Draw_vert, 50), drawPoles(Standard_True)
 {
-  drawPoles = Standard_True;
+  
   polesLook = Draw_rouge;
 }
 
 DrawTrSurf_BezierCurve2d::DrawTrSurf_BezierCurve2d (const Handle(Geom2d_BezierCurve)& C, const Draw_Color& CurvColor,
                                                     const Draw_Color& PolesColor, const Standard_Boolean ShowPoles,
                                                     const Standard_Integer Discret)
-: DrawTrSurf_Curve2d (C, CurvColor, Discret)
+: DrawTrSurf_Curve2d (C, CurvColor, Discret), drawPoles(ShowPoles), polesLook(PolesColor)
 {
-  drawPoles = ShowPoles;
-  polesLook = PolesColor;
+  
+  
 }
 
 void DrawTrSurf_BezierCurve2d::DrawOn (Draw_Display& dis) const
index 04818dafae8f1318ea33093d3190b24218086733..0eaeb36345047a2e0519e8d46edf11ef740c0cbb 100644 (file)
@@ -28,9 +28,9 @@
 IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_BezierSurface, DrawTrSurf_Surface)
 
 DrawTrSurf_BezierSurface::DrawTrSurf_BezierSurface (const Handle(Geom_BezierSurface)& S)
-: DrawTrSurf_Surface (S, 1, 1, Draw_jaune, Draw_bleu, 30, 0.05, 0)
+: DrawTrSurf_Surface (S, 1, 1, Draw_jaune, Draw_bleu, 30, 0.05, 0), drawPoles(Standard_True)
 {
-  drawPoles = Standard_True;
+  
   polesLook = Draw_rouge;
 }
 
@@ -41,15 +41,15 @@ DrawTrSurf_BezierSurface::DrawTrSurf_BezierSurface (const Handle(Geom_BezierSurf
                                                     const Standard_Integer Discret,const Standard_Real Deflection,
                                                     const Standard_Integer DrawMode)
 : DrawTrSurf_Surface (S, NbUIsos, NbVIsos, BoundsColor, IsosColor, 
-  Discret, Deflection, DrawMode)
+  Discret, Deflection, DrawMode), drawPoles(ShowPoles), polesLook(PolesColor)
 {
-  drawPoles = ShowPoles;
-  polesLook = PolesColor;
+  
+  
 }
 
 void DrawTrSurf_BezierSurface::DrawOn (Draw_Display& dis) const
 {
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   Handle(Geom_BezierSurface) S = Handle(Geom_BezierSurface)::DownCast(surf);
   if (drawPoles)
   {
index 826e875ccc9f5325d3ee3773e5c7644edc7681dd..6c181f0ce4cffbe46099eadfc26ba55344fdb4b7 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DrawTrSurf_Curve.hxx>
 
 #include <Draw_Color.hxx>
@@ -145,18 +147,18 @@ void DrawTrSurf_Curve::DrawOn (Draw_Display& dis) const
   }
 // Draw the curvature Radius      
   if (dispcurvradius && (C.GetType() != GeomAbs_Line)) {
-    Standard_Integer ii;
-    Standard_Integer intrv, nbintv = C.NbIntervals(GeomAbs_CN);
+    Standard_Integer ii = 0;
+    Standard_Integer intrv = 0, nbintv = C.NbIntervals(GeomAbs_CN);
     TColStd_Array1OfReal TI(1,nbintv+1);
     C.Intervals(TI,GeomAbs_CN);
-    Standard_Real Resolution = 1.0e-9, Curvature;
+    Standard_Real Resolution = 1.0e-9, Curvature = NAN;
     GeomLProp_CLProps LProp(curv, 2, Resolution);
     gp_Pnt P1, P2;    
 
     for (intrv = 1; intrv <= nbintv; intrv++) {
        Standard_Real t = TI(intrv);
        Standard_Real step = (TI(intrv+1) - t) / GetDiscretisation();
-       Standard_Real LRad, ratio;
+       Standard_Real LRad = NAN, ratio = NAN;
        for (ii = 1; ii <= GetDiscretisation(); ii++) {  
          LProp.SetParameter(t);
           if (LProp.IsTangentDefined()) {
index 520426b73bf7cabe6f4abaaff66906ee61afdab2..8891955367cfd8ecdddbc3ce6d805bf79dab0785 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DrawTrSurf_Curve2d.hxx>
 
 #include <Draw_Color.hxx>
@@ -41,14 +43,14 @@ extern Standard_Boolean Draw_Bounds;
 //=======================================================================
 DrawTrSurf_Curve2d::DrawTrSurf_Curve2d (const Handle(Geom2d_Curve)& C,
                                         const Standard_Boolean DispOrigin)
-: DrawTrSurf_Drawable (50)
+: DrawTrSurf_Drawable (50), curv(C), disporigin(DispOrigin), dispcurvradius(Standard_False), radiusmax(1.0e3), radiusratio(0.1)
 {
-  curv = C;
+  
   look = Draw_vert;
-  disporigin = DispOrigin ;
-  dispcurvradius = Standard_False;
-  radiusmax =  1.0e3;
-  radiusratio = 0.1;
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -62,14 +64,14 @@ DrawTrSurf_Curve2d::DrawTrSurf_Curve2d (const Handle(Geom2d_Curve)& C,
                                        const Standard_Boolean DispCurvRadius,
                                        const Standard_Real  RadiusMax,
                                        const Standard_Real  RadiusRatio) :
-       DrawTrSurf_Drawable (Discret)
+       DrawTrSurf_Drawable (Discret), curv(C), look(aColor), disporigin(DispOrigin), dispcurvradius(DispCurvRadius), radiusmax(RadiusMax), radiusratio(RadiusRatio)
 {
-  curv = C;
-  look = aColor;
-  disporigin = DispOrigin ;
-  dispcurvradius = DispCurvRadius;
-  radiusmax =  RadiusMax;
-  radiusratio = RadiusRatio;
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -140,18 +142,18 @@ void DrawTrSurf_Curve2d::DrawOn (Draw_Display& dis) const
 
 // Draw the curvature Radius      
   if (dispcurvradius && (C2d.GetType() != GeomAbs_Line)) {
-    Standard_Integer ii;
-    Standard_Integer intrv, nbintv = C2d.NbIntervals(GeomAbs_CN);
+    Standard_Integer ii = 0;
+    Standard_Integer intrv = 0, nbintv = C2d.NbIntervals(GeomAbs_CN);
     TColStd_Array1OfReal TI(1,nbintv+1);
     C2d.Intervals(TI,GeomAbs_CN);
-    Standard_Real Resolution = 1.0e-9, Curvature;
+    Standard_Real Resolution = 1.0e-9, Curvature = NAN;
     Geom2dLProp_CLProps2d LProp(curv, 2, Resolution);
     gp_Pnt2d P1, P2;    
 
     for (intrv = 1; intrv <= nbintv; intrv++) {
        Standard_Real t = TI(intrv);
        Standard_Real step = (TI(intrv+1) - t) / GetDiscretisation();
-       Standard_Real LRad, ratio;
+       Standard_Real LRad = NAN, ratio = NAN;
        for (ii = 1; ii <= GetDiscretisation(); ii++) {  
          LProp.SetParameter(t);
           if (LProp.IsTangentDefined()) {
index 180d0d3ed60a8a084ebb81a03bb382fd2b54ccc4..21d55cd1ae4f227e9b08876cf9e8876c0648d443 100644 (file)
@@ -57,7 +57,7 @@ void DrawTrSurf_Drawable::DrawCurve2dOn (Adaptor2d_Curve2d&   C,
   gp_Pnt P;
   
   gp_Pnt2d aPoint2d,
-  *aPoint2dPtr ;
+  *aPoint2dPtr = nullptr ;
   if (myDrawMode == 1) {
     Standard_Real Fleche = myDeflection/aDisplay.Zoom();
     GCPnts_UniformDeflection LineVu(C,Fleche);
@@ -73,7 +73,7 @@ void DrawTrSurf_Drawable::DrawCurve2dOn (Adaptor2d_Curve2d&   C,
     }  
   }
   else {
-    Standard_Integer intrv, nbintv = C.NbIntervals(GeomAbs_CN);
+    Standard_Integer intrv = 0, nbintv = C.NbIntervals(GeomAbs_CN);
     TColStd_Array1OfReal TI(1,nbintv+1);
     C.Intervals(TI,GeomAbs_CN);
     C.D0(C.FirstParameter(),aPoint2d);
@@ -144,8 +144,8 @@ void DrawTrSurf_Drawable::DrawCurveOn (Adaptor3d_Curve&   C,
   }
   else
   {
-    Standard_Integer j;
-    Standard_Integer intrv, nbintv = C.NbIntervals(GeomAbs_CN);
+    Standard_Integer j = 0;
+    Standard_Integer intrv = 0, nbintv = C.NbIntervals(GeomAbs_CN);
     TColStd_Array1OfReal TI(1,nbintv+1);
     C.Intervals(TI,GeomAbs_CN);
     C.D0(C.FirstParameter(),P);
index 20cc708de5ffceaa3d1968cb430d8ce6349044ab..7731a8c0107d7eea6a20193d599c42be8c2663c1 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DrawTrSurf_Point.hxx>
 
 #include <Draw_Color.hxx>
@@ -177,7 +179,7 @@ Handle(Draw_Drawable3D) DrawTrSurf_Point::Restore (Standard_IStream& theStream)
   const DrawTrSurf_Params& aParams = DrawTrSurf::Parameters();
   Standard_Integer is3d = 0;
   theStream >> is3d;
-  Standard_Real x,y,z = 0.0;
+  Standard_Real x = NAN,y = NAN,z = 0.0;
   if (is3d)
   {
     theStream >> x >> y >> z;
index b9901e649b43ab87bba0a44536b8c4ee597589d4..1f8d603a25417b64f68e200b15fd60ce6740df32 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DrawTrSurf_Surface.hxx>
 
 #include <Adaptor3d_IsoCurve.hxx>
@@ -33,13 +35,13 @@ Standard_Real DrawTrSurf_SurfaceLimit = 400;
 //purpose  :
 //=======================================================================
 DrawTrSurf_Surface::DrawTrSurf_Surface (const Handle(Geom_Surface)& S) 
-: DrawTrSurf_Drawable (16, 0.01, 1) 
+: DrawTrSurf_Drawable (16, 0.01, 1), surf(S), nbUIsos(1), nbVIsos(1) 
 {
-  surf = S;
+  
   boundsLook = Draw_jaune;
   isosLook = Draw_bleu;
-  nbUIsos = 1;
-  nbVIsos = 1;
+  
+  
 }
 
 //=======================================================================
@@ -52,13 +54,13 @@ DrawTrSurf_Surface::DrawTrSurf_Surface
    const Draw_Color& BoundsColor, const Draw_Color& IsosColor,
    const Standard_Integer Discret, const Standard_Real Deflection,
    const Standard_Integer DrawMode) 
-:  DrawTrSurf_Drawable (Discret, Deflection, DrawMode) 
+:  DrawTrSurf_Drawable (Discret, Deflection, DrawMode), surf(S), boundsLook(BoundsColor), isosLook(IsosColor), nbUIsos(Abs(Nu)), nbVIsos(Abs(Nv)) 
 {
-  surf = S;
-  boundsLook = BoundsColor;
-  isosLook = IsosColor;
-  nbUIsos = Abs(Nu);
-  nbVIsos = Abs(Nv);
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -76,7 +78,7 @@ void DrawTrSurf_Surface::DrawOn (Draw_Display& dis) const
 //=======================================================================
 void DrawTrSurf_Surface::DrawOn (Draw_Display& dis, const Standard_Boolean Iso) const 
 {
-  Standard_Real UFirst, ULast, VFirst, VLast;
+  Standard_Real UFirst = NAN, ULast = NAN, VFirst = NAN, VLast = NAN;
   surf->Bounds (UFirst, ULast, VFirst, VLast);
   
   Standard_Boolean UfirstInf = Precision::IsNegativeInfinite(UFirst);
@@ -86,7 +88,7 @@ void DrawTrSurf_Surface::DrawOn (Draw_Display& dis, const Standard_Boolean Iso)
   
   if (UfirstInf || UlastInf) {
     gp_Pnt P1,P2;
-    Standard_Real v;
+    Standard_Real v = NAN;
     if (VfirstInf && VlastInf) 
       v = 0;
     else if (VfirstInf)
@@ -166,7 +168,7 @@ void DrawTrSurf_Surface::DrawOn (Draw_Display& dis, const Standard_Boolean Iso)
   
   if (Iso) {
     dis.SetColor(isosLook);
-    Standard_Integer i, j;
+    Standard_Integer i = 0, j = 0;
     
     Standard_Real Du = (ULast - UFirst) / (nbUIsos + 1);
     Standard_Real U = UFirst;
index 87885b04c8f8649193fc88df86dd80237b7061ed..1c387e4909eab356d11f076340ccf7594fb5ea03 100644 (file)
@@ -40,7 +40,7 @@ DrawTrSurf_Triangulation::DrawTrSurf_Triangulation (const Handle(Poly_Triangulat
   // Build the connect tool
   Poly_Connect pc(T);
 
-  Standard_Integer i,j,nFree, nInternal, nbTriangles = T->NbTriangles();
+  Standard_Integer i = 0,j = 0,nFree = 0, nInternal = 0, nbTriangles = T->NbTriangles();
   Standard_Integer t[3];
 
   // count the free edges
@@ -88,7 +88,7 @@ DrawTrSurf_Triangulation::DrawTrSurf_Triangulation (const Handle(Poly_Triangulat
 void DrawTrSurf_Triangulation::DrawOn (Draw_Display& dis) const
 {
   // Display the edges
-  Standard_Integer i,n;
+  Standard_Integer i = 0,n = 0;
 
   // free edges
 
@@ -124,7 +124,7 @@ void DrawTrSurf_Triangulation::DrawOn (Draw_Display& dis) const
   if (myTriangles) {
     dis.SetColor(Draw_vert);
     n = myTriangulation->NbTriangles();
-    Standard_Integer t[3],j;
+    Standard_Integer t[3],j = 0;
     for (i = 1; i <= n; i++) {
       myTriangulation->Triangle (i).Get (t[0],t[1],t[2]);
       gp_Pnt P(0,0,0);
index 0fe1b7ea1710e9d9cd29b2df4ae563414963987c..698d1e865d0a8bbece85784a3383a77c0fd5a225 100644 (file)
@@ -43,7 +43,7 @@ DrawTrSurf_Triangulation2D::DrawTrSurf_Triangulation2D
   // Build the connect tool
   Poly_Connect pc(T);
 
-  Standard_Integer i,j,nFree, nInternal, nbTriangles = T->NbTriangles();
+  Standard_Integer i = 0,j = 0,nFree = 0, nInternal = 0, nbTriangles = T->NbTriangles();
   Standard_Integer t[3];
 
   // count the free edges
@@ -102,7 +102,7 @@ Handle(Poly_Triangulation) DrawTrSurf_Triangulation2D::Triangulation() const
 void DrawTrSurf_Triangulation2D::DrawOn(Draw_Display& dis) const 
 {
   // Display the edges
-  Standard_Integer i,n;
+  Standard_Integer i = 0,n = 0;
   if (myTriangulation->HasUVNodes())
   {
     // free edges
index 63f4e5494eafaafdebcb09777b68cd5f4f6f6702..6309b234b8139af111ca6608b13de2a47e700a13 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DsgPrs.hxx>
 
 #include <Aspect_TypeOfMarker.hxx>
@@ -226,14 +228,14 @@ void DsgPrs::ComputeCurvilinearFacesLengthPresentation( const Standard_Real Firs
 {
   GeomAPI_ProjectPointOnSurf ProjectorOnSurface;
   GeomAPI_ProjectPointOnCurve ProjectorOnCurve;
-  Standard_Real U1, V1, U2, V2;
-  Standard_Real LastU, LastV;
+  Standard_Real U1 = NAN, V1 = NAN, U2 = NAN, V2 = NAN;
+  Standard_Real LastU = NAN, LastV = NAN;
   Standard_Real SquareTolerance = Precision::SquareConfusion();
 
   ProjectorOnSurface.Init( AttachmentPoint1, SecondSurf );
   Standard_Integer Index(1);
   Standard_Real MinDist = RealLast();
-  Standard_Real LocalU, LocalV;
+  Standard_Real LocalU = NAN, LocalV = NAN;
   gp_Vec D1U, D1V;
   gp_Dir LocalDir;
   for (Standard_Integer i = 1; i <= ProjectorOnSurface.NbPoints(); i++)
@@ -585,7 +587,7 @@ Standard_Real DsgPrs::DistanceFromApex(const gp_Elips & elips,
                                       const gp_Pnt   & Apex,
                                       const Standard_Real par)
 {
-  Standard_Real dist;
+  Standard_Real dist = NAN;
   Standard_Real parApex = ElCLib::Parameter ( elips, Apex );
   if(parApex == 0.0 || parApex == M_PI) 
     {//Major case
index 1a8729bf6c4e7ecadfd132faa5d9c121d7522e64..04d323f3eaa77a4db6fa464504654fe43e7c0396 100644 (file)
@@ -37,6 +37,7 @@
 #include <TCollection_ExtendedString.hxx>
 #include <UnitsAPI.hxx>
 
+#include <math.h>
 #include <stdio.h>
 //------------------------------------------------------------------------------------------------------------------
 // Returns 1 if C is above of CMin; 0 if C is bitween CMin and CMax; -1 if C is Below CMax   
@@ -117,7 +118,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   GC_MakeCircle mkCirc(AttachmentPnt, OppositePnt, aPnt); 
   gp_Circ aCircle2 = mkCirc.Value()->Circ();
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real AttParam = ElCLib::Parameter(aCircle2, AttachmentPnt);  //must be equal to zero (look circle construction)
   Standard_Real OppParam = ElCLib::Parameter(aCircle2, OppositePnt);    
   
@@ -340,7 +341,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
 
   gp_Circ AngleCirc, AttachCirc;
-  Standard_Real FirstParAngleCirc, LastParAngleCirc, FirstParAttachCirc, LastParAttachCirc;
+  Standard_Real FirstParAngleCirc = NAN, LastParAngleCirc = NAN, FirstParAttachCirc = NAN, LastParAttachCirc = NAN;
   gp_Pnt EndOfArrow1, EndOfArrow2, ProjAttachPoint2;
   gp_Dir DirOfArrow1, DirOfArrow2;
   DsgPrs::ComputeFacesAnglePresentation( LA->ArrowAspect()->Length(),
index 5424082130e57e57cd5c0bd2afcbe05bfd5d9b2a..c16ef56b45af06e825c8144be5695d41176e68f5 100644 (file)
@@ -49,7 +49,7 @@ void DsgPrs_ConcentricPresentation::Add(
   aPrims->AddBound(nbp+1);
   aPrims->AddVertex(pt1);
   Standard_Real ucur = dteta;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for (i = 2; i<=nbp; i++, ucur += dteta)
     aPrims->AddVertex(ElCLib::Value(ucur, Circ));
   aPrims->AddVertex(pt1);
index d40aee4ea3223ecc4c3aaedeb6bebfc63966e0ae..05f19100be5034a00c3801ad280955f56471fb40 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DsgPrs_DatumPrs.hxx>
 #include <DsgPrs_XYZAxisPresentation.hxx>
 #include <gp_Dir.hxx>
@@ -38,7 +40,7 @@ void DsgPrs_DatumPrs::Add (const Handle(Prs3d_Presentation)& thePresentation,
   gp_Dir aYDir = anAxis.YDirection();
   gp_Dir aZDir = anAxis.Direction();
 
-  Standard_Real anAxisLength;
+  Standard_Real anAxisLength = NAN;
   const Standard_Boolean toDrawLabels = theDrawer->DatumAspect()->ToDrawLabels();
 
   Prs3d_DatumAxes anAxes = aDatumAspect->DatumAxes();
index d6312314b2f4d097404b02370fae4034f6cdb06e..4a18aa2dd3c11d279d702ed04e2f3ae05b4529b2 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DsgPrs_DiameterPresentation.hxx>
 
 #include <DsgPrs.hxx>
@@ -101,7 +103,7 @@ static Standard_Boolean DsgPrs_InDomain(const Standard_Real fpar,
       return ((para >= fpar) && (para <= lpar));
     else { // fpar > lpar
       Standard_Real delta = 2.*M_PI-fpar;
-      Standard_Real lp, par, fp;
+      Standard_Real lp = NAN, par = NAN, fp = NAN;
       lp = lpar + delta;
       par = para + delta;
       while(lp > 2*M_PI) lp-=2*M_PI;
index c6a7281a60a4b15b8a9fa60b87ff1e04bc4cc05b..a61b2dfd8a6cc5f862b1fecf44f006e67625b067 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <DsgPrs.hxx>
 #include <DsgPrs_EqualDistancePresentation.hxx>
 #include <ElCLib.hxx>
@@ -64,7 +66,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
   // Two small lines in the middle of this line
   gp_Pnt Middle( (Middle12.XYZ() + Middle34.XYZ()) * 0.5 ), aTextPos;
   Standard_Real Dist = Middle12.Distance( Middle34 );
-  Standard_Real SmallDist;
+  Standard_Real SmallDist = NAN;
   gp_Dir LineDir, OrtDir;
   gp_Vec LineVec, OrtVec;
 
@@ -171,7 +173,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
   const Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
   aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
-  Standard_Real aPar11, aPar12, aPar21, aPar22;
+  Standard_Real aPar11 = NAN, aPar12 = NAN, aPar21 = NAN, aPar22 = NAN;
   if(aCirc1.Radius() > Precision::Confusion()){
     aPar11 = ElCLib::Parameter (aCirc1, aPoint1);
     aPar12 = ElCLib::Parameter(aCirc1, aPoint2);
@@ -194,8 +196,8 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
   aPrims->AddVertex(aPoint4);
   aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
-  Standard_Integer i, aNodeNb;
-  Standard_Real aDelta, aCurPar;
+  Standard_Integer i = 0, aNodeNb = 0;
+  Standard_Real aDelta = NAN, aCurPar = NAN;
   if(aPar12 < aPar11 ) aPar12 += 2.*M_PI;
   if (Abs(aPar12 - aPar11) > Precision::Confusion())
   {
index 2d1e9825beafc0662709d8b7b06df98eef36a137..626d41d44e24994c27c47b01c27105c541baeb36 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <DsgPrs.hxx>
 #include <DsgPrs_EqualRadiusPresentation.hxx>
 #include <gce_MakeDir.hxx>
@@ -57,7 +59,7 @@ void DsgPrs_EqualRadiusPresentation::Add( const Handle( Prs3d_Presentation )& aP
 
 //ota === beging ===
   gp_Pnt Middle( (FirstCenter.XYZ() + SecondCenter.XYZ()) *0.5 ), aTextPos;
-  Standard_Real SmallDist;
+  Standard_Real SmallDist = NAN;
   //Mark of constraint
   TCollection_ExtendedString aText("==");
   
index 2627f6139574db857eb4d0c7d5484c577cb26020..bc321945fa190ad0f1980cf88f707b64b766dfcb 100644 (file)
@@ -31,6 +31,7 @@
 #include <Prs3d_Text.hxx>
 #include <TCollection_ExtendedString.hxx>
 
+#include <math.h>
 #include <stdio.h>
 //=======================================================================
 //function : Add
@@ -56,8 +57,8 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
   char valcar[80];
   sprintf(valcar,"%5.2f",theval);
 
-  Standard_Real FirstParCirc, LastParCirc;
-  Standard_Boolean SpecCase;
+  Standard_Real FirstParCirc = NAN, LastParCirc = NAN;
+  Standard_Boolean SpecCase = 0;
   gp_Dir DirOfArrow;
   gp_Circ FilletCirc;
   //  gp_Pnt NewPosition, EndOfArrow;
index 09e43f7c203c0dccea43abb13024c6eb0ddf23db..c04e23489e8b9567bd7429f5065071901d56d3c6 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DsgPrs_LengthPresentation.hxx>
 
 #include <DsgPrs.hxx>
@@ -48,7 +50,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   gp_Pnt Proj1 = ElCLib::Value(ElCLib::Parameter(L1,OffsetPoint),L1);
   gp_Pnt Proj2 = ElCLib::Value(ElCLib::Parameter(L2,OffsetPoint),L2);
   gp_Lin L3 = Proj1.IsEqual(Proj2,Precision::Confusion())? gp_Lin(Proj1,aDirection) : gce_MakeLin(Proj1,Proj2);
-  Standard_Real parmin,parmax,parcur;
+  Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
   parmin = ElCLib::Parameter(L3,Proj1);
   parmax = parmin;
   parcur = ElCLib::Parameter(L3,Proj2);
@@ -204,7 +206,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   gp_Pnt Proj1 = ElCLib::Value(ElCLib::Parameter(L1,OffsetPoint),L1);
   gp_Pnt Proj2 = ElCLib::Value(ElCLib::Parameter(L2,OffsetPoint),L2);
   gp_Lin L3 = Proj1.IsEqual(Proj2,Precision::Confusion())? gp_Lin(Proj1,aDirection) : gce_MakeLin(Proj1,Proj2);
-  Standard_Real parmin,parmax,parcur;
+  Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
   parmin = ElCLib::Parameter(L3,Proj1);
   parmax = parmin;
   parcur = ElCLib::Parameter(L3,Proj2);
@@ -279,7 +281,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   gp_Pnt EndOfArrow2;
   gp_Dir DirOfArrow1;
   Handle( Geom_Curve ) VCurve, UCurve;
-  Standard_Real FirstU, deltaU = 0.0e0, FirstV, deltaV = 0.0e0;
+  Standard_Real FirstU = NAN, deltaU = 0.0e0, FirstV = NAN, deltaV = 0.0e0;
   
   DsgPrs::ComputeCurvilinearFacesLengthPresentation( LA->ArrowAspect()->Length(),
                                                     LA->ArrowAspect()->Length(),
@@ -322,8 +324,8 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
  
   // Two curves from end of Arrow2 to AttachmentPoint2
-  Standard_Real Alpha, delta;
-  Standard_Integer NodeNumber;
+  Standard_Real Alpha = NAN, delta = NAN;
+  Standard_Integer NodeNumber = 0;
   
   Alpha  = Abs( deltaU );
   if (Alpha > Precision::Angular() && Alpha<Precision::Infinite())
index 54f2a276c31ea9da52faef18b35d401a904ba3f9..dc5ac453f015e3b48ed91efdbf0c19263f5f30ea 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <DsgPrs_OffsetPresentation.hxx>
 
 #include <ElCLib.hxx>
@@ -62,7 +64,7 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
     gp_Dir d4 (v4);
     L4 = gp_Lin(Proj1,d4); // normale
   }
-  Standard_Real parmin,parmax,parcur;
+  Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
   parmin = ElCLib::Parameter(L3,Proj1);
   parmax = parmin;
   parcur = ElCLib::Parameter(L3,Proj2);
index 1ca368be20dadff2ad6ae80f4b367b11f64dcc8f..773ada23b27c8b71b5f50bad8b44031526202770 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <DsgPrs.hxx>
 #include <DsgPrs_ParalPresentation.hxx>
 #include <ElCLib.hxx>
@@ -45,7 +47,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   gp_Pnt Proj1 = ElCLib::Value(ElCLib::Parameter(L1,OffsetPoint),L1);
   gp_Pnt Proj2 = ElCLib::Value(ElCLib::Parameter(L2,OffsetPoint),L2);
   gp_Lin L3 = gce_MakeLin(Proj1,Proj2);
-  Standard_Real parmin,parmax,parcur;
+  Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
   parmin = ElCLib::Parameter(L3,Proj1);
   parmax = parmin;
   parcur = ElCLib::Parameter(L3,Proj2);
@@ -131,7 +133,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   gp_Pnt Proj1 = ElCLib::Value(ElCLib::Parameter(L1,OffsetPoint),L1);
   gp_Pnt Proj2 = ElCLib::Value(ElCLib::Parameter(L2,OffsetPoint),L2);
   gp_Lin L3 = gce_MakeLin(Proj1,Proj2);
-  Standard_Real parmin,parmax,parcur;
+  Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
   parmin = ElCLib::Parameter(L3,Proj1);
   parmax = parmin;
   parcur = ElCLib::Parameter(L3,Proj2);
index 60071354e9f71e41f9535411e8af731ebaf831e0..45203f3176079ec667e636094549752d9fc91cfc 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepBndLib.hxx>
@@ -56,14 +58,14 @@ static Standard_Boolean FindPointOnFace(const TopoDS_Face& face, gp_Pnt2d& pt2d)
     return Standard_False;
   }
 
-  Standard_Integer npoints, nptt = 21;
+  Standard_Integer npoints = 0, nptt = 21;
   TColgp_Array1OfPnt2d points(1, nptt);
   Standard_Real area=0., xcent=0., ycent=0.;
   TopExp_Explorer edgeExp;
 
   for (edgeExp.Init(wireExp.Current(), TopAbs_EDGE); edgeExp.More(); edgeExp.Next()) {    
     // discretize the 2d curve
-    Standard_Real first, last;
+    Standard_Real first = NAN, last = NAN;
     Handle(Geom2d_Curve) c2d = BRep_Tool::CurveOnSurface(TopoDS::Edge(edgeExp.Current()), face, first, last);
     if (TopoDS::Edge(edgeExp.Current()).Orientation() == TopAbs_REVERSED) {
       Standard_Real change = first;
@@ -76,7 +78,7 @@ static Standard_Boolean FindPointOnFace(const TopoDS_Face& face, gp_Pnt2d& pt2d)
       c2d->D0(last, points(2));
     }
     else {
-      Standard_Real deltaT, t;
+      Standard_Real deltaT = NAN, t = NAN;
       npoints = nptt;
       deltaT = (last - first) / (nptt-1);
       for (Standard_Integer i=1; i<=nptt; i++) {
@@ -95,7 +97,7 @@ static Standard_Boolean FindPointOnFace(const TopoDS_Face& face, gp_Pnt2d& pt2d)
       
     // compute the contribution to the center of gravity
 
-    Standard_Real h, c, d;
+    Standard_Real h = NAN, c = NAN, d = NAN;
     for (Standard_Integer i=1; i<=npoints-1; i++) {
 
       h = 0.5*(points(i).Y() + points(i+1).Y());
@@ -135,7 +137,7 @@ static Standard_Boolean ComputeDir(const TopoDS_Shape& shape, gp_Pnt& pt, gp_Dir
 {
   TopLoc_Location loc;
   if (shape.ShapeType() == TopAbs_EDGE) {
-    Standard_Real first, last;
+    Standard_Real first = NAN, last = NAN;
     Handle(Geom_Curve) curv0 = BRep_Tool::Curve(TopoDS::Edge(shape), loc, first, last);
     Handle(Geom_Curve) curve = Handle(Geom_Curve)::DownCast(curv0->Copy());
     curve->Transform(loc.Transformation()); 
@@ -150,7 +152,7 @@ static Standard_Boolean ComputeDir(const TopoDS_Shape& shape, gp_Pnt& pt, gp_Dir
     gp_Pnt2d pt2d;
     Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(shape));    
     if (BRep_Tool::NaturalRestriction(TopoDS::Face(shape))) {
-      Standard_Real u1, u2, v1, v2;
+      Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
       surface->Bounds(u1, u2, v1, v2);
       pt2d.SetCoord((u1+u2)*0.5, (v1+v2)*0.5);
     }
index d8d699143c8e5dcd72598972fde8ebdfcfb16841..7cdd1e50130d726c049710560a1fb6a3001d1e41 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <DsgPrs_SymmetricPresentation.hxx>
 #include <ElCLib.hxx>
 #include <gce_MakeLin.hxx>
@@ -58,7 +60,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   
   gp_Vec VL1(aDirection1);
   gp_Vec VLa(PjAttachPnt1,ProjOffsetPoint);
-  Standard_Real scal;
+  Standard_Real scal = NAN;
   scal = VL1.Dot(VLa);
   if (scal < 0) VL1.Reverse();
   VL1.Multiply(h);
@@ -85,7 +87,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   }
 
   gp_Lin L3 = gce_MakeLin(P1,P2);
-  Standard_Real parmin,parmax,parcur;
+  Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
   parmin = ElCLib::Parameter(L3,P1);
   parmax = parmin;
   parcur = ElCLib::Parameter(L3,P2);
@@ -108,7 +110,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   gp_Pnt PointMin = ElCLib::Value(parmin,L3);
   gp_Pnt PointMax = ElCLib::Value(parmax,L3);
 
-  Standard_Real X,Y,Z;
+  Standard_Real X = NAN,Y = NAN,Z = NAN;
   Standard_Real D1(aAxis.Distance(AttachmentPoint1)),coeff(.5);
   gp_Pnt pint,Pj_P1,P1Previous = P1;
   
@@ -143,7 +145,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   ===================================*/
 
   gp_Vec        Vfix;
-  Standard_Real alpha,b;
+  Standard_Real alpha = NAN,b = NAN;
 
   if(aAxis.Distance(P1) > D1*(1 + coeff) && !Cross){
 
@@ -441,7 +443,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   gp_Vec Vp(ProjCenter1,Center1);
   if (Vp.Magnitude() <= Precision::Confusion()) Vp = gp_Vec(aAxis.Direction())^aCircle1.Position().Direction();
 
-  Standard_Real Dt,R,h;
+  Standard_Real Dt = NAN,R = NAN,h = NAN;
   Dt = ProjCenter1.Distance(ProjOffsetPoint);
   R  = aCircle1.Radius();
   if (Dt > .999*R) {
@@ -456,7 +458,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   gp_Pnt P2 = ProjOffsetPoint.Translated(v);
 
   gp_Lin L3 = gce_MakeLin(P1,P2);
-  Standard_Real parmin,parmax,parcur;
+  Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
   parmin = ElCLib::Parameter(L3,P1);
   parmax = parmin;
   parcur = ElCLib::Parameter(L3,P2);
@@ -487,7 +489,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   Standard_Integer nbp = 10;
   Standard_Real ParamP1       = ElCLib::Parameter(aCircle1,P1);
   Standard_Real ParamPAttach1 = ElCLib::Parameter(aCircle1,AttachmentPoint1);
-  Standard_Real alpha,Dalpha,alphaIter;
+  Standard_Real alpha = NAN,Dalpha = NAN,alphaIter = NAN;
 
   alpha = fabs(ParamP1 - ParamPAttach1);
   if(ParamP1 < ParamPAttach1){
@@ -517,7 +519,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   aPrims->AddVertex(AttachmentPoint1);
   alphaIter = Dalpha;
   gp_Pnt PntIter;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = 2; i <= nbp; i++, alphaIter += Dalpha)
     aPrims->AddVertex(ElCLib::Value(ParamPAttach1 + alphaIter,aCircle1));
   aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
@@ -741,7 +743,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     gp_Pnt P2 = ProjOffsetPoint.Translated(PjAtt1_Att1.Reversed());
 
     gp_Lin L3 = gce_MakeLin(P1,P2);
-    Standard_Real parmin,parmax,parcur;
+    Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
     parmin = ElCLib::Parameter(L3,P1);
     parmax = parmin;
     parcur = ElCLib::Parameter(L3,P2);
index f13c9243f6f6c60dd54a8ed8114364a7602fa2c3..9471da4e00926d34f218b8b36f63b1ce5abd5074 100644 (file)
@@ -22,6 +22,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <ElSLib.hxx>
 #include <gp.hxx>
 #include <gp_Ax3.hxx>
@@ -233,7 +235,7 @@ gp_Vec ElSLib::SphereDN (const Standard_Real    U,
   const gp_XYZ& XDir = Pos.XDirection().XYZ();
   const gp_XYZ& YDir = Pos.YDirection().XYZ();
   const gp_XYZ& ZDir = Pos.Direction ().XYZ();
-  Standard_Real A1,A2,A3,X,Y,Z;
+  Standard_Real A1 = NAN,A2 = NAN,A3 = NAN,X = NAN,Y = NAN,Z = NAN;
   if (Nu == 0) {
     Standard_Real RSinV = Radius * sin(V);
     if (IsOdd (Nv)) { A1 = - RSinV * CosU; A2 = - RSinV * SinU; A3 =   RCosV; }
@@ -285,7 +287,7 @@ gp_Vec ElSLib::TorusDN (const Standard_Real    U,
   const gp_XYZ& XDir = Pos.XDirection().XYZ();
   const gp_XYZ& YDir = Pos.YDirection().XYZ();
   const gp_XYZ& ZDir = Pos.Direction ().XYZ();
-  Standard_Real A1,A2,A3,X=0,Y=0,Z=0;
+  Standard_Real A1 = NAN,A2 = NAN,A3 = NAN,X=0,Y=0,Z=0;
   //  Modified by skv - Tue Sep  9 15:10:34 2003 OCC620 Begin
   Standard_Real eps = 10.*(MinorRadius + MajorRadius)*RealEpsilon();
   //  Modified by skv - Tue Sep  9 15:10:34 2003 OCC620 End
@@ -1415,7 +1417,7 @@ void ElSLib::SphereParameters(const gp_Ax3& Pos,
   gp_Trsf T;
   T.SetTransformation (Pos);
   gp_Pnt Ploc = P.Transformed (T);
-  Standard_Real x, y, z;
+  Standard_Real x = NAN, y = NAN, z = NAN;
   Ploc.Coord (x, y, z);
   Standard_Real l = sqrt (x * x + y * y);
   if (l < gp::Resolution()) {    // point on axis Z of the sphere
@@ -1448,7 +1450,7 @@ void ElSLib::TorusParameters(const gp_Ax3& Pos,
   gp_Trsf Tref;
   Tref.SetTransformation (Pos);
   gp_Pnt Ploc = P.Transformed (Tref);
-  Standard_Real x, y, z;
+  Standard_Real x = NAN, y = NAN, z = NAN;
   Ploc.Coord (x, y, z);
 
   // all that to process case of  Major < Minor.
index c0b25eeab1e46d20af00788a9e93c0c4a29f60f3..1098de42bd21cea0cffcdb5a284c261558bd633b 100644 (file)
@@ -67,12 +67,12 @@ static Standard_Boolean LoadList (const char *theFileName,
   while (anIS.getline (aBuf, 512))
   {
     char* aCurPos = aBuf;
-    char* anItemName;
-    char* aPackageName;
-    char* aShortName;
-    char* aCheckFlag;
-    char* aFillSharedFlag;
-    char* aCategoryName;
+    char* anItemName = nullptr;
+    char* aPackageName = nullptr;
+    char* aShortName = nullptr;
+    char* aCheckFlag = nullptr;
+    char* aFillSharedFlag = nullptr;
+    char* aCategoryName = nullptr;
     Standard_Size aSepIdx = 0;
     aLineNum += 1;
     // -------------------------------------------------------------
@@ -358,7 +358,7 @@ Standard_Integer main (const Standard_Integer argc, const char* argv[])
   Standard_Integer anIndex = -1;
   if (argc > 4)
   {
-    char* aStopSymbol;
+    char* aStopSymbol = nullptr;
     anIndex = (Standard_Integer) strtol (argv[4], &aStopSymbol, 10);
     if (*aStopSymbol != '\0')
     {
index f213ed2006cf3f73ef53a85a4d5c80a4fe1f5f6e..c558716cb4ce39df6f4858459d237a97fe8dfbfe 100644 (file)
@@ -231,7 +231,7 @@ namespace exptocas {
   template <typename Base>
   parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (semantic_type) v)
     : Base (t)
-    , value (YY_MOVE (v))
+    , value (v)
   {}
 
   template <typename Base>
@@ -262,8 +262,7 @@ namespace exptocas {
   {}
 
 #if 201103L <= YY_CPLUSPLUS
-  parser::by_kind::by_kind (by_kind&& that)
-    : kind_ (that.kind_)
+  parser::by_kind::by_kind (by_kind&& that)      noexcept : kind_ (that.kind_)
   {
     that.clear ();
   }
@@ -341,8 +340,7 @@ namespace exptocas {
   parser::stack_symbol_type::stack_symbol_type ()
   {}
 
-  parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that)
-    : super_type (YY_MOVE (that.state), YY_MOVE (that.value))
+  parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that)  noexcept : super_type (that.state, YY_MOVE (that.value))
   {
 #if 201103L <= YY_CPLUSPLUS
     // that is emptied.
@@ -491,7 +489,7 @@ namespace exptocas {
   int
   parser::parse ()
   {
-    int yyn;
+    int yyn = 0;
     /// Length of the RHS of the rule being reduced.
     int yylen = 0;
 
@@ -503,7 +501,7 @@ namespace exptocas {
     symbol_type yyla;
 
     /// The return value of parse ().
-    int yyresult;
+    int yyresult = 0;
 
 #if YY_EXCEPTIONS
     try
@@ -935,7 +933,7 @@ namespace exptocas {
       {
         ++yynerrs_;
         std::string msg = YY_("syntax error");
-        error (YY_MOVE (msg));
+        error (msg);
       }
 
 
index 039b4bb37472ade1e303f88ad8762e78448edaa2..16b4e29dc43a70a5e9da2903730a9f83453b03c4 100644 (file)
@@ -481,7 +481,7 @@ namespace exptocas {
 
 #if 201103L <= YY_CPLUSPLUS
       /// Move constructor.
-      by_kind (by_kind&& that);
+      by_kind (by_kind&& that) noexcept;
 #endif
 
       /// Copy constructor.
@@ -710,7 +710,7 @@ namespace exptocas {
       /// Construct an empty symbol.
       stack_symbol_type ();
       /// Move or copy construction.
-      stack_symbol_type (YY_RVREF (stack_symbol_type) that);
+      stack_symbol_type (YY_RVREF (stack_symbol_type) that) noexcept;
       /// Steal the contents from \a sym to build this.
       stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
 #if YY_CPLUSPLUS < 201103L
index 59c0574de6cb568a2a0e86937d539ecd342ea0ed..15d086f102d2829b3320789ca872c82cc09cf046 100644 (file)
@@ -811,9 +811,9 @@ static int yy_flex_strlen ( const char * );
  */
 YY_DECL
 {
-       yy_state_type yy_current_state;
-       char *yy_cp, *yy_bp;
-       int yy_act;
+       yy_state_type yy_current_state = 0;
+       char *yy_cp = nullptr, *yy_bp = nullptr;
+       int yy_act = 0;
     
        if ( !(yy_init) )
                {
@@ -1165,7 +1165,7 @@ case YY_STATE_EOF(FUN):
                 */
                if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
                        { /* This was really a NUL. */
-                       yy_state_type yy_next_state;
+                       yy_state_type yy_next_state = 0;
 
                        (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
 
@@ -1392,8 +1392,8 @@ int yyFlexLexer::yy_get_next_buffer()
 {
        char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
        char *source = (yytext_ptr);
-       int number_to_move, i;
-       int ret_val;
+       int number_to_move = 0, i = 0;
+       int ret_val = 0;
 
        if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
                YY_FATAL_ERROR(
@@ -1528,8 +1528,8 @@ int yyFlexLexer::yy_get_next_buffer()
 
     yy_state_type yyFlexLexer::yy_get_previous_state()
 {
-       yy_state_type yy_current_state;
-       char *yy_cp;
+       yy_state_type yy_current_state = 0;
+       char *yy_cp = nullptr;
     
        yy_current_state = (yy_start);
 
@@ -1560,7 +1560,7 @@ int yyFlexLexer::yy_get_next_buffer()
  */
     yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
 {
-       int yy_is_jam;
+       int yy_is_jam = 0;
        char *yy_cp = (yy_c_buf_p);
 
        YY_CHAR yy_c = 1;
@@ -1584,7 +1584,7 @@ int yyFlexLexer::yy_get_next_buffer()
 #ifndef YY_NO_UNPUT
     void yyFlexLexer::yyunput( int c, char* yy_bp)
 {
-       char *yy_cp;
+       char *yy_cp = nullptr;
     
     yy_cp = (yy_c_buf_p);
 
@@ -1622,7 +1622,7 @@ int yyFlexLexer::yy_get_next_buffer()
 
     int yyFlexLexer::yyinput()
 {
-       int c;
+       int c = 0;
     
        *(yy_c_buf_p) = (yy_hold_char);
 
@@ -1769,7 +1769,7 @@ void yyFlexLexer::yyrestart( std::istream* input_file )
  */
     YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
 {
-       YY_BUFFER_STATE b;
+       YY_BUFFER_STATE b = nullptr;
     
        b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
        if ( ! b )
@@ -1932,7 +1932,7 @@ void yyFlexLexer::yypop_buffer_state (void)
  */
 void yyFlexLexer::yyensure_buffer_stack(void)
 {
-       yy_size_t num_to_alloc;
+       yy_size_t num_to_alloc = 0;
     
        if (!(yy_buffer_stack)) {
 
@@ -1977,7 +1977,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
 {
        if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
                {
-               yy_size_t new_size;
+               yy_size_t new_size = 0;
 
                (yy_start_stack_depth) += YY_START_STACK_INCR;
                new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
index 93c8fa3d1b4a8ef639d06c2bd66bfd27c30d31c6..fcfcc9fcf6b0d9f98bf4296cd2756889e32a0fc8 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Expr_FunctionDerivative,Expr_GeneralFunction)
 
-Expr_FunctionDerivative::Expr_FunctionDerivative (const Handle(Expr_GeneralFunction)& func, const Handle(Expr_NamedUnknown)& withX, const Standard_Integer deg)
+Expr_FunctionDerivative::Expr_FunctionDerivative (const Handle(Expr_GeneralFunction)& func, const Handle(Expr_NamedUnknown)& withX, const Standard_Integer deg) : myFunction(func), myDerivate(withX)
 {
-  myFunction = func;
-  myDerivate = withX;
+  
+  
   if (deg <= 0) {
     throw Standard_OutOfRange();
   }
index ee3631c1d7a33d71cf2d884323601738aae9eaac..59e505be7436e4a4e3941e1ed38b00d1fe20fda3 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Expr_NamedConstant,Expr_NamedExpression)
 
-Expr_NamedConstant::Expr_NamedConstant(const TCollection_AsciiString& name, const Standard_Real value)
+Expr_NamedConstant::Expr_NamedConstant(const TCollection_AsciiString& name, const Standard_Real value) : myValue(value)
 {
   SetName(name);
-  myValue = value;
+  
 }
 
 const Handle(Expr_GeneralExpression)& Expr_NamedConstant::SubExpression (const Standard_Integer ) const
index 7cb228e5b469f3a9a28d595e6025cb9fa18fc3bd..33831e531a091d4fcad248a8441697d754705db0 100644 (file)
@@ -66,7 +66,7 @@ Standard_Boolean Expr_NamedExpression::IsIdentical
 
 //AGV 22.03.12: Comparison should be based on names rather than Handles
     const Expr_NamedExpression* pOther =
-      static_cast<const Expr_NamedExpression*>(theOther.get());
+      dynamic_cast<const Expr_NamedExpression*>(theOther.get());
     if (pOther == this || pOther->GetName().IsEqual(myName))
       aResult = Standard_True;
   }
index 4520d90fd218e9fbecfc9f87f491acc46e3ba2fc..8b3ba9ebda7bdebc38be31b0569cb614f684907f 100644 (file)
 IMPLEMENT_STANDARD_RTTIEXT(Expr_NamedFunction,Expr_GeneralFunction)
 
 Expr_NamedFunction::Expr_NamedFunction (const TCollection_AsciiString& name, const Handle(Expr_GeneralExpression)& exp, const Expr_Array1OfNamedUnknown& vars) : 
-                                 myVariables(vars.Lower(),vars.Upper())
-{
-  myVariables=vars;
-  myName = name;
-  myExp = exp;
-}
+                                 myName(name), myExp(exp), myVariables(vars)
+{}
 
 void Expr_NamedFunction::SetName(const TCollection_AsciiString& newname)
 {
index 43c9f5f8c666ab27d8cb4245c6f564d5c48cb8c9..417227aefd7bf67afed50f911ee3e552cff81a7a 100644 (file)
@@ -25,9 +25,9 @@
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(Expr_NumericValue,Expr_GeneralExpression)
 
-Expr_NumericValue::Expr_NumericValue(const Standard_Real val)
+Expr_NumericValue::Expr_NumericValue(const Standard_Real val) : myValue(val)
 {
-  myValue = val;
+  
 }
 
 Standard_Real Expr_NumericValue::GetValue() const
index 96fd1d7e9ce75e09ce262c96b798eb7545695d1b..05ed00e20d716a4d4e9fdb716cd20d3b015891e8 100644 (file)
@@ -112,7 +112,7 @@ Standard_Boolean Expr_PolyExpression::Contains (const Handle(Expr_GeneralExpress
 void Expr_PolyExpression::Replace (const Handle(Expr_NamedUnknown)& var, const Handle(Expr_GeneralExpression)& with)
 {
   Standard_Integer nbop = NbOperands();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Handle(Expr_GeneralExpression) expop;
 
   for(i=1;i <= nbop; i++) {
@@ -132,7 +132,7 @@ void Expr_PolyExpression::Replace (const Handle(Expr_NamedUnknown)& var, const H
 Handle(Expr_GeneralExpression) Expr_PolyExpression::Simplified() const
 {
   Handle(Expr_PolyExpression) cop = Handle(Expr_PolyExpression)::DownCast(Copy());
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = cop->NbOperands();
   Handle(Expr_GeneralExpression) op;
   for (i=1; i<= max; i++) {
index 68fc1f996dc34910e4a106573cbdebddfbbe9b50..68e14482975cbf7a1585de3b9eba52dd1bdd66d0 100644 (file)
@@ -52,7 +52,7 @@ Handle(Expr_GeneralExpression) Expr_PolyFunction::ShallowSimplified () const
 {
   Standard_Boolean allval = Standard_True;
   Standard_Integer max = NbSubExpressions();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; (i <= max) && allval ; i++) {
     allval = SubExpression(i)->IsKind(STANDARD_TYPE(Expr_NumericValue));
   }
index 547c79e0b9e283dc8915f7bd6f375a14ba906ba9..5b12711b0a922b255dbb509f77f5e8d7fb8ca830 100644 (file)
@@ -34,7 +34,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Expr_Product,Expr_PolyExpression)
 
 Expr_Product::Expr_Product (const Expr_SequenceOfGeneralExpression& exps)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = exps.Length();
   for (i=1; i<= max; i++) {
     AddOperand(exps(i));
@@ -49,7 +49,7 @@ Expr_Product::Expr_Product (const Handle(Expr_GeneralExpression)& exp1, const Ha
 
 Handle(Expr_GeneralExpression) Expr_Product::Copy () const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = NbOperands();
   Expr_SequenceOfGeneralExpression simps;
   for (i=1; i<= max; i++) {
@@ -98,7 +98,7 @@ Standard_Boolean Expr_Product::IsIdentical (const Handle(Expr_GeneralExpression)
 
 Standard_Boolean Expr_Product::IsLinear () const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = NbOperands();
   Standard_Boolean lin = Standard_True;
   Standard_Boolean res = Standard_True;
@@ -154,7 +154,7 @@ Handle(Expr_GeneralExpression) Expr_Product::Derivative (const Handle(Expr_Named
 
 Handle(Expr_GeneralExpression) Expr_Product::ShallowSimplified () const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = NbOperands();
   Handle(Expr_GeneralExpression) op;
   Expr_SequenceOfGeneralExpression newops;
@@ -168,7 +168,7 @@ Handle(Expr_GeneralExpression) Expr_Product::ShallowSimplified () const
   if (subprod) {
     Handle(Expr_GeneralExpression) other;
     Handle(Expr_Product) prodop;
-    Standard_Integer nbsprodop;
+    Standard_Integer nbsprodop = 0;
     for (i=1; i<= max; i++) {
       op = Operand(i);
       if (op->IsKind(STANDARD_TYPE(Expr_Product))) {
index 36b1d3eed74ca32fcffba31628c718e00c030849..1cb6a904c5980a58125af0ac03ba5ecca2a9250f 100644 (file)
 #include <Expr_UnknownIterator.hxx>
 #include <Standard_NoMoreObject.hxx>
 
-Expr_RUIterator::Expr_RUIterator (const Handle(Expr_GeneralRelation)& rel)
+Expr_RUIterator::Expr_RUIterator (const Handle(Expr_GeneralRelation)& rel) : myCurrent(1)
 {
   Expr_RelationIterator ri(rel);
   Handle(Expr_SingleRelation) srel;
   Handle(Expr_NamedUnknown) var;
-  myCurrent =1;
+  
   while (ri.More()) {
     srel = ri.Value();
     ri.Next();
index 681634495bf9ae2f9398ccc88bb6adcb9f9bd4f1..2934eef2c5a2872d66bc5b490b462f62380a9a9a 100644 (file)
@@ -34,7 +34,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Expr_Sum,Expr_PolyExpression)
 
 Expr_Sum::Expr_Sum (const Expr_SequenceOfGeneralExpression& exps)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = exps.Length();
   for (i=1; i<= max; i++) {
     AddOperand(exps(i));
@@ -50,7 +50,7 @@ Expr_Sum::Expr_Sum (const Handle(Expr_GeneralExpression)& exp1, const Handle(Exp
 Handle(Expr_GeneralExpression) Expr_Sum::Copy () const
 {
   Expr_SequenceOfGeneralExpression ops;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = NbOperands();
   for (i=1; i <= max; i++) {
     ops.Append(Expr::CopyShare(Operand(i)));
@@ -111,7 +111,7 @@ Standard_Boolean Expr_Sum::IsLinear () const
 Handle(Expr_GeneralExpression) Expr_Sum::Derivative (const Handle(Expr_NamedUnknown)& X) const
 {
   Expr_SequenceOfGeneralExpression opsder;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = NbOperands();
   for (i=1; i<= max; i++) {
     opsder.Append(Operand(i)->Derivative(X));
@@ -126,7 +126,7 @@ Handle(Expr_GeneralExpression) Expr_Sum::NDerivative (const Handle(Expr_NamedUnk
     throw Standard_OutOfRange();
   }
   Expr_SequenceOfGeneralExpression opsder;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = NbOperands();
   for (i=1; i<= max; i++) {
     opsder.Append(Operand(i)->NDerivative(X,N));
@@ -137,7 +137,7 @@ Handle(Expr_GeneralExpression) Expr_Sum::NDerivative (const Handle(Expr_NamedUnk
 
 Handle(Expr_GeneralExpression) Expr_Sum::ShallowSimplified () const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer max = NbOperands();
   Standard_Integer nbvals =0;
   Handle(Expr_GeneralExpression) op;
@@ -150,7 +150,7 @@ Handle(Expr_GeneralExpression) Expr_Sum::ShallowSimplified () const
   if (subsum) {
     Handle(Expr_GeneralExpression) other;
     Handle(Expr_Sum) sumop;
-    Standard_Integer nbssumop;
+    Standard_Integer nbssumop = 0;
     for (i=1; i<= max; i++) {
       op = Operand(i);
       if (op->IsKind(STANDARD_TYPE(Expr_Sum))) {
index d66cbce9e4ab044a466c3ce27e9d2c68c8706856..ae06827ff4c483e91875a0a8b17f4e724bdccd33 100644 (file)
 #include <Expr_UnknownIterator.hxx>
 #include <Standard_NoMoreObject.hxx>
 
-Expr_UnknownIterator::Expr_UnknownIterator (const Handle(Expr_GeneralExpression)& exp)
+Expr_UnknownIterator::Expr_UnknownIterator (const Handle(Expr_GeneralExpression)& exp) : myCurrent(1)
 {
   Perform(exp);
-  myCurrent = 1;
+  
 }
 
 void Expr_UnknownIterator::Perform(const Handle(Expr_GeneralExpression)& exp)
index c747a1ef908e0f2fdff3472c196c3a458fa8e9b0..02bd57970cc50c81437d9441b964c3b7d8845868 100644 (file)
@@ -25,9 +25,9 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(ExprIntrp_GenExp,ExprIntrp_Generator)
 
-ExprIntrp_GenExp::ExprIntrp_GenExp ()
+ExprIntrp_GenExp::ExprIntrp_GenExp () : done(Standard_False)
 {
-  done = Standard_False;
+  
 }
 
 Handle( ExprIntrp_GenExp ) ExprIntrp_GenExp::Create()
index 410482294fad7994853dcbe2642aa8347665f9f1..6c2b86d62ce4bf1df193488759ae7835f3c083a4 100644 (file)
@@ -23,9 +23,9 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(ExprIntrp_GenFct,ExprIntrp_Generator)
 
-ExprIntrp_GenFct::ExprIntrp_GenFct ()
+ExprIntrp_GenFct::ExprIntrp_GenFct () : done(Standard_False)
 {
-  done = Standard_False;
+  
 }
 
 Handle( ExprIntrp_GenFct ) ExprIntrp_GenFct::Create()
index 5a207ecde3afa90ff28ee80b9805eb4e67917d5d..fd872ba68ce28ee01e732676fdd5f5b626031681 100644 (file)
@@ -25,9 +25,9 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(ExprIntrp_GenRel,ExprIntrp_Generator)
 
-ExprIntrp_GenRel::ExprIntrp_GenRel ()
+ExprIntrp_GenRel::ExprIntrp_GenRel () : done(Standard_False)
 {
-  done = Standard_False;
+  
 }
 
 Handle( ExprIntrp_GenRel ) ExprIntrp_GenRel::Create()
index 2511894316de5bb8db76211f826ef3b35f3b7625..cbc005c16fd2cb9a0820cfb7a29d0f58e3d6bd12 100644 (file)
@@ -71,7 +71,7 @@ extern "C" void ExprIntrp_StartDerivate()
 
 extern "C" void ExprIntrp_EndDerivate()
 {
-  int degree;
+  int degree = 0;
   degree = ExprIntrp_GetDegree();
   ExprIntrp_Recept.PushValue(degree);
 }
@@ -156,7 +156,7 @@ extern "C" void ExprIntrp_EndDifferential()
   if (thefunc.IsNull()) {
     throw ExprIntrp_SyntaxError();
   }
-  Standard_Integer rank,degree;
+  Standard_Integer rank = 0,degree = 0;
   Handle(Expr_NamedUnknown) thediff;
   Standard_Integer nbvars = thefunc->NbOfVariables();
 
@@ -548,7 +548,7 @@ extern "C" void ExprIntrp_EndOfFuncDef()
   Standard_Integer nbargs = ExprIntrp_Recept.PopValue();
   Expr_Array1OfNamedUnknown vars(1,nbargs);
   Expr_Array1OfNamedUnknown internvars(1,nbargs);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i=nbargs; i > 0; i--) {
     vars(i) = Handle(Expr_NamedUnknown)::DownCast(ExprIntrp_Recept.Pop());
     internvars(i) = Handle(Expr_NamedUnknown)::DownCast(vars(i)->Copy());
index db93859444118d7ed772dc427cd6b7178db55546..2657371a543258d19ed5d9d32698fd37a3394b4d 100644 (file)
@@ -26,11 +26,11 @@ IMPLEMENT_STANDARD_RTTIEXT(Express_ComplexType, Express_Type)
 
 Express_ComplexType::Express_ComplexType (const Standard_Integer theImin,
                                           const Standard_Integer theImax,
-                                          const Handle(Express_Type)& theType)
+                                          const Handle(Express_Type)& theType) : myMin(theImin), myMax(theImax), myType(theType)
 {
-  myMin = theImin;
-  myMax = theImax;
-  myType = theType;
+  
+  
+  
 }
 
 //=======================================================================
index 96a3bfcc5a97fdb61b830fc9fb889c25d8a62a21..b94115f9ed6d54bf93c0c911da24576d0e773a55 100644 (file)
@@ -47,10 +47,10 @@ IMPLEMENT_STANDARD_RTTIEXT(Express_Entity, Express_Item)
 Express_Entity::Express_Entity (const Standard_CString theName,
                                 const Handle(TColStd_HSequenceOfHAsciiString)& theInherit,
                                 const Handle(Express_HSequenceOfField)& theFields)
-: Express_Item (theName), mySupers (theInherit), myFields (theFields)
+: Express_Item (theName), mySupers (theInherit), myInherit(new Express_HSequenceOfEntity), myFields (theFields)
 {
   // make empty lists to avoid checking every time
-  myInherit = new Express_HSequenceOfEntity;
+  
   if (mySupers.IsNull())
   {
     mySupers = new TColStd_HSequenceOfHAsciiString;
index b8b2204dac26af4620346a8ed879037d26254845..c691f9df8461778ee2af8a51e2e4cb48bb623ea4 100644 (file)
@@ -27,11 +27,11 @@ IMPLEMENT_STANDARD_RTTIEXT(Express_Field, Standard_Transient)
 
 Express_Field::Express_Field (const Standard_CString theName,
                               const Handle(Express_Type)& theType,
-                              const Standard_Boolean theOpt)
+                              const Standard_Boolean theOpt) : myName(new TCollection_HAsciiString (theName)), myType(theType), myOpt(theOpt)
 {
-  myName = new TCollection_HAsciiString (theName);
-  myType = theType;
-  myOpt = theOpt;
+  
+  
+  
 }
 
 //=======================================================================
@@ -41,11 +41,11 @@ Express_Field::Express_Field (const Standard_CString theName,
 
 Express_Field::Express_Field (const Handle(TCollection_HAsciiString)& theName,
                               const Handle(Express_Type)& theType,
-                              const Standard_Boolean theOpt)
+                              const Standard_Boolean theOpt) : myName(theName), myType(theType), myOpt(theOpt)
 {
-  myName = theName;
-  myType = theType;
-  myOpt = theOpt;
+  
+  
+  
 }
 
 //=======================================================================
index 2e78e9e172643739f407ba9eba726e1a1bcae5bb..75feb4b100cd87aea515bd995e8051cff596da4a 100644 (file)
@@ -28,15 +28,15 @@ Standard_Integer Express_Item::myIndex = -1;
 // purpose  :
 //=======================================================================
 
-Express_Item::Express_Item (const Standard_CString theName)
+Express_Item::Express_Item (const Standard_CString theName) : myName(new TCollection_HAsciiString (theName)), myGenMode(GM_Undefined), myShortName(new TCollection_HAsciiString), myCategory(new TCollection_HAsciiString), myhasCheck(Standard_False), myhasFillShared(Standard_False), myLoopFlag(Standard_False)
 {
-  myName = new TCollection_HAsciiString (theName);
-  myGenMode = GM_Undefined;
-  myShortName = new TCollection_HAsciiString;
-  myCategory = new TCollection_HAsciiString;
-  myhasCheck = Standard_False;
-  myhasFillShared = Standard_False;
-  myLoopFlag = Standard_False;
+  
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -44,15 +44,15 @@ Express_Item::Express_Item (const Standard_CString theName)
 // purpose  :
 //=======================================================================
 
-Express_Item::Express_Item (const Handle(TCollection_HAsciiString)& theName)
+Express_Item::Express_Item (const Handle(TCollection_HAsciiString)& theName) : myName(theName), myGenMode(GM_Undefined), myShortName(new TCollection_HAsciiString), myCategory(new TCollection_HAsciiString), myhasCheck(Standard_False), myhasFillShared(Standard_False), myLoopFlag(Standard_False)
 {
-  myName = theName;
-  myGenMode = GM_Undefined;
-  myShortName = new TCollection_HAsciiString;
-  myCategory = new TCollection_HAsciiString;
-  myhasCheck = Standard_False;
-  myhasFillShared = Standard_False;
-  myLoopFlag = Standard_False;
+  
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index fc86d5a71e9de365c5ebe039d7c599417f21cdeb..639c9928d40bb8e59b07a090405366d1afae530a 100644 (file)
@@ -28,9 +28,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Express_NamedType, Express_Type)
 // purpose  :
 //=======================================================================
 
-Express_NamedType::Express_NamedType (const Standard_CString theName)
+Express_NamedType::Express_NamedType (const Standard_CString theName) : myName(new TCollection_HAsciiString (theName))
 {
-  myName = new TCollection_HAsciiString (theName);
+  
 }
 
 //=======================================================================
@@ -38,9 +38,9 @@ Express_NamedType::Express_NamedType (const Standard_CString theName)
 // purpose  :
 //=======================================================================
 
-Express_NamedType::Express_NamedType (const Handle(TCollection_HAsciiString)& theName)
+Express_NamedType::Express_NamedType (const Handle(TCollection_HAsciiString)& theName) : myName(theName)
 {
-  myName = theName;
+  
 }
 
 //=======================================================================
index 9620cd8c0fbb76adf42c95be58d19b0b5a501a95..54af67bded828140b41a279c638c6fcd46c8af5b 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Express_Reference, Express_Item)
 
 Express_Reference::Express_Reference (const Standard_CString theName,
                                       const Handle(TColStd_HSequenceOfHAsciiString)& theTypes)
-: Express_Item (theName)
+: Express_Item (theName), myTypes(theTypes)
 {
-  myTypes = theTypes;
+  
 }
 
 //=======================================================================
index ae08c4e2a098292fc7e92cc26a41214b181d569a..053ba2b3c3d0a3b43c8703c52d81d63114fb7382 100644 (file)
@@ -35,10 +35,10 @@ IMPLEMENT_STANDARD_RTTIEXT(Express_Schema, Standard_Transient)
 //=======================================================================
 
 Express_Schema::Express_Schema (const Standard_CString theName,
-                                const Handle(Express_HSequenceOfItem)& theItems)
+                                const Handle(Express_HSequenceOfItem)& theItems) : myName(new TCollection_HAsciiString (theName)), myItems(theItems)
 {
-  myName = new TCollection_HAsciiString (theName);
-  myItems = theItems;
+  
+  
   Prepare();
 }
 
@@ -48,10 +48,10 @@ Express_Schema::Express_Schema (const Standard_CString theName,
 //=======================================================================
 
 Express_Schema::Express_Schema (const Handle(TCollection_HAsciiString)& theName,
-                                const Handle(Express_HSequenceOfItem)& theItems)
+                                const Handle(Express_HSequenceOfItem)& theItems) : myName(theName), myItems(theItems)
 {
-  myName = theName;
-  myItems = theItems;
+  
+  
   Prepare();
 }
 
index bcfa50e761a296e59a0036e3ac8a1c8f5c2bb5e4..58f5d70f9ab85f879ccd54a14851a56f091b477c 100644 (file)
@@ -38,9 +38,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Express_Select, Express_Item)
 
 Express_Select::Express_Select ( const Standard_CString theName,
                                  const Handle(TColStd_HSequenceOfHAsciiString)& theNames)
-: Express_Item (theName), myNames (theNames)
+: Express_Item (theName), myNames (theNames), myItems(new Express_HSequenceOfItem)
 {
-  myItems = new Express_HSequenceOfItem;
+  
 }
 
 //=======================================================================
index aae64823bd272a1717c24a1b406f10b4142aa04f..1eaa2cfe5c769738fd06699b0070d22e17c17113 100644 (file)
@@ -31,7 +31,7 @@ Handle(TColStd_HArray1OfReal)
   const Standard_Real maxdefl = 1.e3;
   const Standard_Real mindefl = 1.e-3;
   Handle(TColStd_HArray1OfReal) Intervals;
-  Standard_Integer nbpnts = 23, i;
+  Standard_Integer nbpnts = 23, i = 0;
   Standard_Real L = 0.;
   Standard_Real tf = C.FirstParameter(), tl = C.LastParameter();
   gp_Pnt2d aP = C.Value(tf);
index 0f3dd23a021f8e92de28cb0ac5be7751dab6813e..a3f87b0a2323514f38df75bfd62bd5c26379fee0 100644 (file)
@@ -47,7 +47,7 @@ Extrema_CurveTool::DeflCurvIntervals(const Adaptor3d_Curve& C)
   const Standard_Real maxdefl = 1.e3;
   const Standard_Real mindefl = 1.e-3;
   Handle(TColStd_HArray1OfReal) Intervals;
-  Standard_Integer nbpnts = 23, i;
+  Standard_Integer nbpnts = 23, i = 0;
   Standard_Real L = 0.;
   Standard_Real tf = C.FirstParameter(), tl = C.LastParameter();
   gp_Pnt aP = C.Value(tf);
index 06481b5539f7f2ed336c3a1a79b748bd9eaf1394..9d6d714c493051863c7e30415aa6cbbcf4c7c927 100644 (file)
@@ -19,6 +19,8 @@
 //                            tri des solutions pour eviter de rendre plusieurs
 //                            fois la meme solution 
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <Bnd_Range.hxx>
 #include <ElCLib.hxx>
@@ -213,7 +215,7 @@ void Extrema_ExtCC::Perform()
 
   GeomAbs_CurveType type1 = myC[0]->GetType();
   GeomAbs_CurveType type2 = myC[1]->GetType();
-  Standard_Real U11, U12, U21, U22, Tol = Min(myTol[0], myTol[1]);
+  Standard_Real U11 = NAN, U12 = NAN, U21 = NAN, U22 = NAN, Tol = Min(myTol[0], myTol[1]);
 
   U11 = myInf[0];
   U12 = mySup[0];
@@ -282,7 +284,7 @@ void Extrema_ExtCC::Perform()
     }
   } else if (type1 == GeomAbs_Circle && type2 == GeomAbs_Circle) {
     //analytical case - two circles
-    Standard_Boolean bIsDone;
+    Standard_Boolean bIsDone = 0;
     Extrema_ExtElC CCXtrem (myC[0]->Circle(), myC[1]->Circle());
     bIsDone = CCXtrem.IsDone();
     if(bIsDone) {
@@ -541,10 +543,10 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
         //                   ***********  aLin2
         // 
         //Take minimal trimmed distance
-        Standard_Real aDmin, aDists[4] = {mydist11, mydist12, mydist21, mydist22};
+        Standard_Real aDmin = NAN, aDists[4] = {mydist11, mydist12, mydist21, mydist22};
         Extrema_POnCurv aP1, aP2;
         aDmin = aDists[0];
-        Standard_Integer i, imin = 0;
+        Standard_Integer i = 0, imin = 0;
         for (i = 1; i < 4; ++i)
         {
           if (aDmin > aDists[i])
@@ -772,10 +774,10 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
         // 
         //Take minimal trimmed distance
         myIsParallel = Standard_False;
-        Standard_Real aDmin, aDists[4] = { mydist11, mydist12, mydist21, mydist22 };
+        Standard_Real aDmin = NAN, aDists[4] = { mydist11, mydist12, mydist21, mydist22 };
         Extrema_POnCurv aP1, aP2;
         aDmin = aDists[0];
-        Standard_Integer k, imin = 0;
+        Standard_Integer k = 0, imin = 0;
         for (k = 1; k < 4; ++k)
         {
           if (aDmin > aDists[k])
@@ -830,8 +832,8 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ExtElC&  AlgExt,
                                    const Standard_Real    Ut21,
                                    const Standard_Real    Ut22)
 {
-  Standard_Integer i, NbExt;
-  Standard_Real Val, U, U2;
+  Standard_Integer i = 0, NbExt = 0;
+  Standard_Real Val = NAN, U = NAN, U2 = NAN;
   Extrema_POnCurv P1, P2;
 
   myDone = AlgExt.IsDone();
@@ -902,8 +904,8 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ECC&   AlgExt,
                                    const Standard_Real  Ut21,
                                    const Standard_Real  Ut22)
 {
-  Standard_Integer i, NbExt;
-  Standard_Real Val, U, U2;
+  Standard_Integer i = 0, NbExt = 0;
+  Standard_Real Val = NAN, U = NAN, U2 = NAN;
   Extrema_POnCurv P1, P2;
 
   myDone = AlgExt.IsDone();
index e5d2d773060e9205350ded72be5a6453aeada93e..b2092d2ea75ae74c141c4bb243c63e6cbfe7ce4a 100644 (file)
@@ -169,13 +169,13 @@ private:
   Standard_Boolean myIsFindSingleSolution; // Default value is false.
   Extrema_ECC myECC;
   Standard_Boolean myDone;
-  Standard_Boolean myIsParallel;
+  Standard_Boolean myIsParallel{};
   Extrema_SequenceOfPOnCurv mypoints;
   TColStd_SequenceOfReal mySqDist;
-  const Adaptor3d_Curve* myC[2];
-  Standard_Real myInf[2];
-  Standard_Real mySup[2];
-  Standard_Real myTol[2];
+  const Adaptor3d_Curve* myC[2]{};
+  Standard_Real myInf[2]{};
+  Standard_Real mySup[2]{};
+  Standard_Real myTol[2]{};
   gp_Pnt myP1f;
   gp_Pnt myP1l;
   gp_Pnt myP2f;
index bc232fac52587f2aab29bebc760dbc2183534c8f..f33ff61fda9d2d049e5a2f5d9d9e7db23c61820b 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor2d_Curve2d.hxx>
 #include <ElCLib.hxx>
 #include <Extrema_Curve2dTool.hxx>
@@ -95,7 +97,7 @@ void Extrema_ExtCC2d::Perform (const Adaptor2d_Curve2d&       C1,
   mypoints.Clear();
   mySqDist.Clear();
   GeomAbs_CurveType type1 = Extrema_Curve2dTool::GetType(C1), type2 = Extrema_Curve2dTool::GetType (*myC);
-  Standard_Real U11, U12, U21, U22, Tol = Min(mytolc1, mytolc2);
+  Standard_Real U11 = NAN, U12 = NAN, U21 = NAN, U22 = NAN, Tol = Min(mytolc1, mytolc2);
 //  Extrema_POnCurv2d P1, P2;
   mynbext = 0;
   inverse = Standard_False;
@@ -451,8 +453,8 @@ void Extrema_ExtCC2d::Results(const Extrema_ExtElC2d&  AlgExt,
                               const Standard_Real      Period1,
                               const Standard_Real      Period2)
 {
-  Standard_Integer i, NbExt;
-  Standard_Real Val, U, U2;
+  Standard_Integer i = 0, NbExt = 0;
+  Standard_Real Val = NAN, U = NAN, U2 = NAN;
   Extrema_POnCurv2d P1, P2;
   
   myDone = AlgExt.IsDone();
@@ -514,8 +516,8 @@ void Extrema_ExtCC2d::Results(const Extrema_ECC2d& AlgExt,
                               const Standard_Real  Period1,
                               const Standard_Real  Period2)
 {
-  Standard_Integer i, NbExt;
-  Standard_Real Val, U, U2;
+  Standard_Integer i = 0, NbExt = 0;
+  Standard_Real Val = NAN, U = NAN, U2 = NAN;
   Extrema_POnCurv2d P1, P2;
 
   myDone = AlgExt.IsDone();
index c69a189d722bde202877b50f774555249e0aa4ab..f8ec643481ccc374362db14246ca9e79811b0ef4 100644 (file)
@@ -96,25 +96,25 @@ private:
 
 
   Standard_Boolean myIsFindSingleSolution; // Default value is false.
-  Standard_Boolean myDone;
-  Standard_Boolean myIsPar;
+  Standard_Boolean myDone{};
+  Standard_Boolean myIsPar{};
   Extrema_SequenceOfPOnCurv2d mypoints;
   TColStd_SequenceOfReal mySqDist;
-  Standard_Integer mynbext;
-  Standard_Boolean inverse;
-  const Adaptor2d_Curve2d* myC;
-  Standard_Real myv1;
-  Standard_Real myv2;
-  Standard_Real mytolc1;
-  Standard_Real mytolc2;
+  Standard_Integer mynbext{};
+  Standard_Boolean inverse{};
+  const Adaptor2d_Curve2d* myC{};
+  Standard_Real myv1{};
+  Standard_Real myv2{};
+  Standard_Real mytolc1{};
+  Standard_Real mytolc2{};
   gp_Pnt2d P1f;
   gp_Pnt2d P1l;
   gp_Pnt2d P2f;
   gp_Pnt2d P2l;
-  Standard_Real mydist11;
-  Standard_Real mydist12;
-  Standard_Real mydist21;
-  Standard_Real mydist22;
+  Standard_Real mydist11{};
+  Standard_Real mydist12{};
+  Standard_Real mydist21{};
+  Standard_Real mydist22{};
 
 
 };
index 0f5a233988c5a760ac0d43e161a2224abf337cff..943a2716ac0951d3c0ea84fc43054f7eb0db42fc 100644 (file)
@@ -16,6 +16,8 @@
 
 //  Modified by skv - Thu Jul  7 12:29:34 2005 OCC9134
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Bnd_Box.hxx>
 #include <BndLib_AddSurface.hxx>
@@ -112,8 +114,8 @@ void Extrema_ExtCS::Perform(const Adaptor3d_Curve& C,
   myPOnS.Clear();
   myPOnC.Clear();
   mySqDist.Clear();
-  Standard_Integer i, j;
-  Standard_Integer NbT, NbU, NbV;
+  Standard_Integer i = 0, j = 0;
+  Standard_Integer NbT = 0, NbU = 0, NbV = 0;
   NbT = 12; NbU = NbV = 10;
   GeomAbs_CurveType myCtype  = C.GetType();
 
@@ -155,12 +157,12 @@ void Extrema_ExtCS::Perform(const Adaptor3d_Curve& C,
             Precision::IsInfinite(vfirst) || Precision::IsInfinite(vlast)))
           {
             Standard_Real tmin = Precision::Infinite(), tmax = -tmin;
-            Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+            Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
             Bnd_Box aSurfBox;
             BndLib_AddSurface::Add(*myS, ufirst, ulast, vfirst, vlast, Precision::Confusion(), aSurfBox);
             aSurfBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
             gp_Lin aLin = C.Line();
-            Standard_Real aParOnLin;
+            Standard_Real aParOnLin = NAN;
             gp_Pnt aLimPntArray[8];
 
             aLimPntArray[0].SetCoord(xmin, ymin, zmin);
@@ -195,7 +197,7 @@ void Extrema_ExtCS::Perform(const Adaptor3d_Curve& C,
             myDone = anExtPS.IsDone();
             if (myDone) {
               Standard_Integer NbExt = anExtPS.NbExt();
-              Standard_Real T = aCPar, U, V;
+              Standard_Real T = aCPar, U = NAN, V = NAN;
               Extrema_POnCurv PC;
               Extrema_POnSurf PS;
               for (i = 1; i <= NbExt; i++) {
@@ -213,7 +215,7 @@ void Extrema_ExtCS::Perform(const Adaptor3d_Curve& C,
           myDone = Ext.IsDone();
           if (myDone) {
             Standard_Integer NbExt = Ext.NbExt();
-            Standard_Real T,U,V;
+            Standard_Real T = NAN,U = NAN,V = NAN;
             Extrema_POnCurv PC;
             Extrema_POnSurf PS;
             for (i = 1; i <= NbExt; i++) {
@@ -283,7 +285,7 @@ void Extrema_ExtCS::Perform(const Adaptor3d_Curve& C,
           Extrema_POnSurf PS;
           myExtElCS.Points(i, PC, PS);
           Standard_Real Ucurve = PC.Parameter();
-          Standard_Real U, V;
+          Standard_Real U = NAN, V = NAN;
           PS.Parameter(U, V);
           AddSolution(C, Ucurve, U, V, PC.Value(), PS.Value(), myExtElCS.SquareDistance(i));
         }
@@ -395,7 +397,7 @@ void Extrema_ExtCS::Perform(const Adaptor3d_Curve& C,
   myDone = Ext.IsDone();
   if (myDone) {
     Standard_Integer NbExt = Ext.NbExt();
-    Standard_Real T, U, V;
+    Standard_Real T = NAN, U = NAN, V = NAN;
     Extrema_POnCurv PC;
     Extrema_POnSurf PS;
     for (i = 1; i <= NbExt; i++) {
@@ -564,7 +566,7 @@ Standard_Boolean Extrema_ExtCS::AddSolution(const Adaptor3d_Curve& theCurve,
       aPC = myPOnC(j);
       aPS = myPOnS(j);
       Standard_Real Tj = aPC.Parameter();
-      Standard_Real Uj, Vj;
+      Standard_Real Uj = NAN, Vj = NAN;
       aPS.Parameter(Uj, Vj);
       if (Abs(T - Tj) <= mytolC &&
         Abs(U - Uj) <= mytolS &&
index d9110ec5a193ad88b5ed567ab94d188f376dbf41..333398463a7935519cc69b86d9b6d4f22e17ba9b 100644 (file)
@@ -91,20 +91,20 @@ private:
 
 private:
 
-  const Adaptor3d_Surface* myS;
-  Standard_Boolean myDone;
-  Standard_Boolean myIsPar;
+  const Adaptor3d_Surface* myS{};
+  Standard_Boolean myDone{};
+  Standard_Boolean myIsPar{};
   Extrema_ExtElCS myExtElCS;
   Extrema_SequenceOfPOnSurf myPOnS;
   Extrema_SequenceOfPOnCurv myPOnC;
-  Standard_Real myuinf;
-  Standard_Real myusup;
-  Standard_Real myvinf;
-  Standard_Real myvsup;
-  Standard_Real mytolC;
-  Standard_Real mytolS;
-  Standard_Real myucinf;
-  Standard_Real myucsup;
+  Standard_Real myuinf{};
+  Standard_Real myusup{};
+  Standard_Real myvinf{};
+  Standard_Real myvsup{};
+  Standard_Real mytolC{};
+  Standard_Real mytolS{};
+  Standard_Real myucinf{};
+  Standard_Real myucsup{};
   TColStd_SequenceOfReal mySqDist;
   GeomAbs_SurfaceType myStype;
 
index 2da4bf009bb241d3d01da291f4d7e2d648711e20..94522dec9c23eb620570d33109af322b9352a9ca 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Extrema_ExtElC.hxx>
 #include <Extrema_ExtElC2d.hxx>
@@ -49,7 +51,7 @@ static
 //=======================================================================
 class ExtremaExtElC_TrigonometricRoots {
  private:
-  Standard_Real Roots[4];
+  Standard_Real Roots[4]{};
   Standard_Boolean done;
   Standard_Integer NbRoots;
   Standard_Boolean infinite_roots;
@@ -67,7 +69,7 @@ class ExtremaExtElC_TrigonometricRoots {
   }
   //
   Standard_Boolean IsARoot(Standard_Real u) {
-    Standard_Real PIpPI, aEps;
+    Standard_Real PIpPI = NAN, aEps = NAN;
     //
     aEps=RealEpsilon();
     PIpPI = M_PI + M_PI;
@@ -115,11 +117,11 @@ ExtremaExtElC_TrigonometricRoots::
                                   const Standard_Real Cte,
                                   const Standard_Real Binf,
                                   const Standard_Real Bsup) 
-: NbRoots(0),
+: done(Standard_False), NbRoots(0),
   infinite_roots(Standard_False)
 {
-  Standard_Integer i, nbessai;
-  Standard_Real cc ,sc, c, s, cte;
+  Standard_Integer i = 0, nbessai = 0;
+  Standard_Real cc = NAN ,sc = NAN, c = NAN, s = NAN, cte = NAN;
   //
   nbessai = 1;
   cc = CC;
@@ -127,7 +129,7 @@ ExtremaExtElC_TrigonometricRoots::
   c = C;
   s = S;
   cte = Cte;
-  done=Standard_False;
+  
   while (nbessai<=2 && !done) {
     //-- F= AA*CN*CN+2*BB*CN*SN+CC*CN+DD*SN+EE;
     math_TrigonometricFunctionRoots MTFR(cc,sc,c,s,cte,Binf,Bsup); 
@@ -138,9 +140,9 @@ ExtremaExtElC_TrigonometricRoots::
        infinite_roots=Standard_True;
       }
       else { //else #1
-       Standard_Boolean Triee;
-       Standard_Integer j, SvNbRoots;
-       Standard_Real aTwoPI, aMaxCoef, aPrecision;
+       Standard_Boolean Triee = 0;
+       Standard_Integer j = 0, SvNbRoots = 0;
+       Standard_Real aTwoPI = NAN, aMaxCoef = NAN, aPrecision = NAN;
        //
        aTwoPI=M_PI+M_PI;
        NbRoots=MTFR.NbSolutions();
@@ -163,7 +165,7 @@ ExtremaExtElC_TrigonometricRoots::
        
        SvNbRoots=NbRoots;
        for(i=0; i<SvNbRoots; ++i) {
-         Standard_Real y;
+         Standard_Real y = NAN;
          Standard_Real co=cos(Roots[i]);
          Standard_Real si=sin(Roots[i]);
          y=co*(CC*co + (SC+SC)*si + C) + S*si + Cte;
@@ -175,7 +177,7 @@ ExtremaExtElC_TrigonometricRoots::
        }
        //
        do {
-         Standard_Real t;
+         Standard_Real t = NAN;
          //
          Triee=Standard_True;
          for(i=1, j=0; i<SvNbRoots; ++i, ++j) {
@@ -225,11 +227,11 @@ ExtremaExtElC_TrigonometricRoots::
 //function : Extrema_ExtElC
 //purpose  : 
 //=======================================================================
-Extrema_ExtElC::Extrema_ExtElC () 
+Extrema_ExtElC::Extrema_ExtElC () : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0) 
 {
-  myDone = Standard_False; 
-  myIsPar = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -241,7 +243,7 @@ Extrema_ExtElC::Extrema_ExtElC ()
 //=======================================================================
 Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& theC1, 
                                const gp_Lin& theC2,
-                               const Standard_Real)
+                               const Standard_Real) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 // Function:
 //   Find min distance between 2 straight lines.
 
@@ -288,9 +290,9 @@ Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& theC1,
 //   This system has one solution if (D1.D2)^2 != 1
 //   (if straight lines are not parallel).
 {
-  myDone = Standard_False;
-  myNbExt = 0;
-  myIsPar = Standard_False;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -452,15 +454,15 @@ Standard_Boolean Extrema_ExtElC::PlanarLineCircleExtrema(const gp_Lin& theLin,
 //=======================================================================
 Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1, 
                                const gp_Circ& C2,
-                               const Standard_Real)
+                               const Standard_Real) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
-  Standard_Real Dx,Dy,Dz,aRO2O1, aTolRO2O1;
-  Standard_Real R, A1, A2, A3, A4, A5, aTol;
+  Standard_Real Dx = NAN,Dy = NAN,Dz = NAN,aRO2O1 = NAN, aTolRO2O1 = NAN;
+  Standard_Real R = NAN, A1 = NAN, A2 = NAN, A3 = NAN, A4 = NAN, A5 = NAN, aTol = NAN;
   gp_Dir x2, y2, z2, D, D1;
   //
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -574,8 +576,8 @@ Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1,
     return; 
   }
   // Storage of solutions ...
-  Standard_Integer NoSol, NbSol;
-  Standard_Real U1,U2;
+  Standard_Integer NoSol = 0, NbSol = 0;
+  Standard_Real U1 = NAN,U2 = NAN;
   gp_Pnt P1,P2;
   //
   NbSol = Sol.NbSolutions();
@@ -600,7 +602,7 @@ Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1,
 //purpose  : 
 //=======================================================================
 Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1,
-                               const gp_Elips& C2)
+                               const gp_Elips& C2) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
 /*-----------------------------------------------------------------------------
 Function:
@@ -633,9 +635,9 @@ Method:
       MinR*MajR*Dx*Dy                = 0.
   Use algorithm math_TrigonometricFunctionRoots to solve this equation.
 -----------------------------------------------------------------------------*/
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -693,7 +695,7 @@ Method:
 
 // Storage of solutions ...
   gp_Pnt P1,P2;
-  Standard_Real U1,U2;
+  Standard_Real U1 = NAN,U2 = NAN;
   Standard_Integer NbSol = Sol.NbSolutions();
   for (Standard_Integer NoSol = 1; NoSol <= NbSol; NoSol++) {
     U2 = Sol.Value(NoSol);
@@ -713,7 +715,7 @@ Method:
 //purpose  : 
 //=======================================================================
 Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1, 
-                               const gp_Hypr& C2)
+                               const gp_Hypr& C2) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
 /*-----------------------------------------------------------------------------
 Function:
@@ -750,9 +752,9 @@ Method:
 
   Use the algorithm math_DirectPolynomialRoots to solve this equation.
 -----------------------------------------------------------------------------*/
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -794,7 +796,7 @@ Method:
 
 // Store solutions ...
   gp_Pnt P1,P2;
-  Standard_Real U1,U2, v;
+  Standard_Real U1 = NAN,U2 = NAN, v = NAN;
   Standard_Integer NbSol = Sol.NbSolutions();
   for (Standard_Integer NoSol = 1; NoSol <= NbSol; NoSol++) {
     v = Sol.Value(NoSol);
@@ -816,7 +818,7 @@ Method:
 //purpose  : 
 //=======================================================================
 Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1, 
-                               const gp_Parab& C2)
+                               const gp_Parab& C2) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
 /*-----------------------------------------------------------------------------
 Function:
@@ -849,9 +851,9 @@ Method:
 
   Use the algorithm math_DirectPolynomialRoots to solve this equation.
 -----------------------------------------------------------------------------*/
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -888,7 +890,7 @@ Method:
 
 // Storage of solutions ...
   gp_Pnt P1,P2;
-  Standard_Real U1,U2;
+  Standard_Real U1 = NAN,U2 = NAN;
   Standard_Integer NbSol = Sol.NbSolutions();
   for (Standard_Integer NoSol = 1; NoSol <= NbSol; NoSol++) {
     U2 = Sol.Value(NoSol);
@@ -907,16 +909,16 @@ Method:
 //purpose  : 
 //=======================================================================
 Extrema_ExtElC::Extrema_ExtElC (const gp_Circ& C1, 
-                               const gp_Circ& C2)
+                               const gp_Circ& C2) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
-  Standard_Boolean bIsSamePlane, bIsSameAxe;
-  Standard_Real aTolD, aTolD2, aTolA, aD2, aDC2;
+  Standard_Boolean bIsSamePlane = 0, bIsSameAxe = 0;
+  Standard_Real aTolD = NAN, aTolD2 = NAN, aTolA = NAN, aD2 = NAN, aDC2 = NAN;
   gp_Pnt aPc1, aPc2;
   gp_Dir aDc1, aDc2;
   //
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -955,9 +957,9 @@ Extrema_ExtElC::Extrema_ExtElC (const gp_Circ& C1,
     return;
   }
 
-  Standard_Boolean bIn, bOut;
-  Standard_Integer j1, j2;
-  Standard_Real aR1, aR2, aD12, aT11, aT12, aT21, aT22;
+  Standard_Boolean bIn = 0, bOut = 0;
+  Standard_Integer j1 = 0, j2 = 0;
+  Standard_Real aR1 = NAN, aR2 = NAN, aD12 = NAN, aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN;
   gp_Circ aC1, aC2;
   gp_Pnt aP11, aP12, aP21, aP22;
   //
@@ -1025,8 +1027,8 @@ Extrema_ExtElC::Extrema_ExtElC (const gp_Circ& C1,
   bIn = aD12 < (aR1 - aR2 - aTolD);
   if (!bOut && !bIn)
   {
-    Standard_Boolean bNbExt6;
-    Standard_Real aAlpha, aBeta, aT[2], aVal, aDist2;
+    Standard_Boolean bNbExt6 = 0;
+    Standard_Real aAlpha = NAN, aBeta = NAN, aT[2], aVal = NAN, aDist2 = NAN;
     gp_Pnt aPt, aPL1, aPL2;
     gp_Dir aDLt;
     //
@@ -1135,8 +1137,8 @@ void Extrema_ExtElC::Points (const Standard_Integer N,
 //=======================================================================
 void RefineDir(gp_Dir& aDir)
 {
-  Standard_Integer i, j, k, iK;
-  Standard_Real aCx[3], aEps, aX1, aX2, aOne;
+  Standard_Integer i = 0, j = 0, k = 0, iK = 0;
+  Standard_Real aCx[3], aEps = NAN, aX1 = NAN, aX2 = NAN, aOne = NAN;
   //
   iK=3;
   aEps=RealEpsilon();
index 2a3ab95fa069eb90726fd93581593e2301e22936..853d3bcd69092c2641fa59085e4d06a1aab7206c 100644 (file)
@@ -102,7 +102,7 @@ private:
   Standard_Boolean myDone;
   Standard_Boolean myIsPar;
   Standard_Integer myNbExt;
-  Standard_Real mySqDist[6];
+  Standard_Real mySqDist[6]{};
   Extrema_POnCurv myPoint[6][2];
 
 
index 944526c0705952ba07a779356367ff4341376275..2e83e5d0b46b128d4ebd0d66b99706d4e2857ce4 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Extrema_ExtElC2d.hxx>
 #include <Extrema_ExtPElC2d.hxx>
 //function : Extrema_ExtElC2d
 //purpose  :
 //=======================================================================
-Extrema_ExtElC2d::Extrema_ExtElC2d()
+Extrema_ExtElC2d::Extrema_ExtElC2d() : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
-  myDone = Standard_False;
-  myIsPar = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -49,7 +51,7 @@ Extrema_ExtElC2d::Extrema_ExtElC2d()
 //=======================================================================
 Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1,
                                     const gp_Lin2d& C2,
-                                    const Standard_Real)
+                                    const Standard_Real) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 /*-----------------------------------------------------------------------------
 Function:
    Find min distance between 2 straight lines.
@@ -64,9 +66,9 @@ Method:
      
 -----------------------------------------------------------------------------*/
 {
-  myDone = Standard_False;
-  myIsPar = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -110,7 +112,7 @@ Method:
 
 Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, 
                                    const gp_Circ2d& C2,
-                                   const Standard_Real)
+                                   const Standard_Real) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 /*-----------------------------------------------------------------------------
 Function:
   Find extreme distances between straight line C1 and circle C2.
@@ -123,9 +125,9 @@ Method:
          ( P1P2.T = 0. (2)
 -----------------------------------------------------------------------------*/
 {
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -139,7 +141,7 @@ Method:
 
   Standard_Real Dx = D.Dot(x2);
   Standard_Real Dy = D.Dot(y2);
-  Standard_Real U1, teta[2];
+  Standard_Real U1 = NAN, teta[2];
   gp_Pnt2d O1=C1.Location();
   gp_Pnt2d P1, P2;
   
@@ -171,12 +173,8 @@ Method:
 
 // =============================================================================
 Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, 
-                                   const gp_Elips2d& C2)
+                                   const gp_Elips2d& C2) : myDone(Standard_True), myIsPar(Standard_False), myNbExt(0)
 {
-  myDone = Standard_True;
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -190,7 +188,7 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1,
 
   Standard_Real Dx = D.Dot(x2);
   Standard_Real Dy = D.Dot(y2);
-  Standard_Real U1, teta[2], r1 = C2.MajorRadius(), r2 = C2.MinorRadius();
+  Standard_Real U1 = NAN, teta[2], r1 = C2.MajorRadius(), r2 = C2.MinorRadius();
   gp_Pnt2d O1=C1.Location(), P1, P2;
   
   if (Abs(Dy) <= RealEpsilon()) {
@@ -216,18 +214,17 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1,
   myPoint[myNbExt][0] = Extrema_POnCurv2d(U1,P1);
   myPoint[myNbExt][1] = Extrema_POnCurv2d(teta[1],P2);
   myNbExt++;
-  myDone = Standard_True;
 }
 
 
 
 //=============================================================================
 
-Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Hypr2d& C2)
+Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Hypr2d& C2) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -241,7 +238,7 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Hypr2d& C2)
   Standard_Real Dx = D.Dot(x2);
   Standard_Real Dy = D.Dot(y2);
 
-  Standard_Real U1, v2, U2=0, R = C2.MajorRadius(), r = C2.MinorRadius();
+  Standard_Real U1 = NAN, v2 = NAN, U2=0, R = C2.MajorRadius(), r = C2.MinorRadius();
   gp_Pnt2d P1, P2;
   if (Abs(Dy) < RealEpsilon()) { return;}
   if (Abs(R - r*Dx/Dy) < RealEpsilon()) return;
@@ -263,11 +260,11 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Hypr2d& C2)
 
 //============================================================================
 
-Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Parab2d& C2)
+Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Parab2d& C2) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -281,7 +278,7 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Parab2d& C2)
   Standard_Real Dx = D.Dot(x2);
   Standard_Real Dy = D.Dot(y2);
 
-  Standard_Real U1, U2, P = C2.Parameter();
+  Standard_Real U1 = NAN, U2 = NAN, P = C2.Parameter();
   gp_Pnt2d P1, P2;
   if (Abs(Dy) < RealEpsilon()) { return; }
   U2 = Dx*P/Dy;
@@ -300,12 +297,8 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Parab2d& C2)
 
 //============================================================================
 
-Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Circ2d& C2)
+Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Circ2d& C2) : myDone(Standard_True), myIsPar(Standard_False), myNbExt(0)
 {
-  myIsPar = Standard_False;
-  myDone  = Standard_False;
-  myNbExt = 0;
-  myDone  = Standard_True;
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
@@ -325,8 +318,8 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Circ2d& C2)
     return;
   }
 
-  Standard_Integer NoSol, kk;
-  Standard_Real U1, U2;
+  Standard_Integer NoSol = 0, kk = 0;
+  Standard_Real U1 = NAN, U2 = NAN;
   Standard_Real r1 = C1.Radius(), r2 = C2.Radius();
   Standard_Real Usol2[2], Usol1[2];
   gp_Pnt2d P1[2], P2[2];
@@ -355,17 +348,17 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Circ2d& C2)
 }
 //===========================================================================
 
-Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Elips2d& C2)
+Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Elips2d& C2) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
   }
 
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   Extrema_ExtPElC2d ExtElip(C1.Location(), C2, 
                            Precision::Confusion(), 0.0, 2.0*M_PI);
@@ -388,17 +381,17 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Elips2d& C2)
 }
 //============================================================================
 
-Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Hypr2d& C2)
+Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Hypr2d& C2) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
   }
 
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   Extrema_ExtPElC2d ExtHyp(C1.Location(), C2, Precision::Confusion(), 
                           RealFirst(), RealLast());
@@ -421,17 +414,17 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Hypr2d& C2)
 }
 //============================================================================
 
-Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Parab2d& C2)
+Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Parab2d& C2) : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
-  myIsPar = Standard_False;
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
+  
   for (size_t anIdx = 0; anIdx < sizeof (mySqDist) / sizeof (mySqDist[0]); anIdx++)
   {
     mySqDist[anIdx] = RealLast();
   }
 
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   Extrema_ExtPElC2d ExtParab(C1.Location(), C2, Precision::Confusion(),
                             RealFirst(), RealLast());
index a9a5bda7fe71ea95a08f89f4760644d376f7ea84..a255fc5db983fe69d38c49b53ff8240901cd763a 100644 (file)
@@ -111,7 +111,7 @@ private:
   Standard_Boolean myDone;
   Standard_Boolean myIsPar;
   Standard_Integer myNbExt;
-  Standard_Real mySqDist[8];
+  Standard_Real mySqDist[8]{};
   Extrema_POnCurv2d myPoint[8][2];
 
 
index 937f7c3badef0369a69e6a673011b1e01b161419..1ef7efa9b32891c7a645a1e195d767003831a661 100644 (file)
@@ -14,6 +14,8 @@
 
 //  Modified by skv - Thu Jul  7 14:37:05 2005 OCC9134
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <ElSLib.hxx>
 #include <Extrema_ExtElC.hxx>
 #include <StdFail_NotDone.hxx>
 #include <TColStd_ListOfInteger.hxx>
 
-Extrema_ExtElCS::Extrema_ExtElCS() 
+Extrema_ExtElCS::Extrema_ExtElCS() : myDone(Standard_False), myNbExt(0), myIsPar(Standard_False) 
 {
-  myDone = Standard_False;
-  myIsPar = Standard_False;
-  myNbExt = 0;
+  
+  
+  
 }
 
 
@@ -101,7 +103,7 @@ void Extrema_ExtElCS::Perform(const gp_Lin& C,
   }
   else
   {
-    Standard_Integer i, aStartIdx = 0;
+    Standard_Integer i = 0, aStartIdx = 0;
 
     Extrema_POnCurv myPOnC1, myPOnC2;
     Extrem.Points(1, myPOnC1, myPOnC2);
@@ -127,7 +129,7 @@ void Extrema_ExtElCS::Perform(const gp_Lin& C,
           mySqDist = new TColStd_HArray1OfReal(1, myNbExt + 2);
           myPoint1 = new Extrema_HArray1OfPOnCurv(1, myNbExt + 2);
           myPoint2 = new Extrema_HArray1OfPOnSurf(1, myNbExt + 2);
-          Standard_Real u, v, w;
+          Standard_Real u = NAN, v = NAN, w = NAN;
           for (i = 1; i <= myNbExt; i++)
           {
             mySqDist->SetValue(i, 0.);
@@ -242,7 +244,7 @@ void Extrema_ExtElCS::Perform(const gp_Lin& C,
 
   Extrema_ExtPElC Extrem(aCenter, C, Precision::Angular(), RealFirst(), RealLast());
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   if (Extrem.IsDone() &&
       Extrem.NbExt() > 0)
   {
@@ -263,7 +265,7 @@ void Extrema_ExtElCS::Perform(const gp_Lin& C,
         {
           Extrema_POnCurv aCPnt(aLinSphere.ParamOnConic(i), aLinSphere.Point(i));
 
-          Standard_Real u,v;
+          Standard_Real u = NAN,v = NAN;
           ElSLib::Parameters(S, aLinSphere.Point(i), u, v);
           Extrema_POnSurf aSPnt(u, v, aLinSphere.Point(i));
 
@@ -380,9 +382,9 @@ void Extrema_ExtElCS::Perform(const gp_Circ& C,
       mySqDist = new TColStd_HArray1OfReal(1, myNbExt);
       myPoint2 = new Extrema_HArray1OfPOnSurf(1, myNbExt);
 
-      Standard_Integer i;
+      Standard_Integer i = 0;
       gp_Pnt PC, PP;
-      Standard_Real U, V;
+      Standard_Real U = NAN, V = NAN;
       Extrema_POnCurv POnC;
       Extrema_POnSurf POnS;
       for (i = 0; i < 2; ++i)
@@ -457,7 +459,7 @@ void Extrema_ExtElCS::Perform(const gp_Circ& C,
     isParallel = Standard_True;
   } else {
     Standard_Integer aNbExt   = anExtC.NbExt();
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Integer aCurI    = 1;
     Standard_Real    aTolConf = Precision::Confusion();
     Standard_Real    aCylRad  = S.Radius();
@@ -498,7 +500,7 @@ void Extrema_ExtElCS::Perform(const gp_Circ& C,
 
         gp_Dir aDir(aPOnAxis.Value().XYZ().Subtracted(aPOnCirc.Value().XYZ()));
         Standard_Real aShift[2] = {aDist + aCylRad, aDist - aCylRad};
-        Standard_Integer j;
+        Standard_Integer j = 0;
 
         for (j = 0; j < 2; j++) {
           gp_Vec aVec(aDir);
@@ -507,8 +509,8 @@ void Extrema_ExtElCS::Perform(const gp_Circ& C,
           aVec.Multiply(aShift[j]);
           aPntOnCyl = aPOnCirc.Value().Translated(aVec);
 
-          Standard_Real aU;
-          Standard_Real aV;
+          Standard_Real aU = NAN;
+          Standard_Real aV = NAN;
 
           ElSLib::Parameters(S, aPntOnCyl, aU, aV);
 
@@ -523,8 +525,8 @@ void Extrema_ExtElCS::Perform(const gp_Circ& C,
       // Adding intersection points to the list of extremas
       for (i=1; i<=aNbInter; i++)
       {
-        Standard_Real aU;
-        Standard_Real aV;
+        Standard_Real aU = NAN;
+        Standard_Real aV = NAN;
 
         gp_Pnt aInterPnt = aCircCylInter.Point(i);
 
@@ -653,7 +655,7 @@ void Extrema_ExtElCS::Perform(const gp_Circ& C,
     gp_Pnt aPOnC = ElCLib::Value(aT, C);
 
     // Compute parameters on sphere
-    Standard_Real aU, aV;
+    Standard_Real aU = NAN, aV = NAN;
     ElSLib::Parameters(S, aPOnC, aU, aV);
     // Compute point on sphere
     gp_Pnt aPOnS = ElSLib::Value(aU, aV, S);
@@ -715,7 +717,7 @@ void Extrema_ExtElCS::Perform(const gp_Circ& C,
     anExtC.Points(it.Value(), P1, P2);
 
     // Compute parameters on sphere
-    Standard_Real aU, aV;
+    Standard_Real aU = NAN, aV = NAN;
     ElSLib::Parameters(S, P1.Value(), aU, aV);
     // Compute point on sphere
     gp_Pnt aPOnS = ElSLib::Value(aU, aV, S);
@@ -786,7 +788,7 @@ void Extrema_ExtElCS::Perform(const gp_Hypr& C,
       mySqDist = new TColStd_HArray1OfReal(1, 1);
       mySqDist->SetValue(1, S.SquareDistance(Ph));
 
-      Standard_Real U, V;
+      Standard_Real U = NAN, V = NAN;
       ElSLib::PlaneParameters(S.Position(), Ph, U, V);
       gp_Pnt Pp = ElSLib::PlaneValue(U, V, S.Position());
       Extrema_POnSurf PS(U, V, Pp);
index 65bd8619f4a20b2a6bdd981b72848976b4f69b23..6ea2b3b5d6e7858829b972ddabaa340374e1052f 100644 (file)
@@ -145,9 +145,9 @@ private:
 
 
 
-  Standard_Boolean myDone;
-  Standard_Integer myNbExt;
-  Standard_Boolean myIsPar;
+  Standard_Boolean myDone{};
+  Standard_Integer myNbExt{};
+  Standard_Boolean myIsPar{};
   Handle(TColStd_HArray1OfReal) mySqDist;
   Handle(Extrema_HArray1OfPOnCurv) myPoint1;
   Handle(Extrema_HArray1OfPOnSurf) myPoint2;
index e4fe6b1170497fddf70f0b62b6d29e0be079573f..278aa47c51f70803c54d2d9effdee85477a972ec 100644 (file)
 #include <Standard_OutOfRange.hxx>
 #include <StdFail_NotDone.hxx>
 
-Extrema_ExtElSS::Extrema_ExtElSS()
+Extrema_ExtElSS::Extrema_ExtElSS() : myDone(Standard_False), myIsPar(Standard_False), myNbExt(0)
 {
-  myDone = Standard_False;
-  myIsPar = Standard_False;
-  myNbExt = 0;
+  
+  
+  
 }
 
 
index 2cb990eeaa947495def95b8b5eef487d4eb990c9..ee090c1a80e1fc996ab532621bf93451f2e9ab8c 100644 (file)
@@ -112,9 +112,9 @@ private:
 
 
 
-  Standard_Boolean myDone;
-  Standard_Boolean myIsPar;
-  Standard_Integer myNbExt;
+  Standard_Boolean myDone{};
+  Standard_Boolean myIsPar{};
+  Standard_Integer myNbExt{};
   Handle(TColStd_HArray1OfReal) mySqDist;
   Handle(Extrema_HArray1OfPOnSurf) myPOnS1;
   Handle(Extrema_HArray1OfPOnSurf) myPOnS2;
index 53514f594ba4df720bedfcc515985de612cf332a..6a7dc81ad8360fb0ac6bd9b8152ac780f9deaed2 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Extrema_ExtPElC.hxx>
 #include <Extrema_POnCurv.hxx>
 //function : Extrema_ExtPElC
 //purpose  : 
 //=======================================================================
-Extrema_ExtPElC::Extrema_ExtPElC()
+Extrema_ExtPElC::Extrema_ExtPElC() : myDone(Standard_False), myNbExt(0)
 {
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
 
   for (Standard_Integer i = 0; i < 4; i++)
   {
@@ -153,7 +155,7 @@ Method:
 
   Standard_Real myuinf = Uinf;
   //Standard_Real TolU = Tol*C.Radius();
-  Standard_Real TolU, aR;
+  Standard_Real TolU = NAN, aR = NAN;
   aR=C.Radius();
   TolU=Precision::Infinite();
   if (aR > gp::Resolution()) {
@@ -169,7 +171,7 @@ Method:
 // 3- Calculate extrema in [Umin,Umax] ...
 
   gp_Pnt Cu;
-  Standard_Real Us;
+  Standard_Real Us = NAN;
   for (Standard_Integer NoSol = 0; NoSol <= 1; NoSol++) {
     Us = Usol[NoSol];
     if (((Uinf-Us) < TolU) && ((Us-Usup) < TolU)) {
@@ -231,7 +233,7 @@ Method:
 
 // 2- Calculation of solutions ...
 
-  Standard_Integer NoSol, NbSol;
+  Standard_Integer NoSol = 0, NbSol = 0;
   Standard_Real A = C.MajorRadius();
   Standard_Real B = C.MinorRadius();
   gp_Vec OPp (O,Pp);
@@ -249,7 +251,7 @@ Method:
 
   if (!Sol.IsDone()) { return; }
   gp_Pnt Cu;
-  Standard_Real Us;
+  Standard_Real Us = NAN;
   NbSol = Sol.NbSolutions();
   for (NoSol = 1; NoSol <= NbSol; NoSol++) {
     Us = Sol.Value(NoSol);
@@ -331,10 +333,10 @@ Method:
   math_DirectPolynomialRoots Sol(C1,-(X*R+Y*r)/2.,0.,(X*R-Y*r)/2.,-C1);
   if (!Sol.IsDone()) { return; }
   gp_Pnt Cu;
-  Standard_Real Us, Vs;
+  Standard_Real Us = NAN, Vs = NAN;
   Standard_Integer NbSol = Sol.NbSolutions();
-  Standard_Boolean DejaEnr;
-  Standard_Integer NoExt;
+  Standard_Boolean DejaEnr = 0;
+  Standard_Integer NoExt = 0;
   gp_Pnt TbExt[4];
   for (Standard_Integer NoSol = 1; NoSol <= NbSol; NoSol++) {
     Vs = Sol.Value(NoSol);
@@ -418,10 +420,10 @@ Method:
   math_DirectPolynomialRoots Sol(1./(4.*F),0.,2.*F-X,-2.*F*Y);
   if (!Sol.IsDone()) { return; }
   gp_Pnt Cu;
-  Standard_Real Us;
+  Standard_Real Us = NAN;
   Standard_Integer NbSol = Sol.NbSolutions();
-  Standard_Boolean DejaEnr;
-  Standard_Integer NoExt;
+  Standard_Boolean DejaEnr = 0;
+  Standard_Integer NoExt = 0;
   gp_Pnt TbExt[3];
   for (Standard_Integer NoSol = 1; NoSol <= NbSol; NoSol++) {
     Us = Sol.Value(NoSol);
index a597b084bb3f2f1c17db45fa78e2d0c26d318365..d3ecb32910e7e99f0be6ee4da995fd30d094caa5 100644 (file)
@@ -128,10 +128,10 @@ private:
 
 
 
-  Standard_Boolean myDone;
-  Standard_Integer myNbExt;
-  Standard_Real mySqDist[4];
-  Standard_Boolean myIsMin[4];
+  Standard_Boolean myDone{};
+  Standard_Integer myNbExt{};
+  Standard_Real mySqDist[4]{};
+  Standard_Boolean myIsMin[4]{};
   Extrema_POnCurv myPoint[4];
 
 
index 460c59569d230c77ed26e68cad1a68df5369a894..93a783ceb2226fca3da2e517d153105b1a4ae51e 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Extrema_ExtPElC2d.hxx>
 #include <Extrema_POnCurv2d.hxx>
 #include <StdFail_NotDone.hxx>
 
 //=============================================================================
-Extrema_ExtPElC2d::Extrema_ExtPElC2d()
+Extrema_ExtPElC2d::Extrema_ExtPElC2d() : myDone(Standard_False), myNbExt(0)
 {
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
 
   for (Standard_Integer i = 0; i < 4; i++)
   {
@@ -108,7 +110,7 @@ void Extrema_ExtPElC2d::Perform(const gp_Pnt2d&     P,
   }
   else
   {
-    Standard_Real radius, U1, U2;
+    Standard_Real radius = NAN, U1 = NAN, U2 = NAN;
     gp_Pnt2d P1, P2;
 
     myDone = Standard_True;
@@ -179,7 +181,7 @@ void Extrema_ExtPElC2d::Perform (const gp_Pnt2d&     P,
   gp_Pnt2d OR;
   OR = E.Location();
 
-  Standard_Integer NoSol, NbSol;
+  Standard_Integer NoSol = 0, NbSol = 0;
   Standard_Real A = E.MajorRadius();
   Standard_Real B = E.MinorRadius();
   gp_Vec2d V(OR,P);
@@ -196,7 +198,7 @@ void Extrema_ExtPElC2d::Perform (const gp_Pnt2d&     P,
 
     if (!Sol.IsDone()) { return; }
     gp_Pnt2d Cu;
-    Standard_Real Us;
+    Standard_Real Us = NAN;
     NbSol = Sol.NbSolutions();
     myNbExt = 0;
     for (NoSol = 1; NoSol <= NbSol; NoSol++) {
@@ -242,10 +244,10 @@ void Extrema_ExtPElC2d::Perform(const gp_Pnt2d&     P,
   math_DirectPolynomialRoots Sol(C1,-(X*R+Y*r)/2.,0.,(X*R-Y*r)/2.,-C1);
   if (!Sol.IsDone()) { return; }
   gp_Pnt2d Cu;
-  Standard_Real Us, Vs;
+  Standard_Real Us = NAN, Vs = NAN;
   Standard_Integer NbSol = Sol.NbSolutions();
-  Standard_Boolean DejaEnr;
-  Standard_Integer NoExt;
+  Standard_Boolean DejaEnr = 0;
+  Standard_Integer NoExt = 0;
   gp_Pnt2d TbExt[4];
   for (Standard_Integer NoSol = 1; NoSol <= NbSol; NoSol++) {
     Vs = Sol.Value(NoSol);
@@ -304,10 +306,10 @@ void Extrema_ExtPElC2d::Perform(const gp_Pnt2d&     P,
   math_DirectPolynomialRoots Sol(1./(4.*F),0.,2.*F-X,-2.*F*Y);
   if (!Sol.IsDone()) { return; }
   gp_Pnt2d Cu;
-  Standard_Real Us;
+  Standard_Real Us = NAN;
   Standard_Integer NbSol = Sol.NbSolutions();
-  Standard_Boolean DejaEnr;
-  Standard_Integer NoExt;
+  Standard_Boolean DejaEnr = 0;
+  Standard_Integer NoExt = 0;
   gp_Pnt2d TbExt[3];
   for (Standard_Integer NoSol = 1; NoSol <= NbSol; NoSol++) {
     Us = Sol.Value(NoSol);
index bba9efbd23c0590c958e4d6a5592e76b6e962104..208fad09080925ac4da48cf356392490b734fd73 100644 (file)
@@ -128,10 +128,10 @@ private:
 
 
 
-  Standard_Boolean myDone;
-  Standard_Integer myNbExt;
-  Standard_Real mySqDist[4];
-  Standard_Boolean myIsMin[4];
+  Standard_Boolean myDone{};
+  Standard_Integer myNbExt{};
+  Standard_Real mySqDist[4]{};
+  Standard_Boolean myIsMin[4]{};
   Extrema_POnCurv2d myPoint[4];
 
 
index 6b74541a1bd66f881c707e750ef37856a84c817a..c8f4cde2403b2ea72e5b8e004d2165e39aabcc4a 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElSLib.hxx>
 #include <Extrema_ExtPElS.hxx>
 #include <Extrema_POnSurf.hxx>
 static const Standard_Real ExtPElS_MyEps = Epsilon(2. * M_PI);
 //=============================================================================
 
-Extrema_ExtPElS::Extrema_ExtPElS()
+Extrema_ExtPElS::Extrema_ExtPElS() : myDone(Standard_False), myNbExt(0)
 {
-  myDone = Standard_False;
-  myNbExt = 0;
+  
+  
   for (Standard_Integer i = 0; i < 4; i++)
   {
     mySqDist[i] = RealLast();
@@ -176,7 +178,7 @@ void Extrema_ExtPElS::Perform(const gp_Pnt&       P,
   gp_Pnt Pp = P.Translated(OZ.Multiplied(-Zp));
   gp_Vec OPp(O, Pp);
   if (OPp.SquareMagnitude() < Tol * Tol) return;
-  Standard_Real B, U1, V1, U2, V2;
+  Standard_Real B = NAN, U1 = NAN, V1 = NAN, U2 = NAN, V2 = NAN;
   Standard_Boolean Same = DirZ.Dot(MP) >= 0.0;
   U1 = gp_Vec(Pos.XDirection()).AngleWithRef(OPp,myZ); //-M_PI<U1<M_PI
   if (U1 > -ExtPElS_MyEps && U1 < ExtPElS_MyEps) { U1 = 0.; }
@@ -263,7 +265,7 @@ void Extrema_ExtPElS::Perform(const gp_Pnt&       P,
 
 // Calculation of extrema ...
   gp_Vec OPp (O,Pp);
-  Standard_Real U1, U2, V;
+  Standard_Real U1 = NAN, U2 = NAN, V = NAN;
   if (OPp.SquareMagnitude() < Tol * Tol) {
     U1 = 0.;
     U2 = 0.;
@@ -400,7 +402,7 @@ void Extrema_ExtPElS::Perform (const gp_Pnt&       P,
 // Projection of point P in plane XOY of the cylinder ...
   gp_Pnt O = S.Location();
   gp_Vec OZ (S.Axis().Direction());
-  Standard_Real U, V = gp_Vec(O,P).Dot(OZ);
+  Standard_Real U = NAN, V = gp_Vec(O,P).Dot(OZ);
   gp_Pnt Pp = P.Translated(OZ.Multiplied(-V));
 
   ElSLib::Parameters(S, P, U, V);
index b3aae2b99a794c73f59a01cf36c4c5205470361c..2d94a28996c580be2959fa77c409806a2a6614ff 100644 (file)
@@ -103,9 +103,9 @@ private:
 
 
 
-  Standard_Boolean myDone;
-  Standard_Integer myNbExt;
-  Standard_Real mySqDist[4];
+  Standard_Boolean myDone{};
+  Standard_Integer myNbExt{};
+  Standard_Real mySqDist[4]{};
   Extrema_POnSurf myPoint[4];
 
 
index 1173a5efdbd20f3cb635ade34612b46348dabbcd..e491cb4c078fe49edeb8c676961c4e0f8416079e 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Standard_NotImplemented.hxx>
 #include <ElCLib.hxx>
 #include <Extrema_ExtPElC.hxx>
@@ -99,7 +101,7 @@ void Extrema_ExtPExtS::MakePreciser (Standard_Real& U,
     U = myuinf;
   } else {
     
-    Standard_Real step = (myusup - myuinf) / 30, D2e, D2next ,D2prev;
+    Standard_Real step = (myusup - myuinf) / 30, D2e = NAN, D2next = NAN ,D2prev = NAN;
     gp_Pnt
       Pe = ProjectPnt (OrtogSection, myDirection, GetValue(U,myC)),
       Pprev = ProjectPnt (OrtogSection, myDirection, GetValue(U-step, myC)),
@@ -107,7 +109,7 @@ void Extrema_ExtPExtS::MakePreciser (Standard_Real& U,
     D2e = P.SquareDistance(Pe),
     D2next = P.SquareDistance(Pnext),
     D2prev = P.SquareDistance(Pprev);
-    Standard_Boolean notFound;
+    Standard_Boolean notFound = 0;
     if (isMin) 
       notFound =  (D2e > D2prev || D2e > D2next);
     else 
@@ -303,12 +305,12 @@ void Extrema_ExtPExtS::Perform (const gp_Pnt& P)
   if (!anExt.IsDone()) return;
   
   gp_Ax2 anOrtogSection (P, myDirection);
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
   Standard_Boolean
-    isMin,
+    isMin = 0,
     isSimpleCase =
       myDirection.IsParallel(myPosition.Direction(),Precision::Angular());
-  Standard_Integer i, aNbExt = anExt.NbExt();
+  Standard_Integer i = 0, aNbExt = anExt.NbExt();
   math_Vector UV(1,2), Tol(1,2), UVinf(1,2), UVsup(1,2);
   Tol(1) = mytolu;   Tol(2) = mytolv;
   UVinf(1) = myuinf; UVinf(2) = myvinf;
@@ -354,7 +356,7 @@ void Extrema_ExtPExtS::Perform (const gp_Pnt& P)
       math_FunctionSetRoot aFSR (myF, Tol);
       aFSR.Perform(myF, UV, UVinf, UVsup);
 //      for (Standard_Integer k=1 ; k <= myF.NbExt(); 
-      Standard_Integer k;
+      Standard_Integer k = 0;
       for ( k=1 ; k <= myF.NbExt(); k++) {
              if (IsOriginalPnt(myF.Point(k).Value(), myPoint, myNbExt)) {
                // modified by NIZHNY-MKK  Thu Sep 18 14:46:41 2003.BEGIN
@@ -393,7 +395,7 @@ void Extrema_ExtPExtS::Perform (const gp_Pnt& P)
           Standard_Real dist = Sqrt(myF.SquareDistance(k));
           math_Vector Vals(1, 2);
           const Extrema_POnSurf& PonS=myF.Point(k);
-          Standard_Real u, v;
+          Standard_Real u = NAN, v = NAN;
           PonS.Parameter(u, v);
           UV(1) = u;
           UV(2) = v;
index 5701ee1ed313c3c985db75ae9fa6170c0127dd7b..22cb25f257c7eb2b6bdee1a19362ca6199fa8ac8 100644 (file)
@@ -92,7 +92,7 @@ private:
   Standard_Boolean myIsAnalyticallyComputable;
   Standard_Boolean myDone;
   Standard_Integer myNbExt;
-  Standard_Real mySqDist[4];
+  Standard_Real mySqDist[4]{};
   Extrema_POnSurf myPoint[4];
 
 
index 29764f4c03d8644d4b568d981ade279851632a26..f72418f49ae70d82354387c8ccfaaa3e91ecd227 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <ElCLib.hxx>
 #include <Extrema_ExtPElC.hxx>
@@ -207,13 +209,13 @@ static Standard_Boolean IsExtremum (const Standard_Real U, const Standard_Real V
 //purpose  : 
 //=======================================================================
 
-Extrema_ExtPRevS::Extrema_ExtPRevS() 
+Extrema_ExtPRevS::Extrema_ExtPRevS() : mytolv(Precision::Confusion()), myIsAnalyticallyComputable(Standard_False), myDone(Standard_False), myNbExt(0) 
 {
   myvinf = myvsup = 0.0;
-  mytolv = Precision::Confusion();
-  myDone = Standard_False;
-  myNbExt = 0;
-  myIsAnalyticallyComputable = Standard_False;
+  
+  
+  
+  
 
   for (Standard_Integer i = 0; i < 8; i++)
   {
@@ -344,7 +346,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
   if (O.IsEqual(Pp,Precision::Confusion())) // P is on the AxeOfRevolution
     return;
   
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
   gp_Pnt P1, Ppp;
   Standard_Real OPpz = gp_Vec(O,Pp).Dot(Z);
   if (Abs(OPpz) <= gp::Resolution()) {
@@ -373,8 +375,8 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
   P1 = P.Transformed(T);
   
   gp_Pnt E;
-  Standard_Real Dist2;
-  Standard_Integer i;
+  Standard_Real Dist2 = NAN;
+  Standard_Integer i = 0;
   
   Extrema_ExtPElC anExt;
   PerformExtPElC(anExt, P1, anACurve, mytolv);
index 405436cfeb9653a5604d71d77351d18d8d2c847d..b6c059290f713d8a6ae7c42902ca4b4e644cf5b8 100644 (file)
@@ -73,15 +73,15 @@ private:
 
 
   Handle(GeomAdaptor_SurfaceOfRevolution) myS;
-  Standard_Real myvinf;
-  Standard_Real myvsup;
-  Standard_Real mytolv;
+  Standard_Real myvinf{};
+  Standard_Real myvsup{};
+  Standard_Real mytolv{};
   gp_Ax2 myPosition;
   Extrema_GenExtPS myExtPS;
-  Standard_Boolean myIsAnalyticallyComputable;
-  Standard_Boolean myDone;
-  Standard_Integer myNbExt;
-  Standard_Real mySqDist[8];
+  Standard_Boolean myIsAnalyticallyComputable{};
+  Standard_Boolean myDone{};
+  Standard_Integer myNbExt{};
+  Standard_Real mySqDist[8]{};
   Extrema_POnSurf myPoint[8];
 
 
index 7a09e25bf931ebf3928d7afa3741d29dc8899d33..fc60ad9b368462ddc7592efddc70670693cdb640 100644 (file)
@@ -14,6 +14,8 @@
 
 //-----------------------------------------------------------------
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Extrema_ExtPExtS.hxx>
 #include <Extrema_ExtPRevS.hxx>
@@ -37,7 +39,7 @@ static Standard_Boolean IsoIsDeg  (const Adaptor3d_Surface& S,
                                   const Standard_Real      TolMin,
                                   const Standard_Real      TolMax) 
 {
-    Standard_Real U1=0.,U2=0.,V1=0.,V2=0.,T;
+    Standard_Real U1=0.,U2=0.,V1=0.,V2=0.,T = NAN;
     Standard_Boolean Along = Standard_True;
     U1 = S.FirstUParameter();
     U2 = S.LastUParameter();
@@ -45,7 +47,7 @@ static Standard_Boolean IsoIsDeg  (const Adaptor3d_Surface& S,
     V2 = S.LastVParameter();
     gp_Vec D1U,D1V;
     gp_Pnt P;
-    Standard_Real Step,D1NormMax;
+    Standard_Real Step = NAN,D1NormMax = NAN;
     if (IT == GeomAbs_IsoV) 
     {
       if( !Precision::IsInfinite(U1) &&  !Precision::IsInfinite(U2) )
@@ -99,7 +101,7 @@ static Standard_Boolean IsoIsDeg  (const Adaptor3d_Surface& S,
 void Extrema_ExtPS::TreatSolution (const Extrema_POnSurf& PS,
                                   const Standard_Real Val)
 {
-  Standard_Real U, V;
+  Standard_Real U = NAN, V = NAN;
   PS.Parameter(U, V);
   if (myS->IsUPeriodic()) {
     U = ElCLib::InPeriod(U, myuinf, myuinf + myS->UPeriod());
index 60c9aadadeec28d3aa24d262121f1aacaba1dab8..5fbf0f00f405b45b983ea3eef9bf02fd96399b26 100644 (file)
@@ -109,21 +109,21 @@ private:
 
 private:
 
-  const Adaptor3d_Surface* myS;
-  Standard_Boolean myDone;
+  const Adaptor3d_Surface* myS{};
+  Standard_Boolean myDone{};
   Extrema_ExtPElS myExtPElS;
   Extrema_GenExtPS myExtPS;
   Extrema_SequenceOfPOnSurf myPoints;
-  Standard_Real myuinf;
-  Standard_Real myusup;
-  Standard_Real myvinf;
-  Standard_Real myvsup;
-  Standard_Real mytolu;
-  Standard_Real mytolv;
-  Standard_Real d11;
-  Standard_Real d12;
-  Standard_Real d21;
-  Standard_Real d22;
+  Standard_Real myuinf{};
+  Standard_Real myusup{};
+  Standard_Real myvinf{};
+  Standard_Real myvsup{};
+  Standard_Real mytolu{};
+  Standard_Real mytolv{};
+  Standard_Real d11{};
+  Standard_Real d12{};
+  Standard_Real d21{};
+  Standard_Real d22{};
   gp_Pnt P11;
   gp_Pnt P12;
   gp_Pnt P21;
index 0d0162fa35e916d02eef941a519eb27360651c3b..f987a6110418080f2a9368eabdaa392182730a1c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <ElCLib.hxx>
 #include <Extrema_ExtSS.hxx>
@@ -111,7 +113,7 @@ void Extrema_ExtSS::Perform(const Adaptor3d_Surface&   S1,
   myPOnS1.Clear();
   myPOnS2.Clear();
   mySqDist.Clear();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   GeomAbs_SurfaceType myS1type  = S1.GetType();
   const Standard_Integer NbU = 20, NbV = 20;
   
@@ -132,7 +134,7 @@ void Extrema_ExtSS::Perform(const Adaptor3d_Surface&   S1,
          myDone = Ext.IsDone();
          if (myDone) {
            Standard_Integer NbExt = Ext.NbExt();
-           Standard_Real U1, V1,U2,V2;
+           Standard_Real U1 = NAN, V1 = NAN,U2 = NAN,V2 = NAN;
            Extrema_POnSurf PS1;
            Extrema_POnSurf PS2;
            for (i = 1; i <= NbExt; i++) {
@@ -172,7 +174,7 @@ void Extrema_ExtSS::Perform(const Adaptor3d_Surface&   S1,
       myDone = Ext.IsDone();
       if (myDone) {
        Standard_Integer NbExt = Ext.NbExt();
-       Standard_Real U1, V1,U2,V2;
+       Standard_Real U1 = NAN, V1 = NAN,U2 = NAN,V2 = NAN;
        Extrema_POnSurf PS1;
        Extrema_POnSurf PS2;
        for (i = 1; i <= NbExt; i++) {
@@ -213,7 +215,7 @@ void Extrema_ExtSS::Perform(const Adaptor3d_Surface&   S1,
     }
     else {
       Standard_Integer NbExt = myExtElSS.NbExt();
-      Standard_Real U1, V1, U2, V2;
+      Standard_Real U1 = NAN, V1 = NAN, U2 = NAN, V2 = NAN;
       Extrema_POnSurf PS1;
       Extrema_POnSurf PS2;
       for (i = 1; i <= NbExt; i++) {
index 5ec6f7c5fe40c382a099d7f4780f9d588314ef5d..380ecee12984d73aa77f18faf2be0f1e2f39214c 100644 (file)
@@ -72,22 +72,22 @@ public:
 
 private:
 
-  const Adaptor3d_Surface* myS2;
-  Standard_Boolean myDone;
-  Standard_Boolean myIsPar;
+  const Adaptor3d_Surface* myS2{};
+  Standard_Boolean myDone{};
+  Standard_Boolean myIsPar{};
   Extrema_ExtElSS myExtElSS;
   Extrema_SequenceOfPOnSurf myPOnS1;
   Extrema_SequenceOfPOnSurf myPOnS2;
-  Standard_Real myuinf1;
-  Standard_Real myusup1;
-  Standard_Real myvinf1;
-  Standard_Real myvsup1;
-  Standard_Real myuinf2;
-  Standard_Real myusup2;
-  Standard_Real myvinf2;
-  Standard_Real myvsup2;
-  Standard_Real mytolS1;
-  Standard_Real mytolS2;
+  Standard_Real myuinf1{};
+  Standard_Real myusup1{};
+  Standard_Real myvinf1{};
+  Standard_Real myvsup1{};
+  Standard_Real myuinf2{};
+  Standard_Real myusup2{};
+  Standard_Real myvinf2{};
+  Standard_Real myvsup2{};
+  Standard_Real mytolS1{};
+  Standard_Real mytolS2{};
   TColStd_SequenceOfReal mySqDist;
   GeomAbs_SurfaceType myStype;
 
index 78b2146d632b1ab8f489684418e162c5b564135d..f235fe72c189333b8113a3acd5ad0372f721f8d8 100644 (file)
@@ -53,10 +53,10 @@ les algorithmes math_FunctionRoot et math_FunctionRoots.
    myS(NULL),
    myt(0.0),
    myU(0.0),
-   myV(0.0)
+   myV(0.0), myCinit(Standard_False), mySinit(Standard_False)
 {
-  myCinit = Standard_False;
-  mySinit = Standard_False;
+  
+  
 }
 
 //=======================================================================
index ef37ca6278c1ac99d06e2073963910b2026909a7..8a2abe2b9fc6f1f2417a1fca4479020cf302163a 100644 (file)
@@ -95,18 +95,18 @@ public:
 
 private:
 
-  const Adaptor3d_Curve* myC;
-  const Adaptor3d_Surface* myS;
+  const Adaptor3d_Curve* myC{};
+  const Adaptor3d_Surface* myS{};
   gp_Pnt myP1;
   gp_Pnt myP2;
-  Standard_Real myt;
-  Standard_Real myU;
-  Standard_Real myV;
+  Standard_Real myt{};
+  Standard_Real myU{};
+  Standard_Real myV{};
   TColStd_SequenceOfReal mySqDist;
   Extrema_SequenceOfPOnCurv myPoint1;
   Extrema_SequenceOfPOnSurf myPoint2;
-  Standard_Boolean myCinit;
-  Standard_Boolean mySinit;
+  Standard_Boolean myCinit{};
+  Standard_Boolean mySinit{};
 
 };
 
index 1657e169e4b245c6e8b7ca7a1a3555609346de4f..92763a196ca14677c519067277a3b27e82013092 100644 (file)
@@ -60,10 +60,10 @@ Extrema_FuncExtSS::Extrema_FuncExtSS ()
   myU1(0.0),
   myV1(0.0),
   myU2(0.0),
-  myV2(0.0)
+  myV2(0.0), myS1init(Standard_False), myS2init(Standard_False)
 {
-  myS1init = Standard_False;
-  myS2init = Standard_False;
+  
+  
 }
 
 //=======================================================================
@@ -73,15 +73,15 @@ Extrema_FuncExtSS::Extrema_FuncExtSS ()
 
 Extrema_FuncExtSS::Extrema_FuncExtSS (const Adaptor3d_Surface& S1,
                                      const Adaptor3d_Surface& S2)
-: myU1(0.0),
+: myS1(&S1), myS2(&S2), myU1(0.0),
   myV1(0.0),
   myU2(0.0),
-  myV2(0.0)
+  myV2(0.0), myS1init(Standard_True), myS2init(Standard_True)
 {
-  myS1 = &S1;
-  myS2 = &S2;
-  myS1init = Standard_True;
-  myS2init = Standard_True;
+  
+  
+  
+  
 }
 
 //=======================================================================
index 649d5da02732d62dcc30a161d57796ecd1386560..5f10bd723aca2dbd7f3f8699deef503e54f5812b 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_FuncPSNorm.hxx>
 #include <Adaptor3d_Surface.hxx>
 #include <Extrema_POnSurf.hxx>
 Extrema_FuncPSNorm::Extrema_FuncPSNorm ()
 : myS(NULL),
   myU(0.0),
-  myV(0.0)
+  myV(0.0), myPinit(Standard_False), mySinit(Standard_False)
 {
-  myPinit = Standard_False;
-  mySinit = Standard_False;
+  
+  
 }
 
 //=============================================================================
 Extrema_FuncPSNorm::Extrema_FuncPSNorm (const gp_Pnt& P,
                                       const Adaptor3d_Surface& S)
-: myU(0.0),
-  myV(0.0)
+: myP(P), myS(&S), myU(0.0),
+  myV(0.0), myPinit(Standard_True), mySinit(Standard_True)
 {
-  myP = P;
-  myS = &S;
-  myPinit = Standard_True;
-  mySinit = Standard_True;
+  
+  
+  
+  
 }
 
 //=============================================================================
@@ -134,7 +136,7 @@ Standard_Integer Extrema_FuncPSNorm::GetStateNumber ()
    
   for( ; i <=  nbSol; i++)
   {
-    Standard_Real aU, aV;
+    Standard_Real aU = NAN, aV = NAN;
        myPoint(i).Parameter(aU, aV);
        if( ((myU - aU ) * (myU - aU ) + (myV - aV ) * (myV - aV )) <= tol2d )
       break;
index c6a8f5089bb1af6f055839e7535ceb67d9173874..bfed5ab8770ead8fa7d74ce0b8fdd0ac97dfd010 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_GenExtCS.hxx>
 #include <Geom_OffsetCurve.hxx>
 #include <Extrema_GlobOptFuncCS.hxx>
@@ -206,7 +208,7 @@ void Extrema_GenExtCS::Initialize (const Adaptor3d_Surface& S,
   myvsup = Vsup;
   mytol2 = Tol2;
 
-  Standard_Real umaxpar, vmaxpar;
+  Standard_Real umaxpar = NAN, vmaxpar = NAN;
   GetSurfMaxParamVals(*myS, umaxpar, vmaxpar);
 
   if(Precision::IsInfinite (myusup))
@@ -323,7 +325,7 @@ void Extrema_GenExtCS::Perform (const Adaptor3d_Curve& C,
     }
   }
 
-  Standard_Integer anInt;
+  Standard_Integer anInt = 0;
   Standard_Real dT = (mytsup - mytmin) / aNbIntC;
   for (anInt = 1; anInt <= aNbIntC; anInt++)
   {
@@ -363,7 +365,7 @@ void Extrema_GenExtCS::Perform (const Adaptor3d_Curve& C,
     Extrema_SequenceOfPOnSurf aPntsOnSurf1(aPntsOnSurf);
 
     Standard_Real aMinDist = aSqDists(1);
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 2; i <= aSqDists.Length(); ++i)
     {
       Standard_Real aDist = aSqDists(i);
@@ -478,7 +480,7 @@ void Extrema_GenExtCS::GlobMinGenCS(const Adaptor3d_Curve& theC,
   aStep(3) = aStepSV;
 
   // Find min approximation
-  Standard_Real aValue;
+  Standard_Real aValue = NAN;
   Extrema_GlobOptFuncCS aFunc(&theC, myS);
   math_PSO aPSO(&aFunc, theTUVinf, theTUVsup, aStep);
   aPSO.Perform(aParticles, theNbParticles, aValue, theTUV);
@@ -496,7 +498,7 @@ void Extrema_GenExtCS::GlobMinConicS(const Adaptor3d_Curve& theC,
 {
   Standard_Integer aNbVar = 2;
   math_Vector  anUVinf(1, aNbVar), anUVsup(1, aNbVar), anUV(1, aNbVar);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= aNbVar; ++i)
   {
     anUVinf(i) = theTUVinf(i + 1);
@@ -535,7 +537,7 @@ void Extrema_GenExtCS::GlobMinConicS(const Adaptor3d_Curve& theC,
     for (Standard_Integer aSVI = 0; aSVI <= aVsample; aSVI++, aSV += aStepSV)
     {
       anUV(2) = aSV;
-      Standard_Real aSqDist;
+      Standard_Real aSqDist = NAN;
       if (!aFunc.Value(anUV, aSqDist))
       {
         aSqDist = Precision::Infinite();
@@ -562,7 +564,7 @@ void Extrema_GenExtCS::GlobMinConicS(const Adaptor3d_Curve& theC,
   aStep(2) = aStepSV;
 
   // Find min approximation
-  Standard_Real aValue;
+  Standard_Real aValue = NAN;
   math_PSO aPSO(&aFunc, anUVinf, anUVsup, aStep);
   aPSO.Perform(aParticles, theNbParticles, aValue, anUV);
   //
@@ -603,7 +605,7 @@ void Extrema_GenExtCS::GlobMinConicS(const Adaptor3d_Curve& theC,
     // PcPs is perpendicular to surface normal, it means that
     // aPOnC can be on surface, but far from aPOnS
     isBadSol = Standard_True;
-    Standard_Integer iu, iv;
+    Standard_Integer iu = 0, iv = 0;
     for (iu = -1; iu <= 1; ++iu)
     {
       Standard_Real u = anUV(1) + iu * aStepSU;
@@ -736,7 +738,7 @@ void Extrema_GenExtCS::GlobMinCQuadric(const Adaptor3d_Curve& theC,
   for (Standard_Integer aCUI = 0; aCUI <= aNewCsample; aCUI++, aCT += aStepCT)
   {
     aT(1) = aCT;
-    Standard_Real aSqDist; 
+    Standard_Real aSqDist = NAN
     if (!aFunc.Value(aT, aSqDist))
     {
       aSqDist = Precision::Infinite();
@@ -759,7 +761,7 @@ void Extrema_GenExtCS::GlobMinCQuadric(const Adaptor3d_Curve& theC,
   aStep(1) = aStepCT;
 
   // Find min approximation
-  Standard_Real aValue;
+  Standard_Real aValue = NAN;
   math_PSO aPSO(&aFunc, aTinf, aTsup, aStep);
   aPSO.Perform(aParticles, theNbParticles, aValue, aT);
   //
index cd460ba7f2484d19698c33b7a564e0051def38d4..e071c701591b46bd936a25b205167b30b0211f54 100644 (file)
@@ -116,20 +116,20 @@ private:
 
 private:
 
-  Standard_Boolean myDone;
-  Standard_Real mytmin;
-  Standard_Real mytsup;
-  Standard_Real myumin;
-  Standard_Real myusup;
-  Standard_Real myvmin;
-  Standard_Real myvsup;
-  Standard_Integer mytsample;
-  Standard_Integer myusample;
-  Standard_Integer myvsample;
-  Standard_Real mytol1;
-  Standard_Real mytol2;
+  Standard_Boolean myDone{};
+  Standard_Real mytmin{};
+  Standard_Real mytsup{};
+  Standard_Real myumin{};
+  Standard_Real myusup{};
+  Standard_Real myvmin{};
+  Standard_Real myvsup{};
+  Standard_Integer mytsample{};
+  Standard_Integer myusample{};
+  Standard_Integer myvsample{};
+  Standard_Real mytol1{};
+  Standard_Real mytol2{};
   Extrema_FuncExtCS myF;
-  const Adaptor3d_Surface* myS;
+  const Adaptor3d_Surface* myS{};
   Handle(TColgp_HArray2OfPnt) mySurfPnts;
 
 };
index ed2b6373bcfce3744b6622c6af8ea5d2d54b4d93..1a8d57145e0327b4eeff2aa8090ebd4bd598f7cb 100644 (file)
@@ -16,6 +16,8 @@
 
 //  Modified by skv - Thu Sep 30 15:21:07 2004 OCC593
 
+#include <math.h>
+
 #include <Extrema_GenExtPS.hxx>
 
 #include <Bnd_HArray1OfSphere.hxx>
@@ -56,9 +58,9 @@ Bnd_Sphere& theSol)
   Bnd_Sphere& Sphere() const
   { return mySol; }
 
-  virtual Standard_Boolean Reject( const Bnd_Sphere &theBnd ) const = 0;
+  Standard_Boolean Reject( const Bnd_Sphere &theBnd ) const override = 0;
   
-  virtual Standard_Boolean Accept(const Standard_Integer& theObj) = 0;
+  Standard_Boolean Accept(const Standard_Integer& theObj) override = 0;
  protected:
   gp_Pnt                              myXYZ;
   const Handle(Bnd_HArray1OfSphere)&  mySphereArray;
@@ -83,7 +85,7 @@ public:
   Standard_Real MinDist() const
   { return myMinDist; }
 
-  Standard_Boolean Reject( const Bnd_Sphere &theBnd ) const
+  Standard_Boolean Reject( const Bnd_Sphere &theBnd ) const override
   { 
     Bnd_SphereUBTreeSelectorMin* me =
       const_cast<Bnd_SphereUBTreeSelectorMin*>(this);
@@ -91,7 +93,7 @@ public:
     return theBnd.IsOut( myXYZ.XYZ(), me->myMinDist );
   }
 
-  Standard_Boolean Accept(const Standard_Integer&);
+  Standard_Boolean Accept(const Standard_Integer&) override;
 
 private:
        Standard_Real   myMinDist;
@@ -100,7 +102,7 @@ private:
 Standard_Boolean Bnd_SphereUBTreeSelectorMin::Accept(const Standard_Integer& theInd)
 {
   const Bnd_Sphere& aSph = mySphereArray->Value(theInd);
-  Standard_Real aCurDist;
+  Standard_Real aCurDist = NAN;
 
 //    if ( (aCurDist = aSph.SquareDistance(myXYZ.XYZ())) < mySol.SquareDistance(myXYZ.XYZ()) )
     if ( (aCurDist = aSph.Distance(myXYZ.XYZ())) < mySol.Distance(myXYZ.XYZ()) )
@@ -130,7 +132,7 @@ public:
   Standard_Real MaxDist() const
   { return myMaxDist; }
 
-  Standard_Boolean Reject( const Bnd_Sphere &theBnd ) const
+  Standard_Boolean Reject( const Bnd_Sphere &theBnd ) const override
   { 
     Bnd_SphereUBTreeSelectorMax* me =
       const_cast<Bnd_SphereUBTreeSelectorMax*>(this);
@@ -138,7 +140,7 @@ public:
     return theBnd.IsOut( myXYZ.XYZ(), me->myMaxDist );
   }
 
-  Standard_Boolean Accept(const Standard_Integer&);
+  Standard_Boolean Accept(const Standard_Integer&) override;
 
 private:
        Standard_Real   myMaxDist;
@@ -147,7 +149,7 @@ private:
 Standard_Boolean Bnd_SphereUBTreeSelectorMax::Accept(const Standard_Integer& theInd)
 {
   const Bnd_Sphere& aSph = mySphereArray->Value(theInd);
-  Standard_Real aCurDist;
+  Standard_Real aCurDist = NAN;
 
 //    if ( (aCurDist = aSph.SquareDistance(myXYZ.XYZ())) > mySol.SquareDistance(myXYZ.XYZ()) )
     if ( (aCurDist = aSph.Distance(myXYZ.XYZ())) > mySol.Distance(myXYZ.XYZ()) )
@@ -208,7 +210,7 @@ Processing:
 -----------------------------------------------------------------------------*/
 
 Extrema_GenExtPS::Extrema_GenExtPS()
-: myumin(0.0),
+: myDone(Standard_False), myInit(Standard_False), myumin(0.0),
   myusup(0.0),
   myvmin(0.0),
   myvsup(0.0),
@@ -216,12 +218,12 @@ Extrema_GenExtPS::Extrema_GenExtPS()
   myvsample(0),
   mytolu(0.0),
   mytolv(0.0),
-  myS(NULL)
+  myS(NULL), myFlag(Extrema_ExtFlag_MINMAX), myAlgo(Extrema_ExtAlgo_Grad)
 {
-  myDone = Standard_False;
-  myInit = Standard_False;
-  myFlag = Extrema_ExtFlag_MINMAX;
-  myAlgo = Extrema_ExtAlgo_Grad;
+  
+  
+  
+  
 }
 
 // =======================================================================
@@ -518,7 +520,7 @@ const Extrema_POnSurfParams& Extrema_GenExtPS::ComputeEdgeParameters
 
 void Extrema_GenExtPS::BuildGrid(const gp_Pnt &thePoint)
 {
-  Standard_Integer NoU, NoV;
+  Standard_Integer NoU = 0, NoV = 0;
 
   //if grid was already built skip its creation
   if (!myInit) {
@@ -638,9 +640,9 @@ void Extrema_GenExtPS::BuildGrid(const gp_Pnt &thePoint)
     // { Point(i, j); Point(i + 1, j); Point(i + 1, j + 1); Point(i, j + 1) }
     //   Or
     // { UEdge(i, j); VEdge(i + 1, j); UEdge(i, j + 1); VEdge(i, j) }
-    Standard_Real aSqrDist01;
-    Standard_Real aDiffDist;
-    Standard_Boolean isOut;
+    Standard_Real aSqrDist01 = NAN;
+    Standard_Real aDiffDist = NAN;
+    Standard_Boolean isOut = 0;
 
     for ( NoU = 1 ; NoU < myusample; NoU++ ) {
       for ( NoV = 1 ; NoV < myvsample; NoV++) {
@@ -680,8 +682,8 @@ void Extrema_GenExtPS::BuildGrid(const gp_Pnt &thePoint)
           // Find closest point inside the face.
           Standard_Real aU[2];
           Standard_Real aV[2];
-          Standard_Real aUPar;
-          Standard_Real aVPar;
+          Standard_Real aUPar = NAN;
+          Standard_Real aVPar = NAN;
 
           // Compute U parameter.
           aUE0.Parameter(aU[0], aV[0]);
@@ -720,7 +722,7 @@ static Standard_Real LengthOfIso(const Adaptor3d_Surface& theS, const GeomAbs_Is
   const Standard_Integer theNbPnts,  const Standard_Real thePar)
 {
   Standard_Real aLen = 0.;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real dPar = (thePar2 - thePar1) / (theNbPnts - 1);
   gp_Pnt aP1, aP2;
   Standard_Real aPar = thePar1 + dPar;
@@ -836,7 +838,7 @@ void Extrema_GenExtPS::BuildTree()
   //build grid of parametric points 
   myUParams = new TColStd_HArray1OfReal(1,myusample );
   myVParams = new TColStd_HArray1OfReal(1,myvsample );
-  Standard_Integer NoU, NoV;
+  Standard_Integer NoU = 0, NoV = 0;
   Standard_Real U = U0, V = V0;
   for ( NoU = 1 ; NoU <= myusample; NoU++, U += PasU) 
     myUParams->SetValue(NoU, U);
@@ -905,17 +907,17 @@ void Extrema_GenExtPS::Perform(const gp_Pnt& P)
   if(myAlgo == Extrema_ExtAlgo_Grad)
   {
     BuildGrid(P);
-    Standard_Integer NoU,NoV;
+    Standard_Integer NoU = 0,NoV = 0;
 
     if(myFlag == Extrema_ExtFlag_MIN || myFlag == Extrema_ExtFlag_MINMAX) 
     {
       Extrema_ElementType anElemType;
-      Standard_Integer iU;
-      Standard_Integer iV;
-      Standard_Integer iU2;
-      Standard_Integer iV2;
-      Standard_Boolean isMin;
-      Standard_Integer i;
+      Standard_Integer iU = 0;
+      Standard_Integer iV = 0;
+      Standard_Integer iU2 = 0;
+      Standard_Integer iV2 = 0;
+      Standard_Boolean isMin = 0;
+      Standard_Integer i = 0;
 
       for (NoU = 1; NoU < myusample; NoU++) {
         for (NoV = 1; NoV < myvsample; NoV++) {
@@ -993,7 +995,7 @@ void Extrema_GenExtPS::Perform(const gp_Pnt& P)
     
     if(myFlag == Extrema_ExtFlag_MAX || myFlag == Extrema_ExtFlag_MINMAX)
     {
-      Standard_Real Dist;
+      Standard_Real Dist = NAN;
 
       for (NoU = 1; NoU <= myusample; NoU++)
       {
index 61d3b8c769249547c82e0afb0d58aac170e8986a..d2aad5f1f64f7f996ace469035cae938e6e3ad89 100644 (file)
@@ -119,22 +119,22 @@ private:
 
 private:
 
-  Standard_Boolean myDone;
-  Standard_Boolean myInit;
-  Standard_Real myumin;
-  Standard_Real myusup;
-  Standard_Real myvmin;
-  Standard_Real myvsup;
-  Standard_Integer myusample;
-  Standard_Integer myvsample;
-  Standard_Real mytolu;
-  Standard_Real mytolv;
+  Standard_Boolean myDone{};
+  Standard_Boolean myInit{};
+  Standard_Real myumin{};
+  Standard_Real myusup{};
+  Standard_Real myvmin{};
+  Standard_Real myvsup{};
+  Standard_Integer myusample{};
+  Standard_Integer myvsample{};
+  Standard_Real mytolu{};
+  Standard_Real mytolv{};
 
   Extrema_Array2OfPOnSurfParams myPoints;
   Extrema_HUBTreeOfSphere mySphereUBTree;
   Handle(Bnd_HArray1OfSphere) mySphereArray;
   Extrema_FuncPSNorm myF;
-  const Adaptor3d_Surface* myS;
+  const Adaptor3d_Surface* myS{};
   Extrema_ExtFlag myFlag;
   Extrema_ExtAlgo myAlgo;
   Handle(TColStd_HArray1OfReal) myUParams;
index b56eca7397c3c724d58e288003fb9f617b78281c..0b34eb5c2f5bf169b593e89735988b3bf9ac1100 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Extrema_GenExtSS.hxx>
 #include <Extrema_POnSurf.hxx>
@@ -38,18 +40,18 @@ public:
     {
     }
 
-  Standard_EXPORT Standard_Integer NbVariables() const
+  Standard_EXPORT Standard_Integer NbVariables() const override
   {
     return 4;
   }
 
-  Standard_EXPORT virtual Standard_Boolean Value(const math_Vector& X,Standard_Real& F)
+  Standard_EXPORT Standard_Boolean Value(const math_Vector& X,Standard_Real& F) override
   {
     F = myS1->Value(X(1), X(2)).SquareDistance(myS2->Value(X(3), X(4)));
     return true;
   }
 
-  Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X,math_Vector& G)
+  Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X,math_Vector& G) override
   {
     gp_Pnt P1, P2;
     gp_Vec Du1s1, Dv1s1;
@@ -67,7 +69,7 @@ public:
     return true;
   }
 
-  Standard_EXPORT virtual  Standard_Boolean Values(const math_Vector& X,Standard_Real& F,math_Vector& G)
+  Standard_EXPORT  Standard_Boolean Values(const math_Vector& X,Standard_Real& F,math_Vector& G) override
   {
     F = myS1->Value(X(1), X(2)).SquareDistance(myS2->Value(X(3), X(4)));
 
@@ -100,7 +102,7 @@ private:
 //purpose  : 
 //=======================================================================
 Extrema_GenExtSS::Extrema_GenExtSS()
-: myu1min(0.0),
+: myDone(Standard_False), myInit(Standard_False), myu1min(0.0),
   myu1sup(0.0),
   myv1min(0.0),
   myv1sup(0.0),
@@ -114,8 +116,8 @@ Extrema_GenExtSS::Extrema_GenExtSS()
   mytol2(0.0),
   myS2(NULL)
 {
-  myDone = Standard_False;
-  myInit = Standard_False;
+  
+  
 }
 
 // =======================================================================
@@ -223,8 +225,8 @@ void Extrema_GenExtSS::Initialize(const Adaptor3d_Surface& S2,
 
 // Calcul des distances
 
-  Standard_Integer NoU, NoV;
-  Standard_Real U, V;
+  Standard_Integer NoU = 0, NoV = 0;
+  Standard_Real U = NAN, V = NAN;
   for ( NoU = 1, U = U0; NoU <= myusample; NoU++, U += PasU) {
     for ( NoV = 1, V = V0; NoV <= myvsample; NoV++, V += PasV) {
       P1 = myS2->Value(U, V);
@@ -267,8 +269,8 @@ void Extrema_GenExtSS::Perform(const Adaptor3d_Surface& S1,
   myv1sup = V1sup;
   mytol1 = Tol1;
 
-  Standard_Real U1, V1, U2, V2;
-  Standard_Integer NoU1, NoV1, NoU2, NoV2;
+  Standard_Real U1 = NAN, V1 = NAN, U2 = NAN, V2 = NAN;
+  Standard_Integer NoU1 = 0, NoV1 = 0, NoU2 = 0, NoV2 = 0;
   gp_Pnt P1, P2;
 
 // Parametrage de l echantillon sur S1
@@ -322,7 +324,7 @@ b- Calcul des minima:
   UVsup(4) = myv2sup;
   
 
-  Standard_Real distmin = RealLast(), distmax = 0.0, TheDist;
+  Standard_Real distmin = RealLast(), distmax = 0.0, TheDist = NAN;
 
   Standard_Integer N1Umin=0,N1Vmin=0,N2Umin=0,N2Vmin=0;
   gp_Pnt PP1min, PP2min;
index d02f5c25755dd50b361f5e5c6630909b78740f60..a14306c634dd2e768fa18a542b02f7bfd4e8a53b 100644 (file)
@@ -97,24 +97,24 @@ private:
 
 private:
 
-  Standard_Boolean myDone;
-  Standard_Boolean myInit;
-  Standard_Real myu1min;
-  Standard_Real myu1sup;
-  Standard_Real myv1min;
-  Standard_Real myv1sup;
-  Standard_Real myu2min;
-  Standard_Real myu2sup;
-  Standard_Real myv2min;
-  Standard_Real myv2sup;
-  Standard_Integer myusample;
-  Standard_Integer myvsample;
+  Standard_Boolean myDone{};
+  Standard_Boolean myInit{};
+  Standard_Real myu1min{};
+  Standard_Real myu1sup{};
+  Standard_Real myv1min{};
+  Standard_Real myv1sup{};
+  Standard_Real myu2min{};
+  Standard_Real myu2sup{};
+  Standard_Real myv2min{};
+  Standard_Real myv2sup{};
+  Standard_Integer myusample{};
+  Standard_Integer myvsample{};
   Handle(TColgp_HArray2OfPnt) mypoints1;
   Handle(TColgp_HArray2OfPnt) mypoints2;
-  Standard_Real mytol1;
-  Standard_Real mytol2;
+  Standard_Real mytol1{};
+  Standard_Real mytol2{};
   Extrema_FuncExtSS myF;
-  const Adaptor3d_Surface* myS2;
+  const Adaptor3d_Surface* myS2{};
 
 };
 
index 16e38a32a8385d15bf66f98410d80c7fb31f4847..48407c799a74ae411239db9c479930b9107c4822 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Extrema_FuncExtCS.hxx>
 #include <Extrema_GenLocateExtCS.hxx>
@@ -66,11 +68,11 @@ void Extrema_GenLocateExtCS::Perform(const Adaptor3d_Curve& C,
 {
   myDone = Standard_False;
 
-  Standard_Real Tinf, Tsup;
+  Standard_Real Tinf = NAN, Tsup = NAN;
   Tinf = C.FirstParameter();
   Tsup = C.LastParameter();
 
-  Standard_Real Uinf, Usup, Vinf, Vsup;
+  Standard_Real Uinf = NAN, Usup = NAN, Vinf = NAN, Vsup = NAN;
   Uinf = S.FirstUParameter();
   Usup = S.LastUParameter();
   Vinf = S.FirstVParameter();
index 35b1373a563ee6b7ec7a908fdc1eea97a8f86fdc..d51e54e6579ad8b7427508dd77d0c72b5bab1d22 100644 (file)
@@ -73,8 +73,8 @@ private:
 
 
 
-  Standard_Boolean myDone;
-  Standard_Real mySqDist;
+  Standard_Boolean myDone{};
+  Standard_Real mySqDist{};
   Extrema_POnCurv myPoint1;
   Extrema_POnSurf myPoint2;
 
index fc2035b87cbb293a98124f56743ed187fbae19ab..12699dcaabf2bd8cde23e51b7aefeb8a73fe7049 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_GenLocateExtPS.hxx>
 
 #include <Extrema_FuncPSNorm.hxx>
@@ -38,7 +40,7 @@ static void CorrectTol(const Standard_Real theU0, const Standard_Real theV0,
   if (epsu > anEpsRef)
   {
     Standard_Integer n = RealToInt(tolog10 * Log(epsu / anEpsRef) + 1) + 1;
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real tol = aTolRef;
     for (i = 1; i <= n; ++i)
     {
@@ -50,7 +52,7 @@ static void CorrectTol(const Standard_Real theU0, const Standard_Real theV0,
   if (epsv > anEpsRef)
   {
     Standard_Integer n = RealToInt(tolog10 * Log(epsv / anEpsRef) + 1) + 1;
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real tol = aTolRef;
     for (i = 1; i <= n; ++i)
     {
@@ -69,10 +71,10 @@ Standard_Boolean Extrema_GenLocateExtPS::IsMinDist(const gp_Pnt& theP, const Ada
 {
   Standard_Real du = Max(theS.UResolution(10.*Precision::Confusion()), 10.*Precision::PConfusion());
   Standard_Real dv = Max(theS.VResolution(10.*Precision::Confusion()), 10.*Precision::PConfusion());
-  Standard_Real u, v;
+  Standard_Real u = NAN, v = NAN;
   gp_Pnt aP0 = theS.Value(theU0, theV0);
   Standard_Real d0 = theP.SquareDistance(aP0);
-  Standard_Integer iu, iv;
+  Standard_Integer iu = 0, iv = 0;
   for (iu = -1; iu <= 1; ++iu)
   {
     u = theU0 + iu * du;
@@ -207,7 +209,7 @@ void Extrema_GenLocateExtPS::Perform(const gp_Pnt& theP,
     Standard_Real aNbExt = F.NbExt();
     mySqDist = F.SquareDistance(1);
     myPoint = F.Point(1);
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 2; i <= aNbExt; ++i)
     {
       if (F.SquareDistance(i) < mySqDist)
index 48a1441f4309ffdd484319025fcb467a480e6999..4639d2dc1db49c78c273224e6f5b98c5b9b4b257 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Extrema_FuncExtSS.hxx>
 #include <Extrema_GenLocateExtSS.hxx>
@@ -67,13 +69,13 @@ void Extrema_GenLocateExtSS::Perform(const Adaptor3d_Surface& S1,
 {
   myDone = Standard_False;
 
-  Standard_Real Uinf1, Usup1, Vinf1, Vsup1;
+  Standard_Real Uinf1 = NAN, Usup1 = NAN, Vinf1 = NAN, Vsup1 = NAN;
   Uinf1 = S1.FirstUParameter();
   Usup1 = S1.LastUParameter();
   Vinf1 = S1.FirstVParameter();
   Vsup1 = S1.LastVParameter();
 
-  Standard_Real Uinf2, Usup2, Vinf2, Vsup2;
+  Standard_Real Uinf2 = NAN, Usup2 = NAN, Vinf2 = NAN, Vsup2 = NAN;
   Uinf2 = S2.FirstUParameter();
   Usup2 = S2.LastUParameter();
   Vinf2 = S2.FirstVParameter();
index c8ee0429b5216c9bfc8eca030914d38ade4afcce..898fa7f0b4d8cde07a6834dec441757d8f6059ab 100644 (file)
@@ -71,8 +71,8 @@ private:
 
 
 
-  Standard_Boolean myDone;
-  Standard_Real mySqDist;
+  Standard_Boolean myDone{};
+  Standard_Real mySqDist{};
   Extrema_POnSurf myPoint1;
   Extrema_POnSurf myPoint2;
 
index 93b5fd60b0f0d384c4c083a30db5bc60e4425bcd..19a384b9159372587bc943c6c096448d3f781ad6 100644 (file)
@@ -224,9 +224,9 @@ Extrema_GlobOptFuncCCC0::Extrema_GlobOptFuncCCC0(const Adaptor3d_Curve& C1,
 : myC1_3d(&C1),
   myC2_3d(&C2),
   myC1_2d(NULL),
-  myC2_2d(NULL)
+  myC2_2d(NULL), myType(1)
 {
-  myType = 1;
+  
 }
 
 //=======================================================================
@@ -238,9 +238,9 @@ Extrema_GlobOptFuncCCC0::Extrema_GlobOptFuncCCC0(const Adaptor2d_Curve2d& C1,
 : myC1_3d(NULL),
   myC2_3d(NULL),
   myC1_2d(&C1),
-  myC2_2d(&C2)
+  myC2_2d(&C2), myType(2)
 {
-  myType = 2;
+  
 }
 
 
@@ -276,9 +276,9 @@ Extrema_GlobOptFuncCCC1::Extrema_GlobOptFuncCCC1(const Adaptor3d_Curve& C1,
 : myC1_3d(&C1),
   myC2_3d(&C2),
   myC1_2d(NULL),
-  myC2_2d(NULL)
+  myC2_2d(NULL), myType(1)
 {
-  myType = 1;
+  
 }
 
 //=======================================================================
@@ -290,9 +290,9 @@ Extrema_GlobOptFuncCCC1::Extrema_GlobOptFuncCCC1(const Adaptor2d_Curve2d& C1,
 : myC1_3d(NULL),
   myC2_3d(NULL),
   myC1_2d(&C1),
-  myC2_2d(&C2)
+  myC2_2d(&C2), myType(2)
 {
-  myType = 2;
+  
 }
 
 //=======================================================================
@@ -348,9 +348,9 @@ Extrema_GlobOptFuncCCC2::Extrema_GlobOptFuncCCC2(const Adaptor3d_Curve& C1,
 : myC1_3d(&C1),
   myC2_3d(&C2),
   myC1_2d(NULL),
-  myC2_2d(NULL)
+  myC2_2d(NULL), myType(1)
 {
-  myType = 1;
+  
 }
 
 //=======================================================================
@@ -362,9 +362,9 @@ Extrema_GlobOptFuncCCC2::Extrema_GlobOptFuncCCC2(const Adaptor2d_Curve2d& C1,
 : myC1_3d(NULL),
   myC2_3d(NULL),
   myC1_2d(&C1),
-  myC2_2d(&C2)
+  myC2_2d(&C2), myType(2)
 {
-  myType = 2;
+  
 }
 
 //=======================================================================
index 26250f8474404378b518cc521124c734c16117d1..eb256d4331ebbf47c7ef9afefcaa244b4c6acfa7 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement
 
+#include <math.h>
+
 #include <Extrema_GlobOptFuncCQuadric.hxx>
 
 #include <gp_Pnt.hxx>
@@ -25,7 +27,7 @@
 void Extrema_GlobOptFuncCQuadric::value(Standard_Real ct,
                                         Standard_Real &F)
 {
-  Standard_Real u, v;
+  Standard_Real u = NAN, v = NAN;
   //
   gp_Pnt aCP = myC->Value(ct);
   switch (mySType)
@@ -71,7 +73,7 @@ void Extrema_GlobOptFuncCQuadric::value(Standard_Real ct,
     gp_Pnt aPS = myS->Value(u, v);
     F = Min(F, aCP.SquareDistance(aPS));
   }
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 0; i < 4; ++i)
   {
     F = Min(F, aCP.SquareDistance(myPTrim[i]));
@@ -101,10 +103,10 @@ Standard_Boolean Extrema_GlobOptFuncCQuadric::checkInputData(const math_Vector
 //=======================================================================
 Extrema_GlobOptFuncCQuadric::Extrema_GlobOptFuncCQuadric(const Adaptor3d_Curve   *C,
                                                      const Adaptor3d_Surface *S)
-: myC(C)
+: myC(C), myTf(myC->FirstParameter()), myTl(myC->LastParameter())
 {
-  myTf = myC->FirstParameter();
-  myTl = myC->LastParameter();
+  
+  
   Standard_Real anUf = S->FirstUParameter(), anUl = S->LastUParameter();
   Standard_Real aVf = S->FirstVParameter(), aVl = S->LastVParameter();
   LoadQuad(S, anUf, anUl, aVf, aVl);
@@ -114,10 +116,10 @@ Extrema_GlobOptFuncCQuadric::Extrema_GlobOptFuncCQuadric(const Adaptor3d_Curve
 //purpose  : Constructor
 //=======================================================================
 Extrema_GlobOptFuncCQuadric::Extrema_GlobOptFuncCQuadric(const Adaptor3d_Curve *C)
-  : myC(C)
+  : myC(C), myTf(myC->FirstParameter()), myTl(myC->LastParameter())
 {
-  myTf = myC->FirstParameter();
-  myTl = myC->LastParameter();
+  
+  
 }
 //=======================================================================
 //function : Extrema_GlobOptFuncCQuadric
@@ -209,7 +211,7 @@ Standard_Integer Extrema_GlobOptFuncCQuadric::NbVariables() const
 Standard_Boolean Extrema_GlobOptFuncCQuadric::Value(const math_Vector &X,
                                                     Standard_Real     &F)
 {
-  Standard_Real ct;
+  Standard_Real ct = NAN;
   if (!checkInputData(X, ct))
     return Standard_False;
 
@@ -228,7 +230,7 @@ Standard_Boolean Extrema_GlobOptFuncCQuadric::Value(const math_Vector &X,
 void Extrema_GlobOptFuncCQuadric::QuadricParameters(const math_Vector& theCT,
   math_Vector& theUV ) const
 {
-  Standard_Real u, v;
+  Standard_Real u = NAN, v = NAN;
   //
   //Arrays of extremity points parameters correspond to array of corner
   //points  myPTrim[] 
@@ -279,7 +281,7 @@ void Extrema_GlobOptFuncCQuadric::QuadricParameters(const math_Vector& theCT,
     gp_Pnt aPS = myS->Value(u, v);
     F = aCP.SquareDistance(aPS);
   }
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 0; i < 4; ++i)
   {
     Standard_Real Fi = aCP.SquareDistance(myPTrim[i]);
index cb32bbed1b5de30b581b1b92601b493994334f28..5d9505eb42fd2c76843e45b6ac534c618172a33d 100644 (file)
@@ -64,7 +64,7 @@ private:
 
 
   const Adaptor3d_Curve   *myC;
-  const Adaptor3d_Surface *myS;
+  const Adaptor3d_Surface *myS{};
   GeomAbs_SurfaceType mySType;
   gp_Pln myPln;
   gp_Cone myCone;
@@ -75,10 +75,10 @@ private:
   // Boundaries
   Standard_Real myTf;
   Standard_Real myTl;
-  Standard_Real myUf;
-  Standard_Real myUl;
-  Standard_Real myVf;
-  Standard_Real myVl;
+  Standard_Real myUf{};
+  Standard_Real myUl{};
+  Standard_Real myVf{};
+  Standard_Real myVl{};
 
 };
 
index 8c3ba2828710ebe7e4d83daaaa8c93e1b2fbe25a..64d7b54a15bd823cb5bdd047571453b23a4182d8 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement
 
+#include <math.h>
+
 #include <Extrema_GlobOptFuncCS.hxx>
 
 #include <gp_Pnt.hxx>
@@ -173,7 +175,7 @@ Standard_Integer Extrema_GlobOptFuncCS::NbVariables() const
 Standard_Boolean Extrema_GlobOptFuncCS::Value(const math_Vector &X,
                                               Standard_Real     &F)
 {
-  Standard_Real cu, su, sv;
+  Standard_Real cu = NAN, su = NAN, sv = NAN;
   if (!checkInputData(X, cu, su, sv))
     return Standard_False;
 
@@ -188,7 +190,7 @@ Standard_Boolean Extrema_GlobOptFuncCS::Value(const math_Vector &X,
 Standard_Boolean Extrema_GlobOptFuncCS::Gradient(const math_Vector &X,
                                                  math_Vector       &G)
 {
-  Standard_Real cu, su, sv;
+  Standard_Real cu = NAN, su = NAN, sv = NAN;
   if (!checkInputData(X, cu, su, sv))
     return Standard_False;
 
@@ -204,7 +206,7 @@ Standard_Boolean Extrema_GlobOptFuncCS::Values(const math_Vector &X,
                                                Standard_Real     &F,
                                                math_Vector       &G)
 {
-  Standard_Real cu, su, sv;
+  Standard_Real cu = NAN, su = NAN, sv = NAN;
   if (!checkInputData(X, cu, su, sv))
     return Standard_False;
 
@@ -222,7 +224,7 @@ Standard_Boolean Extrema_GlobOptFuncCS::Values(const math_Vector &X,
                                                math_Vector       &G,
                                                math_Matrix       &H)
 {
-  Standard_Real cu, su, sv;
+  Standard_Real cu = NAN, su = NAN, sv = NAN;
   if (!checkInputData(X, cu, su, sv))
     return Standard_False;
 
index 8ea81b15be39dc6b8eadb21e192f550856d619b3..7a6bebbcc1d60788fec980ad5c99c741279d9263 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement
 
+#include <math.h>
+
 #include <Extrema_GlobOptFuncConicS.hxx>
 
 #include <gp_Pnt.hxx>
@@ -26,7 +28,7 @@ void Extrema_GlobOptFuncConicS::value(Standard_Real su,
                                       Standard_Real sv,
                                       Standard_Real &F)
 {
-  Standard_Real ct;
+  Standard_Real ct = NAN;
   gp_Pnt aPS = myS->Value(su, sv);
   switch (myCType)
   {
@@ -188,7 +190,7 @@ Standard_Integer Extrema_GlobOptFuncConicS::NbVariables() const
 Standard_Boolean Extrema_GlobOptFuncConicS::Value(const math_Vector &X,
                                                   Standard_Real     &F)
 {
-  Standard_Real su, sv;
+  Standard_Real su = NAN, sv = NAN;
   if (!checkInputData(X, su, sv))
     return Standard_False;
 
@@ -206,7 +208,7 @@ Standard_Boolean Extrema_GlobOptFuncConicS::Value(const math_Vector &X,
 //=======================================================================
 Standard_Real Extrema_GlobOptFuncConicS::ConicParameter(const math_Vector& theUV) const
 {
-  Standard_Real ct;
+  Standard_Real ct = NAN;
   gp_Pnt aPS = myS->Value(theUV(1), theUV(2));
   switch (myCType)
   {
index 8329a0f6997345f6b9a2349c31a2df4cd23ca76c..e2e899af6f1b5099b3c37460c9706fc716731f43 100644 (file)
@@ -64,7 +64,7 @@ private:
              Standard_Real &F);
 
 
-  const Adaptor3d_Curve   *myC;
+  const Adaptor3d_Curve   *myC{};
   const Adaptor3d_Surface *myS;
   GeomAbs_CurveType myCType;
   gp_Lin myLin;
@@ -75,8 +75,8 @@ private:
   gp_Pnt myCPf;
   gp_Pnt myCPl;
   //Boundaries
-  Standard_Real myTf;
-  Standard_Real myTl;
+  Standard_Real myTf{};
+  Standard_Real myTl{};
   Standard_Real myUf;
   Standard_Real myUl;
   Standard_Real myVf;
index 699698212f822ad0bbe7efbcf4364deebaabfec8..6cc7e48ba29f007828a96d2f1fac29aaca2adf62 100644 (file)
@@ -28,9 +28,9 @@
 //----------------------------------------------------------------------------
 static Standard_Integer MinIndex(const Handle(FEmTool_HAssemblyTable)& Table)
 {
-  Standard_Integer dim, el, nvar, Imin;
+  Standard_Integer dim = 0, el = 0, nvar = 0, Imin = 0;
   Standard_Integer diml = Table->LowerRow(), dimu = Table->UpperRow(),
-                   ell = Table->LowerCol(), elu = Table->UpperCol(), nvarl, nvaru;
+                   ell = Table->LowerCol(), elu = Table->UpperCol(), nvarl = 0, nvaru = 0;
 
   Handle(TColStd_HArray1OfInteger) T = Table->Value(diml, ell);
 
@@ -54,9 +54,9 @@ static Standard_Integer MinIndex(const Handle(FEmTool_HAssemblyTable)& Table)
 //----------------------------------------------------------------------------
 static Standard_Integer MaxIndex(const Handle(FEmTool_HAssemblyTable)& Table)
 {
-  Standard_Integer dim, el, nvar, Imax;
+  Standard_Integer dim = 0, el = 0, nvar = 0, Imax = 0;
   Standard_Integer diml = Table->LowerRow(), dimu = Table->UpperRow(),
-                   ell = Table->LowerCol(), elu = Table->UpperCol(), nvarl, nvaru;
+                   ell = Table->LowerCol(), elu = Table->UpperCol(), nvarl = 0, nvaru = 0;
 
   Handle(TColStd_HArray1OfInteger) T = Table->Value(diml, ell);
 
@@ -83,20 +83,17 @@ static Standard_Integer MaxIndex(const Handle(FEmTool_HAssemblyTable)& Table)
 //=======================================================================
 FEmTool_Assembly::FEmTool_Assembly(const TColStd_Array2OfInteger& Dependence,
                                   const Handle(FEmTool_HAssemblyTable)& Table):
-     myDepTable(1, Dependence.ColLength(), 1, Dependence.RowLength()),
+     myDepTable(Dependence),
+     myRefTable(Table),
+     IsSolved(Standard_False),
      B(MinIndex(Table), MaxIndex(Table))
-     
 {
-  IsSolved = Standard_False;
-  myDepTable = Dependence;
-  myRefTable = Table;
-
   TColStd_Array1OfInteger FirstIndexes(1, B.Length()); FirstIndexes.Init(B.Length());
 
-  Standard_Integer dim, el, nvar, Imin, I0 = 1 - B.Lower(), i;
+  Standard_Integer dim = 0, el = 0, nvar = 0, Imin = 0, I0 = 1 - B.Lower(), i = 0;
 
   Standard_Integer diml = Table->LowerRow(), dimu = Table->UpperRow(),
-                   ell = Table->LowerCol(), elu = Table->UpperCol(), nvarl, nvaru;
+                   ell = Table->LowerCol(), elu = Table->UpperCol(), nvarl = 0, nvaru = 0;
 
   Handle(TColStd_HArray1OfInteger) T;
   for(dim = diml; dim <= dimu; dim++)
@@ -148,7 +145,7 @@ void FEmTool_Assembly::AddMatrix(const Standard_Integer Element,
   Standard_Integer nvarl = T1.Lower(), nvaru = Min(T1.Upper(), nvarl + Mat.RowNumber() - 1);
 
 
-  Standard_Integer I, J, I0 = 1 - B.Lower(), i, ii, j,
+  Standard_Integer I = 0, J = 0, I0 = 1 - B.Lower(), i = 0, ii = 0, j = 0,
 
                    i0 = Mat.LowerRow() - nvarl, j0 = Mat.LowerCol() - nvarl;
 
@@ -187,7 +184,7 @@ void FEmTool_Assembly::AddVector(const Standard_Integer Element,
                    i0 = Vec.Lower() - nvarl;
 
 //  Standard_Integer I, i;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   
   for(i = nvarl; i <= nvaru; i++) 
     B(T(i)) += Vec(i0 + i);
@@ -230,8 +227,8 @@ Standard_Boolean FEmTool_Assembly::Solve()
       TColStd_Array1OfInteger FirstIndexes(1, G.Length());
 //-----------------------------------------------------------------
       TColStd_Array2OfInteger H1(1, NbGlobVar(), 1, NbGlobVar()); H1.Init(1);
-      Standard_Integer i, j, k, l, BlockBeg = 1, BlockEnd;
-      Standard_Boolean Block, Zero;
+      Standard_Integer i = 0, j = 0, k = 0, l = 0, BlockBeg = 1, BlockEnd = 0;
+      Standard_Boolean Block = 0, Zero = 0;
       for(i = 2; i <= NbGlobVar(); i++) {
        BlockEnd = i - 1;
        if(!H->IsInProfile(i, BlockEnd)) {
@@ -293,7 +290,7 @@ Standard_Boolean FEmTool_Assembly::Solve()
     }
 
     GHGt->Init(0.);
-    Standard_Integer i, j, k;
+    Standard_Integer i = 0, j = 0, k = 0;
     FEmTool_ListIteratorOfListOfVectors Iter;
     
     for(i = 1; i <= G.Length(); i++) {
@@ -369,7 +366,7 @@ void FEmTool_Assembly::Solution(math_Vector& Solution) const
     H->Solve(B, v1);
     
     math_Vector l(1, G.Length()), v2(1, G.Length());
-    Standard_Integer i, j;
+    Standard_Integer i = 0, j = 0;
     FEmTool_ListIteratorOfListOfVectors Iter;
     
     for(i = 1; i <= G.Length(); i++) {
@@ -434,7 +431,7 @@ void FEmTool_Assembly::ResetConstraint()
 void FEmTool_Assembly::NullifyConstraint() 
 {
   FEmTool_ListIteratorOfListOfVectors Iter;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   for(i = 1; i <= G.Length(); i++) {
   
@@ -468,7 +465,7 @@ void FEmTool_Assembly::AddConstraint(const Standard_Integer IndexofConstraint,
   FEmTool_ListOfVectors& L = G.ChangeValue(IndexofConstraint);
   
   Handle(TColStd_HArray1OfInteger) Indexes = myRefTable->Value(Dimension,Element);
-  Standard_Integer i, Imax = 0, Imin = NbGlobVar();
+  Standard_Integer i = 0, Imax = 0, Imin = NbGlobVar();
 
   for(i = Indexes->Lower(); i <= Indexes->Upper(); i++) {
     Imin = Min(Imin, Indexes->Value(i));
index 4f6d668231f36432ef133d0fcfbf5d6e10e07296..3e0f952c1655845be5b9555ddeda641f11d25c30 100644 (file)
@@ -18,6 +18,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <FEmTool_Curve.hxx>
 #include <PLib.hxx>
 #include <PLib_HermitJacobi.hxx>
@@ -35,7 +37,7 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
                              const Handle(PLib_Base)& TheBase, 
                              const Standard_Real) : 
        myNbElements(NbElements), myDimension(Dimension), 
-       myBase(TheBase), myDegree(1, myNbElements), 
+       myBase(TheBase), myKnots(new TColStd_HArray1OfReal(1, myNbElements + 1)), myDegree(1, myNbElements), 
        myCoeff(1, myDimension*myNbElements*(myBase->WorkDegree() + 1)), 
        myPoly(1, myDimension*myNbElements*(myBase->WorkDegree() + 1)), 
        myDeri(1, myDimension*myNbElements*(myBase->WorkDegree())), 
@@ -44,7 +46,7 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
        HasSecn(1, myNbElements), myLength(1, myNbElements),
        myIndex(0)
 {
-  myKnots = new TColStd_HArray1OfReal(1, myNbElements + 1);
+  
   myDegree.Init(myBase->WorkDegree());
   HasPoly.Init(0);
   HasDeri.Init(0);
@@ -66,7 +68,7 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
  void FEmTool_Curve::SetElement(const Standard_Integer IndexOfElement,
                                const TColStd_Array2OfReal& Coeffs) 
 {
-  Standard_Integer i, j, degBase, deg;
+  Standard_Integer i = 0, j = 0, degBase = 0, deg = 0;
   if (IndexOfElement > myNbElements || IndexOfElement < 1) throw Standard_OutOfRange();
   degBase = myBase->WorkDegree();
   deg = myDegree(IndexOfElement);
@@ -80,7 +82,7 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
   }
 
   Standard_Real stenor = (myKnots->Value(IndexOfElement + 1) - myKnots->Value(IndexOfElement)) / 2.,
-                mfact;
+                mfact = NAN;
   Handle(PLib_HermitJacobi) myHermitJacobi = Handle(PLib_HermitJacobi)::DownCast (myBase);
 
   i1 = iBase;
@@ -105,7 +107,7 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
 //=======================================================================
  void FEmTool_Curve::GetElement(const Standard_Integer IndexOfElement, TColStd_Array2OfReal& Coeffs) 
 {
-  Standard_Integer i, j, degBase, deg;
+  Standard_Integer i = 0, j = 0, degBase = 0, deg = 0;
   if (IndexOfElement > myNbElements || IndexOfElement < 1) throw Standard_OutOfRange();
   degBase = myBase->WorkDegree();
   deg = myDegree(IndexOfElement);
@@ -119,7 +121,7 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
   }
 
   Standard_Real stenor = 2. / (myKnots->Value(IndexOfElement + 1) - myKnots->Value(IndexOfElement)),
-                mfact;
+                mfact = NAN;
 
   Handle(PLib_HermitJacobi) myHermitJacobi = Handle(PLib_HermitJacobi)::DownCast (myBase);
 
@@ -143,7 +145,7 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
  void FEmTool_Curve::GetPolynom(TColStd_Array1OfReal& Coeffs) 
 
 {
-  Standard_Integer IndexOfElement, i, di = Coeffs.Lower() - myPoly.Lower();
+  Standard_Integer IndexOfElement = 0, i = 0, di = Coeffs.Lower() - myPoly.Lower();
 
 
   for(IndexOfElement = 1; IndexOfElement <= myNbElements; IndexOfElement++)
@@ -161,8 +163,8 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
 //=======================================================================
  void FEmTool_Curve::D0(const Standard_Real U, TColStd_Array1OfReal& Pnt) 
 {
-  Standard_Integer deg;
-  Standard_Real S;
+  Standard_Integer deg = 0;
+  Standard_Real S = NAN;
 
   if (!myIndex || (U<Uf) || (U>Ul) ||
       (myKnots->Value(myIndex)!=Uf) ||
@@ -197,8 +199,8 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
 //=======================================================================
  void FEmTool_Curve::D1(const Standard_Real U, TColStd_Array1OfReal& Vec) 
 {
-  Standard_Integer deg, i;
-  Standard_Real S;
+  Standard_Integer deg = 0, i = 0;
+  Standard_Real S = NAN;
 
   if (!myIndex || (U<Uf) || (U>Ul) ||
       (myKnots->Value(myIndex)!=Uf) ||
@@ -239,8 +241,8 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
 //=======================================================================
  void FEmTool_Curve::D2(const Standard_Real U, TColStd_Array1OfReal& Vec) 
 {
-  Standard_Integer deg, i;
-  Standard_Real S;
+  Standard_Integer deg = 0, i = 0;
+  Standard_Real S = NAN;
 
   if (!myIndex || (U<Uf) || (U>Ul) ||
       (myKnots->Value(myIndex)!=Uf) ||
@@ -283,7 +285,7 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
                            const Standard_Real LastU,
                            Standard_Real& Length) 
 {
-  Standard_Integer Low, High, deg, degBase, i, Ptr;
+  Standard_Integer Low = 0, High = 0, deg = 0, degBase = 0, i = 0, Ptr = 0;
   if(FirstU > LastU) throw Standard_OutOfRange("FEmTool_Curve::Length");
   
   if(myKnots->Value(1) > FirstU) Low = 1;
@@ -298,11 +300,11 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
       if(LastU >= myKnots->Value(High) && LastU <= myKnots->Value(High+1)) break;
   if(myKnots->Value(myNbElements + 1) < LastU) High = myNbElements;
   
-  Standard_Real Li;
+  Standard_Real Li = NAN;
   degBase = myBase->WorkDegree();
   Length = 0;
 
-  Standard_Real FirstS, LastS;
+  Standard_Real FirstS = NAN, LastS = NAN;
   FirstS = (2*FirstU - myKnots->Value(Low) - myKnots->Value(Low + 1))/
     (myKnots->Value(Low + 1) - myKnots->Value(Low));
   LastS = (2*LastU - myKnots->Value(High) - myKnots->Value(High + 1))/
@@ -454,7 +456,7 @@ FEmTool_Curve::FEmTool_Curve(const Standard_Integer Dimension,
   if (Order >=1) {
     Standard_Integer i1 = (Index - 1)*(degBase)*myDimension - myDimension, 
                      i2 = (Index - 1)*(degBase + 1)*myDimension;
-    Standard_Integer i,j;
+    Standard_Integer i = 0,j = 0;
     if (!HasDeri.Value(Index)) {
       for(i = 1; i <= deg; i++) {
        i1 += myDimension; i2 += myDimension;
index ae2e8b50d796fafab8cfe301379a9269d8b4022b..24b309e95beb4bd9615f91c6148b9d333d650fe9 100644 (file)
@@ -99,12 +99,12 @@ private:
   TColStd_Array1OfInteger HasDeri;
   TColStd_Array1OfInteger HasSecn;
   TColStd_Array1OfReal myLength;
-  Standard_Real Uf;
-  Standard_Real Ul;
-  Standard_Real Denom;
-  Standard_Real USum;
+  Standard_Real Uf{};
+  Standard_Real Ul{};
+  Standard_Real Denom{};
+  Standard_Real USum{};
   Standard_Integer myIndex;
-  Standard_Integer myPtr;
+  Standard_Integer myPtr{};
 
 
 };
index 500c2991ffdc917958a5ba2e93734a6d61a31616..1e2f0bc14d6bb692121cf1837b50feca48026376 100644 (file)
@@ -64,7 +64,7 @@ Standard_Boolean FEmTool_ElementsOfRefMatrix::Value(const math_Vector& X, math_V
     break; 
   }
  
-  Standard_Integer i, j, ii = 0;
+  Standard_Integer i = 0, j = 0, ii = 0;
   for(i = 0; i<=myBase->WorkDegree(); i++)
     for(j = i; j<=myBase->WorkDegree(); j++) {
       F(F.Lower()+ii) = Basis(i)*Basis(j); ii++;
index 48e99903dfab862249677d3b7c59f10586de6477..558433e92d947dde5dfc0586cc7881b02c90f71c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <FEmTool_ElementsOfRefMatrix.hxx>
 #include <FEmTool_LinearFlexion.hxx>
 #include <math.hxx>
@@ -39,12 +41,12 @@ IMPLEMENT_STANDARD_RTTIEXT(FEmTool_LinearFlexion,FEmTool_ElementaryCriterion)
 //=======================================================================
 FEmTool_LinearFlexion::FEmTool_LinearFlexion(const Standard_Integer WorkDegree,
                                             const GeomAbs_Shape ConstraintOrder)
-                      : RefMatrix(0,WorkDegree,0,WorkDegree)
+                      : RefMatrix(0,WorkDegree,0,WorkDegree), myOrder(PLib::NivConstr(ConstraintOrder))
 {
   static Standard_Integer Order = -333, WDeg = 14;
   static math_Vector MatrixElemts(0, ((WDeg+2)*(WDeg+1))/2 -1 );
   
-  myOrder = PLib::NivConstr(ConstraintOrder);
+  
 
   if (myOrder != Order) {
     //Calculating RefMatrix
@@ -61,7 +63,7 @@ FEmTool_LinearFlexion::FEmTool_LinearFlexion(const Standard_Integer WorkDegree,
     MatrixElemts = anInt.Value();
   }
 
-  Standard_Integer i, j, ii, jj;
+  Standard_Integer i = 0, j = 0, ii = 0, jj = 0;
   for(ii = i = 0; i <= WorkDegree; i++) {
     RefMatrix(i, i) =  MatrixElemts(ii);
     for(j = i+1, jj = ii+1; j <= WorkDegree; j++, jj++) {
@@ -82,7 +84,7 @@ Handle(TColStd_HArray2OfInteger) FEmTool_LinearFlexion::DependenceTable() const
   Handle(TColStd_HArray2OfInteger) DepTab = 
     new TColStd_HArray2OfInteger(myCoeff->LowerCol(), myCoeff->UpperCol(),
                                 myCoeff->LowerCol(), myCoeff->UpperCol(),0);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myCoeff->LowerCol(); i <= myCoeff->UpperCol(); i++) DepTab->SetValue(i,i,1);
   
   return DepTab;
@@ -97,15 +99,15 @@ Handle(TColStd_HArray2OfInteger) FEmTool_LinearFlexion::DependenceTable() const
 Standard_Real FEmTool_LinearFlexion::Value() 
 {
   Standard_Integer deg = Min(myCoeff->ColLength() - 1, RefMatrix.UpperRow()), 
-                   i, j, j0 = myCoeff->LowerRow(), degH = Min(2*myOrder+1, deg),
-                   NbDim = myCoeff->RowLength(), dim;
+                   i = 0, j = 0, j0 = myCoeff->LowerRow(), degH = Min(2*myOrder+1, deg),
+                   NbDim = myCoeff->RowLength(), dim = 0;
 
   TColStd_Array2OfReal NewCoeff( 1, NbDim, 0, deg);
 
   Standard_Real coeff = (myLast - myFirst)/2., cteh3 = 2./Pow(coeff,3), 
-                mfact, Jline;
+                mfact = NAN, Jline = NAN;
 
-  Standard_Integer k1;
+  Standard_Integer k1 = 0;
 
   Standard_Real J = 0.;
 
@@ -155,8 +157,8 @@ void FEmTool_LinearFlexion::Hessian(const Standard_Integer Dimension1,
 
   Standard_Integer deg = Min(RefMatrix.UpperRow(), H.RowNumber() - 1), degH = Min(2*myOrder+1, deg);
   
-  Standard_Real coeff = (myLast - myFirst)/2., cteh3 = 2./Pow(coeff,3), mfact;
-  Standard_Integer k1, k2, i, j;
+  Standard_Real coeff = (myLast - myFirst)/2., cteh3 = 2./Pow(coeff,3), mfact = NAN;
+  Standard_Integer k1 = 0, k2 = 0, i = 0, j = 0;
   
   H.Init(0.);
   
@@ -198,7 +200,7 @@ void FEmTool_LinearFlexion::Gradient(const Standard_Integer Dimension,math_Vecto
 
   math_Vector X(0,deg);
   math_Matrix H(0,deg,0,deg);
-  Standard_Integer i, i1 = myCoeff->LowerRow();
+  Standard_Integer i = 0, i1 = myCoeff->LowerRow();
   for(i = 0; i <= deg; i++) X(i) = myCoeff->Value(i1+i, Dimension);
 
   Hessian(Dimension, Dimension, H);
index 6d19603443b48c12631a84d77f223f5062df668d..fe089bf236bc7ed5e19fb281c0627ab7d497d133 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <FEmTool_ElementsOfRefMatrix.hxx>
 #include <FEmTool_LinearJerk.hxx>
 #include <math.hxx>
@@ -35,12 +37,12 @@ IMPLEMENT_STANDARD_RTTIEXT(FEmTool_LinearJerk,FEmTool_ElementaryCriterion)
 
 FEmTool_LinearJerk::FEmTool_LinearJerk(const Standard_Integer WorkDegree,
                                       const GeomAbs_Shape ConstraintOrder):
-       RefMatrix(0,WorkDegree,0,WorkDegree)
+       RefMatrix(0,WorkDegree,0,WorkDegree), myOrder(PLib::NivConstr(ConstraintOrder))
 {
   static Standard_Integer Order = -333, WDeg = 14;
   static math_Vector MatrixElemts(0, ((WDeg+2)*(WDeg+1))/2 -1 );  
 
-  myOrder = PLib::NivConstr(ConstraintOrder);
+  
 
 
   //Calculating RefMatrix
@@ -63,7 +65,7 @@ FEmTool_LinearJerk::FEmTool_LinearJerk(const Standard_Integer WorkDegree,
     MatrixElemts = anInt.Value();
   }
 
-  Standard_Integer i, j, ii, jj;
+  Standard_Integer i = 0, j = 0, ii = 0, jj = 0;
   for(ii=i = 0; i <= WorkDegree; i++) {
     RefMatrix(i, i) =  MatrixElemts(ii);
     for(j = i+1, jj = ii+1; j <= WorkDegree; j++, jj++) {
@@ -80,7 +82,7 @@ Handle(TColStd_HArray2OfInteger) FEmTool_LinearJerk::DependenceTable() const
   Handle(TColStd_HArray2OfInteger) DepTab = 
     new TColStd_HArray2OfInteger(myCoeff->LowerCol(), myCoeff->UpperCol(),
                                 myCoeff->LowerCol(), myCoeff->UpperCol(),0);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myCoeff->LowerCol(); i <= myCoeff->UpperCol(); i++) DepTab->SetValue(i,i,1);
   
   return DepTab;
@@ -89,15 +91,15 @@ Handle(TColStd_HArray2OfInteger) FEmTool_LinearJerk::DependenceTable() const
 Standard_Real FEmTool_LinearJerk::Value() 
 {
   Standard_Integer deg = Min(myCoeff->ColLength() - 1, RefMatrix.UpperRow()), 
-                   i, j, j0 = myCoeff->LowerRow(), degH = Min(2*myOrder+1, deg),
-                   NbDim = myCoeff->RowLength(), dim;
+                   i = 0, j = 0, j0 = myCoeff->LowerRow(), degH = Min(2*myOrder+1, deg),
+                   NbDim = myCoeff->RowLength(), dim = 0;
 
   TColStd_Array2OfReal NewCoeff( 1, NbDim, 0, deg);
 
   Standard_Real coeff = (myLast - myFirst)/2., cteh3 = 2./Pow(coeff,5), 
-                mfact, Jline;
+                mfact = NAN, Jline = NAN;
 
-  Standard_Integer k1;
+  Standard_Integer k1 = 0;
 
   Standard_Real J = 0.;
 
@@ -147,8 +149,8 @@ void FEmTool_LinearJerk::Hessian(const Standard_Integer Dimension1,
 
   Standard_Integer deg = Min(RefMatrix.UpperRow(), H.RowNumber() - 1), degH = Min(2*myOrder+1, deg);
 
-  Standard_Real coeff = (myLast - myFirst)/2., cteh3 = 2./Pow(coeff,5), mfact;
-  Standard_Integer k1, k2, i, j, i0 = H.LowerRow(), j0 = H.LowerCol(), i1, j1;
+  Standard_Real coeff = (myLast - myFirst)/2., cteh3 = 2./Pow(coeff,5), mfact = NAN;
+  Standard_Integer k1 = 0, k2 = 0, i = 0, j = 0, i0 = H.LowerRow(), j0 = H.LowerCol(), i1 = 0, j1 = 0;
 
   H.Init(0.);
 
@@ -197,7 +199,7 @@ void FEmTool_LinearJerk::Gradient(const Standard_Integer Dimension,math_Vector&
   Standard_Integer deg = Min(G.Length() - 1, myCoeff->ColLength() - 1);
 
   math_Vector X(0,deg);
-  Standard_Integer i, i1 = myCoeff->LowerRow();
+  Standard_Integer i = 0, i1 = myCoeff->LowerRow();
   for(i = 0; i <= deg; i++) X(i) = myCoeff->Value(i1+i, Dimension);
 
   math_Matrix H(0,deg,0,deg);
index 62d60082a5ebce4be87633fac9cd311dc98ddbd0..bdb5e7b105983bd6057bae234520149775092404 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <FEmTool_ElementsOfRefMatrix.hxx>
 #include <FEmTool_LinearTension.hxx>
 #include <math.hxx>
@@ -35,13 +37,13 @@ IMPLEMENT_STANDARD_RTTIEXT(FEmTool_LinearTension,FEmTool_ElementaryCriterion)
 
 FEmTool_LinearTension::FEmTool_LinearTension(const Standard_Integer WorkDegree,
                                             const GeomAbs_Shape ConstraintOrder):
-       RefMatrix(0,WorkDegree,0,WorkDegree)
+       RefMatrix(0,WorkDegree,0,WorkDegree), myOrder(PLib::NivConstr(ConstraintOrder))
        
 {
   static Standard_Integer Order = -333, WDeg = 14;
   static math_Vector MatrixElemts(0, ((WDeg+2)*(WDeg+1))/2 -1 );
 
-  myOrder = PLib::NivConstr(ConstraintOrder);
+  
 
   if (myOrder != Order) {
     //Calculating RefMatrix
@@ -59,7 +61,7 @@ FEmTool_LinearTension::FEmTool_LinearTension(const Standard_Integer WorkDegree,
     MatrixElemts = anInt.Value();
   }
 
-  Standard_Integer i, j, ii, jj;
+  Standard_Integer i = 0, j = 0, ii = 0, jj = 0;
   for(ii = i = 0; i <= WorkDegree; i++) {
     RefMatrix(i, i) =  MatrixElemts(ii);
     for(j = i+1, jj = ii+1; j <= WorkDegree; j++, jj++) {
@@ -76,7 +78,7 @@ Handle(TColStd_HArray2OfInteger) FEmTool_LinearTension::DependenceTable() const
   Handle(TColStd_HArray2OfInteger) DepTab = 
     new TColStd_HArray2OfInteger(myCoeff->LowerCol(), myCoeff->UpperCol(),
                                 myCoeff->LowerCol(), myCoeff->UpperCol(),0);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i=1; i<=myCoeff->RowLength(); i++) DepTab->SetValue(i,i,1);
   
   return DepTab;
@@ -85,15 +87,15 @@ Handle(TColStd_HArray2OfInteger) FEmTool_LinearTension::DependenceTable() const
 Standard_Real FEmTool_LinearTension::Value() 
 {
   Standard_Integer deg = Min(myCoeff->ColLength() - 1, RefMatrix.UpperRow()), 
-                   i, j, j0 = myCoeff->LowerRow(), degH = Min(2*myOrder+1, deg),
-                   NbDim = myCoeff->RowLength(), dim;
+                   i = 0, j = 0, j0 = myCoeff->LowerRow(), degH = Min(2*myOrder+1, deg),
+                   NbDim = myCoeff->RowLength(), dim = 0;
 
   TColStd_Array2OfReal NewCoeff( 1, NbDim, 0, deg);
 
   Standard_Real coeff = (myLast - myFirst)/2., cteh3 = 2./coeff, 
-                mfact, Jline;
+                mfact = NAN, Jline = NAN;
 
-  Standard_Integer k1;
+  Standard_Integer k1 = 0;
 
 
   Standard_Real J = 0.;
@@ -145,8 +147,8 @@ void FEmTool_LinearTension::Hessian(const Standard_Integer Dimension1,
 
   Standard_Integer deg = Min(RefMatrix.UpperRow(), H.RowNumber() - 1), degH = Min(2*myOrder+1, deg);
 
-  Standard_Real coeff = (myLast - myFirst)/2., cteh3 = 2./coeff, mfact;
-  Standard_Integer k1, k2, i, j, i0 = H.LowerRow(), j0 = H.LowerCol(), i1, j1;
+  Standard_Real coeff = (myLast - myFirst)/2., cteh3 = 2./coeff, mfact = NAN;
+  Standard_Integer k1 = 0, k2 = 0, i = 0, j = 0, i0 = H.LowerRow(), j0 = H.LowerCol(), i1 = 0, j1 = 0;
 
   H.Init(0.);
 
@@ -195,7 +197,7 @@ void FEmTool_LinearTension::Hessian(const Standard_Integer Dimension1,
   Standard_Integer deg = Min(G.Length() - 1, myCoeff->ColLength() - 1);
 
   math_Vector X(0,deg);
-  Standard_Integer i, i1 = myCoeff->LowerRow();
+  Standard_Integer i = 0, i1 = myCoeff->LowerRow();
   for(i = 0; i <= deg; i++) X(i) = myCoeff->Value(i1+i, Dimension);
 
   math_Matrix H(0,deg,0,deg);
index 1f4e900454518612e86328590dc6711d0f29068b..9afe6c49d7da017d20208960e40cff48f3b65eba 100644 (file)
@@ -19,6 +19,8 @@
 #define No_Standard_DimensionError
 
 
+#include <math.h>
+
 #include <FEmTool_ProfileMatrix.hxx>
 #include <gp.hxx>
 #include <Standard_NotImplemented.hxx>
@@ -35,7 +37,7 @@ IMPLEMENT_STANDARD_RTTIEXT(FEmTool_ProfileMatrix,FEmTool_SparseMatrix)
 FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& FirstIndexes) 
                        : profile(1, 2, 1, FirstIndexes.Length())
 {
-  Standard_Integer i, j, k, l;
+  Standard_Integer i = 0, j = 0, k = 0, l = 0;
   profile(1, 1) = 0;
   profile(2, 1) = 1;
   for(i = 2; i <= FirstIndexes.Length(); i++) {
@@ -78,7 +80,7 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs
  Standard_Real& FEmTool_ProfileMatrix::ChangeValue(const Standard_Integer I,
                                                   const Standard_Integer J)
 {
-  Standard_Integer Ind;
+  Standard_Integer Ind = 0;
   Ind = I-J;
   if (Ind < 0) {
     Ind = -Ind;
@@ -100,8 +102,8 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs
 //=======================================================================
  Standard_Boolean FEmTool_ProfileMatrix::Decompose() 
 {
-  Standard_Integer i, j, k, ik, jk, DiagAddr, CurrAddr, Kmin, Kj;
-  Standard_Real Sum, a, Eps = 1.e-32;
+  Standard_Integer i = 0, j = 0, k = 0, ik = 0, jk = 0, DiagAddr = 0, CurrAddr = 0, Kmin = 0, Kj = 0;
+  Standard_Real Sum = NAN, a = NAN, Eps = 1.e-32;
 
   SMatrix->Init(0.);
   Standard_Real * SMA =  &SMatrix->ChangeValue(1);
@@ -150,8 +152,8 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs
 {
   if (!IsDecomp) throw StdFail_NotDone("Decomposition must be done");
  
-  Standard_Integer i, j, jj,DiagAddr, CurrAddr;
-  Standard_Real Sum;
+  Standard_Integer i = 0, j = 0, jj = 0,DiagAddr = 0, CurrAddr = 0;
+  Standard_Real Sum = NAN;
 
   Standard_Real * x = &X(X.Lower());
   x--;
@@ -204,7 +206,7 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs
 //=======================================================================
  void FEmTool_ProfileMatrix::Multiplied(const math_Vector& X,math_Vector& MX) const
 {
-  Standard_Integer i, j, jj, DiagAddr, CurrAddr;
+  Standard_Integer i = 0, j = 0, jj = 0, DiagAddr = 0, CurrAddr = 0;
   Standard_Real * m = &MX(MX.Lower());
   m--;
   const Standard_Real * x = &X(X.Lower());
@@ -253,7 +255,7 @@ Standard_Boolean FEmTool_ProfileMatrix::IsInProfile(const Standard_Integer i,
 
  void FEmTool_ProfileMatrix::OutM() const
 {
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   std::cout<<"Matrix A"<<std::endl;
   for(i = 1; i <= RowNumber(); i++) {
     for(j = 1; j < i - profile(1, i); j++) 
@@ -272,7 +274,7 @@ Standard_Boolean FEmTool_ProfileMatrix::IsInProfile(const Standard_Integer i,
 
  void FEmTool_ProfileMatrix::OutS() const
 {
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   std::cout<<"Matrix S"<<std::endl;
   for(i = 1; i <= RowNumber(); i++) {
     for(j = 1; j < i - profile(1, i); j++) 
index d266956e4fc22c2bf458ac57372a98f66d089a4a..ce8e2a05b5505d262e14d3868650ead2c65c4ae6 100644 (file)
@@ -169,7 +169,7 @@ Standard_CString FSD_BinaryFile::MagicNumber()
 
 void FSD_BinaryFile::ReadChar(TCollection_AsciiString& buffer, const Standard_Size rsize)
 {
-  char             c;
+  char             c = 0;
   Standard_Size ccount = 0;
 
   buffer.Clear();
@@ -492,7 +492,7 @@ Storage_Error FSD_BinaryFile::BeginWriteInfoSection()
   union {
     char ti2[4];
     Standard_Integer aResult;
-  } aWrapUnion;
+  } aWrapUnion{};
 
   aWrapUnion.ti2[0] = 1;
   aWrapUnion.ti2[1] = 2;
@@ -528,7 +528,7 @@ void FSD_BinaryFile::WriteInfo(const Standard_Integer nbObj,
                         const TCollection_ExtendedString& dataType,
                         const TColStd_SequenceOfAsciiString& userInfo) 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   PutInteger(nbObj);
   WriteString(dbVersion);
@@ -651,7 +651,7 @@ void FSD_BinaryFile::ReadInfo(Standard_Integer& nbObj,
   ReadString(appVersion);
   ReadExtendedString(dataType);
 
-  Standard_Integer i,len = 0;
+  Standard_Integer i = 0,len = 0;
 
   GetInteger(len);
   TCollection_AsciiString line;
@@ -668,7 +668,7 @@ void FSD_BinaryFile::ReadInfo(Standard_Integer& nbObj,
 //=======================================================================
 void FSD_BinaryFile::ReadCompleteInfo (Standard_IStream& theIStream, Handle(Storage_Data)& theData)
 {
-  FSD_FileHeader aHeaderPos;
+  FSD_FileHeader aHeaderPos{};
   ReadHeader(theIStream, aHeaderPos);
 
   if (theData.IsNull())
@@ -711,7 +711,7 @@ void FSD_BinaryFile::ReadCompleteInfo (Standard_IStream& theIStream, Handle(Stor
       theCallBack = new Storage_HArrayOfCallBack (1, aTypeSectionSize);
 
       TCollection_AsciiString  aTypeName;
-      Standard_Integer         aTypeNum;
+      Standard_Integer         aTypeNum = 0;
 
       for (Standard_Integer i = 1; i <= aTypeSectionSize; i++)
       {
@@ -725,7 +725,7 @@ void FSD_BinaryFile::ReadCompleteInfo (Standard_IStream& theIStream, Handle(Stor
     {
       Standard_Integer aRootSectionSize = RootSectionSize(theIStream);
 
-      Standard_Integer aRef;
+      Standard_Integer aRef = 0;
       TCollection_AsciiString aRootName, aTypeName;
       Handle(Storage_Root) aRoot;
       Handle(Standard_Persistent) aPer;
@@ -744,7 +744,7 @@ void FSD_BinaryFile::ReadCompleteInfo (Standard_IStream& theIStream, Handle(Stor
     {
       Standard_Integer aRefSectionSize = RefSectionSize (theIStream);
 
-      Standard_Integer aTypeNum, aRef = 0;
+      Standard_Integer aTypeNum = 0, aRef = 0;
 
       for (Standard_Integer i = 1; i <= aRefSectionSize; i++)
       {
@@ -814,7 +814,7 @@ Storage_Error FSD_BinaryFile::BeginWriteCommentSection(Standard_OStream& theOStr
 
 void FSD_BinaryFile::WriteComment(const TColStd_SequenceOfExtendedString& aCom)
 {
- Standard_Integer i,aSize;
+ Standard_Integer i = 0,aSize = 0;
 
  aSize = aCom.Length();
  PutInteger(aSize);
@@ -884,7 +884,7 @@ Storage_Error FSD_BinaryFile::BeginReadCommentSection()
 void FSD_BinaryFile::ReadComment(TColStd_SequenceOfExtendedString& aCom)
 {
   TCollection_ExtendedString line;
-  Standard_Integer           len,i;
+  Standard_Integer           len = 0,i = 0;
 
   GetInteger(len);
   for (i = 1; i <= len && !IsEnd(); i++) {
@@ -900,7 +900,7 @@ void FSD_BinaryFile::ReadComment(TColStd_SequenceOfExtendedString& aCom)
 void FSD_BinaryFile::ReadComment (Standard_IStream& theIStream, TColStd_SequenceOfExtendedString& aCom)
 {
   TCollection_ExtendedString line;
-  Standard_Integer           len,i;
+  Standard_Integer           len = 0,i = 0;
 
   GetInteger(theIStream, len);
   for (i = 1; i <= len && theIStream.good(); i++)
@@ -983,7 +983,7 @@ Storage_Error FSD_BinaryFile::BeginReadTypeSection()
 
 Standard_Integer FSD_BinaryFile::TypeSectionSize() 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   GetInteger(i);
   return i;
@@ -995,7 +995,7 @@ Standard_Integer FSD_BinaryFile::TypeSectionSize()
 //=======================================================================
 Standard_Integer FSD_BinaryFile::TypeSectionSize(Standard_IStream& theIStream) 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   GetInteger(theIStream, i);
   return i;
@@ -1096,7 +1096,7 @@ Storage_Error FSD_BinaryFile::BeginReadRootSection()
 
 Standard_Integer FSD_BinaryFile::RootSectionSize() 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   
   GetInteger(i);
   return i;
@@ -1108,7 +1108,7 @@ Standard_Integer FSD_BinaryFile::RootSectionSize()
 //=======================================================================
 Standard_Integer FSD_BinaryFile::RootSectionSize (Standard_IStream& theIStream) 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   GetInteger(theIStream, i);
   return i;
@@ -1210,7 +1210,7 @@ Storage_Error FSD_BinaryFile::BeginReadRefSection()
 
 Standard_Integer FSD_BinaryFile::RefSectionSize() 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   GetInteger(i);
   return i;
@@ -1222,7 +1222,7 @@ Standard_Integer FSD_BinaryFile::RefSectionSize()
 //=======================================================================
 Standard_Integer FSD_BinaryFile::RefSectionSize (Standard_IStream& theIStream) 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   GetInteger(theIStream, i);
   return i;
@@ -1412,7 +1412,7 @@ Storage_Error FSD_BinaryFile::EndReadDataSection()
 
 void FSD_BinaryFile::WriteString(const TCollection_AsciiString& aString)
 {
-  Standard_Integer size;
+  Standard_Integer size = 0;
 
   size = aString.Length();
 
@@ -1431,7 +1431,7 @@ Standard_Integer FSD_BinaryFile::WriteString (Standard_OStream&              the
                                               const TCollection_AsciiString& theString,
                                               const Standard_Boolean         theOnlyCount)
 {
-  Standard_Integer aNumAndStrLen, anAsciiStrLen;
+  Standard_Integer aNumAndStrLen = 0, anAsciiStrLen = 0;
 
   anAsciiStrLen = aNumAndStrLen = theString.Length();
 
@@ -1516,14 +1516,14 @@ void FSD_BinaryFile::ReadString (Standard_IStream& theIStream, TCollection_Ascii
 
 void FSD_BinaryFile::WriteExtendedString(const TCollection_ExtendedString& aString)
 {
-  Standard_Integer size;
+  Standard_Integer size = 0;
 
   size = aString.Length();
 
   PutInteger(size);
 
   if (size > 0) {
-    Standard_ExtString anExtStr;
+    Standard_ExtString anExtStr = nullptr;
 #if OCCT_BINARY_FILE_DO_INVERSE
     TCollection_ExtendedString aCopy = aString;
     anExtStr = aCopy.ToExtString();
@@ -1550,7 +1550,7 @@ Standard_Integer FSD_BinaryFile::WriteExtendedString (Standard_OStream&
                                                       const TCollection_ExtendedString& theString,
                                                       const Standard_Boolean            theOnlyCount)
 {
-  Standard_Integer aNumAndStrLen, anExtStrLen;
+  Standard_Integer aNumAndStrLen = 0, anExtStrLen = 0;
   anExtStrLen = theString.Length();
 
   aNumAndStrLen = anExtStrLen * sizeof(Standard_ExtCharacter);
@@ -1558,7 +1558,7 @@ Standard_Integer FSD_BinaryFile::WriteExtendedString (Standard_OStream&
 
   if (anExtStrLen > 0 && !theOnlyCount)
   {
-    Standard_ExtString anExtStr;
+    Standard_ExtString anExtStr = nullptr;
 #if OCCT_BINARY_FILE_DO_INVERSE
     TCollection_ExtendedString aCopy = theString;
     anExtStr = aCopy.ToExtString();
@@ -1759,7 +1759,7 @@ void FSD_BinaryFile::ReadHeaderData( Standard_IStream& theIStream, const Handle(
   TCollection_AsciiString          uinfo,mStorageVersion,mDate,mSchemaName,mSchemaVersion,mApplicationVersion;
   TCollection_ExtendedString       mApplicationName,mDataType;
   TColStd_SequenceOfAsciiString    mUserInfo;
-  Standard_Integer                 mNBObj;
+  Standard_Integer                 mNBObj = 0;
 
   FSD_BinaryFile::GetInteger (theIStream, mNBObj);
   FSD_BinaryFile::ReadString (theIStream, mStorageVersion);
@@ -1816,7 +1816,7 @@ Standard_Real FSD_BinaryFile::InverseReal (const Standard_Real theValue)
   union {
     Standard_Integer i[2];
     Standard_Real    aValue;
-  } aWrapUnion;
+  } aWrapUnion{};
 
   aWrapUnion.aValue = theValue;
 
@@ -1838,7 +1838,7 @@ Standard_ShortReal FSD_BinaryFile::InverseShortReal (const Standard_ShortReal th
   union {
     Standard_ShortReal aValue;
     Standard_Integer   aResult;
-  } aWrapUnion;
+  } aWrapUnion{};
 
   aWrapUnion.aValue  = theValue;
   aWrapUnion.aResult = InverseInt (aWrapUnion.aResult);
@@ -1866,7 +1866,7 @@ inline uint64_t OCCT_InverseSizeSpecialized <8> (const uint64_t theValue, int)
   union {
     Standard_Integer i[2];
     uint64_t    aValue;
-  } aWrapUnion;
+  } aWrapUnion{};
 
   aWrapUnion.aValue = theValue;
 
index 504aaa19b998cb3d7f777e910c045d58aa6aaab6..eec55076ba956b34b99ee3b2bb01143285fc8b2b 100644 (file)
@@ -357,7 +357,7 @@ private:
 private:
 
   FSD_BStream myStream;
-  FSD_FileHeader myHeader;
+  FSD_FileHeader myHeader{};
 };
 
 #endif // _FSD_BinaryFile_HeaderFile
index 85d76117f1efca7c66935b29fe2e8bd88b031a23..f34924ec80f3a6218a307331e9b3d15b3f4458e8 100644 (file)
@@ -173,8 +173,8 @@ void FSD_CmpFile::WriteExtendedLine(const TCollection_ExtendedString& buffer)
 
   myStream << (char)0 << "\n";
 #endif
-  Standard_ExtString extBuffer;
-  Standard_Integer   i;
+  Standard_ExtString extBuffer = nullptr;
+  Standard_Integer   i = 0;
 
   extBuffer = buffer.ToExtString();
   PutInteger(buffer.Length());
@@ -192,8 +192,8 @@ void FSD_CmpFile::WriteExtendedLine(const TCollection_ExtendedString& buffer)
 
 void FSD_CmpFile::ReadExtendedLine(TCollection_ExtendedString& buffer)
 {
-  Standard_ExtCharacter c;
-  Standard_Integer i;
+  Standard_ExtCharacter c = 0;
+  Standard_Integer i = 0;
 
   GetInteger(i);
 
index 8ee7e2066d51766249ca67e7985bf550c31915d8..2ce96b777161ffad854b6552e2abbc3c16779cde 100644 (file)
@@ -214,8 +214,8 @@ void FSD_File::ReadLine(TCollection_AsciiString& buffer)
 
 void FSD_File::WriteExtendedLine(const TCollection_ExtendedString& buffer)
 {
-  Standard_ExtString extBuffer;
-  Standard_Integer   i,c,d;
+  Standard_ExtString extBuffer = nullptr;
+  Standard_Integer   i = 0,c = 0,d = 0;
 
   extBuffer = buffer.ToExtString();
 
@@ -237,7 +237,7 @@ void FSD_File::WriteExtendedLine(const TCollection_ExtendedString& buffer)
 void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
 {
   char c = '\0';
-  Standard_ExtCharacter i = 0,j,count = 0;
+  Standard_ExtCharacter i = 0,j = 0,count = 0;
   Standard_Boolean fin = Standard_False;
   Standard_CString tg = ENDOFNORMALEXTENDEDSECTION;
  
@@ -302,7 +302,7 @@ void FSD_File::ReadChar(TCollection_AsciiString& buffer, const Standard_Size rsi
 void FSD_File::ReadString(TCollection_AsciiString& buffer)
 {
   char Buffer[8193];
-  char *bpos;
+  char *bpos = nullptr;
   Standard_Boolean IsEnd = Standard_False,isFirstTime = Standard_True;
   
   buffer.Clear();
@@ -339,9 +339,9 @@ void FSD_File::ReadString(TCollection_AsciiString& buffer)
 void FSD_File::ReadWord(TCollection_AsciiString& buffer)
 {
   char c = '\0';
-  char b[8193],*tmpb;
+  char b[8193],*tmpb = nullptr;
   Standard_Boolean IsEnd = Standard_False;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   tmpb = b;
   memset(b,'\0',8193);
@@ -423,7 +423,7 @@ Storage_BaseDriver& FSD_File::PutReference(const Standard_Integer aValue)
 
 Storage_BaseDriver& FSD_File::PutCharacter(const Standard_Character aValue)
 {
-  unsigned short i;
+  unsigned short i = 0;
 
   i = aValue;
   myStream << i << " ";
@@ -647,7 +647,7 @@ void FSD_File::WriteInfo(const Standard_Integer nbObj,
                         const TCollection_ExtendedString& dataType,
                         const TColStd_SequenceOfAsciiString& userInfo) 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   myStream << nbObj;
   myStream << "\n";
@@ -730,7 +730,7 @@ void FSD_File::ReadInfo(Standard_Integer& nbObj,
   ReadLine(appVersion);
   ReadExtendedLine(dataType);
 
-  Standard_Integer i,len = 0;
+  Standard_Integer i = 0,len = 0;
 
   if (!(myStream >> len)) throw Storage_StreamTypeMismatchError();
 
@@ -785,7 +785,7 @@ Storage_Error FSD_File::BeginWriteCommentSection()
 
 void FSD_File::WriteComment(const TColStd_SequenceOfExtendedString& aCom)
 {
- Standard_Integer i,aSize;
+ Standard_Integer i = 0,aSize = 0;
 
  aSize = aCom.Length();
  myStream << aSize << "\n";
@@ -827,7 +827,7 @@ Storage_Error FSD_File::BeginReadCommentSection()
 void FSD_File::ReadComment(TColStd_SequenceOfExtendedString& aCom)
 {
   TCollection_ExtendedString line;
-  Standard_Integer           len,i;
+  Standard_Integer           len = 0,i = 0;
 
   if (!(myStream >> len)) throw Storage_StreamTypeMismatchError();
   
@@ -914,7 +914,7 @@ Storage_Error FSD_File::BeginReadTypeSection()
 
 Standard_Integer FSD_File::TypeSectionSize() 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   if (!(myStream >> i)) throw Storage_StreamTypeMismatchError();
 
@@ -1010,7 +1010,7 @@ Storage_Error FSD_File::BeginReadRootSection()
 
 Standard_Integer FSD_File::RootSectionSize() 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   if (!(myStream >> i)) throw Storage_StreamTypeMismatchError();
   
@@ -1106,7 +1106,7 @@ Storage_Error FSD_File::BeginReadRefSection()
 
 Standard_Integer FSD_File::RefSectionSize() 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   if (!(myStream >> i)) throw Storage_StreamTypeMismatchError();
   FlushEndOfLine();
index 0685b6c89df138b5d8e657ba2b7efadf8a4a1ddc..efcea0168f83583fdc7e98fb33edc805f3010877 100644 (file)
@@ -20,6 +20,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <FairCurve_Batten.hxx>
 #include <FairCurve_EnergyOfBatten.hxx>
@@ -159,8 +161,8 @@ Standard_Boolean FairCurve_Batten::Compute(FairCurve_AnalysisCode& ACode,
   Standard_Real AngleMax = 0.7;      // parameter ruling the function of increment ( 40 degrees )
   Standard_Real AngleMin = 2*M_PI/100; // parameter ruling the function of increment 
                                      // full passage should not cost more than 100 steps.
-  Standard_Real DAngle1, DAngle2,  Ratio, Fraction, Toler;
-  Standard_Real OldDist, NewDist;
+  Standard_Real DAngle1 = NAN, DAngle2 = NAN,  Ratio = NAN, Fraction = NAN, Toler = NAN;
+  Standard_Real OldDist = NAN, NewDist = NAN;
 
 //  Loop of Homotopy : calculation of the step and optimisation 
 
@@ -219,11 +221,11 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1,
                                           const Standard_Real Tolerance)
 // =============================================================================
 {
- Standard_Boolean Ok, OkCompute=Standard_True;
+ Standard_Boolean Ok = 0, OkCompute=Standard_True;
  ACode = FairCurve_OK;
 
 // Deformation of the curve by adding a polynom of interpolation
-   Standard_Integer L = 2 + NewConstraintOrder1 + NewConstraintOrder2, kk, ii;
+   Standard_Integer L = 2 + NewConstraintOrder1 + NewConstraintOrder2, kk = 0, ii = 0;
    TColStd_Array1OfReal knots (1,2);
    knots(1) = 0;
    knots(2) = 1;
@@ -293,7 +295,7 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1,
 
 // Intermediary data
 
- Standard_Real Angle1, Angle2, SlidingLength
+ Standard_Real Angle1 = NAN, Angle2 = NAN, SlidingLength = NAN
                Alph1 =  OldAngle1 + DeltaAngle1, 
                Alph2 =  OldAngle2 + DeltaAngle2,
                Dist  =  NPoles->Value(NPoles->Upper()) 
@@ -376,7 +378,7 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1,
     OldHeight = NewHeight;
   }
   else {
-    Standard_Real V;
+    Standard_Real V = NAN;
     ACode = EBatten.Status();
     if (!LBatten.Value(0, V) || !LBatten.Value(1, V)) {
        ACode = FairCurve_NullHeight;
@@ -458,7 +460,7 @@ Standard_Real FairCurve_Batten::SlidingOfReference(const Standard_Real Dist,
                                                   const Standard_Real Angle2) const
 // ==================================================================
 {
- Standard_Real a1, a2;
+ Standard_Real a1 = NAN, a2 = NAN;
 
 // case of angle without constraints
  if ( (NewConstraintOrder1 == 0) && (NewConstraintOrder2 == 0)) return Dist;
@@ -493,7 +495,7 @@ Standard_Real FairCurve_Batten::Compute(const Standard_Real Dist,
 // ==================================================================
 {
     Standard_Real L1 = Compute(Dist, Angle1);
-    Standard_Real L2 = Compute(Dist, Angle2), Aux;
+    Standard_Real L2 = Compute(Dist, Angle2), Aux = NAN;
     if (L1 < L2) { 
       Aux = L2;
       L2 = L1;
index 2e4733e1dbb236e568b1eb7d51d3315a728ad3ec..da7e9a166aababa5e960b4687a3dd821eb732d55 100644 (file)
@@ -36,9 +36,9 @@ Standard_Integer FairCurve_DistributionOfEnergy::NbEquations() const
                                 MyFlatKnots (FlatKnots), 
                                  MyPoles (Poles), 
                                 MyDerivativeOrder (DerivativeOrder),
-                                MyNbValAux (NbValAux)
+                                MyNbVar(1), MyNbValAux (NbValAux)
 {
-  MyNbVar = 1;
+  
   SetDerivativeOrder( DerivativeOrder);
 
 }
index a18996ec68c543dc9b1984580646ed8c5ef5acc5..ce2f0704fbda444ab4f261fc45bee9493d1a0942 100644 (file)
@@ -57,7 +57,7 @@ protected:
   Handle(TColgp_HArray1OfPnt2d) MyPoles;
   Standard_Integer MyDerivativeOrder;
   Standard_Integer MyNbVar;
-  Standard_Integer MyNbEqua;
+  Standard_Integer MyNbEqua{};
   Standard_Integer MyNbValAux;
 
 
index 9e20c93d6aee34a92e8bca94d3ab2f28c0fb3a47..a664bd84fdaf25a3242d144d9d2d5f89e877301c 100644 (file)
@@ -22,6 +22,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <FairCurve_DistributionOfJerk.hxx>
 #include <gp_Pnt2d.hxx>
@@ -49,9 +51,9 @@ Standard_Boolean FairCurve_DistributionOfJerk::Value(const math_Vector& TParam,
                                                           math_Vector& Jerk)
 {
   Standard_Boolean Ok = Standard_True;
-  Standard_Integer ier, ii, jj, kk;
+  Standard_Integer ier = 0, ii = 0, jj = 0, kk = 0;
   gp_XY CPrim  (0., 0.), CSecn (0., 0.), CTroi(0., 0.);
-  Standard_Integer  LastGradientIndex, FirstNonZero, LastZero
+  Standard_Integer  LastGradientIndex = 0, FirstNonZero = 0, LastZero = 0
 
   // (0.0) initialisations generales
   Jerk.Init(0.0);
@@ -81,7 +83,7 @@ Standard_Boolean FairCurve_DistributionOfJerk::Value(const math_Vector& TParam,
   Standard_Real ProduitC1C2 =  CPrim*CSecn; 
   Standard_Real DeriveNormeCPrim = ProduitC1C2 * InvNormeCPrim2;
 
-  Standard_Real Hauteur, WVal, Mesure;
+  Standard_Real Hauteur = NAN, WVal = NAN, Mesure = NAN;
   Standard_Real NumRho = CPrim ^ CSecn;
   Standard_Real Numerateur = (CPrim ^ CTroi) - 3 * NumRho * DeriveNormeCPrim; 
   Standard_Real Denominateur = pow ( NormeCPrim, 2.5);
@@ -105,7 +107,7 @@ Standard_Boolean FairCurve_DistributionOfJerk::Value(const math_Vector& TParam,
                   GradDeriveNormeCPrim(1, 2*MyBSplOrder),
                   GradNumRho(1, 2*MyBSplOrder),
                   NumduGrad(1, 2*MyBSplOrder);
-      Standard_Real Facteur;
+      Standard_Real Facteur = NAN;
       Standard_Real XPrim = CPrim.X();
       Standard_Real YPrim = CPrim.Y();
       Standard_Real XSecn = CSecn.X();
@@ -113,7 +115,7 @@ Standard_Boolean FairCurve_DistributionOfJerk::Value(const math_Vector& TParam,
       Standard_Real XTroi = CTroi.X();
       Standard_Real YTroi = CTroi.Y();
       Standard_Real InvDenominateur = 1 / Denominateur;
-      Standard_Real Aux, AuxBis;
+      Standard_Real Aux = NAN, AuxBis = NAN;
 
       Facteur = 2 * Mesure * WVal;
       Aux = 2.5 * Numerateur * InvNormeCPrim;
@@ -179,10 +181,10 @@ Standard_Boolean FairCurve_DistributionOfJerk::Value(const math_Vector& TParam,
                                 * (YPrim*InvNormeCPrim) * InvNormeCPrim;
          Standard_Real FacteurW = WVal * InvNormeCPrim;
 
-         Standard_Real Produit, Produit2, ProduitV, HNumRho, DSeconde, NSeconde
-                      HDeriveNormeCPrim, Aux1, DeriveAuxBis;
-         Standard_Real VIntermed;
-         Standard_Integer k1, k2, II, JJ;
+         Standard_Real Produit = NAN, Produit2 = NAN, ProduitV = NAN, HNumRho = NAN, DSeconde = NAN, NSeconde = NAN
+                      HDeriveNormeCPrim = NAN, Aux1 = NAN, DeriveAuxBis = NAN;
+         Standard_Real VIntermed = NAN;
+         Standard_Integer k1 = 0, k2 = 0, II = 0, JJ = 0;
    
          Facteur = 2 * Mesure;
 
index 7f33c9563f330015bd33e91b78f71060d4b43798..4828a387ced22adb8ce5bb0d0d4c8f0d8545fcce 100644 (file)
@@ -19,6 +19,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <FairCurve_DistributionOfSagging.hxx>
 #include <gp_Pnt2d.hxx>
@@ -44,9 +46,9 @@
 Standard_Boolean FairCurve_DistributionOfSagging::Value(const math_Vector& TParam, math_Vector& Flexion)
 {  
   Standard_Boolean Ok = Standard_True;
-  Standard_Integer ier, ii, jj, kk;
+  Standard_Integer ier = 0, ii = 0, jj = 0, kk = 0;
   gp_XY CPrim  (0., 0.), CSecn (0., 0.);
-  Standard_Integer  LastGradientIndex, FirstNonZero, LastZero
+  Standard_Integer  LastGradientIndex = 0, FirstNonZero = 0, LastZero = 0
 
   // (0.0) initialisations generales
   Flexion.Init(0.0);
@@ -71,7 +73,7 @@ Standard_Boolean FairCurve_DistributionOfSagging::Value(const math_Vector& TPara
   // (1) Evaluation de la flexion locale = W*W
   Standard_Real NormeCPrim = CPrim.Modulus();
   Standard_Real InvNormeCPrim = 1 / NormeCPrim;
-  Standard_Real Hauteur, WVal, Mesure;
+  Standard_Real Hauteur = NAN, WVal = NAN, Mesure = NAN;
   Standard_Real Numerateur = CPrim ^ CSecn; 
   Standard_Real Denominateur = pow ( NormeCPrim, 2.5);
 
@@ -89,13 +91,13 @@ Standard_Boolean FairCurve_DistributionOfSagging::Value(const math_Vector& TPara
                   NumGrad(1, 2*MyBSplOrder+MyNbValAux),
                   GradNormeCPrim(1, 2*MyBSplOrder+MyNbValAux),
                   NumduGrad(1, 2*MyBSplOrder+MyNbValAux);
-      Standard_Real Facteur;
+      Standard_Real Facteur = NAN;
       Standard_Real XPrim = CPrim.X();
       Standard_Real YPrim = CPrim.Y();
       Standard_Real XSecn = CSecn.X();
       Standard_Real YSecn = CSecn.Y();
       Standard_Real InvDenominateur = 1 / Denominateur;
-      Standard_Real Aux;
+      Standard_Real Aux = NAN;
 
       Facteur = 2 * Mesure * WVal;
       Aux = 2.5 * Numerateur * InvNormeCPrim;
@@ -141,9 +143,9 @@ Standard_Boolean FairCurve_DistributionOfSagging::Value(const math_Vector& TPara
                                 * (YPrim*InvNormeCPrim) * InvNormeCPrim;
          Standard_Real FacteurW = WVal * InvNormeCPrim;
 
-         Standard_Real Produit, DSeconde, NSeconde;
-         Standard_Real VIntermed;
-         Standard_Integer k1, k2, II, JJ;
+         Standard_Real Produit = NAN, DSeconde = NAN, NSeconde = NAN;
+         Standard_Real VIntermed = NAN;
+         Standard_Integer k1 = 0, k2 = 0, II = 0, JJ = 0;
    
          Facteur = 2 * Mesure;
 
index 20c0626c1e28752d5cc9f593d8b5d128a96c15a6..3fdb3121698568c48fe3b83022eec8326afebeaa 100644 (file)
@@ -19,6 +19,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <FairCurve_DistributionOfTension.hxx>
 #include <gp_Pnt2d.hxx>
@@ -51,9 +53,9 @@
 Standard_Boolean FairCurve_DistributionOfTension::Value(const math_Vector& TParam, math_Vector& FTension)
 {
   Standard_Boolean Ok = Standard_True;
-  Standard_Integer ier, ii, jj, kk;
+  Standard_Integer ier = 0, ii = 0, jj = 0, kk = 0;
   gp_XY CPrim  (0., 0.);
-  Standard_Integer  LastGradientIndex, FirstNonZero, LastZero
+  Standard_Integer  LastGradientIndex = 0, FirstNonZero = 0, LastZero = 0
 
   // (0.0) initialisations generales
   FTension.Init(0.0);
@@ -75,7 +77,7 @@ Standard_Boolean FairCurve_DistributionOfTension::Value(const math_Vector& TPara
 
   // (1) Evaluation de la tension locale --------------------------------
   Standard_Real NormeCPrim = CPrim.Modulus();
-  Standard_Real Hauteur, Difference;
+  Standard_Real Hauteur = NAN, Difference = NAN;
 
   if (MyHeight > 0) {Hauteur = MyHeight;} // it used in MVC to avoid Parametrization Problemes
   else { 
@@ -89,7 +91,7 @@ Standard_Boolean FairCurve_DistributionOfTension::Value(const math_Vector& TPara
   if (MyDerivativeOrder >= 1) {
   // (2) Evaluation du gradient de la tension locale ----------------------
       math_Vector GradDifference (1, 2*MyBSplOrder+MyNbValAux);
-      Standard_Real Xaux, Yaux, Facteur;
+      Standard_Real Xaux = NAN, Yaux = NAN, Facteur = NAN;
 
       Xaux = CPrim.X() / NormeCPrim;
       Yaux = CPrim.Y() / NormeCPrim;
@@ -122,8 +124,8 @@ Standard_Boolean FairCurve_DistributionOfTension::Value(const math_Vector& TPara
          Standard_Real FacteurX =  Difference * (1-pow(Xaux,2)) / NormeCPrim;
          Standard_Real FacteurY =  Difference * (1-pow(Yaux,2)) / NormeCPrim;
          Standard_Real FacteurXY = - Difference * Xaux*Yaux / NormeCPrim;
-         Standard_Real Produit;
-         Standard_Integer k1, k2;
+         Standard_Real Produit = NAN;
+         Standard_Integer k1 = 0, k2 = 0;
    
          Facteur = 2 * Hauteur / MyLengthSliding;
 
index f31b4380c84f3a2c6ccda99c9d4cf882f96c70b3..3b54446cac63928aa59f31b1fea42c73aa1bb019 100644 (file)
@@ -20,6 +20,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <FairCurve_Energy.hxx>
 #include <gp_Pnt2d.hxx>
 #include <gp_Vec2d.hxx>
@@ -62,7 +64,7 @@ Standard_Boolean FairCurve_Energy::Value(const math_Vector& X,
                                                 Standard_Real& E)
 //=======================================================================
 {
-   Standard_Boolean IsDone;
+   Standard_Boolean IsDone = 0;
    math_Vector Energie(0,0);
    ComputePoles(X);
    IsDone = Compute(0, Energie);
@@ -75,8 +77,8 @@ Standard_Boolean FairCurve_Energy::Gradient(const math_Vector& X,
                                                  math_Vector& G)
 //=======================================================================
 {
-   Standard_Boolean IsDone;
-   Standard_Real E;
+   Standard_Boolean IsDone = 0;
+   Standard_Real E = NAN;
  
    IsDone = Values(X, E, G);
    return IsDone;    
@@ -87,7 +89,7 @@ void FairCurve_Energy::Gradient1(const math_Vector& Vect,
                                       math_Vector& Grad)
 //=======================================================================
 {
-  Standard_Integer ii,
+  Standard_Integer ii = 0,
                    DebG = Grad.Lower(), FinG = Grad.Upper();
   Standard_Integer Vdeb = 3, 
                    Vfin = 2*MyPoles->Length()-2;
@@ -138,7 +140,7 @@ Standard_Boolean FairCurve_Energy::Values(const math_Vector& X,
                                                math_Vector& G)
 //=======================================================================
 {
-   Standard_Boolean IsDone;
+   Standard_Boolean IsDone = 0;
 
    ComputePoles(X);
    IsDone = Compute(1, MyGradient);
@@ -156,7 +158,7 @@ Standard_Boolean FairCurve_Energy::Values(const math_Vector& X,
                                                math_Matrix& H)
 //=======================================================================
 {
-   Standard_Boolean IsDone;
+   Standard_Boolean IsDone = 0;
 
    ComputePoles(X);
    IsDone = Compute(2, MyHessian);
@@ -175,7 +177,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect,
 //=======================================================================
 {
 
-  Standard_Integer ii, jj, kk, Vk;
+  Standard_Integer ii = 0, jj = 0, kk = 0, Vk = 0;
   Standard_Integer Vdeb = 3 + 2*MyContrOrder1, 
                    Vfin = 2*MyPoles->Length() - 2*(MyContrOrder2+1),
                    Vup  = 2*MyPoles->Length()+MyWithAuxValue;
@@ -386,7 +388,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect,
 Standard_Boolean FairCurve_Energy::Variable(math_Vector& X) const
 //======================================================================= 
 {
-  Standard_Integer ii,
+  Standard_Integer ii = 0,
                    IndexDeb1 = MyPoles->Lower()+1, 
                    IndexDeb2 = X.Lower(),
                    IndexFin1 = MyPoles->Upper()-1,
@@ -436,7 +438,7 @@ Standard_Boolean FairCurve_Energy::Variable(math_Vector& X) const
 void FairCurve_Energy::ComputePoles(const math_Vector& X)
 //======================================================================= 
 {
-  Standard_Integer ii,
+  Standard_Integer ii = 0,
                    IndexDeb1 = MyPoles->Lower()+1, 
                    IndexDeb2 = X.Lower(),
                    IndexFin1 = MyPoles->Upper()-1,
index 2ccce312259a5f4d1e1e0d0a54e4eff4c7237be1..cbe68901f01f286427dbbc7df81adecf93d6b8b6 100644 (file)
@@ -52,7 +52,7 @@ FairCurve_EnergyOfBatten::FairCurve_EnergyOfBatten(const Standard_Integer BSplOr
 Standard_Boolean FairCurve_EnergyOfBatten::Variable(math_Vector& X) const
 //======================================================================= 
 {
- Standard_Boolean Ok;
+ Standard_Boolean Ok = 0;
  Ok = FairCurve_Energy::Variable(X);
  if (MyWithAuxValue) { X(X.Upper()) = MyLengthSliding; }
  return Ok;
@@ -97,7 +97,7 @@ Standard_Boolean FairCurve_EnergyOfBatten::Compute(const Standard_Integer Deriva
   // on decoupe afin d'avoir au moins 2 points d'integration par poles
   // 24 points de Gauss => 12 poles maximum.
 
-  Standard_Integer NbInterv = (MyPoles->Length()-1) / 12 + 1, ii;
+  Standard_Integer NbInterv = (MyPoles->Length()-1) / 12 + 1, ii = 0;
   Standard_Real Delta = 1./ NbInterv;
   Result.Init(0);
 
index 0957591e144b88275ed36470d1f33be405f6eeb7..a1510f673de34c332855a0212a6e71938aebdb4d 100644 (file)
@@ -67,7 +67,7 @@ void FairCurve_EnergyOfMVC::ComputePoles(const math_Vector& X)
 Standard_Boolean FairCurve_EnergyOfMVC::Variable(math_Vector& X) const 
 //=====================================================================================
 {
- Standard_Boolean Ok;
+ Standard_Boolean Ok = 0;
  Ok = FairCurve_Energy::Variable(X);
  if (MyWithAuxValue) { X(X.Upper()) = MyLengthSliding; }
  return Ok;
@@ -105,7 +105,7 @@ Standard_Boolean FairCurve_EnergyOfMVC::Compute(const Standard_Integer Derivativ
   // on decoupe afin d'avoir au moins 2 points d'integration par poles
   // 24 points de Gauss => 12 poles maximum.
 
-  Standard_Integer NbInterv = (MyPoles->Length()-1) / 12 + 1, ii;
+  Standard_Integer NbInterv = (MyPoles->Length()-1) / 12 + 1, ii = 0;
   Standard_Real Delta = 1./ NbInterv;
   Result.Init(0);
 
index 2d12de07f3928c1b2840f21ff6e51647ec01a931..fb9ab61444b9d81c8d4008e622fec0b39067eda5 100644 (file)
@@ -20,6 +20,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <FairCurve_EnergyOfMVC.hxx>
 #include <FairCurve_MinimalVariation.hxx>
@@ -59,8 +61,8 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(FairCurve_AnalysisCode& ACo
   Standard_Real AngleMax = 0.7;      // parameter regulating the function of increment ( 40 degrees )
   Standard_Real AngleMin = 2*M_PI/100; // parameter regulating the function of increment 
                                      // full passage should not contain more than 100 steps.
-  Standard_Real DAngle1, DAngle2,  DRho1, DRho2, Ratio, Fraction, Toler;
-  Standard_Real OldDist, NewDist;
+  Standard_Real DAngle1 = NAN, DAngle2 = NAN,  DRho1 = NAN, DRho2 = NAN, Ratio = NAN, Fraction = NAN, Toler = NAN;
+  Standard_Real OldDist = NAN, NewDist = NAN;
 
 //  Loop of Homotopy : calculation of the step and optimisation 
 
@@ -140,12 +142,12 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1,
                                                     const Standard_Real Tolerance)
 //======================================================================================
 {
- Standard_Boolean Ok, OkCompute=Standard_True;
+ Standard_Boolean Ok = 0, OkCompute=Standard_True;
  ACode = FairCurve_OK;
 
 // Deformation of the curve by adding a polynom of interpolation
    Standard_Integer L = 2 + NewConstraintOrder1 + NewConstraintOrder2,
-                    kk, ii;
+                    kk = 0, ii = 0;
 //                    NbP1 = Poles->Length()-1, kk, ii;
 #ifdef OCCT_DEBUG
    Standard_Integer NbP1 = 
@@ -251,7 +253,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1,
 
 // Intermediaires
 
- Standard_Real Angle1, Angle2, SlidingLength
+ Standard_Real Angle1 = NAN, Angle2 = NAN, SlidingLength = NAN
                Alph1 =  OldAngle1 + DeltaAngle1, 
                Alph2 =  OldAngle2 + DeltaAngle2,
                Rho1 =   OldCurvature1 + DeltaCurvature1,
@@ -356,7 +358,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1,
     OldPhysicalRatio =  NewPhysicalRatio;
   }
   else {
-    Standard_Real V;
+    Standard_Real V = NAN;
     ACode = EMVC.Status();
     if (!LBatten.Value(0, V) || !LBatten.Value(1, V)) {
        ACode = FairCurve_NullHeight;
old mode 100755 (executable)
new mode 100644 (file)
index aeecf5c..ef3c8ae
@@ -708,7 +708,7 @@ Font_Rect Font_FTFont::BoundingBox (const NCollection_String&               theS
   aFormatter.Append (theString, *this);
   aFormatter.Format();
 
-  Font_Rect aBndBox;
+  Font_Rect aBndBox{};
   aFormatter.BndBox (aBndBox);
   return aBndBox;
 }
index 4bceb727a0826241cd5fabde62585f5f5e50880f..78683a3d88a8b05598094f60c482add8f4ec3a10 100644 (file)
@@ -150,7 +150,7 @@ static bool checkFont (NCollection_Sequence<Handle(Font_SystemFont)>& theFonts,
 {
 #ifdef HAVE_FREETYPE
   const FT_Long aFaceId = theFaceId != -1 ? theFaceId : 0;
-  FT_Face aFontFace;
+  FT_Face aFontFace = nullptr;
   FT_Error aFaceError = FT_New_Face (theFTLib->Instance(), theFontPath.ToCString(), aFaceId, &aFontFace);
   if (aFaceError != FT_Err_Ok)
   {
@@ -761,7 +761,7 @@ void Font_FontMgr::InitFontDataBase()
       }
 
       Standard_Integer aNByte = 256;
-      Standard_Integer aNbyteRead;
+      Standard_Integer aNbyteRead = 0;
       TCollection_AsciiString aStr; // read string with information
       while (!aFile.IsAtEnd())
       {
@@ -850,7 +850,7 @@ void Font_FontMgr::InitFontDataBase()
       continue; // invalid fonts directory
     }
 
-    Standard_Integer aNbyteRead, aNByte = 256;
+    Standard_Integer aNbyteRead = 0, aNByte = 256;
     TCollection_AsciiString aLine (aNByte);
     Standard_Boolean isFirstLine = Standard_True;
     const TCollection_AsciiString anEncoding ("iso8859-1\n");
index ac3c6fca8be9257c46424e969cac61d7c4b26ba8..9ab34c0fbb6f5957993a0e542b0d4259a6499dc8 100644 (file)
@@ -142,7 +142,7 @@ public:
 private:
 
   TCollection_AsciiString myFilePaths[Font_FontAspect_NB]; //!< paths to the font file
-  Standard_Integer        myFaceIds  [Font_FontAspect_NB]; //!< face ids per font file
+  Standard_Integer        myFaceIds  [Font_FontAspect_NB]{}; //!< face ids per font file
   TCollection_AsciiString myFontKey;      //!< font family name, lower cased
   TCollection_AsciiString myFontName;     //!< font family name
   Standard_Boolean        myIsSingleLine; //!< single stroke font flag, FALSE by default
index e8d2d6b2f44bfc2348c9c7ea66ff2b1b0cfaa652..2f77bdb600f844a3aa00689d056577206e3425ee 100644 (file)
@@ -183,7 +183,7 @@ void Font_TextFormatter::newLine (const Standard_Integer theLastRect,
   }
 
   Standard_ShortReal aXMin = BottomLeft (aFirstCornerId).x();
-  Font_Rect aBndBox;
+  Font_Rect aBndBox{};
   GlyphBoundingBox (aLastCornerId, aBndBox);
   Standard_ShortReal aXMax = aBndBox.Right;
 
@@ -268,7 +268,7 @@ void Font_TextFormatter::Format()
     {
       Standard_Integer aFirstCornerId = myRectLineStart;
 
-      Font_Rect aBndBox;
+      Font_Rect aBndBox{};
       GlyphBoundingBox (aRectIter, aBndBox);
       const Standard_ShortReal aNextXPos = aBndBox.Right - BottomLeft (aFirstCornerId).x();
       Standard_Boolean isCurWordFits = true;
@@ -372,7 +372,7 @@ Standard_Boolean Font_TextFormatter::GlyphBoundingBox (const Standard_Integer th
 // =======================================================================
 Standard_Boolean Font_TextFormatter::IsLFSymbol (const Standard_Integer theIndex) const
 {
-  Font_Rect aBndBox;
+  Font_Rect aBndBox{};
   if (!GlyphBoundingBox (theIndex, aBndBox))
   {
     return Standard_False;
index 7e2b2f58fdbe138904919cafdaa573e219fea40e..f3cb3dcc292b3fcf784b7710301bd8365c72dc76 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Extrema_ExtElC.hxx>
 #include <Extrema_POnCurv.hxx>
 //=======================================================================
 GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Pnt&  P1 ,
                                       const gp_Pnt&  P2 ,
-                                      const gp_Pnt&  P3  ) 
+                                      const gp_Pnt&  P3  ) : GC_Root() 
 {
-  Standard_Boolean sense;
+  Standard_Boolean sense = 0;
   //
   gce_MakeCirc Cir(P1, P2, P3);
   TheError = Cir.Status();
   if (TheError == gce_Done) {
-    Standard_Real Alpha1, Alpha3;//,Alpha2
+    Standard_Real Alpha1 = NAN, Alpha3 = NAN;//,Alpha2
     gp_Circ C(Cir.Value());
     //modified by NIZNHY-PKV Thu Mar  3 10:53:02 2005f
     //Alpha1 is always =0.
@@ -69,7 +71,7 @@ GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Pnt&  P1 ,
 //=======================================================================
 GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Pnt& P1 ,
                                       const gp_Vec& V  ,
-                                      const gp_Pnt& P2 )
+                                      const gp_Pnt& P2 ) : GC_Root()
 {
   gp_Circ cir;
   gce_MakeLin Corde(P1,P2);
@@ -122,7 +124,7 @@ GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Pnt& P1 ,
 GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Circ& Circ   ,
                                       const gp_Pnt&  P1     ,
                                       const gp_Pnt&  P2     ,
-                                      const Standard_Boolean  Sense  ) 
+                                      const Standard_Boolean  Sense  ) : GC_Root() 
 {
   Standard_Real Alpha1 = ElCLib::Parameter(Circ,P1);
   Standard_Real Alpha2 = ElCLib::Parameter(Circ,P2);
@@ -137,7 +139,7 @@ GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Circ& Circ   ,
 GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Circ& Circ   ,
                                       const gp_Pnt&  P      ,
                                       const Standard_Real     Alpha  ,
-                                      const Standard_Boolean  Sense  ) 
+                                      const Standard_Boolean  Sense  ) : GC_Root() 
 {
   Standard_Real Alphafirst = ElCLib::Parameter(Circ,P);
   Handle(Geom_Circle) C = new Geom_Circle(Circ);
@@ -151,7 +153,7 @@ GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Circ& Circ   ,
 GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Circ& Circ   ,
                                         const Standard_Real     Alpha1 ,
                                         const Standard_Real     Alpha2 ,
-                                        const Standard_Boolean  Sense  ) 
+                                        const Standard_Boolean  Sense  ) : GC_Root() 
 {
   Handle(Geom_Circle) C = new Geom_Circle(Circ);
   TheArc= new Geom_TrimmedCurve(C,Alpha1,Alpha2,Sense);
index 92a196176551e512d9a9e273b0d6717ec616a7b3..ccf1f833118792f7baad9b4a03b1c9537babfae0 100644 (file)
@@ -26,7 +26,7 @@
 GC_MakeArcOfEllipse::GC_MakeArcOfEllipse(const gp_Elips& Elips   ,
                                           const gp_Pnt&    P1   ,
                                           const gp_Pnt&    P2   ,
-                                          const Standard_Boolean  Sense  ) 
+                                          const Standard_Boolean  Sense  ) : GC_Root() 
 {
   Standard_Real Alpha1 = ElCLib::Parameter(Elips,P1);
   Standard_Real Alpha2 = ElCLib::Parameter(Elips,P2);
@@ -38,7 +38,7 @@ GC_MakeArcOfEllipse::GC_MakeArcOfEllipse(const gp_Elips& Elips   ,
 GC_MakeArcOfEllipse::GC_MakeArcOfEllipse(const gp_Elips& Elips   ,
                                           const gp_Pnt&   P     ,
                                           const Standard_Real      Alpha ,
-                                          const Standard_Boolean   Sense ) 
+                                          const Standard_Boolean   Sense ) : GC_Root() 
 {
   Standard_Real Alphafirst = ElCLib::Parameter(Elips,P);
   Handle(Geom_Ellipse) E = new Geom_Ellipse(Elips);
@@ -49,7 +49,7 @@ GC_MakeArcOfEllipse::GC_MakeArcOfEllipse(const gp_Elips& Elips   ,
 GC_MakeArcOfEllipse::GC_MakeArcOfEllipse(const gp_Elips& Elips   ,
                                           const Standard_Real     Alpha1 ,
                                           const Standard_Real     Alpha2 ,
-                                          const Standard_Boolean  Sense  ) 
+                                          const Standard_Boolean  Sense  ) : GC_Root() 
 {
   Handle(Geom_Ellipse) E = new Geom_Ellipse(Elips);
   TheArc = new Geom_TrimmedCurve(E,Alpha1,Alpha2,Sense);
index 8cabadf1dba37cc6790b693f46957aedd2fe2589..734af274e2fc218093dbf976684ecd0824f20c33 100644 (file)
@@ -27,7 +27,7 @@ GC_MakeArcOfHyperbola::
   GC_MakeArcOfHyperbola(const gp_Hypr& Hypr   ,
                         const gp_Pnt&  P1     ,
                         const gp_Pnt&  P2     ,
-                        const Standard_Boolean  Sense  ) 
+                        const Standard_Boolean  Sense  ) : GC_Root() 
 {
   Standard_Real Alpha1 = ElCLib::Parameter(Hypr,P1);
   Standard_Real Alpha2 = ElCLib::Parameter(Hypr,P2);
@@ -39,7 +39,7 @@ GC_MakeArcOfHyperbola::
 GC_MakeArcOfHyperbola::GC_MakeArcOfHyperbola(const gp_Hypr& Hypr   ,
                                               const gp_Pnt&  P     ,
                                               const Standard_Real     Alpha ,
-                                              const Standard_Boolean  Sense ) 
+                                              const Standard_Boolean  Sense ) : GC_Root() 
 {
   Standard_Real Alphafirst = ElCLib::Parameter(Hypr,P);
   Handle(Geom_Hyperbola) H = new Geom_Hyperbola(Hypr);
@@ -50,7 +50,7 @@ GC_MakeArcOfHyperbola::GC_MakeArcOfHyperbola(const gp_Hypr& Hypr   ,
 GC_MakeArcOfHyperbola::GC_MakeArcOfHyperbola(const gp_Hypr&        Hypr   ,
                                             const Standard_Real     Alpha1 ,
                                             const Standard_Real     Alpha2 ,
-                                            const Standard_Boolean  Sense  ) 
+                                            const Standard_Boolean  Sense  ) : GC_Root() 
 {
   Handle(Geom_Hyperbola) H = new Geom_Hyperbola(Hypr);
   TheArc = new Geom_TrimmedCurve(H,Alpha1,Alpha2,Sense);
index bc0c7a239e9914fcced2f3909c696a57e48ae7bb..e3baf111faea584412b31824b13c2da58017c0cd 100644 (file)
@@ -26,7 +26,7 @@
 GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab ,
                                             const gp_Pnt&   P1    ,
                                             const gp_Pnt&   P2    ,
-                                            const Standard_Boolean  Sense  ) 
+                                            const Standard_Boolean  Sense  ) : GC_Root() 
 {
   Standard_Real Alpha1 = ElCLib::Parameter(Parab,P1);
   Standard_Real Alpha2 = ElCLib::Parameter(Parab,P2);
@@ -38,7 +38,7 @@ GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab ,
 GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab ,
                                             const gp_Pnt&   P     ,
                                             const Standard_Real      Alpha ,
-                                            const Standard_Boolean  Sense  ) 
+                                            const Standard_Boolean  Sense  ) : GC_Root() 
 {
   Standard_Real Alphafirst = ElCLib::Parameter(Parab,P);
   Handle(Geom_Parabola) Parabola = new Geom_Parabola(Parab);
@@ -49,7 +49,7 @@ GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab ,
 GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab ,
                                             const Standard_Real      Alpha1 ,
                                             const Standard_Real      Alpha2 ,
-                                            const Standard_Boolean   Sense  ) 
+                                            const Standard_Boolean   Sense  ) : GC_Root() 
 {
   Handle(Geom_Parabola) P = new Geom_Parabola(Parab);
   TheArc = new Geom_TrimmedCurve(P,Alpha1,Alpha2,Sense);
index 18953056017ea1ee93235a5468686f5e9c77d128..8b83daf89e7e146b23b0bb3dec64c6fba984b95e 100644 (file)
 #include <gp_Pnt.hxx>
 #include <StdFail_NotDone.hxx>
 
-GC_MakeCircle::GC_MakeCircle(const gp_Circ& C)
+GC_MakeCircle::GC_MakeCircle(const gp_Circ& C) : GC_Root(), TheCircle(new Geom_Circle(C))
 {
   TheError = gce_Done;
-  TheCircle = new Geom_Circle(C);
+  
 }
 
 GC_MakeCircle::GC_MakeCircle(const gp_Ax2&       A2    ,
-                              const Standard_Real Radius)
+                              const Standard_Real Radius) : GC_Root()
 {
   if (Radius < 0.) { TheError = gce_NegativeRadius; }
   else {
@@ -42,7 +42,7 @@ GC_MakeCircle::GC_MakeCircle(const gp_Ax2&       A2    ,
 }
 
 GC_MakeCircle::GC_MakeCircle(const gp_Circ& Circ  ,
-                              const gp_Pnt&  Point ) 
+                              const gp_Pnt&  Point ) : GC_Root() 
 {
   gp_Circ C = gce_MakeCirc(Circ,Point);
   TheCircle = new Geom_Circle(C);
@@ -50,7 +50,7 @@ GC_MakeCircle::GC_MakeCircle(const gp_Circ& Circ  ,
 }
 
 GC_MakeCircle::GC_MakeCircle(const gp_Circ& Circ ,
-                              const Standard_Real     Dist ) 
+                              const Standard_Real     Dist ) : GC_Root() 
 {
   gce_MakeCirc C = gce_MakeCirc(Circ,Dist);
   TheError = C.Status();
@@ -61,7 +61,7 @@ GC_MakeCircle::GC_MakeCircle(const gp_Circ& Circ ,
 
 GC_MakeCircle::GC_MakeCircle(const gp_Pnt& P1 ,
                               const gp_Pnt& P2 ,
-                              const gp_Pnt& P3 ) 
+                              const gp_Pnt& P3 ) : GC_Root() 
 {
   gce_MakeCirc C = gce_MakeCirc(P1,P2,P3);
   TheError = C.Status();
@@ -72,7 +72,7 @@ GC_MakeCircle::GC_MakeCircle(const gp_Pnt& P1 ,
 
 GC_MakeCircle::GC_MakeCircle(const gp_Pnt& Point  ,
                               const gp_Dir& Norm   ,
-                              const Standard_Real    Radius ) 
+                              const Standard_Real    Radius ) : GC_Root() 
 {
   gce_MakeCirc C = gce_MakeCirc(Point,Norm,Radius);
   TheError = C.Status();
@@ -83,7 +83,7 @@ GC_MakeCircle::GC_MakeCircle(const gp_Pnt& Point  ,
 
 GC_MakeCircle::GC_MakeCircle(const gp_Pnt&        Point  ,
                               const gp_Pnt&        PtAxis ,
-                              const Standard_Real  Radius ) 
+                              const Standard_Real  Radius ) : GC_Root() 
 {
   gce_MakeCirc C = gce_MakeCirc(Point,PtAxis,Radius);
   TheError = C.Status();
@@ -93,7 +93,7 @@ GC_MakeCircle::GC_MakeCircle(const gp_Pnt&        Point  ,
 }
 
 GC_MakeCircle::GC_MakeCircle(const gp_Ax1& Axis   ,
-                              const Standard_Real    Radius ) 
+                              const Standard_Real    Radius ) : GC_Root() 
 {
   gce_MakeCirc C = gce_MakeCirc(Axis,Radius);
   TheError = C.Status();
index 45b77e30a3fb94cf8ec17742ce8e0b3222745cc0..85c71fc0465d8a40b9e8f84ac2a9e27157f68df8 100644 (file)
@@ -28,7 +28,7 @@
 
 GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Ax2&       A2    ,
                                               const Standard_Real Ang   ,
-                                              const Standard_Real Radius)
+                                              const Standard_Real Radius) : GC_Root()
 {
   if (Radius < 0.) { TheError = gce_NegativeRadius; }
   else if (Ang <= gp::Resolution() || Ang >= M_PI/2. - gp::Resolution()) {
@@ -40,10 +40,10 @@ GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Ax2&       A2    ,
   }
 }
 
-GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Cone& C)
+GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Cone& C) : GC_Root(), TheCone(new Geom_ConicalSurface(C))
 {
   TheError = gce_Done;
-  TheCone = new Geom_ConicalSurface(C);
+  
 }
 
 //=========================================================================
@@ -56,7 +56,7 @@ GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Cone& C)
 GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Pnt& P1 ,
                                               const gp_Pnt& P2 ,
                                               const gp_Pnt& P3 ,
-                                              const gp_Pnt& P4 ) 
+                                              const gp_Pnt& P4 ) : GC_Root() 
 {
   gce_MakeCone C = gce_MakeCone(P1,P2,P3,P4);
   TheError = C.Status();
@@ -72,7 +72,7 @@ GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Pnt& P1 ,
 GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Pnt&       P1 ,
                                               const gp_Pnt&       P2 ,
                                               const Standard_Real R1 ,
-                                              const Standard_Real R2 ) 
+                                              const Standard_Real R2 ) : GC_Root() 
 {
   gce_MakeCone C = gce_MakeCone(P1,P2,R1,R2);
   TheError = C.Status();
index b364bae0af0babe2b70e33f4b70186e307008879..1bf2e4d4e285062ded8aa703247edd3fc1ea4850 100644 (file)
 #include <gp_Pnt.hxx>
 #include <StdFail_NotDone.hxx>
 
-GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Cylinder& C)
+GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Cylinder& C) : GC_Root(), TheCylinder(new Geom_CylindricalSurface(C))
 {
   TheError = gce_Done;
-  TheCylinder = new Geom_CylindricalSurface(C);
+  
 }
 
 GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Ax2& A2    ,
-                                               const Standard_Real  Radius)
+                                               const Standard_Real  Radius) : GC_Root()
 {
   if (Radius < 0.0) { TheError = gce_NegativeRadius; }
   else {
@@ -47,7 +47,7 @@ GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Ax2& A2    ,
 //=========================================================================
 
 GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Ax1& A1     ,
-                                                const Standard_Real Radius ) 
+                                                const Standard_Real Radius ) : GC_Root() 
 {
   gce_MakeCylinder Cyl = gce_MakeCylinder(A1,Radius);
   TheError = Cyl.Status();
@@ -60,7 +60,7 @@ GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Ax1& A1     ,
 //   Construction of a cylinder by a circle <Cir>.                      +
 //=========================================================================
 
-GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Circ& Circ ) {
+GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Circ& Circ ) : GC_Root() {
   gp_Cylinder Cyl = gce_MakeCylinder(Circ);
   TheCylinder=new Geom_CylindricalSurface(Cyl);
   TheError = gce_Done;
@@ -74,7 +74,7 @@ GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Circ& Circ ) {
 
 GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Pnt& P1 ,
                                                       const gp_Pnt& P2 ,
-                                                      const gp_Pnt& P3 ) {
+                                                      const gp_Pnt& P3 ) : GC_Root() {
   gce_MakeCylinder Cyl = gce_MakeCylinder(P1,P2,P3);
   TheError = Cyl.Status();
   if (TheError == gce_Done) {
@@ -83,16 +83,16 @@ GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Pnt& P1 ,
 }
 
 GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Cylinder& Cyl ,
-                                                    const Standard_Real  Dist)
+                                                    const Standard_Real  Dist) : GC_Root(), TheCylinder(new Geom_CylindricalSurface(Cyl))
 {
   TheError = gce_Done;
   Standard_Real R = Abs(Cyl.Radius()-Dist);
-  TheCylinder = new Geom_CylindricalSurface(Cyl);
+  
   TheCylinder->SetRadius(R);
 }
 
 GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Cylinder& Cyl ,
-                                                      const gp_Pnt&     Point)
+                                                      const gp_Pnt&     Point) : GC_Root()
 {
   TheError = gce_Done;
   gp_Cylinder C(Cyl);
index c97a7005ab61f28ca6ae80de3b52605e23973a9a..a5a412b05c83364d913c236dcfb7199903f505d8 100644 (file)
 #include <gp_Pnt.hxx>
 #include <StdFail_NotDone.hxx>
 
-GC_MakeEllipse::GC_MakeEllipse(const gp_Elips& E)
+GC_MakeEllipse::GC_MakeEllipse(const gp_Elips& E) : GC_Root(), TheEllipse(new Geom_Ellipse(E))
 {
   TheError = gce_Done;
-  TheEllipse = new Geom_Ellipse(E);
+  
 }
 
 GC_MakeEllipse::GC_MakeEllipse(const gp_Ax2&       A2         ,
                                 const Standard_Real MajorRadius,
-                                const Standard_Real MinorRadius)
+                                const Standard_Real MinorRadius) : GC_Root()
 {
   if ( MinorRadius < 0.0) { TheError = gce_NegativeRadius; }
   else if ( MajorRadius < MinorRadius) { TheError = gce_InvertAxis; }
@@ -43,7 +43,7 @@ GC_MakeEllipse::GC_MakeEllipse(const gp_Ax2&       A2         ,
 
 GC_MakeEllipse::GC_MakeEllipse(const gp_Pnt& S1     ,
                                 const gp_Pnt& S2     ,
-                                const gp_Pnt& Center ) {
+                                const gp_Pnt& Center ) : GC_Root() {
   gce_MakeElips E = gce_MakeElips(S1,S2,Center);
   TheError = E.Status();
   if (TheError == gce_Done) {
index da621ab6800dfb2ba354f0f385b37643e031ba46..1b3065ff5d7a00546a70d38a08933b90b0807aca 100644 (file)
 #include <gp_Pnt.hxx>
 #include <StdFail_NotDone.hxx>
 
-GC_MakeHyperbola::GC_MakeHyperbola(const gp_Hypr& H)
+GC_MakeHyperbola::GC_MakeHyperbola(const gp_Hypr& H) : GC_Root(), TheHyperbola(new Geom_Hyperbola(H))
 {
   TheError = gce_Done;
-  TheHyperbola = new Geom_Hyperbola(H);
+  
 }
 
 GC_MakeHyperbola::GC_MakeHyperbola(const gp_Ax2&       A2         ,
                                     const Standard_Real MajorRadius,
-                                    const Standard_Real MinorRadius)
+                                    const Standard_Real MinorRadius) : GC_Root()
 {
   if (MajorRadius < 0. || MinorRadius < 0.0) { TheError = gce_NegativeRadius; }
   else {
@@ -42,7 +42,7 @@ GC_MakeHyperbola::GC_MakeHyperbola(const gp_Ax2&       A2         ,
 
 GC_MakeHyperbola::GC_MakeHyperbola(const gp_Pnt& S1     ,
                                     const gp_Pnt& S2     ,
-                                    const gp_Pnt& Center ) {
+                                    const gp_Pnt& Center ) : GC_Root() {
   gce_MakeHypr H = gce_MakeHypr(S1,S2,Center);
   TheError = H.Status();
   if (TheError == gce_Done) {
index 05ab8e0288ba52d850348e7672dc3a91d46032da..ee0d3a44a634cad64f7c9dd3f3699d89df5cdd15 100644 (file)
 //   Constructions of 3d geometrical elements from Geom.
 //=========================================================================
 GC_MakeLine::GC_MakeLine(const gp_Pnt& P ,
-                          const gp_Dir& V )
+                          const gp_Dir& V ) : GC_Root(), TheLine(new Geom_Line(P,V))
 {
   TheError = gce_Done;
-  TheLine = new Geom_Line(P,V);
+  
 }
 
-GC_MakeLine::GC_MakeLine(const gp_Ax1& A1 )
+GC_MakeLine::GC_MakeLine(const gp_Ax1& A1 ) : GC_Root(), TheLine(new Geom_Line(A1))
 {
   TheError = gce_Done;
-  TheLine = new Geom_Line(A1);
+  
 }
 
-GC_MakeLine::GC_MakeLine(const gp_Lin& L )
+GC_MakeLine::GC_MakeLine(const gp_Lin& L ) : GC_Root(), TheLine(new Geom_Line(L))
 {
   TheError = gce_Done;
-  TheLine = new Geom_Line(L);
+  
 }
 
 GC_MakeLine::GC_MakeLine(const gp_Pnt& P1 ,
-                          const gp_Pnt& P2 ) 
+                          const gp_Pnt& P2 ) : GC_Root() 
 {
   gce_MakeLin L(P1,P2);
   TheError = L.Status();
@@ -57,7 +57,7 @@ GC_MakeLine::GC_MakeLine(const gp_Pnt& P1 ,
 }
 
 GC_MakeLine::GC_MakeLine(const gp_Lin& Lin   ,
-                          const gp_Pnt& Point ) 
+                          const gp_Pnt& Point ) : GC_Root() 
 {
   gce_MakeLin L(Lin,Point);
   TheError = L.Status();
index c7809b4a01063fecbe889a03c3b36278adcb3c81..e689bf3f3c92a645b9def7f287472d4467c651d6 100644 (file)
@@ -25,8 +25,8 @@
 //=========================================================================
 //   Creation d une symetrie de Geom par rapport a un point.              +
 //=========================================================================
-GC_MakeMirror::GC_MakeMirror(const gp_Pnt&  Point ) {
-  TheMirror = new Geom_Transformation();
+GC_MakeMirror::GC_MakeMirror(const gp_Pnt&  Point ) : TheMirror(new Geom_Transformation()) {
+  
   TheMirror->SetMirror(Point);
 }
 
@@ -34,8 +34,8 @@ GC_MakeMirror::GC_MakeMirror(const gp_Pnt&  Point ) {
 //   Creation d une symetrie de Geom par rapport a une droite.            +
 //=========================================================================
 
-GC_MakeMirror::GC_MakeMirror(const gp_Ax1&  Axis ) {
-  TheMirror = new Geom_Transformation();
+GC_MakeMirror::GC_MakeMirror(const gp_Ax1&  Axis ) : TheMirror(new Geom_Transformation()) {
+  
   TheMirror->SetMirror(Axis);
 }
 
@@ -43,8 +43,8 @@ GC_MakeMirror::GC_MakeMirror(const gp_Ax1&  Axis ) {
 //   Creation d une symetrie de Geom par rapport a une droite.            +
 //=========================================================================
 
-GC_MakeMirror::GC_MakeMirror(const gp_Lin&  Line ) {
-  TheMirror = new Geom_Transformation();
+GC_MakeMirror::GC_MakeMirror(const gp_Lin&  Line ) : TheMirror(new Geom_Transformation()) {
+  
   TheMirror->SetMirror(gp_Ax1(Line.Location(),Line.Direction()));
 }
 
@@ -54,8 +54,8 @@ GC_MakeMirror::GC_MakeMirror(const gp_Lin&  Line ) {
 //=========================================================================
 
 GC_MakeMirror::GC_MakeMirror(const gp_Pnt&  Point ,
-                                       const gp_Dir&  Direc ) {
-  TheMirror = new Geom_Transformation();
+                                       const gp_Dir&  Direc ) : TheMirror(new Geom_Transformation()) {
+  
   TheMirror->SetMirror(gp_Ax1(Point,Direc));
 }
 
@@ -64,8 +64,8 @@ GC_MakeMirror::GC_MakeMirror(const gp_Pnt&  Point ,
 //   un Ax2 (Normale au plan et axe x du plan).                           +
 //=========================================================================
 
-GC_MakeMirror::GC_MakeMirror(const gp_Ax2&  Plane ) {
-  TheMirror = new Geom_Transformation();
+GC_MakeMirror::GC_MakeMirror(const gp_Ax2&  Plane ) : TheMirror(new Geom_Transformation()) {
+  
   TheMirror->SetMirror(Plane);
 }
 
@@ -73,8 +73,8 @@ GC_MakeMirror::GC_MakeMirror(const gp_Ax2&  Plane ) {
 //   Creation d une symetrie 3d de gp par rapport a un plan Plane.        +
 //=========================================================================
 
-GC_MakeMirror::GC_MakeMirror(const gp_Pln&  Plane ) {
-  TheMirror = new Geom_Transformation();
+GC_MakeMirror::GC_MakeMirror(const gp_Pln&  Plane ) : TheMirror(new Geom_Transformation()) {
+  
   TheMirror->SetMirror(Plane.Position().Ax2());
 }
 
index 9b3531150048ac5400765c5ed8fd94cf9f511b7c..5798c360459c729b78258b62a3bd120836727c86 100644 (file)
 #include <StdFail_NotDone.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 
-GC_MakePlane::GC_MakePlane(const gp_Pln& Pl)
+GC_MakePlane::GC_MakePlane(const gp_Pln& Pl) : GC_Root(), ThePlane(new Geom_Plane(Pl))
 {
   TheError = gce_Done;
-  ThePlane = new Geom_Plane(Pl);
+  
 }
 
 GC_MakePlane::GC_MakePlane(const gp_Pnt& P,
-                            const gp_Dir& V)
+                            const gp_Dir& V) : GC_Root(), ThePlane(new Geom_Plane(P,V))
 {
   TheError = gce_Done;
-  ThePlane = new Geom_Plane(P,V);
+  
 }
 
 GC_MakePlane::GC_MakePlane(const Standard_Real A,
                             const Standard_Real B,
                             const Standard_Real C,
-                            const Standard_Real D)
+                            const Standard_Real D) : GC_Root()
 {
   if (Sqrt(A*A + B*B +C*C) <= gp::Resolution()) {
     TheError = gce_BadEquation; 
@@ -60,7 +60,7 @@ GC_MakePlane::GC_MakePlane(const Standard_Real A,
 
 GC_MakePlane::GC_MakePlane(const gp_Pnt& P1    ,
                             const gp_Pnt& P2    ,
-                            const gp_Pnt& P3    ) {
+                            const gp_Pnt& P3    ) : GC_Root() {
   gce_MakePln Pl(P1,P2,P3);
   TheError = Pl.Status();
   if (TheError == gce_Done) {
@@ -73,7 +73,7 @@ GC_MakePlane::GC_MakePlane(const gp_Pnt& P1    ,
 //=========================================================================
 
 GC_MakePlane::GC_MakePlane(const gp_Pln& Pl   ,
-                            const Standard_Real    Dist ) {
+                            const Standard_Real    Dist ) : GC_Root() {
   gp_Pln Pln = gce_MakePln(Pl,Dist);
   TheError = gce_Done;
   ThePlane = new Geom_Plane(Pln);
@@ -85,7 +85,7 @@ GC_MakePlane::GC_MakePlane(const gp_Pln& Pl   ,
 //=========================================================================
 
 GC_MakePlane::GC_MakePlane(const gp_Pln& Pl    ,
-                            const gp_Pnt& Point ) {
+                            const gp_Pnt& Point ) : GC_Root() {
   gp_Pln Pln= gce_MakePln(Pl,Point);
   TheError = gce_Done;
   ThePlane = new Geom_Plane(Pln);
@@ -95,7 +95,7 @@ GC_MakePlane::GC_MakePlane(const gp_Pln& Pl    ,
 //  Creation d un Geom_Plane a partir d un Ax1 (Point + Normale).         +
 //=========================================================================
 
-GC_MakePlane::GC_MakePlane(const gp_Ax1& Axis ) {
+GC_MakePlane::GC_MakePlane(const gp_Ax1& Axis ) : GC_Root() {
   gp_Pln Pln = gce_MakePln(Axis);
   TheError = gce_Done;
   ThePlane = new Geom_Plane(Pln);
index a896954b3775e53d0f103cf9afabf003a8354581..fef9997e46da7faaa0e56d8bb871cb04cdb31c6f 100644 (file)
@@ -27,8 +27,8 @@
 //   droite Line.                                                         +
 //=========================================================================
 GC_MakeRotation::GC_MakeRotation(const gp_Lin&  Line  ,
-                                  const Standard_Real     Angle ) {
-  TheRotation = new Geom_Transformation();
+                                  const Standard_Real     Angle ) : TheRotation(new Geom_Transformation()) {
+  
   TheRotation->SetRotation(gp_Ax1(Line.Location(),Line.Direction()),Angle);
 }
 
@@ -38,8 +38,8 @@ GC_MakeRotation::GC_MakeRotation(const gp_Lin&  Line  ,
 //=========================================================================
 
 GC_MakeRotation::GC_MakeRotation(const gp_Ax1&  Axis  ,
-                                  const Standard_Real     Angle ) {
-  TheRotation = new Geom_Transformation();
+                                  const Standard_Real     Angle ) : TheRotation(new Geom_Transformation()) {
+  
   TheRotation->SetRotation(Axis,Angle);
 }
 
@@ -50,8 +50,8 @@ GC_MakeRotation::GC_MakeRotation(const gp_Ax1&  Axis  ,
 
 GC_MakeRotation::GC_MakeRotation(const gp_Pnt&  Point ,
                                   const gp_Dir&  Direc ,
-                                  const Standard_Real     Angle ) {
-  TheRotation = new Geom_Transformation();
+                                  const Standard_Real     Angle ) : TheRotation(new Geom_Transformation()) {
+  
   TheRotation->SetRotation(gp_Ax1(Point,Direc),Angle);
 }
 
index 4b728185df98b1c95dd89afcf5f7964969b909b0..f9d3c87035e1e902069af10651f07825c179a96c 100644 (file)
@@ -24,8 +24,8 @@
 //   Creation d un homothetie de gp de centre Point et de rapport Scale.  +
 //=========================================================================
 GC_MakeScale::GC_MakeScale(const gp_Pnt&  Point ,
-                            const Standard_Real     Scale ) {
-  TheScale = new Geom_Transformation();
+                            const Standard_Real     Scale ) : TheScale(new Geom_Transformation()) {
+  
   TheScale->SetScale(Point,Scale);
 }
 
index 7b0c93f0aaaad1e5ca0ff920f8c491370a2634e9..d62a00cb1b9a8d183167f8ae9118094c302974e5 100644 (file)
@@ -25,7 +25,7 @@
 #include <StdFail_NotDone.hxx>
 
 GC_MakeSegment::GC_MakeSegment(const gp_Pnt& P1 ,
-                                const gp_Pnt& P2 ) 
+                                const gp_Pnt& P2 ) : GC_Root() 
 {
   Standard_Real dist = P1.Distance(P2);
   Handle(Geom_Line) L = GC_MakeLine(P1,P2);
@@ -35,7 +35,7 @@ GC_MakeSegment::GC_MakeSegment(const gp_Pnt& P1 ,
 
 GC_MakeSegment::GC_MakeSegment(const gp_Lin& Line    ,
                                 const gp_Pnt& Point   ,
-                                const Standard_Real U ) 
+                                const Standard_Real U ) : GC_Root() 
 {
   Standard_Real Ufirst = ElCLib::Parameter(Line,Point);
   Handle(Geom_Line) L = new Geom_Line(Line);
@@ -45,7 +45,7 @@ GC_MakeSegment::GC_MakeSegment(const gp_Lin& Line    ,
 
 GC_MakeSegment::GC_MakeSegment(const gp_Lin& Line  ,
                                 const gp_Pnt& P1    ,
-                                const gp_Pnt& P2    ) 
+                                const gp_Pnt& P2    ) : GC_Root() 
 {
   Standard_Real Ufirst = ElCLib::Parameter(Line,P1);
   Standard_Real Ulast = ElCLib::Parameter(Line,P2);
@@ -56,7 +56,7 @@ GC_MakeSegment::GC_MakeSegment(const gp_Lin& Line  ,
 
 GC_MakeSegment::GC_MakeSegment(const gp_Lin& Line  ,
                                 const Standard_Real    U1    ,
-                                const Standard_Real    U2    ) 
+                                const Standard_Real    U2    ) : GC_Root() 
 {
   Handle(Geom_Line) L = new Geom_Line(Line);
   TheSegment = new Geom_TrimmedCurve(L,U1,U2,Standard_True);
index 2fccd58727c93adc16a0c6824a9ee6a072c687d2..b7240922132251835315f73d5cc88491854b1a92 100644 (file)
@@ -24,8 +24,8 @@
 //=========================================================================
 //   Creation of a 3D Geom translation of translation vector Vec.  +
 //=========================================================================
-GC_MakeTranslation::GC_MakeTranslation(const gp_Vec&  Vec ) {
-  TheTranslation = new Geom_Transformation();
+GC_MakeTranslation::GC_MakeTranslation(const gp_Vec&  Vec ) : TheTranslation(new Geom_Transformation()) {
+  
   TheTranslation->SetTranslation(Vec);
 }
      
@@ -35,8 +35,8 @@ GC_MakeTranslation::GC_MakeTranslation(const gp_Vec&  Vec ) {
 //=========================================================================
 
 GC_MakeTranslation::GC_MakeTranslation(const gp_Pnt&  Point1 ,
-                                        const gp_Pnt&  Point2 ) {
-  TheTranslation = new Geom_Transformation();
+                                        const gp_Pnt&  Point2 ) : TheTranslation(new Geom_Transformation()) {
+  
   TheTranslation->SetTranslation(Point1,Point2);
 }
 
index 3b7d326aeed46da46da3738ba7aaa9430d01edf4..4af12fb04a6dc897b83142b98b7eb5b04ca29d61 100644 (file)
@@ -34,7 +34,7 @@
 GC_MakeTrimmedCone::GC_MakeTrimmedCone(const gp_Pnt& P1 ,
                                         const gp_Pnt& P2 ,
                                         const gp_Pnt& P3 ,
-                                        const gp_Pnt& P4 ) 
+                                        const gp_Pnt& P4 ) : GC_Root() 
 {
   GC_MakeConicalSurface Cone(P1,P2,P3,P4);
   TheError = Cone.Status();
@@ -56,7 +56,7 @@ GC_MakeTrimmedCone::GC_MakeTrimmedCone(const gp_Pnt& P1 ,
 GC_MakeTrimmedCone::GC_MakeTrimmedCone(const gp_Pnt&       P1 ,
                                         const gp_Pnt&       P2 ,
                                         const Standard_Real R1 ,
-                                        const Standard_Real R2 ) 
+                                        const Standard_Real R2 ) : GC_Root() 
 {
   GC_MakeConicalSurface Cone(P1,P2,R1,R2);
   TheError = Cone.Status();
index a70485281e516ccb11efbeb8a30c483e645212a4..bc7bd07a6fcbf5de1e31c66c4aba3966a508ca5c 100644 (file)
@@ -32,7 +32,7 @@
 //=========================================================================
 GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Pnt& P1 ,
                                                 const gp_Pnt& P2 ,
-                                                const gp_Pnt& P3 ) 
+                                                const gp_Pnt& P3 ) : GC_Root() 
 {
   GC_MakeCylindricalSurface Cyl(P1,P2,P3);
   TheError = Cyl.Status();
@@ -47,7 +47,7 @@ GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Pnt& P1 ,
 //=========================================================================
 
 GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Circ&      Circ   ,
-                                                const Standard_Real Height ) {
+                                                const Standard_Real Height ) : GC_Root() {
   GC_MakeCylindricalSurface Cyl(Circ);
   TheError = Cyl.Status();
   if (TheError == gce_Done) {
@@ -61,7 +61,7 @@ GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Circ&      Circ   ,
 
 GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Ax1&       A1     ,
                                                 const Standard_Real Radius ,
-                                                const Standard_Real Height ) {
+                                                const Standard_Real Height ) : GC_Root() {
   GC_MakeCylindricalSurface Cyl(A1,Radius);
   TheError = Cyl.Status();
   if (TheError == gce_Done) {
index 9a68d6796e222cbab56510bb890b82a03ac3f932..6e2c831dbfb270e6af61b4934e40ec20a97ca61a 100644 (file)
@@ -29,7 +29,7 @@
 
 GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Pnt2d&        P1     ,
                                             const gp_Pnt2d&        P2     ,
-                                            const gp_Pnt2d&        P3     ) 
+                                            const gp_Pnt2d&        P3     ) : GCE2d_Root() 
 {
   gce_MakeCirc2d Cir = gce_MakeCirc2d(P1,P2,P3);
   TheError = Cir.Status();
@@ -44,9 +44,9 @@ GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Pnt2d&        P1     ,
 
 GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Pnt2d& P1 ,
                                             const gp_Vec2d& V  ,
-                                            const gp_Pnt2d& P2 )
+                                            const gp_Pnt2d& P2 ) : GCE2d_Root()
 {
-  Standard_Boolean Sense;
+  Standard_Boolean Sense = 0;
   gp_Circ2d cir;
   gp_Lin2d corde = gce_MakeLin2d(P1,P2);
   gp_Dir2d dir(corde.Direction());
@@ -82,7 +82,7 @@ GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Pnt2d& P1 ,
 GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Circ2d&        Circ   ,
                                             const gp_Pnt2d&         P1     ,
                                             const gp_Pnt2d&         P2     ,
-                                            const Standard_Boolean  Sense  ) 
+                                            const Standard_Boolean  Sense  ) : GCE2d_Root() 
 {
   Standard_Real Alpha1 = ElCLib::Parameter(Circ,P1);
   Standard_Real Alpha2 = ElCLib::Parameter(Circ,P2);
@@ -94,7 +94,7 @@ GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Circ2d&        Circ   ,
 GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Circ2d&       Circ  ,
                                             const gp_Pnt2d&        P     ,
                                             const Standard_Real    Alpha ,
-                                            const Standard_Boolean Sense ) 
+                                            const Standard_Boolean Sense ) : GCE2d_Root() 
 {
   Standard_Real Alphafirst = ElCLib::Parameter(Circ,P);
   Handle(Geom2d_Circle) C = new Geom2d_Circle(Circ);
@@ -105,7 +105,7 @@ GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Circ2d&       Circ  ,
 GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Circ2d&       Circ   ,
                                             const Standard_Real    Alpha1 ,
                                             const Standard_Real    Alpha2 ,
-                                            const Standard_Boolean Sense  ) 
+                                            const Standard_Boolean Sense  ) : GCE2d_Root() 
 {
   Handle(Geom2d_Circle) C = new Geom2d_Circle(Circ);
   TheArc= new Geom2d_TrimmedCurve(C,Alpha1,Alpha2,Sense);
index 4621bd50cddda858aa5fb0a41f1e4c2a3d490939..c9e25ca33e5bc604104fb98d7c7b6e6beccf80cc 100644 (file)
@@ -26,7 +26,7 @@
 GCE2d_MakeArcOfEllipse::GCE2d_MakeArcOfEllipse(const gp_Elips2d&      Elips ,
                                               const gp_Pnt2d&        P1    ,
                                               const gp_Pnt2d&        P2    ,
-                                              const Standard_Boolean Sense ) 
+                                              const Standard_Boolean Sense ) : GCE2d_Root() 
 {
   Standard_Real Alpha1 = ElCLib::Parameter(Elips,P1);
   Standard_Real Alpha2 = ElCLib::Parameter(Elips,P2);
@@ -38,7 +38,7 @@ GCE2d_MakeArcOfEllipse::GCE2d_MakeArcOfEllipse(const gp_Elips2d&      Elips ,
 GCE2d_MakeArcOfEllipse::GCE2d_MakeArcOfEllipse(const gp_Elips2d&      Elips ,
                                               const gp_Pnt2d&        P     ,
                                               const Standard_Real    Alpha ,
-                                              const Standard_Boolean Sense ) 
+                                              const Standard_Boolean Sense ) : GCE2d_Root() 
 {
   Standard_Real Alphafirst = ElCLib::Parameter(Elips,P);
   Handle(Geom2d_Ellipse) E = new Geom2d_Ellipse(Elips);
@@ -49,7 +49,7 @@ GCE2d_MakeArcOfEllipse::GCE2d_MakeArcOfEllipse(const gp_Elips2d&      Elips ,
 GCE2d_MakeArcOfEllipse::GCE2d_MakeArcOfEllipse(const gp_Elips2d&      Elips  ,
                                               const Standard_Real    Alpha1 ,
                                               const Standard_Real    Alpha2 ,
-                                              const Standard_Boolean Sense  ) 
+                                              const Standard_Boolean Sense  ) : GCE2d_Root() 
 {
   Handle(Geom2d_Ellipse) E = new Geom2d_Ellipse(Elips);
   TheArc = new Geom2d_TrimmedCurve(E,Alpha1,Alpha2,Sense);
index b9fc62b3cb96b161c7205d8972bd5d22f0ad80b3..fc6c2560b6bb6847f31d2af50018848b5c4b63ea 100644 (file)
@@ -26,7 +26,7 @@
 GCE2d_MakeArcOfHyperbola::GCE2d_MakeArcOfHyperbola(const gp_Hypr2d&     Hypr ,
                                                 const gp_Pnt2d&        P1   ,
                                                 const gp_Pnt2d&        P2   ,
-                                                const Standard_Boolean Sense)
+                                                const Standard_Boolean Sense) : GCE2d_Root()
 {
   Standard_Real Alpha1 = ElCLib::Parameter(Hypr,P1);
   Standard_Real Alpha2 = ElCLib::Parameter(Hypr,P2);
@@ -39,7 +39,7 @@ GCE2d_MakeArcOfHyperbola::
   GCE2d_MakeArcOfHyperbola(const gp_Hypr2d&       Hypr  ,
                           const gp_Pnt2d&        P     ,
                           const Standard_Real    Alpha ,
-                          const Standard_Boolean Sense )
+                          const Standard_Boolean Sense ) : GCE2d_Root()
 {
   Standard_Real Alphafirst = ElCLib::Parameter(Hypr,P);
   Handle(Geom2d_Hyperbola) H = new Geom2d_Hyperbola(Hypr);
@@ -51,7 +51,7 @@ GCE2d_MakeArcOfHyperbola::
   GCE2d_MakeArcOfHyperbola(const gp_Hypr2d&       Hypr ,
                           const Standard_Real    Alpha1,
                           const Standard_Real    Alpha2,
-                          const Standard_Boolean Sense )
+                          const Standard_Boolean Sense ) : GCE2d_Root()
 {
   Handle(Geom2d_Hyperbola) H = new Geom2d_Hyperbola(Hypr);
   TheArc = new Geom2d_TrimmedCurve(H,Alpha1,Alpha2,Sense);
index ac36dd59662981e2fc3e035579389b11c52a9188..bb93215fe64f6f98165ad39a0937440b428578b1 100644 (file)
@@ -27,7 +27,7 @@ GCE2d_MakeArcOfParabola::
   GCE2d_MakeArcOfParabola(const gp_Parab2d&       Parab ,
                          const gp_Pnt2d&         P1    ,
                          const gp_Pnt2d&         P2    ,
-                         const Standard_Boolean  Sense  ) {
+                         const Standard_Boolean  Sense  ) : GCE2d_Root() {
   Standard_Real Alpha1 = ElCLib::Parameter(Parab,P1);
   Standard_Real Alpha2 = ElCLib::Parameter(Parab,P2);
   Handle(Geom2d_Parabola) P = new Geom2d_Parabola(Parab);
@@ -39,7 +39,7 @@ GCE2d_MakeArcOfParabola::
   GCE2d_MakeArcOfParabola(const gp_Parab2d&       Parab ,
                          const gp_Pnt2d&         P     ,
                          const Standard_Real     Alpha ,
-                         const Standard_Boolean  Sense ) {
+                         const Standard_Boolean  Sense ) : GCE2d_Root() {
   Standard_Real Alphafirst = ElCLib::Parameter(Parab,P);
   Handle(Geom2d_Parabola) Parabola = new Geom2d_Parabola(Parab);
   TheArc = new Geom2d_TrimmedCurve(Parabola,Alphafirst,Alpha,Sense);
@@ -50,7 +50,7 @@ GCE2d_MakeArcOfParabola::
   GCE2d_MakeArcOfParabola(const gp_Parab2d&      Parab  ,
                          const Standard_Real    Alpha1 ,
                          const Standard_Real    Alpha2 ,
-                         const Standard_Boolean Sense  ) 
+                         const Standard_Boolean Sense  ) : GCE2d_Root() 
 {
   Handle(Geom2d_Parabola) P = new Geom2d_Parabola(Parab);
   TheArc = new Geom2d_TrimmedCurve(P,Alpha1,Alpha2,Sense);
index f94b4a258544ddd6a902f578a5a2c66103a95ad2..155ae02402abf05071f1a75b2a8e6f6245c4e38b 100644 (file)
 #include <gp_Pnt2d.hxx>
 #include <StdFail_NotDone.hxx>
 
-GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Circ2d& C)
+GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Circ2d& C) : GCE2d_Root(), TheCircle(new Geom2d_Circle(C))
 {
   TheError = gce_Done;
-  TheCircle = new Geom2d_Circle(C);
+  
 }
 
 GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Ax2d&         A     ,
                                   const Standard_Real    Radius,
-                                  const Standard_Boolean Sense )
+                                  const Standard_Boolean Sense ) : GCE2d_Root()
 {
   if (Radius < 0.0) { TheError = gce_NegativeRadius; }
   else {
@@ -42,7 +42,7 @@ GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Ax2d&         A     ,
 }
 
 GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Ax22d&     A     ,
-                                  const Standard_Real Radius)
+                                  const Standard_Real Radius) : GCE2d_Root()
 {
   if (Radius < 0.0) { TheError = gce_NegativeRadius; }
   else {
@@ -52,7 +52,7 @@ GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Ax22d&     A     ,
 }
 
 GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Circ2d& Circ  ,
-                                  const gp_Pnt2d&  Point ) 
+                                  const gp_Pnt2d&  Point ) : GCE2d_Root() 
 {
   gp_Circ2d C = gce_MakeCirc2d(Circ,Point);
   TheCircle = new Geom2d_Circle(C);
@@ -60,7 +60,7 @@ GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Circ2d& Circ  ,
 }
 
 GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Circ2d&    Circ ,
-                                  const Standard_Real Dist ) 
+                                  const Standard_Real Dist ) : GCE2d_Root() 
 {
   gce_MakeCirc2d C = gce_MakeCirc2d(Circ,Dist);
   TheError = C.Status();
@@ -71,7 +71,7 @@ GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Circ2d&    Circ ,
 
 GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Pnt2d& P1 ,
                                   const gp_Pnt2d& P2 ,
-                                  const gp_Pnt2d& P3 ) 
+                                  const gp_Pnt2d& P3 ) : GCE2d_Root() 
 {
   gce_MakeCirc2d C = gce_MakeCirc2d(P1,P2,P3);
   TheError = C.Status();
@@ -83,7 +83,7 @@ GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Pnt2d& P1 ,
 
 GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Pnt2d&        Point  ,
                                   const Standard_Real    Radius ,
-                                  const Standard_Boolean Sense  ) 
+                                  const Standard_Boolean Sense  ) : GCE2d_Root() 
 {
   gce_MakeCirc2d C = gce_MakeCirc2d(Point,Radius,Sense);
   TheError = C.Status();
@@ -94,7 +94,7 @@ GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Pnt2d&        Point  ,
 
 GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Pnt2d&        Center ,
                                   const gp_Pnt2d&        Point  ,
-                                  const Standard_Boolean Sense  ) 
+                                  const Standard_Boolean Sense  ) : GCE2d_Root() 
 {
   gce_MakeCirc2d C = gce_MakeCirc2d(Center,Point,Sense);
   TheError = C.Status();
index 77ef40cce013435912085b359fae970ac4911ee4..bcda4823f32c40b1637ac7dbfcef149e1ff0d206 100644 (file)
 #include <gp_Pnt2d.hxx>
 #include <StdFail_NotDone.hxx>
 
-GCE2d_MakeEllipse::GCE2d_MakeEllipse(const gp_Elips2d& E)
+GCE2d_MakeEllipse::GCE2d_MakeEllipse(const gp_Elips2d& E) : GCE2d_Root(), TheEllipse(new Geom2d_Ellipse(E))
 {
   TheError = gce_Done;
-  TheEllipse = new Geom2d_Ellipse(E);
+  
 }
 
 GCE2d_MakeEllipse::GCE2d_MakeEllipse(const gp_Ax22d&     Axis        ,
                                     const Standard_Real MajorRadius ,
-                                    const Standard_Real MinorRadius )
+                                    const Standard_Real MinorRadius ) : GCE2d_Root()
 {
   gce_MakeElips2d E = gce_MakeElips2d(Axis,MajorRadius,MinorRadius);
   TheError = E.Status();
@@ -44,7 +44,7 @@ GCE2d_MakeEllipse::GCE2d_MakeEllipse(const gp_Ax22d&     Axis        ,
 GCE2d_MakeEllipse::GCE2d_MakeEllipse(const gp_Ax2d&         MajorAxis   ,
                                     const Standard_Real    MajorRadius ,
                                     const Standard_Real    MinorRadius ,
-                                    const Standard_Boolean Sense       )
+                                    const Standard_Boolean Sense       ) : GCE2d_Root()
 {
   gce_MakeElips2d E = gce_MakeElips2d(MajorAxis,MajorRadius,MinorRadius,Sense);
   TheError = E.Status();
@@ -55,7 +55,7 @@ GCE2d_MakeEllipse::GCE2d_MakeEllipse(const gp_Ax2d&         MajorAxis   ,
 
 GCE2d_MakeEllipse::GCE2d_MakeEllipse(const gp_Pnt2d& S1     ,
                                     const gp_Pnt2d& S2     ,
-                                    const gp_Pnt2d& Center ) {
+                                    const gp_Pnt2d& Center ) : GCE2d_Root() {
   gce_MakeElips2d E = gce_MakeElips2d(S1,S2,Center);
   TheError = E.Status();
   if (TheError == gce_Done) {
index 5d9e94536eb87ccd45cf865450dc71544f37cc38..83c8e02c1a8bf7ca0d4d336fb69b19fde84000be 100644 (file)
 #include <gp_Pnt2d.hxx>
 #include <StdFail_NotDone.hxx>
 
-GCE2d_MakeHyperbola::GCE2d_MakeHyperbola(const gp_Hypr2d& H)
+GCE2d_MakeHyperbola::GCE2d_MakeHyperbola(const gp_Hypr2d& H) : GCE2d_Root(), TheHyperbola(new Geom2d_Hyperbola(H))
 {
   TheError = gce_Done;
-  TheHyperbola = new Geom2d_Hyperbola(H);
+  
 }
 
 GCE2d_MakeHyperbola::GCE2d_MakeHyperbola(const gp_Ax2d&      MajorAxis  ,
                                         const Standard_Real MajorRadius,
                                         const Standard_Real MinorRadius,
-                                        const Standard_Boolean Sense   )
+                                        const Standard_Boolean Sense   ) : GCE2d_Root()
 {
   gce_MakeHypr2d H = gce_MakeHypr2d(MajorAxis,MajorRadius,MinorRadius,Sense);
   TheError = H.Status();
@@ -44,7 +44,7 @@ GCE2d_MakeHyperbola::GCE2d_MakeHyperbola(const gp_Ax2d&      MajorAxis  ,
 
 GCE2d_MakeHyperbola::GCE2d_MakeHyperbola(const gp_Ax22d&     Axis       ,
                                         const Standard_Real MajorRadius,
-                                        const Standard_Real MinorRadius)
+                                        const Standard_Real MinorRadius) : GCE2d_Root()
 {
   gce_MakeHypr2d H = gce_MakeHypr2d(Axis,MajorRadius,MinorRadius);
   TheError = H.Status();
@@ -55,7 +55,7 @@ GCE2d_MakeHyperbola::GCE2d_MakeHyperbola(const gp_Ax22d&     Axis       ,
 
 GCE2d_MakeHyperbola::GCE2d_MakeHyperbola(const gp_Pnt2d& S1     ,
                                         const gp_Pnt2d& S2     ,
-                                        const gp_Pnt2d& Center ) {
+                                        const gp_Pnt2d& Center ) : GCE2d_Root() {
   gce_MakeHypr2d H = gce_MakeHypr2d(S1,S2,Center);
   TheError = H.Status();
   if (TheError == gce_Done) {
index c2987dde84dcfd034fad26913fb3f1ffcea89562..e9f7ac0e7d1bcc53c3a3853f6622ec11dc70d4f8 100644 (file)
 //=========================================================================
 //   Constructions of 2d geometrical elements from Geom2d.
 //=========================================================================
-GCE2d_MakeLine::GCE2d_MakeLine(const gp_Ax2d& A)
+GCE2d_MakeLine::GCE2d_MakeLine(const gp_Ax2d& A) : GCE2d_Root(), TheLine(new Geom2d_Line(A))
 {
   TheError = gce_Done;
-  TheLine = new Geom2d_Line(A);
+  
 }
 
-GCE2d_MakeLine::GCE2d_MakeLine(const gp_Lin2d& L)
+GCE2d_MakeLine::GCE2d_MakeLine(const gp_Lin2d& L) : GCE2d_Root(), TheLine(new Geom2d_Line(L))
 {
   TheError = gce_Done;
-  TheLine = new Geom2d_Line(L);
+  
 }
 
 GCE2d_MakeLine::GCE2d_MakeLine(const gp_Pnt2d& P,
-                              const gp_Dir2d& V)
+                              const gp_Dir2d& V) : GCE2d_Root(), TheLine(new Geom2d_Line(P,V))
 {
   TheError = gce_Done;
-  TheLine = new Geom2d_Line(P,V);
+  
 }
 
 GCE2d_MakeLine::GCE2d_MakeLine(const gp_Pnt2d& P1 ,
-                              const gp_Pnt2d& P2 ) 
+                              const gp_Pnt2d& P2 ) : GCE2d_Root() 
 {
   gce_MakeLin2d L(P1,P2);
   TheError = L.Status();
@@ -57,7 +57,7 @@ GCE2d_MakeLine::GCE2d_MakeLine(const gp_Pnt2d& P1 ,
 }
 
 GCE2d_MakeLine::GCE2d_MakeLine(const gp_Lin2d& Lin   ,
-                              const gp_Pnt2d& Point ) 
+                              const gp_Pnt2d& Point ) : GCE2d_Root() 
 {
   gce_MakeLin2d L(Lin,Point);
   TheError = L.Status();
@@ -67,7 +67,7 @@ GCE2d_MakeLine::GCE2d_MakeLine(const gp_Lin2d& Lin   ,
 }
 
 GCE2d_MakeLine::GCE2d_MakeLine(const gp_Lin2d&     Lin  ,
-                              const Standard_Real Dist ) 
+                              const Standard_Real Dist ) : GCE2d_Root() 
 {
   gce_MakeLin2d L(Lin,Dist);
   TheError = L.Status();
index 9fff3db3cf0b5b13f654bf43dc2b00349f1bdc8b..5f0d0bdc008e51e8cb6c199929868c297a5cd984 100644 (file)
@@ -25,8 +25,8 @@
 //=========================================================================
 //   Creation d une symetrie de Geom2d par rapport a un point.              +
 //=========================================================================
-GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Pnt2d&  Point ) {
-  TheMirror = new Geom2d_Transformation();
+GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Pnt2d&  Point ) : TheMirror(new Geom2d_Transformation()) {
+  
   TheMirror->SetMirror(Point);
 }
 
@@ -34,8 +34,8 @@ GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Pnt2d&  Point ) {
 //   Creation d une symetrie de Geom2d par rapport a une droite.            +
 //=========================================================================
 
-GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Ax2d&  Axis ) {
-  TheMirror = new Geom2d_Transformation();
+GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Ax2d&  Axis ) : TheMirror(new Geom2d_Transformation()) {
+  
   TheMirror->SetMirror(Axis);
 }
 
@@ -43,8 +43,8 @@ GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Ax2d&  Axis ) {
 //   Creation d une symetrie de Geom2d par rapport a une droite.            +
 //=========================================================================
 
-GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Lin2d&  Line ) {
-  TheMirror = new Geom2d_Transformation();
+GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Lin2d&  Line ) : TheMirror(new Geom2d_Transformation()) {
+  
   TheMirror->SetMirror(gp_Ax2d(Line.Location(),Line.Direction()));
 }
 
@@ -54,8 +54,8 @@ GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Lin2d&  Line ) {
 //=========================================================================
 
 GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Pnt2d&  Point ,
-                                  const gp_Dir2d&  Direc ) {
-  TheMirror = new Geom2d_Transformation();
+                                  const gp_Dir2d&  Direc ) : TheMirror(new Geom2d_Transformation()) {
+  
   TheMirror->SetMirror(gp_Ax2d(Point,Direc));
 }
 
index 54561a2a577b7c6ac847fa7010ebd1b207af5be5..0f1a120e419b8b72a273ba82062efb4b33f7bc71 100644 (file)
 #include <gp_Pnt2d.hxx>
 #include <StdFail_NotDone.hxx>
 
-GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Parab2d& Prb)
+GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Parab2d& Prb) : GCE2d_Root(), TheParabola(new Geom2d_Parabola(Prb))
 {
   TheError = gce_Done;
-  TheParabola = new Geom2d_Parabola(Prb);
+  
 }
 
 GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Ax2d&         MirrorAxis,
                                       const Standard_Real    Focal     ,
-                                      const Standard_Boolean Sense     )
+                                      const Standard_Boolean Sense     ) : GCE2d_Root()
 {
   if (Focal <0.0) { TheError = gce_NullFocusLength; }
   else {
@@ -42,7 +42,7 @@ GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Ax2d&         MirrorAxis,
 }
 
 GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Ax22d&     Axis ,
-                                      const Standard_Real Focal)
+                                      const Standard_Real Focal) : GCE2d_Root()
 {
   if (Focal <0.0) { TheError = gce_NullFocusLength; }
   else {
@@ -53,7 +53,7 @@ GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Ax22d&     Axis ,
 
 GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Ax2d&         D     ,
                                       const gp_Pnt2d&        F     ,
-                                      const Standard_Boolean Sense )
+                                      const Standard_Boolean Sense ) : GCE2d_Root()
 {
   TheError = gce_Done;
   gp_Parab2d para(D,F,Sense);
@@ -62,7 +62,7 @@ GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Ax2d&         D     ,
 
 
 GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Pnt2d& S1 ,
-                                      const gp_Pnt2d& O  ) {
+                                      const gp_Pnt2d& O  ) : GCE2d_Root() {
   gce_MakeParab2d P = gce_MakeParab2d(S1,O);
   TheError = P.Status();
   if (TheError == gce_Done) {
index a3faf5079c3329df3d7bfcd29b96ee7adbfc480c..cc4d3a0dd3507d0914599894d05583fee965c894 100644 (file)
@@ -24,8 +24,8 @@
 //   droite Line.                                                         +
 //=========================================================================
 GCE2d_MakeRotation::GCE2d_MakeRotation(const gp_Pnt2d&     Point  ,
-                                      const Standard_Real Angle ) {
-  TheRotation = new Geom2d_Transformation();
+                                      const Standard_Real Angle ) : TheRotation(new Geom2d_Transformation()) {
+  
   TheRotation->SetRotation(Point,Angle);
 }
 
index e00ab00c6beb968cb900f52ab431b566f290d063..7bf4547884ad5a5af2daf105588e732316d198b9 100644 (file)
@@ -23,8 +23,8 @@
 //   Creation d un homothetie de gp de centre Point et de rapport Scale.  +
 //=========================================================================
 GCE2d_MakeScale::GCE2d_MakeScale(const gp_Pnt2d&     Point ,
-                                const Standard_Real Scale ) {
-  TheScale = new Geom2d_Transformation();
+                                const Standard_Real Scale ) : TheScale(new Geom2d_Transformation()) {
+  
   TheScale->SetScale(Point,Scale);
 }
 
index 3f4832b95ba764937a3c5152bc561d54bab216b3..8822e8b8b4e91004810ca5f6e85d4ea48a41555d 100644 (file)
@@ -27,7 +27,7 @@
 
 GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Pnt2d& P1 ,
                                     const gp_Dir2d& V  ,
-                                    const gp_Pnt2d& P2 ) 
+                                    const gp_Pnt2d& P2 ) : GCE2d_Root() 
 {
   gp_Lin2d Line(P1,V);
   Standard_Real Ulast = ElCLib::Parameter(Line,P2);
@@ -40,7 +40,7 @@ GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Pnt2d& P1 ,
 }
 
 GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Pnt2d& P1 ,
-                                    const gp_Pnt2d& P2 ) 
+                                    const gp_Pnt2d& P2 ) : GCE2d_Root() 
 {
   Standard_Real dist = P1.Distance(P2);
   if (dist != 0.0) {
@@ -52,7 +52,7 @@ GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Pnt2d& P1 ,
 }
 GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Lin2d&     Line  ,
                                     const gp_Pnt2d&     Point ,
-                                    const Standard_Real U     ) 
+                                    const Standard_Real U     ) : GCE2d_Root() 
 {
   Standard_Real Ufirst = ElCLib::Parameter(Line,Point);
   Handle(Geom2d_Line) L = new Geom2d_Line(Line);
@@ -62,7 +62,7 @@ GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Lin2d&     Line  ,
 
 GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Lin2d& Line  ,
                                     const gp_Pnt2d& P1    ,
-                                    const gp_Pnt2d& P2    ) 
+                                    const gp_Pnt2d& P2    ) : GCE2d_Root() 
 {
   Standard_Real Ufirst = ElCLib::Parameter(Line,P1);
   Standard_Real Ulast = ElCLib::Parameter(Line,P2);
@@ -73,7 +73,7 @@ GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Lin2d& Line  ,
 
 GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Lin2d&     Line  ,
                                     const Standard_Real U1    ,
-                                    const Standard_Real U2    ) 
+                                    const Standard_Real U2    ) : GCE2d_Root() 
 {
   Handle(Geom2d_Line) L = new Geom2d_Line(Line);
   TheSegment = new Geom2d_TrimmedCurve(L,U1,U2,Standard_True);
index 277b64f2fc32903158978f4711bce47a521d1c1c..7317a43075f1befae80505af8e22f58f832285c1 100644 (file)
@@ -23,8 +23,8 @@
 //=========================================================================
 //   Creation d une translation 3d de Geom2d de vecteur de translation Vec
 //=========================================================================
-GCE2d_MakeTranslation::GCE2d_MakeTranslation(const gp_Vec2d&  Vec ) {
-  TheTranslation = new Geom2d_Transformation();
+GCE2d_MakeTranslation::GCE2d_MakeTranslation(const gp_Vec2d&  Vec ) : TheTranslation(new Geom2d_Transformation()) {
+  
   TheTranslation->SetTranslation(Vec);
 }
 
@@ -34,8 +34,8 @@ GCE2d_MakeTranslation::GCE2d_MakeTranslation(const gp_Vec2d&  Vec ) {
 //=========================================================================
 
 GCE2d_MakeTranslation::GCE2d_MakeTranslation(const gp_Pnt2d&  Point1 ,
-                                            const gp_Pnt2d&  Point2 ) {
-  TheTranslation = new Geom2d_Transformation();
+                                            const gp_Pnt2d&  Point2 ) : TheTranslation(new Geom2d_Transformation()) {
+  
   TheTranslation->SetTranslation(Point1,Point2);
 }
 
index e13d3095a9d3cef5d1a9d788539cc9d09fa20853..77c812671b6cbb2b52baca5a26a9d6c191a90749 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GCPnts_TangentialDeflection.hxx>
 
 #include <GCPnts_TCurveTypes.hxx>
@@ -46,7 +48,7 @@ namespace
 
   static void D0 (const Adaptor2d_Curve2d& C, const Standard_Real U, gp_Pnt& PP)
   {
-    Standard_Real X, Y;
+    Standard_Real X = NAN, Y = NAN;
     gp_Pnt2d P;
     C.D0 (U, P);
     P.Coord (X, Y);
@@ -56,7 +58,7 @@ namespace
   static void D2 (const Adaptor2d_Curve2d& C, const Standard_Real U,
                   gp_Pnt& PP, gp_Vec& VV1, gp_Vec& VV2)
   {
-    Standard_Real X, Y;
+    Standard_Real X = NAN, Y = NAN;
     gp_Pnt2d P;
     gp_Vec2d V1,V2;
     C.D2 (U, P, V1, V2);
@@ -88,7 +90,7 @@ namespace
                                          TColStd_Array1OfReal& theIntervs,
                                          const Standard_Integer thePreviousIdx)
   {
-    Standard_Integer anIdx;
+    Standard_Integer anIdx = 0;
     for(anIdx = thePreviousIdx; anIdx < theIntervs.Upper(); anIdx++)
     {
       if (theParam >= theIntervs(anIdx) && 
@@ -500,10 +502,10 @@ Standard_Real GCPnts_TangentialDeflection::ArcAngularStep(
 template<class TheCurve>
 void GCPnts_TangentialDeflection::PerformCurve (const TheCurve& theC)
 {
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   gp_XYZ V1, V2;
   gp_Pnt MiddlePoint, CurrentPoint, LastPoint;
-  Standard_Real Du, Dusave, MiddleU, L1, L2;
+  Standard_Real Du = NAN, Dusave = NAN, MiddleU = NAN, L1 = NAN, L2 = NAN;
 
   Standard_Real U1   = myFirstu;
   Standard_Real LTol = Precision::Confusion(); // protection longueur nulle
@@ -674,7 +676,7 @@ void GCPnts_TangentialDeflection::PerformCurve (const TheCurve& theC)
     }
 
     Standard_Real Coef = 0.0, ACoef = 0., FCoef = 0.;
-    Standard_Boolean Correction, TooLarge, TooSmall;
+    Standard_Boolean Correction = 0, TooLarge = 0, TooSmall = 0;
     TooLarge   = Standard_False;
     Correction = Standard_True;
     TooSmall = Standard_False;
index 25d2e939dd4e4e740d59e5109520e448f3b0c0d4..80a6c8590621892f91c570aed6597d830e9e297d 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <gp_Circ.hxx>
 #include <gp_Lin.hxx>
@@ -36,7 +38,7 @@ void GProp_CelGProps::Perform(const gp_Circ& C,
                              const Standard_Real U1,
                              const Standard_Real U2)
 {
-  Standard_Real X0,Y0,Z0,Xa1,Ya1,Za1,Xa2,Ya2,Za2,Xa3,Ya3,Za3;
+  Standard_Real X0 = NAN,Y0 = NAN,Z0 = NAN,Xa1 = NAN,Ya1 = NAN,Za1 = NAN,Xa2 = NAN,Ya2 = NAN,Za2 = NAN,Xa3 = NAN,Ya3 = NAN,Za3 = NAN;
   C.Location().Coord(X0,Y0,Z0);
   C.XAxis().Direction().Coord(Xa1,Ya1,Za1);
   C.YAxis().Direction().Coord(Xa2,Ya2,Za2);
@@ -92,7 +94,7 @@ void GProp_CelGProps::Perform(const gp_Lin& C,
   dim =Abs(U2-U1);
   gp_Pnt P2 = ElCLib::LineValue(U2,Pos);
   g.SetCoord((P1.X()+P2.X())/2.,(P1.Y()+P2.Y())/2.,(P1.Z()+P2.Z())/2.);
-  Standard_Real Vx,Vy,Vz,X0,Y0,Z0;
+  Standard_Real Vx = NAN,Vy = NAN,Vz = NAN,X0 = NAN,Y0 = NAN,Z0 = NAN;
   Pos.Direction().Coord(Vx,Vy,Vz);
   Pos.Location().Coord(X0,Y0,Z0);
   Standard_Real alfa1 = (Vz*Vz+Vy*Vy)/3.;
index 27752b18fcbf264592b094971ed88c1b4648cc73..c8388c203152bd74f9f83305e2c08ff1ca79ee6e 100644 (file)
@@ -146,7 +146,7 @@ Standard_Real GProp_GProps::RadiusOfGyration (const gp_Ax1& A) const {
 GProp_PrincipalProps GProp_GProps::PrincipalProperties () const {
   
   math_Matrix DiagMat (1, 3, 1, 3);
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   gp_Mat AxisInertia = MatrixOfInertia();
   for (j = 1; j <= 3; j++) {
     for (i = 1; i <= 3; i++) {
index 5bc27e66a749e66fd43ecbf844424e51a1ec0486..2cd0f9b998d6887cc79c211ad9b8933e73e60951 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Pln.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Vec.hxx>
@@ -27,19 +29,19 @@ GProp_PEquation::GProp_PEquation(const TColgp_Array1OfPnt& Pnts,
 {
   GProp_PGProps Pmat(Pnts);
   g = Pmat.CentreOfMass(); 
-  Standard_Real Xg,Yg,Zg;
+  Standard_Real Xg = NAN,Yg = NAN,Zg = NAN;
   g.Coord(Xg,Yg,Zg);
   GProp_PrincipalProps Pp = Pmat.PrincipalProperties();
   gp_Vec V1 = Pp.FirstAxisOfInertia();
-  Standard_Real Xv1,Yv1,Zv1;
+  Standard_Real Xv1 = NAN,Yv1 = NAN,Zv1 = NAN;
   V1.Coord(Xv1,Yv1,Zv1); 
   gp_Vec V2 = Pp.SecondAxisOfInertia(); 
-  Standard_Real Xv2,Yv2,Zv2;
+  Standard_Real Xv2 = NAN,Yv2 = NAN,Zv2 = NAN;
   V2.Coord(Xv2,Yv2,Zv2);
   gp_Vec V3 = Pp.ThirdAxisOfInertia(); 
-  Standard_Real Xv3,Yv3,Zv3;
+  Standard_Real Xv3 = NAN,Yv3 = NAN,Zv3 = NAN;
   V3.Coord(Xv3,Yv3,Zv3);
-  Standard_Real D,X,Y,Z;
+  Standard_Real D = NAN,X = NAN,Y = NAN,Z = NAN;
   Standard_Real Dmx1 = RealFirst();
   Standard_Real Dmn1 = RealLast();
   Standard_Real Dmx2 = RealFirst();
index 5045926e3cd01db685f21f7b9b7c31b7c979e3f4..3af8fa0d6544c0bfb1a7469d78c4fe47a3f9e2e1 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GProp_PGProps.hxx>
 #include <Standard_DimensionError.hxx>
 #include <Standard_DomainError.hxx>
@@ -37,7 +39,7 @@ GProp_PGProps::GProp_PGProps ()
 
 void GProp_PGProps::AddPoint (const Pnt& P)
 {
-  Standard_Real Xp, Yp, Zp;
+  Standard_Real Xp = NAN, Yp = NAN, Zp = NAN;
   P.Coord (Xp, Yp, Zp);
   Standard_Real Ixy = - Xp * Yp;
   Standard_Real Ixz = - Xp * Zp;
@@ -53,7 +55,7 @@ void GProp_PGProps::AddPoint (const Pnt& P)
     inertia = Mp;
   }
   else {
-    Standard_Real X, Y, Z;
+    Standard_Real X = NAN, Y = NAN, Z = NAN;
     g.Coord (X, Y, Z);
     X = X * dim + Xp;
     Y = Y * dim + Yp;
@@ -70,7 +72,7 @@ void GProp_PGProps::AddPoint (const Pnt& P)
 void GProp_PGProps::AddPoint (const gp_Pnt& P, const Standard_Real Density)
 {
   if (Density <= gp::Resolution())  throw Standard_DomainError();
-  Standard_Real Xp, Yp, Zp;
+  Standard_Real Xp = NAN, Yp = NAN, Zp = NAN;
   P.Coord (Xp, Yp, Zp);
   Standard_Real Ixy = - Xp * Yp;
   Standard_Real Ixz = - Xp * Zp;
@@ -85,7 +87,7 @@ void GProp_PGProps::AddPoint (const gp_Pnt& P, const Standard_Real Density)
     inertia = Mp * Density;
   }
   else {
-    Standard_Real X, Y, Z;
+    Standard_Real X = NAN, Y = NAN, Z = NAN;
     g.Coord (X, Y, Z);
     X = X * dim + Xp * Density;
     Y = Y * dim + Yp * Density;
index 57356e2afde481bbf10d86b8bcd1c5efb3c7cdee..37accfb79aa53c4dee8822d16641379b6c945473 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Cone.hxx>
 #include <gp_Cylinder.hxx>
 #include <gp_Pnt.hxx>
@@ -38,7 +40,7 @@ void GProp_SelGProps::Perform(const gp_Cylinder& S,
                              const Standard_Real         Z1,
                              const Standard_Real         Z2)
  {
-  Standard_Real X0,Y0,Z0,Xa1,Ya1,Za1,Xa2,Ya2,Za2,Xa3,Ya3,Za3;
+  Standard_Real X0 = NAN,Y0 = NAN,Z0 = NAN,Xa1 = NAN,Ya1 = NAN,Za1 = NAN,Xa2 = NAN,Ya2 = NAN,Za2 = NAN,Xa3 = NAN,Ya3 = NAN,Za3 = NAN;
   S.Location().Coord(X0,Y0,Z0);
   Standard_Real R = S.Radius();
   S.Position().XDirection().Coord(Xa1,Ya1,Za1);
@@ -103,7 +105,7 @@ void GProp_SelGProps::Perform (const gp_Cone& S,
                               const Standard_Real     Z2)
 
 {
-  Standard_Real X0,Y0,Z0,Xa1,Ya1,Za1,Xa2,Ya2,Za2,Xa3,Ya3,Za3;
+  Standard_Real X0 = NAN,Y0 = NAN,Z0 = NAN,Xa1 = NAN,Ya1 = NAN,Za1 = NAN,Xa2 = NAN,Ya2 = NAN,Za2 = NAN,Xa3 = NAN,Ya3 = NAN,Za3 = NAN;
   S.Location().Coord(X0,Y0,Z0);
   S.Position().XDirection().Coord(Xa1,Ya1,Za1);
   S.Position().YDirection().Coord(Xa2,Ya2,Za2);
@@ -183,7 +185,7 @@ void GProp_SelGProps::Perform(const gp_Sphere& S,
                              const Standard_Real       Alpha1,
                              const Standard_Real       Alpha2)
 {
-  Standard_Real X0,Y0,Z0,Xa1,Ya1,Za1,Xa2,Ya2,Za2,Xa3,Ya3,Za3;
+  Standard_Real X0 = NAN,Y0 = NAN,Z0 = NAN,Xa1 = NAN,Ya1 = NAN,Za1 = NAN,Xa2 = NAN,Ya2 = NAN,Za2 = NAN,Xa3 = NAN,Ya3 = NAN,Za3 = NAN;
   S.Location().Coord(X0,Y0,Z0);
   S.Position().XDirection().Coord(Xa1,Ya1,Za1);
   S.Position().YDirection().Coord(Xa2,Ya2,Za2);
@@ -262,7 +264,7 @@ void GProp_SelGProps::Perform (const gp_Torus& S,
                               const Standard_Real      Alpha1,
                               const Standard_Real      Alpha2)
 {
-  Standard_Real X0,Y0,Z0,Xa1,Ya1,Za1,Xa2,Ya2,Za2,Xa3,Ya3,Za3;
+  Standard_Real X0 = NAN,Y0 = NAN,Z0 = NAN,Xa1 = NAN,Ya1 = NAN,Za1 = NAN,Xa2 = NAN,Ya2 = NAN,Za2 = NAN,Xa3 = NAN,Ya3 = NAN,Za3 = NAN;
   S.Location().Coord(X0,Y0,Z0);
   S.XAxis().Direction().Coord(Xa1,Ya1,Za1);
   S.YAxis().Direction().Coord(Xa2,Ya2,Za2);
index efa59620966e363e61dd66b29ae4187ff0460c15..0e165b175d3ab4b792c989c57530f11f27869791 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Cone.hxx>
 #include <gp_Cylinder.hxx>
 #include <gp_Pnt.hxx>
@@ -83,7 +85,7 @@ void GProp_VelGProps::Perform(const gp_Cylinder&    S,
                              const Standard_Real Z1,
                              const Standard_Real Z2)
 {
-  Standard_Real X0,Y0,Z0,Xa1,Ya1,Za1,Xa2,Ya2,Za2,Xa3,Ya3,Za3;
+  Standard_Real X0 = NAN,Y0 = NAN,Z0 = NAN,Xa1 = NAN,Ya1 = NAN,Za1 = NAN,Xa2 = NAN,Ya2 = NAN,Za2 = NAN,Xa3 = NAN,Ya3 = NAN,Za3 = NAN;
   S.Location().Coord(X0,Y0,Z0);
   Standard_Real Rayon = S.Radius();
   S.Position().XDirection().Coord(Xa1,Ya1,Za1);
@@ -150,7 +152,7 @@ void GProp_VelGProps::Perform(const gp_Cone&    S,
                              const Standard_Real Z1,
                              const Standard_Real Z2)
 {
-  Standard_Real X0,Y0,Z0,Xa1,Ya1,Za1,Xa2,Ya2,Za2,Xa3,Ya3,Za3;
+  Standard_Real X0 = NAN,Y0 = NAN,Z0 = NAN,Xa1 = NAN,Ya1 = NAN,Za1 = NAN,Xa2 = NAN,Ya2 = NAN,Za2 = NAN,Xa3 = NAN,Ya3 = NAN,Za3 = NAN;
   S.Location().Coord(X0,Y0,Z0);
   S.Position().XDirection().Coord(Xa1,Ya1,Za1);
   S.Position().YDirection().Coord(Xa2,Ya2,Za2);
@@ -230,7 +232,7 @@ void GProp_VelGProps::Perform(const gp_Sphere&    S,
                              const Standard_Real Alpha1,
                              const Standard_Real Alpha2)
 {
-  Standard_Real X0,Y0,Z0,Xa1,Ya1,Za1,Xa2,Ya2,Za2,Xa3,Ya3,Za3;
+  Standard_Real X0 = NAN,Y0 = NAN,Z0 = NAN,Xa1 = NAN,Ya1 = NAN,Za1 = NAN,Xa2 = NAN,Ya2 = NAN,Za2 = NAN,Xa3 = NAN,Ya3 = NAN,Za3 = NAN;
   S.Location().Coord(X0,Y0,Z0);
   S.Position().XDirection().Coord(Xa1,Ya1,Za1);
   S.Position().YDirection().Coord(Xa2,Ya2,Za2);
@@ -310,7 +312,7 @@ void GProp_VelGProps::Perform(const gp_Torus&    S,
                              const Standard_Real Alpha1,
                              const Standard_Real Alpha2)
 {
-  Standard_Real X0,Y0,Z0,Xa1,Ya1,Za1,Xa2,Ya2,Za2,Xa3,Ya3,Za3;
+  Standard_Real X0 = NAN,Y0 = NAN,Z0 = NAN,Xa1 = NAN,Ya1 = NAN,Za1 = NAN,Xa2 = NAN,Ya2 = NAN,Za2 = NAN,Xa3 = NAN,Ya3 = NAN,Za3 = NAN;
   S.Location().Coord(X0,Y0,Z0);
   S.Position().XDirection().Coord(Xa1,Ya1,Za1);
   S.Position().YDirection().Coord(Xa2,Ya2,Za2);
index bb64297cc6fc51c424967b87528e7826ecd47e14..2702609120024281b5356a0b89256504a211536e 100644 (file)
@@ -49,7 +49,7 @@ GccAna_Circ2d2TanOn::
                         const GccEnt_QualifiedCirc&  Qualified2 , 
                         const gp_Lin2d&              OnLine     ,
                         const Standard_Real          Tolerance  ):
-   cirsol(1,4)   ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)   ,
    qualifier1(1,4),
    qualifier2(1,4) ,
    TheSame1(1,4) ,
@@ -66,8 +66,8 @@ GccAna_Circ2d2TanOn::
 
   TheSame1.Init(0);
   TheSame2.Init(0);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   Standard_Integer nbsol = 0;
   Standard_Real Tol = Abs(Tolerance);
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
index cd00d7991badf267ccef28474dffe6ea582f4c4f..282a5e721c122611068764c167a8629ed8c194de 100644 (file)
@@ -50,7 +50,7 @@ GccAna_Circ2d2TanOn::
                         const GccEnt_QualifiedLin&  Qualified2  , 
                         const gp_Lin2d&             OnLine      ,
                         const Standard_Real         Tolerance   ):
-   cirsol(1,4)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)     ,
    qualifier1(1,4) ,
    qualifier2(1,4),
    TheSame1(1,4)   ,
@@ -67,8 +67,8 @@ GccAna_Circ2d2TanOn::
 
    TheSame1.Init(0);
    TheSame2.Init(0);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
        !(Qualified2.IsEnclosed() ||
index 8301c13285cfbd4c21333263e15d5b0d49dbdd71..962cbb046072fd545d2578afda9d2514b2196a3d 100644 (file)
@@ -50,7 +50,7 @@ GccAna_Circ2d2TanOn::
                         const gp_Pnt2d&             Point2     ,
                         const gp_Circ2d&            OnCirc     ,
                         const Standard_Real         Tolerance  ):
-   cirsol(1,4)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)     ,
    qualifier1(1,4) ,
    qualifier2(1,4) ,
    TheSame1(1,4) ,
@@ -67,8 +67,8 @@ GccAna_Circ2d2TanOn::
 
   TheSame1.Init(0);
   TheSame2.Init(0);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() ||
        Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
   throw GccEnt_BadQualifier();
index af13ab907599eb5beb613c4ec7e7bc77c8641171..8cb6fd9efd121a9c48d17d6fd322a34faec86a99 100644 (file)
@@ -49,7 +49,7 @@ GccAna_Circ2d2TanOn::
                         const gp_Pnt2d&         Point2     ,
                         const gp_Circ2d&        OnCirc     ,
                         const Standard_Real     Tolerance  ):
-   cirsol(1,2)      ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,2)      ,
    qualifier1(1,2)  ,
    qualifier2(1,2)  ,
    TheSame1(1,2)  ,
@@ -65,8 +65,8 @@ GccAna_Circ2d2TanOn::
 {
   TheSame1.Init(0);
   TheSame2.Init(0);  
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   gp_Dir2d dirx(1.,0.);
   Standard_Real Tol = Abs(Tolerance);
   Standard_Real dist   = Point1.Distance(Point2);
index 1b108a64799aae9e8aa59386d870e7346e7db60b..1089dac0498f5aa578e186d46aa1e283398f5ca1 100644 (file)
@@ -33,7 +33,7 @@ GccAna_Circ2d2TanOn::
                         const GccEnt_QualifiedLin&  Qualified2 , 
                         const gp_Lin2d&             OnLine     ,
                         const Standard_Real         Tolerance  ):
-   cirsol(1,2)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,2)     ,
    qualifier1(1,2) ,
    qualifier2(1,2) ,
    TheSame1(1,2)   ,
@@ -50,8 +50,8 @@ GccAna_Circ2d2TanOn::
   // initialisations
   TheSame1.Init(0);
   TheSame2.Init(0);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
 
   if (!(Qualified1.IsEnclosed() ||
        Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
index b3c3b3f6e3d9fe40bb8ff17da331fafebd92328a..8a5542f91f2675ce1beb5b1a3efe1436a46f5408 100644 (file)
@@ -51,7 +51,7 @@ GccAna_Circ2d2TanOn::
                         const gp_Pnt2d&             Point2     ,
                         const gp_Lin2d&             OnLine     ,
                         const Standard_Real         Tolerance  ):
-   cirsol(1,4),
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4),
    qualifier1(1,4) ,
    qualifier2(1,4) ,
    TheSame1(1,4) ,
@@ -68,8 +68,8 @@ GccAna_Circ2d2TanOn::
   TheSame1.Init(0);
   TheSame2.Init(0);
   Standard_Real Tol = Abs(Tolerance);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
        Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
     throw GccEnt_BadQualifier();
index cfb375ceaf07bc06bd3c7575f2e71c491d056e4b..34365c8e726aafa4d984135c65db6ff09fb525a0 100644 (file)
@@ -54,7 +54,7 @@ GccAna_Circ2d2TanOn::
                         const gp_Pnt2d&             Point2     ,
                         const gp_Lin2d&             OnLine     ,
                         const Standard_Real         Tolerance  ):
-   cirsol(1,4)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)     ,
    qualifier1(1,4) ,
    qualifier2(1,4),
    TheSame1(1,4) ,
@@ -70,8 +70,8 @@ GccAna_Circ2d2TanOn::
 {
   TheSame1.Init(0);
   TheSame2.Init(0);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() ||
        Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
     throw GccEnt_BadQualifier();
index ce0b51c26e3f5faafaa89e9d35e17294b3e1073f..9c4e3802444cd7d5e7e370e8a32e8dcb74c69049 100644 (file)
@@ -42,7 +42,7 @@ GccAna_Circ2d2TanOn::
                         const gp_Pnt2d&      Point2     ,
                         const gp_Lin2d&      OnLine     ,
                         const Standard_Real  Tolerance  ):
-   cirsol(1,2)      ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,2)      ,
    qualifier1(1,2)  ,
    qualifier2(1,2),
    TheSame1(1,2)  ,
@@ -58,8 +58,8 @@ GccAna_Circ2d2TanOn::
 {
   TheSame1.Init(0);
   TheSame2.Init(0);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   
   gp_Dir2d dirx(1.,0.);
   Standard_Real dist   = Point1.Distance(Point2);
index 15f05f1a2b2536a3df6fda99ef7e573a85c2e5e5..aa2c2c2633c9f7dc8a4ddf7802fff211f1b76590 100644 (file)
@@ -49,7 +49,7 @@ GccAna_Circ2d2TanOn::
                         const GccEnt_QualifiedCirc& Qualified2 ,
                         const gp_Circ2d&            OnCirc     ,
                         const Standard_Real         Tolerance  ):
-   cirsol(1,8)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,8)     ,
    qualifier1(1,8) ,
    qualifier2(1,8) ,
    TheSame1(1,8) ,
@@ -65,8 +65,8 @@ GccAna_Circ2d2TanOn::
 {
   TheSame1.Init(0);
   TheSame2.Init(0);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
        Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
       !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
index 1aebb7f3c43e364039e9b0dc50323adfa1728d60..5140db4627320289f3457b56dea8b473fa7ffd06 100644 (file)
@@ -38,7 +38,7 @@ GccAna_Circ2d2TanOn::
                         const GccEnt_QualifiedLin&  Qualified2 ,
                         const gp_Circ2d&            OnCirc     ,
                         const Standard_Real         Tolerance  ):
-   cirsol(1,4)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)     ,
    qualifier1(1,4) ,
    qualifier2(1,4),
    TheSame1(1,4)   ,
@@ -54,8 +54,8 @@ GccAna_Circ2d2TanOn::
 {
   TheSame1.Init(0);
   TheSame2.Init(0);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
        Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
       !(Qualified2.IsEnclosed() ||
index d0202cd17c131adff7438b8d02d488133a16675c..26ff3f62c1b4542c12f39a1816539ca3d97c06ca 100644 (file)
@@ -44,7 +44,7 @@ GccAna_Circ2d2TanOn::
                         const gp_Pnt2d&             Point2     ,
                         const gp_Circ2d&            OnCirc     ,
                         const Standard_Real         Tolerance  ):
-   cirsol(1,4)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)     ,
    qualifier1(1,4) ,
    qualifier2(1,4),
    TheSame1(1,4)   ,
@@ -60,8 +60,8 @@ GccAna_Circ2d2TanOn::
 {
   TheSame1.Init(0);
   TheSame2.Init(0);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
        Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
     throw GccEnt_BadQualifier();
index f6fbd8e6943304bbac698d773494028085c6447b..183e8f40ed13a340624dc926a69ee2ba4bf1e0a3 100644 (file)
@@ -34,7 +34,7 @@ GccAna_Circ2d2TanOn::
                         const GccEnt_QualifiedLin&  Qualified2 ,
                         const gp_Circ2d&            OnCirc     ,
                         const Standard_Real                     ):
-   cirsol(1,4)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)     ,
    qualifier1(1,4) ,
    qualifier2(1,4),
    TheSame1(1,4)   ,
@@ -50,8 +50,8 @@ GccAna_Circ2d2TanOn::
 {
   TheSame1.Init(0);
   TheSame2.Init(0);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   
   gp_Dir2d dirx(1.,0.);
   if (!(Qualified1.IsEnclosed() ||
index 5ae0bbf17248721af43e161d04e8905521a12913..6efd104d506cce70efe635704aea253db8310400 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <GccAna_Circ2d2TanRad.hxx>
 #include <GccEnt_BadQualifier.hxx>
@@ -45,11 +47,11 @@ GccAna_Circ2d2TanRad::
                          const GccEnt_QualifiedCirc& Qualified2 ,
                          const Standard_Real         Radius     ,
                          const Standard_Real         Tolerance  ):
-   qualifier1(1,8) ,
+   WellDone(Standard_False), qualifier1(1,8) ,
    qualifier2(1,8),
    TheSame1(1,8)   ,
    TheSame2(1,8)   ,
-   cirsol(1,8)     ,
+   NbrSol(0), cirsol(1,8)     ,
    pnttg1sol(1,8)  ,
    pnttg2sol(1,8)  ,
    par1sol(1,8)    ,
@@ -60,8 +62,8 @@ GccAna_Circ2d2TanRad::
 
    Standard_Real Tol = Abs(Tolerance);
    gp_Dir2d dirx(1.,0.);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
        !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -76,8 +78,8 @@ GccAna_Circ2d2TanRad::
    Standard_Real R2 = C2.Radius();
    Standard_Real rbid = 0.;
    Standard_Integer signe=0;
-   Standard_Real R3;
-   Standard_Real dist;
+   Standard_Real R3 = NAN;
+   Standard_Real dist = NAN;
    TColgp_Array1OfCirc2d C(1,8);
    C(1) = gp_Circ2d(C1);
    C(2) = gp_Circ2d(C2);
index 2efc85ccf713d9cb516258bb6d9bfdff06dcd7c7..423d49a05c72261b670e9aafa78900ea33799707 100644 (file)
@@ -46,11 +46,11 @@ GccAna_Circ2d2TanRad::
                          const GccEnt_QualifiedLin&  Qualified2 ,
                          const Standard_Real         Radius     ,
                          const Standard_Real         Tolerance  ):
-   qualifier1(1,8) ,
+   WellDone(Standard_False), qualifier1(1,8) ,
    qualifier2(1,8),
    TheSame1(1,8)   ,
    TheSame2(1,8)   ,
-   cirsol(1,8)     ,
+   NbrSol(0), cirsol(1,8)     ,
    pnttg1sol(1,8)  ,
    pnttg2sol(1,8)  ,
    par1sol(1,8)    ,
@@ -61,8 +61,8 @@ GccAna_Circ2d2TanRad::
 
   Standard_Real Tol = Abs(Tolerance);
   gp_Dir2d dirx(1.,0.);
-  NbrSol = 0;
-  WellDone = Standard_False;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
        Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
       !(Qualified2.IsEnclosed() || Qualified2.IsOutside() || 
@@ -70,7 +70,7 @@ GccAna_Circ2d2TanRad::
     throw GccEnt_BadQualifier();
     return;
   }
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for ( i = 1 ; i <= 8 ; i++) { TheSame2(i) = 0; }
   Standard_Integer ncote1=0;
   Standard_Integer ncote2=0;
index 58baf5735c8d06a6f826355043ecc3510f341e2e..1c4c68884b64ed33b26bc2d2a0549d40256ab30f 100644 (file)
@@ -45,11 +45,11 @@ GccAna_Circ2d2TanRad::
                          const gp_Pnt2d&             Point2     ,
                          const Standard_Real         Radius     ,
                          const Standard_Real         Tolerance  ):
-   qualifier1(1,4) ,
+   WellDone(Standard_False), qualifier1(1,4) ,
    qualifier2(1,4),
    TheSame1(1,4)   ,
    TheSame2(1,4)   ,
-   cirsol(1,4)     ,
+   NbrSol(0), cirsol(1,4)     ,
    pnttg1sol(1,4)  ,
    pnttg2sol(1,4)  ,
    par1sol(1,4)    ,
@@ -60,14 +60,14 @@ GccAna_Circ2d2TanRad::
      
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real Tol = Abs(Tolerance);
-  NbrSol = 0;
-  WellDone = Standard_False;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
        Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
     throw GccEnt_BadQualifier();
     return;
   }
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for ( i = 1 ; i <= 4 ; i++) {
     TheSame1(i) = 0;
     TheSame2(i) = 0;
index 86adbf9a99a021ec1aac2141b9e424f0e9f36adf..cde55828c994212a1aff964e4bc607672ec00837 100644 (file)
@@ -48,11 +48,11 @@ GccAna_Circ2d2TanRad::
                          const gp_Pnt2d&             Point2     ,
                          const Standard_Real         Radius     ,
                          const Standard_Real         Tolerance  ):
-   qualifier1(1,2) ,
+   WellDone(Standard_False), qualifier1(1,2) ,
    qualifier2(1,2),
    TheSame1(1,2)   ,
    TheSame2(1,2)   ,
-   cirsol(1,2)     ,
+   NbrSol(0), cirsol(1,2)     ,
    pnttg1sol(1,2)  ,
    pnttg2sol(1,2)  ,
    par1sol(1,2)    ,
@@ -63,8 +63,8 @@ GccAna_Circ2d2TanRad::
 
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real Tol = Abs(Tolerance);
-  NbrSol = 0;
-  WellDone = Standard_False;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsOutside() || 
        Qualified1.IsUnqualified())) {
     throw GccEnt_BadQualifier();
index 7457bd1e23637f612b910cc8c1ac08cd3ed87e0b..b17b4c95b454c512b1c1afe18b9406eef793a57a 100644 (file)
@@ -45,11 +45,11 @@ GccAna_Circ2d2TanRad::
                          const GccEnt_QualifiedLin&  Qualified2 ,
                          const Standard_Real         Radius     ,
                          const Standard_Real                    ):
-   qualifier1(1,4) ,
+   WellDone(Standard_False), qualifier1(1,4) ,
    qualifier2(1,4),
    TheSame1(1,4)   ,
    TheSame2(1,4)   ,
-   cirsol(1,4)     ,
+   NbrSol(0), cirsol(1,4)     ,
    pnttg1sol(1,4)  ,
    pnttg2sol(1,4)  ,
    par1sol(1,4)    ,
@@ -63,8 +63,8 @@ GccAna_Circ2d2TanRad::
   TColStd_Array1OfReal cote2(1,2);
   Standard_Integer nbrcote1=0;
   Standard_Integer nbrcote2=0;
-  NbrSol = 0;
-  WellDone = Standard_False;
+  
+  
   if (!(Qualified1.IsEnclosed() || 
        Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
       !(Qualified2.IsEnclosed() ||
index a3e4c2faac61f5df375b23106b6639569cc3469f..a5311c9175c893e60f8de02c2ecaaea4bbaad370 100644 (file)
@@ -36,11 +36,11 @@ GccAna_Circ2d2TanRad::
                          const gp_Pnt2d&             Point2     ,
                          const Standard_Real         Radius     ,
                         const Standard_Real         Tolerance  ):
-   qualifier1(1,2) ,
+   WellDone(Standard_False), qualifier1(1,2) ,
    qualifier2(1,2),
    TheSame1(1,2)   ,
    TheSame2(1,2)   ,
-   cirsol(1,2)     ,
+   NbrSol(0), cirsol(1,2)     ,
    pnttg1sol(1,2)  ,
    pnttg2sol(1,2)  ,
    par1sol(1,2)    ,
@@ -51,8 +51,8 @@ GccAna_Circ2d2TanRad::
 
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real Tol = Abs(Tolerance);
-  NbrSol = 0;
-  WellDone = Standard_False;
+  
+  
   if (Radius < 0.0) { throw Standard_NegativeValue(); }
   else {
     if (Point1.Distance(Point2)-Radius*2.0 > Tol) { WellDone = Standard_True; }
index b5aee4627ab9682b514870f500373e5d054423fc..eba9de02faf708ac9d83f21bfac59e3c8432677b 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <GccAna_Circ2d3Tan.hxx>
 #include <GccEnt_BadQualifier.hxx>
@@ -39,7 +41,7 @@ GccAna_Circ2d3Tan::
 //   Initialization of fields.                                           +
 //=========================================================================
 
-  cirsol(1,16)   ,
+  WellDone(Standard_False), NbrSol(0), cirsol(1,16)   ,
   qualifier1(1,16),
   qualifier2(1,16),
   qualifier3(1,16),
@@ -59,8 +61,8 @@ GccAna_Circ2d3Tan::
 
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real Tol = Abs(Tolerance);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
        Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
       !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -130,14 +132,14 @@ GccAna_Circ2d3Tan::
   TColStd_Array1OfReal A3(1, 8), B3(1, 8), C3(1, 8), D3(1, 8), E3(1, 8), F3(1, 8); 
   TColStd_Array1OfReal Beta2(1, 8), Gamma2(1, 8), Delta2(1, 8);
   TColStd_Array1OfReal Beta3(1, 8), Gamma3(1, 8), Delta3(1, 8);
-  Standard_Real a2, b2, c2, d2, e2, f2;
-  Standard_Real a3, b3, c3, d3, e3, f3;
-  Standard_Real A, B, C, D, E;
-  Standard_Boolean IsSame;
-  Standard_Boolean IsTouch;
-  Standard_Integer FirstIndex;
-
-  Standard_Integer i, j, k, l;
+  Standard_Real a2 = NAN, b2 = NAN, c2 = NAN, d2 = NAN, e2 = NAN, f2 = NAN;
+  Standard_Real a3 = NAN, b3 = NAN, c3 = NAN, d3 = NAN, e3 = NAN, f3 = NAN;
+  Standard_Real A = NAN, B = NAN, C = NAN, D = NAN, E = NAN;
+  Standard_Boolean IsSame = 0;
+  Standard_Boolean IsTouch = 0;
+  Standard_Integer FirstIndex = 0;
+
+  Standard_Integer i = 0, j = 0, k = 0, l = 0;
   TColStd_Array1OfReal xSol(1, 64);
   TColStd_Array1OfReal ySol(1, 64);
   TColStd_Array1OfReal rSol(1, 16);
@@ -146,12 +148,12 @@ GccAna_Circ2d3Tan::
   TColStd_Array1OfReal ySol1(1, 32);
   TColStd_Array1OfReal rSol1(1, 32);
   TColStd_Array1OfInteger FirstSol1(1, 9);
-  Standard_Real x, y, r;
-  Standard_Real m, n, t, s, v;
-  Standard_Real p, q;
-  Standard_Real Epsilon;
+  Standard_Real x = NAN, y = NAN, r = NAN;
+  Standard_Real m = NAN, n = NAN, t = NAN, s = NAN, v = NAN;
+  Standard_Real p = NAN, q = NAN;
+  Standard_Real Epsilon = NAN;
 
-  Standard_Integer CurSol;
+  Standard_Integer CurSol = 0;
 
 //*********************************************************************************************
 //*********************************************************************************************
index a335d2639c1e0947b61d3fb287db1ad5694978eb..cfe70ccb9d9090297c0dfe84be6f115215bf7c2b 100644 (file)
@@ -44,7 +44,7 @@ GccAna_Circ2d3Tan::
 //   Initialization of fields.                                           +
 //=========================================================================
 
-   cirsol(1,16)     , 
+   WellDone(Standard_False), NbrSol(0), cirsol(1,16)     , 
    qualifier1(1,16) ,
    qualifier2(1,16) ,
    qualifier3(1,16),
@@ -64,8 +64,8 @@ GccAna_Circ2d3Tan::
 
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real Tol = Abs(Tolerance);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
        Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
       !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
index efb7cdb5da6246dd546a2190f9e2dca43e961140..33e496674fee215b585b95fb595399b5e425a3f9 100644 (file)
@@ -43,7 +43,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan (const GccEnt_QualifiedCirc& Qualified1 ,
 //   Initialisation of fields.                                           +
 //=========================================================================
 
-:cirsol(1,8)    ,
+:WellDone(Standard_False), NbrSol(0), cirsol(1,8)    ,
 qualifier1(1,8) ,
 qualifier2(1,8) ,
 qualifier3(1,8) ,
@@ -65,8 +65,8 @@ pararg3(1,8)
   
   gp_Dir2d dirx(1.0,0.0);
    Standard_Real Tol = Abs(Tolerance);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
        !(Qualified2.IsEnclosed() || 
index 612f395ce31fbb9b1621b0d81275194092c80ad9..57667848b5c52222bb8cae8b85c82d236f74794f 100644 (file)
@@ -46,7 +46,7 @@ GccAna_Circ2d3Tan::
 //   Initialization of fields.                                           +
 //=========================================================================
 
-   cirsol(1,4)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)     ,
    qualifier1(1,4) ,
    qualifier2(1,4) ,
    qualifier3(1,4) ,
@@ -68,8 +68,8 @@ GccAna_Circ2d3Tan::
    TheSame2.Init(0);
    TheSame3.Init(0);
    gp_Dir2d dirx(1.0,0.0);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() ||
         Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
        !(Qualified2.IsEnclosed() ||
index 1a94950251da6dd2844223a2600b3694d62c29e2..8ce09e84d7077528ff6cf63434a3f6eeeba290d2 100644 (file)
@@ -46,7 +46,7 @@ GccAna_Circ2d3Tan::
 //   Initialization of fields.                                           +
 //=========================================================================
 
-   cirsol(1,MaxSol)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,MaxSol)     ,
    qualifier1(1,MaxSol) ,
    qualifier2(1,MaxSol) ,
    qualifier3(1,MaxSol) ,
@@ -66,8 +66,8 @@ GccAna_Circ2d3Tan::
 
    gp_Dir2d dirx(1.0,0.0);
    Standard_Real Tol = Abs(Tolerance);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
        !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -334,7 +334,7 @@ GccAna_Circ2d3Tan::
 
    // Debug to create the point on the solution circles.
 
-   Standard_Integer kk ;
+   Standard_Integer kk = 0 ;
    for ( kk = 1; kk <= NbrSol; kk++) {
      gp_Circ2d CC = cirsol(kk);
      Standard_Real NR = CC.Location().Distance(Point3);
index 35d1c4bb82b4751da226b52c53a5dd41318f8a02..116a3d421e46a35e1173826d1fd011378598c508 100644 (file)
@@ -45,7 +45,7 @@ GccAna_Circ2d3Tan::
 //   Initialization of fields.                                           +
 //=========================================================================
 
-   cirsol(1,4)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)     ,
    qualifier1(1,4) ,
    qualifier2(1,4) ,
    qualifier3(1,4) ,
@@ -66,8 +66,8 @@ GccAna_Circ2d3Tan::
    gp_Dir2d dirx(1.0,0.0);
    Standard_Real Tol = Abs(Tolerance);
    Standard_Real MaxRad = 1e10, MinRad = 1e-6;
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
        !(Qualified2.IsEnclosed() ||
index 2e8b6287838d5f1ae438582f8521d77f5b3ecd93..b24ecc123a1a88dd23bbc220fbb6b284e2c89542 100644 (file)
@@ -38,7 +38,7 @@ GccAna_Circ2d3Tan::
                       const gp_Pnt2d&             Point3     ,
                      const Standard_Real         Tolerance  ):
 
-   cirsol(1,2)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,2)     ,
    qualifier1(1,2) ,
    qualifier2(1,2) ,
    qualifier3(1,2) ,
@@ -57,9 +57,9 @@ GccAna_Circ2d3Tan::
 {
 
    gp_Dir2d dirx(1.0,0.0);
-   WellDone = Standard_False;
+   
    Standard_Real Tol = Abs(Tolerance);
-   NbrSol = 0;
+   
    if (!(Qualified1.IsEnclosed() ||
         Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
        !(Qualified2.IsEnclosed() ||
index f1c443e8ba9dd3bbacfe95279bccc6be92e304f5..d28219b46860e27d6c43c8cba5c0d1aa8bde6c28 100644 (file)
@@ -40,7 +40,7 @@ GccAna_Circ2d3Tan::
                       const gp_Pnt2d&             Point3     ,
                      const Standard_Real         Tolerance  ):
 
-   cirsol(1,2)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,2)     ,
    qualifier1(1,2) ,
    qualifier2(1,2) ,
    qualifier3(1,2) ,
@@ -60,8 +60,8 @@ GccAna_Circ2d3Tan::
 
    gp_Dir2d dirx(1.0,0.0);
    Standard_Real Tol = Abs(Tolerance);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
index 3028077dad180a2e0b5e488e1106790dec6123c8..b6c271e0b1e6374e5a8e4061447325cdb8ec1672 100644 (file)
@@ -39,7 +39,7 @@ GccAna_Circ2d3Tan::
                       const gp_Pnt2d&            Point3    ,
                      const Standard_Real        Tolerance ):
 
-   cirsol(1,2)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,2)     ,
    qualifier1(1,2) ,
    qualifier2(1,2) ,
    qualifier3(1,2) ,
@@ -57,10 +57,10 @@ GccAna_Circ2d3Tan::
    pararg3(1,2)    
 {
 
-   WellDone = Standard_False;
+   
    Standard_Real Tol = Abs(Tolerance);
    gp_Dir2d dirx(1.0,0.0);
-   NbrSol = 0;
+   
    if (!(Qualified1.IsEnclosed() ||
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
index 04da6202d2495c88e8687c40f65a539ff05d6f95..4a7f68df6a5721f151f665e8a491cd87fc2121bd 100644 (file)
@@ -48,7 +48,7 @@ GccAna_Circ2d3Tan::
 //   Initialization of fields.                                           +
 //=========================================================================
 
-   cirsol(1,1)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,1)     ,
    qualifier1(1,1) ,
    qualifier2(1,1) ,
    qualifier3(1,1) ,
@@ -67,8 +67,8 @@ GccAna_Circ2d3Tan::
 {
 
    gp_Dir2d dirx(1.0,0.0);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
 
 //=========================================================================
 //   Processing.                                                          +
index 6b44e754d0e6520333b47d5a4237e3e8cb5297b7..b955565cb6b615ae55d012ccadee5f997201145d 100644 (file)
@@ -18,6 +18,8 @@
 //   CREATION of the BISSECTICE between two CIRCLES.                        +
 //=========================================================================
 
+#include <math.h>
+
 #include <GccAna_Circ2dBisec.hxx>
 #include <GccEnt_BadQualifier.hxx>
 #include <GccInt_BCirc.hxx>
@@ -36,7 +38,7 @@
 //=========================================================================
 GccAna_Circ2dBisec::
    GccAna_Circ2dBisec (const gp_Circ2d& Circ1    ,
-                      const gp_Circ2d& Circ2    ) {
+                      const gp_Circ2d& Circ2    ) : WellDone(Standard_False) {
 
 //=========================================================================
 //  Initialization of fields :                                            +
@@ -50,7 +52,7 @@ GccAna_Circ2dBisec::
 //            - WellDone (Boolean showing success or failure of the algo) +
 //=========================================================================
 
-   WellDone = Standard_False;
+   
    Standard_Real Tol=Precision::Confusion();
 
    Standard_Real R1 = Circ1.Radius();
@@ -155,7 +157,7 @@ Handle(GccInt_Bisec) GccAna_Circ2dBisec::
      Standard_Real R2 = circle2.Radius();
 
      if ((NbrSol == 1) && (intersection == 0)) {
-       Standard_Real R;
+       Standard_Real R = NAN;
        if (Index == 1) 
         R = (R1+R2)/2.0;
        else 
index 7930dd2595b9b1f5aceebd49c9ace1590fbce44e..bce3bfcec779543c820f40ca4d492a497cc4bcd8 100644 (file)
@@ -16,6 +16,8 @@
 //    Creation of a circle tangent to an element and having center in a point    +
 //================================================================================
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <GccAna_Circ2dTanCen.hxx>
 #include <GccEnt_BadQualifier.hxx>
@@ -48,7 +50,7 @@ GccAna_Circ2dTanCen::
 //   Initialization of fields.                                          +
 //========================================================================
 
-   cirsol(1,2)   ,
+   NbrSol(0), WellDone(Standard_False), cirsol(1,2)   ,
    qualifier1(1,2) ,
    TheSame1(1,2) ,
    pnttg1sol(1,2),
@@ -56,9 +58,9 @@ GccAna_Circ2dTanCen::
    pararg1(1,2)
 {
 
-   NbrSol = 0;
+   
    Standard_Real Radius = 0.0;
-   WellDone = Standard_False;
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
@@ -69,7 +71,7 @@ GccAna_Circ2dTanCen::
    gp_Circ2d C1 = Qualified1.Qualified();
    Standard_Real R1 = C1.Radius();
    gp_Pnt2d center1(C1.Location());
-   Standard_Real dist;
+   Standard_Real dist = NAN;
    Standard_Integer signe = 0;
    Standard_Integer signe1 = 0;
 
@@ -221,7 +223,7 @@ GccAna_Circ2dTanCen::
 //   Initialisation of fields.                                           +
 //=========================================================================
 
-   cirsol(1,1)   ,
+   NbrSol(1), WellDone(Standard_True), cirsol(1,1)   ,
    qualifier1(1,1),
    TheSame1(1,1) ,
    pnttg1sol(1,1),
@@ -238,8 +240,8 @@ GccAna_Circ2dTanCen::
    pnttg1sol(1) = Point1;
    par1sol(1)=ElCLib::Parameter(cirsol(1),pnttg1sol(1));
    pararg1(1) = 0.0;
-   NbrSol = 1;
-   WellDone = Standard_True;
+   
+   
  }
 
 //=========================================================================
index 584b6bbd9d0dae93fe03cb480e61294d088c63f7..3fc6ebb90e9732f20939e1b470295b48b476b6f4 100644 (file)
@@ -22,6 +22,8 @@
 //              of given radius : Radius.                             +
 //========================================================================
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <GccAna_Circ2dTanOnRad.hxx>
 #include <GccEnt_BadQualifier.hxx>
@@ -58,7 +60,7 @@ GccAna_Circ2dTanOnRad::
                           const gp_Lin2d&             OnLine    ,
                           const Standard_Real         Radius    ,
                           const Standard_Real         Tolerance ) :
-   cirsol(1,4)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)     ,
    qualifier1(1,4) ,
    TheSame1(1,4)   ,
    pnttg1sol(1,4)  ,
@@ -71,8 +73,8 @@ GccAna_Circ2dTanOnRad::
    TheSame1.Init(0);
    gp_Dir2d dirx(1.0,0.0);
    Standard_Real Tol = Abs(Tolerance);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
@@ -86,8 +88,8 @@ GccAna_Circ2dTanOnRad::
      Standard_Integer nbsol = 0;
      Standard_Integer signe = 0;
      gp_Pnt2d Center;
-     Standard_Real xc;
-     Standard_Real yc;
+     Standard_Real xc = NAN;
+     Standard_Real yc = NAN;
      Standard_Real R1 = C1.Radius();
      Standard_Real dist = OnLine.Distance(C1.Location());
      Standard_Real xdir = (OnLine.Direction()).X();
@@ -189,10 +191,10 @@ GccAna_Circ2dTanOnRad::
      }
      else if (nbsol > 0) {
        for (Standard_Integer j = 1 ; j <= nbsol ; j++) {
-        Standard_Real A,B,C;
+        Standard_Real A = NAN,B = NAN,C = NAN;
         OnLine.Coefficients(A,B,C);
         Standard_Real D = A;
-        Standard_Real x0,y0;
+        Standard_Real x0 = NAN,y0 = NAN;
         if ( Abs(D) <= Tol ) {
           A = B;
           B = D;
index 325db04ed242b74a741cdbe6625b8db30e59812e..6c30485578c53cec228c4858171ad3539c3bc16b 100644 (file)
@@ -45,7 +45,7 @@ GccAna_Circ2dTanOnRad::
                           const gp_Lin2d&            OnLine    ,
                           const Standard_Real        Radius    ,
                           const Standard_Real        Tolerance ):
-   cirsol(1,2)     ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,2)     ,
    qualifier1(1,2) ,
    TheSame1(1,2)   ,
    pnttg1sol(1,2)  ,
@@ -57,8 +57,8 @@ GccAna_Circ2dTanOnRad::
 
    Standard_Real Tol =Abs(Tolerance);
    gp_Dir2d dirx(1.0,0.0);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() ||
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
index 46cead1237bbf104b22514e5f4ee9470e7b15892..8be2baaa78dd440fec421422913b204e542f513f 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <GccAna_Circ2dTanOnRad.hxx>
 #include <GccEnt_BadQualifier.hxx>
@@ -47,7 +49,7 @@ GccAna_Circ2dTanOnRad::
                           const gp_Lin2d&     OnLine    ,
                           const Standard_Real Radius    ,
                           const Standard_Real Tolerance ):
-   cirsol(1,2)   ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,2)   ,
    qualifier1(1,2) ,
    TheSame1(1,2) ,
    pnttg1sol(1,2),
@@ -59,15 +61,15 @@ GccAna_Circ2dTanOnRad::
 
    gp_Dir2d dirx(1.0,0.0);
    Standard_Real Tol = Abs(Tolerance);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    Standard_Real dp1lin = OnLine.Distance(Point1);
 
    if (Radius < 0.0) { throw Standard_NegativeValue(); }
    else {
      if (dp1lin > Radius+Tol) { WellDone = Standard_True; }
-     Standard_Real xc;
-     Standard_Real yc;
+     Standard_Real xc = NAN;
+     Standard_Real yc = NAN;
      Standard_Real x1 = Point1.X();
      Standard_Real y1 = Point1.Y();
      Standard_Real xbid = 0;
@@ -119,7 +121,7 @@ GccAna_Circ2dTanOnRad::
        NbrSol = 2;
      }
      else {
-       Standard_Real A,B,C;
+       Standard_Real A = NAN,B = NAN,C = NAN;
        OnLine.Coefficients(A,B,C);
        Standard_Real D = A;
        if (A == 0.0) {
index 1257b06dd9c51ae6257e4c15261ab4ab9fb71162..c7d391ed4da4624fff6fc7fe064d6af9af177b67 100644 (file)
@@ -43,7 +43,7 @@ GccAna_Circ2dTanOnRad::
                           const gp_Circ2d&            OnCirc    ,
                           const Standard_Real         Radius    ,
                           const Standard_Real         Tolerance ):
-   cirsol(1,4)   ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)   ,
    qualifier1(1,4) ,
    TheSame1(1,4) ,
    pnttg1sol(1,4),
@@ -65,8 +65,8 @@ GccAna_Circ2dTanOnRad::
    Standard_Real disparal[2];
    Standard_Integer nparal = 0;
    Standard_Integer sign = 0;
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
index 9b4b8cef0258289e471fe7aa0910476e823d392e..1d2905712e6ab107b6d9d0717b8049314a62a8fc 100644 (file)
@@ -47,7 +47,7 @@ GccAna_Circ2dTanOnRad::
 //  Initialization of fields.                                            +
 //=========================================================================
 
-   cirsol(1,4)   ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,4)   ,
    qualifier1(1,4) ,
    TheSame1(1,4) ,
    pnttg1sol(1,4),
@@ -60,8 +60,8 @@ GccAna_Circ2dTanOnRad::
      TheSame1.Init(0);
    gp_Dir2d dirx(1.0,0.0);
    Standard_Real Tol = Abs(Tolerance);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() ||
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
index 76191c16b490aa2c5d5040c1908fe32095c6eeb1..807c3e8c7e3fb4cddcf56df35901e7d128fce281 100644 (file)
@@ -41,7 +41,7 @@ GccAna_Circ2dTanOnRad::
                           const gp_Circ2d&    OnCirc    ,
                           const Standard_Real Radius    ,
                           const Standard_Real Tolerance ):
-   cirsol(1,2)   ,
+   WellDone(Standard_False), NbrSol(0), cirsol(1,2)   ,
    qualifier1(1,2) ,
    TheSame1(1,2) ,
    pnttg1sol(1,2),
@@ -53,8 +53,8 @@ GccAna_Circ2dTanOnRad::
 
    gp_Dir2d dirx(1.0,0.0);
    Standard_Real Tol = Abs(Tolerance);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    Standard_Real Roncirc = OnCirc.Radius();
    Standard_Real dist1 = Point1.Distance(OnCirc.Location())-Roncirc;
    Standard_Real dist2 = Point1.Distance(OnCirc.Location())+Roncirc;
index dfa5f6736b6975b23b58025b3e6fcc0385243416..3ee3e104e6d92d106d19c2fe6ef4b3f7151c63b9 100644 (file)
@@ -35,7 +35,7 @@ GccAna_CircLin2dBisec::
    GccAna_CircLin2dBisec (const gp_Circ2d& Circle ,
                          const gp_Lin2d&  Line   ):
 
-   circle(Circle),
+   NbrSol(2), WellDone(Standard_True), circle(Circle),
    line(Line)
 {
 
@@ -47,8 +47,8 @@ GccAna_CircLin2dBisec::
 //            - WellDone (Boolean showing success or failure of algorithm)+
 //=========================================================================
 
-   NbrSol = 2;
-   WellDone = Standard_True;
+   
+   
  }
 
 //=========================================================================
@@ -87,7 +87,7 @@ Handle(GccInt_Bisec) GccAna_CircLin2dBisec::
     //       ==========================================================
   }
   else {
-    Standard_Integer signe;
+    Standard_Integer signe = 0;
     if ((-ydir*(xcencir-xloc)+xdir*(ycencir-yloc)) > 0.0) {
       signe = 1;
     }
index cbcb635f344fff711f172a6ace836b5094e88bee..27ef06bf2239aa4169f5c21fc742a45b174ab085 100644 (file)
 //=========================================================================
 GccAna_CircPnt2dBisec::
    GccAna_CircPnt2dBisec (const gp_Circ2d& Circle ,
-                         const gp_Pnt2d&  Point  )
+                         const gp_Pnt2d&  Point  ) : circle(Circle), point(Point), myTolerance(1.e-10)
 {
-  circle = Circle;
-  point = Point;
-  myTolerance = 1.e-10;
+  
+  
+  
   DefineSolutions();
 }
 
 GccAna_CircPnt2dBisec::
    GccAna_CircPnt2dBisec (const gp_Circ2d& Circle ,
                          const gp_Pnt2d&  Point,
-                          const Standard_Real Tolerance)
+                          const Standard_Real Tolerance) : circle(Circle), point(Point), myTolerance(1.e-10)
 {
-  circle = Circle;
-  point = Point;
-  myTolerance = 1.e-10;
+  
+  
+  
   if (myTolerance < Tolerance)
     myTolerance = Tolerance;
   
index e2a00d53bf0db9bf04685f86f6cff958bc57ddf3..e63c8950879bf547e0424c04627f06b9371fb85b 100644 (file)
@@ -85,11 +85,11 @@ private:
   Standard_EXPORT void DefineSolutions();
 
 
-  Standard_Boolean WellDone;
-  Standard_Integer NbrSol;
+  Standard_Boolean WellDone{};
+  Standard_Integer NbrSol{};
   gp_Circ2d circle;
   gp_Pnt2d point;
-  Standard_Integer theposition;
+  Standard_Integer theposition{};
   Standard_Real myTolerance;
 
 
index 3ea196c8cedd447c0eb948a50d8b002cf2207cd2..a541d7a643d044f364933c6f97f0140a3d37a554 100644 (file)
@@ -38,7 +38,7 @@ GccAna_Lin2d2Tan::
    GccAna_Lin2d2Tan (const gp_Pnt2d&             ThePoint1,
                      const gp_Pnt2d&             ThePoint2 ,
                      const Standard_Real         Tolerance ):
-   linsol(1,1),
+   WellDone(Standard_False), NbrSol(0), linsol(1,1),
    qualifier1(1,1),
    qualifier2(1,1) ,
    pnttg1sol(1,1),
@@ -50,8 +50,8 @@ GccAna_Lin2d2Tan::
 {
 
    Standard_Real Tol = Abs(Tolerance);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    Standard_Real dist = ThePoint1.Distance(ThePoint2);
    qualifier1(1) = GccEnt_noqualifier;
    qualifier2(1) = GccEnt_noqualifier;
@@ -84,7 +84,7 @@ GccAna_Lin2d2Tan::
    GccAna_Lin2d2Tan (const GccEnt_QualifiedCirc& Qualified1,
                      const gp_Pnt2d&             ThePoint  ,
                      const Standard_Real         Tolerance ):
-   linsol(1,2),
+   WellDone(Standard_False), NbrSol(0), linsol(1,2),
    qualifier1(1,2),
    qualifier2(1,2),
    pnttg1sol(1,2),
@@ -96,8 +96,8 @@ GccAna_Lin2d2Tan::
 {
 
    Standard_Real Tol = Abs(Tolerance);
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
@@ -185,7 +185,7 @@ GccAna_Lin2d2Tan::
     GccAna_Lin2d2Tan (const GccEnt_QualifiedCirc& Qualified1,
                      const GccEnt_QualifiedCirc& Qualified2,
                      const Standard_Real         Tolerance ):
-    linsol(1,4),
+    WellDone(Standard_False), NbrSol(0), linsol(1,4),
     qualifier1(1,4),
     qualifier2(1,4) ,
     pnttg1sol(1,4),
@@ -197,8 +197,8 @@ GccAna_Lin2d2Tan::
 {
 
     Standard_Real Tol = Abs(Tolerance);
-    WellDone = Standard_False;
-    NbrSol = 0;
+    
+    
     if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
          Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
        !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
index c79118a6292e983ef9ea08e38f088b27711d785e..c810a55d4deff9505f399e6b7f991c09576e4e06 100644 (file)
@@ -39,7 +39,7 @@
 GccAna_Lin2dBisec::
    GccAna_Lin2dBisec (const gp_Lin2d& Lin1,
                      const gp_Lin2d& Lin2):
-   linsol(1,2)    ,
+   WellDone(Standard_False), NbrSol(0), linsol(1,2)    ,
    pntint1sol(1,2),
    pntint2sol(1,2),
    par1sol(1,2),
@@ -47,8 +47,8 @@ GccAna_Lin2dBisec::
    pararg1(1,2),
    pararg2(1,2) {
 
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
 
    IntAna2d_AnaIntersection Intp(Lin1,Lin2);
    if (Intp.IsDone()) {
index 6fc1e64c0c342d85db21c4014c3491e06d25f70c..89148f388372db43ca396148a77738b2bd2cbfc0 100644 (file)
@@ -96,7 +96,7 @@ GccAna_Lin2dTanObl::
    GccAna_Lin2dTanObl (const GccEnt_QualifiedCirc& Qualified1 ,
                        const gp_Lin2d&             TheLine    ,
                        const Standard_Real         TheAngle   ):
-   linsol(1,2)   ,
+   WellDone(Standard_False), NbrSol(0), linsol(1,2)   ,
    qualifier1(1,2) ,
    pnttg1sol(1,2),
    pntint2sol(1,2),
@@ -106,8 +106,8 @@ GccAna_Lin2dTanObl::
    pararg2(1,2)
 {
 
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
index cedf004aab9242fd4f718ca1c994f841e88c64f5..563b968c93eb6c68133cf3c7668cfb4e00887ee8 100644 (file)
@@ -37,7 +37,7 @@
 GccAna_Lin2dTanPar::
    GccAna_Lin2dTanPar (const gp_Pnt2d& ThePoint  ,
                        const gp_Lin2d& Lin1      ):
-   linsol(1,1),
+   NbrSol(1), WellDone(Standard_True), linsol(1,1),
    qualifier1(1,1) ,
    pnttg1sol(1,1),
    par1sol(1,1),
@@ -50,8 +50,8 @@ GccAna_Lin2dTanPar::
    pnttg1sol(1) = ThePoint;
    par1sol(1) = 0.;
    pararg1(1) = 0.;
-   NbrSol = 1;
-   WellDone = Standard_True;
+   
+   
 }
 
 //========================================================================
@@ -68,17 +68,17 @@ GccAna_Lin2dTanPar::
 GccAna_Lin2dTanPar::
    GccAna_Lin2dTanPar (const GccEnt_QualifiedCirc& Qualified1,
                        const gp_Lin2d&             Lin1      ):
-   linsol(1,2),
+   WellDone(Standard_False), NbrSol(0), linsol(1,2),
    qualifier1(1,2) ,
    pnttg1sol(1,2),
    par1sol(1,2),
    pararg1(1,2)
 {
 
-   WellDone = Standard_False;
+   
    Standard_Integer signe = 0;
    Standard_Integer nbsol = 0;
-   NbrSol = 0;
+   
    if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
         Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
      throw GccEnt_BadQualifier();
index fc30993b7dfc2ece88a40a0772401f2871e8bd29..b6c110234b94dbd97806a345ef22be17b36f5c2b 100644 (file)
@@ -125,7 +125,7 @@ GccAna_Lin2dTanPer::
 GccAna_Lin2dTanPer::
    GccAna_Lin2dTanPer (const GccEnt_QualifiedCirc& Qualified1,
                        const gp_Lin2d&             TheLin    ):
-   linsol(1,2),
+   WellDone(Standard_False), NbrSol(0), linsol(1,2),
    qualifier1(1,2) ,
    pnttg1sol(1,2),
    pntint2sol(1,2),
@@ -135,10 +135,10 @@ GccAna_Lin2dTanPer::
    pararg2(1,2)
 {
 
-   WellDone = Standard_False;
+   
    Standard_Integer nbsol = 0;
    Standard_Integer signe = 0;
-   NbrSol = 0;
+   
    gp_Circ2d C1 = Qualified1.Qualified();
 
    if (Qualified1.IsEnclosed()) {
@@ -196,7 +196,7 @@ GccAna_Lin2dTanPer::
 GccAna_Lin2dTanPer::
    GccAna_Lin2dTanPer (const GccEnt_QualifiedCirc& Qualified1,
                        const gp_Circ2d&            TheCircle ):
-   linsol(1,2),
+   WellDone(Standard_False), NbrSol(0), linsol(1,2),
    qualifier1(1,2) ,
    pnttg1sol(1,2),
    pntint2sol(1,2),
@@ -206,8 +206,8 @@ GccAna_Lin2dTanPer::
    pararg2(1,2)
 {
 
-   WellDone = Standard_False;
-   NbrSol = 0;
+   
+   
    Standard_Integer signe = 0;
    gp_Circ2d C1 = Qualified1.Qualified();
 
index c16390be459539bd717e23721aa41bf32ff5accf..b128f89924fc1ca3f4928d9997f634dee1315638 100644 (file)
@@ -31,9 +31,9 @@
 //=========================================================================
 GccAna_LinPnt2dBisec::
    GccAna_LinPnt2dBisec (const gp_Lin2d& Line1 ,
-                        const gp_Pnt2d& Point2) {
+                        const gp_Pnt2d& Point2) : WellDone(Standard_False) {
 
-   WellDone = Standard_False;
+   
 
    Standard_Real xdir = Line1.Direction().X();
    Standard_Real ydir = Line1.Direction().Y();
index 74d0cf1dced2ef35f04af876fb7dc772446d0648..8f40d5e0608b8b197959a2a3dfc69f89d7874df9 100644 (file)
@@ -29,9 +29,9 @@
 //=========================================================================
 GccAna_Pnt2dBisec::
    GccAna_Pnt2dBisec (const gp_Pnt2d& Point1,
-                     const gp_Pnt2d& Point2) {
+                     const gp_Pnt2d& Point2) : WellDone(Standard_False) {
 
-   WellDone = Standard_False;
+   
 //   if (Point1.Distance(Point2) > gp::Resolution()) {
    if (Point1.Distance(Point2) > 1.e-10) {
      gp_Dir2d dir1(Point2.XY()-Point1.XY());
index 4d2e02bd1df04fd2ec3eb6b8e574cc8ba0901242..c1d6ece1ba265447e149ed6473368393467d19a8 100644 (file)
@@ -42,9 +42,9 @@ Standard_Boolean GccEnt_QualifiedLin::
 
 GccEnt_QualifiedLin::
    GccEnt_QualifiedLin (const gp_Lin2d&       Qualified,
-                       const GccEnt_Position Qualifier) {
-   TheQualified = Qualified;
-   TheQualifier = Qualifier;
+                       const GccEnt_Position Qualifier) : TheQualified(Qualified), TheQualifier(Qualifier) {
+   
+   
  }
 
 
index 081862e4c484947b42699ec7419738ada6a282a8..cb924940bd196c828811eea9f1a091aef80d5188 100644 (file)
@@ -51,10 +51,10 @@ Handle(Geom_Geometry) Geom_Axis2Placement::Copy() const {
 //purpose  : 
 //=======================================================================
 
-Geom_Axis2Placement::Geom_Axis2Placement (const gp_Ax2& A2) {
+Geom_Axis2Placement::Geom_Axis2Placement (const gp_Ax2& A2) : vxdir(A2. XDirection()), vydir(A2. YDirection()) {
 
-   vxdir = A2. XDirection();
-   vydir = A2. YDirection();
+   
+   
    axis  = A2.Axis();
 }
 
index 83cd0115458e02b7fd7a574b28549611dffd96f2..bed0cf88755c794177f94506fca1c6789129b6c7 100644 (file)
@@ -30,6 +30,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <ElCLib.hxx>
 #include <Geom_BSplineCurve.hxx>
@@ -126,7 +128,7 @@ Geom_BSplineCurve::Geom_BSplineCurve
  rational(Standard_False),
  periodic(Periodic),
  deg(Degree),
- maxderivinvok(Standard_False)
poles(new TColgp_HArray1OfPnt(1,Poles.Length())), knots(new TColStd_HArray1OfReal(1,Knots.Length())), mults(new TColStd_HArray1OfInteger(1,Mults.Length())), maxderivinvok(Standard_False)
 {
   // check
   
@@ -138,14 +140,14 @@ Geom_BSplineCurve::Geom_BSplineCurve
 
   // copy arrays
 
-  poles =  new TColgp_HArray1OfPnt(1,Poles.Length());
+  
   poles->ChangeArray1() = Poles;
   
 
-  knots = new TColStd_HArray1OfReal(1,Knots.Length());
+  
   knots->ChangeArray1() = Knots;
 
-  mults = new TColStd_HArray1OfInteger(1,Mults.Length());
+  
   mults->ChangeArray1() = Mults;
 
   UpdateKnots();
@@ -182,7 +184,7 @@ Geom_BSplineCurve::Geom_BSplineCurve
   if (Weights.Length() != Poles.Length())
     throw Standard_ConstructionError("Geom_BSplineCurve: Weights and Poles array size mismatch");
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = Weights.Lower(); i <= Weights.Upper(); i++) {
     if (Weights(i) <= gp::Resolution())  
       throw Standard_ConstructionError("Geom_BSplineCurve: Weights values too small");
@@ -294,7 +296,7 @@ void Geom_BSplineCurve::IncreaseMultiplicity  (const Standard_Integer I1,
   Handle(TColStd_HArray1OfReal)  tk = knots;
   TColStd_Array1OfReal k((knots->Array1())(I1),I1,I2);
   TColStd_Array1OfInteger m(I1,I2);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = I1; i <= I2; i++)
     m(i) = M - mults->Value(i);
   InsertKnots(k,m,Epsilon(1.),Standard_True);
@@ -346,7 +348,7 @@ void  Geom_BSplineCurve::InsertKnots(const TColStd_Array1OfReal& Knots,
                                     const Standard_Boolean Add)
 {
   // Check and compute new sizes
-  Standard_Integer nbpoles,nbknots;
+  Standard_Integer nbpoles = 0,nbknots = 0;
 
   if (!BSplCLib::PrepareInsertKnots(deg,periodic,
                                    knots->Array1(),mults->Array1(),
@@ -456,7 +458,7 @@ void Geom_BSplineCurve::Reverse ()
 { 
   BSplCLib::Reverse(knots->ChangeArray1());
   BSplCLib::Reverse(mults->ChangeArray1());
-  Standard_Integer last;
+  Standard_Integer last = 0;
   if (periodic)
     last = flatknots->Upper() - deg - 1;
   else
@@ -490,9 +492,9 @@ void Geom_BSplineCurve::Segment(const Standard_Real U1,
   if (U2 < U1)
     throw Standard_DomainError("Geom_BSplineCurve::Segment");
   
-  Standard_Real NewU1, NewU2;
-  Standard_Real U,DU=0,aDDU=0;
-  Standard_Integer index;
+  Standard_Real NewU1 = NAN, NewU2 = NAN;
+  Standard_Real U = NAN,DU=0,aDDU=0;
+  Standard_Integer index = 0;
   Standard_Boolean wasPeriodic = periodic;
 
   TColStd_Array1OfReal    Knots(1,2);
@@ -575,7 +577,7 @@ void Geom_BSplineCurve::Segment(const Standard_Real U1,
   if (DU > 0) // if was periodic
     DU = NewU1 - U1;
   
-  Standard_Integer i , k = 1;
+  Standard_Integer i = 0 , k = 1;
   for ( i = index1; i<= index2; i++) {
     nknots->SetValue(k, knots->Value(i) - DU);
     nmults->SetValue(k, mults->Value(i));
@@ -748,7 +750,7 @@ void Geom_BSplineCurve::SetOrigin(const Standard_Integer Index)
   if (!periodic)
     throw Standard_NoSuchObject("Geom_BSplineCurve::SetOrigin");
 
-  Standard_Integer i,k;
+  Standard_Integer i = 0,k = 0;
   Standard_Integer first = FirstUKnotIndex();
   Standard_Integer last  = LastUKnotIndex();
 
@@ -881,7 +883,7 @@ void Geom_BSplineCurve::SetOrigin(const Standard_Real U,
 void Geom_BSplineCurve::SetNotPeriodic () 
 { 
   if ( periodic) {
-    Standard_Integer NbKnots, NbPoles;
+    Standard_Integer NbKnots = 0, NbPoles = 0;
     BSplCLib::PrepareUnperiodize( deg, mults->Array1(),NbKnots,NbPoles);
     
     Handle(TColgp_HArray1OfPnt) npoles 
@@ -1019,7 +1021,7 @@ void Geom_BSplineCurve::MovePointAndTangent(const Standard_Real    U,
                                             const Standard_Integer EndingCondition,
                                             Standard_Integer&      ErrorStatus) 
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
   if (IsPeriodic()) {
     //
     // for the time being do not deal with periodic curves
@@ -1103,7 +1105,7 @@ void Geom_BSplineCurve::UpdateKnots()
 
 void Geom_BSplineCurve::PeriodicNormalization(Standard_Real&  Parameter) const 
 {
-  Standard_Real Period ;
+  Standard_Real Period = NAN ;
 
   if (periodic) {
     Period = flatknots->Value(flatknots->Upper() - deg) - flatknots->Value (deg + 1) ;
index 7648d32b36dd04c2e060bf1370de731c0a196e24..3db1d7d0d7dc3b09e097b1147109e61127b40269 100644 (file)
@@ -806,7 +806,7 @@ private:
   Handle(TColStd_HArray1OfReal) flatknots;
   Handle(TColStd_HArray1OfReal) knots;
   Handle(TColStd_HArray1OfInteger) mults;
-  Standard_Real maxderivinv;
+  Standard_Real maxderivinv{};
   Standard_Boolean maxderivinvok;
 
 
index f6ce2327d3d7bef315c47c230ee5ff86e7ba5561..3a55e5d18030ab53eca183adb62a94964d360ee3 100644 (file)
@@ -642,7 +642,7 @@ void Geom_BSplineCurve::Weights
   if (IsRational())
     W = weights->Array1();
   else {
-    Standard_Integer i;
+    Standard_Integer i = 0;
 
     for (i = W.Lower(); i <= W.Upper(); i++)
       W(i) = 1.;
@@ -747,7 +747,7 @@ void Geom_BSplineCurve::Resolution (const Standard_Real Tolerance3D,
   {
     if (periodic)
     {
-      Standard_Integer NbKnots, NbPoles;
+      Standard_Integer NbKnots = 0, NbPoles = 0;
       BSplCLib::PrepareUnperiodize (deg, mults->Array1(), NbKnots, NbPoles);
       TColgp_Array1OfPnt   new_poles  (1, NbPoles);
       TColStd_Array1OfReal new_weights(1, NbPoles);
index 8b9c07b09396abe2e721a971cd4a62a3b82c12c6..fc153033464c6926b42101ae8384f239f9851982 100644 (file)
@@ -23,6 +23,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <BSplSLib.hxx>
 #include <Geom_BSplineSurface.hxx>
@@ -68,7 +70,7 @@ static void CheckSurfaceData
     throw Standard_ConstructionError("Geom_BSplineSurface: Knot and Mult array size mismatch");
   }
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = SUKnots.Lower(); i < SUKnots.Upper(); i++) {
     if (SUKnots(i+1) - SUKnots(i) <= Epsilon(Abs(SUKnots(i)))) {
       throw Standard_ConstructionError("Geom_BSplineSurface: UKnots interval values too close");
@@ -97,7 +99,7 @@ static void Rational(const TColStd_Array2OfReal& Weights,
                     Standard_Boolean& Urational,
                     Standard_Boolean& Vrational)
 {
-  Standard_Integer I,J;
+  Standard_Integer I = 0,J = 0;
   J = Weights.LowerCol ();
   Vrational = Standard_False;
   while (!Vrational && J <= Weights.UpperCol()) {
@@ -168,7 +170,8 @@ Geom_BSplineSurface::Geom_BSplineSurface
  vperiodic(VPeriodic),
  udeg(UDegree),
  vdeg(VDegree),
- maxderivinvok(0)
+ poles(new TColgp_HArray2OfPnt(1,Poles.ColLength(),
+                                   1,Poles.RowLength())), uknots(new TColStd_HArray1OfReal    (1,UKnots.Length())), umults(new TColStd_HArray1OfInteger (1,UMults.Length())), vknots(new TColStd_HArray1OfReal    (1,VKnots.Length())), vmults(new TColStd_HArray1OfInteger (1,VMults.Length())), maxderivinvok(0)
 
 {
 
@@ -182,23 +185,22 @@ Geom_BSplineSurface::Geom_BSplineSurface
 
   // copy arrays
 
-  poles   = new TColgp_HArray2OfPnt(1,Poles.ColLength(),
-                                   1,Poles.RowLength());
+  
   poles->ChangeArray2() = Poles;
 
   weights = new TColStd_HArray2OfReal (1,Poles.ColLength(),
                                       1,Poles.RowLength(), 1.0);
 
-  uknots  = new TColStd_HArray1OfReal    (1,UKnots.Length());
+  
   uknots->ChangeArray1() = UKnots;
 
-  umults  = new TColStd_HArray1OfInteger (1,UMults.Length());
+  
   umults->ChangeArray1() = UMults;
 
-  vknots  = new TColStd_HArray1OfReal    (1,VKnots.Length());
+  
   vknots->ChangeArray1() = VKnots;
 
-  vmults  = new TColStd_HArray1OfInteger (1,VMults.Length());
+  
   vmults->ChangeArray1() = VMults;
 
   UpdateUKnots();
@@ -237,7 +239,7 @@ Geom_BSplineSurface::Geom_BSplineSurface
   if (Weights.RowLength() != Poles.RowLength())
     throw Standard_ConstructionError("Geom_BSplineSurface: V Weights and Poles array size mismatch");
 
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   for (i = Weights.LowerRow(); i <= Weights.UpperRow(); i++) {
     for (j = Weights.LowerCol(); j <= Weights.UpperCol(); j++) {
       if (Weights(i,j) <= gp::Resolution())  
@@ -544,9 +546,9 @@ void Geom_BSplineSurface::segment(const Standard_Real U1,
       deltaV = aVPeriod;
   }
 
-  Standard_Real NewU1, NewU2, NewV1, NewV2;
-  Standard_Real U, V;
-  Standard_Integer indexU, indexV;
+  Standard_Real NewU1 = NAN, NewU2 = NAN, NewV1 = NAN, NewV2 = NAN;
+  Standard_Real U = NAN, V = NAN;
+  Standard_Integer indexU = 0, indexV = 0;
 
   indexU = 0;
   BSplCLib::LocateParameter(udeg, uknots->Array1(), umults->Array1(),
@@ -617,7 +619,7 @@ void Geom_BSplineSurface::segment(const Standard_Real U1,
   Handle(TColStd_HArray1OfInteger)
     numults = new TColStd_HArray1OfInteger(1, nbuknots);
 
-  Standard_Integer i, k = 1;
+  Standard_Integer i = 0, k = 1;
   for (i = index1U; i <= index2U; i++) {
     nuknots->SetValue(k, uknots->Value(i));
     numults->SetValue(k, umults->Value(i));
@@ -699,7 +701,7 @@ void Geom_BSplineSurface::segment(const Standard_Real U1,
   Handle(TColgp_HArray2OfPnt)
     npoles = new TColgp_HArray2OfPnt(1, nbupoles, 1, nbvpoles);
   k = 1;
-  Standard_Integer j, l;
+  Standard_Integer j = 0, l = 0;
   if (urational || vrational) {
     nweights = new TColStd_HArray2OfReal(1, nbupoles, 1, nbvpoles);
     for (i = pindex1U; i <= pindex2U; i++) {
@@ -1132,7 +1134,7 @@ void Geom_BSplineSurface::PeriodicNormalization
 (Standard_Real&  Uparameter, 
  Standard_Real&  Vparameter) const 
 {
-  Standard_Real Period, aMaxVal, aMinVal;
+  Standard_Real Period = NAN, aMaxVal = NAN, aMinVal = NAN;
   
   if (uperiodic) {
     aMaxVal = ufknots->Value(ufknots->Upper() - udeg);
@@ -1143,11 +1145,11 @@ void Geom_BSplineSurface::PeriodicNormalization
     if(Period <= eps) 
       throw Standard_OutOfRange("Geom_BSplineSurface::PeriodicNormalization: Uparameter is too great number");
 
-    Standard_Boolean isLess, isGreater;
+    Standard_Boolean isLess = 0, isGreater = 0;
     isLess = aMinVal - Uparameter > 0;
     isGreater = Uparameter - aMaxVal > 0;
     if (isLess || isGreater) {
-      Standard_Real aDPar, aNbPer;
+      Standard_Real aDPar = NAN, aNbPer = NAN;
       aDPar = (isLess) ? (aMaxVal - Uparameter) : (aMinVal - Uparameter);
       modf(aDPar / Period, &aNbPer);
       Uparameter += aNbPer * Period;
@@ -1162,11 +1164,11 @@ void Geom_BSplineSurface::PeriodicNormalization
     if(Period <= eps) 
       throw Standard_OutOfRange("Geom_BSplineSurface::PeriodicNormalization: Vparameter is too great number");
 
-    Standard_Boolean isLess, isGreater;
+    Standard_Boolean isLess = 0, isGreater = 0;
     isLess = aMinVal - Vparameter > 0;
     isGreater = Vparameter - aMaxVal > 0;
     if (isLess || isGreater) {
-      Standard_Real aDPar, aNbPer;
+      Standard_Real aDPar = NAN, aNbPer = NAN;
       aDPar = (isLess) ? (aMaxVal - Vparameter) : (aMinVal - Vparameter);
       modf(aDPar / Period, &aNbPer);
       Vparameter += aNbPer * Period;
index 81382433c26a44be96c827df1905dbc77481918b..b163a5f48a09ce4b2bcd05749cda9890267f4f3b 100644 (file)
@@ -1231,8 +1231,8 @@ private:
   Handle(TColStd_HArray1OfReal) vknots;
   Handle(TColStd_HArray1OfInteger) umults;
   Handle(TColStd_HArray1OfInteger) vmults;
-  Standard_Real umaxderivinv;
-  Standard_Real vmaxderivinv;
+  Standard_Real umaxderivinv{};
+  Standard_Real vmaxderivinv{};
   Standard_Boolean maxderivinvok;
 
 
index 8e49da6c3c82dca3a91ae4201a475d09da278e40..d3d3c87ef2f03649628927dfc33b258127457a03 100644 (file)
@@ -23,6 +23,8 @@
 //                 + bon appel a LocateParameter (PRO6973).
 // RBD : 15/10/98 ; Le cache est desormais defini sur [-1,1] (pro15537).
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <BSplSLib.hxx>
 #include <Geom_BSplineCurve.hxx>
@@ -790,7 +792,7 @@ void Geom_BSplineSurface::Transform (const gp_Trsf& T)
 
 void Geom_BSplineSurface::SetUPeriodic ()
 {
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
 
   Standard_Integer first = FirstUKnotIndex();
   Standard_Integer last  = LastUKnotIndex();
@@ -856,7 +858,7 @@ void Geom_BSplineSurface::SetUPeriodic ()
 
 void Geom_BSplineSurface::SetVPeriodic ()
 {
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
 
   Standard_Integer first = FirstVKnotIndex();
   Standard_Integer last  = LastVKnotIndex();
@@ -918,7 +920,7 @@ void Geom_BSplineSurface::SetUOrigin(const Standard_Integer Index)
   if (!uperiodic)
     throw Standard_NoSuchObject("Geom_BSplineSurface::SetUOrigin: surface is not U periodic");
 
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
   Standard_Integer first = FirstUKnotIndex();
   Standard_Integer last  = LastUKnotIndex();
 
@@ -1016,7 +1018,7 @@ void Geom_BSplineSurface::SetVOrigin(const Standard_Integer Index)
   if (!vperiodic)
     throw Standard_NoSuchObject("Geom_BSplineSurface::SetVOrigin: surface is not V periodic");
 
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
   Standard_Integer first = FirstVKnotIndex();
   Standard_Integer last  = LastVKnotIndex();
 
@@ -1112,7 +1114,7 @@ void Geom_BSplineSurface::SetVOrigin(const Standard_Integer Index)
 void Geom_BSplineSurface::SetUNotPeriodic () 
 { 
   if ( uperiodic) {
-    Standard_Integer NbKnots, NbPoles;
+    Standard_Integer NbKnots = 0, NbPoles = 0;
     BSplCLib::PrepareUnperiodize( udeg, umults->Array1(), NbKnots, NbPoles);
 
     Handle(TColgp_HArray2OfPnt) npoles = 
@@ -1164,7 +1166,7 @@ void Geom_BSplineSurface::SetUNotPeriodic ()
 void Geom_BSplineSurface::SetVNotPeriodic ()
 {
   if ( vperiodic) {
-    Standard_Integer NbKnots, NbPoles;
+    Standard_Integer NbKnots = 0, NbPoles = 0;
     BSplCLib::PrepareUnperiodize( vdeg, vmults->Array1(), NbKnots, NbPoles);
 
     Handle(TColgp_HArray2OfPnt) npoles = 
@@ -1218,7 +1220,7 @@ Standard_Boolean Geom_BSplineSurface::IsUClosed () const
   if (uperiodic)
     return Standard_True;
 
-  Standard_Real aU1, aU2, aV1, aV2;
+  Standard_Real aU1 = NAN, aU2 = NAN, aV1 = NAN, aV2 = NAN;
   Bounds( aU1, aU2, aV1, aV2 );
   Handle(Geom_Curve) aCUF = UIso( aU1 );
   Handle(Geom_Curve) aCUL = UIso( aU2 );
@@ -1239,7 +1241,7 @@ Standard_Boolean Geom_BSplineSurface::IsVClosed () const
   if (vperiodic)
     return Standard_True;
   
-  Standard_Real aU1, aU2, aV1, aV2;
+  Standard_Real aU1 = NAN, aU2 = NAN, aV1 = NAN, aV2 = NAN;
   Bounds( aU1, aU2, aV1, aV2 );
   Handle(Geom_Curve) aCVF = VIso( aV1 );
   Handle(Geom_Curve) aCVL = VIso( aV2 );
@@ -1431,7 +1433,7 @@ void Geom_BSplineSurface::UReverse ()
 {
   BSplCLib::Reverse(umults->ChangeArray1());
   BSplCLib::Reverse(uknots->ChangeArray1());
-  Standard_Integer last;
+  Standard_Integer last = 0;
   if (uperiodic)
     last = ufknots->Upper() - udeg -1;
   else
@@ -1462,7 +1464,7 @@ void Geom_BSplineSurface::VReverse ()
 {
   BSplCLib::Reverse(vmults->ChangeArray1());
   BSplCLib::Reverse(vknots->ChangeArray1());
-  Standard_Integer last;
+  Standard_Integer last = 0;
   if (vperiodic)
     last = vfknots->Upper() - vdeg -1;
   else
@@ -1777,7 +1779,7 @@ void  Geom_BSplineSurface::InsertUKnots
    const Standard_Boolean         Add)
 {
   // Check and compute new sizes
-  Standard_Integer nbpoles, nbknots;
+  Standard_Integer nbpoles = 0, nbknots = 0;
 
   if ( !BSplCLib::PrepareInsertKnots(udeg,uperiodic,
                                     uknots->Array1(),umults->Array1(),
@@ -1844,7 +1846,7 @@ void  Geom_BSplineSurface::InsertVKnots
    const Standard_Boolean Add)
 {
   // Check and compute new sizes
-  Standard_Integer nbpoles, nbknots;
+  Standard_Integer nbpoles = 0, nbknots = 0;
 
   if ( !BSplCLib::PrepareInsertKnots(vdeg,vperiodic,
                                     vknots->Array1(),vmults->Array1(),
index dcc5881a4658333e0f941213ef0880069b0ba934..3b035db08a9ab61f5722bcef4521ddcc676126a9 100644 (file)
@@ -27,6 +27,8 @@
 #define No_Standard_DimensionError
 
 
+#include <math.h>
+
 #include <Geom_BezierCurve.hxx>
 #include <Geom_Geometry.hxx>
 #include <gp.hxx>
@@ -51,7 +53,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Geom_BezierCurve,Geom_BoundedCurve)
 //=======================================================================
 static Standard_Boolean Rational(const TColStd_Array1OfReal& W)
 {
-  Standard_Integer i, n = W.Length();
+  Standard_Integer i = 0, n = W.Length();
   Standard_Boolean rat = Standard_False;
   for (i = 1; i < n; i++) {
     rat =  Abs(W(i) - W(i+1)) > gp::Resolution();
@@ -105,7 +107,7 @@ Geom_BezierCurve::Geom_BezierCurve(const TColgp_Array1OfPnt&  Poles,
   if (Weights.Length() != nbpoles)
     throw Standard_ConstructionError();
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= nbpoles; i++) {
     if (Weights(i) <= gp::Resolution()) {
       throw Standard_ConstructionError();
@@ -211,7 +213,7 @@ void Geom_BezierCurve::InsertPoleAfter
   if(Index < 0 || Index > nbpoles)
     throw Standard_OutOfRange("Geom_BezierCurve::InsertPoleAfter");
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   // Insert the pole
   Handle(TColgp_HArray1OfPnt) npoles =
@@ -297,7 +299,7 @@ void Geom_BezierCurve::RemovePole
   if(Index < 1 || Index > nbpoles)
     throw Standard_OutOfRange("Geom_BezierCurve::RemovePole");
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   // Remove the pole
   Handle(TColgp_HArray1OfPnt) npoles =
@@ -339,7 +341,7 @@ void Geom_BezierCurve::RemovePole
 void Geom_BezierCurve::Reverse ()
 {
   gp_Pnt P;
-  Standard_Integer i, nbpoles = NbPoles();
+  Standard_Integer i = 0, nbpoles = NbPoles();
   TColgp_Array1OfPnt & cpoles = poles->ChangeArray1();
   
   // reverse poles
@@ -352,7 +354,7 @@ void Geom_BezierCurve::Reverse ()
   // reverse weights
   if (IsRational()) {
     TColStd_Array1OfReal & cweights = weights->ChangeArray1();
-    Standard_Real w;
+    Standard_Real w = NAN;
     for (i = 1; i <= nbpoles / 2; i++) {
       w = cweights(i);
       cweights(i) = cweights(nbpoles-i+1);
@@ -716,7 +718,7 @@ void Geom_BezierCurve::Weights
   if (IsRational())
     W = weights->Array1();
   else {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 1; i <= nbpoles; i++)
       W(i) = 1.;
   }
index 9ca5b83e8bce20ff70ac74d233a608301705c938..bbbb6bf7a504d5e041088d7eb9eedd285bbedbd5 100644 (file)
@@ -351,12 +351,12 @@ private:
   //! if nbpoles < 2 or nbboles > MaDegree + 1
   void Init (const Handle(TColgp_HArray1OfPnt)& Poles, const Handle(TColStd_HArray1OfReal)& Weights);
 
-  Standard_Boolean rational;
-  Standard_Boolean closed;
+  Standard_Boolean rational{};
+  Standard_Boolean closed{};
   Handle(TColgp_HArray1OfPnt) poles;
   Handle(TColStd_HArray1OfReal) weights;
-  Standard_Real maxderivinv;
-  Standard_Boolean maxderivinvok;
+  Standard_Real maxderivinv{};
+  Standard_Boolean maxderivinvok{};
 
 
 };
index 976c141e683e90f87ef16d4e0f641a84add8b850..6a4c739f1fa122c1cb633db0e94df825cefc7b7b 100644 (file)
@@ -27,6 +27,8 @@
 #define No_Standard_DimensionError
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <Geom_BezierCurve.hxx>
 #include <Geom_BezierSurface.hxx>
@@ -56,7 +58,7 @@ static void Rational(const TColStd_Array2OfReal& Weights,
                     Standard_Boolean& Urational,
                     Standard_Boolean& Vrational)
 {
-  Standard_Integer I,J;
+  Standard_Integer I = 0,J = 0;
   J = Weights.LowerCol ();
   Vrational = Standard_False;
   while (!Vrational && J <= Weights.UpperCol()) {
@@ -96,7 +98,7 @@ static void AddPoleCol
   Standard_Integer InsertIndex = AfterIndex + NewPoles.LowerCol();
   Standard_Integer Offset = NewPoles.LowerRow() - PoleCol.Lower();
   Standard_Integer ColIndex = NewPoles.LowerCol();
-  Standard_Integer RowIndex;
+  Standard_Integer RowIndex = 0;
   while (ColIndex < InsertIndex) {
     RowIndex = NewPoles.LowerRow();
     while (RowIndex <= NewPoles.UpperRow()){
@@ -140,7 +142,7 @@ static void AddRatPoleCol
   Standard_Integer OffsetW     = NewWeights.LowerRow() - PoleWeightCol.Lower();
   
   Standard_Integer ColIndex = NewPoles.LowerCol();
-  Standard_Integer RowIndex;
+  Standard_Integer RowIndex = 0;
   while (ColIndex < InsertIndex) {
     RowIndex = NewPoles.LowerRow();
     while (RowIndex <= NewPoles.UpperRow()){
@@ -182,7 +184,7 @@ static void AddPoleRow
   Standard_Integer InsertIndex = AfterIndex + NewPoles.LowerRow();
   Standard_Integer Offset = NewPoles.LowerCol() - PoleRow.Lower();
   Standard_Integer RowIndex = NewPoles.LowerRow();
-  Standard_Integer ColIndex;
+  Standard_Integer ColIndex = 0;
   while (RowIndex < InsertIndex) {
     ColIndex = NewPoles.LowerCol();
     while (ColIndex <= NewPoles.UpperCol()){
@@ -225,7 +227,7 @@ static void AddRatPoleRow
   Standard_Integer OffsetPol = NewPoles.LowerCol() - PoleRow.Lower();
   Standard_Integer OffsetW = NewWeights.LowerCol() - PoleWeightRow.Lower();
   
-  Standard_Integer ColIndex;
+  Standard_Integer ColIndex = 0;
   Standard_Integer RowIndex = NewPoles.LowerRow();
   while (RowIndex < InsertIndex) {
     ColIndex = NewPoles.LowerCol();
@@ -265,7 +267,7 @@ static void DeletePoleCol
          TColgp_Array2OfPnt& NewPoles)
 {
   Standard_Integer Offset = 0;
-  Standard_Integer RowIndex;
+  Standard_Integer RowIndex = 0;
   Standard_Integer ColIndex = NewPoles.LowerCol();
   while (ColIndex <= NewPoles.UpperCol()) {
     RowIndex = NewPoles.LowerRow();
@@ -291,7 +293,7 @@ static void DeleteRatPoleCol
          TColStd_Array2OfReal& NewWeights)
 {
   Standard_Integer Offset = 0;
-  Standard_Integer RowIndex;
+  Standard_Integer RowIndex = 0;
   Standard_Integer ColIndex = NewPoles.LowerCol();
   while (ColIndex <= NewPoles.UpperCol()) {
     RowIndex = NewPoles.LowerRow();
@@ -316,7 +318,7 @@ static void DeletePoleRow
          TColgp_Array2OfPnt& NewPoles)
 {
   Standard_Integer Offset = 0;
-  Standard_Integer ColIndex;
+  Standard_Integer ColIndex = 0;
   Standard_Integer RowIndex = NewPoles.LowerRow();
   while (RowIndex <= NewPoles.UpperRow()) {
     ColIndex = NewPoles.LowerCol();
@@ -342,7 +344,7 @@ static void DeleteRatPoleRow
          TColStd_Array2OfReal& NewWeights)
 {
   Standard_Integer Offset = 0;
-  Standard_Integer ColIndex;
+  Standard_Integer ColIndex = 0;
   Standard_Integer RowIndex = NewPoles.LowerRow();
   while (RowIndex <= NewPoles.UpperRow()) {
     ColIndex = NewPoles.LowerCol();
@@ -421,7 +423,7 @@ Geom_BezierSurface::Geom_BezierSurface
     npoles = new TColgp_HArray2OfPnt   (1, NbUPoles, 1, NbVPoles);
   npoles->ChangeArray2() = SurfacePoles;
 
-  Standard_Integer I, J;
+  Standard_Integer I = 0, J = 0;
   urational = Standard_False;
   vrational = Standard_False;
   J = PoleWeights.LowerCol ();
@@ -466,10 +468,10 @@ Geom_BezierSurface::Geom_BezierSurface
    const Handle(TColStd_HArray2OfReal)& PoleWeights,
    const Standard_Boolean               IsURational,
    const Standard_Boolean               IsVRational)
-:maxderivinvok(Standard_False)
+:urational(IsURational), vrational(IsVRational), maxderivinvok(Standard_False)
 {
-  urational = IsURational;
-  vrational = IsVRational;
+  
+  
   Standard_Integer NbUPoles = SurfacePoles->ColLength();
   Standard_Integer NbVPoles = SurfacePoles->RowLength();
 
@@ -949,7 +951,7 @@ void Geom_BezierSurface::Segment
   if(UDegree() <= VDegree()) {
     Handle(TColgp_HArray2OfPnt)  coeffs = Coefs;
     Handle(TColStd_HArray2OfReal) wcoeffs = WCoefs;
-    Standard_Integer ii, jj;
+    Standard_Integer ii = 0, jj = 0;
     Coefs = new  (TColgp_HArray2OfPnt)(1,UDegree()+1,1,VDegree()+1);
     if (rat) {
       WCoefs = new  (TColStd_HArray2OfReal)(1,UDegree()+1,1,VDegree()+1);
@@ -1052,7 +1054,7 @@ void Geom_BezierSurface::SetPoleCol
     throw Standard_ConstructionError();
   }
      
-  Standard_Integer I;
+  Standard_Integer I = 0;
   for (I = CPoles.Lower();  I <= CPoles.Upper(); I++) {
     Poles (I, VIndex) = CPoles (I);
   }
@@ -1124,7 +1126,7 @@ void Geom_BezierSurface::SetPoleRow
     throw Standard_ConstructionError();
   }
 
-  Standard_Integer I;
+  Standard_Integer I = 0;
 
   for (I = CPoles.Lower(); I <= CPoles.Upper(); I++) {
     Poles   (UIndex, I) = CPoles (I);
@@ -1182,7 +1184,7 @@ void Geom_BezierSurface::SetWeightCol
   (const Standard_Integer      VIndex,
    const TColStd_Array1OfReal& CPoleWeights)
 {
-  Standard_Integer I;
+  Standard_Integer I = 0;
    // compute new rationality
   Standard_Boolean wasrat = (urational||vrational);
   if (!wasrat) {   
@@ -1223,7 +1225,7 @@ void Geom_BezierSurface::SetWeightRow
   (const Standard_Integer      UIndex,
    const TColStd_Array1OfReal& CPoleWeights)
 {
-  Standard_Integer I;
+  Standard_Integer I = 0;
    // compute new rationality
   Standard_Boolean wasrat = (urational||vrational);
   if (!wasrat) {    
@@ -1266,11 +1268,11 @@ void Geom_BezierSurface::SetWeightRow
 void Geom_BezierSurface::UReverse ()
 {
   gp_Pnt Pol;
-  Standard_Integer Row,Col;
+  Standard_Integer Row = 0,Col = 0;
   TColgp_Array2OfPnt & Poles = poles->ChangeArray2();
   if (urational || vrational) {
     TColStd_Array2OfReal & Weights = weights->ChangeArray2();
-    Standard_Real W;
+    Standard_Real W = NAN;
     for (Col = 1; Col <= Poles.RowLength(); Col++) {
       for (Row = 1; Row <= IntegerPart (Poles.ColLength() / 2); Row++) {
         W = Weights (Row, Col);
@@ -1312,11 +1314,11 @@ Standard_Real Geom_BezierSurface::UReversedParameter
 void Geom_BezierSurface::VReverse ()
 {
   gp_Pnt Pol;
-  Standard_Integer Row,Col;
+  Standard_Integer Row = 0,Col = 0;
   TColgp_Array2OfPnt & Poles = poles->ChangeArray2();
   if (urational || vrational) {
     TColStd_Array2OfReal & Weights = weights->ChangeArray2();
-    Standard_Real W;
+    Standard_Real W = NAN;
     for (Row = 1; Row <= Poles.ColLength(); Row++) {
       for (Col = 1; Col <= IntegerPart (Poles.RowLength()/2); Col++) {
         W = Weights (Row, Col);
index 244078d86d6b24a25f306f9eba1dc4291b157b92..968a3371b3da036ab35b31cc3c799ae901e06bdb 100644 (file)
@@ -609,8 +609,8 @@ private:
   Standard_Boolean vrational;
   Handle(TColgp_HArray2OfPnt) poles;
   Handle(TColStd_HArray2OfReal) weights;
-  Standard_Real umaxderivinv;
-  Standard_Real vmaxderivinv;
+  Standard_Real umaxderivinv{};
+  Standard_Real vmaxderivinv{};
   Standard_Boolean maxderivinvok;
 
 
index 8e4c7cccbd704fbc9dfc208ccc7c14283c0617c9..378f072d7804a8601ab3870a0840aff85646b8fa 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Geom_Ellipse.hxx>
 #include <Geom_Geometry.hxx>
@@ -298,7 +300,7 @@ Standard_Real Geom_Ellipse::Focal () const {
 Pnt Geom_Ellipse::Focus1 () const {
 
   Standard_Real C = Sqrt (majorRadius * majorRadius - minorRadius * minorRadius);
-  Standard_Real Xp, Yp, Zp, Xd, Yd, Zd;
+  Standard_Real Xp = NAN, Yp = NAN, Zp = NAN, Xd = NAN, Yd = NAN, Zd = NAN;
   pos.Location().Coord (Xp, Yp, Zp);
   pos.XDirection().Coord (Xd, Yd, Zd);
   return Pnt (Xp + C * Xd,  Yp + C * Yd,  Zp + C * Zd);
@@ -313,7 +315,7 @@ Pnt Geom_Ellipse::Focus1 () const {
 Pnt Geom_Ellipse::Focus2 () const {
 
   Standard_Real C = Sqrt (majorRadius * majorRadius - minorRadius * minorRadius);
-  Standard_Real Xp, Yp, Zp, Xd, Yd, Zd;
+  Standard_Real Xp = NAN, Yp = NAN, Zp = NAN, Xd = NAN, Yd = NAN, Zd = NAN;
   pos.Location().Coord (Xp, Yp, Zp);
   pos.XDirection().Coord (Xd, Yd, Zd);
   return Pnt (Xp - C * Xd,  Yp - C * Yd,  Zp - C * Zd);
index 486979a410ba674da6e9c4ea9ec7da687ae58488..d73f433255731d8a6e63676f55508284f0451133 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Geom_Hyperbola.hxx>
 #include <gp_Ax1.hxx>
@@ -334,7 +336,7 @@ Standard_Real Geom_Hyperbola::Focal () const {
 Pnt Geom_Hyperbola::Focus1 () const {
 
   Standard_Real C = Sqrt(majorRadius * majorRadius + minorRadius * minorRadius);
-  Standard_Real Xp, Yp, Zp, Xd, Yd, Zd;
+  Standard_Real Xp = NAN, Yp = NAN, Zp = NAN, Xd = NAN, Yd = NAN, Zd = NAN;
   pos.Location().Coord (Xp, Yp, Zp);
   pos.XDirection().Coord (Xd, Yd, Zd);
   return Pnt (Xp + C * Xd,  Yp + C * Yd, Zp + C * Zd);
@@ -348,7 +350,7 @@ Pnt Geom_Hyperbola::Focus1 () const {
 Pnt Geom_Hyperbola::Focus2 () const {
 
   Standard_Real C = Sqrt(majorRadius * majorRadius + minorRadius * minorRadius);
-  Standard_Real Xp, Yp, Zp, Xd, Yd, Zd;
+  Standard_Real Xp = NAN, Yp = NAN, Zp = NAN, Xd = NAN, Yd = NAN, Zd = NAN;
   pos.Location().Coord (Xp, Yp, Zp);
   pos.XDirection().Coord (Xd, Yd, Zd);
   return Pnt (Xp - C * Xd,  Yp - C * Yd, Zp - C * Zd);
index 19c62e901c61534b77de003b15204d904337a07c..e30688884763f82254344d62b69099a0652f9298 100644 (file)
@@ -19,6 +19,8 @@
 // Modified     15/11/96 : JPI : ajout equivalent surface pour les surfaces canoniques et modif des methodes D0 D1, ... UIso,VIso
 // Modified     18/11/96 : JPI : inversion de l'offsetValue dans UReverse et Vreverse
 
+#include <math.h>
+
 #include <AdvApprox_ApproxAFunction.hxx>
 #include <Geom_BezierSurface.hxx>
 #include <Geom_BSplineCurve.hxx>
@@ -99,7 +101,7 @@ Geom_OffsetSurface::Geom_OffsetSurface (const Handle(Geom_Surface)& theSurf,
 void Geom_OffsetSurface::SetBasisSurface (const Handle(Geom_Surface)& S,
   const Standard_Boolean isNotCheckC0)
 {
-  Standard_Real aUf, aUl, aVf, aVl;
+  Standard_Real aUf = NAN, aUl = NAN, aVf = NAN, aVl = NAN;
   S->Bounds(aUf, aUl, aVf, aVl);
 
   Handle(Geom_Surface) aCheckingSurf = Handle(Geom_Surface)::DownCast(S->Copy());
@@ -437,12 +439,12 @@ public:
   Geom_OffsetSurface_UIsoEvaluator (const Handle(Geom_Surface)& theSurface, const Standard_Real theU)
     : CurrentSurface(theSurface), IsoPar(theU) {}
 
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
     Standard_Real     StartEnd[2],
     Standard_Real    *Parameter,
     Standard_Integer *DerivativeRequest,
     Standard_Real    *Result, // [Dimension]
-    Standard_Integer *ErrorCode);
+    Standard_Integer *ErrorCode) override;
 
 private:
   GeomAdaptor_Surface CurrentSurface;
@@ -479,12 +481,12 @@ public:
   Geom_OffsetSurface_VIsoEvaluator (const Handle(Geom_Surface)& theSurface, const Standard_Real theV)
     : CurrentSurface(theSurface), IsoPar(theV) {}
 
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
     Standard_Real     StartEnd[2],
     Standard_Real    *Parameter,
     Standard_Integer *DerivativeRequest,
     Standard_Real    *Result, // [Dimension]
-    Standard_Integer *ErrorCode);
+    Standard_Integer *ErrorCode) override;
 
 private:
   Handle(Geom_Surface) CurrentSurface;
@@ -542,7 +544,7 @@ Handle(Geom_Curve) Geom_OffsetSurface::UIso (const Standard_Real UU) const
     const Standard_Integer Num1 = 0, Num2 = 0, Num3 = 1;
     Handle(TColStd_HArray1OfReal) T1, T2, T3 = new TColStd_HArray1OfReal(1,Num3);
     T3->Init(Precision::Approximation());
-    Standard_Real U1,U2,V1,V2;
+    Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
     Bounds(U1,U2,V1,V2);
     const GeomAbs_Shape Cont = GeomAbs_C1;
     const Standard_Integer MaxSeg = 100, MaxDeg = 14;
@@ -583,7 +585,7 @@ Handle(Geom_Curve) Geom_OffsetSurface::VIso (const Standard_Real VV) const
     const Standard_Integer Num1 = 0, Num2 = 0, Num3 = 1;
     Handle(TColStd_HArray1OfReal) T1, T2, T3 = new TColStd_HArray1OfReal(1,Num3);
     T3->Init(Precision::Approximation());
-    Standard_Real U1,U2,V1,V2;
+    Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
     Bounds(U1,U2,V1,V2);
     const GeomAbs_Shape Cont = GeomAbs_C1;
     const Standard_Integer MaxSeg = 100, MaxDeg = 14;
@@ -680,7 +682,7 @@ Standard_Real Geom_OffsetSurface::VPeriod() const
 
 Standard_Boolean Geom_OffsetSurface::IsUClosed () const
 {
-  Standard_Boolean UClosed;
+  Standard_Boolean UClosed = 0;
   Handle(Geom_Surface) SBasis = BasisSurface();
 
   if (SBasis->IsKind (STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
@@ -732,7 +734,7 @@ Standard_Boolean Geom_OffsetSurface::IsUClosed () const
 
 Standard_Boolean Geom_OffsetSurface::IsVClosed () const
 {
-  Standard_Boolean VClosed;
+  Standard_Boolean VClosed = 0;
   Handle(Geom_Surface) SBasis = BasisSurface();
 
   if (SBasis->IsKind (STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
@@ -806,7 +808,7 @@ Handle(Geom_Surface) Geom_OffsetSurface::Surface() const
   Handle(Geom_Surface) Result, Base;
   Result.Nullify();
   Handle(Standard_Type) TheType = basisSurf->DynamicType();
-  Standard_Boolean IsTrimmed;
+  Standard_Boolean IsTrimmed = 0;
   Standard_Real U1 = 0., V1 = 0., U2 = 0., V2 = 0.;
 
   // Preambule pour les surface trimmes
@@ -862,7 +864,7 @@ Handle(Geom_Surface) Geom_OffsetSurface::Surface() const
     gp_Ax3 anAxis = C->Position();
     Standard_Boolean isDirect = anAxis.Direct();
     Standard_Real anAlpha = C->SemiAngle();
-    Standard_Real aRadius;
+    Standard_Real aRadius = NAN;
     if (isDirect)
     {
       aRadius = C->RefRadius() + offsetValue * Cos (anAlpha);
index e0c7cb701d24f714e57c16eccb77175401eead0d..e32a646872e60fdacbc7eace7eac4cc60a324fad 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BSplSLib.hxx>
 #include <Convert_GridPolynomialToPoles.hxx>
 #include <Geom_BezierSurface.hxx>
@@ -122,8 +124,8 @@ void Geom_OsculatingSurface::Init(const Handle(Geom_Surface)& BS,
       {
         myKdeg = new TColStd_HSequenceOfInteger();
         Standard_Integer k=0;
-        Standard_Boolean IsQPunc;
-        Standard_Integer UKnot,VKnot;
+        Standard_Boolean IsQPunc = 0;
+        Standard_Integer UKnot = 0,VKnot = 0;
         if (myAlong(1) || myAlong(2)) 
         {
           for (i=1;i<InitSurf->NbUKnots();i++) 
@@ -332,10 +334,10 @@ Standard_Boolean Geom_OsculatingSurface::UOscSurf
   if (myAlong(1) || myAlong(2)) 
   {
     Standard_Integer NU = 1, NV = 1;
-    Standard_Real u1,u2,v1,v2;
+    Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
     t = Standard_False;
     myBasisSurf->Bounds(u1,u2,v1,v2);
-    Standard_Integer NbUK,NbVK;
+    Standard_Integer NbUK = 0,NbVK = 0;
     Standard_Boolean isToSkipSecond = Standard_False;
     if (myBasisSurf->IsKind(STANDARD_TYPE(Geom_BSplineSurface))) 
     {
@@ -391,10 +393,10 @@ Standard_Boolean Geom_OsculatingSurface::VOscSurf
   if (myAlong(3) || myAlong(4)) 
   {
     Standard_Integer NU = 1, NV = 1;
-    Standard_Real u1,u2,v1,v2;
+    Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
     t = Standard_False;
     myBasisSurf->Bounds(u1,u2,v1,v2);
-    Standard_Integer NbUK,NbVK;
+    Standard_Integer NbUK = 0,NbVK = 0;
     Standard_Boolean isToSkipSecond = Standard_False;
     if (myBasisSurf->IsKind(STANDARD_TYPE(Geom_BSplineSurface))) 
     {
@@ -451,9 +453,9 @@ Standard_Boolean  Geom_OsculatingSurface::BuildOsculatingSurface
 #endif
 
   // for cache
-  Standard_Integer MinDegree,
-    MaxDegree ;
-  Standard_Real udeg, vdeg;
+  Standard_Integer MinDegree = 0,
+    MaxDegree = 0 ;
+  Standard_Real udeg = NAN, vdeg = NAN;
   udeg = BS->UDegree();
   vdeg = BS->VDegree();
   if( (IsAlongU() && vdeg <=1) || (IsAlongV() && udeg <=1))
@@ -473,8 +475,8 @@ Standard_Boolean  Geom_OsculatingSurface::BuildOsculatingSurface
     // end for cache
 
     // for polynomial grid 
-    Standard_Integer MaxUDegree, MaxVDegree;
-    Standard_Integer UContinuity, VContinuity;
+    Standard_Integer MaxUDegree = 0, MaxVDegree = 0;
+    Standard_Integer UContinuity = 0, VContinuity = 0;
 
     Handle(TColStd_HArray2OfInteger) NumCoeffPerSurface = 
       new TColStd_HArray2OfInteger(1, 1, 1, 2);
@@ -528,8 +530,8 @@ Standard_Boolean  Geom_OsculatingSurface::BuildOsculatingSurface
     //    end for polynomial grid
 
     //    building the cache
-    Standard_Integer ULocalIndex, VLocalIndex;
-    Standard_Real ucacheparameter, vcacheparameter,uspanlength, vspanlength;
+    Standard_Integer ULocalIndex = 0, VLocalIndex = 0;
+    Standard_Real ucacheparameter = NAN, vcacheparameter = NAN,uspanlength = NAN, vspanlength = NAN;
     TColgp_Array2OfPnt NewPoles(1, BS->NbUPoles(), 1, BS->NbVPoles());
 
     Standard_Integer aUfKnotsLength = BS->NbUPoles() + BS->UDegree() + 1;
@@ -589,7 +591,7 @@ Standard_Boolean  Geom_OsculatingSurface::BuildOsculatingSurface
       BSplSLib::NoWeights(),
       cachepoles,
       BSplSLib::NoWeights());
-    Standard_Integer m, n, index;
+    Standard_Integer m = 0, n = 0, index = 0;
     TColgp_Array2OfPnt OscCoeff(1,OscUNumCoeff , 1, OscVNumCoeff);
 
     if (IsAlongU()) 
@@ -690,12 +692,12 @@ Standard_Boolean Geom_OsculatingSurface::IsQPunctual
   const Standard_Real         TolMin,
   const Standard_Real         TolMax) const
 {
-  Standard_Real U1=0,U2=0,V1=0,V2=0,T;
+  Standard_Real U1=0,U2=0,V1=0,V2=0,T = NAN;
   Standard_Boolean Along = Standard_True;
   S->Bounds(U1,U2,V1,V2);
   gp_Vec D1U,D1V;
   gp_Pnt P;
-  Standard_Real Step,D1NormMax;
+  Standard_Real Step = NAN,D1NormMax = NAN;
   if (IT == GeomAbs_IsoV) 
   {
     Step = (U2 - U1)/10;
index 81fe316741957b00c6a2e8be0f91c86d98ddd4d0..1add1b28c62a16ed1eace366aee934a46a4acfa0 100644 (file)
@@ -100,7 +100,7 @@ private:
 
 
   Handle(Geom_Surface) myBasisSurf;
-  Standard_Real myTol;
+  Standard_Real myTol{};
   Handle(Geom_HSequenceOfBSplineSurface) myOsculSurf1;
   Handle(Geom_HSequenceOfBSplineSurface) myOsculSurf2;
   Handle(TColStd_HSequenceOfInteger) myKdeg;
index 7f0f269069968ad12a59df9c75d083cb43fc44be..c911c5a01d50ab3468feeb99cce87d0ada6b6b59 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Geom_Parabola.hxx>
 #include <gp_Ax1.hxx>
@@ -251,7 +253,7 @@ Vec Geom_Parabola::DN (const Standard_Real U, const Standard_Integer N) const {
 
 Pnt Geom_Parabola::Focus () const {
 
-  Standard_Real Xp, Yp, Zp, Xd, Yd, Zd;
+  Standard_Real Xp = NAN, Yp = NAN, Zp = NAN, Xd = NAN, Yd = NAN, Zd = NAN;
   pos.Location().Coord (Xp, Yp, Zp);
   pos.XDirection().Coord (Xd, Yd, Zd);
   return Pnt (Xp + focalLength*Xd, Yp + focalLength*Yd, Zp + focalLength*Zd);
index 096b8e02d2a4fc9980524ce8ba67fc61cd458eb8..1e0db88916ec422f358fc1c3dd642080ce24c725 100644 (file)
@@ -17,6 +17,8 @@
 // *******************************************************************
 // *******************************************************************
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Geom_BezierSurface.hxx>
 #include <Geom_Curve.hxx>
@@ -246,7 +248,7 @@ void Geom_RectangularTrimmedSurface::SetTrim(const Standard_Real U1,
   
   Standard_Boolean UsameSense = Standard_True;
   Standard_Boolean VsameSense = Standard_True;
-  Standard_Real Udeb, Ufin, Vdeb, Vfin;
+  Standard_Real Udeb = NAN, Ufin = NAN, Vdeb = NAN, Vfin = NAN;
 
   basisSurf->Bounds(Udeb, Ufin, Vdeb, Vfin);
 
index 940efe4a6040ef6b508d99fff30e5a2c653e9071..4811fdfb5db9bdc09ce99c2e3a632f2f1be7ea38 100644 (file)
@@ -300,12 +300,12 @@ private:
   Standard_EXPORT void SetTrim (const Standard_Real U1, const Standard_Real U2, const Standard_Real V1, const Standard_Real V2, const Standard_Boolean UTrim, const Standard_Boolean VTrim, const Standard_Boolean USense, const Standard_Boolean VSense);
 
   Handle(Geom_Surface) basisSurf;
-  Standard_Real utrim1;
-  Standard_Real vtrim1;
-  Standard_Real utrim2;
-  Standard_Real vtrim2;
-  Standard_Boolean isutrimmed;
-  Standard_Boolean isvtrimmed;
+  Standard_Real utrim1{};
+  Standard_Real vtrim1{};
+  Standard_Real utrim2{};
+  Standard_Real vtrim2{};
+  Standard_Boolean isutrimmed{};
+  Standard_Boolean isvtrimmed{};
 
 };
 
index b85f0db838ea3f6c7375d391db6e4c035a9b6ca4..967dc94e88497c23874157db1c43386252b5a83e 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_Curve.hxx>
 #include <Geom_Surface.hxx>
 #include <Geom_UndefinedDerivative.hxx>
@@ -87,7 +89,7 @@ Standard_Real Geom_Surface::UPeriod() const
   Standard_NoSuchObject_Raise_if
     ( !IsUPeriodic(),"Geom_Surface::UPeriod");
 
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   Bounds(U1,U2,V1,V2);
   return ( U2 - U1);
 }
@@ -103,7 +105,7 @@ Standard_Real Geom_Surface::VPeriod() const
   Standard_NoSuchObject_Raise_if
     ( !IsVPeriodic(),"Geom_Surface::VPeriod");
 
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   Bounds(U1,U2,V1,V2);
   return ( V2 - V1);
 }
index a6c708b463703397dde7bc2b66a9e162eab8709a..8fcfeea359699178a89e1c3732a563efa5b6ce0a 100644 (file)
@@ -77,12 +77,12 @@ Handle(Geom_Geometry) Geom_SurfaceOfLinearExtrusion::Copy () const
 
 Geom_SurfaceOfLinearExtrusion::Geom_SurfaceOfLinearExtrusion 
   ( const Handle(Geom_Curve)& C, 
-    const Dir& V) {
+    const Dir& V) : myEvaluator(new GeomEvaluator_SurfaceOfExtrusion(basisCurve, direction)) {
 
    basisCurve = Handle(Geom_Curve)::DownCast(C->Copy());  // Copy 10-03-93
    direction  = V;
    smooth     = C->Continuity();
-   myEvaluator = new GeomEvaluator_SurfaceOfExtrusion(basisCurve, direction);
+   
  }
 
 
index b48ef685e3f4d723f0fabaa9f5d44e944c2a0378..96b4e561dcd1e9bbf0cf7b7b2835b0bb79fc19a0 100644 (file)
@@ -46,7 +46,7 @@ Handle(Geom2d_Geometry) Geom2d_AxisPlacement::Copy() const {
 
 
 
-Geom2d_AxisPlacement::Geom2d_AxisPlacement (const gp_Ax2d& A) { axis = A; }
+Geom2d_AxisPlacement::Geom2d_AxisPlacement (const gp_Ax2d& A) : axis(A) { }
 
 
 Geom2d_AxisPlacement::Geom2d_AxisPlacement (const Pnt2d& P, const Dir2d& V) {
index 9a16ecda5eff8b6b8c5a6d1fade42cd721380340..2676b217881cd02a0f8e1f4314d0fb1cd749047d 100644 (file)
@@ -29,6 +29,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <Geom2d_BSplineCurve.hxx>
 #include <Geom2d_Geometry.hxx>
@@ -123,7 +125,7 @@ Geom2d_BSplineCurve::Geom2d_BSplineCurve
  rational(Standard_False),
  periodic(Periodic),
  deg(Degree),
- maxderivinvok(Standard_False)
poles(new TColgp_HArray1OfPnt2d(1,Poles.Length())), knots(new TColStd_HArray1OfReal(1,Knots.Length())), mults(new TColStd_HArray1OfInteger(1,Mults.Length())), maxderivinvok(Standard_False)
 {
   // check
   
@@ -135,13 +137,13 @@ Geom2d_BSplineCurve::Geom2d_BSplineCurve
 
   // copy arrays
 
-  poles =  new TColgp_HArray1OfPnt2d(1,Poles.Length());
+  
   poles->ChangeArray1() = Poles;
 
-  knots = new TColStd_HArray1OfReal(1,Knots.Length());
+  
   knots->ChangeArray1() = Knots;
 
-  mults = new TColStd_HArray1OfInteger(1,Mults.Length());
+  
   mults->ChangeArray1() = Mults;
 
   UpdateKnots();
@@ -177,7 +179,7 @@ Geom2d_BSplineCurve::Geom2d_BSplineCurve
   if (Weights.Length() != Poles.Length())
     throw Standard_ConstructionError("Geom2d_BSplineCurve: Weights and Poles array size mismatch");
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = Weights.Lower(); i <= Weights.Upper(); i++) {
     if (Weights(i) <= gp::Resolution()) {
       throw Standard_ConstructionError("Geom2d_BSplineCurve: Weights values too small");
@@ -295,7 +297,7 @@ void Geom2d_BSplineCurve::IncreaseMultiplicity
   Handle(TColStd_HArray1OfReal) tk = knots;
   TColStd_Array1OfReal k((knots->Array1())(I1),I1,I2);
   TColStd_Array1OfInteger m(I1,I2);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = I1; i <= I2; i++)
     m(i) = M - mults->Value(i);
   InsertKnots(k,m,Epsilon(1.),Standard_True);
@@ -345,7 +347,7 @@ void  Geom2d_BSplineCurve::InsertKnots(const TColStd_Array1OfReal& Knots,
                                       const Standard_Boolean Add)
 {
   // Check and compute new sizes
-  Standard_Integer nbpoles,nbknots;
+  Standard_Integer nbpoles = 0,nbknots = 0;
 
   if (!BSplCLib::PrepareInsertKnots(deg,periodic,
                                    knots->Array1(),mults->Array1(),
@@ -470,7 +472,7 @@ void Geom2d_BSplineCurve::InsertPoleAfter
 
   TColStd_Array1OfReal& newknots = nknots->ChangeArray1();
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i < nbknots; i++) {
     newknots (i) = cknots(i);
   }
@@ -563,7 +565,7 @@ void Geom2d_BSplineCurve::RemovePole
   if (knotSet == GeomAbs_NonUniform || knotSet == GeomAbs_PiecewiseBezier) 
     throw Standard_ConstructionError("BSpline curve: RemovePole: bad knotSet type");
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Handle(TColStd_HArray1OfReal) nknots =
     new TColStd_HArray1OfReal(1,knots->Length()-1);
   TColStd_Array1OfReal& newknots = nknots->ChangeArray1();
@@ -616,7 +618,7 @@ void Geom2d_BSplineCurve::Reverse ()
 { 
   BSplCLib::Reverse(knots->ChangeArray1());
   BSplCLib::Reverse(mults->ChangeArray1());
-  Standard_Integer last;
+  Standard_Integer last = 0;
   if (periodic)
     last = flatknots->Upper() - deg - 1;
   else
@@ -650,9 +652,9 @@ void Geom2d_BSplineCurve::Segment(const Standard_Real aU1,
   //
   Standard_Real AbsUMax = Max(Abs(FirstParameter()),Abs(LastParameter()));
   Standard_Real Eps = Max (Epsilon(AbsUMax), theTolerance);
-  Standard_Real NewU1, NewU2;
-  Standard_Real U, DU=0;
-  Standard_Integer i, k, index;
+  Standard_Real NewU1 = NAN, NewU2 = NAN;
+  Standard_Real U = NAN, DU=0;
+  Standard_Integer i = 0, k = 0, index = 0;
   //
   //f
   Standard_Real U1 = aU1, U2 = aU2;
@@ -891,7 +893,7 @@ void Geom2d_BSplineCurve::SetOrigin(const Standard_Integer Index)
 {
   if (!periodic)
     throw Standard_NoSuchObject("Geom2d_BSplineCurve::SetOrigin");
-  Standard_Integer i,k;
+  Standard_Integer i = 0,k = 0;
   Standard_Integer first = FirstUKnotIndex();
   Standard_Integer last  = LastUKnotIndex();
 
@@ -978,7 +980,7 @@ void Geom2d_BSplineCurve::SetOrigin(const Standard_Integer Index)
 void Geom2d_BSplineCurve::SetNotPeriodic () 
 { 
   if (periodic) {
-    Standard_Integer NbKnots, NbPoles;
+    Standard_Integer NbKnots = 0, NbPoles = 0;
     BSplCLib::PrepareUnperiodize( deg, mults->Array1(),NbKnots,NbPoles);
     
     Handle(TColgp_HArray1OfPnt2d) npoles 
@@ -1117,7 +1119,7 @@ MovePointAndTangent(const Standard_Real    U,
                    const Standard_Integer EndingCondition,
                    Standard_Integer&      ErrorStatus) 
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
   if (IsPeriodic()) {
     //
     // for the time being do not deal with periodic curves
@@ -1204,7 +1206,7 @@ void Geom2d_BSplineCurve::UpdateKnots()
 
 void Geom2d_BSplineCurve::PeriodicNormalization(Standard_Real&  Parameter) const 
 {
-  Standard_Real Period ;
+  Standard_Real Period = NAN ;
 
   if (periodic) {
     Period = flatknots->Value(flatknots->Upper() - deg) - flatknots->Value (deg + 1) ;
index e186a653f3fd0af2b6fd174c09a778dae054c3cc..baaf89671a20afe780157ce745538a4460af321f 100644 (file)
@@ -837,7 +837,7 @@ private:
   Handle(TColStd_HArray1OfReal) flatknots;
   Handle(TColStd_HArray1OfReal) knots;
   Handle(TColStd_HArray1OfInteger) mults;
-  Standard_Real maxderivinv;
+  Standard_Real maxderivinv{};
   Standard_Boolean maxderivinvok;
 
 
index 0f2dffc95c4ed92fb436d4b87925a6462fe97324..c542eafccdc6d56142182a015559612766e61071 100644 (file)
@@ -653,7 +653,7 @@ void Geom2d_BSplineCurve::Weights
   if (IsRational())
     W = weights->Array1();
   else {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = W.Lower(); i <= W.Upper(); i++)
       W(i) = 1.;
   }
@@ -756,7 +756,7 @@ void Geom2d_BSplineCurve::Resolution (const Standard_Real ToleranceUV,
   {
     if (periodic)
     {
-      Standard_Integer NbKnots, NbPoles;
+      Standard_Integer NbKnots = 0, NbPoles = 0;
       BSplCLib::PrepareUnperiodize (deg, mults->Array1(), NbKnots, NbPoles);
       TColgp_Array1OfPnt2d   new_poles (1, NbPoles);
       TColStd_Array1OfReal new_weights (1, NbPoles);
index 8e64d899ccb2d19a3aa3dc1255b51a1dd163ffab..d5a06090c591c1e45dade1deee05f11dbc0a5354 100644 (file)
@@ -28,6 +28,8 @@
 #define No_Standard_DimensionError
 
 
+#include <math.h>
+
 #include <Geom2d_BezierCurve.hxx>
 #include <Geom2d_Geometry.hxx>
 #include <gp.hxx>
@@ -51,7 +53,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Geom2d_BezierCurve,Geom2d_BoundedCurve)
 //=======================================================================
 static Standard_Boolean Rational(const TColStd_Array1OfReal& W)
 {
-  Standard_Integer i, n = W.Length();
+  Standard_Integer i = 0, n = W.Length();
   Standard_Boolean rat = Standard_False;
   for (i = 1; i < n; i++) {
     rat =  Abs(W(i) - W(i+1)) > gp::Resolution();
@@ -107,7 +109,7 @@ Geom2d_BezierCurve::Geom2d_BezierCurve
   if (Weights.Length() != nbpoles)
     throw Standard_ConstructionError();
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= nbpoles; i++) {
     if (Weights(i) <= gp::Resolution()) {
       throw Standard_ConstructionError();
@@ -204,7 +206,7 @@ void Geom2d_BezierCurve::InsertPoleAfter
     (Index < 0 || Index > nbpoles,
      "Geom2d_BezierCurve::InsertPoleAfter");
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   
   // Insert the pole
   Handle(TColgp_HArray1OfPnt2d) npoles =
@@ -281,7 +283,7 @@ void Geom2d_BezierCurve::RemovePole
     (Index < 1 || Index > nbpoles,
      "Geom2d_BezierCurve::RemovePole");
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   
   // Remove the pole
   Handle(TColgp_HArray1OfPnt2d) npoles =
@@ -324,7 +326,7 @@ void Geom2d_BezierCurve::RemovePole
 void Geom2d_BezierCurve::Reverse ()
 {
   gp_Pnt2d P;
-  Standard_Integer i, nbpoles = NbPoles();
+  Standard_Integer i = 0, nbpoles = NbPoles();
   TColgp_Array1OfPnt2d & cpoles = poles->ChangeArray1();
   
   // reverse poles
@@ -337,7 +339,7 @@ void Geom2d_BezierCurve::Reverse ()
   // reverse weights
   if (IsRational()) {
     TColStd_Array1OfReal & cweights = weights->ChangeArray1();
-    Standard_Real w;
+    Standard_Real w = NAN;
     for (i = 1; i <= nbpoles / 2; i++) {
       w = cweights(i);
       cweights(i) = cweights(nbpoles-i+1);
@@ -719,7 +721,7 @@ void Geom2d_BezierCurve::Weights
   if (IsRational())
     W = weights->Array1();
   else {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 1; i <= nbpoles; i++)
       W(i) = 1.;
   }
index 5a1b0b51efb5ed8c62aa4398f8edafb98e4c77a7..7e2c170bacde3040ebae8d7b69445c20edf0da52 100644 (file)
@@ -340,12 +340,12 @@ private:
   void Init (const Handle(TColgp_HArray1OfPnt2d)& Poles, const Handle(TColStd_HArray1OfReal)& Weights);
 
 
-  Standard_Boolean rational;
-  Standard_Boolean closed;
+  Standard_Boolean rational{};
+  Standard_Boolean closed{};
   Handle(TColgp_HArray1OfPnt2d) poles;
   Handle(TColStd_HArray1OfReal) weights;
-  Standard_Real maxderivinv;
-  Standard_Boolean maxderivinvok;
+  Standard_Real maxderivinv{};
+  Standard_Boolean maxderivinvok{};
 
 
 };
index 3ea205600db295347ec4aa83bd5ffa87613cbfab..055d89aa9f0e815f0d81b430f38cf0ebc9aed941 100644 (file)
@@ -58,10 +58,10 @@ Handle(Geom2d_Geometry) Geom2d_Ellipse::Copy() const
 //purpose  : 
 //=======================================================================
 
-Geom2d_Ellipse::Geom2d_Ellipse (const gp_Elips2d& E) {
+Geom2d_Ellipse::Geom2d_Ellipse (const gp_Elips2d& E) : majorRadius(E.MajorRadius()), minorRadius(E.MinorRadius()) {
  
-  majorRadius = E.MajorRadius();
-  minorRadius = E.MinorRadius();
+  
+  
   pos = E.Axis();
 }
 
index 24b818a58a47702a225a7b903a1b98a56b01e67e..ea3d8e7829065f94fef6c6c0f0d2bbf76cfbf4de 100644 (file)
@@ -60,10 +60,10 @@ Handle(Geom2d_Geometry) Geom2d_Hyperbola::Copy() const
 //purpose  : 
 //=======================================================================
 
-Geom2d_Hyperbola::Geom2d_Hyperbola (const gp_Hypr2d& H) 
+Geom2d_Hyperbola::Geom2d_Hyperbola (const gp_Hypr2d& H) : majorRadius(H.MajorRadius()), minorRadius(H.MinorRadius()) 
 {
-  majorRadius = H.MajorRadius();
-  minorRadius = H.MinorRadius();
+  
+  
   pos = H.Axis();
 }
 
index 2e143a4e24ec31c75349aa1eeec29dd746214fdc..b81d84f22c82f7e3c366dfa7322a0e2890bcc1d0 100644 (file)
@@ -59,9 +59,9 @@ Handle(Geom2d_Geometry) Geom2d_Parabola::Copy() const
 //purpose  : 
 //=======================================================================
 
-Geom2d_Parabola::Geom2d_Parabola (const gp_Parab2d& Prb) 
+Geom2d_Parabola::Geom2d_Parabola (const gp_Parab2d& Prb) : focalLength(Prb.Focal ()) 
 {
-  focalLength = Prb.Focal ();
+  
   pos         = Prb.Axis();
 }
 
index 683f2d4bd5bbf3de768e99fb5b7fcbb3fb646395..0bf299bddf040e9f2331b909ab375a0fe1082cee 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtCC2d.hxx>
 #include <Extrema_POnCurv2d.hxx>
 #include <Geom2dAPI_ExtremaCurveCurve.hxx>
@@ -53,7 +55,7 @@ Geom2dAPI_ExtremaCurveCurve::Geom2dAPI_ExtremaCurveCurve
   if ( myIsDone ) {
     // evaluate the lower distance and its index;
     
-    Standard_Real Dist2, Dist2Min = myExtCC.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtCC.SquareDistance(1);
     myIndex = 1;
 
     for ( Standard_Integer i = 2; i <= myExtCC.NbExt(); i++) {
index 537a1ebb0a5da6f7680a33bc2452ed91d74cecef..f808cf5274cbb067447629191468eddd3821ea49 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Curve.hxx>
 #include <Geom2d_TrimmedCurve.hxx>
 #include <Geom2dAdaptor_Curve.hxx>
@@ -31,9 +33,9 @@
 //function : Geom2dAPI_InterCurveCurve
 //purpose  : 
 //=======================================================================
-Geom2dAPI_InterCurveCurve::Geom2dAPI_InterCurveCurve()
+Geom2dAPI_InterCurveCurve::Geom2dAPI_InterCurveCurve() : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
 }
 
 
@@ -183,7 +185,7 @@ void Geom2dAPI_InterCurveCurve::Segment
   Standard_NullObject_Raise_if(myCurve1.IsNull(),
                                "Geom2dAPI_InterCurveCurve::Segment");
 
-  Standard_Real aU1, aU2, aV1, aV2;
+  Standard_Real aU1 = NAN, aU2 = NAN, aV1 = NAN, aV2 = NAN;
   aU1 = myCurve1->FirstParameter();
   aU2 = myCurve1->LastParameter();
   if (myCurve2.IsNull())
index e5ab9e572c0b252d3ef3dc72ae59113e5b8a1536..1d8ff31faf1ed887af13032620a0aaa70a14c683 100644 (file)
@@ -130,7 +130,7 @@ private:
 
 
 
-  Standard_Boolean myIsDone;
+  Standard_Boolean myIsDone{};
   Handle(Geom2d_Curve) myCurve1;
   Handle(Geom2d_Curve) myCurve2;
   Geom2dInt_GInter myIntersector;
index 106600b900e40269c01ca78920af6c49415e391e..fe73d22a7d960013a4d66aeebf3d780668c0c440 100644 (file)
@@ -16,6 +16,8 @@
 
 // 8-Aug-95 : xab : interpolation uses BSplCLib::Interpolate
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <Geom2d_BSplineCurve.hxx>
 #include <Geom2dAPI_Interpolate.hxx>
@@ -36,9 +38,9 @@
 static Standard_Boolean CheckPoints(const TColgp_Array1OfPnt2d& PointArray,
                                    const Standard_Real    Tolerance) 
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
   Standard_Real tolerance_squared = Tolerance * Tolerance,
-  distance_squared ;
+  distance_squared = NAN ;
   Standard_Boolean result = Standard_True ;
   for (ii = PointArray.Lower() ; result && ii < PointArray.Upper() ; ii++) {
     distance_squared = 
@@ -57,10 +59,10 @@ static Standard_Boolean CheckTangents(
                                const TColStd_Array1OfBoolean& TangentFlags,
                                const Standard_Real            Tolerance) 
 {
-  Standard_Integer ii,
-  index ;
+  Standard_Integer ii = 0,
+  index = 0 ;
   Standard_Real tolerance_squared = Tolerance * Tolerance,
-  distance_squared ;
+  distance_squared = NAN ;
   Standard_Boolean result = Standard_True ;
   index = TangentFlags.Lower() ;
   for (ii = Tangents.Lower(); result && ii <= Tangents.Upper() ; ii++) {
@@ -81,8 +83,8 @@ static Standard_Boolean CheckTangents(
 static Standard_Boolean CheckParameters(const 
                                        TColStd_Array1OfReal&   Parameters) 
 {
-  Standard_Integer ii ;
-  Standard_Real distance ;
+  Standard_Integer ii = 0 ;
+  Standard_Real distance = NAN ;
   Standard_Boolean result = Standard_True ;
   for (ii = Parameters.Lower() ; result && ii < Parameters.Upper() ; ii++) {
     distance = 
@@ -99,9 +101,9 @@ static void  BuildParameters(const Standard_Boolean        PeriodicFlag,
                             const TColgp_Array1OfPnt2d&     PointsArray,
                             Handle(TColStd_HArray1OfReal)& ParametersPtr) 
 {
-  Standard_Integer ii,
-  index ;
-  Standard_Real distance ;
+  Standard_Integer ii = 0,
+  index = 0 ;
+  Standard_Real distance = NAN ;
   Standard_Integer 
     num_parameters = PointsArray.Length() ;
   if (PeriodicFlag) {
@@ -139,10 +141,10 @@ static void BuildPeriodicTangent(
                      const TColStd_Array1OfReal&    ParametersArray)
 {
   Standard_Integer 
-    ii,
-    degree ;
-  Standard_Real *point_array,
-  *parameter_array,
+    ii = 0,
+    degree = 0 ;
+  Standard_Real *point_array = nullptr,
+  *parameter_array = nullptr,
   eval_result[2][2] ;
   
   gp_Vec2d a_vector ;
@@ -183,10 +185,10 @@ static void BuildTangents(const TColgp_Array1OfPnt2d&      PointsArray,
                          TColStd_Array1OfBoolean&       TangentFlags,
                          const TColStd_Array1OfReal&    ParametersArray)
 {
- Standard_Integer ii,
- degree ;
- Standard_Real *point_array,
- *parameter_array,
+ Standard_Integer ii = 0,
+ degree = 0 ;
+ Standard_Real *point_array = nullptr,
+ *parameter_array = nullptr,
  
  eval_result[2][2] ;
  gp_Vec2d a_vector ;
@@ -246,16 +248,16 @@ static void ScaleTangents(const TColgp_Array1OfPnt2d&      PointsArray,
                          const TColStd_Array1OfBoolean& TangentFlags,
                          const TColStd_Array1OfReal&     ParametersArray)
 {
- Standard_Integer ii,
- jj,
+ Standard_Integer ii = 0,
+ jj = 0,
  degree=0,
- index,
- num_points ;
+ index = 0,
+ num_points = 0 ;
 
- Standard_Real *point_array,
- *parameter_array,
+ Standard_Real *point_array = nullptr,
+ *parameter_array = nullptr,
  value[2],
- ratio,
+ ratio = NAN,
  eval_result[2][2] ;
 
  gp_Vec2d a_vector ;
@@ -317,20 +319,18 @@ Geom2dAPI_Interpolate::Geom2dAPI_Interpolate
 myTolerance(Tolerance),
 myPoints(PointsPtr),
 myIsDone(Standard_False),
-myPeriodic(PeriodicFlag),
+myTangents(new TColgp_HArray1OfVec2d(myPoints->Lower(),
+                             myPoints->Upper())), myTangentFlags(new TColStd_HArray1OfBoolean(myPoints->Lower(),
+                                  myPoints->Upper())), myPeriodic(PeriodicFlag),
 myTangentRequest(Standard_False) 
 
 {
- Standard_Integer ii ;
+ Standard_Integer ii = 0 ;
  Standard_Boolean result = 
    CheckPoints(PointsPtr->Array1(),
               Tolerance) ;
- myTangents = 
-     new TColgp_HArray1OfVec2d(myPoints->Lower(),
-                             myPoints->Upper()) ;
- myTangentFlags =
-      new TColStd_HArray1OfBoolean(myPoints->Lower(),
-                                  myPoints->Upper()) ;
 
  if (!result) {
    throw Standard_ConstructionError();
@@ -364,7 +364,7 @@ myParameters(ParametersPtr),
 myPeriodic(PeriodicFlag),
 myTangentRequest(Standard_False) 
 {
- Standard_Integer ii ;
+ Standard_Integer ii = 0 ;
     
      
  Standard_Boolean result = 
@@ -409,8 +409,8 @@ void Geom2dAPI_Interpolate::Load(
    const Standard_Boolean Scale)
 
 {
- Standard_Boolean result ;
- Standard_Integer ii ;
+ Standard_Boolean result = 0 ;
+ Standard_Integer ii = 0 ;
  myTangentRequest = Standard_True ;
  myTangentFlags = TangentFlagsPtr ;
  if (Tangents.Length() != myPoints->Length() ||
@@ -450,7 +450,7 @@ void Geom2dAPI_Interpolate::Load(const gp_Vec2d& InitialTangent,
                               const gp_Vec2d& FinalTangent,
              const Standard_Boolean Scale)
 {
-  Standard_Boolean result ;
+  Standard_Boolean result = 0 ;
   myTangentRequest = Standard_True ;
   myTangentFlags->SetValue(1,Standard_True) ;
   myTangentFlags->SetValue(myPoints->Length(),Standard_True) ;
@@ -492,20 +492,20 @@ void Geom2dAPI_Interpolate::Perform()
 
 void Geom2dAPI_Interpolate::PerformPeriodic()
 { 
-  Standard_Integer degree,
-  ii,
-  jj,
-  index,
-  index1,
+  Standard_Integer degree = 0,
+  ii = 0,
+  jj = 0,
+  index = 0,
+  index1 = 0,
 //  index2,
-  mult_index,
-  half_order,
-  inversion_problem,
-  num_points,
-  num_distinct_knots,
-  num_poles  ;
+  mult_index = 0,
+  half_order = 0,
+  inversion_problem = 0,
+  num_points = 0,
+  num_distinct_knots = 0,
+  num_poles = 0  ;
  
-  Standard_Real period ;
+  Standard_Real period = NAN ;
 
   gp_Pnt2d a_point ;
 
@@ -690,18 +690,18 @@ void Geom2dAPI_Interpolate::PerformPeriodic()
 
 void Geom2dAPI_Interpolate::PerformNonPeriodic() 
 {
-  Standard_Integer degree,
-  ii,
-  jj,
-  index,
-  index1,
-  index2,
-  index3,
-  mult_index,
-  inversion_problem,
-  num_points,
-  num_distinct_knots,
-  num_poles  ;
+  Standard_Integer degree = 0,
+  ii = 0,
+  jj = 0,
+  index = 0,
+  index1 = 0,
+  index2 = 0,
+  index3 = 0,
+  mult_index = 0,
+  inversion_problem = 0,
+  num_points = 0,
+  num_distinct_knots = 0,
+  num_poles = 0  ;
   
   gp_Pnt2d a_point ;
 
index 6c3f7c90f22c01edd50f2ee8afc7286a4d62d920..37f882483d1e76585706b8b3de58f08a5683c764 100644 (file)
@@ -34,9 +34,9 @@
 //function : Geom2dAPI_PointsToBSpline
 //purpose  : 
 //=======================================================================
-Geom2dAPI_PointsToBSpline::Geom2dAPI_PointsToBSpline()
+Geom2dAPI_PointsToBSpline::Geom2dAPI_PointsToBSpline() : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
 }
 
 
@@ -84,9 +84,9 @@ Geom2dAPI_PointsToBSpline::Geom2dAPI_PointsToBSpline
    const Standard_Integer    DegMin, 
    const Standard_Integer    DegMax,
    const GeomAbs_Shape       Continuity,
-   const Standard_Real       Tol2D)
+   const Standard_Real       Tol2D) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
   Init(Points,ParType,DegMin,DegMax,Continuity,Tol2D);
 }
 
@@ -101,9 +101,9 @@ Geom2dAPI_PointsToBSpline::Geom2dAPI_PointsToBSpline
    const Standard_Integer      DegMin, 
    const Standard_Integer      DegMax,
    const GeomAbs_Shape         Continuity,
-   const Standard_Real         Tol2D)
+   const Standard_Real         Tol2D) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
   Init(Points,Params,DegMin,DegMax,Continuity,Tol2D);
 }
 
@@ -120,9 +120,9 @@ Geom2dAPI_PointsToBSpline::Geom2dAPI_PointsToBSpline
    const Standard_Real         W3,
    const Standard_Integer      DegMax,
    const GeomAbs_Shape         Continuity,
-   const Standard_Real         Tol2D)
+   const Standard_Real         Tol2D) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
   Init(Points,W1,W2,W3,DegMax,Continuity,Tol2D);
 }
 
@@ -201,7 +201,7 @@ void Geom2dAPI_PointsToBSpline::Init
   TColgp_Array1OfPnt2d Points(YValues.Lower(),YValues.Upper());
   math_Vector Param(YValues.Lower(),YValues.Upper());
   Standard_Real length = DX * (YValues.Upper() - YValues.Lower());
-  Standard_Integer i;
+  Standard_Integer i = 0;
   
   for (i = YValues.Lower(); i <= YValues.Upper(); i++) {
     Param(i) = (X0+(i-1)*DX)/(X0+length);
@@ -383,7 +383,7 @@ void Geom2dAPI_PointsToBSpline::Init
    const GeomAbs_Shape         Continuity,
    const Standard_Real         Tol2D)
 {
-  Standard_Integer NbPoint = Points.Length(), i;
+  Standard_Integer NbPoint = Points.Length(), i = 0;
 
  
   Standard_Integer nbit = 2;
index 1538278620bd488460eddd28d36e45003cb13244..f555b39ac4536e2c579095339299cd0aa8b7bac3 100644 (file)
@@ -180,7 +180,7 @@ private:
 
 
 
-  Standard_Boolean myIsDone;
+  Standard_Boolean myIsDone{};
   Handle(Geom2d_BSplineCurve) myCurve;
 
 
index 1e9703b676e198a08ecd5f1469c9a03e3ca58d8c..a38a2dbd7e68c2a24c5ef8ca47599260e94a996f 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtPC2d.hxx>
 #include <Geom2dAPI_ProjectPointOnCurve.hxx>
 #include <gp_Pnt2d.hxx>
@@ -26,9 +28,9 @@
 //purpose  : 
 //=======================================================================
 Geom2dAPI_ProjectPointOnCurve::Geom2dAPI_ProjectPointOnCurve()
-: myIndex(-1)
+: myIsDone(Standard_False), myIndex(-1)
 {
-  myIsDone = Standard_False;
+  
 }
 
 
@@ -96,7 +98,7 @@ void Geom2dAPI_ProjectPointOnCurve::Init
   // evaluate the lower distance and its index;
 
   if ( myIsDone) {
-    Standard_Real Dist2, Dist2Min = myExtPC.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtPC.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtPC.NbExt(); i++) {
index a3f00ad3fa44c206554bb65f3fdb915d7f0c9381..1c3c903b4f56201d88d8de8a12d4857796cdac80 100644 (file)
@@ -122,8 +122,8 @@ Standard_EXPORT operator Standard_Real() const;
 
 private:
 
-  Standard_Boolean myIsDone;
-  Standard_Integer myIndex;
+  Standard_Boolean myIsDone{};
+  Standard_Integer myIndex{};
   Extrema_ExtPC2d myExtPC;
   Geom2dAdaptor_Curve myC;
 
index 10b014ae4380f424157431b37f56d313b3b80cee..91337b78d8a0add701064fe8037492cb792641b2 100644 (file)
@@ -21,6 +21,8 @@
 #define No_Standard_RangeError
 #define No_Standard_OutOfRange
 
+#include <math.h>
+
 #include <Geom2dAdaptor_Curve.hxx>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -96,7 +98,7 @@ GeomAbs_Shape Geom2dAdaptor_Curve::LocalContinuity(const Standard_Real U1,
        Standard_Integer Nb = myBSplineCurve->NbKnots();
        Standard_Integer Index1 = 0;
        Standard_Integer Index2 = 0;
-       Standard_Real newFirst, newLast;
+       Standard_Real newFirst = NAN, newLast = NAN;
        TColStd_Array1OfReal    TK(1,Nb);
        TColStd_Array1OfInteger TM(1,Nb);
        myBSplineCurve->Knots(TK);
@@ -110,7 +112,7 @@ GeomAbs_Shape Geom2dAdaptor_Curve::LocalContinuity(const Standard_Real U1,
        }
        if ( Abs(newLast-TK(Index2))<Precision::PConfusion())
         Index2--;
-       Standard_Integer MultMax;
+       Standard_Integer MultMax = 0;
        // attention aux courbes peridiques.
        if ( myBSplineCurve->IsPeriodic() && Index1 == Nb )
         Index1 = 1;
@@ -310,7 +312,7 @@ Standard_Integer Geom2dAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const
     }
     
     Standard_Integer aDegree = myBSplineCurve->Degree();
-    Standard_Integer aCont;
+    Standard_Integer aCont = 0;
 
     switch (S)
     {
@@ -384,7 +386,7 @@ void Geom2dAdaptor_Curve::Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shap
     }
 
     Standard_Integer aDegree = myBSplineCurve->Degree();
-    Standard_Integer aCont;
+    Standard_Integer aCont = 0;
 
     switch (S)
     {
@@ -770,12 +772,12 @@ Standard_Real Geom2dAdaptor_Curve::Resolution(const Standard_Real Ruv) const {
     return Ruv / Handle(Geom2d_Ellipse)::DownCast (myCurve)->MajorRadius();
   }
   case GeomAbs_BezierCurve: {
-    Standard_Real res;
+    Standard_Real res = NAN;
     Handle(Geom2d_BezierCurve)::DownCast (myCurve)->Resolution(Ruv,res);
     return res;
   }
   case GeomAbs_BSplineCurve: {
-    Standard_Real res;
+    Standard_Real res = NAN;
     Handle(Geom2d_BSplineCurve)::DownCast (myCurve)->Resolution(Ruv,res);
     return res;
   }
index a120df013b3feaa88d0e36f2c40337429cd4e69a..24e9b15a2b69ffb6e6e61fcaf83659ead39d3564 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Geom2dConvert.hxx>
 
 #include <Convert_CircleToBSplineCurve.hxx>
@@ -85,7 +87,7 @@ const Convert_ConicToBSplineCurve&  Convert
    Array1OfReal    Weights (1, NbPoles);
    Array1OfReal    Knots   (1, NbKnots);
    Array1OfInteger Mults   (1, NbKnots);
-   Standard_Integer i;
+   Standard_Integer i = 0;
    for (i = 1; i <= NbPoles; i++) {
      Poles   (i) = Convert.Pole (i);
      Weights (i) = Convert.Weight (i);         
@@ -467,11 +469,11 @@ public:
   Geom2dConvert_law_evaluator (const Handle(Geom2d_BSplineCurve)& theAncore)
   : myAncore (theAncore) {}
 
-  virtual void Evaluate (const Standard_Integer theDerivativeRequest,
+  void Evaluate (const Standard_Integer theDerivativeRequest,
                          const Standard_Real*   theStartEnd,
                          const Standard_Real    theParameter,
                          Standard_Real&         theResult,
-                         Standard_Integer&      theErrorCode) const
+                         Standard_Integer&      theErrorCode) const override
   {
     theErrorCode = 0;
     if (!myAncore.IsNull() && 
@@ -514,10 +516,10 @@ static Handle(Geom2d_BSplineCurve) MultNumandDenom(const Handle(Geom2d_BSplineCu
   Handle(Geom2d_BSplineCurve)        res;
   Handle(TColStd_HArray1OfReal)      resKnots;
   Handle(TColStd_HArray1OfInteger)   resMults; 
-  Standard_Real                      start_value,end_value;
-  Standard_Integer                   resNbPoles,degree,
-                                     ii,jj,
-                                    aStatus;
+  Standard_Real                      start_value = NAN,end_value = NAN;
+  Standard_Integer                   resNbPoles = 0,degree = 0,
+                                     ii = 0,jj = 0,
+                                    aStatus = 0;
   
   BS->Knots(BSKnots);                            
   BS->Multiplicities(BSMults);
@@ -580,8 +582,8 @@ static Handle(Geom2d_BSplineCurve) MultNumandDenom(const Handle(Geom2d_BSplineCu
 
 static void Pretreatment(TColGeom2d_Array1OfBSplineCurve& tab)
 
-{Standard_Integer i,j;
- Standard_Real a;
+{Standard_Integer i = 0,j = 0;
+ Standard_Real a = NAN;
 
  for (i=0;i<=(tab.Length()-1);i++){
    if (tab(i)->IsRational()) {
@@ -634,7 +636,7 @@ static Standard_Boolean NeedToBeTreated(const Handle(Geom2d_BSplineCurve)& BS)
 
 static Standard_Boolean Need2DegRepara(const TColGeom2d_Array1OfBSplineCurve& tab)
 
-{Standard_Integer        i;
+{Standard_Integer        i = 0;
  gp_Vec2d                Vec1,Vec2;
  gp_Pnt2d                Pint;
  Standard_Real           Rapport=1.0e0;
@@ -657,7 +659,7 @@ static Standard_Boolean Need2DegRepara(const TColGeom2d_Array1OfBSplineCurve& ta
 
 static Standard_Integer Indexmin(const TColGeom2d_Array1OfBSplineCurve& tab)
 {
-  Standard_Integer i,index=0,degree;
+  Standard_Integer i = 0,index=0,degree = 0;
   
   degree=tab(0)->Degree();
   for (i=0;i<=tab.Length()-1;i++)
@@ -679,7 +681,7 @@ static void ReorderArrayOfG1(TColGeom2d_Array1OfBSplineCurve&    ArrayOfCurves,
                           const Standard_Integer              StartIndex,
                           const Standard_Real                 ClosedTolerance)
 
-{Standard_Integer i;
+{Standard_Integer i = 0;
  TColGeom2d_Array1OfBSplineCurve  ArraybisOfCurves(0,ArrayOfCurves.Length()-1);
  TColStd_Array1OfReal             ArraybisOfToler(0,ArrayOfToler.Length()-1);
  TColStd_Array1OfBoolean          tabbisG1(0,tabG1.Length()-1);
@@ -764,14 +766,14 @@ static GeomAbs_Shape Continuity(const Handle(Geom2d_Curve)& C1,
                                const Standard_Real ta)
 {
   GeomAbs_Shape cont = GeomAbs_C0;
-  Standard_Integer index1,
-                   index2 ;
-  Standard_Real  tolerance,value ;
+  Standard_Integer index1 = 0,
+                   index2 = 0 ;
+  Standard_Real  tolerance = NAN,value = NAN ;
 //  Standard_Boolean fini = Standard_False;
   gp_Vec2d d1,d2;
 //  gp_Dir2d dir1,dir2;
   gp_Pnt2d point1, point2 ;
-  Standard_Integer cont1, cont2 ;
+  Standard_Integer cont1 = 0, cont2 = 0 ;
   GeomAbs_Shape gcont1 = C1->Continuity(), gcont2 = C2->Continuity();
   cont1 = GeomAbsToInteger(gcont1) ;
   cont2 = GeomAbsToInteger(gcont2) ;
@@ -890,11 +892,11 @@ public:
     memcpy(myPolynomialCoefficient, thePolynomialCoefficient, sizeof(myPolynomialCoefficient));
   }
 
-  virtual void Evaluate (const Standard_Integer theDerivativeRequest,
+  void Evaluate (const Standard_Integer theDerivativeRequest,
                          const Standard_Real*   /*theStartEnd*/,
                          const Standard_Real    theParameter,
                          Standard_Real&         theResult,
-                         Standard_Integer&      theErrorCode) const
+                         Standard_Integer&      theErrorCode) const override
   {
     theErrorCode = 0;
     PLib::EvalPolynomial (theParameter,
@@ -907,7 +909,7 @@ public:
 
 private:
 
-  Standard_Real myPolynomialCoefficient[3];
+  Standard_Real myPolynomialCoefficient[3]{};
 
 };
 
@@ -923,13 +925,13 @@ void  Geom2dConvert::ConcatG1(TColGeom2d_Array1OfBSplineCurve&           ArrayOf
                              const Standard_Real                        ClosedTolerance) 
 
 {Standard_Integer             nb_curve=ArrayOfCurves.Length(),
-                              nb_vertexG1,
+                              nb_vertexG1 = 0,
                               nb_group=0,
-                              index=0,i,ii,j,jj,
-                              indexmin,
+                              index=0,i = 0,ii = 0,j = 0,jj = 0,
+                              indexmin = 0,
                               nb_vertex_group0=0;
- Standard_Real                lambda,                      //coeff de raccord G1
-                              First,PreLast=0;
+ Standard_Real                lambda = NAN,                      //coeff de raccord G1
+                              First = NAN,PreLast=0;
  gp_Vec2d                     Vec1,Vec2;                   //vecteurs tangents consecutifs
  gp_Pnt2d                     Pint;
  Handle(Geom2d_BSplineCurve)  Curve1,Curve2;                       
@@ -986,7 +988,7 @@ void  Geom2dConvert::ConcatG1(TColGeom2d_Array1OfBSplineCurve&           ArrayOf
  ArrayOfConcatenated = new 
    TColGeom2d_HArray1OfBSplineCurve(0,nb_group-1);
 
- Standard_Boolean       fusion;
+ Standard_Boolean       fusion = 0;
 // Standard_Integer       k=0;
  index=0;
  Pretreatment(ArrayOfCurves);
@@ -1022,7 +1024,7 @@ void  Geom2dConvert::ConcatG1(TColGeom2d_Array1OfBSplineCurve&           ArrayOf
        Curve1->D1(Curve1->LastParameter(),Pint,Vec2);
        ArrayOfCurves(0)->D1(ArrayOfCurves(0)->FirstParameter(),Pint,Vec1);
        Standard_Real lambda2=Vec1.Magnitude()/Vec2.Magnitude();
-       Standard_Real tmax,a,b,c,
+       Standard_Real tmax = NAN,a = NAN,b = NAN,c = NAN,
        umin=Curve1->FirstParameter(),umax=Curve1->LastParameter();
        tmax=2*lambda*(umax-umin)/(1+lambda*lambda2);
        a=(lambda*lambda2-1)/(2*lambda*tmax);
@@ -1050,7 +1052,7 @@ void  Geom2dConvert::ConcatG1(TColGeom2d_Array1OfBSplineCurve&           ArrayOf
        
        BSplCLib::KnotSequence(KnotC1,KnotC1Mults,FlatKnots);
        TColgp_Array1OfPnt2d NewPoles(1,FlatKnots.Length()-(2*Curve1->Degree()+1));
-       Standard_Integer      aStatus;
+       Standard_Integer      aStatus = 0;
        TColStd_Array1OfReal Curve1Weights(1,Curve1->NbPoles());
        Curve1->Weights(Curve1Weights);
        for (ii=1;ii<=Curve1->NbPoles();ii++)
@@ -1172,13 +1174,13 @@ void  Geom2dConvert::ConcatC1(TColGeom2d_Array1OfBSplineCurve&           ArrayOf
                              const Standard_Real                        AngularTolerance) 
 
 {Standard_Integer             nb_curve=ArrayOfCurves.Length(),
-                              nb_vertexG1,
+                              nb_vertexG1 = 0,
                               nb_group=0,
-                              index=0,i,ii,j,jj,
-                              indexmin,
+                              index=0,i = 0,ii = 0,j = 0,jj = 0,
+                              indexmin = 0,
                               nb_vertex_group0=0;
- Standard_Real                lambda,                      //coeff de raccord G1
-                              First,PreLast=0;
+ Standard_Real                lambda = NAN,                      //coeff de raccord G1
+                              First = NAN,PreLast=0;
  gp_Vec2d                     Vec1,Vec2;                   //vecteurs tangents consecutifs
  gp_Pnt2d                     Pint;
  Handle(Geom2d_BSplineCurve)  Curve1,Curve2;                       
@@ -1242,7 +1244,7 @@ void  Geom2dConvert::ConcatC1(TColGeom2d_Array1OfBSplineCurve&           ArrayOf
  ArrayOfIndices = new TColStd_HArray1OfInteger(0,nb_group);
  ArrayOfConcatenated = new TColGeom2d_HArray1OfBSplineCurve(0,nb_group-1);
 
- Standard_Boolean       fusion;
+ Standard_Boolean       fusion = 0;
  Standard_Integer       k=0;
  index=0;
  Pretreatment(ArrayOfCurves);
@@ -1287,7 +1289,7 @@ void  Geom2dConvert::ConcatC1(TColGeom2d_Array1OfBSplineCurve&           ArrayOf
         Curve1->D1(Curve1->LastParameter(),Pint,Vec2);
         ArrayOfCurves(0)->D1(ArrayOfCurves(0)->FirstParameter(),Pint,Vec1);
         Standard_Real lambda2=Vec1.Magnitude()/Vec2.Magnitude();
-        Standard_Real tmax,a,b,c,
+        Standard_Real tmax = NAN,a = NAN,b = NAN,c = NAN,
         umin=Curve1->FirstParameter(),umax=Curve1->LastParameter();
         tmax=2*lambda*(umax-umin)/(1+lambda*lambda2);
         a=(lambda*lambda2-1)/(2*lambda*tmax);
@@ -1315,7 +1317,7 @@ void  Geom2dConvert::ConcatC1(TColGeom2d_Array1OfBSplineCurve&           ArrayOf
         
         BSplCLib::KnotSequence(KnotC1,KnotC1Mults,FlatKnots);
          TColgp_Array1OfPnt2d  NewPoles(1, FlatKnots.Length() - (aNewCurveDegree + 1));
-        Standard_Integer      aStatus;
+        Standard_Integer      aStatus = 0;
         TColStd_Array1OfReal Curve1Weights(1,Curve1->NbPoles());
         Curve1->Weights(Curve1Weights);
         for (ii=1;ii<=Curve1->NbPoles();ii++)
@@ -1414,12 +1416,12 @@ void Geom2dConvert::C0BSplineToC1BSplineCurve(Handle(Geom2d_BSplineCurve)& BS,
 {
   TColStd_Array1OfInteger          BSMults(1,BS->NbKnots());
  TColStd_Array1OfReal             BSKnots(1,BS->NbKnots());
- Standard_Integer                 i,j,nbcurveC1=1;
- Standard_Real                    U1,U2;
+ Standard_Integer                 i = 0,j = 0,nbcurveC1=1;
+ Standard_Real                    U1 = NAN,U2 = NAN;
  Standard_Boolean                 closed_flag = Standard_False ;
  gp_Pnt2d                         point1, point2;
  gp_Vec2d                         V1,V2;
- Standard_Boolean                 fusion;
+ Standard_Boolean                 fusion = 0;
 
  BS->Knots(BSKnots);
  BS->Multiplicities(BSMults);
@@ -1509,8 +1511,8 @@ void Geom2dConvert::C0BSplineToArrayOfC1BSplineCurve(const Handle(Geom2d_BSpline
 {
   TColStd_Array1OfInteger          BSMults(1,BS->NbKnots());
   TColStd_Array1OfReal             BSKnots(1,BS->NbKnots());
-  Standard_Integer                 i,j,nbcurveC1=1;
-  Standard_Real                    U1,U2;
+  Standard_Integer                 i = 0,j = 0,nbcurveC1=1;
+  Standard_Real                    U1 = NAN,U2 = NAN;
   Standard_Boolean                 closed_flag = Standard_False ;
   gp_Pnt2d                         point1, point2;
   gp_Vec2d                         V1,V2;
index 4dd6dfc96d8b16ec8e1cc6877b5b5e5e1ec764d2..01576259b03eac465c16be29da9aa18854d09d44 100644 (file)
@@ -14,6 +14,8 @@
 // performance of this software, and specifically disclaims any responsibility 
 // for any damages, special or consequential, connected with its use. 
 
+#include <math.h>
+
 #include <Geom2dConvert_ApproxArcsSegments.hxx>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -182,7 +184,7 @@ Standard_Boolean Geom2dConvert_ApproxArcsSegments::makeArc
     const Handle(Geom2d_Circle) Circ = new Geom2d_Circle(aCir);
 
       //calculation parameters first and last points of arc.
-    Standard_Real anAlpha1, anAlpha2;
+    Standard_Real anAlpha1 = NAN, anAlpha2 = NAN;
     if (isFirst) {
       anAlpha1 = ElCLib::Parameter(aCir, aP1);
       anAlpha2 = ElCLib::Parameter(aCir, aP2);
@@ -290,7 +292,7 @@ Standard_Boolean Geom2dConvert_ApproxArcsSegments::makeFreeform()
 
   TColGeom2d_SequenceOfCurve aSeqLinearParts;
   Standard_Boolean isDone (Standard_True);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i < seqParamPoints.Length(); i += 2)
   {
     Handle(Geom2d_Curve) aLineCurve;
@@ -372,7 +374,7 @@ Standard_Boolean Geom2dConvert_ApproxArcsSegments::makeFreeform()
 
 void Geom2dConvert_ApproxArcsSegments::getLinearParts (Geom2dConvert_SequenceOfPPoint& theSeqPar)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   // Fill the sequences with values along the curve
   mySeqParams.Clear();
   Adaptor2d_Curve2d& myCurveMut = const_cast<Adaptor2d_Curve2d&>(myCurve);
index 54831879a25a29f9887ec8fa44e3e46d944eaeb1..a3f1f4d3c19759c553d479ba891e0a5b0ddd6c5f 100644 (file)
@@ -39,16 +39,16 @@ class Geom2dConvert_ApproxCurve_Eval : public AdvApprox_EvaluatorFunction
                                   Standard_Real First, Standard_Real Last)
     : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Adaptor2d_Curve2d) fonct;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void Geom2dConvert_ApproxCurve_Eval::Evaluate (Standard_Integer *Dimension,
index 7d51b860ae371ab6272df5df170795ae8f3f1d91..3f7b7bd03f5747f8bd114cf5349d50d53d3794bb 100644 (file)
@@ -88,10 +88,10 @@ private:
   Standard_EXPORT void Approximate (const Handle(Adaptor2d_Curve2d)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, const Standard_Integer theMaxDegree);
 
 
-  Standard_Boolean myIsDone;
-  Standard_Boolean myHasResult;
+  Standard_Boolean myIsDone{};
+  Standard_Boolean myHasResult{};
   Handle(Geom2d_BSplineCurve) myBSplCurve;
-  Standard_Real myMaxError;
+  Standard_Real myMaxError{};
 
 
 };
index 4c9a94e089619e21ed66a89efa97327b110761d2..ab226ef5937152a6fd009f80a92c18da3c000e8d 100644 (file)
@@ -60,7 +60,7 @@ Geom2dConvert_BSplineCurveToBezierCurve::Geom2dConvert_BSplineCurveToBezierCurve
   Standard_Real Uf = U1, Ul = U2; 
   Standard_Real PTol = ParametricTolerance/2 ;
 
-  Standard_Integer I1, I2;
+  Standard_Integer I1 = 0, I2 = 0;
   myCurve = Handle(Geom2d_BSplineCurve)::DownCast(BasisCurve->Copy());
   if(myCurve->IsPeriodic()) myCurve->SetNotPeriodic();
 
@@ -138,7 +138,7 @@ void Geom2dConvert_BSplineCurveToBezierCurve::Arcs
 void Geom2dConvert_BSplineCurveToBezierCurve::Knots
      (TColStd_Array1OfReal& TKnots) const
 {
- Standard_Integer ii, kk;
+ Standard_Integer ii = 0, kk = 0;
   for (ii = 1, kk = TKnots.Lower();
        ii <=myCurve->NbKnots(); ii++, kk++)
     TKnots(kk) = myCurve->Knot(ii);
index f70189dd0c6b5ad26dc1265abb99e4213aef0876..49884603557b193a6cbc9904ce585ec6c25eedb6 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_BoundedCurve.hxx>
 #include <Geom2d_BSplineCurve.hxx>
 #include <Geom2dConvert.hxx>
@@ -150,9 +152,9 @@ void Geom2dConvert_CompCurveToBSplineCurve::Add(
   if (SecondCurve->Degree() < Deg)  { SecondCurve->IncreaseDegree(Deg); }
 
 // Declarationd
-  Standard_Real L1, L2, U_de_raccord;
-  Standard_Integer ii, jj;
-  Standard_Real  Ratio=1, Ratio1, Ratio2, Delta1, Delta2;
+  Standard_Real L1 = NAN, L2 = NAN, U_de_raccord = NAN;
+  Standard_Integer ii = 0, jj = 0;
+  Standard_Real  Ratio=1, Ratio1 = NAN, Ratio2 = NAN, Delta1 = NAN, Delta2 = NAN;
   Standard_Integer NbP1 = FirstCurve->NbPoles(), NbP2 = SecondCurve->NbPoles();
   Standard_Integer NbK1 = FirstCurve->NbKnots(), NbK2 = SecondCurve->NbKnots();
   TColStd_Array1OfReal Noeuds (1, NbK1+NbK2-1);
index 6cbe24e2f4b66b872d2784308788e1c533c55c95..d9ea697e9870c175b6e8f3629376351c309d637e 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Geom2dEvaluator_OffsetCurve.hxx>
 #include <Geom2dEvaluator.hxx>
 #include <Geom2dAdaptor_Curve.hxx>
@@ -211,8 +213,8 @@ Standard_Boolean Geom2dEvaluator_OffsetCurve::AdjustDerivative(
   static const Standard_Integer aMaxDerivOrder = 3;
 
   Standard_Boolean isDirectionChange = Standard_False;
-  Standard_Real anUinfium;
-  Standard_Real anUsupremum;
+  Standard_Real anUinfium = NAN;
+  Standard_Real anUsupremum = NAN;
   if (!myBaseAdaptor.IsNull())
   {
     anUinfium = myBaseAdaptor->FirstParameter();
@@ -225,7 +227,7 @@ Standard_Boolean Geom2dEvaluator_OffsetCurve::AdjustDerivative(
   }
 
   static const Standard_Real DivisionFactor = 1.e-3;
-  Standard_Real du;
+  Standard_Real du = NAN;
   if ((anUsupremum >= RealLast()) || (anUinfium <= RealFirst()))
     du = 0.0;
   else
@@ -242,7 +244,7 @@ Standard_Boolean Geom2dEvaluator_OffsetCurve::AdjustDerivative(
     V = BaseDN(theU, ++anIndex);
   } while ((V.SquareMagnitude() <= aTol) && anIndex < aMaxDerivOrder);
 
-  Standard_Real u;
+  Standard_Real u = NAN;
 
   if (theU - anUinfium < aDelta)
     u = theU + aDelta;
index de5dc5f3a7c9a266fb934e3403f7931e96189510..179e7f8e61e6508b0616c5a1760f5749c9c19914 100644 (file)
@@ -42,7 +42,7 @@ Geom2dGcc_Circ2d2TanOn::
                           const Standard_Real                ParamOn    ):
   WellDone(Standard_False),
   cirsol(1,8)   ,
-  qualifier1(1,8),
+  NbrSol(0), qualifier1(1,8),
   qualifier2(1,8),
   TheSame1(1,8) ,
   TheSame2(1,8) ,
@@ -53,23 +53,23 @@ Geom2dGcc_Circ2d2TanOn::
   par2sol(1,8)  ,
   pararg1(1,8)  ,
   pararg2(1,8)  ,
-  parcen3(1,8)
+  parcen3(1,8), Invert(Standard_False)
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
   GeomAbs_CurveType Type3 = OnCurve.GetType();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
-  Handle(Geom2d_Curve) Con = OnCurve.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  Invert = Standard_False;
-  NbrSol = 0;
+  
+  
   if ((Type1 == GeomAbs_Line || Type1 == GeomAbs_Circle) &&
       (Type2 == GeomAbs_Line || Type2 == GeomAbs_Circle)) {
     if (Type3 == GeomAbs_Line || Type3 == GeomAbs_Circle) {
@@ -376,7 +376,7 @@ Geom2dGcc_Circ2d2TanOn::
                           const Standard_Real                ParamOn    ):
   WellDone(Standard_False),
   cirsol(1,8)   ,
-  qualifier1(1,8),
+  NbrSol(0), qualifier1(1,8),
   qualifier2(1,8),
   TheSame1(1,8) ,
   TheSame2(1,8) ,
@@ -387,20 +387,20 @@ Geom2dGcc_Circ2d2TanOn::
   par2sol(1,8)  ,
   pararg1(1,8)  ,
   pararg2(1,8)  ,
-  parcen3(1,8) 
+  parcen3(1,8), Invert(Standard_False) 
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type3 = OnCurve.GetType();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) Con = OnCurve.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  Invert = Standard_False;
-  NbrSol = 0;
+  
+  
   if (Type1 == GeomAbs_Line || Type1 == GeomAbs_Circle) {
     if (Type3 == GeomAbs_Line || Type3 == GeomAbs_Circle) {
       gp_Pnt2d pnt(Point->Pnt2d());
@@ -567,7 +567,7 @@ Geom2dGcc_Circ2d2TanOn::
                           const Standard_Real                Tolerance  ):
   WellDone(Standard_False),
   cirsol(1,8)   ,
-  qualifier1(1,8),
+  NbrSol(0), qualifier1(1,8),
   qualifier2(1,8),
   TheSame1(1,8) ,
   TheSame2(1,8) ,
@@ -578,17 +578,17 @@ Geom2dGcc_Circ2d2TanOn::
   par2sol(1,8)  ,
   pararg1(1,8)  ,
   pararg2(1,8)  ,
-  parcen3(1,8)
+  parcen3(1,8), Invert(Standard_False)
 {
   GeomAbs_CurveType Type3 = OnCurve.GetType();
-  Handle(Geom2d_Curve) Con = OnCurve.Curve();
+  const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  Invert = Standard_False;
-  NbrSol = 0;
+  
+  
   if (Type3 == GeomAbs_Line || Type3 == GeomAbs_Circle) {
     gp_Pnt2d pnt1(Point1->Pnt2d());
     gp_Pnt2d pnt2(Point2->Pnt2d());
index d42931436efc804f0e8ae7a4c27755f831a44e31..5f47869261f2f1b71a10c816ab625e23aa330ec6 100644 (file)
@@ -24,6 +24,8 @@
 //                                                  Courbes.              +
 //=========================================================================
 
+#include <math.h>
+
 #include <Adaptor2d_OffsetCurve.hxx>
 #include <ElCLib.hxx>
 #include <GccAna_Circ2dBisec.hxx>
@@ -52,7 +54,7 @@ Geom2dGcc_Circ2d2TanOnGeo (const GccEnt_QualifiedCirc&     Qualified1 ,
                            const GccEnt_QualifiedCirc&     Qualified2 ,
                            const Geom2dAdaptor_Curve&      OnCurv     ,
                            const Standard_Real             Tolerance  ):
-  cirsol(1, aNbSolMAX)    ,
+  WellDone(Standard_False), NbrSol(0), cirsol(1, aNbSolMAX)    ,
   qualifier1(1, aNbSolMAX),
   qualifier2(1, aNbSolMAX),
   TheSame1(1, aNbSolMAX)  ,
@@ -66,13 +68,13 @@ Geom2dGcc_Circ2d2TanOnGeo (const GccEnt_QualifiedCirc&     Qualified1 ,
   pararg2(1, aNbSolMAX)   ,
   parcen3(1, aNbSolMAX)
 {
-  WellDone = Standard_False;
+  
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   Standard_Real Tol = Abs(Tolerance);
-  NbrSol = 0;
+  
   TColStd_Array1OfReal Rbid(1,2);
   TColStd_Array1OfReal RBid(1,2);
   TColStd_Array1OfReal Radius(1,2);
@@ -277,7 +279,7 @@ Geom2dGcc_Circ2d2TanOnGeo (const GccEnt_QualifiedCirc&     Qualified1 ,
                            const GccEnt_QualifiedLin&      Qualified2 , 
                            const Geom2dAdaptor_Curve&                 OnCurv     ,
                            const Standard_Real             Tolerance  ):
-cirsol(1, aNbSolMAX)    ,
+WellDone(Standard_False), NbrSol(0), cirsol(1, aNbSolMAX)    ,
 qualifier1(1, aNbSolMAX),
 qualifier2(1, aNbSolMAX),
 TheSame1(1, aNbSolMAX)  ,
@@ -292,14 +294,14 @@ pararg2(1, aNbSolMAX)   ,
 parcen3(1, aNbSolMAX)
 {
 
-  WellDone = Standard_False;
+  
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
-  NbrSol = 0;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
+  
   Standard_Real Tol = Abs(Tolerance);
-  Standard_Real Radius;
+  Standard_Real Radius = NAN;
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
     !(Qualified2.IsEnclosed() ||
@@ -455,7 +457,7 @@ Geom2dGcc_Circ2d2TanOnGeo (const GccEnt_QualifiedLin&      Qualified1 ,
                            const GccEnt_QualifiedLin&      Qualified2 , 
                            const Geom2dAdaptor_Curve&                 OnCurv     ,
                            const Standard_Real             Tolerance  ):
-cirsol(1, aNbSolMAX)    ,
+WellDone(Standard_False), NbrSol(0), cirsol(1, aNbSolMAX)    ,
 qualifier1(1, aNbSolMAX),
 qualifier2(1, aNbSolMAX),
 TheSame1(1, aNbSolMAX)  ,
@@ -470,12 +472,12 @@ pararg2(1, aNbSolMAX)   ,
 parcen3(1, aNbSolMAX)
 {
 
-  WellDone = Standard_False;
+  
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
-  NbrSol = 0;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
+  
   if (!(Qualified1.IsEnclosed() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
     !(Qualified2.IsEnclosed() ||
@@ -610,7 +612,7 @@ Geom2dGcc_Circ2d2TanOnGeo (const GccEnt_QualifiedCirc&     Qualified1 ,
                            const gp_Pnt2d&                 Point2     , 
                            const Geom2dAdaptor_Curve&                 OnCurv     ,
                            const Standard_Real             Tolerance  ):
-cirsol(1, aNbSolMAX)    ,
+WellDone(Standard_False), NbrSol(0), cirsol(1, aNbSolMAX)    ,
 qualifier1(1, aNbSolMAX),
 qualifier2(1, aNbSolMAX),
 TheSame1(1, aNbSolMAX)  ,
@@ -625,19 +627,19 @@ pararg2(1, aNbSolMAX)   ,
 parcen3(1, aNbSolMAX)
 {
 
-  WellDone = Standard_False;
+  
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
-  NbrSol = 0;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
       return;
   }
   Standard_Real Tol = Abs(Tolerance);
-  Standard_Real Radius;
+  Standard_Real Radius = NAN;
   gp_Dir2d dirx(1.,0.);
   gp_Circ2d C1 = Qualified1.Qualified();
   Standard_Real R1 = C1.Radius();
@@ -772,7 +774,7 @@ Geom2dGcc_Circ2d2TanOnGeo (const GccEnt_QualifiedLin&      Qualified1 ,
                            const gp_Pnt2d&                 Point2     , 
                            const Geom2dAdaptor_Curve&                 OnCurv     ,
                            const Standard_Real             Tolerance  ):
-cirsol(1, aNbSolMAX)    ,
+WellDone(Standard_False), NbrSol(0), cirsol(1, aNbSolMAX)    ,
 qualifier1(1, aNbSolMAX),
 qualifier2(1, aNbSolMAX),
 TheSame1(1, aNbSolMAX)  ,
@@ -787,13 +789,13 @@ pararg2(1, aNbSolMAX)   ,
 parcen3(1, aNbSolMAX)
 {
 
-  WellDone = Standard_False;
+  
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   Standard_Real Tol = Abs(Tolerance);
-  NbrSol = 0;
+  
   if (!(Qualified1.IsEnclosed() ||
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
@@ -909,7 +911,7 @@ Geom2dGcc_Circ2d2TanOnGeo (const gp_Pnt2d&               Point1    ,
                            const gp_Pnt2d&               Point2    ,
                            const Geom2dAdaptor_Curve&               OnCurv    ,
                            const Standard_Real           Tolerance ):
-cirsol(1, aNbSolMAX)    ,
+WellDone(Standard_False), NbrSol(0), cirsol(1, aNbSolMAX)    ,
 qualifier1(1, aNbSolMAX),
 qualifier2(1, aNbSolMAX),
 TheSame1(1, aNbSolMAX)  ,
@@ -924,13 +926,13 @@ pararg2(1, aNbSolMAX)   ,
 parcen3(1, aNbSolMAX)
 {
 
-  WellDone = Standard_False;
+  
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   Standard_Real Tol = Abs(Tolerance);
-  NbrSol = 0;
+  
   gp_Dir2d dirx(1.,0.);
   GccAna_Pnt2dBisec Bis(Point1,Point2);
   if (Bis.IsDone()) {
index 2b608c757522efd0edce6c05aeadfef294078676..70762e1c161c184a8644092669ce3c2884cb9755 100644 (file)
@@ -24,6 +24,8 @@
 //                                                  Courbes.              +
 //=========================================================================
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <GccEnt_BadQualifier.hxx>
 #include <GccEnt_QualifiedCirc.hxx>
@@ -48,20 +50,20 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin&  Qualified1 ,
                             const Standard_Real         Param1     ,
                             const Standard_Real         Param2     ,
                             const Standard_Real         Param3     ,
-                            const Standard_Real         Tolang     ) {
+                            const Standard_Real         Tolang     ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
 
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
+                              
                               Standard_Real Tol = Abs(Tolang);
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
                               if (!(Qualified1.IsEnclosed() ||
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                                 !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -115,7 +117,7 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin&  Qualified1 ,
                                   gp_Vec2d Vec1(point1,point3new);
                                   gp_Vec2d Vec2(point2,point3new);
                                   Standard_Real normevec2 = Vec2.Magnitude();
-                                  Standard_Real angle2;
+                                  Standard_Real angle2 = NAN;
                                   if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) {
                                     angle2 = Vec2.Angle(Tan2);
                                   }
@@ -153,18 +155,18 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
                             const Standard_Real               Param1     ,
                             const Standard_Real               Param2     ,
                             const Standard_Real               Param3     ,
-                            const Standard_Real               Tolerance  ) {
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                            const Standard_Real               Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
+                              
                               if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                                 !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -224,7 +226,7 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
                                   gp_Vec2d Vec2(point2,point3new);
                                   Standard_Real normevec1 = Vec1.Magnitude();
                                   Standard_Real normevec2 = Vec2.Magnitude();
-                                  Standard_Real angle1,angle2;
+                                  Standard_Real angle1 = NAN,angle2 = NAN;
                                   if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                     angle1 = Vec1.Angle(Tan1);
                                   }
@@ -264,18 +266,18 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
                             const gp_Lin2d&          OnLine     ,
                             const Standard_Real      Param1     ,
                             const Standard_Real      Param2     ,
-                            const Standard_Real      Tolerance  ) {
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                            const Standard_Real      Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
+                              
                               if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
                                   throw GccEnt_BadQualifier();
@@ -319,7 +321,7 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
                                   Standard_Real normetan1 = Tan1.Magnitude();
                                   gp_Vec2d Vec1(point1new,point3new);
                                   Standard_Real normevec1 = Vec1.Magnitude();
-                                  Standard_Real angle1;
+                                  Standard_Real angle1 = NAN;
                                   if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                     angle1 = Vec1.Angle(Tan1);
                                   }
@@ -351,18 +353,18 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedCirc& Qualified1 ,
                             const Standard_Real         Param1     ,
                             const Standard_Real         Param2     ,
                             const Standard_Real         Param3     ,
-                            const Standard_Real         Tolerance  ) {
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                            const Standard_Real         Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
+                              
                               if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                                 !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -422,7 +424,7 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedCirc& Qualified1 ,
                                   gp_Vec2d Vec1(point1,point3);
                                   gp_Vec2d Vec2(point2,point3);
                                   Standard_Real normevec2 = Vec2.Magnitude();
-                                  Standard_Real angle2;
+                                  Standard_Real angle2 = NAN;
                                   if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) {
                                     angle2 = Vec2.Angle(Tan2);
                                   }
@@ -461,18 +463,18 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedCirc& Qualified1 ,
                             const Standard_Real         Param1     ,
                             const Standard_Real         Param2     ,
                             const Standard_Real         Param3     ,
-                            const Standard_Real         Tolerance  ) {
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                            const Standard_Real         Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
+                              
                               if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                                 !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -530,7 +532,7 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedCirc& Qualified1 ,
                                   gp_Vec2d Vec1(point1,point3);
                                   gp_Vec2d Vec2(point2,point3);
                                   Standard_Real normevec2 = Vec2.Magnitude();
-                                  Standard_Real angle2;
+                                  Standard_Real angle2 = NAN;
                                   if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) {
                                     angle2 = Vec2.Angle(Tan2);
                                   }
@@ -569,18 +571,18 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin&  Qualified1 ,
                             const Standard_Real         Param1     ,
                             const Standard_Real         Param2     ,
                             const Standard_Real         Param3     ,
-                            const Standard_Real         Tolerance  ) {
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                            const Standard_Real         Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
+                              
                               if (!(Qualified1.IsEnclosed() ||
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                                 !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -637,7 +639,7 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin&  Qualified1 ,
                                   gp_Vec2d Vec1(point1new,point3);
                                   gp_Vec2d Vec2(point2new,point3);
                                   Standard_Real normevec2 = Vec2.Magnitude();
-                                  Standard_Real angle2;
+                                  Standard_Real angle2 = NAN;
                                   if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) {
                                     angle2 = Vec2.Angle(Tan2);
                                   }
@@ -675,18 +677,18 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
                             const Standard_Real               Param1     ,
                             const Standard_Real               Param2     ,
                             const Standard_Real               Param3     ,
-                            const Standard_Real               Tolerance  ) {
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                            const Standard_Real               Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
+                              
                               if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                                 !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -747,7 +749,7 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
                                   gp_Vec2d Vec2(point2,point3);
                                   Standard_Real normevec1 = Vec1.Magnitude();
                                   Standard_Real normevec2 = Vec2.Magnitude();
-                                  Standard_Real angle1,angle2;
+                                  Standard_Real angle1 = NAN,angle2 = NAN;
                                   if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                     angle1 = Vec1.Angle(Tan1);
                                   }
@@ -787,18 +789,18 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve&  Qualified1 ,
                             const gp_Circ2d&         OnCirc     ,
                             const Standard_Real      Param1     ,
                             const Standard_Real      Param2     ,
-                            const Standard_Real      Tolerance  ) {
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                            const Standard_Real      Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
+                              
                               if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
                                   throw GccEnt_BadQualifier();
@@ -842,7 +844,7 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve&  Qualified1 ,
                                   Standard_Real normetan1 = Tan1.Magnitude();
                                   gp_Vec2d Vec1(point1new,point3new);
                                   Standard_Real normevec1 = Vec1.Magnitude();
-                                  Standard_Real angle1;
+                                  Standard_Real angle1 = NAN;
                                   if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                     angle1 = Vec1.Angle(Tan1);
                                   }
@@ -874,19 +876,19 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
                             const Standard_Real               Param1     ,
                             const Standard_Real               Param2     ,
                             const Standard_Real               Param3     ,
-                            const Standard_Real               Tolerance  ) {
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                            const Standard_Real               Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
+                              
                               Standard_Real Tol = Abs(Tolerance);
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
                               if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                                 !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -940,7 +942,7 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
                                   gp_Vec2d Vec2(point2,point3);
                                   Standard_Real normevec1 = Vec1.Magnitude();
                                   Standard_Real normevec2 = Vec2.Magnitude();
-                                  Standard_Real angle1,angle2;
+                                  Standard_Real angle1 = NAN,angle2 = NAN;
                                   if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                     angle1 = Vec1.Angle(Tan1);
                                   }
@@ -981,19 +983,19 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedCirc& Qualified1 ,
                             const Standard_Real                     Param1     ,
                             const Standard_Real                     Param2     ,
                             const Standard_Real                     ParamOn    ,
-                            const Standard_Real                     Tolerance     ) {
+                            const Standard_Real                     Tolerance     ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
 
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
+                              
                               if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                                 !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -1047,7 +1049,7 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedCirc& Qualified1 ,
                                   gp_Vec2d Vec1(point1.XY(),point3.XY());
                                   gp_Vec2d Vec2(point2.XY(),point3.XY());
                                   Standard_Real normevec2 = Vec2.Magnitude();
-                                  Standard_Real angle2;
+                                  Standard_Real angle2 = NAN;
                                   if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) {
                                     angle2 = Vec2.Angle(Tan2);
                                   }
@@ -1086,18 +1088,18 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin&  Qualified1 ,
                             const Standard_Real                     Param1     ,
                             const Standard_Real                     Param2     ,
                             const Standard_Real                     ParamOn    ,
-                            const Standard_Real                     Tolerance  ) {
-                              TheSame1 = Standard_False;
-                              TheSame2 = Standard_False;
-                              par1sol = 0.;
-                              par2sol = 0.;
-                              pararg1 = 0.;
-                              pararg2 = 0.;
-                              parcen3 = 0.;
+                            const Standard_Real                     Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                              
+                              
+                              
+                              
+                              
+                              
+                              
 
-                              WellDone = Standard_False;
-                              qualifier1 = GccEnt_noqualifier;
-                              qualifier2 = GccEnt_noqualifier;
+                              
+                              
+                              
                               if (!(Qualified1.IsEnclosed() ||
                                 Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                                 !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -1150,7 +1152,7 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin&  Qualified1 ,
                                   gp_Vec2d Vec1(point1,point3);
                                   gp_Vec2d Vec2(point2,point3);
                                   Standard_Real normevec2 = Vec2.Magnitude();
-                                  Standard_Real angle2;
+                                  Standard_Real angle2 = NAN;
                                   if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) {
                                     angle2 = Vec2.Angle(Tan2);
                                   }
@@ -1187,19 +1189,19 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve&    Qualified1 ,
                             const Geom2dAdaptor_Curve&             OnCurv     ,
                             const Standard_Real                  Param1     ,
                             const Standard_Real                  ParamOn    ,
-                            const Standard_Real                  Tolerance  ) 
+                            const Standard_Real                  Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), par1sol(0.), par2sol(0.), pararg1(0.), pararg2(0.), parcen3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) 
 {
-  TheSame1 = Standard_False;
-  TheSame2 = Standard_False;
-  par1sol = 0.;
-  par2sol = 0.;
-  pararg1 = 0.;
-  pararg2 = 0.;
-  parcen3 = 0.;
+  
+  
+  
+  
+  
+  
+  
 
-  WellDone = Standard_False;
-  qualifier1 = GccEnt_noqualifier;
-  qualifier2 = GccEnt_noqualifier;
+  
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
@@ -1243,7 +1245,7 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve&    Qualified1 ,
       Standard_Real normetan1 = Tan1.Magnitude();
       gp_Vec2d Vec1(point1,point3);
       Standard_Real normevec1 = Vec1.Magnitude();
-      Standard_Real angle1;
+      Standard_Real angle1 = NAN;
       if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
         angle1 = Vec1.Angle(Tan1);
       }
index 55336cd6877e7532b446e21780ab2a6c3c43eba8..961914a5a1ef0d0648f38798288842046dba9fdd 100644 (file)
@@ -70,8 +70,8 @@ Geom2dGcc_Circ2d2TanRad::
   else {
     Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
     Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
-    Handle(Geom2d_Curve) CC1 = C1.Curve();
-    Handle(Geom2d_Curve) CC2 = C2.Curve();
+    const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+    const Handle(Geom2d_Curve)& CC2 = C2.Curve();
     GeomAbs_CurveType Type1 = C1.GetType();
     GeomAbs_CurveType Type2 = C2.GetType();
 
@@ -276,7 +276,7 @@ Geom2dGcc_Circ2d2TanRad::
   if (Radius < 0.) { throw Standard_NegativeValue(); }
   else {
     Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-    Handle(Geom2d_Curve) CC1 = C1.Curve();
+    const Handle(Geom2d_Curve)& CC1 = C1.Curve();
     GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
index 379a9d767d63f7eacf3f8b062b5d45ba06a07f8d..61595f99659df2a1f7eeced25129d6037575ce97 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor2d_OffsetCurve.hxx>
 #include <ElCLib.hxx>
 #include <GccEnt_BadQualifier.hxx>
@@ -59,7 +61,7 @@ Geom2dGcc_Circ2d2TanRadGeo (const GccEnt_QualifiedLin&  Qualified1,
 // initialisation des champs.                                            +
 //========================================================================
 
-cirsol(1,aNbSolMAX)   ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)   ,
 qualifier1(1,aNbSolMAX),
 qualifier2(1,aNbSolMAX),
 TheSame1(1,aNbSolMAX) ,
@@ -79,15 +81,15 @@ pararg2(1,aNbSolMAX)
   Standard_Real Tol = Abs(Tolerance);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   gp_Dir2d dirx(1.,0.);
   TColStd_Array1OfReal cote1(1,2);
   TColStd_Array1OfReal cote2(1,2);
   Standard_Integer nbrcote1=0;
   Standard_Integer nbrcote2=0;
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() ||
     Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
     !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -248,7 +250,7 @@ Geom2dGcc_Circ2d2TanRadGeo (const GccEnt_QualifiedCirc& Qualified1,
 // initialisation des champs.                                            +
 //========================================================================
 
-cirsol(1,aNbSolMAX)   ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)   ,
 qualifier1(1,aNbSolMAX),
 qualifier2(1,aNbSolMAX),
 TheSame1(1,aNbSolMAX) ,
@@ -268,15 +270,15 @@ pararg2(1,aNbSolMAX)
   Standard_Real Tol = Abs(Tolerance);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   gp_Dir2d dirx(1.,0.);
   TColStd_Array1OfReal cote1(1,2);
   TColStd_Array1OfReal cote2(1,2);
   Standard_Integer nbrcote1=0;
   Standard_Integer nbrcote2=0;
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
     !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -442,7 +444,7 @@ Geom2dGcc_Circ2d2TanRadGeo (const Geom2dGcc_QCurve& Qualified1,
 // initialisation des champs.                                            +
 //========================================================================
 
-cirsol(1,aNbSolMAX)   ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)   ,
 qualifier1(1,aNbSolMAX),
 qualifier2(1,aNbSolMAX),
 TheSame1(1,aNbSolMAX) ,
@@ -462,13 +464,13 @@ pararg2(1,aNbSolMAX)
   Standard_Real Tol = Abs(Tolerance);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   gp_Dir2d dirx(1.,0.);
   TColStd_Array1OfReal cote1(1,2);
   Standard_Integer nbrcote1=0;
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
@@ -722,7 +724,7 @@ Geom2dGcc_Circ2d2TanRadGeo (const Geom2dGcc_QCurve& Qualified1,
 // initialisation des champs.                                            +
 //========================================================================
 
-cirsol(1,aNbSolMAX)   ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)   ,
 qualifier1(1,aNbSolMAX),
 qualifier2(1,aNbSolMAX),
 TheSame1(1,aNbSolMAX) ,
@@ -749,8 +751,8 @@ pararg2(1,aNbSolMAX)
   TColStd_Array1OfReal cote2(1,2);
   Standard_Integer nbrcote1=0;
   Standard_Integer nbrcote2=0;
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
     !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
index 666a977b0c6c4efba56b1a671949f25e0b49b6c1..8a91bb4b1b1fd1ce85908cec8181547e7e313e8c 100644 (file)
@@ -39,7 +39,7 @@ Geom2dGcc_Circ2d3Tan::
                         const Standard_Real             Param2     ,
                         const Standard_Real             Param3     ):
   cirsol(1,16)   ,
-  qualifier1(1,16),
+  NbrSol(0), qualifier1(1,16),
   qualifier2(1,16),
   qualifier3(1,16),
   TheSame1(1,16) ,
@@ -58,9 +58,9 @@ Geom2dGcc_Circ2d3Tan::
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
   Geom2dAdaptor_Curve C3 = Qualified3.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
-  Handle(Geom2d_Curve) CC3 = C3.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& CC3 = C3.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
   GeomAbs_CurveType Type3 = C3.GetType();
@@ -69,7 +69,7 @@ Geom2dGcc_Circ2d3Tan::
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  NbrSol = 0;
+  
   if ((Type1 == GeomAbs_Line || Type1 == GeomAbs_Circle) &&
       (Type2 == GeomAbs_Line || Type2 == GeomAbs_Circle) &&
       (Type3 == GeomAbs_Line || Type3 == GeomAbs_Circle)) {
@@ -248,7 +248,7 @@ Geom2dGcc_Circ2d3Tan::
                         const Standard_Real             Param1     ,
                         const Standard_Real             Param2     ):
   cirsol(1,20)   ,
-  qualifier1(1,20),
+  NbrSol(0), qualifier1(1,20),
   qualifier2(1,20),
   qualifier3(1,20),
   TheSame1(1,20) ,
@@ -266,8 +266,8 @@ Geom2dGcc_Circ2d3Tan::
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
 
@@ -275,7 +275,7 @@ Geom2dGcc_Circ2d3Tan::
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  NbrSol = 0;
+  
   if ((Type1 == GeomAbs_Line || Type1 == GeomAbs_Circle) &&
       (Type2 == GeomAbs_Line || Type2 == GeomAbs_Circle)) {
     if (Type1 == GeomAbs_Circle) {
@@ -366,7 +366,7 @@ Geom2dGcc_Circ2d3Tan::
                         const Standard_Real             Tolerance  ,
                         const Standard_Real             Param1     ):
   cirsol(1,16)   ,
-  qualifier1(1,16),
+  NbrSol(0), qualifier1(1,16),
   qualifier2(1,16),
   qualifier3(1,16),
   TheSame1(1,16) ,
@@ -383,14 +383,14 @@ Geom2dGcc_Circ2d3Tan::
   pararg3(1,16)  
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  NbrSol = 0;
+  
   if ((Type1 == GeomAbs_Line || Type1 == GeomAbs_Circle)) {
     if (Type1 == GeomAbs_Circle) {
       Handle(Geom2d_Circle) CCC1 = Handle(Geom2d_Circle)::DownCast(CC1);
@@ -445,7 +445,7 @@ Geom2dGcc_Circ2d3Tan::
                         const Handle(Geom2d_Point)&     Point3     ,
                         const Standard_Real             Tolerance  ):
   cirsol(1,2)   ,
-  qualifier1(1,2),
+  NbrSol(0), qualifier1(1,2),
   qualifier2(1,2),
   qualifier3(1,2),
   TheSame1(1,2) ,
@@ -466,7 +466,7 @@ Geom2dGcc_Circ2d3Tan::
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  NbrSol = 0;
+  
   GccAna_Circ2d3Tan Circ(Point1->Pnt2d(),Point2->Pnt2d(),Point3->Pnt2d(),
                         Tolerance);
   WellDone = Circ.IsDone();
index e6a575da702756b3d535f078767628ed183536d3..bd1f48e4fbd765217b028bd466cad7ff49619b1a 100644 (file)
@@ -24,6 +24,8 @@
 //                                                  Courbes.              +
 //=========================================================================
 
+#include <math.h>
+
 #include <GccAna_Circ2d3Tan.hxx>
 #include <GccEnt_BadQualifier.hxx>
 #include <GccEnt_QualifiedCirc.hxx>
@@ -48,23 +50,23 @@ Geom2dGcc_Circ2d3TanIter (const Geom2dGcc_QCurve& Qualified1 ,
                           const Standard_Real      Param1     ,
                           const Standard_Real      Param2     ,
                           const Standard_Real      Param3     ,
-                          const Standard_Real      Tolerance  ) {
+                          const Standard_Real      Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier) {
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                               Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                               !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -117,7 +119,7 @@ Geom2dGcc_Circ2d3TanIter (const Geom2dGcc_QCurve& Qualified1 ,
                                 Standard_Real normevec1 = Vec1.Magnitude();
                                 Standard_Real normevec2 = Vec2.Magnitude();
                                 Standard_Real normevec3 = Vec3.Magnitude();
-                                Standard_Real dot1,dot2,dot3;
+                                Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                 if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                   dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
                                 }
@@ -175,23 +177,23 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                           const Standard_Real      Param1     ,
                           const Standard_Real      Param2     ,
                           const Standard_Real      Param3     ,
-                          const Standard_Real      Tolerance     ) {
+                          const Standard_Real      Tolerance     ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier) {
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                               Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                               !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -250,7 +252,7 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                                 Standard_Real normevec1 = Vec1.Magnitude();
                                 Standard_Real normevec2 = Vec2.Magnitude();
                                 Standard_Real normevec3 = Vec3.Magnitude();
-                                Standard_Real dot1,dot2,dot3;
+                                Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                 if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                   dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
                                 }
@@ -307,23 +309,23 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                           const Standard_Real         Param1     ,
                           const Standard_Real         Param2     ,
                           const Standard_Real         Param3     ,
-                          const Standard_Real         Tolerance     ) {
+                          const Standard_Real         Tolerance     ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier) {
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                               Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                               !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -384,7 +386,7 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                                 Standard_Real normevec1 = Vec1.Magnitude();
                                 Standard_Real normevec2 = Vec2.Magnitude();
                                 Standard_Real normevec3 = Vec3.Magnitude();
-                                Standard_Real dot1,dot2,dot3;
+                                Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                 if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                   dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
                                 }
@@ -442,23 +444,23 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedLin& Qualified1 ,
                           const Standard_Real        Param1     ,
                           const Standard_Real        Param2     ,
                           const Standard_Real        Param3     ,
-                          const Standard_Real        Tolerance  ) {
+                          const Standard_Real        Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier) {
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() ||
                               Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                               !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -519,7 +521,7 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedLin& Qualified1 ,
                                 Standard_Real normevec1 = Vec1.Magnitude();
                                 Standard_Real normevec2 = Vec2.Magnitude();
                                 Standard_Real normevec3 = Vec3.Magnitude();
-                                Standard_Real dot1,dot2,dot3;
+                                Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                 if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                   dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
                                 }
@@ -577,23 +579,23 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedLin&  Qualified1 ,
                           const Standard_Real         Param1     ,
                           const Standard_Real         Param2     ,
                           const Standard_Real         Param3     ,
-                          const Standard_Real         Tolerance  ){
+                          const Standard_Real         Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier){
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() || 
                               Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                               !(Qualified2.IsEnclosed() || 
@@ -655,7 +657,7 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedLin&  Qualified1 ,
                                     Standard_Real normevec1 = Vec1.Magnitude();
                                     Standard_Real normevec2 = Vec2.Magnitude();
                                     Standard_Real normevec3 = Vec3.Magnitude();
-                                    Standard_Real dot1,dot2,dot3;
+                                    Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                     if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                       dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
                                     }
@@ -705,23 +707,23 @@ Geom2dGcc_Circ2d3TanIter (const Geom2dGcc_QCurve& Qualified1 ,
                           const gp_Pnt2d&          Point3     ,
                           const Standard_Real      Param1     ,
                           const Standard_Real      Param2     ,
-                          const Standard_Real      Tolerance  ) {
+                          const Standard_Real      Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier) {
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                               Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                               !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -773,7 +775,7 @@ Geom2dGcc_Circ2d3TanIter (const Geom2dGcc_QCurve& Qualified1 ,
                                 Standard_Real normevec1 = Vec1.Magnitude();
                                 Standard_Real normevec2 = Vec2.Magnitude();
                                 Standard_Real normevec3 = Vec3.Magnitude();
-                                Standard_Real dot1,dot2,dot3;
+                                Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                 if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                   dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
                                 }
@@ -823,23 +825,23 @@ Geom2dGcc_Circ2d3TanIter (const Geom2dGcc_QCurve& Qualified1 ,
                           const gp_Pnt2d&          Point2     ,
                           const gp_Pnt2d&          Point3     ,
                           const Standard_Real      Param1     ,
-                          const Standard_Real      Tolerance     ) {
+                          const Standard_Real      Tolerance     ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier) {
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                               Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
                                 throw GccEnt_BadQualifier();
@@ -890,7 +892,7 @@ Geom2dGcc_Circ2d3TanIter (const Geom2dGcc_QCurve& Qualified1 ,
                                 Standard_Real normevec1 = Vec1.Magnitude();
                                 Standard_Real normevec2 = Vec2.Magnitude();
                                 Standard_Real normevec3 = Vec3.Magnitude();
-                                Standard_Real dot1,dot2,dot3;
+                                Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                 if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                   dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
                                 }
@@ -935,23 +937,23 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedLin&  Qualified1 ,
                           const gp_Pnt2d&             Point3     ,
                           const Standard_Real         Param1     ,
                           const Standard_Real         Param2     ,
-                          const Standard_Real         Tolerance  ) {
+                          const Standard_Real         Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier) {
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() ||
                               Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                               !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -1007,7 +1009,7 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedLin&  Qualified1 ,
                                 Standard_Real normevec1 = Vec1.Magnitude();
                                 Standard_Real normevec2 = Vec2.Magnitude();
                                 Standard_Real normevec3 = Vec3.Magnitude();
-                                Standard_Real dot1,dot2,dot3;
+                                Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                 if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                   dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
                                 }
@@ -1057,23 +1059,23 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                           const Standard_Real         Param1     ,
                           const Standard_Real         Param2     ,
                           const Standard_Real         Param3     ,
-                          const Standard_Real         Tolerance  ) {
+                          const Standard_Real         Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier) {
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                               Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                               !(Qualified2.IsEnclosed() ||
@@ -1131,7 +1133,7 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                                 Standard_Real normevec1 = Vec1.Magnitude();
                                 Standard_Real normevec2 = Vec2.Magnitude();
                                 Standard_Real normevec3 = Vec3.Magnitude();
-                                Standard_Real dot1,dot2,dot3;
+                                Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                 if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
                                   dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
                                 }
@@ -1189,23 +1191,23 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                           const gp_Pnt2d&             Point3     ,
                           const Standard_Real         Param1     ,
                           const Standard_Real         Param2     ,
-                          const Standard_Real         Tolerance  ) {
+                          const Standard_Real         Tolerance  ) : TheSame1(Standard_False), TheSame2(Standard_False), TheSame3(Standard_False), par1sol(0.), par2sol(0.), par3sol(0.), pararg1(0.), pararg2(0.), pararg3(0.), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier), qualifier3(GccEnt_noqualifier) {
 
-                            TheSame1 = Standard_False;
-                            TheSame2 = Standard_False;
-                            TheSame3 = Standard_False;
-                            par1sol = 0.;
-                            par2sol = 0.;
-                            par3sol = 0.;
-                            pararg1 = 0.;
-                            pararg2 = 0.;
-                            pararg3 = 0.;
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
+                            
 
                             Standard_Real Tol = Abs(Tolerance);
-                            WellDone = Standard_False;
-                            qualifier1 = GccEnt_noqualifier;
-                            qualifier2 = GccEnt_noqualifier;
-                            qualifier3 = GccEnt_noqualifier;
+                            
+                            
+                            
+                            
                             if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                               Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                               !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -1259,7 +1261,7 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                                 Standard_Real normevec1 = Vec1.Magnitude();
                                 Standard_Real normevec2 = Vec2.Magnitude();
                                 Standard_Real normevec3 = Vec3.Magnitude();
-                                Standard_Real dot1,dot2,dot3;
+                                Standard_Real dot1 = NAN,dot2 = NAN,dot3 = NAN;
                                 if (normevec1 >= gp::Resolution()) {
                                   dot1 = Vec1.Dot(Tan1)/(normevec1);
                                 }
index 5995429e389d0c36c541901214df80625708bfbf..58e063afc6f12b008e241fc9f68a42082f07809d 100644 (file)
@@ -34,7 +34,7 @@ Geom2dGcc_Circ2dTanCen::
    Geom2dGcc_Circ2dTanCen (const Geom2dGcc_QualifiedCurve& Qualified1 ,
                           const Handle(Geom2d_Point)&     PCenter    ,
                           const Standard_Real             Tolerance  ):
-  cirsol(1,2)   ,
+  NbrSol(0), cirsol(1,2)   ,
   qualifier1(1,2),
   TheSame1(1,2) ,
   pnttg1sol(1,2),
@@ -42,7 +42,7 @@ Geom2dGcc_Circ2dTanCen::
   pararg1(1,2)  
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
@@ -50,7 +50,7 @@ Geom2dGcc_Circ2dTanCen::
 //=============================================================================
 
   gp_Pnt2d pcenter(PCenter->Pnt2d());
-  NbrSol = 0;
+  
   if ((Type1 == GeomAbs_Line || Type1 == GeomAbs_Circle)) {
     if (Type1 == GeomAbs_Circle) {
       Handle(Geom2d_Circle) CCC1 = Handle(Geom2d_Circle)::DownCast(CC1);
index 44d8700e2357a82e2ff6b1882bd2eb3594e50dc4..b34755f92362a3fdb8698ddc819dbcbccb7f7664 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtPC2d.hxx>
 #include <Extrema_POnCurv2d.hxx>
 #include <GccEnt_BadQualifier.hxx>
@@ -59,7 +61,7 @@ Geom2dGcc_Circ2dTanCenGeo (const Geom2dGcc_QCurve&  Qualified1,
   Standard_Integer i = 1;
   Standard_Integer nbsol = 0;
   gp_Dir2d dirx(1.0,0.0);
-  Standard_Real thePar;
+  Standard_Real thePar = NAN;
   Geom2dAdaptor_Curve curve = Qualified1.Qualified();
   Extrema_ExtPC2d distmin(Pcenter, curve, Geom2dGcc_CurveTool::FirstParameter(curve),
                           Geom2dGcc_CurveTool::LastParameter(curve), Tol);
@@ -89,7 +91,7 @@ Geom2dGcc_Circ2dTanCenGeo (const Geom2dGcc_QCurve&  Qualified1,
     Standard_Real normetan1 = Tan1.Magnitude();
     gp_Vec2d Vec1(point1,Pcenter);
     Standard_Real normevec1 = Vec1.Magnitude();
-    Standard_Real dot1;
+    Standard_Real dot1 = NAN;
     if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
       dot1 = Vec1.Dot(Tan1)/(normevec1*normetan1);
     }
index a95e2bf171a999a08211fd50eb15366aea35f4b5..9b5921f16b401e5ce1bd1711bb19fa3116255b37 100644 (file)
@@ -53,8 +53,8 @@ Geom2dGcc_Circ2dTanOnRad::
     Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
     GeomAbs_CurveType Type1 = C1.GetType();
     GeomAbs_CurveType Type2 = OnCurve.GetType();
-    Handle(Geom2d_Curve) CC1 = C1.Curve();
-    Handle(Geom2d_Curve) Con = OnCurve.Curve();
+    const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+    const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
@@ -163,7 +163,7 @@ Geom2dGcc_Circ2dTanOnRad::
   else {
     gp_Pnt2d point1(Point1->Pnt2d());
     GeomAbs_CurveType Type2 = OnCurve.GetType();
-    Handle(Geom2d_Curve) Con = OnCurve.Curve();
+    const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
index cc18fc187dbdaaf6663cef29ee11a97bca68f0af..314612802304c85eb775778a51180eb6dcc9b531 100644 (file)
@@ -21,6 +21,8 @@
 //                  de rayon donne : Radius.                             +
 //========================================================================
 
+#include <math.h>
+
 #include <Adaptor2d_OffsetCurve.hxx>
 #include <ElCLib.hxx>
 #include <GccEnt_BadQualifier.hxx>
@@ -69,7 +71,7 @@ Geom2dGcc_Circ2dTanOnRadGeo (const Geom2dGcc_QCurve& Qualified1,
 // Initialisation des champs.                                             +
 //=========================================================================
 
-cirsol(1,aNbSolMAX)     ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)     ,
 qualifier1(1,aNbSolMAX) ,
 TheSame1(1,aNbSolMAX)   ,
 pnttg1sol(1,aNbSolMAX)  ,
@@ -87,10 +89,10 @@ parcen3(1,aNbSolMAX)
   Standard_Real Tol = Abs(Tolerance);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
-  WellDone = Standard_False;
-  NbrSol = 0;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
@@ -179,7 +181,7 @@ Geom2dGcc_Circ2dTanOnRadGeo (const Geom2dGcc_QCurve& Qualified1,
 // Initialisation des champs.                                             +
 //=========================================================================
 
-cirsol(1,aNbSolMAX)     ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)     ,
 qualifier1(1,aNbSolMAX) ,
 TheSame1(1,aNbSolMAX)   ,
 pnttg1sol(1,aNbSolMAX)  ,
@@ -196,12 +198,12 @@ parcen3(1,aNbSolMAX)
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   Standard_Real Tol = Abs(Tolerance);
   Standard_Integer nbrcote1=0;
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
@@ -293,7 +295,7 @@ Geom2dGcc_Circ2dTanOnRadGeo (const GccEnt_QualifiedCirc& Qualified1,
 // Initialisation des champs.                                             +
 //=========================================================================
 
-cirsol(1,aNbSolMAX)     ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)     ,
 qualifier1(1,aNbSolMAX) ,
 TheSame1(1,aNbSolMAX)   ,
 pnttg1sol(1,aNbSolMAX)  ,
@@ -310,12 +312,12 @@ parcen3(1,aNbSolMAX)
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   Standard_Real Tol = Abs(Tolerance);
   Standard_Integer nbrcote1=0;
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
@@ -417,7 +419,7 @@ Geom2dGcc_Circ2dTanOnRadGeo (const GccEnt_QualifiedLin& Qualified1,
 // Initialisation des champs.                                             +
 //=========================================================================
 
-cirsol(1,aNbSolMAX)     ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)     ,
 qualifier1(1,aNbSolMAX) ,
 TheSame1(1,aNbSolMAX)   ,
 pnttg1sol(1,aNbSolMAX)  ,
@@ -434,11 +436,11 @@ parcen3(1,aNbSolMAX)
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   Standard_Real Tol = Abs(Tolerance);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() ||
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
@@ -538,7 +540,7 @@ Geom2dGcc_Circ2dTanOnRadGeo (const Geom2dGcc_QCurve& Qualified1,
 // Initialisation des champs.                                             +
 //=========================================================================
 
-cirsol(1,aNbSolMAX)     ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)     ,
 qualifier1(1,aNbSolMAX) ,
 TheSame1(1,aNbSolMAX)   ,
 pnttg1sol(1,aNbSolMAX)  ,
@@ -555,12 +557,12 @@ parcen3(1,aNbSolMAX)
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   Standard_Real Tol = Abs(Tolerance);
   Standard_Integer nbrcote1=0;
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
@@ -655,7 +657,7 @@ Geom2dGcc_Circ2dTanOnRadGeo (const gp_Pnt2d&     Point1    ,
 // Initialisation des champs.                                             +
 //=========================================================================
 
-cirsol(1,aNbSolMAX)     ,
+WellDone(Standard_False), NbrSol(0), cirsol(1,aNbSolMAX)     ,
 qualifier1(1,aNbSolMAX) ,
 TheSame1(1,aNbSolMAX)   ,
 pnttg1sol(1,aNbSolMAX)  ,
@@ -672,11 +674,11 @@ parcen3(1,aNbSolMAX)
   gp_Dir2d dirx(1.0,0.0);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  =  100000.;
-  Standard_Real firstparam;
-  Standard_Real lastparam;
+  Standard_Real firstparam = NAN;
+  Standard_Real lastparam = NAN;
   Standard_Real Tol = Abs(Tolerance);
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
 
   if (Radius < 0.0) {
     throw Standard_NegativeValue();
index 48ff6997278dda8c43bd21656fd840146ad6ade7..c3c89008c16c9074ce02691fde23df26c78c4bac 100644 (file)
@@ -50,9 +50,9 @@
 //=========================================================================
 Geom2dGcc_FunctionTanCirCu::
 Geom2dGcc_FunctionTanCirCu(const gp_Circ2d& Circ   ,
-                           const Geom2dAdaptor_Curve&  Curv   ) {
-                             Curve = Curv;
-                             TheCirc = Circ;
+                           const Geom2dAdaptor_Curve&  Curv   ) : Curve(Curv), TheCirc(Circ) {
+                             
+                             
 
                              //  Modified by Sergey KHROMOV - Thu Apr  5 09:51:21 2001 Begin
                              Standard_Integer aNbSamp = Geom2dGcc_CurveTool::NbSamples(Curve);
index 751574095c3fd33610b281579dba11c18c97c608..49b93f55a4202a3a91e3768a1cba4782297d3a6f 100644 (file)
@@ -54,18 +54,18 @@ InitDerivative(const math_Vector& X,
 
 Geom2dGcc_FunctionTanCuCu::
 Geom2dGcc_FunctionTanCuCu(const Geom2dAdaptor_Curve& C1  ,
-                          const Geom2dAdaptor_Curve& C2  ) {
-                            TheCurve1 = C1;
-                            TheCurve2 = C2;
-                            TheType = Geom2dGcc_CuCu;
+                          const Geom2dAdaptor_Curve& C2  ) : TheCurve1(C1), TheCurve2(C2), TheType(Geom2dGcc_CuCu) {
+                            
+                            
+                            
 }
 
 Geom2dGcc_FunctionTanCuCu::
 Geom2dGcc_FunctionTanCuCu(const gp_Circ2d& C1  ,
-                          const Geom2dAdaptor_Curve&  C2  ) {
-                            TheCirc1 = C1;
-                            TheCurve2 = C2;
-                            TheType = Geom2dGcc_CiCu;
+                          const Geom2dAdaptor_Curve&  C2  ) : TheCirc1(C1), TheCurve2(C2), TheType(Geom2dGcc_CiCu) {
+                            
+                            
+                            
 }
 
 
index 2f47c8ad9d43bff313c62191c9a465afe3663d11..c554e587d529a4d0034ef3aa716156b5801ebc18 100644 (file)
@@ -94,61 +94,61 @@ InitDerivative(const math_Vector&  X,
 Geom2dGcc_FunctionTanCuCuCu::
 Geom2dGcc_FunctionTanCuCuCu(const Geom2dAdaptor_Curve& C1  ,
                             const Geom2dAdaptor_Curve& C2  ,
-                            const Geom2dAdaptor_Curve& C3  ) {
-                              Curv1 = C1;
-                              Curv2 = C2;
-                              Curv3 = C3;
-                              TheType = Geom2dGcc_CuCuCu;
+                            const Geom2dAdaptor_Curve& C3  ) : Curv1(C1), Curv2(C2), Curv3(C3), TheType(Geom2dGcc_CuCuCu) {
+                              
+                              
+                              
+                              
 }
 
 Geom2dGcc_FunctionTanCuCuCu::
 Geom2dGcc_FunctionTanCuCuCu(const gp_Circ2d& C1  ,
                             const Geom2dAdaptor_Curve&  C2  ,
-                            const Geom2dAdaptor_Curve&  C3  ) {
-                              Circ1 = C1;
-                              Curv2 = C2;
-                              Curv3 = C3;
-                              TheType = Geom2dGcc_CiCuCu;
+                            const Geom2dAdaptor_Curve&  C3  ) : Circ1(C1), Curv2(C2), Curv3(C3), TheType(Geom2dGcc_CiCuCu) {
+                              
+                              
+                              
+                              
 }
 
 Geom2dGcc_FunctionTanCuCuCu::
 Geom2dGcc_FunctionTanCuCuCu(const gp_Circ2d& C1  ,
                             const gp_Circ2d& C2  ,
-                            const Geom2dAdaptor_Curve&  C3  ) {
-                              Circ1 = C1;
-                              Circ2 = C2;
-                              Curv3 = C3;
-                              TheType = Geom2dGcc_CiCiCu;
+                            const Geom2dAdaptor_Curve&  C3  ) : Circ1(C1), Circ2(C2), Curv3(C3), TheType(Geom2dGcc_CiCiCu) {
+                              
+                              
+                              
+                              
 }
 
 Geom2dGcc_FunctionTanCuCuCu::
 Geom2dGcc_FunctionTanCuCuCu(const gp_Circ2d& C1  ,
                             const gp_Lin2d&  L2  ,
-                            const Geom2dAdaptor_Curve&  C3  ) {
-                              Circ1 = C1;
-                              Lin2 = L2;
-                              Curv3 = C3;
-                              TheType = Geom2dGcc_CiLiCu;
+                            const Geom2dAdaptor_Curve&  C3  ) : Circ1(C1), Lin2(L2), Curv3(C3), TheType(Geom2dGcc_CiLiCu) {
+                              
+                              
+                              
+                              
 }
 
 Geom2dGcc_FunctionTanCuCuCu::
 Geom2dGcc_FunctionTanCuCuCu(const gp_Lin2d& L1  ,
                             const gp_Lin2d& L2  ,
-                            const Geom2dAdaptor_Curve& C3  ) {
-                              Lin1 = L1;
-                              Lin2 = L2;
-                              Curv3 = C3;
-                              TheType = Geom2dGcc_LiLiCu;
+                            const Geom2dAdaptor_Curve& C3  ) : Lin1(L1), Lin2(L2), Curv3(C3), TheType(Geom2dGcc_LiLiCu) {
+                              
+                              
+                              
+                              
 }
 
 Geom2dGcc_FunctionTanCuCuCu::
 Geom2dGcc_FunctionTanCuCuCu(const gp_Lin2d& L1  ,
                             const Geom2dAdaptor_Curve& C2  ,
-                            const Geom2dAdaptor_Curve& C3  ) {
-                              Lin1 = L1;
-                              Curv2 = C2;
-                              Curv3 = C3;
-                              TheType = Geom2dGcc_LiCuCu;
+                            const Geom2dAdaptor_Curve& C3  ) : Lin1(L1), Curv2(C2), Curv3(C3), TheType(Geom2dGcc_LiCuCu) {
+                              
+                              
+                              
+                              
 }
 
 //==========================================================================
index 5559051f77ec3f7139616b936eec6d06b1d30576..b2e19ae5aef0ed864e67298d514f6f8d7f232623 100644 (file)
@@ -145,144 +145,144 @@ Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve&     C1  ,
                             const Geom2dAdaptor_Curve&     C2  ,
                             const Geom2dAdaptor_Curve&     C3  ,
-                            const Standard_Real Rad ) {
-  Curv1  = C1;
-  Curv2  = C2;
-  Curvon = C3;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_CuCuOnCu;
+                            const Standard_Real Rad ) : Curv1(C1), Curv2(C2), Curvon(C3), FirstRad(Rad), TheType(Geom2dGcc_CuCuOnCu) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const gp_Circ2d&    C1  ,
                             const Geom2dAdaptor_Curve&     C2  ,
                             const Geom2dAdaptor_Curve&     C3  ,
-                            const Standard_Real Rad ) {
-  Circ1  = C1;
-  Curv2  = C2;
-  Curvon = C3;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_CiCuOnCu;
+                            const Standard_Real Rad ) : Circ1(C1), Curv2(C2), Curvon(C3), FirstRad(Rad), TheType(Geom2dGcc_CiCuOnCu) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const gp_Lin2d&     L1  ,
                             const Geom2dAdaptor_Curve&     C2  ,
                             const Geom2dAdaptor_Curve&     C3  ,
-                            const Standard_Real Rad ) {
-  Lin1  = L1;
-  Curv2  = C2;
-  Curvon = C3;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_LiCuOnCu;
+                            const Standard_Real Rad ) : Lin1(L1), Curv2(C2), Curvon(C3), FirstRad(Rad), TheType(Geom2dGcc_LiCuOnCu) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1  ,
                             const gp_Pnt2d&  P2  ,
                             const Geom2dAdaptor_Curve&  C3  ,
-                            const Standard_Real       Rad ) {
-  Curv1  = C1;
-  Pnt2  = P2;
-  Curvon = C3;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_CuPtOnCu;
+                            const Standard_Real       Rad ) : Curv1(C1), Pnt2(P2), Curvon(C3), FirstRad(Rad), TheType(Geom2dGcc_CuPtOnCu) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1   ,
                             const Geom2dAdaptor_Curve&  C2   ,
                             const gp_Lin2d&  OnLi ,
-                            const Standard_Real       Rad  ) {
-  Curv1  = C1;
-  Curv2  = C2;
-  Linon = OnLi;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_CuCuOnLi;
+                            const Standard_Real       Rad  ) : Curv1(C1), Curv2(C2), Linon(OnLi), FirstRad(Rad), TheType(Geom2dGcc_CuCuOnLi) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const gp_Circ2d&           C1   ,
                               const Geom2dAdaptor_Curve& C2   ,
                               const gp_Lin2d&            OnLi ,
-                              const Standard_Real                 Rad  ) {
-  Circ1  = C1;
-  Curv2  = C2;
-  Linon = OnLi;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_CiCuOnLi;
+                              const Standard_Real                 Rad  ) : Circ1(C1), Curv2(C2), Linon(OnLi), FirstRad(Rad), TheType(Geom2dGcc_CiCuOnLi) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const gp_Lin2d& L1  ,
                               const Geom2dAdaptor_Curve&  C2  ,
                               const gp_Lin2d&  OnLi ,
-                              const Standard_Real       Rad ) {
-  Lin1  = L1;
-  Curv2  = C2;
-  Linon = OnLi;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_LiCuOnLi;
+                              const Standard_Real       Rad ) : Lin1(L1), Curv2(C2), Linon(OnLi), FirstRad(Rad), TheType(Geom2dGcc_LiCuOnLi) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1  ,
                               const gp_Pnt2d&            P2  ,
                               const gp_Lin2d&            OnLi ,
-                              const Standard_Real                 Rad ) {
-  Curv1  = C1;
-  Pnt2  = P2;
-  Linon = OnLi;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_CuPtOnLi;
+                              const Standard_Real                 Rad ) : Curv1(C1), Pnt2(P2), Linon(OnLi), FirstRad(Rad), TheType(Geom2dGcc_CuPtOnLi) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1   ,
                               const Geom2dAdaptor_Curve& C2   ,
                               const gp_Circ2d&           OnCi ,
-                              const Standard_Real                 Rad  ) {
-  Curv1  = C1;
-  Curv2  = C2;
-  Circon = OnCi;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_CuCuOnCi;
+                              const Standard_Real                 Rad  ) : Curv1(C1), Curv2(C2), Circon(OnCi), FirstRad(Rad), TheType(Geom2dGcc_CuCuOnCi) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const gp_Circ2d&           C1  ,
                               const Geom2dAdaptor_Curve& C2  ,
                               const gp_Circ2d&           OnCi ,
-                              const Standard_Real                 Rad ) {
-  Circ1  = C1;
-  Curv2  = C2;
-  Circon = OnCi;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_CuCuOnCi;
+                              const Standard_Real                 Rad ) : Circ1(C1), Curv2(C2), Circon(OnCi), FirstRad(Rad), TheType(Geom2dGcc_CuCuOnCi) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const gp_Lin2d& L1  ,
                               const Geom2dAdaptor_Curve&  C2  ,
                               const gp_Circ2d& OnCi ,
-                              const Standard_Real       Rad ) {
-  Lin1  = L1;
-  Curv2  = C2;
-  Circon = OnCi;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_LiCuOnCi;
+                              const Standard_Real       Rad ) : Lin1(L1), Curv2(C2), Circon(OnCi), FirstRad(Rad), TheType(Geom2dGcc_LiCuOnCi) {
+  
+  
+  
+  
+  
 }
 
 Geom2dGcc_FunctionTanCuCuOnCu::
   Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1  ,
                               const gp_Pnt2d&            P2  ,
                               const gp_Circ2d&           OnCi ,
-                              const Standard_Real                 Rad ) {
-  Curv1  = C1;
-  Pnt2  = P2;
-  Circon = OnCi;
-  FirstRad = Rad;
-  TheType = Geom2dGcc_CuPtOnCi;
+                              const Standard_Real                 Rad ) : Curv1(C1), Pnt2(P2), Circon(OnCi), FirstRad(Rad), TheType(Geom2dGcc_CuPtOnCi) {
+  
+  
+  
+  
+  
 }
 
 Standard_Integer Geom2dGcc_FunctionTanCuCuOnCu::
index 7e85bcedbbfbae47d6d4060c52c8f1bbb391d9f1..c44ec36094ff2effea71b38d78221f4a0aa23014 100644 (file)
@@ -37,9 +37,9 @@
 //=========================================================================
 Geom2dGcc_FunctionTanCuPnt::
 Geom2dGcc_FunctionTanCuPnt(const Geom2dAdaptor_Curve& C      ,
-                           const gp_Pnt2d& Point  ) {
-                             TheCurv = C;
-                             ThePoint = Point;
+                           const gp_Pnt2d& Point  ) : TheCurv(C), ThePoint(Point) {
+                             
+                             
 }
 
 
index b23d1bdc641f7316dc131730e0db53f3e462a946..2935d98c0e25927bb3f69551a466594cf69646e4 100644 (file)
 
 Geom2dGcc_FunctionTanObl::
 Geom2dGcc_FunctionTanObl(const Geom2dAdaptor_Curve& C,
-                         const gp_Dir2d& Dir    )
+                         const gp_Dir2d& Dir    ) : TheCurv(C), TheDirection(Dir)
 {
-  TheCurv = C;
-  TheDirection = Dir;
+  
+  
 }
 
 
index 14ad20d0207b99376334284878a7e2e87e79912a..8dc9485350f2206407bcbbccddee476afeb85447 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GccAna_Lin2d2Tan.hxx>
 #include <GccEnt_BadQualifier.hxx>
 #include <GccEnt_QualifiedCirc.hxx>
@@ -34,7 +36,7 @@ Geom2dGcc_Lin2d2Tan::
     Geom2dGcc_Lin2d2Tan (const Geom2dGcc_QualifiedCurve& Qualified1,
                         const Geom2dGcc_QualifiedCurve& Qualified2,
                         const Standard_Real             Tolang    ):
-  linsol(1,4)    ,
+  NbrSol(0), linsol(1,4)    ,
   qualifier1(1,4),
   qualifier2(1,4),
   pnttg1sol(1,4) ,
@@ -46,8 +48,8 @@ Geom2dGcc_Lin2d2Tan::
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
 
@@ -55,7 +57,7 @@ Geom2dGcc_Lin2d2Tan::
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  NbrSol = 0;
+  
   if (Type1 == GeomAbs_Circle && Type2 == GeomAbs_Circle ) {
     Handle(Geom2d_Circle) CCC1 = Handle(Geom2d_Circle)::DownCast(CC1);
     gp_Circ2d c1(CCC1->Circ2d());
@@ -90,8 +92,8 @@ Geom2dGcc_Lin2d2Tan::
     Standard_Integer   aNbSamples2 = Geom2dGcc_CurveTool::NbSamples(C2);
     Standard_Real      aStep2      = (a2LPar - a2FPar)/aNbSamples2;
     Standard_Real      Param2      = a2FPar;
-    Standard_Integer   i;
-    Standard_Integer   j;
+    Standard_Integer   i = 0;
+    Standard_Integer   j = 0;
     
     for (i = 0; i <= aNbSamples1 && NbrSol < 4; i++) {
       Param2 = a2FPar;
@@ -116,7 +118,7 @@ Geom2dGcc_Lin2d2Tan::
     Geom2dGcc_Lin2d2Tan (const Geom2dGcc_QualifiedCurve& Qualified1,
                         const gp_Pnt2d&                 ThePoint  ,
                         const Standard_Real             Tolang    ):
-  linsol(1,2)    ,
+  NbrSol(0), linsol(1,2)    ,
   qualifier1(1,2),
   qualifier2(1,2),
   pnttg1sol(1,2) ,
@@ -127,14 +129,14 @@ Geom2dGcc_Lin2d2Tan::
   pararg2(1,2)   
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  NbrSol = 0;
+  
   if (Type1 == GeomAbs_Circle) {
     Handle(Geom2d_Circle) CCC1 = Handle(Geom2d_Circle)::DownCast(CC1);
     gp_Circ2d c1(CCC1->Circ2d());
@@ -159,7 +161,7 @@ Geom2dGcc_Lin2d2Tan::
     Standard_Integer   aNbSamples = Geom2dGcc_CurveTool::NbSamples(C1);
     Standard_Real      aStep      = (aLastPar - aFirstPar)/aNbSamples;
     Standard_Real      Param1     = aFirstPar;
-    Standard_Integer   i;
+    Standard_Integer   i = 0;
     
     for (i = 0; i <= aNbSamples && NbrSol < 2; i++) {
       Geom2dGcc_Lin2d2TanIter Lin(Qc1,ThePoint,Param1,Tolang);
@@ -184,7 +186,7 @@ Geom2dGcc_Lin2d2Tan::
                         const Standard_Real             Tolang    ,
                         const Standard_Real             Param1    ,
                         const Standard_Real             Param2    ):
-  linsol(1,4)    ,
+  NbrSol(0), linsol(1,4)    ,
   qualifier1(1,4),
   qualifier2(1,4),
   pnttg1sol(1,4) ,
@@ -196,8 +198,8 @@ Geom2dGcc_Lin2d2Tan::
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
-  Handle(Geom2d_Curve) CC2 = C2.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC2 = C2.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
   GeomAbs_CurveType Type2 = C2.GetType();
 
@@ -205,7 +207,7 @@ Geom2dGcc_Lin2d2Tan::
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  NbrSol = 0;
+  
   if (Type1 == GeomAbs_Circle && Type2 == GeomAbs_Circle ) {
     Handle(Geom2d_Circle) CCC1 = Handle(Geom2d_Circle)::DownCast(CC1);
     gp_Circ2d c1(CCC1->Circ2d());
@@ -249,7 +251,7 @@ Geom2dGcc_Lin2d2Tan::
                         const gp_Pnt2d&                 ThePoint  ,
                         const Standard_Real             Tolang    ,
                         const Standard_Real             Param1    ):
-  linsol(1,2)    ,
+  NbrSol(0), linsol(1,2)    ,
   qualifier1(1,2),
   qualifier2(1,2),
   pnttg1sol(1,2) ,
@@ -260,14 +262,14 @@ Geom2dGcc_Lin2d2Tan::
   pararg2(1,2)   
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  NbrSol = 0;
+  
   if (Type1 == GeomAbs_Circle) {
     Handle(Geom2d_Circle) CCC1 = Handle(Geom2d_Circle)::DownCast(CC1);
     gp_Circ2d c1(CCC1->Circ2d());
@@ -364,11 +366,11 @@ Standard_Boolean Geom2dGcc_Lin2d2Tan::Add(const Standard_Integer     theIndex,
                                          const Geom2dAdaptor_Curve &theC1,
                                          const Geom2dAdaptor_Curve &theC2)
 {
-  Standard_Integer i;
-  Standard_Real    aPar1sol;
-  Standard_Real    aPar2sol;
-  Standard_Real    aPar1arg;
-  Standard_Real    aPar2arg;
+  Standard_Integer i = 0;
+  Standard_Real    aPar1sol = NAN;
+  Standard_Real    aPar2sol = NAN;
+  Standard_Real    aPar1arg = NAN;
+  Standard_Real    aPar2arg = NAN;
   gp_Pnt2d         aPnt1Sol;
   gp_Pnt2d         aPnt2Sol;
   gp_Lin2d         aLin   = theLin.ThisSolution();
index 980c01b7183ebc1bea8a4bfff0e2b5de473ef55c..01f6fd0956a78c59750ee68a3430c5cdd4c29081 100644 (file)
@@ -18,6 +18,8 @@
 //  CREATION D UNE LIGNE TANGENTE A DEUX COURBES.                        +
 //========================================================================
 
+#include <math.h>
+
 #include <GccEnt_BadQualifier.hxx>
 #include <GccEnt_QualifiedCirc.hxx>
 #include <Geom2dGcc_CurveTool.hxx>
@@ -41,17 +43,17 @@ Geom2dGcc_Lin2d2TanIter::
 Geom2dGcc_Lin2d2TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                          const Geom2dGcc_QCurve&     Qualified2 ,
                          const Standard_Real         Param2     ,
-                         const Standard_Real         Tolang     ) {
+                         const Standard_Real         Tolang     ) : par1sol(0.), pararg1(0.), par2sol(0.0), pararg2(0.0), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
 
-                           par1sol = 0.;
-                           pararg1 = 0.;
-                           par2sol = 0.0;
-                           pararg2 = 0.0;
+                           
+                           
+                           
+                           
                            //Standard_Real Tol = Abs(Tolang);
 
-                           WellDone = Standard_False;
-                           qualifier1 = GccEnt_noqualifier;
-                           qualifier2 = GccEnt_noqualifier;
+                           
+                           
+                           
                            if (Qualified1.IsEnclosed()) { throw GccEnt_BadQualifier(); }
                            gp_Circ2d C1 = Qualified1.Qualified();
                            Geom2dAdaptor_Curve Cu2 = Qualified2.Qualified();
@@ -63,7 +65,7 @@ Geom2dGcc_Lin2d2TanIter (const GccEnt_QualifiedCirc& Qualified1 ,
                              Standard_Real Usol = sol.Root();
                              //     gp_Pnt2d Origine,Pt;
                              //  Modified by Sergey KHROMOV - Thu Apr  5 17:39:47 2001 Begin
-                             Standard_Real Norm;
+                             Standard_Real Norm = NAN;
                              func.Value(Usol, Norm);
                              if (Abs(Norm) < Tolang) {
                                //  Modified by Sergey KHROMOV - Thu Apr  5 17:39:48 2001 End
@@ -121,14 +123,14 @@ Geom2dGcc_Lin2d2TanIter (const Geom2dGcc_QCurve& Qualified1 ,
                          const Geom2dGcc_QCurve& Qualified2 ,
                          const Standard_Real      Param1     ,
                          const Standard_Real      Param2     ,
-                         const Standard_Real      Tolang     ) {
-                           par1sol = 0.;
-                           pararg1 = 0.;
-                           par2sol = 0.0;
-                           pararg2 = 0.0;
-                           WellDone = Standard_False;
-                           qualifier1 = GccEnt_noqualifier;
-                           qualifier2 = GccEnt_noqualifier;
+                         const Standard_Real      Tolang     ) : par1sol(0.), pararg1(0.), par2sol(0.0), pararg2(0.0), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
+                           
+                           
+                           
+                           
+                           
+                           
+                           
                            if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                              Qualified1.IsOutside() || Qualified1.IsUnqualified()) ||
                              !(Qualified2.IsEnclosed() || Qualified2.IsEnclosing() || 
@@ -198,15 +200,15 @@ Geom2dGcc_Lin2d2TanIter::
 Geom2dGcc_Lin2d2TanIter (const Geom2dGcc_QCurve& Qualified1 ,
                          const gp_Pnt2d&          ThePoint   ,
                          const Standard_Real      Param1     ,
-                         const Standard_Real      Tolang     ) {
+                         const Standard_Real      Tolang     ) : par1sol(0.), pararg1(0.), par2sol(0.0), pararg2(0.0), WellDone(Standard_False), qualifier1(GccEnt_noqualifier), qualifier2(GccEnt_noqualifier) {
 
-                           par1sol = 0.;
-                           pararg1 = 0.;
-                           par2sol = 0.0;
-                           pararg2 = 0.0;
-                           WellDone = Standard_False;
-                           qualifier1 = GccEnt_noqualifier;
-                           qualifier2 = GccEnt_noqualifier;
+                           
+                           
+                           
+                           
+                           
+                           
+                           
                            if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
                              Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
                                throw GccEnt_BadQualifier();
@@ -220,7 +222,7 @@ Geom2dGcc_Lin2d2TanIter (const Geom2dGcc_QCurve& Qualified1 ,
                            if (sol.IsDone()) {
                              Standard_Real Usol = sol.Root();
                              //  Modified by Sergey KHROMOV - Thu Apr  5 17:45:17 2001 Begin
-                             Standard_Real Norm;
+                             Standard_Real Norm = NAN;
                              func.Value(Usol, Norm);
                              if (Abs(Norm) < Tolang) {
                                //  Modified by Sergey KHROMOV - Thu Apr  5 17:45:19 2001 End
index 560614e6c78e557b14db326a7fd02af7b4a55334..b7ec055fecd6f0d505b90d27d629ca1616ec3b59 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GccAna_Lin2dTanObl.hxx>
 #include <GccEnt_BadQualifier.hxx>
 #include <GccEnt_QualifiedCirc.hxx>
@@ -34,8 +36,8 @@ Geom2dGcc_Lin2dTanObl::
                          const gp_Lin2d&                 TheLine    ,
                          const Standard_Real             TolAng     ,
                          const Standard_Real             Angle      ):
-  Paral2(Standard_False),
-  linsol(1,2)    ,
+  WellDone(Standard_False), Paral2(Standard_False),
+  NbrSol(0), linsol(1,2)    ,
   qualifier1(1,2),
   pnttg1sol(1,2) ,
   pntint2sol(1,2),
@@ -45,15 +47,15 @@ Geom2dGcc_Lin2dTanObl::
   pararg2(1,2)
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (Type1 == GeomAbs_Circle ) {
     Handle(Geom2d_Circle) CCC1 = Handle(Geom2d_Circle)::DownCast(CC1);
     gp_Circ2d c1(CCC1->Circ2d());
@@ -77,7 +79,7 @@ Geom2dGcc_Lin2dTanObl::
     Standard_Integer   aNbSamples = Geom2dGcc_CurveTool::NbSamples(C1);
     Standard_Real      aStep      = (aLastPar - aFirstPar)/aNbSamples;
     Standard_Real      Param1     = aFirstPar;
-    Standard_Integer   i;
+    Standard_Integer   i = 0;
     
     for (i = 0; i <= aNbSamples && NbrSol < 2; i++) {
       Geom2dGcc_Lin2dTanOblIter Lin(Qc1,TheLine,Param1,TolAng,Angle);
@@ -100,8 +102,8 @@ Geom2dGcc_Lin2dTanObl::
                          const Standard_Real             TolAng     ,
                          const Standard_Real             Param1     ,
                          const Standard_Real             Angle      ):
-  Paral2(Standard_False),
-  linsol(1,2)    ,
+  WellDone(Standard_False), Paral2(Standard_False),
+  NbrSol(0), linsol(1,2)    ,
   qualifier1(1,2),
   pnttg1sol(1,2) ,
   pntint2sol(1,2),
@@ -111,15 +113,15 @@ Geom2dGcc_Lin2dTanObl::
   pararg2(1,2)
 {
   Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
-  Handle(Geom2d_Curve) CC1 = C1.Curve();
+  const Handle(Geom2d_Curve)& CC1 = C1.Curve();
   GeomAbs_CurveType Type1 = C1.GetType();
 
 //=============================================================================
 //                            Appel a GccAna.                                 +
 //=============================================================================
 
-  WellDone = Standard_False;
-  NbrSol = 0;
+  
+  
   if (Type1 == GeomAbs_Circle ) {
     Handle(Geom2d_Circle) CCC1 = Handle(Geom2d_Circle)::DownCast(CC1);
     gp_Circ2d c1(CCC1->Circ2d());
@@ -205,11 +207,11 @@ Standard_Boolean Geom2dGcc_Lin2dTanObl::Add
                            const Standard_Real          theTol,
                            const Geom2dAdaptor_Curve   &theC1)
 {
-  Standard_Integer i;
-  Standard_Real    aPar1sol;
-  Standard_Real    aPar2sol;
-  Standard_Real    aPar1arg;
-  Standard_Real    aPar2arg;
+  Standard_Integer i = 0;
+  Standard_Real    aPar1sol = NAN;
+  Standard_Real    aPar2sol = NAN;
+  Standard_Real    aPar1arg = NAN;
+  Standard_Real    aPar2arg = NAN;
   gp_Pnt2d         aPnt1Sol;
   gp_Pnt2d         aPnt2Sol;
   gp_Lin2d         aLin   = theLin.ThisSolution();
index 802c7db4db598db0b1074fb449d0e0aba42f6558..f085ab2bd7bdc732d5afc0cab338c823c13b1f49 100644 (file)
@@ -40,13 +40,13 @@ Geom2dGcc_Lin2dTanOblIter (const Geom2dGcc_QCurve&  Qualified1 ,
                            const Standard_Real      Param1     ,
                            const Standard_Real      TolAng     ,
                            const Standard_Real      Angle      )
-: par2sol(0.0),
-  pararg2(0.0)
+: par1sol(0.), WellDone(Standard_False), par2sol(0.0),
+  pararg1(0.), pararg2(0.0)
 {
 
-  par1sol = 0.;
-  pararg1 = 0.;
-  WellDone = Standard_False;
+  
+  
+  
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || 
     Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
       throw GccEnt_BadQualifier();
index b760d1f80d95bf9042f31401b9039b37f8683fd9..35ae3028130711a1b0abf37054a61a8096d6203c 100644 (file)
@@ -48,7 +48,7 @@ Standard_Boolean Geom2dGcc_QCurve::
 
 Geom2dGcc_QCurve::
    Geom2dGcc_QCurve (const Geom2dAdaptor_Curve&          Curve,
-                        const GccEnt_Position Qualifier) {
-   TheQualified = Curve;
-   TheQualifier = Qualifier;
+                        const GccEnt_Position Qualifier) : TheQualified(Curve), TheQualifier(Qualifier) {
+   
+   
  }
index 383a63d0f946cd5f9759ace21ba581fe6b044fb3..2f3359ef4996d4f1a6007e73fd5a07a9dc6640f6 100644 (file)
@@ -17,9 +17,9 @@
 
 Geom2dGcc_QualifiedCurve::
    Geom2dGcc_QualifiedCurve (const Geom2dAdaptor_Curve& Curve    ,
-                            const GccEnt_Position      Qualifier) {
-   TheQualified = Curve;
-   TheQualifier = Qualifier;
+                            const GccEnt_Position      Qualifier) : TheQualified(Curve), TheQualifier(Qualifier) {
+   
+   
  }
 
 Geom2dAdaptor_Curve Geom2dGcc_QualifiedCurve::
index 5b4b63235de09f4a99efcf957ab4985c200ef150..d1a86d6ea5f596fd79154a546136ff30d48d979f 100644 (file)
@@ -38,12 +38,12 @@ Geom2dHatch_Elements::Geom2dHatch_Elements(const Geom2dHatch_Elements& )
 #endif
 }
 
-Geom2dHatch_Elements::Geom2dHatch_Elements()
+Geom2dHatch_Elements::Geom2dHatch_Elements() : NumWire(0), NumEdge(0), myCurEdge(1), myCurEdgePar(Probing_Start)
 {
-  NumWire = 0;
-  NumEdge = 0;
-  myCurEdge = 1;
-  myCurEdgePar = Probing_Start;
+  
+  
+  
+  
 }
 
 void Geom2dHatch_Elements::Clear()
@@ -119,7 +119,7 @@ Standard_Boolean Geom2dHatch_Elements::OtherSegment (const gp_Pnt2d& P,
                                                      Standard_Real& Par)
 {
   Geom2dHatch_DataMapIteratorOfMapOfElements Itertemp;
-  Standard_Integer                        i;
+  Standard_Integer                        i = 0;
   
   for (Itertemp.Initialize (myMap), i = 1; Itertemp.More(); Itertemp.Next(), i++)
   {
index 0f84262502bdb2592fcf7495ffda8b890ff309dc..7111a662fb89b650e3c6ea47776172255b4599ab 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2dAdaptor_Curve.hxx>
 #include <Geom2dHatch_Classifier.hxx>
 #include <Geom2dHatch_Element.hxx>
@@ -161,7 +163,7 @@ void Geom2dHatch_Hatcher::KeepSegments (const Standard_Boolean Keep)
 Standard_Integer Geom2dHatch_Hatcher::AddElement (const Geom2dAdaptor_Curve& Curve,
                                               const TopAbs_Orientation Orientation)
 {
-  Standard_Integer IndE ;
+  Standard_Integer IndE = 0 ;
   for (IndE = 1 ; IndE <= myNbElements && myElements.IsBound(IndE) ; IndE++) ;
   if (IndE > myNbElements) {
     myNbElements++ ;
@@ -244,7 +246,7 @@ void Geom2dHatch_Hatcher::ClrElements ()
 
 Standard_Integer Geom2dHatch_Hatcher::AddHatching (const Geom2dAdaptor_Curve& Curve)
 {
-  Standard_Integer IndH ;
+  Standard_Integer IndH = 0 ;
   for (IndH = 1 ; IndH <= myNbHatchings && myHatchings.IsBound(IndH) ; IndH++) ;
   if (IndH > myNbHatchings) {
     myNbHatchings++ ;
@@ -339,7 +341,7 @@ void Geom2dHatch_Hatcher::Trim (const Standard_Integer IndH)
 
   Hatching.ClrPoints() ;
 
-  Standard_Boolean OK, AllOK ;
+  Standard_Boolean OK = 0, AllOK = 0 ;
 
   AllOK = Standard_True ;
   for (Standard_Integer IndE = 1 ; IndE <= myNbElements ; IndE++) {
@@ -744,7 +746,7 @@ Standard_Boolean Geom2dHatch_Hatcher::GlobalTransition (HatchGen_PointOnHatching
 
   gp_Dir2d Tangente2d, Normale2d ;
   gp_Dir   Tangente,   Normale ;
-  Standard_Real Courbure ;
+  Standard_Real Courbure = NAN ;
 
   const Geom2dAdaptor_Curve& CurveH = HatchingCurve (Point.Index()) ;
 
@@ -777,7 +779,7 @@ Standard_Boolean Geom2dHatch_Hatcher::GlobalTransition (HatchGen_PointOnHatching
     
     TopAbs_Orientation ElementOrientation = Element.Orientation() ;
     Standard_Boolean ToReverse = (ElementOrientation == TopAbs_REVERSED);
-    Standard_Real Param ;
+    Standard_Real Param = NAN ;
     switch (PntE.Position()) 
     {
       case TopAbs_FORWARD  : 
index b24291c9990922d4f9a403c9f26e3fa2e3ae64aa..5d772bb273711b7eee94b7b6618ff13dd9bf8649 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2dHatch_Hatching.hxx>
 #include <gp_Pnt2d.hxx>
 #include <HatchGen_Domain.hxx>
@@ -165,7 +167,7 @@ void Geom2dHatch_Hatching::AddPoint (const HatchGen_PointOnHatching& Point,
 {
   Standard_Integer NbPoints = myPoints.Length () ;
 //for (Standard_Integer IPntH = 1 ; IPntH <= NbPoints ; IPntH++) {
-  Standard_Integer IPntH;
+  Standard_Integer IPntH = 0;
   for (IPntH = 1 ; IPntH <= NbPoints ; IPntH++) {
     const HatchGen_PointOnHatching& PntH = myPoints.Value (IPntH) ;
     if (!PntH.IsLower (Point, Confusion)) break ;
@@ -323,7 +325,7 @@ void Geom2dHatch_Hatching::ClrDomains ()
 // Purpose  : returns a 2d point on the curve 
 //=======================================================================
 gp_Pnt2d Geom2dHatch_Hatching::ClassificationPoint () const { 
-  Standard_Real t,a,b;
+  Standard_Real t = NAN,a = NAN,b = NAN;
   a = myCurve.FirstParameter();
   b = myCurve.LastParameter();
   if(b >= Precision::Infinite()) { 
index 7bf424e19cd0ea323a265831d046ef627c9cd3f8..8025efcfe495f1deb3c0d6776666728243ba2f0c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Curve.hxx>
 #include <Geom2dLProp_Curve2dTool.hxx>
 #include <Geom2dLProp_FuncCurExt.hxx>
@@ -26,9 +28,9 @@
 //=============================================================================
 Geom2dLProp_FuncCurExt::Geom2dLProp_FuncCurExt(const Handle(Geom2d_Curve)&  C,
                                                const Standard_Real Tol)
-                                               :theCurve(C)
+                                               :theCurve(C), epsX(Tol)
 {
-  epsX  = Tol;
+  
 }
 
 //=============================================================================
@@ -66,7 +68,7 @@ Standard_Boolean  Geom2dLProp_FuncCurExt::Value (const Standard_Real  X,
 Standard_Boolean Geom2dLProp_FuncCurExt::Derivative(const Standard_Real  X,
                                                     Standard_Real& D)
 {  
-  Standard_Real F;
+  Standard_Real F = NAN;
   return Values (X,F,D) ;
 }
 
@@ -78,7 +80,7 @@ Standard_Boolean Geom2dLProp_FuncCurExt::Values (const Standard_Real  X,
                                                  Standard_Real& F,
                                                  Standard_Real& D)
 {
-  Standard_Real F2;
+  Standard_Real F2 = NAN;
   Standard_Real Dx= epsX/100.;
 
   if (X+Dx > Geom2dLProp_Curve2dTool::LastParameter(theCurve)) {Dx = - Dx;}
@@ -101,7 +103,7 @@ Standard_Boolean Geom2dLProp_FuncCurExt::IsMinKC (const Standard_Real  X) const
   gp_Pnt2d            P1;
   gp_Vec2d            V1,V2,V3;
   Standard_Real  Dx= epsX;
-  Standard_Real  KC,KP;
+  Standard_Real  KC = NAN,KP = NAN;
 
   Geom2dLProp_Curve2dTool::D3(theCurve,X,P1,V1,V2,V3);
   Standard_Real CPV1V2 = V1.Crossed(V2);
index 40fbe1049c9ba79834f1fc90320581e23c352728..9f54f719bfa17b9af8d5ecbcdbca0548d00f82b8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Curve.hxx>
 #include <Geom2dLProp_Curve2dTool.hxx>
 #include <Geom2dLProp_FuncCurNul.hxx>
@@ -36,7 +38,7 @@ Geom2dLProp_FuncCurNul::Geom2dLProp_FuncCurNul(const Handle(Geom2d_Curve)& C)
 Standard_Boolean Geom2dLProp_FuncCurNul::Value (const Standard_Real  X,
                                                Standard_Real& F)
 {
-  Standard_Real D;
+  Standard_Real D = NAN;
   return Values(X,F,D);
 }
 
@@ -47,7 +49,7 @@ Standard_Boolean Geom2dLProp_FuncCurNul::Value (const Standard_Real  X,
 Standard_Boolean Geom2dLProp_FuncCurNul::Derivative(const Standard_Real  X,
                                                    Standard_Real& D)
 {  
-  Standard_Real F;
+  Standard_Real F = NAN;
   return Values(X,F,D);
 }
 
index bdf591d9ff9b7782960c3af47af597afe7d20880..93abf22296d9e843a34bffbcf0bcfd9056b63e17 100644 (file)
@@ -61,7 +61,7 @@ void Geom2dLProp_NumericCurInf2d::PerformCurExt (const Handle(Geom2d_Curve)& C,
 
   Geom2dLProp_FuncCurExt    F(C,EpsH);
   Standard_Integer NbSamples = 100;
-  Standard_Boolean SolType;
+  Standard_Boolean SolType = 0;
 
   math_FunctionRoots SolRoot (F,UMin,UMax,NbSamples,EpsH,EpsH,EpsH);
 
index b25ebf8667f1b098302cc0bf9abe2546688d60b4..74969b6991d19c157973b54f9d09b1d01ba9f8ae 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtCC.hxx>
 #include <GeomAPI_ExtremaCurveCurve.hxx>
 #include <GeomAPI_ProjectPointOnCurve.hxx>
@@ -93,7 +95,7 @@ void GeomAPI_ExtremaCurveCurve::Init
 
     // evaluate the lower distance and its index;
     
-    Standard_Real Dist2, Dist2Min = myExtCC.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtCC.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtCC.NbExt(); i++) {
@@ -136,7 +138,7 @@ void GeomAPI_ExtremaCurveCurve::Init
 
     // evaluate the lower distance and its index;
     
-    Standard_Real Dist2, Dist2Min = myExtCC.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtCC.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtCC.NbExt(); i++) {
@@ -384,7 +386,7 @@ void GeomAPI_ExtremaCurveCurve::TotalPerform()
   }
 
   gp_Pnt P11, P12, P21, P22;
-  Standard_Real d11, d12, d21, d22;
+  Standard_Real d11 = NAN, d12 = NAN, d21 = NAN, d22 = NAN;
   myExtCC.TrimmedSquareDistances(d11, d12, d21, d22, P11, P12, P21, P22);
 
   Standard_Real aTotalDist2 = myTotalDist * myTotalDist;
index d385e637debe5699232df230035d09dab6472822..f3117fae6bfd94c7fc4b1d7f9648b1d836b088bf 100644 (file)
@@ -167,16 +167,16 @@ private:
   Standard_EXPORT void TotalPerform();
 
 
-  Standard_Boolean myIsDone;
-  Standard_Integer myIndex;
+  Standard_Boolean myIsDone{};
+  Standard_Integer myIndex{};
   Extrema_ExtCC myExtCC;
   GeomAdaptor_Curve myC1;
   GeomAdaptor_Curve myC2;
-  Standard_Boolean myTotalExt;
-  Standard_Boolean myIsInfinite;
-  Standard_Real myTotalDist;
+  Standard_Boolean myTotalExt{};
+  Standard_Boolean myIsInfinite{};
+  Standard_Real myTotalDist{};
   gp_Pnt myTotalPoints[2];
-  Standard_Real myTotalPars[2];
+  Standard_Real myTotalPars[2]{};
 
 
 };
index c77fdb07a0bd1673b34bedc9e09843ab24e4964c..fcae59d07cfc99a9634ba35a8fbfe8f82b707c0f 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtCS.hxx>
 #include <Extrema_POnCurv.hxx>
 #include <Extrema_POnSurf.hxx>
@@ -90,7 +92,7 @@ void GeomAPI_ExtremaCurveSurface::Init
 
     // evaluate the lower distance and its index;
     
-    Standard_Real Dist2, Dist2Min = myExtCS.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtCS.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtCS.NbExt(); i++) {
@@ -132,7 +134,7 @@ void GeomAPI_ExtremaCurveSurface::Init
 
     // evaluate the lower distance and its index;
     
-    Standard_Real Dist2, Dist2Min = myExtCS.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtCS.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtCS.NbExt(); i++) {
index c1fbe59061060f938270c8f12b25c320a178e1f8..e05730815cd71d291bfcc8d2decbd2798d1eec99 100644 (file)
@@ -152,8 +152,8 @@ Standard_EXPORT operator Standard_Real() const;
 
 private:
 
-  Standard_Boolean myIsDone;
-  Standard_Integer myIndex;
+  Standard_Boolean myIsDone{};
+  Standard_Integer myIndex{};
   Extrema_ExtCS myExtCS;
 
 };
index 8a844f449192003af8a45be82e02949266f8b9e4..70c883ba65d0718531143eb86b2a8fbd42ca6278 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtSS.hxx>
 #include <Extrema_POnSurf.hxx>
 #include <GeomAdaptor_Surface.hxx>
@@ -92,7 +94,7 @@ void GeomAPI_ExtremaSurfaceSurface::Init
 
     // evaluate the lower distance and its index;
     
-    Standard_Real Dist2, Dist2Min = myExtSS.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtSS.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtSS.NbExt(); i++) {
@@ -139,7 +141,7 @@ void GeomAPI_ExtremaSurfaceSurface::Init
 
     // evaluate the lower distance and its index;
     
-    Standard_Real Dist2, Dist2Min = myExtSS.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtSS.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtSS.NbExt(); i++) {
index 4e74c6871025fb355cd22ce8acfd3c75fd19bb0b..344d793e938967009d0a9c1691b115da8a111336 100644 (file)
@@ -155,8 +155,8 @@ Standard_EXPORT operator Standard_Real() const;
 
 private:
 
-  Standard_Boolean myIsDone;
-  Standard_Integer myIndex;
+  Standard_Boolean myIsDone{};
+  Standard_Integer myIndex{};
   Extrema_ExtSS myExtSS;
 
 };
index 4f0ebf591380e54c106bb2a091789f1241c94eb4..60c88b3e34d84fc6f1d5f21f4b457cd5b0f5ac3f 100644 (file)
@@ -16,6 +16,8 @@
 
 // 08-Aug-95 : xab : interpolation uses BSplCLib::Interpolate
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <GeomAPI_Interpolate.hxx>
 #include <gp_Vec.hxx>
@@ -35,9 +37,9 @@
 static Standard_Boolean CheckPoints(const TColgp_Array1OfPnt& PointArray,
                                    const Standard_Real    Tolerance) 
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
   Standard_Real tolerance_squared = Tolerance * Tolerance,
-  distance_squared ;
+  distance_squared = NAN ;
   Standard_Boolean result = Standard_True ;
   for (ii = PointArray.Lower() ; result && ii < PointArray.Upper() ; ii++) {
     distance_squared = 
@@ -56,10 +58,10 @@ static Standard_Boolean CheckTangents(
                                const TColStd_Array1OfBoolean& TangentFlags,
                                const Standard_Real            Tolerance) 
 {
-  Standard_Integer ii,
-  index ;
+  Standard_Integer ii = 0,
+  index = 0 ;
   Standard_Real tolerance_squared = Tolerance * Tolerance,
-  distance_squared ;
+  distance_squared = NAN ;
   Standard_Boolean result = Standard_True ;
   index = TangentFlags.Lower() ;
   for (ii = Tangents.Lower(); result && ii <= Tangents.Upper() ; ii++) {
@@ -80,8 +82,8 @@ static Standard_Boolean CheckTangents(
 static Standard_Boolean CheckParameters(const 
                                        TColStd_Array1OfReal&   Parameters) 
 {
-  Standard_Integer ii ;
-  Standard_Real distance ;
+  Standard_Integer ii = 0 ;
+  Standard_Real distance = NAN ;
   Standard_Boolean result = Standard_True ;
   for (ii = Parameters.Lower() ; result && ii < Parameters.Upper() ; ii++) {
     distance = 
@@ -98,9 +100,9 @@ static void  BuildParameters(const Standard_Boolean        PeriodicFlag,
                             const TColgp_Array1OfPnt&     PointsArray,
                             Handle(TColStd_HArray1OfReal)& ParametersPtr) 
 {
-  Standard_Integer ii,
-  index ;
-  Standard_Real distance ;
+  Standard_Integer ii = 0,
+  index = 0 ;
+  Standard_Real distance = NAN ;
   Standard_Integer 
     num_parameters = PointsArray.Length() ;
   if (PeriodicFlag) {
@@ -138,10 +140,10 @@ static void BuildPeriodicTangent(
                      const TColStd_Array1OfReal&    ParametersArray)
 {
   Standard_Integer 
-    ii,
-    degree ;
-  Standard_Real *point_array,
-  *parameter_array,
+    ii = 0,
+    degree = 0 ;
+  Standard_Real *point_array = nullptr,
+  *parameter_array = nullptr,
   eval_result[2][3] ;
   
   gp_Vec a_vector ;
@@ -182,10 +184,10 @@ static void BuildTangents(const TColgp_Array1OfPnt&      PointsArray,
                          TColStd_Array1OfBoolean&       TangentFlags,
                          const TColStd_Array1OfReal&    ParametersArray)
 {
- Standard_Integer ii,
- degree ;
- Standard_Real *point_array,
- *parameter_array,
+ Standard_Integer ii = 0,
+ degree = 0 ;
+ Standard_Real *point_array = nullptr,
+ *parameter_array = nullptr,
  
  eval_result[2][3] ;
  gp_Vec a_vector ;
@@ -245,16 +247,16 @@ static void ScaleTangents(const TColgp_Array1OfPnt&      PointsArray,
                          const TColStd_Array1OfBoolean& TangentFlags,
                          const TColStd_Array1OfReal&     ParametersArray)
 {
- Standard_Integer ii,
- jj,
+ Standard_Integer ii = 0,
+ jj = 0,
  degree=0,
- index,
- num_points ;
+ index = 0,
+ num_points = 0 ;
 
- Standard_Real *point_array,
- *parameter_array,
+ Standard_Real *point_array = nullptr,
+ *parameter_array = nullptr,
  value[2],
- ratio,
+ ratio = NAN,
  eval_result[2][3] ;
 
  gp_Vec a_vector ;
@@ -316,19 +318,17 @@ GeomAPI_Interpolate::GeomAPI_Interpolate
 myTolerance(Tolerance),
 myPoints(PointsPtr),
 myIsDone(Standard_False),
-myPeriodic(PeriodicFlag),
+myTangents(new TColgp_HArray1OfVec(myPoints->Lower(),
+                             myPoints->Upper())), myTangentFlags(new TColStd_HArray1OfBoolean(myPoints->Lower(),
+                                  myPoints->Upper())), myPeriodic(PeriodicFlag),
 myTangentRequest(Standard_False)
 {
- Standard_Integer ii ;
+ Standard_Integer ii = 0 ;
  Standard_Boolean result = 
    CheckPoints(PointsPtr->Array1(),
               Tolerance) ;
- myTangents = 
-     new TColgp_HArray1OfVec(myPoints->Lower(),
-                             myPoints->Upper()) ;
- myTangentFlags =
-      new TColStd_HArray1OfBoolean(myPoints->Lower(),
-                                  myPoints->Upper()) ;
 
  if (!result) {
    throw Standard_ConstructionError();
@@ -362,7 +362,7 @@ myParameters(ParametersPtr),
 myPeriodic(PeriodicFlag),
 myTangentRequest(Standard_False)
 {
- Standard_Integer ii ;
+ Standard_Integer ii = 0 ;
     
      
  Standard_Boolean result = 
@@ -407,8 +407,8 @@ void GeomAPI_Interpolate::Load(
    const Standard_Boolean Scale ) 
 
 {
- Standard_Boolean result ;
- Standard_Integer ii ;
+ Standard_Boolean result = 0 ;
+ Standard_Integer ii = 0 ;
  myTangentRequest = Standard_True ;
  myTangentFlags = TangentFlagsPtr ;
  if (Tangents.Length() != myPoints->Length() ||
@@ -449,7 +449,7 @@ void GeomAPI_Interpolate::Load(const gp_Vec& InitialTangent,
                               const gp_Vec& FinalTangent,
                               const Standard_Boolean Scale )  
 {
-  Standard_Boolean result ;
+  Standard_Boolean result = 0 ;
   myTangentRequest = Standard_True ;
   myTangentFlags->SetValue(1,Standard_True) ;
   myTangentFlags->SetValue(myPoints->Length(),Standard_True) ;
@@ -492,20 +492,20 @@ void GeomAPI_Interpolate::Perform()
 
 void GeomAPI_Interpolate::PerformPeriodic()
 { 
-  Standard_Integer degree,
-  ii,
-  jj,
-  index,
-  index1,
+  Standard_Integer degree = 0,
+  ii = 0,
+  jj = 0,
+  index = 0,
+  index1 = 0,
 //  index2,
-  mult_index,
-  half_order,
-  inversion_problem,
-  num_points,
-  num_distinct_knots,
-  num_poles  ;
+  mult_index = 0,
+  half_order = 0,
+  inversion_problem = 0,
+  num_points = 0,
+  num_distinct_knots = 0,
+  num_poles = 0  ;
  
-  Standard_Real period ;
+  Standard_Real period = NAN ;
 
   gp_Pnt a_point ;
 
@@ -690,18 +690,18 @@ void GeomAPI_Interpolate::PerformPeriodic()
 
 void GeomAPI_Interpolate::PerformNonPeriodic() 
 {
-  Standard_Integer degree,
-  ii,
-  jj,
-  index,
-  index1,
-  index2,
-  index3,
-  mult_index,
-  inversion_problem,
-  num_points,
-  num_distinct_knots,
-  num_poles  ;
+  Standard_Integer degree = 0,
+  ii = 0,
+  jj = 0,
+  index = 0,
+  index1 = 0,
+  index2 = 0,
+  index3 = 0,
+  mult_index = 0,
+  inversion_problem = 0,
+  num_points = 0,
+  num_distinct_knots = 0,
+  num_poles = 0  ;
   
   gp_Pnt a_point ;
 
index 5c4bc6161df5f8509e5bd229fd5e89fec25e2d95..21f7c10872e6a86563e98979231027bb8a46e84e 100644 (file)
@@ -32,9 +32,9 @@
 //function : GeomAPI_PointsToBSpline
 //purpose  : 
 //=======================================================================
-GeomAPI_PointsToBSpline::GeomAPI_PointsToBSpline()
+GeomAPI_PointsToBSpline::GeomAPI_PointsToBSpline() : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
 }
 
 
@@ -48,9 +48,9 @@ GeomAPI_PointsToBSpline::GeomAPI_PointsToBSpline
    const Standard_Integer    DegMin, 
    const Standard_Integer    DegMax,
    const GeomAbs_Shape       Continuity,
-   const Standard_Real       Tol3D)
+   const Standard_Real       Tol3D) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
   Init(Points,DegMin,DegMax,Continuity,Tol3D);
 }
 
@@ -65,9 +65,9 @@ GeomAPI_PointsToBSpline::GeomAPI_PointsToBSpline
    const Standard_Integer    DegMin, 
    const Standard_Integer    DegMax,
    const GeomAbs_Shape       Continuity,
-   const Standard_Real       Tol3D)
+   const Standard_Real       Tol3D) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
   Init(Points,ParType,DegMin,DegMax,Continuity,Tol3D);
 }
 
@@ -83,9 +83,9 @@ GeomAPI_PointsToBSpline::GeomAPI_PointsToBSpline
    const Standard_Integer      DegMin, 
    const Standard_Integer      DegMax,
    const GeomAbs_Shape         Continuity,
-   const Standard_Real         Tol3D)
+   const Standard_Real         Tol3D) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
   Init(Points,Params,DegMin,DegMax,Continuity,Tol3D);
 }
 
@@ -101,9 +101,9 @@ GeomAPI_PointsToBSpline::GeomAPI_PointsToBSpline
    const Standard_Real         W3,
    const Standard_Integer      DegMax,
    const GeomAbs_Shape         Continuity,
-   const Standard_Real         Tol3D)
+   const Standard_Real         Tol3D) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
   Init(Points,W1,W2,W3,DegMax,Continuity,Tol3D);
 }
 
@@ -261,7 +261,7 @@ void GeomAPI_PointsToBSpline::Init
    const GeomAbs_Shape         Continuity,
    const Standard_Real         Tol3D)
 {
-  Standard_Integer NbPoint = Points.Length(), i;
+  Standard_Integer NbPoint = Points.Length(), i = 0;
 
  
   Standard_Integer nbit = 2;
index 90be6e526659b1df37f87e7b784bc79b96d906d4..74ebe8a2b3f1f2499af6fde4dc7abdfaf21fff27 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AppDef_BSplineCompute.hxx>
 #include <AppDef_Variational.hxx>
 #include <AppParCurves_ConstraintCouple.hxx>
@@ -37,8 +39,8 @@ static void BuildParameters(const AppDef_MultiLine& theLine,
   const Approx_ParametrizationType theParT,
   TColStd_Array1OfReal&  thePars)
 {
-  Standard_Integer i, j, nbP3d = theLine.NbPoints();
-  Standard_Real dist;
+  Standard_Integer i = 0, j = 0, nbP3d = theLine.NbPoints();
+  Standard_Real dist = NAN;
   Standard_Integer firstP = 1, lastP = theLine.NbMultiPoints();
   const Standard_Integer aNbp = lastP - firstP + 1;
 
@@ -99,10 +101,10 @@ static void BuildPeriodicTangent(const AppDef_MultiLine& theLine,
     return;
   }
   //
-  Standard_Integer i, nnpol, nnp = Min(nbpoints, 9);
+  Standard_Integer i = 0, nnpol = 0, nnp = Min(nbpoints, 9);
   nnpol = nnp;
   Standard_Integer lastp = Min(lastpt, firstpt + nnp - 1);
-  Standard_Real U;
+  Standard_Real U = NAN;
   AppParCurves_Constraint Cons = AppParCurves_TangencyPoint;
   if (nnp <= 4)
   {
@@ -121,7 +123,7 @@ static void BuildPeriodicTangent(const AppDef_MultiLine& theLine,
   SQ1.Perform(P1);
   const AppParCurves_MultiCurve& C1 = SQ1.BezierValue();
   U = 0.0;
-  Standard_Integer  j, nbP3d = theLine.NbPoints();
+  Standard_Integer  j = 0, nbP3d = theLine.NbPoints();
 
   gp_Pnt aP;
   gp_Vec aV;
@@ -276,7 +278,7 @@ void GeomAPI_PointsToBSplineSurface::Interpolate(const TColgp_Array2OfPnt& Point
                                           const Approx_ParametrizationType ParType,
                                           const Standard_Boolean thePeriodic)
 {
-  Standard_Integer DegMin, DegMax;
+  Standard_Integer DegMin = 0, DegMax = 0;
   DegMin = DegMax = 3;
   GeomAbs_Shape CC  = GeomAbs_C2;
   Standard_Real Tol3d = -1.0;
@@ -324,7 +326,7 @@ void GeomAPI_PointsToBSplineSurface::Init(const TColgp_Array2OfPnt& Points,
     add = 2;
   }
   AppDef_MultiLine Line(Jmax-Jmin+1);
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   for (j = Jmin; j <= Jmax; j++) {
     AppDef_MultiPointConstraint MP(Imax-Imin+add, 0);
@@ -490,7 +492,7 @@ void GeomAPI_PointsToBSplineSurface::Init(const TColgp_Array2OfPnt& Points,
   // first approximate the U isos:
   Standard_Integer NbPointJ = Jmax-Jmin+1;
   Standard_Integer NbPointI = Imax-Imin+1;
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   AppDef_MultiLine Line(NbPointJ);
 
@@ -643,7 +645,7 @@ void GeomAPI_PointsToBSplineSurface::Interpolate(const TColStd_Array2OfReal& ZPo
                                                 const Standard_Real Y0, 
                                                 const Standard_Real dY)
 {
-  Standard_Integer DegMin, DegMax;
+  Standard_Integer DegMin = 0, DegMax = 0;
   DegMin = DegMax = 3;
   Standard_Real Tol3D  = -1.0;
   GeomAbs_Shape CC = GeomAbs_C2;
@@ -669,14 +671,14 @@ void GeomAPI_PointsToBSplineSurface::Init(const TColStd_Array2OfReal& ZPoints,
   Standard_Integer Imax = ZPoints.UpperRow();
   Standard_Integer Jmin = ZPoints.LowerCol();
   Standard_Integer Jmax = ZPoints.UpperCol();
-  Standard_Real length;
+  Standard_Real length = NAN;
 
   Standard_Real Tol2D = Tol3D;
 
   // first approximate the U isos:
   AppDef_MultiLine Line(Jmax-Jmin+1);
   math_Vector Param(Jmin, Jmax);
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 //  Standard_Real X, Y;
   length = dY * (Jmax-Jmin);
 
index 1b1589679757f07921ec2b5733d54887645ffe1b..c4ac712b2e2d3a91e6926701ecc10205ffc482c6 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtPC.hxx>
 #include <GeomAPI_ProjectPointOnCurve.hxx>
 #include <gp_Pnt.hxx>
@@ -74,7 +76,7 @@ GeomAPI_ProjectPointOnCurve::GeomAPI_ProjectPointOnCurve()
 
     // evaluate the lower distance and its index;
     
-    Standard_Real Dist2, Dist2Min = myExtPC.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtPC.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtPC.NbExt(); i++) {
@@ -109,7 +111,7 @@ GeomAPI_ProjectPointOnCurve::GeomAPI_ProjectPointOnCurve()
 
     // evaluate the lower distance and its index;
     
-    Standard_Real Dist2, Dist2Min = myExtPC.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtPC.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtPC.NbExt(); i++) {
@@ -146,7 +148,7 @@ GeomAPI_ProjectPointOnCurve::GeomAPI_ProjectPointOnCurve()
   myIsDone=myExtPC.IsDone() && ( myExtPC.NbExt() > 0);
   if (myIsDone) {
     // evaluate the lower distance and its index;
-    Standard_Real Dist2, Dist2Min = myExtPC.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtPC.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtPC.NbExt(); i++) {
index 6f2deabaac527636a21794eda7e66fcdd2692e40..fa6dffff632d2defc2f8ff8ab10369fafe9f1488 100644 (file)
@@ -123,8 +123,8 @@ Standard_EXPORT operator Standard_Real() const;
 
 private:
 
-  Standard_Boolean myIsDone;
-  Standard_Integer myIndex;
+  Standard_Boolean myIsDone{};
+  Standard_Integer myIndex{};
   Extrema_ExtPC myExtPC;
   GeomAdaptor_Curve myC;
 
index c04bcce8af815493450379a024dcdfddba8fa8fb..a147b95d50c927a4aeb177a1008989f722fb88f0 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtPS.hxx>
 #include <GeomAPI_ProjectPointOnSurf.hxx>
 #include <gp_Pnt.hxx>
@@ -95,7 +97,7 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 
   if ( myIsDone) {
     // evaluate the lower distance and its index;
-    Standard_Real Dist2, Dist2Min = myExtPS.SquareDistance(1);
+    Standard_Real Dist2 = NAN, Dist2Min = myExtPS.SquareDistance(1);
     myIndex = 1;
     
     for ( Standard_Integer i = 2; i <= myExtPS.NbExt(); i++) {
@@ -133,7 +135,7 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
   //myExtPS = Extrema_ExtPS (P, TheSurface, Tolerance, Tolerance);
   
   //modified by NIZNHY-PKV Mon Apr  8 11:13:37 2002 f XXX
-  Standard_Real Umin, Usup, Vmin, Vsup;
+  Standard_Real Umin = NAN, Usup = NAN, Vmin = NAN, Vsup = NAN;
   Surface->Bounds(Umin, Usup, Vmin, Vsup);
   myGeomAdaptor.Load(Surface, Umin, Usup, Vmin, Vsup);
   //
index 9d08f3762c9e562e4b5a433ccc888fd1b35f9a28..335e66bd7cc11c2adb225851cbf4ed5e75a3b7bc 100644 (file)
@@ -155,8 +155,8 @@ private:
   Standard_EXPORT void Init();
 
 
-  Standard_Boolean myIsDone;
-  Standard_Integer myIndex;
+  Standard_Boolean myIsDone{};
+  Standard_Integer myIndex{};
   Extrema_ExtPS myExtPS;
   GeomAdaptor_Surface myGeomAdaptor;
 
index 6d6f30d4ae697feed65c8a16b304628f7853756b..564f825288ea50caae05947e91d1e86b0e5e0181 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomAdaptor.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -156,7 +158,7 @@ Handle(Geom_Surface) GeomAdaptor::MakeSurface(const Adaptor3d_Surface& HS,
     return S;
 
   // trim the surface if necassary.
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   S->Bounds(U1, U2, V1, V2);
   if ((HS.FirstUParameter() != U1 ) ||
       (HS.LastUParameter () != U2 ) ||
index a68075eeb03d032b4889f60f46b8cbf63f4d8531..1e0ddfbc49f96ec2c81c09b6ead13caa6e357d60 100644 (file)
@@ -21,6 +21,8 @@
 #define No_Standard_RangeError
 #define No_Standard_OutOfRange
 
+#include <math.h>
+
 #include <GeomAdaptor_Curve.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -97,7 +99,7 @@ GeomAbs_Shape GeomAdaptor_Curve::LocalContinuity(const Standard_Real U1,
   Standard_Integer Nb = myBSplineCurve->NbKnots();
   Standard_Integer Index1 = 0;
   Standard_Integer Index2 = 0;
-  Standard_Real newFirst, newLast;
+  Standard_Real newFirst = NAN, newLast = NAN;
   const TColStd_Array1OfReal& TK = myBSplineCurve->Knots();
   const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities();
   BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,U1,myBSplineCurve->IsPeriodic(),
@@ -109,7 +111,7 @@ GeomAbs_Shape GeomAdaptor_Curve::LocalContinuity(const Standard_Real U1,
   }
   if ( Abs(newLast-TK(Index2))<Precision::PConfusion())
     Index2--;
-  Standard_Integer MultMax;
+  Standard_Integer MultMax = 0;
   // attention aux courbes peridiques.
   if ( (myBSplineCurve->IsPeriodic()) && (Index1 == Nb) )
     Index1 = 1;
@@ -266,7 +268,7 @@ Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const
     }
 
     Standard_Integer aDegree = myBSplineCurve->Degree();
-    Standard_Integer aCont;
+    Standard_Integer aCont = 0;
 
     switch (S)
     {
@@ -316,7 +318,7 @@ Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const
     // akm 05/04/02 (OCC278)  If our curve is trimmed we must recalculate 
     //                    the number of intervals obtained from the basis to
     //              vvv   reflect parameter bounds
-    Standard_Integer iNbBasisInt = C.NbIntervals(BaseS), iInt;
+    Standard_Integer iNbBasisInt = C.NbIntervals(BaseS), iInt = 0;
     if (iNbBasisInt>1)
     {
       TColStd_Array1OfReal rdfInter(1,1+iNbBasisInt);
@@ -352,7 +354,7 @@ void GeomAdaptor_Curve::Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape
     }
 
     Standard_Integer aDegree = myBSplineCurve->Degree();
-    Standard_Integer aCont;
+    Standard_Integer aCont = 0;
 
     switch (S)
     {
@@ -402,7 +404,7 @@ void GeomAdaptor_Curve::Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape
     // akm 05/04/02 (OCC278)  If our curve is trimmed we must recalculate 
     //                    the array of intervals obtained from the basis to
     //              vvv   reflect parameter bounds
-    Standard_Integer iNbBasisInt = C.NbIntervals(BaseS), iInt;
+    Standard_Integer iNbBasisInt = C.NbIntervals(BaseS), iInt = 0;
     if (iNbBasisInt>1)
     {
       TColStd_Array1OfReal rdfInter(1,1+iNbBasisInt);
@@ -746,12 +748,12 @@ Standard_Real GeomAdaptor_Curve::Resolution(const Standard_Real R3D) const
     return R3D / Handle(Geom_Ellipse)::DownCast (myCurve)->MajorRadius();
   }
   case GeomAbs_BezierCurve: {
-    Standard_Real res;
+    Standard_Real res = NAN;
     Handle(Geom_BezierCurve)::DownCast (myCurve)->Resolution(R3D,res);
     return res;
   }
   case GeomAbs_BSplineCurve: {
-    Standard_Real res;
+    Standard_Real res = NAN;
     myBSplineCurve->Resolution(R3D,res);
     return res;
   }
index 816af616f91b6069307fe02342bcf33418a2186e..a68a45d5fb2e8684db77b128313f5b3931795112 100644 (file)
@@ -21,6 +21,8 @@
 #define No_Standard_RangeError
 #define No_Standard_OutOfRange
 
+#include <math.h>
+
 #include <GeomAdaptor_Surface.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -80,7 +82,7 @@ GeomAbs_Shape LocalContinuity(Standard_Integer         Degree,
   Standard_DomainError_Raise_if( (TK.Length()!=Nb || TM.Length()!=Nb )," ");
   Standard_Integer Index1 = 0;
   Standard_Integer Index2 = 0;
-  Standard_Real newFirst, newLast;
+  Standard_Real newFirst = NAN, newLast = NAN;
   BSplCLib::LocateParameter(Degree,TK,TM,PFirst,IsPeriodic,1,Nb,Index1,newFirst);
   BSplCLib::LocateParameter(Degree,TK,TM,PLast, IsPeriodic,1,Nb,Index2,newLast );
   const Standard_Real EpsKnot = Precision::PConfusion();
@@ -92,7 +94,7 @@ GeomAbs_Shape LocalContinuity(Standard_Integer         Degree,
 
   if (Index2!=Index1)
   {
-    Standard_Integer i, Multmax = TM(Index1+1);
+    Standard_Integer i = 0, Multmax = TM(Index1+1);
        for (i = Index1+1; i<=Index2; i++) {
       if (TM(i)>Multmax) Multmax=TM(i);
     }
@@ -607,7 +609,7 @@ Standard_Boolean GeomAdaptor_Surface::IsUClosed() const
   if (!mySurface->IsUClosed())
     return Standard_False;
 
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   mySurface->Bounds(U1,U2,V1,V2);
   if (mySurface->IsUPeriodic())
     return (Abs(Abs(U1-U2)-Abs(myUFirst-myULast))<Precision::PConfusion());
@@ -626,7 +628,7 @@ Standard_Boolean GeomAdaptor_Surface::IsVClosed() const
   if (!mySurface->IsVClosed())
     return Standard_False;
 
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   mySurface->Bounds(U1,U2,V1,V2);
   if (mySurface->IsVPeriodic())
     return (Abs(Abs(V1-V2)-Abs(myVFirst-myVLast))<Precision::PConfusion());
@@ -767,7 +769,7 @@ void GeomAdaptor_Surface::D1(const Standard_Real U,
                                    gp_Vec&       D1U, 
                                    gp_Vec&       D1V ) const 
 {
-  Standard_Integer Ideb, Ifin, IVdeb, IVfin, USide=0, VSide=0;
+  Standard_Integer Ideb = 0, Ifin = 0, IVdeb = 0, IVfin = 0, USide=0, VSide=0;
   Standard_Real u = U, v = V;
   if (Abs(U-myUFirst) <= myTolU) {USide= 1; u = myUFirst;}
   else if (Abs(U-myULast) <= myTolU) {USide= -1; u = myULast;}
@@ -817,7 +819,7 @@ void GeomAdaptor_Surface::D2(const Standard_Real U,
                                    gp_Vec&       D2V, 
                                    gp_Vec&       D2UV) const 
 { 
-  Standard_Integer Ideb, Ifin, IVdeb, IVfin, USide=0, VSide=0;
+  Standard_Integer Ideb = 0, Ifin = 0, IVdeb = 0, IVfin = 0, USide=0, VSide=0;
   Standard_Real u = U, v = V;
   if (Abs(U-myUFirst) <= myTolU) {USide= 1; u = myUFirst;}
   else if (Abs(U-myULast) <= myTolU) {USide= -1; u = myULast;}
@@ -865,7 +867,7 @@ void GeomAdaptor_Surface::D3(const Standard_Real U, const Standard_Real V,
                              gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV,
                              gp_Vec& D3UVV) const
 {  
-  Standard_Integer Ideb,Ifin,IVdeb,IVfin,USide=0,VSide=0;
+  Standard_Integer Ideb = 0,Ifin = 0,IVdeb = 0,IVfin = 0,USide=0,VSide=0;
   Standard_Real u = U, v = V;
   if (Abs(U-myUFirst) <= myTolU) {USide= 1; u = myUFirst;}
   else if (Abs(U-myULast) <= myTolU) {USide= -1; u = myULast;}
@@ -909,7 +911,7 @@ gp_Vec GeomAdaptor_Surface::DN(const Standard_Real    U,
                                const Standard_Integer Nu,
                                const Standard_Integer Nv) const 
 {
-  Standard_Integer Ideb,Ifin,IVdeb,IVfin,USide=0,VSide=0;
+  Standard_Integer Ideb = 0,Ifin = 0,IVdeb = 0,IVfin = 0,USide=0,VSide=0;
   Standard_Real u = U, v = V;
   if (Abs(U-myUFirst) <= myTolU) {USide= 1; u = myUFirst;}
   else if (Abs(U-myULast) <= myTolU) {USide= -1; u = myULast;}
@@ -1012,13 +1014,13 @@ Standard_Real GeomAdaptor_Surface::UResolution(const Standard_Real R3d) const
     }
     case GeomAbs_BezierSurface:
     {
-      Standard_Real Ures,Vres;
+      Standard_Real Ures = NAN,Vres = NAN;
       Handle(Geom_BezierSurface)::DownCast (mySurface)->Resolution(R3d,Ures,Vres);
       return Ures;
     }
     case GeomAbs_BSplineSurface:
     {
-      Standard_Real Ures,Vres;
+      Standard_Real Ures = NAN,Vres = NAN;
       myBSplineSurface->Resolution(R3d,Ures,Vres);
       return Ures;
     }
@@ -1079,13 +1081,13 @@ Standard_Real GeomAdaptor_Surface::VResolution(const Standard_Real R3d) const
     }
     case GeomAbs_BezierSurface:
     {
-      Standard_Real Ures,Vres;
+      Standard_Real Ures = NAN,Vres = NAN;
       Handle(Geom_BezierSurface)::DownCast (mySurface)->Resolution(R3d,Ures,Vres);
       return Vres;
     }
     case GeomAbs_BSplineSurface:
     {
-      Standard_Real Ures,Vres;
+      Standard_Real Ures = NAN,Vres = NAN;
       myBSplineSurface->Resolution(R3d,Ures,Vres);
       return Vres;
     }
@@ -1408,14 +1410,14 @@ Standard_Boolean GeomAdaptor_Surface::IfUVBound(const Standard_Real U,
                                                 const Standard_Integer USide,
                                                 const Standard_Integer VSide) const
 {
-  Standard_Integer Ideb,Ifin;
+  Standard_Integer Ideb = 0,Ifin = 0;
   Standard_Integer anUFKIndx = myBSplineSurface->FirstUKnotIndex(),
     anULKIndx = myBSplineSurface->LastUKnotIndex(), 
     aVFKIndx = myBSplineSurface->FirstVKnotIndex(), aVLKIndx = myBSplineSurface->LastVKnotIndex();
   myBSplineSurface->LocateU(U, PosTol, Ideb, Ifin, Standard_False);
   Standard_Boolean Local = (Ideb == Ifin);
   Span(USide,Ideb,Ifin,Ideb,Ifin,anUFKIndx,anULKIndx);
-  Standard_Integer IVdeb,IVfin;
+  Standard_Integer IVdeb = 0,IVfin = 0;
   myBSplineSurface->LocateV(V, PosTol, IVdeb, IVfin, Standard_False); 
   if(IVdeb == IVfin) Local = Standard_True;
   Span(VSide,IVdeb,IVfin,IVdeb,IVfin,aVFKIndx,aVLKIndx);
index 62eb29784ef0b874cb08637d6200ca42a3c27cd5..4c27062dc7b5212cb6e0bd4431c47e9d18ee938b 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <Adaptor3d_Curve.hxx>
 #include <ElCLib.hxx>
+#include <math.h>
+
 #include <GeomAdaptor_SurfaceOfRevolution.hxx>
 #include <GeomEvaluator_SurfaceOfRevolution.hxx>
 #include <Standard_NoSuchObject.hxx>
@@ -159,7 +161,7 @@ void GeomAdaptor_SurfaceOfRevolution::Load(const gp_Ax1& V)
     Standard_Real First = myBasisCurve->FirstParameter();
     Standard_Real Last  = myBasisCurve->LastParameter();
     Standard_Integer Ratio = 1;
-    Standard_Real Dist; 
+    Standard_Real Dist = NAN
     gp_Pnt PP;
     do {
       PP = myBasisCurve->Value(First+(Last-First)/Ratio);
@@ -485,7 +487,7 @@ GeomAbs_SurfaceType GeomAdaptor_SurfaceOfRevolution::GetType() const
   }//case GeomAbs_Line: 
   //
   case GeomAbs_Circle:   {
-    Standard_Real MajorRadius, aR;
+    Standard_Real MajorRadius = NAN, aR = NAN;
     gp_Lin aLin(myAxis);
     //
     gp_Circ C = myBasisCurve->Circle();
index b607fd0b5d97bdedd4e18189a4cf53e0fe396422..d7659c5ce49d5b6fe00d00ea1f06728d34ba07c2 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomConvert.hxx>
 
 #include <Convert_CircleToBSplineCurve.hxx>
@@ -76,7 +78,7 @@ static Handle(Geom_BSplineCurve) BSplineCurveBuilder
   TColStd_Array1OfReal    Weights (1, NbPoles);
   TColStd_Array1OfReal    Knots   (1, NbKnots);
   TColStd_Array1OfInteger Mults   (1, NbKnots);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   gp_Pnt2d P2d;
   gp_Pnt   P3d;
   for (i = 1; i <= NbPoles; i++) {
@@ -482,11 +484,11 @@ public:
   GeomConvert_law_evaluator (const Handle(Geom2d_BSplineCurve)& theAncore)
   : myAncore (theAncore) {}
 
-  virtual void Evaluate (const Standard_Integer theDerivativeRequest,
+  void Evaluate (const Standard_Integer theDerivativeRequest,
                          const Standard_Real*   theStartEnd,
                          const Standard_Real    theParameter,
                          Standard_Real&         theResult,
-                         Standard_Integer&      theErrorCode) const
+                         Standard_Integer&      theErrorCode) const override
   {
     theErrorCode = 0;
     if (!myAncore.IsNull() &&
@@ -528,11 +530,11 @@ static Handle(Geom_BSplineCurve) MultNumandDenom(const Handle(Geom2d_BSplineCurv
   Handle(Geom_BSplineCurve)          res;
   Handle(TColStd_HArray1OfReal)      resKnots;
   Handle(TColStd_HArray1OfInteger)   resMults; 
-  Standard_Real                      start_value,end_value;
+  Standard_Real                      start_value = NAN,end_value = NAN;
   Standard_Real                      tolerance=Precision::PConfusion();
-  Standard_Integer                   resNbPoles,degree,
-                                     ii,jj,
-                                    aStatus;
+  Standard_Integer                   resNbPoles = 0,degree = 0,
+                                     ii = 0,jj = 0,
+                                    aStatus = 0;
   
   BS->Knots(BSKnots);            //storage of the two BSpline 
   BS->Multiplicities(BSMults);   //features
@@ -598,8 +600,8 @@ static Handle(Geom_BSplineCurve) MultNumandDenom(const Handle(Geom2d_BSplineCurv
 
 static void Pretreatment(TColGeom_Array1OfBSplineCurve& tab)
 
-{Standard_Integer i,j;
- Standard_Real a;
+{Standard_Integer i = 0,j = 0;
+ Standard_Real a = NAN;
 
  for (i=0;i<=(tab.Length()-1);i++){
    if (tab(i)->IsRational()) {
@@ -652,7 +654,7 @@ static Standard_Boolean NeedToBeTreated(const Handle(Geom_BSplineCurve)& BS)
 
 static Standard_Boolean Need2DegRepara(const TColGeom_Array1OfBSplineCurve& tab)
 
-{Standard_Integer        i;
+{Standard_Integer        i = 0;
  gp_Vec                  Vec1,Vec2;
  gp_Pnt                  Pint;
  Standard_Real           Rapport=1.0e0;
@@ -697,7 +699,7 @@ static void ReorderArrayOfG1Curves(TColGeom_Array1OfBSplineCurve&    ArrayOfCurv
                           const Standard_Integer            StartIndex,
                           const Standard_Real               ClosedTolerance)
 
-{Standard_Integer i;
+{Standard_Integer i = 0;
  TColGeom_Array1OfBSplineCurve  ArraybisOfCurves(0,ArrayOfCurves.Length()-1);  //temporary
  TColStd_Array1OfReal           ArraybisOfToler(0,ArrayOfToler.Length()-1);    //arrays
  TColStd_Array1OfBoolean        tabbisG1(0,tabG1.Length()-1);
@@ -749,11 +751,11 @@ public:
     memcpy (myPolynomialCoefficient, thePolynomialCoefficient, sizeof(myPolynomialCoefficient));
   }
 
-  virtual void Evaluate (const Standard_Integer theDerivativeRequest,
+  void Evaluate (const Standard_Integer theDerivativeRequest,
                          const Standard_Real*   /*theStartEnd*/,
                          const Standard_Real    theParameter,
                          Standard_Real&         theResult,
-                         Standard_Integer&      theErrorCode) const
+                         Standard_Integer&      theErrorCode) const override
   {
     theErrorCode = 0;
     PLib::EvalPolynomial (theParameter,
@@ -766,7 +768,7 @@ public:
 
 private:
 
-  Standard_Real myPolynomialCoefficient[3];
+  Standard_Real myPolynomialCoefficient[3]{};
 
 };
 
@@ -784,11 +786,11 @@ private:
 {Standard_Integer             nb_curve=ArrayOfCurves.Length(),
                               nb_vertexG1=0,
                               nb_group=0,
-                              index=0,i,ii,j,jj,
-                              indexmin,
+                              index=0,i = 0,ii = 0,j = 0,jj = 0,
+                              indexmin = 0,
                               nb_vertex_group0=0;
- Standard_Real                lambda,                      //G1 coefficient
-                              First;
+ Standard_Real                lambda = NAN,                      //G1 coefficient
+                              First = NAN;
  Standard_Real PreLast = 0.;
  GeomAbs_Shape                Cont;
  gp_Vec                       Vec1,Vec2;                   //concecutive tangential vectors 
@@ -842,7 +844,7 @@ private:
  }
 
  ArrayOfConcatenated = new TColGeom_HArray1OfBSplineCurve(0,nb_group-1);
- Standard_Boolean       fusion;
+ Standard_Boolean       fusion = 0;
 
  index=0;
  Pretreatment(ArrayOfCurves);
@@ -876,7 +878,7 @@ private:
        Curve1->D1(Curve1->LastParameter(),Pint,Vec2);
        ArrayOfCurves(0)->D1(ArrayOfCurves(0)->FirstParameter(),Pint,Vec1);
        Standard_Real lambda2=Vec1.Magnitude()/Vec2.Magnitude();
-       Standard_Real tmax,a,b,c,
+       Standard_Real tmax = NAN,a = NAN,b = NAN,c = NAN,
        umin=Curve1->FirstParameter(),umax=Curve1->LastParameter();
        tmax=2*lambda*(umax-umin)/(1+lambda*lambda2);
        a=(lambda*lambda2-1)/(2*lambda*tmax);
@@ -904,7 +906,7 @@ private:
        
        BSplCLib::KnotSequence(KnotC1,KnotC1Mults,FlatKnots);
        TColgp_Array1OfPnt  NewPoles(1,FlatKnots.Length()-(2*Curve1->Degree()+1));
-       Standard_Integer      aStatus;
+       Standard_Integer      aStatus = 0;
        TColStd_Array1OfReal Curve1Weights(1,Curve1->NbPoles());
        Curve1->Weights(Curve1Weights);
        for (ii=1;ii<=Curve1->NbPoles();ii++)
@@ -1009,13 +1011,13 @@ void  GeomConvert::ConcatC1(TColGeom_Array1OfBSplineCurve&           ArrayOfCurv
                            const Standard_Real                      AngularTolerance)
 
 {Standard_Integer             nb_curve=ArrayOfCurves.Length(),
-                              nb_vertexG1,
+                              nb_vertexG1 = 0,
                               nb_group=0,
-                              index=0,i,ii,j,jj,
-                              indexmin,
+                              index=0,i = 0,ii = 0,j = 0,jj = 0,
+                              indexmin = 0,
                               nb_vertex_group0=0;
- Standard_Real                lambda,                      //G1 coefficient
-                              First;
+ Standard_Real                lambda = NAN,                      //G1 coefficient
+                              First = NAN;
  Standard_Real PreLast = 0.;
 
  GeomAbs_Shape                Cont;
@@ -1077,7 +1079,7 @@ void  GeomConvert::ConcatC1(TColGeom_Array1OfBSplineCurve&           ArrayOfCurv
  ArrayOfConcatenated = 
    new TColGeom_HArray1OfBSplineCurve(0,nb_group-1);
 
- Standard_Boolean       fusion;
+ Standard_Boolean       fusion = 0;
  Standard_Integer       k=0;
  index=0;
  Pretreatment(ArrayOfCurves);
@@ -1119,7 +1121,7 @@ void  GeomConvert::ConcatC1(TColGeom_Array1OfBSplineCurve&           ArrayOfCurv
         Curve1->D1(Curve1->LastParameter(),Pint,Vec2);
         ArrayOfCurves(0)->D1(ArrayOfCurves(0)->FirstParameter(),Pint,Vec1);
         Standard_Real lambda2=Vec1.Magnitude()/Vec2.Magnitude();
-        Standard_Real tmax,a,b,c,
+        Standard_Real tmax = NAN,a = NAN,b = NAN,c = NAN,
         umin=Curve1->FirstParameter(),umax=Curve1->LastParameter();
         tmax=2*lambda*(umax-umin)/(1+lambda*lambda2);
         a=(lambda*lambda2-1)/(2*lambda*tmax);
@@ -1147,7 +1149,7 @@ void  GeomConvert::ConcatC1(TColGeom_Array1OfBSplineCurve&           ArrayOfCurv
         
         BSplCLib::KnotSequence(KnotC1,KnotC1Mults,FlatKnots);
         TColgp_Array1OfPnt  NewPoles(1,FlatKnots.Length()-(2*Curve1->Degree()+1));
-        Standard_Integer      aStatus;
+        Standard_Integer      aStatus = 0;
         TColStd_Array1OfReal Curve1Weights(1,Curve1->NbPoles());
         Curve1->Weights(Curve1Weights);
         for (ii=1;ii<=Curve1->NbPoles();ii++)
@@ -1248,7 +1250,7 @@ void GeomConvert::C0BSplineToC1BSplineCurve(Handle(Geom_BSplineCurve)& BS,
                                            const Standard_Real AngularTol)
 
 {
-  Standard_Boolean fusion;
+  Standard_Boolean fusion = 0;
   Handle(TColGeom_HArray1OfBSplineCurve) ArrayOfConcatenated; 
   //the array with the resulting curves
     
@@ -1257,7 +1259,7 @@ void GeomConvert::C0BSplineToC1BSplineCurve(Handle(Geom_BSplineCurve)& BS,
     
   GeomConvert_CompCurveToBSplineCurve C (ArrayOfConcatenated->Value(0));
   if (ArrayOfConcatenated->Length()>=2){
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i=1;i<ArrayOfConcatenated->Length();i++){
       fusion=C.Add(ArrayOfConcatenated->Value(i),tolerance);
       if (fusion==Standard_False)
@@ -1296,8 +1298,8 @@ void GeomConvert::C0BSplineToArrayOfC1BSplineCurve(
 
 {TColStd_Array1OfInteger          BSMults(1,BS->NbKnots());
  TColStd_Array1OfReal             BSKnots(1,BS->NbKnots());
- Standard_Integer                 i,j,nbcurveC1=1;
- Standard_Real                    U1,U2;
+ Standard_Integer                 i = 0,j = 0,nbcurveC1=1;
+ Standard_Real                    U1 = NAN,U2 = NAN;
  Standard_Boolean                 closed_flag= Standard_False ;
  gp_Pnt                           point;
  gp_Vec                           V1,V2;
index c3a6b3a85b438959f9c60106c8d6d8aec4aea63b..b09a42dc204f87da4b742739fbd1ebf7b4c289fa 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomConvert.hxx>
 
 #include <Convert_ConeToBSplineSurface.hxx>
@@ -82,7 +84,7 @@ static Handle(Geom_BSplineSurface) BSplineSurfaceBuilder (const Convert_Elementa
   Array1OfReal    VKnots  (1, NbVKnots);
   Array1OfInteger UMults  (1, NbUKnots);
   Array1OfInteger VMults  (1, NbVKnots);
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   for (j = 1; j <= NbVPoles; j++) {
     for (i = 1; i <= NbUPoles; i++) {
       Poles   (i, j) = Convert.Pole   (i, j);
@@ -320,7 +322,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
   (const Handle(Geom_Surface)& Sr) 
 {
  
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   Sr->Bounds (U1, U2, V1, V2);
   Standard_Real UFirst = Min (U1, U2);
   Standard_Real ULast  = Max (U1, U2);
@@ -518,8 +520,8 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
           new Geom_TrimmedCurve( Meridian, VFirst, VLast);
         C =  GeomConvert::CurveToBSplineCurve (CT);
       }
-      Standard_Integer NbUPoles, NbUKnots;
-      Standard_Integer NbVPoles, NbVKnots;
+      Standard_Integer NbUPoles = 0, NbUKnots = 0;
+      Standard_Integer NbVPoles = 0, NbVKnots = 0;
       Standard_Boolean periodic = Standard_False;
 
       // Poles of meridian = Vpoles
@@ -530,8 +532,8 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
       Weights.Init(1.);
       if ( C->IsRational()) C->Weights(Weights);
 
-      Standard_Integer nbUSpans;
-      Standard_Real AlfaU;
+      Standard_Integer nbUSpans = 0;
+      Standard_Real AlfaU = NAN;
       if (Strim->IsUPeriodic()) {
         NbUKnots = 4;
         nbUSpans = 3;
@@ -550,7 +552,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
       // Compute Knots and Mults
       TColStd_Array1OfReal    UKnots(1, NbUKnots);
       TColStd_Array1OfInteger UMults( 1, NbUKnots);
-      Standard_Integer i,j;
+      Standard_Integer i = 0,j = 0;
       for ( i = 1; i <= NbUKnots; i++) {
         UKnots(i) = UFirst + (i-1) * 2 * AlfaU;
         UMults(i) = 2;
@@ -683,7 +685,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
     else if (Surf->IsKind(STANDARD_TYPE(Geom_BSplineSurface))) {
       Handle(Geom_BSplineSurface) BS = 
         Handle(Geom_BSplineSurface)::DownCast(Surf->Copy());
-      Standard_Real umin, umax, vmin, vmax;
+      Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
       BS->Bounds(umin, umax, vmin, vmax);
       if (!BS->IsUPeriodic()) {
         if (U1 < umin)
@@ -707,7 +709,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
 
     else {
       Standard_Real Tol3d=1.e-4;
-      Standard_Integer MaxDegree =14, MaxSeg;
+      Standard_Integer MaxDegree =14, MaxSeg = 0;
       GeomAbs_Shape cont;
       GeomAdaptor_Surface AS(Sr);
       if (AS.NbUIntervals(GeomAbs_C2) > 1 || AS.NbVIntervals(GeomAbs_C2) > 1 ) 
@@ -752,8 +754,8 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
       Handle(Geom_BSplineCurve) C 
         = GeomConvert::CurveToBSplineCurve (Meridian);
 
-      Standard_Integer NbUPoles, NbUKnots;
-      Standard_Integer NbVPoles, NbVKnots;
+      Standard_Integer NbUPoles = 0, NbUKnots = 0;
+      Standard_Integer NbVPoles = 0, NbVKnots = 0;
       Standard_Boolean periodic = Standard_True;
 
       // Poles of meridian = Vpoles
@@ -764,7 +766,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
       Weights.Init(1.);
       if ( C->IsRational()) C->Weights(Weights);
 
-      Standard_Real AlfaU;
+      Standard_Real AlfaU = NAN;
       NbUKnots = 4;
       AlfaU    = M_PI / 3.;
       NbUPoles = 6;
@@ -772,7 +774,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
       // Compute Knots and Mults
       TColStd_Array1OfReal    UKnots(1, NbUKnots);
       TColStd_Array1OfInteger UMults( 1, NbUKnots);
-      Standard_Integer i,j;
+      Standard_Integer i = 0,j = 0;
       for ( i = 1; i <= NbUKnots; i++) {
         UKnots(i) = UFirst + (i-1) * 2 * AlfaU;
         UMults(i) = 2;
@@ -862,7 +864,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
 
     else { // In other cases => Approx
       Standard_Real Tol3d=1.e-4;
-      Standard_Integer MaxDegree = 14, MaxSeg;
+      Standard_Integer MaxDegree = 14, MaxSeg = 0;
       GeomAbs_Shape ucont = GeomAbs_C0, vcont = GeomAbs_C0;
       GeomAdaptor_Surface AS(Sr);
       //
index 3c4da08d270e937ed39f7fa11a67b72044b1585b..bac162c3f77cbc485a993a2726ffa3cef5ef44a4 100644 (file)
@@ -39,16 +39,16 @@ class GeomConvert_ApproxCurve_Eval : public AdvApprox_EvaluatorFunction
                                 Standard_Real First, Standard_Real Last)
     : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Handle(Adaptor3d_Curve) fonct;
-  Standard_Real StartEndSav[2];
+  Standard_Real StartEndSav[2]{};
 };
 
 void GeomConvert_ApproxCurve_Eval::Evaluate (Standard_Integer *Dimension,
index a18c4164ab59e3687691a14fc4a8e825428fac53..1315b838253c5be6bb6cdbc8194131722481c1d3 100644 (file)
@@ -89,10 +89,10 @@ private:
   Standard_EXPORT void Approximate (const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, const Standard_Integer theMaxDegree);
 
 
-  Standard_Boolean myIsDone;
-  Standard_Boolean myHasResult;
+  Standard_Boolean myIsDone{};
+  Standard_Boolean myHasResult{};
   Handle(Geom_BSplineCurve) myBSplCurve;
-  Standard_Real myMaxError;
+  Standard_Real myMaxError{};
 
 
 };
index 545c7dd1e34f853d3b3b48c9fd75c952861175ab..c61e6ac866677884bd5269f6a4b56b8d73d8b687 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomConvert_ApproxSurface.hxx>
 
 #include <Adaptor3d_Surface.hxx>
@@ -33,7 +35,7 @@ public:
   GeomConvert_ApproxSurface_Eval (const Handle(Adaptor3d_Surface)& theAdaptor)
   : myAdaptor (theAdaptor) {}
 
-  virtual void Evaluate (Standard_Integer* theDimension,
+  void Evaluate (Standard_Integer* theDimension,
                          Standard_Real*    theUStartEnd,
                          Standard_Real*    theVStartEnd,
                          Standard_Integer* theFavorIso,
@@ -43,7 +45,7 @@ public:
                          Standard_Integer* theUOrder,
                          Standard_Integer* theVOrder,
                          Standard_Real*    theResult,
-                         Standard_Integer* theErrorCode) const;
+                         Standard_Integer* theErrorCode) const override;
 
 private:
 
@@ -77,8 +79,8 @@ void GeomConvert_ApproxSurface_Eval::Evaluate (Standard_Integer * Dimension,
 { 
   *ErrorCode = 0;
 //  Standard_Integer idim;
-  Standard_Integer jpar;
-  Standard_Real Upar,Vpar;
+  Standard_Integer jpar = 0;
+  Standard_Real Upar = NAN,Vpar = NAN;
 
 // Dimension incorrecte
   if (*Dimension!=3) {
@@ -346,7 +348,7 @@ void GeomConvert_ApproxSurface::Approximate(const Handle(Adaptor3d_Surface)& the
 
 // " Init du type d'iso"
   GeomAbs_IsoType IsoType = GeomAbs_IsoV; 
-  Standard_Integer NbDec;
+  Standard_Integer NbDec = 0;
 
   NbDec = theSurf->NbUIntervals(GeomAbs_C2);
   TColStd_Array1OfReal UDec_C2(1, NbDec+1);
index 30f5c68e359ae260e8e91edda94c067ce0350a13..d6370ebca0bae10863c89364d64097c33965e268 100644 (file)
@@ -96,10 +96,10 @@ private:
   Standard_EXPORT void Approximate (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theTol3d, const GeomAbs_Shape theUContinuity, const GeomAbs_Shape theVContinuity, const Standard_Integer theMaxDegU, const Standard_Integer theMaxDegV, const Standard_Integer theMaxSegments, const Standard_Integer thePrecisCode);
 
 
-  Standard_Boolean myIsDone;
-  Standard_Boolean myHasResult;
+  Standard_Boolean myIsDone{};
+  Standard_Boolean myHasResult{};
   Handle(Geom_BSplineSurface) myBSplSurf;
-  Standard_Real myMaxError;
+  Standard_Real myMaxError{};
 
 
 };
index 93b1c1b4922faf219617dd6fdee2a654ccb7bcbf..5cc41d719d053aa7719c5cbd0b40502ae406153e 100644 (file)
@@ -57,7 +57,7 @@ GeomConvert_BSplineCurveToBezierCurve::GeomConvert_BSplineCurveToBezierCurve
   Standard_Real Uf = U1, Ul = U2; 
   Standard_Real PTol = ParametricTolerance/2 ;
 
-  Standard_Integer I1, I2;
+  Standard_Integer I1 = 0, I2 = 0;
   myCurve = Handle(Geom_BSplineCurve)::DownCast(BasisCurve->Copy());
 
   myCurve->LocateU(U1, PTol, I1, I2);
@@ -133,7 +133,7 @@ void GeomConvert_BSplineCurveToBezierCurve::Arcs
 void GeomConvert_BSplineCurveToBezierCurve::Knots
      (TColStd_Array1OfReal& TKnots) const
 {
- Standard_Integer ii, kk;
+ Standard_Integer ii = 0, kk = 0;
   for (ii = 1, kk = TKnots.Lower();
        ii <=myCurve->NbKnots(); ii++, kk++)
     TKnots(kk) = myCurve->Knot(ii);
index 49852e2144e84e517fb96421953eeea7cf82b7bf..17bd177cedf4cce62618e4379a9eb34f2cbdd398 100644 (file)
@@ -43,7 +43,7 @@ const Standard_Integer        VContinuityRange
   Standard_Integer LastVIndex  = BasisSurface->LastVKnotIndex  ();
   Standard_Integer UDegree     = BasisSurface->UDegree ();
   Standard_Integer VDegree     = BasisSurface->VDegree ();
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
 
 
@@ -167,7 +167,7 @@ Array1OfInteger& USplit,
 Array1OfInteger& VSplit
 
 ) const {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for ( i = 1; i <= usplitIndexes->Length(); i++){
     USplit (i) = usplitIndexes->Value (i);
   }
index 917cdb35b5c8317da5fb63b93bee7539d0f8b243..68160bed38a2bbae7add5141cf23c4a74cd437af 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_BezierSurface.hxx>
 #include <Geom_BSplineSurface.hxx>
 #include <GeomConvert_BSplineSurfaceToBezierSurface.hxx>
@@ -30,7 +32,7 @@
 GeomConvert_BSplineSurfaceToBezierSurface::GeomConvert_BSplineSurfaceToBezierSurface(const Handle(Geom_BSplineSurface)& BasisSurface)
 {
   mySurface = Handle(Geom_BSplineSurface)::DownCast(BasisSurface->Copy());
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   mySurface->Bounds(U1,U2,V1,V2);
   mySurface->Segment(U1,U2,V1,V2);
   mySurface->IncreaseUMultiplicity(mySurface->FirstUKnotIndex(),
@@ -60,7 +62,7 @@ GeomConvert_BSplineSurfaceToBezierSurface::GeomConvert_BSplineSurfaceToBezierSur
       throw Standard_DomainError("GeomConvert_BSplineSurfaceToBezierSurface");
 
   Standard_Real Uf=U1, Ul=U2, Vf=V1, Vl=V2, PTol = ParametricTolerance/2;
-  Standard_Integer I1, I2;
+  Standard_Integer I1 = 0, I2 = 0;
 
   mySurface = Handle(Geom_BSplineSurface)::DownCast(BasisSurface->Copy());
 
@@ -162,7 +164,7 @@ void GeomConvert_BSplineSurfaceToBezierSurface::Patches
 void GeomConvert_BSplineSurfaceToBezierSurface::UKnots
      (TColStd_Array1OfReal& TKnots) const
 {
- Standard_Integer ii, kk;
+ Standard_Integer ii = 0, kk = 0;
   for (ii = 1, kk = TKnots.Lower();
        ii <= mySurface->NbUKnots(); ii++, kk++)
     TKnots(kk) = mySurface->UKnot(ii);
@@ -176,7 +178,7 @@ void GeomConvert_BSplineSurfaceToBezierSurface::UKnots
 void GeomConvert_BSplineSurfaceToBezierSurface::VKnots
      (TColStd_Array1OfReal& TKnots) const
 {
- Standard_Integer ii, kk;
+ Standard_Integer ii = 0, kk = 0;
   for (ii = 1, kk = TKnots.Lower();
        ii <= mySurface->NbVKnots(); ii++, kk++)
     TKnots(kk) = mySurface->VKnot(ii);
index 532c9ed409765b0198c7537b4816b01de6e3517f..8de002e3867a1fb6f31955554e561ea3a1905189 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_BezierSurface.hxx>
 #include <Geom_BSplineSurface.hxx>
 #include <Geom_Curve.hxx>
 
 // ============================================================================
 GeomConvert_CompBezierSurfacesToBSplineSurface::
-GeomConvert_CompBezierSurfacesToBSplineSurface(const TColGeom_Array2OfBezierSurface& Beziers)
+GeomConvert_CompBezierSurfacesToBSplineSurface(const TColGeom_Array2OfBezierSurface& Beziers) : myDone(Standard_True), myUKnots(new (TColStd_HArray1OfReal) (1, Beziers.ColLength()+1))
 // ============================================================================
 {
-  Standard_Integer ii;
-  myDone = Standard_True;
+  Standard_Integer ii = 0;
+  
   // Choix des noeuds 
-  myUKnots = new (TColStd_HArray1OfReal) (1, Beziers.ColLength()+1);
+  
   for (ii=0; ii<myUKnots->Length(); ii++) { myUKnots->SetValue(ii+1, ii); }
 
   myVKnots = new (TColStd_HArray1OfReal) (1, Beziers.RowLength()+1);
@@ -53,22 +55,22 @@ GeomConvert_CompBezierSurfacesToBSplineSurface::
 GeomConvert_CompBezierSurfacesToBSplineSurface(
       const TColGeom_Array2OfBezierSurface& Beziers,
       const Standard_Real Tolerance,
-      const Standard_Boolean RemoveKnots)
+      const Standard_Boolean RemoveKnots) : myDone(Standard_True), myUKnots(new (TColStd_HArray1OfReal) (1, Beziers.ColLength()+1)), myVKnots(new (TColStd_HArray1OfReal) (1, Beziers.RowLength()+1))
 // ============================================================================
 {
-  Standard_Integer ii, jj, multU=0, multV, minus;
-  Standard_Boolean Ok;
+  Standard_Integer ii = 0, jj = 0, multU=0, multV = 0, minus = 0;
+  Standard_Boolean Ok = 0;
   gp_Vec vec;
-  Standard_Real V1, V2, V3, Ratio, L1, L2, Tol, val;
+  Standard_Real V1 = NAN, V2 = NAN, V3 = NAN, Ratio = NAN, L1 = NAN, L2 = NAN, Tol = NAN, val = NAN;
   gp_Pnt P1, P2, P3;
   Handle(Geom_Curve) FirstCurve, SecondCurve;
 
-  myDone = Standard_True;
+  
 
   // Choix des noeuds 
 
-  myUKnots = new (TColStd_HArray1OfReal) (1, Beziers.ColLength()+1);
-  myVKnots = new (TColStd_HArray1OfReal) (1, Beziers.RowLength()+1);
+  
+  
 
   // --> en U
   myUKnots->SetValue(1, 0);
@@ -220,19 +222,19 @@ GeomConvert_CompBezierSurfacesToBSplineSurface(
                                 const TColStd_Array1OfReal& VKnots, 
                                 const GeomAbs_Shape UContinuity, 
                                 const GeomAbs_Shape VContinuity,
-                                const Standard_Real Tolerance)
+                                const Standard_Real Tolerance) : myDone(Standard_True), myUKnots(new (TColStd_HArray1OfReal) (1, Beziers.ColLength()+1)), myVKnots(new (TColStd_HArray1OfReal) (1, Beziers.RowLength()+1))
 // ============================================================================
 {
   Standard_Integer decu=0, decv=0;
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
 
-  myDone = Standard_True;
+  
 
   // Recuperation des noeuds 
-  myUKnots = new (TColStd_HArray1OfReal) (1, Beziers.ColLength()+1);
+  
   myUKnots->ChangeArray1() =  UKnots;
 
-  myVKnots = new (TColStd_HArray1OfReal) (1, Beziers.RowLength()+1);
+  
   myVKnots->ChangeArray1() = VKnots;
 
   // Calcul des Poles
@@ -279,7 +281,7 @@ GeomConvert_CompBezierSurfacesToBSplineSurface(
   
   if ( (decu>0) || (decv>0) ) {
  
-    Standard_Integer ii;
+    Standard_Integer ii = 0;
     Standard_Integer multU = myUDegree - decu;
     Standard_ConstructionError_Raise_if( 
     ((multU <= 0) && (myUKnots->Length()>2)) , 
@@ -328,7 +330,7 @@ void GeomConvert_CompBezierSurfacesToBSplineSurface::Perform(
                                     const TColGeom_Array2OfBezierSurface& Beziers)
 // ================================================================================
 {
-  Standard_Integer IU, IV;
+  Standard_Integer IU = 0, IV = 0;
 
   // (1) Determination des degrees et si le resultat est rationnel.
   isrational = Standard_False;
@@ -355,8 +357,8 @@ void GeomConvert_CompBezierSurfacesToBSplineSurface::Perform(
   // (2) Boucle sur les carreaux  -----------------------------
 
   Handle(Geom_BezierSurface) Patch;
-  Standard_Integer  UIndex,  VIndex,  uindex,  vindex,  udeb,  vdeb;
-  Standard_Integer  upol, vpol, ii;
+  Standard_Integer  UIndex = 0,  VIndex = 0,  uindex = 0,  vindex = 0,  udeb = 0,  vdeb = 0;
+  Standard_Integer  upol = 0, vpol = 0, ii = 0;
 
 
   myPoles = new (TColgp_HArray2OfPnt) 
index 95af63b920233f3cc97676c3ca6ada550cb7214f..f3fb11bc9e47a9d24b90e0622f9389c8d3b39feb 100644 (file)
@@ -286,14 +286,14 @@ private:
   Standard_EXPORT void Perform (const TColGeom_Array2OfBezierSurface& Beziers);
 
 
-  Standard_Integer myUDegree;
-  Standard_Integer myVDegree;
+  Standard_Integer myUDegree{};
+  Standard_Integer myVDegree{};
   Handle(TColStd_HArray1OfInteger) myVMults;
   Handle(TColStd_HArray1OfInteger) myUMults;
   Handle(TColStd_HArray1OfReal) myUKnots;
   Handle(TColStd_HArray1OfReal) myVKnots;
   Handle(TColgp_HArray2OfPnt) myPoles;
-  Standard_Boolean isrational;
+  Standard_Boolean isrational{};
   Standard_Boolean myDone;
 
 
index 93dc6284266b635e1b8d27c88a00e5359e026a1a..b1e9f865722864106e3c44dca3b006cb73795868 100644 (file)
@@ -17,6 +17,8 @@
 // Modified:   Fri Jul 10 11:23:35 1998
 //              JCT : Add WithRatio,MinM
 
+#include <math.h>
+
 #include <Geom_BoundedCurve.hxx>
 #include <Geom_BSplineCurve.hxx>
 #include <GeomConvert.hxx>
@@ -87,7 +89,7 @@ Add(const Handle(Geom_BoundedCurve)& NewCurve,
     return Standard_True;
   }
 
-  Standard_Boolean avant, apres;
+  Standard_Boolean avant = 0, apres = 0;
   myTol = Tolerance;
 
   Standard_Integer LBs = Bs->NbPoles(), LCb = myCurve->NbPoles();
@@ -132,9 +134,9 @@ void GeomConvert_CompCurveToBSplineCurve::Add(
   if (SecondCurve->Degree() < Deg)  { SecondCurve->IncreaseDegree(Deg); }
 
 // Declarationd
-  Standard_Real L1, L2;
-  Standard_Integer ii, jj;
-  Standard_Real  Ratio=1, Ratio1, Ratio2, Delta1, Delta2;
+  Standard_Real L1 = NAN, L2 = NAN;
+  Standard_Integer ii = 0, jj = 0;
+  Standard_Real  Ratio=1, Ratio1 = NAN, Ratio2 = NAN, Delta1 = NAN, Delta2 = NAN;
   Standard_Integer NbP1 = FirstCurve->NbPoles(), NbP2 = SecondCurve->NbPoles();
   Standard_Integer NbK1 = FirstCurve->NbKnots(), NbK2 = SecondCurve->NbKnots();
   TColStd_Array1OfReal Noeuds (1, NbK1+NbK2-1);
@@ -169,7 +171,7 @@ void GeomConvert_CompCurveToBSplineCurve::Add(
   }    
 
 // Les Noeuds
-  Standard_Real eps;
+  Standard_Real eps = NAN;
   for (ii=1; ii<=NbK1; ii++) {
     Noeuds(ii) = Ratio1*FirstCurve->Knot(ii) - Delta1;
     if(ii > 1) {
index 3038e88dfa7f1c38f0f0ce0ae3cce640fc2a5f3c..60efe69c3ac7f2fe260d6c34425611b87494468c 100644 (file)
@@ -15,6 +15,8 @@
 // for any damages, special or consequential, connected with its use. 
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <gce_MakeCirc.hxx>
 #include <Geom_BezierCurve.hxx>
@@ -50,11 +52,11 @@ GeomConvert_CurveToAnaCurve::GeomConvert_CurveToAnaCurve():
 }
 
 GeomConvert_CurveToAnaCurve::GeomConvert_CurveToAnaCurve(const Handle(Geom_Curve)& C) :
-  myGap(Precision::Infinite()),
+  myCurve(C), myGap(Precision::Infinite()),
   myConvType(GeomConvert_MinGap),
   myTarget(GeomAbs_Line)
 {
-  myCurve = C;
+  
 }
 
 void GeomConvert_CurveToAnaCurve::Init(const Handle(Geom_Curve)& C) 
@@ -106,7 +108,7 @@ Standard_Boolean GeomConvert_CurveToAnaCurve::IsLinear(const TColgp_Array1OfPnt&
   Standard_Real dMax = 0;
   Standard_Integer iMax1=0,iMax2=0;
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = 1; i < nbPoles; i++)
     for(Standard_Integer j = i+1; j <= nbPoles; j++) {
       Standard_Real dist = aPoles(i).SquareDistance(aPoles(j));
@@ -177,7 +179,7 @@ Handle(Geom_Line) GeomConvert_CurveToAnaCurve::ComputeLine (const Handle(Geom_Cu
   cf = c1;  cl = c2;
   
   Handle(TColgp_HArray1OfPnt) Poles;
-  Standard_Integer nbPoles;
+  Standard_Integer nbPoles = 0;
   Handle(Geom_BSplineCurve) bsc = Handle(Geom_BSplineCurve)::DownCast(curve);
   if (!bsc.IsNull()) {
     nbPoles = bsc->NbPoles();
@@ -199,7 +201,7 @@ Handle(Geom_Line) GeomConvert_CurveToAnaCurve::ComputeLine (const Handle(Geom_Cu
       Standard_Real dt = (c2 - c1) / (nbPoles - 1);
       Poles->SetValue(1, P1);
       Poles->SetValue(nbPoles, P2);
-      Standard_Integer i;
+      Standard_Integer i = 0;
       for (i = 2; i < nbPoles; ++i)
       {
         Poles->SetValue(i, curve->Value(c1 + (i - 1) * dt));
@@ -274,7 +276,7 @@ Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeCircle (const Handle(Geom
   
   //  Reste a controler que c est bien un cercle : prendre 20 points
   Standard_Real du = (c2-c1)/20;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real aMax = 0.;
   for (i = 0; i <= 20; i ++) {
     Standard_Real u = c1+(du*i);
@@ -335,7 +337,7 @@ static Standard_Boolean IsArrayPntPlanar(const Handle(TColgp_HArray1OfPnt)& HAP,
     return Standard_False;
   gp_Vec NV = V1.Crossed(V2);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= 3; ++i)
   {
     if (Precision::IsInfinite(NV.Coord(i)))
@@ -374,7 +376,7 @@ static Standard_Boolean ConicDefinition
          gp_Pnt& Center, gp_Dir& MainAxis, Standard_Real& Rmin, Standard_Real& Rmax )
 {
   Standard_Real Xcen = 0.,Ycen = 0., Xax = 0.,Yax = 0.;
-  Standard_Real b,d,e;
+  Standard_Real b = NAN,d = NAN,e = NAN;
   //  conic : a*x2 + 2*b*x*y + c*y2 + 2*d*x + 2*e*y + f = 0.
   //Equation (a,b,c,d,e,f);
   b = b1/2.;  d = d1/2.;  e = e1/2.;    // chgt de variable
@@ -399,8 +401,8 @@ static Standard_Boolean ConicDefinition
 
     Standard_Real term1 = a-c;
     Standard_Real term2 = 2*b;
-    Standard_Real cos2t;
-    Standard_Real auxil;
+    Standard_Real cos2t = NAN;
+    Standard_Real auxil = NAN;
 
     if (Abs(term2) <= eps && Abs(term1) <= eps) {
       cos2t = 1.;
@@ -483,8 +485,8 @@ Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeEllipse(const Handle(Geom
   Handle(Geom_Curve) res;
   Standard_Real prec = Precision::PConfusion();
   
-  Standard_Real AF,BF,CF,DF,EF,Q1,Q2,Q3,c2n;
-  Standard_Integer i;
+  Standard_Real AF = NAN,BF = NAN,CF = NAN,DF = NAN,EF = NAN,Q1 = NAN,Q2 = NAN,Q3 = NAN,c2n = NAN;
+  Standard_Integer i = 0;
   
   gp_Pnt PStart = c3d->Value(c1);
   gp_Pnt PEnd = c3d->Value(c2);
@@ -531,7 +533,7 @@ Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeEllipse(const Handle(Geom
   math_Matrix Dt(1, 5, 1, 5);
   math_Vector F(1, 5), Sl(1, 5);
 
-  Standard_Real XN,YN,ZN = 0.;
+  Standard_Real XN = NAN,YN = NAN,ZN = 0.;
   gp_Pnt PT,PP;
   for(i=1; i<=5; i++) {
     PT = AP->Value(i).Transformed(Tr);
@@ -560,7 +562,7 @@ Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeEllipse(const Handle(Geom
   Q2=AF*CF-BF*BF/4;
   Q3=AF+CF;
 
-  Standard_Real Rmax, Rmin;
+  Standard_Real Rmax = NAN, Rmin = NAN;
   gp_Pnt Center;
   gp_Dir MainAxis;
   Standard_Boolean IsParab = Standard_False, IsEllip = Standard_False;
@@ -651,7 +653,7 @@ Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeCurve(const Handle(Geom_C
 {
   cf = c1;  cl = c2;
   Handle(Geom_Curve) c3d, newc3d[3];
-  Standard_Integer i, imin = -1;
+  Standard_Integer i = 0, imin = -1;
   c3d = theC3d;
   if (c3d.IsNull()) return newc3d[imin];
   gp_Pnt P1 = c3d->Value(c1);
index 6fc85d538b23e2c68ee16224585493e4018eb6dd..fd190c067d6a0b6b447660cbc3c57a4adb53161b 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GeomConvert_FuncConeLSDist.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Vec.hxx>
@@ -51,10 +53,10 @@ Standard_Boolean GeomConvert_FuncConeLSDist::Value(const math_Vector& X, Standar
   gp_Ax3 aPos(aLoc, myDir);
 
   F = 0.;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i)
   {
-    Standard_Real u, v;
+    Standard_Real u = NAN, v = NAN;
     gp_Pnt aPi(myPoints->Value(i));
     ElSLib::ConeParameters(aPos, anR, aSemiAngle, aPi, u, v);
     gp_Pnt aPp;
index af9e83a9a3868308de5b76228902b40134a2a6ee..bcfbabeef858dc8e9104cf3554da1cc08532c9f5 100644 (file)
@@ -48,7 +48,7 @@ Standard_Boolean GeomConvert_FuncCylinderLSDist::Value(const math_Vector& X,Stan
   Standard_Real anR2 = X(4)*X(4);
 
   F = 0.;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i)
   {
     gp_Vec aV(myPoints->Value(i) - aLoc);
@@ -72,7 +72,7 @@ Standard_Boolean GeomConvert_FuncCylinderLSDist::Gradient(const math_Vector& X,m
   Standard_Real x = myDir.X(), y = myDir.Y(), z = myDir.Z();
   G.Init(0.);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i)
   {
     gp_Vec aV(myPoints->Value(i) - aLoc);
@@ -110,7 +110,7 @@ Standard_Boolean GeomConvert_FuncCylinderLSDist::Values(const math_Vector& X,Sta
 
   F = 0.;
   G.Init(0.);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i)
   {
     gp_Vec aV(myPoints->Value(i) - aLoc);
index c2a5fe95949e2dc66606ac286c410f083d2dd41e..9634bd73f48c5baf2a9a18c1c9658cedb93bf112 100644 (file)
@@ -48,7 +48,7 @@ Standard_Boolean GeomConvert_FuncSphereLSDist::Value(const math_Vector& X,Standa
   Standard_Real anR2 = X(4)*X(4);
 
   F = 0.;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i)
   {
     Standard_Real d = (myPoints->Value(i) - aLoc).SquareModulus() - anR2;
@@ -69,7 +69,7 @@ Standard_Boolean GeomConvert_FuncSphereLSDist::Gradient(const math_Vector& X,mat
   Standard_Real anR = X(4), anR2 = anR * anR;
 
   G.Init(0.);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i)
   {
     gp_XYZ dLoc = myPoints->Value(i) - aLoc;
@@ -96,7 +96,7 @@ Standard_Boolean GeomConvert_FuncSphereLSDist::Values(const math_Vector& X,Stand
 
   G.Init(0.);
   F = 0.;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i)
   {
     gp_XYZ dLoc = myPoints->Value(i) - aLoc;
index 4a6a8c125a711de8207885e8907c530612c5a539..f3d4ac1356df72bebea4124b876276bf3326a3ac 100644 (file)
@@ -17,6 +17,8 @@
 //abv 06.01.99 fix of misprint
 //:p6 abv 26.02.99: make ConvertToPeriodic() return Null if nothing done
 
+#include <math.h>
+
 #include <BRepTopAdaptor_TopolTool.hxx>
 #include <ElSLib.hxx>
 #include <Geom_RectangularTrimmedSurface.hxx>
@@ -77,7 +79,7 @@ void GeomConvert_SurfToAnaSurf::CheckVTrimForRevSurf(const Handle(Geom_SurfaceOf
   if (aNbExt == 0)
     return;
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer imin = 0;
   for (i = 1; i <= aNbExt; ++i)
   {
@@ -117,7 +119,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinerCone(const Handle(Geom
   const Standard_Real theToler)
 {
   Handle(Geom_Surface) aNewSurf;
-  Standard_Real param1, param2, cf1, cf2, cl1, cl2, aGap1, aGap2;
+  Standard_Real param1 = NAN, param2 = NAN, cf1 = NAN, cf2 = NAN, cl1 = NAN, cl2 = NAN, aGap1 = NAN, aGap2 = NAN;
   Handle(Geom_Curve) firstiso, lastiso;
   Handle(Geom_Circle) firstisocirc, lastisocirc, midisocirc;
   gp_Dir isoline;
@@ -140,7 +142,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinerCone(const Handle(Geom
   lastisocirc = Handle(Geom_Circle)::DownCast(GeomConvert_CurveToAnaCurve::ComputeCurve(lastiso, theToler, 
     param1, param2, cf2, cl2, aGap2, GeomConvert_Target, GeomAbs_Circle));
   if (!firstisocirc.IsNull() || !lastisocirc.IsNull()) {
-    Standard_Real R1, R2, R3;
+    Standard_Real R1 = NAN, R2 = NAN, R3 = NAN;
     gp_Pnt P1, P2, P3;
     if (!firstisocirc.IsNull()) {
       R1 = firstisocirc->Circ().Radius();
@@ -170,7 +172,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinerCone(const Handle(Geom
     //cone
     else if ((((Abs(R1)) > (Abs(R2))) && ((Abs(R2)) > (Abs(R3)))) ||
       (((Abs(R3)) > (Abs(R2))) && ((Abs(R2)) > (Abs(R1))))) {
-      Standard_Real radius;
+      Standard_Real radius = NAN;
       gp_Ax3 Axes;
       Standard_Real semiangle =
         gp_Vec(isoline).Angle(gp_Vec(P3, P1));
@@ -198,7 +200,7 @@ static void GetLSGap(const Handle(TColgp_HArray1OfXYZ)& thePoints, const gp_Ax3&
   const Standard_Real theR, Standard_Real& theGap)
 {
   theGap = 0.;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   gp_XYZ aLoc = thePos.Location().XYZ();
   gp_Dir aDir = thePos.Direction();
   for (i = thePoints->Lower(); i <= thePoints->Upper(); ++i)
@@ -221,7 +223,7 @@ Standard_Boolean GeomConvert_SurfToAnaSurf::GetCylByLS(const Handle(TColgp_HArra
     return Standard_True;
   }
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   Standard_Integer aNbVar = 4;
 
@@ -250,7 +252,7 @@ Standard_Boolean GeomConvert_SurfToAnaSurf::GetCylByLS(const Handle(TColgp_HArra
 
   //
   Standard_Real aTol = Precision::Confusion();
-  math_MultipleVarFunction* aPFunc;
+  math_MultipleVarFunction* aPFunc = nullptr;
   GeomConvert_FuncCylinderLSDist aFuncCyl(thePoints, thePos.Direction());
   aPFunc = (math_MultipleVarFunction*)&aFuncCyl;
   //
@@ -261,7 +263,7 @@ Standard_Boolean GeomConvert_SurfToAnaSurf::GetCylByLS(const Handle(TColgp_HArra
     aSteps(i) = (aLBnd(i) - aFBnd(i)) / aNbInt;
   }
   math_PSO aGlobSolver(aPFunc, aFBnd, aLBnd, aSteps);
-  Standard_Real aLSDist;
+  Standard_Real aLSDist = NAN;
   aGlobSolver.Perform(aSteps, aLSDist, aStartPoint);
   //
   gp_Pnt aLoc(aStartPoint(1), aStartPoint(2), aStartPoint(3));
@@ -345,8 +347,8 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinderByGaussField(const Ha
   Standard_Real anAvMaxCurv = 0., anAvMinCurv = 0., anAvR = 0, aSign = 1.;
   gp_XYZ anAvDir;
   gp_Dir aMinD, aMaxD;
-  Standard_Integer i, j, n = 0;
-  Standard_Real anU, aV;
+  Standard_Integer i = 0, j = 0, n = 0;
+  Standard_Real anU = NAN, aV = NAN;
   for (i = 1, anU = theU1 + du / 2.; i <= theNbU; ++i, anU += du)
   {
     for (j = 1, aV = theV1 + dv / 2.; j <= theNbV; ++j, aV += dv)
@@ -480,10 +482,10 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryTorusSphere(const Handle(Geom
   const Standard_Boolean isTryUMajor)
 {
   Handle(Geom_Surface) newSurface;
-  Standard_Real cf, cl;
+  Standard_Real cf = NAN, cl = NAN;
   Handle(Geom_Curve) IsoCrv1;
   Handle(Geom_Curve) IsoCrv2;
-  Standard_Real aGap1, aGap2;
+  Standard_Real aGap1 = NAN, aGap2 = NAN;
   // initial radius
   Standard_Real R = circle->Circ().Radius();
   // iso lines
@@ -558,7 +560,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryTorusSphere(const Handle(Geom
 
 Standard_Real GeomConvert_SurfToAnaSurf::ComputeGap(const Handle(Geom_Surface)& theSurf,
   const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2,
-  const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol)
+  const Handle(Geom_Surface)& theNewSurf, const Standard_Real theTol)
 {
   GeomAdaptor_Surface aGAS(theNewSurf);
   GeomAbs_SurfaceType aSType = aGAS.GetType();
@@ -592,12 +594,12 @@ Standard_Real GeomConvert_SurfToAnaSurf::ComputeGap(const Handle(Geom_Surface)&
   Standard_Real aGap = 0.;
   Standard_Boolean onSurface = Standard_True;
 
-  Standard_Real S, T;
+  Standard_Real S = NAN, T = NAN;
   gp_Pnt P3d, P3d2;
 
   const Standard_Integer NP = 21;
-  Standard_Real DU, DV;
-  Standard_Integer j, i;
+  Standard_Real DU = NAN, DV = NAN;
+  Standard_Integer j = 0, i = 0;
   DU = (theU2 - theU1) / (NP - 1);
   DV = (theV2 - theV1) / (NP - 1);
   Standard_Real DU2 = DU / 2., DV2 = DV / 2.;
@@ -697,7 +699,7 @@ void GeomConvert_SurfToAnaSurf::Init (const Handle(Geom_Surface)& S)
 
 Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical (const Standard_Real InitialToler) 
 {
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   mySurf->Bounds(U1, U2, V1, V2);
   if(Precision::IsInfinite(U1) && Precision::IsInfinite(U2) ) {
     U1 = -1.;
@@ -764,7 +766,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical(const Standa
     GeomAbs_Cone, GeomAbs_Sphere, GeomAbs_Torus };
 
   //Check boundaries
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   mySurf->Bounds(U1, U2, V1, V2);
   Standard_Boolean aDoSegment = Standard_False;
   Standard_Real aTolBnd = Precision::PConfusion();
@@ -863,7 +865,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical(const Standa
   Handle(Geom_Curve) UIso = aTempS->UIso(UMid);
   Handle(Geom_Curve) VIso = aTempS->VIso(VMid);
 
-  Standard_Real cuf, cul, cvf, cvl, aGap1, aGap2;
+  Standard_Real cuf = NAN, cul = NAN, cvf = NAN, cvl = NAN, aGap1 = NAN, aGap2 = NAN;
   Standard_Boolean aLineIso = Standard_False;
   Handle(Geom_Curve) umidiso = GeomConvert_CurveToAnaCurve::ComputeCurve(UIso, toler, V1, V2, cuf, cul, aGap1,
     GeomConvert_Simplest);
index ee333f54aa8e8f7109df34fb42c89d6b2cb0c394..1ebfa63fd76eec87b63a508de65030169f1a0574 100644 (file)
@@ -115,7 +115,7 @@ private:
 
   static Standard_Real ComputeGap(const Handle(Geom_Surface)& theSurf,
     const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2,
-    const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol = RealLast());
+    const Handle(Geom_Surface)& theNewSurf, const Standard_Real theTol = RealLast());
 
 
 
index 641221b9c590b2131d013260e8c28083c8b07150..f1a13a8abc6721aa09c1cd0d6962d30f904a66ab 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomEvaluator_OffsetCurve.hxx>
 
 #include <GeomAdaptor_Curve.hxx>
@@ -408,8 +410,8 @@ Standard_Boolean GeomEvaluator_OffsetCurve::AdjustDerivative(
   static const Standard_Integer aMaxDerivOrder = 3;
 
   Standard_Boolean isDirectionChange = Standard_False;
-  Standard_Real anUinfium;
-  Standard_Real anUsupremum;
+  Standard_Real anUinfium = NAN;
+  Standard_Real anUsupremum = NAN;
   if (!myBaseAdaptor.IsNull())
   {
     anUinfium = myBaseAdaptor->FirstParameter();
@@ -422,7 +424,7 @@ Standard_Boolean GeomEvaluator_OffsetCurve::AdjustDerivative(
   }
 
   static const Standard_Real DivisionFactor = 1.e-3;
-  Standard_Real du;
+  Standard_Real du = NAN;
   if ((anUsupremum >= RealLast()) || (anUinfium <= RealFirst()))
     du = 0.0;
   else
@@ -439,7 +441,7 @@ Standard_Boolean GeomEvaluator_OffsetCurve::AdjustDerivative(
     V = BaseDN(theU, ++anIndex);
   } while ((V.SquareMagnitude() <= aTol) && anIndex < aMaxDerivOrder);
 
-  Standard_Real u;
+  Standard_Real u = NAN;
 
   if (theU - anUinfium < aDelta)
     u = theU + aDelta;
index 6fac3fe0b1d3e055cf5e73617961d1ca5ef75efe..bb52e6432df293d49fa9cc1f4cdc05c48fc2f81e 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomEvaluator_OffsetSurface.hxx>
 
 #include <CSLib.hxx>
@@ -47,8 +49,8 @@ static Standard_Boolean shiftPoint (const Standard_Real theUStart, const Standar
                                     const gp_Vec& theD1U, const gp_Vec& theD1V)
 {
   // Get parametric bounds and closure status
-  Standard_Real aUMin, aUMax, aVMin, aVMax;
-  Standard_Boolean isUPeriodic, isVPeriodic;
+  Standard_Real aUMin = NAN, aUMax = NAN, aVMin = NAN, aVMax = NAN;
+  Standard_Boolean isUPeriodic = 0, isVPeriodic = 0;
   if (! theSurf.IsNull())
   {
     theSurf->Bounds (aUMin, aUMax, aVMin, aVMax);
@@ -110,7 +112,7 @@ static void derivatives(Standard_Integer theMaxOrder,
                         TColgp_Array2OfVec& theDerNUV,
                         TColgp_Array2OfVec& theDerSurf)
 {
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   gp_Pnt P;
   gp_Vec DL1U, DL1V, DL2U, DL2V, DL2UV, DL3U, DL3UUV, DL3UVV, DL3V;
 
@@ -508,7 +510,7 @@ void GeomEvaluator_OffsetSurface::CalculateD0(
 
     TColgp_Array2OfVec DerNUV(0, MaxOrder, 0, MaxOrder);
     TColgp_Array2OfVec DerSurf(0, MaxOrder + 1, 0, MaxOrder + 1);
-    Standard_Integer OrderU, OrderV;
+    Standard_Integer OrderU = 0, OrderV = 0;
     Standard_Real Umin = 0, Umax = 0, Vmin = 0, Vmax = 0;
     Bounds(Umin, Umax, Vmin, Vmax);
 
@@ -614,7 +616,7 @@ void GeomEvaluator_OffsetSurface::CalculateD1(
     return;
   }
   
-  Standard_Integer OrderU, OrderV;
+  Standard_Integer OrderU = 0, OrderV = 0;
   TColgp_Array2OfVec DerNUV(0, MaxOrder + 1, 0, MaxOrder + 1);
   TColgp_Array2OfVec DerSurf(0, MaxOrder + 2, 0, MaxOrder + 2);
   Standard_Real Umin = 0, Umax = 0, Vmin = 0, Vmax = 0;
@@ -672,7 +674,7 @@ void GeomEvaluator_OffsetSurface::CalculateD2(
   CSLib::Normal(theD1U, theD1V, the_D1MagTol, NStatus, Normal);
 
   const Standard_Integer MaxOrder = (NStatus == CSLib_Defined) ? 0 : 3;
-  Standard_Integer OrderU, OrderV;
+  Standard_Integer OrderU = 0, OrderV = 0;
   TColgp_Array2OfVec DerNUV(0, MaxOrder + 2, 0, MaxOrder + 2);
   TColgp_Array2OfVec DerSurf(0, MaxOrder + 3, 0, MaxOrder + 3);
 
@@ -745,7 +747,7 @@ void GeomEvaluator_OffsetSurface::CalculateD3(
   CSLib_NormalStatus NStatus;
   CSLib::Normal(theD1U, theD1V, the_D1MagTol, NStatus, Normal);
   const Standard_Integer MaxOrder = (NStatus == CSLib_Defined) ? 0 : 3;
-  Standard_Integer OrderU, OrderV;
+  Standard_Integer OrderU = 0, OrderV = 0;
   TColgp_Array2OfVec DerNUV(0, MaxOrder + 3, 0, MaxOrder + 3);
   TColgp_Array2OfVec DerSurf(0, MaxOrder + 4, 0, MaxOrder + 4);
   Standard_Real Umin = 0, Umax = 0, Vmin = 0, Vmax = 0;
@@ -829,7 +831,7 @@ gp_Vec GeomEvaluator_OffsetSurface::CalculateDN(
   CSLib_NormalStatus NStatus;
   CSLib::Normal(theD1U, theD1V, the_D1MagTol, NStatus, Normal);
   const Standard_Integer MaxOrder = (NStatus == CSLib_Defined) ? 0 : 3;
-  Standard_Integer OrderU, OrderV;
+  Standard_Integer OrderU = 0, OrderV = 0;
   TColgp_Array2OfVec DerNUV(0, MaxOrder + theNu, 0, MaxOrder + theNv);
   TColgp_Array2OfVec DerSurf(0, MaxOrder + theNu + 1, 0, MaxOrder + theNv + 1);
 
@@ -905,7 +907,7 @@ Standard_Boolean GeomEvaluator_OffsetSurface::ReplaceDerivative(
     Bounds(aUMin, aUMax, aVMin, aVMax);
 
     // Calculate step along non-zero derivative
-    Standard_Real aStep;
+    Standard_Real aStep = NAN;
     Handle(Adaptor3d_Surface) aSurfAdapt;
     if (!myBaseAdaptor.IsNull())
       aSurfAdapt = myBaseAdaptor;
index a972879a8666e10fa2edc7ffeffb98b5b5392540..cd41839d02b762b669ce9f71ed45e2b241fa39e1 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill.hxx>
 
 #include <Geom_Circle.hxx>
@@ -278,7 +280,7 @@ void GeomFill::Knots(const Convert_ParameterisationType  TConv,
 {
   if ((TConv!=Convert_QuasiAngular) && 
       (TConv!=Convert_Polynomial) ) {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real val = 0.;
     for (i=TKnots.Lower(); i<=TKnots.Upper(); i++) {
       TKnots(i) = val;
@@ -317,7 +319,7 @@ void GeomFill::Mults(const Convert_ParameterisationType  TConv,
   default : 
     {
       // Cas rational classsique
-      Standard_Integer i;
+      Standard_Integer i = 0;
       TMults(TMults.Lower())=3;
       for (i=TMults.Lower()+1; i<=TMults.Upper()-1; i++) {
        TMults(i) = 2;
@@ -348,7 +350,7 @@ Standard_Real GeomFill::GetTolerance(const Convert_ParameterisationType TConv,
   // afin d'eviter des tolerances d'approximation tendant vers 0 !
   Handle(Geom_BSplineCurve) CtoBspl = 
        GeomConvert::CurveToBSplineCurve(Sect, TConv);
-  Standard_Real Dist;
+  Standard_Real Dist = NAN;
   Dist = CtoBspl->Pole(1).Distance(CtoBspl->Pole(2)) + SpatialTol;
   return Dist*AngularTol/2;
 }
@@ -374,8 +376,8 @@ void GeomFill::GetCircle( const Convert_ParameterisationType  TConv,
 {
   // La classe de convertion
 
-  Standard_Integer i, jj;
-  Standard_Real Cosa,Sina,Angle,Alpha,Cosas2,lambda;
+  Standard_Integer i = 0, jj = 0;
+  Standard_Real Cosa = NAN,Sina = NAN,Angle = NAN,Alpha = NAN,Cosas2 = NAN,lambda = NAN;
   gp_Vec temp, np2;
   Standard_Integer low = Poles.Lower();
   Standard_Integer upp = Poles.Upper();
@@ -459,9 +461,9 @@ Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType  TConv,
                                      TColStd_Array1OfReal& Weights, 
                                      TColStd_Array1OfReal& DWeights)
 {
-  Standard_Real Cosa,Sina,Cosas2,Sinas2,Angle,DAngle,Alpha,lambda,Dlambda;
+  Standard_Real Cosa = NAN,Sina = NAN,Cosas2 = NAN,Sinas2 = NAN,Angle = NAN,DAngle = NAN,Alpha = NAN,lambda = NAN,Dlambda = NAN;
   gp_Vec temp, np2, dnp2;
-  Standard_Integer i, jj;
+  Standard_Integer i = 0, jj = 0;
   Standard_Integer NbSpan=(Poles.Length()-1)/2;
   Standard_Integer low = Poles.Lower();
   Standard_Integer upp = Poles.Upper();
@@ -597,11 +599,11 @@ Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType  TConv,
                                     TColStd_Array1OfReal& DWeights,
                                     TColStd_Array1OfReal& D2Weights)
 {
-  Standard_Real Cosa,Sina,Cosas2,Sinas2;
-  Standard_Real Angle, DAngle, D2Angle, Alpha;
-  Standard_Real lambda, Dlambda, D2lambda, aux;
+  Standard_Real Cosa = NAN,Sina = NAN,Cosas2 = NAN,Sinas2 = NAN;
+  Standard_Real Angle = NAN, DAngle = NAN, D2Angle = NAN, Alpha = NAN;
+  Standard_Real lambda = NAN, Dlambda = NAN, D2lambda = NAN, aux = NAN;
   gp_Vec temp, dtemp, np2, dnp2, d2np2;
-  Standard_Integer i, jj;
+  Standard_Integer i = 0, jj = 0;
   Standard_Integer NbSpan=(Poles.Length()-1)/2;
   Standard_Integer low = Poles.Lower();
   Standard_Integer upp = Poles.Upper();
index e0b1eceed5459a12d6e92c9f6daf22ea74f368e5..b02cc5857b2c9a5f6950059a8f7568dced7cae40 100644 (file)
@@ -65,8 +65,8 @@ static Standard_Boolean Arrange(const Handle(Geom_BSplineCurve)& C1,
   GC[2] = Handle(Geom_BSplineCurve)::DownCast(C3->Copy());
   GC[3] = Handle(Geom_BSplineCurve)::DownCast(C4->Copy());
   
-  Standard_Integer i,j;
-  Standard_Boolean Trouve;
+  Standard_Integer i = 0,j = 0;
+  Standard_Boolean Trouve = 0;
 
   for (i=1; i<=3; i++) {
     Trouve = Standard_False;
@@ -152,7 +152,7 @@ static Standard_Integer SetSameDistribution(Handle(Geom_BSplineCurve)& C1,
     C2->SetKnots(K2);
   }    
   
-  Standard_Integer NP,NK;
+  Standard_Integer NP = 0,NK = 0;
   if ( BSplCLib::PrepareInsertKnots(C1->Degree(),Standard_False,
                                    K1,M1,K2,&M2,NP,NK,Precision::PConfusion(),
                                    Standard_False)) {
@@ -463,7 +463,7 @@ void  GeomFill_BSplineCurves::Init
     TColgp_Array1OfPnt P2( 1, NbPoles);
     CC1->Poles(P1);
     CC2->Poles(P2);
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i=1; i<=NbPoles; i++) {
       Poles(i, 1) = P1(i);
       Poles(i, 2) = P2(i);
index 5c939bc09d40c90d70fbd2955a39950c27282643..7b5535a251d3ce3c84320b93245432dfefac564c 100644 (file)
@@ -55,7 +55,7 @@ static void SetSameWeights(TColStd_Array1OfReal& W1,
   Standard_Real A = ( W1( 1) * W2( 1)) / ( W1( NU) * W2( NV));
   Standard_Real B = ( W3( 1) * W4( 1)) / ( W3( NU) * W4( NV));
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real Alfa = W1( NU) / W2( 1);
   for ( i=1; i<=NV; i++) {
     W2(i) *= Alfa;
@@ -115,8 +115,8 @@ static Standard_Boolean Arrange(const Handle(Geom_BezierCurve)& C1,
   GC[2] = Handle(Geom_BezierCurve)::DownCast(C3->Copy());
   GC[3] = Handle(Geom_BezierCurve)::DownCast(C4->Copy());
   
-  Standard_Integer i,j;
-  Standard_Boolean Trouve;
+  Standard_Integer i = 0,j = 0;
+  Standard_Boolean Trouve = 0;
 
   for (i=1; i<=3; i++) {
     Trouve = Standard_False;
@@ -385,7 +385,7 @@ void  GeomFill_BezierCurves::Init(const Handle(Geom_BezierCurve)& C1,
     CC1->Poles(P1);
     CC2->Poles(P2);
     
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i=1; i<=DegU+1; i++) {
       Poles(i, 1) = P1(i);
       Poles(i, 2) = P2(i);
index 0ae0e2af78751badd754d17275b52b2fa5900c94..1a7973be4cc355d12686aac9d2a307d14845533b 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill_BoundWithSurf.hxx>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -96,7 +98,7 @@ gp_Vec GeomFill_BoundWithSurf::Norm(const Standard_Real U) const
 
 //  Handle(Adaptor3d_Surface)& S = myConS.GetSurface();
 //  Handle(Adaptor2d_Curve2d)& C2d = myConS.GetCurve();
-  Standard_Real x,y;
+  Standard_Real x = NAN,y = NAN;
   Standard_Real w = U;
   if(!myPar.IsNull()) w = myPar->Value(U);
   myConS.GetCurve()->Value(w).Coord(x,y);
@@ -124,7 +126,7 @@ void GeomFill_BoundWithSurf::D1Norm(const Standard_Real U,
 //  Handle(Adaptor2d_Curve2d)& C2d = myConS.GetCurve();
   gp_Pnt2d P2d;
   gp_Vec2d V2d;
-  Standard_Real x,y,dx,dy;
+  Standard_Real x = NAN,y = NAN,dx = NAN,dy = NAN;
   Standard_Real w = U, dw = 1.;
   if(!myPar.IsNull()) myPar->D1(U,w,dw);
   myConS.GetCurve()->D1(w,P2d,V2d);
index 0dcc3d42f516fc64b8a8f3e76e9a94667f3e6f09..596f40a959f06ab15e0fdab84758a257eab7d5f6 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GeomFill_Boundary.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Vec.hxx>
@@ -73,7 +75,7 @@ void GeomFill_Boundary::D1Norm(const Standard_Real , gp_Vec& , gp_Vec& ) const
 
 void GeomFill_Boundary::Points(gp_Pnt& PFirst, gp_Pnt& PLast) const
 {
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   Bounds(f,l);
   PFirst = Value(f);
   PLast  = Value(l);
index 9bc250383bc5f3ba635234a473607617cb6d968d..0491a72cf76e7a4fb4e2de3f25923c1c405bfd4f 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <GCPnts_QuasiUniformDeflection.hxx>
 #include <GeomFill.hxx>
@@ -59,7 +61,7 @@ static void GeomFillFusInt(const TColStd_Array1OfReal& I1,
   Standard_Integer ind1=1, ind2=1;
   Standard_Real    Epspar = Precision::PConfusion()*0.99;
   // en suposant que le positionement fonctionne a PConfusion()/2
-  Standard_Real    v1, v2;
+  Standard_Real    v1 = NAN, v2 = NAN;
 // Initialisations : les IND1 et IND2 pointent sur le 1er element
 // de chacune des 2 tables a traiter.
 
@@ -112,7 +114,7 @@ GeomFill_CircularBlendFunc(const Handle(Adaptor3d_Curve)& Path,
                           const Handle(Adaptor3d_Curve)& Curve2,
                           const Standard_Real Radius,
                           const Standard_Boolean Polynomial) 
-                           : maxang(RealFirst()), 
+                           : myRadius(Radius), maxang(RealFirst()), 
                             minang(RealLast()),
                             distmin(RealLast())
 {
@@ -120,7 +122,7 @@ GeomFill_CircularBlendFunc(const Handle(Adaptor3d_Curve)& Path,
   myPath = myTPath = Path;
   myCurve1 = myTCurve1 = Curve1;
   myCurve2 = myTCurve2 = Curve2;
-  myRadius =  Radius;
+  
 
   // Estimations numeriques
   Discret();
@@ -141,9 +143,9 @@ GeomFill_CircularBlendFunc(const Handle(Adaptor3d_Curve)& Path,
 void GeomFill_CircularBlendFunc::Discret()
 {
   Standard_Real TFirst =  myPath->FirstParameter();
-  Standard_Real TLast =  myPath->LastParameter(), T;
-  Standard_Integer ii;
-  Standard_Real L1, L2, L;
+  Standard_Real TLast =  myPath->LastParameter(), T = NAN;
+  Standard_Integer ii = 0;
+  Standard_Real L1 = NAN, L2 = NAN, L = NAN;
   Handle(Adaptor3d_Curve) C;
   gp_Pnt P1, P2, P3, Center;
   gp_Vec DCenter;
@@ -168,7 +170,7 @@ void GeomFill_CircularBlendFunc::Discret()
   }
 
   Standard_Real Fleche = 1.e-2 * L;
-  Standard_Real Angle, Cosa, Percent;
+  Standard_Real Angle = NAN, Cosa = NAN, Percent = NAN;
   GCPnts_QuasiUniformDeflection Samp;
   Samp.Initialize (*C, Fleche);
   myBary.SetCoord(0.,0.,0.);
@@ -305,7 +307,7 @@ Standard_Boolean GeomFill_CircularBlendFunc::D1(const Standard_Real Param,
                                                TColStd_Array1OfReal& DWeigths) 
 {
   gp_Pnt P1, P2, Center;
-  Standard_Real invnorm1, invnorm2, invnormp;
+  Standard_Real invnorm1 = NAN, invnorm2 = NAN, invnormp = NAN;
 //  gp_Vec DCenter, D2Center, nplan, dnplan, DP1, DP2;
   gp_Vec DCenter, nplan, dnplan, DP1, DP2;
 //  gp_Vec ns1, ns2, Dns1, Dns2, vtmp;
@@ -392,7 +394,7 @@ Standard_Boolean GeomFill_CircularBlendFunc::D2(const Standard_Real Param,
                                                TColStd_Array1OfReal& D2Weigths) 
 {
   gp_Pnt P1, P2, Center;
-  Standard_Real invnorm1, invnorm2, invnormp, sc;
+  Standard_Real invnorm1 = NAN, invnorm2 = NAN, invnormp = NAN, sc = NAN;
   gp_Vec DCenter, D2Center, DP1, DP2, D2P1, D2P2;
   gp_Vec nplan, dnplan, d2nplan;
   gp_Vec ns1, ns2, Dns1, Dns2, D2ns1, D2ns2;
@@ -524,7 +526,7 @@ Standard_Boolean GeomFill_CircularBlendFunc::IsRational() const
 Standard_Integer GeomFill_CircularBlendFunc::
 NbIntervals(const GeomAbs_Shape S) const
 {
- Standard_Integer NbI_Center, NbI_Cb1, NbI_Cb2, ii;
+ Standard_Integer NbI_Center = 0, NbI_Cb1 = 0, NbI_Cb2 = 0, ii = 0;
  NbI_Center =  myPath->NbIntervals(GeomFillNextShape(S));
  NbI_Cb1    =  myCurve1->NbIntervals(S);
  NbI_Cb2    =  myCurve2->NbIntervals(S);
@@ -562,7 +564,7 @@ NbIntervals(const GeomAbs_Shape S) const
 void GeomFill_CircularBlendFunc::
 Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const
 {
- Standard_Integer NbI_Center, NbI_Cb1, NbI_Cb2, ii;
+ Standard_Integer NbI_Center = 0, NbI_Cb1 = 0, NbI_Cb2 = 0, ii = 0;
  NbI_Center =  myPath->NbIntervals(GeomFillNextShape(S));
  NbI_Cb1    =  myCurve1->NbIntervals(S);
  NbI_Cb2    =  myCurve2->NbIntervals(S);
@@ -604,7 +606,7 @@ void GeomFill_CircularBlendFunc::GetTolerance(const Standard_Real BoundTol,
                                              TColStd_Array1OfReal& Tol3d) const
 {
  Standard_Integer low = Tol3d.Lower() , up=Tol3d.Upper();
- Standard_Real Tol;
+ Standard_Real Tol = NAN;
 
  Tol= GeomFill::GetTolerance(myTConv, minang, 
                             myRadius,  AngleTol, SurfTol);
index 015d3edbeb9d004cc5e420a72e03e2d0ab7863c3..bcd02c1e2543c3cf9347625de04409f8fb90d07f 100644 (file)
@@ -151,11 +151,11 @@ private:
   Handle(Adaptor3d_Curve) myTPath;
   Handle(Adaptor3d_Curve) myTCurve1;
   Handle(Adaptor3d_Curve) myTCurve2;
-  Standard_Integer myDegree;
-  Standard_Integer myNbKnots;
-  Standard_Integer myNbPoles;
+  Standard_Integer myDegree{};
+  Standard_Integer myNbKnots{};
+  Standard_Integer myNbPoles{};
   Convert_ParameterisationType myTConv;
-  Standard_Boolean myreverse;
+  Standard_Boolean myreverse{};
 
 
 };
index 3a1f076c0561196f0fe3f5b9533580a61879cfee..3c8f99a1b267a2b7057f4f7b715e22191da773f1 100644 (file)
@@ -52,9 +52,9 @@ static gp_Vec DDeriv(const gp_Vec& F, const gp_Vec& DF, const gp_Vec& D2F)
   return Result;
 }
 
-GeomFill_ConstantBiNormal::GeomFill_ConstantBiNormal(const gp_Dir& BiNormal) : BN(BiNormal)
+GeomFill_ConstantBiNormal::GeomFill_ConstantBiNormal(const gp_Dir& BiNormal) : BN(BiNormal), frenet(new GeomFill_Frenet())
 {
-  frenet = new GeomFill_Frenet();
+  
 }
 
  Handle(GeomFill_TrihedronLaw) GeomFill_ConstantBiNormal::Copy() const
index d48c72cf7a190d3948d7fbdd3ffb42dfc5587679..35c05b457931f4bc6aed721f7199750f4f1729c6 100644 (file)
@@ -16,6 +16,8 @@
 
 //  Modified by skv - Fri Jun 18 12:52:54 2004 OCC6129
 
+#include <math.h>
+
 #include <AdvApprox_ApproxAFunction.hxx>
 #include <BSplCLib.hxx>
 #include <Geom_BSplineSurface.hxx>
@@ -100,7 +102,7 @@ static Handle(Law_Linear) mklin(const Handle(Law_Function)& func)
   Handle(Law_Linear) fu = Handle(Law_Linear)::DownCast(func);
   if(fu.IsNull()) {
     fu = new Law_Linear();
-    Standard_Real d,f;
+    Standard_Real d = NAN,f = NAN;
     func->Bounds(d,f);
     fu->Set(d,func->Value(d),f,func->Value(f));
   }
@@ -115,7 +117,7 @@ static void sortbounds(const Standard_Integer     nb,
   // trier les bords (facon bourinos),
   // flaguer ceux a renverser,
   // flaguer les baillements au coins.
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   Handle(GeomFill_Boundary) temp;
   rev[0] = 0;
   gp_Pnt pf,pl;
@@ -157,7 +159,7 @@ static void sortbounds(const Standard_Integer     nb,
   // coins pour les bords contraints.
   gp_Pnt pbid;
   gp_Vec tgi, nori, tgn, norn;
-  Standard_Real fi, fn, li, ln;
+  Standard_Real fi = NAN, fn = NAN, li = NAN, ln = NAN;
   for (i = 0; i < nb; i++){
     Standard_Integer next = (i+1)%nb;
     if(!rev[i]) bound[i]->Bounds(fi,li);
@@ -188,7 +190,7 @@ static void coonscnd(const Standard_Integer     nb,
                     Standard_Real*             mintg)
 {
   Standard_Real fact_normalization = 100.;  
-  Standard_Integer i;
+  Standard_Integer i = 0;
   // Pour chaque coin contraint, on controle les bounds adjascents.
   for(i = 0; i < nb; i++){
     if(stat[i].HasConstraint()){
@@ -203,7 +205,7 @@ static void coonscnd(const Standard_Integer     nb,
        tolang *= (Min(mintg[ip],mintg[i])*fact*fact_normalization);
        gp_Vec tgp, dnorp, tgi, dnori, vbid;
        gp_Pnt pbid;
-       Standard_Real fp,lp,fi,li;
+       Standard_Real fp = NAN,lp = NAN,fi = NAN,li = NAN;
        if(!rev[ip]) bound[ip]->Bounds(fp,lp);
        else bound[ip]->Bounds(lp,fp);
        bound[ip]->D1(lp,pbid,tgp);
@@ -234,13 +236,13 @@ static void killcorners(const Standard_Integer     nb,
                        GeomFill_CornerState*      stat,
                        Handle(GeomFill_TgtField)* tga)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   // Pour chaque  bound, on  controle l etat  des extremites  et on flingue
   // eventuellement le champ tangent et les derivees du bound.
   for(i = 0; i < nb; i++){
     Standard_Integer inext = (i+1)%nb;
-    Standard_Boolean fnul, lnul;
-    Standard_Real fscal, lscal;
+    Standard_Boolean fnul = 0, lnul = 0;
+    Standard_Real fscal = NAN, lscal = NAN;
     if(!nrev[i]){
       fnul = stat[i].IsToKill(fscal);
       lnul = stat[inext].IsToKill(lscal);
@@ -279,12 +281,12 @@ class GeomFill_ConstrainedFilling_Eval : public AdvApprox_EvaluatorFunction
   GeomFill_ConstrainedFilling_Eval (GeomFill_ConstrainedFilling& theTool)
     : curfil(theTool) {}
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   GeomFill_ConstrainedFilling& curfil;
@@ -342,7 +344,7 @@ void GeomFill_ConstrainedFilling::Init(const Handle(GeomFill_Boundary)& B1,
   rev[0] = rev[1] = rev[2] = Standard_False;
   Handle(GeomFill_Boundary) bound[3];
   bound[0] = B1; bound[1] = B2; bound[2] = B3;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   sortbounds(3,bound,rev,stcor);
 
   // on reoriente.
@@ -437,7 +439,7 @@ void GeomFill_ConstrainedFilling::Init(const Handle(GeomFill_Boundary)& B1,
   rev[0] = rev[1] = rev[2] = rev[3] = Standard_False;
   Handle(GeomFill_Boundary) bound[4];
   bound[0] = B1; bound[1] = B2; bound[2] = B3; bound[3] = B4;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   sortbounds(4,bound,rev,stcor);
 
   // on reoriente.
@@ -559,7 +561,7 @@ void GeomFill_ConstrainedFilling::Build()
   for (Standard_Integer count = 0; count < 2; count++){
     ibound[0] = count; ibound[1] = count+2;
     ctr[0] = ctr[1] = nbd3 = 0;
-    Standard_Integer ii ;
+    Standard_Integer ii = 0 ;
     for ( ii = 0; ii < 2; ii++){
       if (ptch->Bound(ibound[ii])->HasNormals()) { 
        ctr[ii] = 2;
@@ -612,7 +614,7 @@ void GeomFill_ConstrainedFilling::Build()
 
 void GeomFill_ConstrainedFilling::PerformApprox()
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
   Handle(TColStd_HArray1OfReal) tol3d, tol2d, tol1d;
   if(nbd3) tol3d = new TColStd_HArray1OfReal(1,nbd3);
   Standard_Integer i3d = 0;
@@ -622,7 +624,7 @@ void GeomFill_ConstrainedFilling::PerformApprox()
       tol3d->SetValue(++i3d,0.5* mig[ibound[ii]] * ptch->Bound(ibound[ii])->Tolang());
     }
   }
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   ptch->Bound(ibound[0])->Bounds(f,l);
 
   GeomFill_ConstrainedFilling_Eval ev (*this);
@@ -675,7 +677,7 @@ void GeomFill_ConstrainedFilling::PerformApprox()
 void GeomFill_ConstrainedFilling::MatchKnots()
 {
   // on n insere rien si les domaines valent 1.
-  Standard_Integer i, j, l;
+  Standard_Integer i = 0, j = 0, l = 0;
   Standard_Integer ind[4];
   nm[0] = mults[0]; nm[1] = mults[1];
   nk[0] = knots[0]; nk[1] = knots[1];
@@ -692,7 +694,7 @@ void GeomFill_ConstrainedFilling::MatchKnots()
   if(nbadd){
     TColStd_Array1OfReal addk(kadd[0],1,nbadd);
     TColStd_Array1OfInteger addm(madd[0],1,nbadd);
-    Standard_Integer nbnp, nbnk;
+    Standard_Integer nbnp = 0, nbnk = 0;
     if(BSplCLib::PrepareInsertKnots(degree[1],0,
                                    knots[1]->Array1(),
                                    mults[1]->Array1(),
@@ -759,7 +761,7 @@ void GeomFill_ConstrainedFilling::MatchKnots()
   if(nbadd){
     TColStd_Array1OfReal addk(kadd[0],1,nbadd);
     TColStd_Array1OfInteger addm(madd[0],1,nbadd);
-    Standard_Integer nbnp, nbnk;
+    Standard_Integer nbnp = 0, nbnk = 0;
     if(BSplCLib::PrepareInsertKnots(degree[0],0,
                                    knots[0]->Array1(),
                                    mults[0]->Array1(),
@@ -877,7 +879,7 @@ void GeomFill_ConstrainedFilling::PerformS0()
   //         - ab[3](i)*ab[0](j)*c[0] - ab[0](j)*ab[1](i)*c[1]
   //         - ab[1](i)*ab[2](j)*c[2] - ab[2](j)*ab[3](i)*c[3]
 
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   Standard_Integer ni = ncpol[0]->Length();
   Standard_Integer nj = ncpol[1]->Length();
   S0 = new TColgp_HArray2OfPnt(1,ni,1,nj);
@@ -931,7 +933,7 @@ void GeomFill_ConstrainedFilling::PerformS1()
   // sur les bords ou tgte est defini.
   gp_XYZ* nt[4];
   const TColgp_Array2OfPnt& ss0 = S0->Array2();
-  Standard_Integer l, i, j, k;
+  Standard_Integer l = 0, i = 0, j = 0, k = 0;
   Standard_Integer ni = ss0.ColLength();
   Standard_Integer nj = ss0.RowLength();
   for(i = 0; i <= 3; i++){
@@ -1119,7 +1121,7 @@ void GeomFill_ConstrainedFilling::PerformS1()
 
 void GeomFill_ConstrainedFilling::PerformSurface()
 {
-  Standard_Integer ni = S0->ColLength(), nj = S0->RowLength(),i,j;
+  Standard_Integer ni = S0->ColLength(), nj = S0->RowLength(),i = 0,j = 0;
   TColgp_Array2OfPnt temp(1,ni,1,nj);
   const TColgp_Array2OfPnt& t0 = S0->Array2();
   const TColgp_Array2OfPnt& t1 = S1->Array2();
@@ -1238,7 +1240,7 @@ Standard_Integer GeomFill_ConstrainedFilling::Eval(const Standard_Real W,
 void GeomFill_ConstrainedFilling::CheckCoonsAlgPatch(const Standard_Integer I) 
 {
   Standard_Integer nbp = 30;  
-  Standard_Real uu=0,duu=0,vv=0,dvv=0,ww=0,dww=0,u1,u2,v1,v2;
+  Standard_Real uu=0,duu=0,vv=0,dvv=0,ww=0,dww=0,u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
   surf->Bounds(u1,u2,v1,v2);
   Standard_Boolean enu = Standard_False;
   switch(I){
@@ -1304,7 +1306,7 @@ void GeomFill_ConstrainedFilling::CheckTgteField(const Standard_Integer I)
 #endif
   gp_Vec d1;
   Standard_Boolean caplisse = 0;
-  Standard_Real maxang = 0.,pmix=0,pmixcur;
+  Standard_Real maxang = 0.,pmix=0,pmixcur = NAN;
   Handle(GeomFill_Boundary) bou =  ptch->Bound(I);
   for (Standard_Integer iu = 0; iu <= 30; iu++){
     Standard_Real uu = iu/30.;
@@ -1399,7 +1401,7 @@ void GeomFill_ConstrainedFilling::CheckResult(const Standard_Integer I)
 {
   Standard_Boolean donor = !tgalg[I].IsNull();
   Standard_Real maxang = 0., maxdist = 0.;
-  Standard_Real uu=0,duu=0,vv=0,dvv=0,ww=0,dww=0,u1,u2,v1,v2;
+  Standard_Real uu=0,duu=0,vv=0,dvv=0,ww=0,dww=0,u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
   surf->Bounds(u1,u2,v1,v2);
   switch(I){
   case 0:
@@ -1434,7 +1436,7 @@ void GeomFill_ConstrainedFilling::CheckResult(const Standard_Integer I)
   Standard_Boolean hasang[31];
 #endif
   Handle(GeomFill_Boundary) bou = ptch->Bound(I);
-  Standard_Integer k ;
+  Standard_Integer k = 0 ;
   for ( k = 0; k <= 30; k++){
     pbound[k] = bou->Value(ww);
     if(!donor) surf->D0(uu,vv,pres[k]); 
index 1f5305c80457f6033b0449cc180e0e91bd943617..6ab008b207754a568cff39b3677684084f6f5267 100644 (file)
@@ -176,24 +176,24 @@ private:
   Standard_Integer segmax;
   Handle(GeomFill_CoonsAlgPatch) ptch;
   Handle(GeomFill_TgtField) tgalg[4];
-  Standard_Real mig[4];
+  Standard_Real mig[4]{};
   GeomFill_CornerState stcor[4];
   gp_Vec v[4];
   Standard_Boolean appdone;
-  Standard_Integer degree[2];
+  Standard_Integer degree[2]{};
   Handle(TColgp_HArray1OfPnt) curvpol[4];
   Handle(TColgp_HArray1OfPnt) tgtepol[4];
   Handle(TColStd_HArray1OfInteger) mults[2];
   Handle(TColStd_HArray1OfReal) knots[2];
   Handle(TColStd_HArray1OfReal) ab[4];
   Handle(TColStd_HArray1OfReal) pq[4];
-  Standard_Real dom[4];
+  Standard_Real dom[4]{};
   Handle(TColgp_HArray1OfPnt) ncpol[4];
   Handle(TColgp_HArray1OfPnt) ntpol[4];
   Handle(TColStd_HArray1OfInteger) nm[2];
   Handle(TColStd_HArray1OfReal) nk[2];
-  Standard_Integer ibound[2];
-  Standard_Integer ctr[2];
+  Standard_Integer ibound[2]{};
+  Standard_Integer ctr[2]{};
   Standard_Integer nbd3;
   Handle(TColgp_HArray2OfPnt) S0;
   Handle(TColgp_HArray2OfPnt) S1;
index 58186db10c2b6c637d7762b23a93bc01645ef30f..9fbe24334e44878fc3a7b0484363f00020e6e6dd 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <GeomFill_Coons.hxx>
 #include <PLib.hxx>
@@ -83,7 +85,7 @@ void  GeomFill_Coons::Init(const TColgp_Array1OfPnt& P1,
   myPoles = new TColgp_HArray2OfPnt( 1, NPolU, 1, NPolV);
 
   // The boundaries are not modified
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
 
   for (i=1; i<=NPolU; i++) {
     myPoles->SetValue( i, 1    , P1(i));
@@ -123,7 +125,7 @@ void  GeomFill_Coons::Init(const TColgp_Array1OfPnt& P1,
   TColStd_Array1OfReal GU(2,NPolU-1);
   TColStd_Array1OfReal FV(2,NPolV-1);
   TColStd_Array1OfReal GV(2,NPolV-1);
-  Standard_Real Dummy;
+  Standard_Real Dummy = NAN;
   for ( i= 2; i< NPolU; i++) {
     CoefU(i).Coord(FU(i), GU(i), Dummy);
   }
@@ -187,12 +189,12 @@ void  GeomFill_Coons::Init(const TColgp_Array1OfPnt&   P1,
 //#endif
   myWeights = new TColStd_HArray2OfReal( 1, NPolU, 1, NPolV);
    // The boundaries are not modified
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   for ( i=1; i<=NPolU; i++) {
     myWeights->SetValue( i, 1    , W1(i));
     myWeights->SetValue( i, NPolV, W3(i));
   }
-  Standard_Real PU,PU1,PV,PV1;
+  Standard_Real PU = NAN,PU1 = NAN,PV = NAN,PV1 = NAN;
   
   for ( j=2; j<=NPolV-1; j++) {
     PV  = (j-1)/NV;
index da2ba69d558c976341e6def53587a9ec01813cc9..ccda07b5dc62d00c4ed3636059a39f681cb78f25 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GeomFill_Boundary.hxx>
 #include <GeomFill_CoonsAlgPatch.hxx>
 #include <gp_Pnt.hxx>
@@ -36,7 +38,7 @@ GeomFill_CoonsAlgPatch::GeomFill_CoonsAlgPatch
  const Handle(GeomFill_Boundary)& B4)
 {
   bound[0] = B1; bound[1] = B2; bound[2] = B3; bound[3] = B4; 
-  Standard_Real deb0, deb1, fin0, fin1;
+  Standard_Real deb0 = NAN, deb1 = NAN, fin0 = NAN, fin1 = NAN;
 
   B2->Bounds(deb1,fin1);
   Handle(Law_Linear) aLaw0 = new Law_Linear();
@@ -99,7 +101,7 @@ void GeomFill_CoonsAlgPatch::Func(Handle(Law_Function)& f1,
 gp_Pnt GeomFill_CoonsAlgPatch::Value(const Standard_Real , 
                                     const Standard_Real V) const 
 {
-  Standard_Real a0,a1,a2,a3;
+  Standard_Real a0 = NAN,a1 = NAN,a2 = NAN,a3 = NAN;
   a0 = a[0]->Value(V);
   a1 = a[1]->Value(V);
   a2 = 1. - a0;
@@ -149,7 +151,7 @@ gp_Pnt GeomFill_CoonsAlgPatch::Value(const Standard_Real ,
 gp_Vec GeomFill_CoonsAlgPatch::D1U(const Standard_Real U, 
                                   const Standard_Real V) const 
 {
-  Standard_Real a0,a1,a2,a3,bid;
+  Standard_Real a0 = NAN,a1 = NAN,a2 = NAN,a3 = NAN,bid = NAN;
   a0 = a[0]->Value(V);
   a[1]->D1(U,bid,a1);
   a2 = 1 - a0;
@@ -204,7 +206,7 @@ gp_Vec GeomFill_CoonsAlgPatch::D1U(const Standard_Real U,
 gp_Vec GeomFill_CoonsAlgPatch::D1V(const Standard_Real U, 
                                   const Standard_Real V) const 
 {
-  Standard_Real a0,a1,a2,a3,bid;
+  Standard_Real a0 = NAN,a1 = NAN,a2 = NAN,a3 = NAN,bid = NAN;
   a[0]->D1(V,bid,a0);
   a1 = a[1]->Value(U);
   a2 = -a0;
@@ -259,7 +261,7 @@ gp_Vec GeomFill_CoonsAlgPatch::D1V(const Standard_Real U,
 gp_Vec GeomFill_CoonsAlgPatch::DUV(const Standard_Real U, 
                                   const Standard_Real V) const 
 {
-  Standard_Real a0,a1,a2,a3,bid;
+  Standard_Real a0 = NAN,a1 = NAN,a2 = NAN,a3 = NAN,bid = NAN;
   a[0]->D1(V,bid,a0);
   a[1]->D1(U,bid,a1);
   a2 = -a0;
index 609d0bb8e2358f7fe9d50026f9e49db0f8e620b7..835d80941274f8872b5044623661c29fc0d75025 100644 (file)
@@ -41,6 +41,7 @@
 #include <TColStd_HArray1OfReal.hxx>
 #include <TColStd_SequenceOfReal.hxx>
 
+#include <math.h>
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(GeomFill_CorrectedFrenet,GeomFill_TrihedronLaw)
 
@@ -95,7 +96,7 @@ static void draw(const Handle(Law_Function)& law)
 static Standard_Real ComputeTorsion(const Standard_Real Param,
                                     const Handle(Adaptor3d_Curve)& aCurve)
 {
-  Standard_Real Torsion;
+  Standard_Real Torsion = NAN;
   
   gp_Pnt aPoint;
   gp_Vec DC1, DC2, DC3;
@@ -124,9 +125,9 @@ static void smoothlaw(Handle(Law_BSpline)& Law,
                      const Handle(TColStd_HArray1OfReal)& Param,
                      const Standard_Real Tol) 
 {
-  Standard_Real tol, d;
-  Standard_Integer ii, Nbk;
-  Standard_Boolean B, Ok;
+  Standard_Real tol = NAN, d = NAN;
+  Standard_Integer ii = 0, Nbk = 0;
+  Standard_Boolean B = 0, Ok = 0;
   Handle(Law_BSpline) BS = Law->Copy();
 
   Nbk = BS->NbKnots();
@@ -262,8 +263,8 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_Curve)& theC,
   default:
     { // On utilise un echantillonage
       Standard_Integer nbp = 15 + theC->NbIntervals(GeomAbs_C3);
-      Standard_Real f, l, t, inv;
-      Standard_Integer ii;
+      Standard_Real f = NAN, l = NAN, t = NAN, inv = NAN;
+      Standard_Integer ii = 0;
       f = theC->FirstParameter();
       l = theC->LastParameter();
       inv = 1./(nbp-1);
@@ -277,7 +278,7 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_Curve)& theC,
   }
   
   if (! TabP.IsNull()) { // Recherche d'un plan moyen et controle
-    Standard_Boolean issingular;
+    Standard_Boolean issingular = 0;
     gp_Ax2 inertia;
     GeomLib::AxeOfInertia(TabP->Array1(), inertia, issingular);
     if (issingular) {
@@ -290,8 +291,8 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_Curve)& theC,
       {
        //control = Controle(TabP->Array1(), P,  myTolerance);
 //     Standard_Boolean isOnPlane;
-       Standard_Real a,b,c,d, dist;
-       Standard_Integer ii;
+       Standard_Real a = NAN,b = NAN,c = NAN,d = NAN, dist = NAN;
+       Standard_Integer ii = 0;
   theP->Coefficients(a,b,c,d);
        for (ii=1; ii<=TabP->Length() && found; ii++) {
          const gp_XYZ& xyz = TabP->Value(ii).XYZ();
@@ -310,10 +311,10 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_Curve)& theC,
 // Purpose :
 //===============================================================
 GeomFill_CorrectedFrenet::GeomFill_CorrectedFrenet() 
- : isFrenet(Standard_False)
+ : frenet(new GeomFill_Frenet()), isFrenet(Standard_False), myForEvaluation(Standard_False)
 {
-  frenet = new GeomFill_Frenet();
-  myForEvaluation = Standard_False;
+  
+  
 }
 
 //===============================================================
@@ -321,10 +322,10 @@ GeomFill_CorrectedFrenet::GeomFill_CorrectedFrenet()
 // Purpose :
 //===============================================================
 GeomFill_CorrectedFrenet::GeomFill_CorrectedFrenet(const Standard_Boolean ForEvaluation) 
- : isFrenet(Standard_False)
+ : frenet(new GeomFill_Frenet()), isFrenet(Standard_False), myForEvaluation(ForEvaluation)
 {
-  frenet = new GeomFill_Frenet();
-  myForEvaluation = ForEvaluation;
+  
+  
 }
 
 Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const
@@ -374,7 +375,7 @@ Standard_Boolean GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve
  void GeomFill_CorrectedFrenet::Init()
 { 
   EvolAroundT = new Law_Composite();  
-  Standard_Integer NbI = frenet->NbIntervals(GeomAbs_C0), i;
+  Standard_Integer NbI = frenet->NbIntervals(GeomAbs_C0), i = 0;
   TColStd_Array1OfReal T(1, NbI + 1);
   frenet->Intervals(T, GeomAbs_C0);
   Handle(Law_Function) Func;
@@ -384,9 +385,9 @@ Standard_Boolean GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve
   
   gp_Vec Tangent, Normal, BN;
   frenet->D0(myTrimmed->FirstParameter(), Tangent, Normal, BN);
-  Standard_Integer NbStep;
+  Standard_Integer NbStep = 0;
 //  Standard_Real StartAng = 0, AvStep, Step, t;
-  Standard_Real StartAng = 0, AvStep, Step;
+  Standard_Real StartAng = 0, AvStep = NAN, Step = NAN;
 
 #ifdef DRAW
   Standard_Real t;
@@ -478,9 +479,9 @@ Standard_Boolean GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve
   gp_Vec Tangent, Normal, BN, cross;
   TColStd_SequenceOfReal parameters;
   TColStd_SequenceOfReal EvolAT;
-  Standard_Real Param = First, LengthMin, L, norm;
+  Standard_Real Param = First, LengthMin = NAN, L = NAN, norm = NAN;
   Standard_Boolean isZero = Standard_True, isConst = Standard_True;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   gp_Pnt PonC;
   gp_Vec D1;
 
@@ -492,7 +493,7 @@ Standard_Boolean GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve
   aT = gp_Vec(0, 0, 0);
   aN = gp_Vec(0, 0, 0);   
 
-  Standard_Real angleAT = 0., currParam, currStep = Step;
+  Standard_Real angleAT = 0., currParam = NAN, currStep = Step;
 
   Handle( Geom_Plane ) aPlane;
   Standard_Boolean isPlanar = Standard_False;
@@ -612,7 +613,7 @@ Standard_Boolean GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve
 Standard_Real GeomFill_CorrectedFrenet::CalcAngleAT(const gp_Vec& Tangent, const gp_Vec& Normal,  
                                                    const gp_Vec& prevTangent, const gp_Vec& prevNormal) const
 {
-  Standard_Real angle;
+  Standard_Real angle = NAN;
   gp_Vec Normal_rot, cross;
   angle = Tangent.Angle(prevTangent);
   if (Abs(angle) > Precision::Angular() && Abs(angle) < M_PI - Precision::Angular()) {
@@ -680,7 +681,7 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
   frenet->D0(Param, Tangent, Normal, BiNormal);
   if (isFrenet) return Standard_True;
  
-  Standard_Real angleAT; 
+  Standard_Real angleAT = NAN
   //angleAT = TLaw->Value(Param);
   angleAT = GetAngleAT(Param); //OCC78
   
@@ -711,8 +712,8 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
   frenet->D1(Param, Tangent, DTangent, Normal, DNormal, BiNormal, DBiNormal);
   if (isFrenet) return Standard_True;
 
-  Standard_Real angleAT, d_angleAT;
-  Standard_Real sina, cosa
+  Standard_Real angleAT = NAN, d_angleAT = NAN;
+  Standard_Real sina = NAN, cosa = NAN
 
   TLaw->D1(Param, angleAT, d_angleAT);
   angleAT = GetAngleAT(Param); //OCC78
@@ -780,8 +781,8 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
             BiNormal, DBiNormal, D2BiNormal);
   if (isFrenet) return Standard_True;
 
-  Standard_Real angleAT, d_angleAT, d2_angleAT;
-  Standard_Real sina, cosa
+  Standard_Real angleAT = NAN, d_angleAT = NAN, d2_angleAT = NAN;
+  Standard_Real sina = NAN, cosa = NAN
   TLaw->D2(Param, angleAT, d_angleAT, d2_angleAT);
   angleAT = GetAngleAT(Param); //OCC78
 
@@ -871,7 +872,7 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
 //===============================================================
  Standard_Integer GeomFill_CorrectedFrenet::NbIntervals(const GeomAbs_Shape S) const
 {
-  Standard_Integer NbFrenet, NbLaw;
+  Standard_Integer NbFrenet = 0, NbLaw = 0;
   NbFrenet = frenet->NbIntervals(S);
   if (isFrenet) return NbFrenet;
 
@@ -897,7 +898,7 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
  void GeomFill_CorrectedFrenet::Intervals(TColStd_Array1OfReal& T,
                                          const GeomAbs_Shape S) const
 {
-  Standard_Integer NbFrenet, NbLaw;
+  Standard_Integer NbFrenet = 0, NbLaw = 0;
   if (isFrenet) {
     frenet->Intervals(T, S);
     return;
@@ -947,8 +948,8 @@ GeomFill_Trihedron GeomFill_CorrectedFrenet::EvaluateBestMode()
   const Standard_Real MaxAngle = 3.*M_PI/4.;
   const Standard_Real MaxTorsion = 100.;
   
-  Standard_Real Step, u, v, tmin, tmax;
-  Standard_Integer NbInt, i, j, k = 1;
+  Standard_Real Step = NAN, u = NAN, v = NAN, tmin = NAN, tmax = NAN;
+  Standard_Integer NbInt = 0, i = 0, j = 0, k = 1;
   NbInt = EvolAroundT->NbIntervals(GeomAbs_CN);
   TColStd_Array1OfReal Int(1, NbInt+1);
   EvolAroundT->Intervals(Int, GeomAbs_CN);
index 6519752729b6bcc5059d0624620b0952a4c62245..8415b62e744d987f21e0ac7241d848a4184b4dd2 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill_CurveAndTrihedron.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -35,12 +37,12 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_CurveAndTrihedron,GeomFill_LocationLaw)
 //Purpose :
 //==================================================================
 GeomFill_CurveAndTrihedron::GeomFill_CurveAndTrihedron(
-       const Handle(GeomFill_TrihedronLaw)& Trihedron )
+       const Handle(GeomFill_TrihedronLaw)& Trihedron ) : myLaw(Trihedron), WithTrans(Standard_False)
 {
-  myLaw = Trihedron;
+  
   myCurve.Nullify();
   Trans.SetIdentity();
-  WithTrans = Standard_False;
+  
 }
 
 //==================================================================
@@ -99,7 +101,7 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const
                                                 gp_Mat& M,
                                                 gp_Vec& V) 
 {
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   myTrimmed->D0(Param, Point);
   V.SetXYZ(Point.XYZ());
    
@@ -121,7 +123,7 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const
                                                 gp_Vec& V,
                                                 TColgp_Array1OfPnt2d&) 
 {
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   myTrimmed->D0(Param, Point);
   V.SetXYZ(Point.XYZ());
    
@@ -146,7 +148,7 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const
                                                 TColgp_Array1OfPnt2d& ,
                                                 TColgp_Array1OfVec2d& ) 
 {
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   myTrimmed->D1(Param, Point, DV);
   V.SetXYZ(Point.XYZ());
    
@@ -181,7 +183,7 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const
                                                 TColgp_Array1OfVec2d&,
                                                 TColgp_Array1OfVec2d&) 
 {
- Standard_Boolean Ok;
+ Standard_Boolean Ok = 0;
  myTrimmed->D2(Param, Point, DV, D2V);
  V.SetXYZ(Point.XYZ());
    
@@ -211,7 +213,7 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const
 //==================================================================
  Standard_Integer GeomFill_CurveAndTrihedron::NbIntervals(const GeomAbs_Shape S) const
 {
-  Standard_Integer Nb_Sec, Nb_Law;
+  Standard_Integer Nb_Sec = 0, Nb_Law = 0;
   Nb_Sec  =  myTrimmed->NbIntervals(S);
   Nb_Law  =  myLaw->NbIntervals(S);
 
@@ -238,7 +240,7 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const
  void GeomFill_CurveAndTrihedron::Intervals(TColStd_Array1OfReal& T,
                                            const GeomAbs_Shape S) const
 {
-  Standard_Integer Nb_Sec, Nb_Law;
+  Standard_Integer Nb_Sec = 0, Nb_Law = 0;
   Nb_Sec  =  myTrimmed->NbIntervals(S);
   Nb_Law  =  myLaw->NbIntervals(S);
 
@@ -309,8 +311,8 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const
  void GeomFill_CurveAndTrihedron::GetAverageLaw(gp_Mat& AM,
                                                gp_Vec& AV) 
 {
-  Standard_Integer ii;
-  Standard_Real U, delta;
+  Standard_Integer ii = 0;
+  Standard_Real U = NAN, delta = NAN;
   gp_Vec V;
   
   myLaw->GetAverageLaw(V1, V2, V3);
index 9033194bac773b70ac428ffb15fbffd6a4430854..ca3c71c6957e7b49b3160b5787c81cb4e03aa15a 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GeomFill_Curved.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Vec.hxx>
@@ -112,12 +114,12 @@ void  GeomFill_Curved::Init(const TColgp_Array1OfPnt& P1,
   myPoles = new TColgp_HArray2OfPnt( 1, NPolU, 1, NPolV);
   
   // The boundaries are not modified
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
   for ( i=1; i<=NPolU; i++) {
     myPoles->SetValue( i, 1    , P1(i));
     myPoles->SetValue( i, NPolV, P3(i));
   }
-  Standard_Real PU,PU1,PV,PV1;
+  Standard_Real PU = NAN,PU1 = NAN,PV = NAN,PV1 = NAN;
   
   for ( j=2; j<=NPolV-1; j++) {
     PV  = (j-1)/NV;
@@ -177,12 +179,12 @@ void  GeomFill_Curved::Init(const TColgp_Array1OfPnt&   P1,
   myWeights = new TColStd_HArray2OfReal( 1, NPolU, 1, NPolV);
   
   // The boundaries are not modified
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   for ( i=1; i<=NPolU; i++) {
     myWeights->SetValue( i, 1    , W1(i));
     myWeights->SetValue( i, NPolV, W3(i));
   }
-  Standard_Real PU,PU1,PV,PV1;
+  Standard_Real PU = NAN,PU1 = NAN,PV = NAN,PV1 = NAN;
   
   for ( j=2; j<=NPolV-1; j++) {
     PV  = (j-1)/NV;
@@ -220,7 +222,7 @@ void  GeomFill_Curved::Init(const TColgp_Array1OfPnt& P1,
   
   myPoles = new TColgp_HArray2OfPnt( 1, NPolU, 1, NPolV);
   
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   
   for ( j=1; j<=NPolV; j++) {
     gp_Vec Tra(P2(1),P2(j));
index 7310d3d50aa32b5b654039d54ea6b588d4d786a2..c35fe2957af80a1b1c84df1b217c8e8131e944c8 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill_Darboux.hxx>
 
 #include <Adaptor3d_CurveOnSurface.hxx>
@@ -83,8 +85,8 @@ static void NormalD0(const Standard_Real U, const Standard_Real V, const Handle(
     Standard_Integer MaxOrder=3;
     TColgp_Array2OfVec DerNUV(0,MaxOrder,0,MaxOrder);
     TColgp_Array2OfVec DerSurf(0,MaxOrder+1,0,MaxOrder+1);
-    Standard_Integer i,j;//OrderU,OrderV;
-    Standard_Real Umin,Umax,Vmin,Vmax;
+    Standard_Integer i = 0,j = 0;//OrderU,OrderV;
+    Standard_Real Umin = NAN,Umax = NAN,Vmin = NAN,Vmax = NAN;
     Umin = Surf->FirstUParameter();
     Umax = Surf->LastUParameter();
     Vmin = Surf->FirstVParameter();
@@ -142,16 +144,16 @@ static void NormalD1 (const Standard_Real U, const Standard_Real V,
   Standard_Real MagTol=0.000000001;
   CSLib_NormalStatus NStatus;
   CSLib::Normal (D1UNormal, D1VNormal, MagTol, NStatus, Normal);
-  Standard_Integer MaxOrder;
+  Standard_Integer MaxOrder = 0;
   if (NStatus == CSLib_Defined) 
     MaxOrder=0;
   else 
     MaxOrder=3;
-  Standard_Integer OrderU,OrderV;
+  Standard_Integer OrderU = 0,OrderV = 0;
   TColgp_Array2OfVec DerNUV(0,MaxOrder+1,0,MaxOrder+1);
   TColgp_Array2OfVec DerSurf(0,MaxOrder+2,0,MaxOrder+2);
-  Standard_Integer i,j;
-  Standard_Real Umin,Umax,Vmin,Vmax;
+  Standard_Integer i = 0,j = 0;
+  Standard_Real Umin = NAN,Umax = NAN,Vmin = NAN,Vmax = NAN;
   Umin = Surf->FirstUParameter();
   Umax = Surf->LastUParameter();
   Vmin = Surf->FirstVParameter();
@@ -205,17 +207,17 @@ static void NormalD2 (const Standard_Real U, const Standard_Real V,
   Standard_Real MagTol=0.000000001;
   CSLib_NormalStatus NStatus;
   CSLib::Normal (D1UNormal, D1VNormal, MagTol, NStatus, Normal);
-  Standard_Integer MaxOrder;
+  Standard_Integer MaxOrder = 0;
   if (NStatus == CSLib_Defined) 
     MaxOrder=0;
   else 
     MaxOrder=3;
-  Standard_Integer OrderU,OrderV;
+  Standard_Integer OrderU = 0,OrderV = 0;
   TColgp_Array2OfVec DerNUV(0,MaxOrder+2,0,MaxOrder+2);
   TColgp_Array2OfVec DerSurf(0,MaxOrder+3,0,MaxOrder+3);
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   
-  Standard_Real Umin,Umax,Vmin,Vmax;
+  Standard_Real Umin = NAN,Umax = NAN,Vmin = NAN,Vmax = NAN;
   Umin = Surf->FirstUParameter();
   Umax = Surf->LastUParameter();
   Vmin = Surf->FirstVParameter();
@@ -270,9 +272,9 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Darboux::Copy() const
   gp_Vec2d D2d;
   gp_Pnt S;
   gp_Vec dS_du, dS_dv;
-  Handle(Adaptor2d_Curve2d) myCurve2d = static_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetCurve();
-  Handle(Adaptor3d_Surface) mySupport = static_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetSurface();
-  Standard_Integer OrderU, OrderV;
+  Handle(Adaptor2d_Curve2d) myCurve2d = dynamic_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetCurve();
+  Handle(Adaptor3d_Surface) mySupport = dynamic_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetSurface();
+  Standard_Integer OrderU = 0, OrderV = 0;
   myCurve2d->D1(Param, C2d, D2d);
 
 //  Normal = dS_du.Crossed(dS_dv).Normalized();
@@ -303,8 +305,8 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Darboux::Copy() const
   gp_Vec2d D2d, D2_2d;
   gp_Pnt S;
   gp_Vec dS_du, dS_dv, d2S_du, d2S_dv, d2S_duv, F, DF;
-  Handle(Adaptor2d_Curve2d) myCurve2d = static_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetCurve();
-  Handle(Adaptor3d_Surface) mySupport = static_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetSurface();
+  Handle(Adaptor2d_Curve2d) myCurve2d = dynamic_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetCurve();
+  Handle(Adaptor3d_Surface) mySupport = dynamic_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetSurface();
 //  Standard_Integer Order;
   myCurve2d->D2(Param, C2d, D2d, D2_2d);
   mySupport->D2(C2d.X(), C2d.Y(), S, dS_du, dS_dv, 
@@ -343,8 +345,8 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Darboux::Copy() const
   gp_Pnt S;
   gp_Vec dS_du, dS_dv, d2S_du, d2S_dv, d2S_duv, 
          d3S_du, d3S_dv, d3S_duuv, d3S_duvv, F, DF, D2F;
-  Handle(Adaptor2d_Curve2d) myCurve2d = static_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetCurve();
-  Handle(Adaptor3d_Surface) mySupport = static_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetSurface();
+  Handle(Adaptor2d_Curve2d) myCurve2d = dynamic_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetCurve();
+  Handle(Adaptor3d_Surface) mySupport = dynamic_cast<Adaptor3d_CurveOnSurface*>(myTrimmed.get())->GetSurface();
 //  Standard_Integer Order;
   myCurve2d->D3(Param, C2d, D2d, D2_2d, D3_2d);
   mySupport->D3(C2d.X(), C2d.Y(), S, dS_du, dS_dv, 
@@ -408,7 +410,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Darboux::Copy() const
   ABiNormal = gp_Vec(0, 0, 0);
   Standard_Real Step = (myTrimmed->LastParameter() - 
                         myTrimmed->FirstParameter()) / Num;
-  Standard_Real Param;
+  Standard_Real Param = NAN;
   for (Standard_Integer i = 0; i <= Num; i++) {
     Param = myTrimmed->FirstParameter() + i*Step;
     if (Param > myTrimmed->LastParameter()) Param = myTrimmed->LastParameter();
old mode 100755 (executable)
new mode 100644 (file)
index 9738fec..8fad1f6
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill_DiscreteTrihedron.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -36,11 +38,11 @@ static const Standard_Real TolConf = Precision::Confusion();
 //=======================================================================
 
 GeomFill_DiscreteTrihedron::GeomFill_DiscreteTrihedron() :
-    myUseFrenet(Standard_False)
+    myFrenet(new GeomFill_Frenet()), myKnots(new TColStd_HSequenceOfReal()), myTrihedrons(new GeomFill_HSequenceOfAx2()), myUseFrenet(Standard_False)
 {
-  myFrenet = new GeomFill_Frenet();
-  myKnots      = new TColStd_HSequenceOfReal();
-  myTrihedrons = new GeomFill_HSequenceOfAx2();
+  
+  
+  
 }
 
 //=======================================================================
@@ -106,7 +108,7 @@ void GeomFill_DiscreteTrihedron::Init()
   //Standard_Real Tol = Precision::Confusion();
   Standard_Integer NbSamples = 10;
 
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   for (i = 1; i <= NbIntervals; i++)
   {
     Standard_Real delta = (Knots(i+1) - Knots(i))/NbSamples;
@@ -122,7 +124,7 @@ void GeomFill_DiscreteTrihedron::Init()
   gp_Pnt Origin(0.,0.,0.), Pnt, SubPnt;
   gp_Vec Tangent;
   gp_Dir TangDir;
-  Standard_Real norm;
+  Standard_Real norm = NAN;
   for (i = 1; i <= myKnots->Length(); i++)
   {
     Standard_Real Param = myKnots->Value(i);
@@ -198,11 +200,11 @@ Standard_Boolean GeomFill_DiscreteTrihedron::D0(const Standard_Real Param,
     Standard_Integer NbSamples = 10;
     gp_Pnt Origin(0.,0.,0.);
     
-    Standard_Integer i;
+    Standard_Integer i = 0;
     //gp_Ax2 PrevAxis;
     //Standard_Real PrevParam;
 
-    Standard_Integer I1, I2;
+    Standard_Integer I1 = 0, I2 = 0;
     I1 = 1;
     I2 = myKnots->Length();
     for (;;)
@@ -358,7 +360,7 @@ void GeomFill_DiscreteTrihedron::Intervals(TColStd_Array1OfReal& T,
   ABiNormal = gp_Vec(0, 0, 0);
   Standard_Real Step = (myTrimmed->LastParameter() - 
                         myTrimmed->FirstParameter()) / Num;
-  Standard_Real Param;
+  Standard_Real Param = NAN;
   for (Standard_Integer i = 0; i <= Num; i++) {
     Param = myTrimmed->FirstParameter() + i*Step;
     if (Param > myTrimmed->LastParameter()) Param = myTrimmed->LastParameter();
index f15c9d59b84efec1382e4e6e7b1b2e9d83ab9b52..a438bda37b3d1088abae5f948c1e070302dac45a 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill_DraftTrihedron.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -45,9 +47,9 @@ static gp_Vec DDeriv(const gp_Vec& F, const gp_Vec& DF, const gp_Vec& D2F)
 //purpose  : Constructor
 //=======================================================================
  GeomFill_DraftTrihedron::GeomFill_DraftTrihedron(const gp_Vec& BiNormal,
-                                                 const Standard_Real Angle)
+                                                 const Standard_Real Angle) : B(BiNormal)
 {
-  B = BiNormal;
+  
   B.Normalize();
   SetAngle(Angle);
 }
@@ -121,7 +123,7 @@ static gp_Vec DDeriv(const gp_Vec& F, const gp_Vec& DF, const gp_Vec& D2F)
 
   myTrimmed->D2(Param, P, T, aux);
 
-  Standard_Real normT, normb;
+  Standard_Real normT = NAN, normb = NAN;
   normT = T.Magnitude();
   T /=  normT;
   DT.SetLinearForm(-(T.Dot(aux)), T, aux);
@@ -175,11 +177,11 @@ Standard_Boolean GeomFill_DraftTrihedron::D2(const Standard_Real Param,
 {  
   gp_Pnt P;
   gp_Vec T, DT, D2T, aux, aux2;
-  Standard_Real dot;
+  Standard_Real dot = NAN;
 
   myTrimmed->D3(Param, P, T, aux, aux2);
 
-  Standard_Real normT, normb;
+  Standard_Real normT = NAN, normb = NAN;
 
   D2T = DDeriv(T, aux, aux2);
   normT = T.Magnitude();
@@ -205,7 +207,7 @@ Standard_Boolean GeomFill_DraftTrihedron::D2(const Standard_Real Param,
   gp_Vec d2v = d2b.Crossed(T) + 2*db.Crossed(DT) + b.Crossed(D2T);
   
 
-  Standard_Real mu = myCos, rac;
+  Standard_Real mu = myCos, rac = NAN;
   rac = Sqrt(1-mu*mu);
 
   Normal  .SetLinearForm( rac, b  ,  mu, v); 
@@ -301,7 +303,7 @@ Standard_Boolean GeomFill_DraftTrihedron::D2(const Standard_Real Param,
 
   Standard_Real Step = (myTrimmed->LastParameter() - 
                         myTrimmed->FirstParameter()) / Num;
-  Standard_Real Param;
+  Standard_Real Param = NAN;
   for (Standard_Integer i = 0; i <= Num; i++) {
     Param = myTrimmed->FirstParameter() + i*Step;
     if (Param > myTrimmed->LastParameter()) Param = myTrimmed->LastParameter();
index 1e51da10025e51a55f70fbbc40673e0088855496..e66f2ef46dbb6933c275c0e105c21ded1b34504a 100644 (file)
@@ -90,8 +90,8 @@ private:
 
 
   gp_Vec B;
-  Standard_Real myAngle;
-  Standard_Real myCos;
+  Standard_Real myAngle{};
+  Standard_Real myCos{};
 
 
 };
index d9570def03d265b075b11c2a27b02f77a35f497a..1879686278628d1953c5b64c1e138bb221c0597f 100644 (file)
@@ -29,6 +29,7 @@
 #include <TColStd_Array1OfInteger.hxx>
 #include <TColStd_Array1OfReal.hxx>
 
+#include <math.h>
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(GeomFill_EvolvedSection,GeomFill_SectionLaw)
 
@@ -41,12 +42,12 @@ static Standard_Boolean Affich = 0;
 #endif
 
 GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C,
-                                                const Handle(Law_Function)& L)
+                                                const Handle(Law_Function)& L) : TLaw(myLaw)
 {
   L->Bounds(First, Last);
   mySection = Handle(Geom_Curve)::DownCast(C->Copy());
   myLaw =  L->Trim(First, Last, 1.e-20);
-  TLaw = myLaw;
+  
   myCurve =  Handle(Geom_BSplineCurve)::DownCast(C);
   if (myCurve.IsNull()) {
     myCurve = GeomConvert::CurveToBSplineCurve(C, Convert_QuasiAngular);
@@ -72,8 +73,8 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C,
                                              TColgp_Array1OfPnt& Poles,
                                              TColStd_Array1OfReal& Weights) 
 {
-  Standard_Real val;
-  Standard_Integer ii, L =  Poles.Length();
+  Standard_Real val = NAN;
+  Standard_Integer ii = 0, L =  Poles.Length();
   val= TLaw->Value(U);
   myCurve->Poles(Poles);
   for (ii=1; ii<=L; ii++) {
@@ -93,8 +94,8 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C,
                                              TColStd_Array1OfReal& Weights,
                                              TColStd_Array1OfReal& DWeights) 
 {
- Standard_Real val, dval;
- Standard_Integer ii, L =  Poles.Length();
+ Standard_Real val = NAN, dval = NAN;
+ Standard_Integer ii = 0, L =  Poles.Length();
  TLaw->D1(U, val, dval);
 
  myCurve->Poles(Poles);
@@ -120,8 +121,8 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C,
                                              TColStd_Array1OfReal& DWeights,
                                              TColStd_Array1OfReal& D2Weights) 
 { 
-  Standard_Real val, dval, d2val;
-  Standard_Integer ii, L =  Poles.Length();
+  Standard_Real val = NAN, dval = NAN, d2val = NAN;
+  Standard_Integer ii = 0, L =  Poles.Length();
   TLaw->D2(U, val, dval, d2val);
   myCurve->Poles(Poles);
   myCurve->Weights(Weights);
@@ -291,8 +292,8 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C,
 //=======================================================
  gp_Pnt GeomFill_EvolvedSection::BarycentreOfSurf() const
 {
-  Standard_Real U = mySection->FirstParameter(), Delta, b;
-  Standard_Integer ii;
+  Standard_Real U = mySection->FirstParameter(), Delta = NAN, b = NAN;
+  Standard_Integer ii = 0;
   gp_Pnt P, Bary;
   
   Delta = ( myCurve->LastParameter() - U ) / 20;
@@ -313,8 +314,8 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C,
 
  Standard_Real GeomFill_EvolvedSection::MaximalSection() const
 {
-  Standard_Real L, val, max, U, Delta;
-  Standard_Integer ii;
+  Standard_Real L = NAN, val = NAN, max = NAN, U = NAN, Delta = NAN;
+  Standard_Integer ii = 0;
   GeomAdaptor_Curve AC (mySection);
   L = GCPnts_AbscissaPoint::Length(AC);
 
@@ -346,7 +347,7 @@ void GeomFill_EvolvedSection::GetMinimalWeight(TColStd_Array1OfReal& Weights) co
 
  Handle(Geom_Curve) GeomFill_EvolvedSection::ConstantSection() const
 {
-  Standard_Real Err, scale;
+  Standard_Real Err = NAN, scale = NAN;
   if (!IsConstant(Err)) throw StdFail_NotDone("The Law is not Constant!");
   gp_Trsf T;
   gp_Pnt P(0, 0, 0);
index 71e48bac875886ebdbd662803803a30e9ca1af3c..f962b7a053570e74f8aa8b758de491d0b47089c0 100644 (file)
@@ -155,8 +155,8 @@ protected:
 private:
 
 
-  Standard_Real First;
-  Standard_Real Last;
+  Standard_Real First{};
+  Standard_Real Last{};
   Handle(Geom_Curve) mySection;
   Handle(Law_Function) myLaw;
   Handle(Law_Function) TLaw;
index ff4f83319b07544c5cd45ce9665c6837a224ac05..effa43b0c1c2f47aaf92a2dbace72171f64d8e99 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill_Frenet.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -150,7 +152,7 @@ Standard_Boolean GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_Curve)& C)
 
  void GeomFill_Frenet::Init()
 {
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   GeomFill_SnglrFunc Func(myCurve);
   Standard_Real TolF = 1.0e-10, Tol = 10*TolF, Tol2 = Tol * Tol,
                 PTol = Precision::PConfusion();
@@ -166,7 +168,7 @@ Standard_Boolean GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_Curve)& C)
   TColStd_Array1OfReal AveFunc(1,  NbIntC2);
   myCurve->Intervals(myC2Disc->ChangeArray1(), GeomAbs_C2);
   Standard_Integer NbControl = 10;
-  Standard_Real Step, Average = 0, modulus;
+  Standard_Real Step = NAN, Average = 0, modulus = NAN;
   gp_Pnt C, C1;
   for(i = 1; i <= NbIntC2; i++) {
     Step = (myC2Disc->Value(i+1) - myC2Disc->Value(i))/NbControl;
@@ -197,7 +199,7 @@ Standard_Boolean GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_Curve)& C)
   TColStd_SequenceOfReal * SeqArray = new TColStd_SequenceOfReal[ NbIntC2 ];
   TColStd_SequenceOfReal SnglSeq;
 //  Standard_Real Value2, preValue=1.e200, t;
-  Standard_Real Value2, t;
+  Standard_Real Value2 = NAN, t = NAN;
   Extrema_ExtPC Ext;
   gp_Pnt Origin(0, 0, 0);
 
@@ -297,7 +299,7 @@ Standard_Boolean GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_Curve)& C)
 // computation of length of singular interval
     mySnglLen = new TColStd_HArray1OfReal(1, mySngl->Length());
     gp_Vec SnglDer, SnglDer2;
-    Standard_Real norm;
+    Standard_Real norm = NAN;
     for(i = 1; i <= mySngl->Length(); i++) {
       Func.D2(mySngl->Value(i), C, SnglDer, SnglDer2);
       if ((norm = SnglDer.Magnitude()) > gp::Resolution())
@@ -315,7 +317,7 @@ Standard_Boolean GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_Curve)& C)
 // we have to merge singular points that have common parts of singular intervals
     TColgp_SequenceOfPnt2d tmpSeq;
     tmpSeq.Append(gp_Pnt2d(mySngl->Value(1), mySnglLen->Value(1)));
-    Standard_Real U11, U12, U21, U22;
+    Standard_Real U11 = NAN, U12 = NAN, U21 = NAN, U22 = NAN;
     for(i = 2; i<= mySngl->Length(); i++) {
       U12 = tmpSeq.Last().X() + tmpSeq.Last().Y();
       U21 = mySngl->Value(i) - mySnglLen->Value(i);
@@ -418,8 +420,8 @@ Standard_Boolean
 {
   const Standard_Real aTol = gp::Resolution();
 
-  Standard_Real norm;
-  Standard_Integer Index;
+  Standard_Real norm = NAN;
+  Standard_Integer Index = 0;
   Standard_Real Delta = 0.;
   if(IsSingular(theParam, Index)) 
     if (SingularD0(theParam, Index, Tangent, Normal, BiNormal, Delta))
@@ -453,7 +455,7 @@ Standard_Boolean
 
     if(isDeriveFound)
       {
-      Standard_Real u;
+      Standard_Real u = NAN;
       
       if(theParam-anUinfium < aDelta)
         u = theParam+aDelta;
@@ -476,7 +478,7 @@ Standard_Boolean
 
       gp_Pnt Ptemp(0.0,0.0,0.0); //(0,0,0)-coordinate
       gp_Pnt P1, P2, P3;
-      Standard_Boolean IsParameterGrown;
+      Standard_Boolean IsParameterGrown = 0;
                 
       if(theParam-anUinfium < 2*aDelta)
         {
@@ -560,7 +562,7 @@ Standard_Boolean
                                       gp_Vec& BiNormal,
                                       gp_Vec& DBiNormal) 
 {
-  Standard_Integer Index;
+  Standard_Integer Index = 0;
   Standard_Real Delta = 0.;
   if(IsSingular(Param, Index)) 
     if (SingularD1(Param, Index, Tangent, DTangent, Normal, DNormal, BiNormal, DBiNormal, Delta))
@@ -614,7 +616,7 @@ Standard_Boolean
                                       gp_Vec& DBiNormal,
                                       gp_Vec& D2BiNormal) 
 {
-  Standard_Integer Index;
+  Standard_Integer Index = 0;
   Standard_Real Delta = 0.;
   if(IsSingular(Param, Index)) 
     if(SingularD2(Param, Index, Tangent, DTangent, D2Tangent, 
@@ -674,7 +676,7 @@ Standard_Boolean
  Standard_Integer GeomFill_Frenet::NbIntervals(const GeomAbs_Shape S) const
 {
   GeomAbs_Shape tmpS = GeomAbs_C0;
-  Standard_Integer NbTrimmed;
+  Standard_Integer NbTrimmed = 0;
   switch (S) {
   case GeomAbs_C0: tmpS = GeomAbs_C2; break;
   case GeomAbs_C1: tmpS = GeomAbs_C3; break;
@@ -706,7 +708,7 @@ Standard_Boolean
                                  const GeomAbs_Shape S) const
 {
   GeomAbs_Shape tmpS = GeomAbs_C0;
-  Standard_Integer NbTrimmed;
+  Standard_Integer NbTrimmed = 0;
   switch (S) {
   case GeomAbs_C0: tmpS = GeomAbs_C2; break;
   case GeomAbs_C1: tmpS = GeomAbs_C3; break;
@@ -743,7 +745,7 @@ Standard_Boolean
   ABiNormal = gp_Vec(0, 0, 0);
   Standard_Real Step = (myTrimmed->LastParameter() - 
                         myTrimmed->FirstParameter()) / Num;
-  Standard_Real Param;
+  Standard_Real Param = NAN;
   for (Standard_Integer i = 0; i <= Num; i++) {
     Param = myTrimmed->FirstParameter() + i*Step;
     if (Param > myTrimmed->LastParameter()) Param = myTrimmed->LastParameter();
@@ -787,7 +789,7 @@ Standard_Boolean
 
 Standard_Boolean GeomFill_Frenet::IsSingular(const Standard_Real U, Standard_Integer& Index) const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   if(!isSngl) return Standard_False;
   for(i = 1; i <= mySngl->Length(); i++) {
     if (Abs(U - mySngl->Value(i)) < mySnglLen->Value(i)) {
@@ -813,12 +815,12 @@ Standard_Boolean GeomFill_Frenet::DoSingular(const Standard_Real U,
                                              Standard_Integer& BNFlag,
                                              Standard_Real& Delta)
 {
-  Standard_Integer i, MaxN = 20;
+  Standard_Integer i = 0, MaxN = 20;
   Delta = 0.;
-  Standard_Real h;
+  Standard_Real h = NAN;
   h = 2*mySnglLen->Value(Index);
 
-  Standard_Real A, B;
+  Standard_Real A = NAN, B = NAN;
   gp_Vec T, N, BN;
   TFlag = 1;
   BNFlag = 1;
@@ -874,7 +876,7 @@ Standard_Boolean GeomFill_Frenet::DoSingular(const Standard_Real U,
                                               gp_Vec& BiNormal,
                                               Standard_Real& Delta)
 {
-  Standard_Integer n, k, TFlag, BNFlag;
+  Standard_Integer n = 0, k = 0, TFlag = 0, BNFlag = 0;
   if(!DoSingular(Param, Index, Tangent, BiNormal, 
                  n, k, TFlag, BNFlag, Delta))
     return Standard_False;
@@ -894,7 +896,7 @@ Standard_Boolean GeomFill_Frenet::DoSingular(const Standard_Real U,
                                               gp_Vec& BiNormal,gp_Vec& DBiNormal,
                                               Standard_Real& Delta) 
 {
-  Standard_Integer n, k, TFlag, BNFlag;
+  Standard_Integer n = 0, k = 0, TFlag = 0, BNFlag = 0;
   if(!DoSingular(Param, Index, Tangent, BiNormal, n, k, TFlag, BNFlag, Delta))
     return Standard_False;
 
@@ -937,7 +939,7 @@ Standard_Boolean GeomFill_Frenet::DoSingular(const Standard_Real U,
                                               gp_Vec& D2BiNormal,
                                               Standard_Real& Delta)
 {
-  Standard_Integer n, k, TFlag, BNFlag;
+  Standard_Integer n = 0, k = 0, TFlag = 0, BNFlag = 0;
   if(!DoSingular(Param, Index, Tangent, BiNormal, n, k, TFlag, BNFlag, Delta)) 
     return Standard_False;
 
index 90983835c1fb0736dee15d59b5fbe66678eafaa2..29f3cdb26c7fffc810441783eb0d86c720db359f 100644 (file)
 // Purpose : Initialisation de la section et de la surface d'arret
 //*******************************************************
 GeomFill_FunctionDraft::GeomFill_FunctionDraft
-  (const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C)
+  (const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C) : TheCurve(C), TheSurface(S)
 {
-  TheCurve = C ;
-  TheSurface = S;
+  
+  
 }
 
 //*******************************************************
@@ -84,7 +84,7 @@ GeomFill_FunctionDraft::GeomFill_FunctionDraft
  Standard_Boolean GeomFill_FunctionDraft::Derivatives(const math_Vector& X,
                                                      math_Matrix& D) 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   gp_Pnt P,P1;
   gp_Vec DP,DP1U,DP1V;
   TheCurve->D1(X(1),P,DP);
@@ -107,7 +107,7 @@ GeomFill_FunctionDraft::GeomFill_FunctionDraft
                                                math_Vector& F,
                                                math_Matrix& D) 
 { 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   gp_Pnt P,P1;
   gp_Vec DP,DP1U,DP1V;
   TheCurve->D1(X(1),P,DP); //derivee de la generatrice
@@ -183,7 +183,7 @@ GeomFill_FunctionDraft::GeomFill_FunctionDraft
 //  gp_Pnt P;
 //  gp_Vec DP,D2P;
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i=1;i<=3;i++)
     {
       D(i,1) = dN.Coord(i)*Sin(teta); //derivee / W
@@ -204,7 +204,7 @@ GeomFill_FunctionDraft::GeomFill_FunctionDraft
   gp_Pnt P;
   gp_Vec DPu,DPv;
   gp_Vec D2Pu, D2Pv, D2Puv;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   TheSurface->D2(X(2), X(3), P, DPu, DPv, D2Pu, D2Pv, D2Puv);
  
index 8097e8225a19c98767dc126dd350e47fcd29fafb..e9d66323258cd1c9eb625a5f506cfc739f05dba4 100644 (file)
@@ -97,7 +97,7 @@ GeomFill_FunctionGuide::GeomFill_FunctionGuide
        First, Last);
   }
   else {
-    Standard_Integer NbPoles, NbKnots, Deg;
+    Standard_Integer NbPoles = 0, NbKnots = 0, Deg = 0;
     TheLaw->SectionShape(NbPoles, NbKnots, Deg);
     TColStd_Array1OfInteger Mult(1,NbKnots);
     TheLaw->Mults( Mult);
@@ -172,7 +172,7 @@ GeomFill_FunctionGuide::GeomFill_FunctionGuide
   TheGuide->D1(X(1),P,DP);
   TheSurface->D1(X(2),X(3),P1,DP1U,DP1V);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i=1;i<=3;i++)
     {
       D(i,1) = DP.Coord(i);  
@@ -197,7 +197,7 @@ GeomFill_FunctionGuide::GeomFill_FunctionGuide
   TheGuide->D1(X(1),P,DP); //derivee de la generatrice
   TheSurface->D1(X(2),X(3),P1,DP1U,DP1V); //derivee de la new surface
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i=1;i<=3;i++)
     { 
       F(i) = P.Coord(i) - P1.Coord(i);
index 57ab6e06f57513e5e369bc9243c571e4f5394d7a..80f3b8ae6979423e2b344b4c53b4b97e199b7eb1 100644 (file)
@@ -46,7 +46,7 @@ void GeomFill_Generator::Perform(const Standard_Real PTol)
   
   // Create the surface.
   
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   Standard_Integer NbUPoles = NbPoles();
   Standard_Integer NbVPoles = mySequence.Length();
   Standard_Integer NbUKnots = NbKnots();
index 2a519c1ba0405dc1b2286c7ec2d3322c5ead1ed3..8d7b97e5e8ad70abf068f3a0e1bbce1a21548911 100644 (file)
@@ -15,6 +15,8 @@
 
 // Created:    Tue Jun 23 15:39:24 1998
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <Approx_CurvlinFunc.hxx>
 #include <GeomAdaptor_Curve.hxx>
@@ -34,16 +36,16 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_GuideTrihedronAC,GeomFill_TrihedronWithGuide
 //function : GuideTrihedron
 //purpose  : Constructor
 //=======================================================================
-GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curve) & guide)
+GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curve) & guide) : myGuideAC(new (Approx_CurvlinFunc) (myGuide,1.e-7)), Lguide(myGuideAC->GetLength()), Orig1(0), Orig2(1)
 {
   myCurve.Nullify();
   myGuide =  guide;
   myTrimG =  guide;
-  myGuideAC = new (Approx_CurvlinFunc) (myGuide,1.e-7);
-  Lguide = myGuideAC->GetLength(); 
+  
+  
   UTol = STol = Precision::PConfusion();
-  Orig1 = 0; // origines pour le cas path multi-edges
-  Orig2 = 1;
+  // origines pour le cas path multi-edges
+  
 }
 
 //=======================================================================
@@ -99,7 +101,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curv
                                                gp_Vec& DBiNormal) 
 { 
 //triedre
-  Standard_Real s, OrigG, tG, dtg
+  Standard_Real s = NAN, OrigG = NAN, tG = NAN, dtg = NAN
  // abscisse curviligne <=> Param
   s = myCurveAC->GetSParameter(Param);
   // parametre <=> s sur theGuide
@@ -188,11 +190,11 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curv
   Standard_Real N2To = To.SquareMagnitude();
   Standard_Real NTG = TG.Magnitude();
   Standard_Real N2Tp = TG.SquareMagnitude();
-  Standard_Real d2tp_dt2, dtg_dt
+  Standard_Real d2tp_dt2 = NAN, dtg_dt = NAN
   dtg_dt = (Orig2-Orig1)*(NTo/NTG)*(Lguide/L);
 
   gp_Vec n(P, PG); // vecteur definissant la normale
-  Standard_Real Norm = n.Magnitude(), ndn;
+  Standard_Real Norm = n.Magnitude(), ndn = NAN;
   //derivee de n par rapport a Param
   gp_Vec dn, d2n;
   dn.SetLinearForm(dtg_dt, TG, -1, To);
@@ -307,7 +309,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curv
 //=======================================================================
  Standard_Integer GeomFill_GuideTrihedronAC::NbIntervals(const GeomAbs_Shape S) const
 {
-  Standard_Integer Nb;
+  Standard_Integer Nb = 0;
   Nb = myCurveAC->NbIntervals(S);
   TColStd_Array1OfReal DiscC(1, Nb+1);
   myCurveAC->Intervals(DiscC, S);
@@ -329,7 +331,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curv
  void GeomFill_GuideTrihedronAC::Intervals(TColStd_Array1OfReal& TT,
                                           const GeomAbs_Shape S) const
 {
-  Standard_Integer Nb, ii;
+  Standard_Integer Nb = 0, ii = 0;
   Nb = myCurveAC->NbIntervals(S);
   TColStd_Array1OfReal DiscC(1, Nb+1);
   myCurveAC->Intervals(DiscC, S);
@@ -355,7 +357,7 @@ void GeomFill_GuideTrihedronAC::SetInterval(const Standard_Real First,
                                            const Standard_Real Last) 
 {
   myTrimmed = myCurve->Trim(First, Last, UTol); 
-  Standard_Real Sf, Sl, U;
+  Standard_Real Sf = NAN, Sl = NAN, U = NAN;
 
   Sf = myCurveAC->GetSParameter(First);
   Sl = myCurveAC->GetSParameter(Last);
@@ -379,8 +381,8 @@ void GeomFill_GuideTrihedronAC::SetInterval(const Standard_Real First,
                                               gp_Vec& ANormal,
                                               gp_Vec& ABiNormal) 
 {
-  Standard_Integer ii;
-  Standard_Real t, Delta = (myCurve->LastParameter() - 
+  Standard_Integer ii = 0;
+  Standard_Real t = NAN, Delta = (myCurve->LastParameter() - 
                            myCurve->FirstParameter())/20.001;
 
   ATangent.SetCoord(0.,0.,0.);
index 993229397d805ca1c6ccf30ba4a7586c3396bb31..169a658cdf13bc9bd18255eff2525125fdb1799a 100644 (file)
@@ -104,7 +104,7 @@ private:
   Handle(Approx_CurvlinFunc) myGuideAC;
   Standard_Real Lguide;
   Handle(Approx_CurvlinFunc) myCurveAC;
-  Standard_Real L;
+  Standard_Real L{};
   Handle(Adaptor3d_Curve) myCurve;
   Standard_Real UTol;
   Standard_Real STol;
index 963054a93549b907c5fcd3ac5b660b6faa852247..6939fe5753c911368b2934fb1cba000f78190460 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill_GuideTrihedronPlan.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -78,14 +80,14 @@ GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d
                                                          X(1,1),  
                                                          XTol(1,1),
                                                          Inf(1,1), Sup(1,1),
-                                                         myStatus(GeomFill_PipeOk)
+                                                         myNbPts(20), frenet(new (GeomFill_Frenet)()), myStatus(GeomFill_PipeOk)
 {
   myCurve.Nullify();
   myGuide = theGuide; // guide
   myTrimG = theGuide;
-  myNbPts = 20;     // nb points pour calculs
+      // nb points pour calculs
   Pole = new (TColgp_HArray2OfPnt2d)(1,1,1,myNbPts);//tab pr stocker Pprime (pt sur guide)
-  frenet = new (GeomFill_Frenet)();
+  
   XTol.Init(1.e-6);
   XTol(1) = myGuide->Resolution(1.e-6);
 }
@@ -101,8 +103,8 @@ GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d
 //  Bnd_Box2d Box;
 //  Box.Update(-0.1, -0.1, 0.1, 0.1); // Taille minimal
   gp_Vec Tangent,Normal,BiNormal;
-  Standard_Integer ii;
-  Standard_Real t, DeltaG, w = 0.;
+  Standard_Integer ii = 0;
+  Standard_Real t = NAN, DeltaG = NAN, w = 0.;
   Standard_Real f = myCurve->FirstParameter();
   Standard_Real l = myCurve->LastParameter();
   
@@ -316,7 +318,7 @@ Standard_Boolean GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_Cu
       BiNormal = Tangent.Crossed(Normal);
 
 // derivee premiere du triedre
-      Standard_Real dedx, dedt, dtg_dt;
+      Standard_Real dedx = NAN, dedt = NAN, dtg_dt = NAN;
       E.Derivative(Res, dedx);
       E.DEDT(Res, To, DTangent, dedt);
       dtg_dt = -dedt/dedx;
@@ -487,7 +489,7 @@ Standard_Boolean GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_Cu
 //=======================================================================
  Standard_Integer GeomFill_GuideTrihedronPlan::NbIntervals(const GeomAbs_Shape S)const
 {
-  Standard_Integer Nb;
+  Standard_Integer Nb = 0;
   GeomAbs_Shape tmpS;
   switch (S) {
   case GeomAbs_C0: tmpS = GeomAbs_C1; break;
@@ -535,8 +537,8 @@ void GeomFill_GuideTrihedronPlan::SetInterval(const Standard_Real First,
                                    gp_Vec& ANormal,
                                    gp_Vec& ABiNormal) 
 {
-  Standard_Integer ii;
-  Standard_Real t, Delta = (myCurve->LastParameter() - 
+  Standard_Integer ii = 0;
+  Standard_Real t = NAN, Delta = (myCurve->LastParameter() - 
                            myCurve->FirstParameter())/20.001;
 
   ATangent.SetCoord(0.,0.,0.);
@@ -564,7 +566,7 @@ void GeomFill_GuideTrihedronPlan::SetInterval(const Standard_Real First,
 {
   if ((myCurve->GetType() == GeomAbs_Line) &&
       (myGuide->GetType() == GeomAbs_Line)) {
-    Standard_Real Angle;
+    Standard_Real Angle = NAN;
     Angle = myCurve->Line().Angle(myGuide->Line());
     if ((Angle<1.e-12) || ((2*M_PI-Angle)<1.e-12) )
       return Standard_True;
@@ -598,8 +600,8 @@ void  GeomFill_GuideTrihedronPlan::Origine(const Standard_Real ,
 void GeomFill_GuideTrihedronPlan::InitX(const Standard_Real Param)
 {
 
-  Standard_Integer Ideb = 1, Ifin =  Pole->RowLength(), Idemi;
-  Standard_Real Valeur, t1, t2;
+  Standard_Integer Ideb = 1, Ifin =  Pole->RowLength(), Idemi = 0;
+  Standard_Real Valeur = NAN, t1 = NAN, t2 = NAN;
 
   
   Valeur = Pole->Value(1, Ideb).X();
index 487cf36e7cba9f9aa75e1cbafc33080bc8be77e9..d2b32c0bcfa5accdc3156ebada9a27f5ecf958d4 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_Line,Standard_Transient)
 //function : GeomFill_Line
 //purpose  : 
 //=======================================================================
-GeomFill_Line::GeomFill_Line()
+GeomFill_Line::GeomFill_Line() : myNbPoints(0)
 {
-  myNbPoints = 0;
+  
 }
 
 
index 6a10e7086fb114906a00ccb9093cbc42f6d9e702..555054858cdd3962f763ae6069b016541aee41dc 100644 (file)
 #include <TColgp_Array1OfVec2d.hxx>
 
 GeomFill_LocFunction::GeomFill_LocFunction(const Handle(GeomFill_LocationLaw)& Law) 
-                                          :V(1,4), DV(1,4), D2V(1,4)
+                                          :myLaw(Law), V(1,4), DV(1,4), D2V(1,4)
 
 {
-  myLaw = Law;
+  
 }
 
  Standard_Boolean GeomFill_LocFunction::D0(const Standard_Real Param,
@@ -36,7 +36,7 @@ GeomFill_LocFunction::GeomFill_LocFunction(const Handle(GeomFill_LocationLaw)& L
                                           const Standard_Real ) 
 {
   gp_Mat aM;
-  Standard_Boolean B;
+  Standard_Boolean B = 0;
   B = myLaw->D0(Param, aM, V.ChangeValue(1));
   V(2).SetXYZ(aM.Column(1));
   V(3).SetXYZ(aM.Column(2));
@@ -53,7 +53,7 @@ GeomFill_LocFunction::GeomFill_LocFunction(const Handle(GeomFill_LocationLaw)& L
   TColgp_Array1OfPnt2d T1(1,1);
   TColgp_Array1OfVec2d T2(1,1);
   gp_Mat aM, aDM;
-  Standard_Boolean B;
+  Standard_Boolean B = 0;
   B = myLaw->D1(Param, aM, V.ChangeValue(1),
                aDM, DV.ChangeValue(1),
                T1, T2);
@@ -77,7 +77,7 @@ GeomFill_LocFunction::GeomFill_LocFunction(const Handle(GeomFill_LocationLaw)& L
   TColgp_Array1OfPnt2d T1(1,1);
   TColgp_Array1OfVec2d T2(1,1), T3(1,1);
   gp_Mat aM, aDM, aD2M;
-  Standard_Boolean B;
+  Standard_Boolean B = 0;
   B = myLaw->D2(Param, aM, V.ChangeValue(1),
                aDM, DV.ChangeValue(1),
                aD2M, D2V.ChangeValue(1),
@@ -105,7 +105,7 @@ GeomFill_LocFunction::GeomFill_LocFunction(const Handle(GeomFill_LocationLaw)& L
                                           Standard_Real& Result,
                                           Standard_Integer& Ier) 
 {
-  Standard_Boolean B;
+  Standard_Boolean B = 0;
   Standard_Real * AddrResult =  &Result;
   const Standard_Real * LocalResult=NULL;
     
index da90acc850035a0a6d27635e3fe1487f80c35b41..bf6bff6c1f7a46b505e9d5227087976ba0d36e0c 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill_LocationDraft.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -48,18 +50,18 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_LocationDraft,GeomFill_LocationLaw)
 //==================================================================
 GeomFill_LocationDraft::GeomFill_LocationDraft
  (const gp_Dir& Direction,
-  const Standard_Real Angle)
+  const Standard_Real Angle) : myDir(Direction), myAngle(Angle), myNbPts(41), Intersec(Standard_False), WithTrans(Standard_False)
 {
-  myDir = Direction; // direction de depouille
+  // direction de depouille
  
-  myAngle = Angle; // angle de depouille (teta prime)
+  // angle de depouille (teta prime)
 
   mySurf.Nullify();
   myLaw = new (GeomFill_DraftTrihedron)(myDir, Angle); // triedre
-  myNbPts = 41; // nb de points utilises pour les calculs
+  // nb de points utilises pour les calculs
   myPoles2d = new (TColgp_HArray1OfPnt2d)(1, 2*myNbPts);
-  Intersec = Standard_False; //intersection avec surface d'arret ?
-  WithTrans = Standard_False;
+  //intersection avec surface d'arret ?
+  
 }
 
 
@@ -146,8 +148,8 @@ GeomFill_LocationDraft::GeomFill_LocationDraft
 
   Intersec = Standard_True;
 
-  Standard_Integer ii,jj
-  Standard_Real f, l, t;
+  Standard_Integer ii = 0,jj = 0
+  Standard_Real f = NAN, l = NAN, t = NAN;
   gp_Pnt P;
   gp_Vec D,T,N,B; 
   Handle(Geom_Line) L;
@@ -213,7 +215,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft
                                             gp_Mat& M,
                                             gp_Vec& V)
 {
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   gp_Vec T,N,B;
   gp_Pnt P;
 
@@ -240,7 +242,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft
                                             gp_Vec& V,
                                             TColgp_Array1OfPnt2d& Poles2d)
 { 
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
 //  gp_Vec D,T,N,B,DT,DN,DB;
   gp_Vec D,T,N,B;
   gp_Pnt P;
@@ -263,7 +265,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft
     Handle(Geom_Line) L = new (Geom_Line) (P, D);
     Handle(GeomAdaptor_Curve) G = new (GeomAdaptor_Curve) (L); 
     
-    Standard_Real t1,t2,Paramt1,t2Param;
+    Standard_Real t1 = NAN,t2 = NAN,Paramt1 = NAN,t2Param = NAN;
     Standard_Real U0=0,V0=0,W0=0;
     
     Standard_Integer ii = 1; 
@@ -349,7 +351,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft
                                             TColgp_Array1OfPnt2d& Poles2d,
                                             TColgp_Array1OfVec2d& DPoles2d) 
 {  
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   gp_Vec D,T,N,B,DT,DN,DB;
   gp_Pnt P;
 
@@ -375,7 +377,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft
       Handle(Geom_Line) L = new (Geom_Line) (P, D);
       Handle(GeomAdaptor_Curve) G = new (GeomAdaptor_Curve) (L); 
   
-      Standard_Real t1,t2,Paramt1,t2Param;
+      Standard_Real t1 = NAN,t2 = NAN,Paramt1 = NAN,t2Param = NAN;
       Standard_Real U0=0,V0=0,W0=0;
 
       Standard_Integer ii = 1; 
@@ -485,7 +487,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft
                                             TColgp_Array1OfVec2d& DPoles2d,
                                             TColgp_Array1OfVec2d& D2Poles2d) 
 {
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   gp_Vec D,T,N,B,DT,DN,DB,D2T,D2N,D2B;
   gp_Pnt P;
 
@@ -513,7 +515,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft
       Handle(Geom_Line) L = new (Geom_Line) (P, D);
       Handle(GeomAdaptor_Curve) G = new (GeomAdaptor_Curve) (L); 
   
-      Standard_Real t1,t2,Paramt1,t2Param;
+      Standard_Real t1 = NAN,t2 = NAN,Paramt1 = NAN,t2Param = NAN;
       Standard_Real U0=0,V0=0,W0=0;
   
       Standard_Integer ii = 1; 
@@ -752,8 +754,8 @@ void GeomFill_LocationDraft::Resolution (const Standard_Integer Index,
  void GeomFill_LocationDraft::GetAverageLaw(gp_Mat& AM,
                                            gp_Vec& AV) 
 {
-  Standard_Integer ii;
-  Standard_Real U, delta;
+  Standard_Integer ii = 0;
+  Standard_Real U = NAN, delta = NAN;
   gp_Vec V1,V2,V3, V;
   
   myLaw->GetAverageLaw(V1, V2, V3);
index ea04ee4ccb9c2c52a49dfc5d5a2bd7e9aadea20d..885ccd3f4acfe6ae11fbb2934f687310d906b517 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomFill_LocationGuide.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -160,19 +162,19 @@ static void InGoodPeriod(const Standard_Real Prec,
 //==================================================================
  GeomFill_LocationGuide::
  GeomFill_LocationGuide (const Handle(GeomFill_TrihedronWithGuide)& Triedre)
-                        : TolRes(1,3), Inf(1,3,0.), Sup(1,3,0.), 
+                        : myLaw(Triedre), myNbPts(21), TolRes(1,3), Inf(1,3,0.), Sup(1,3,0.), 
                          X(1,3), R(1,3), myStatus(GeomFill_PipeOk)
 {
   TolRes.Init(1.e-6);
-  myLaw = Triedre; // loi de triedre
+  // loi de triedre
   mySec.Nullify(); // loi de section
   myCurve.Nullify();
   myFirstS = myLastS = -505e77;
 
-  myNbPts = 21;  // nb points pour les calculs
+   // nb points pour les calculs
   myGuide = myLaw->Guide();  // courbe guide
   if (!myGuide->IsPeriodic()) {
-    Standard_Real f, l, delta;
+    Standard_Real f = NAN, l = NAN, delta = NAN;
     f = myGuide->FirstParameter();
     l = myGuide->LastParameter();
     delta = (l-f)/100;
@@ -218,10 +220,10 @@ static void InGoodPeriod(const Standard_Real Prec,
 //  gp_Pnt P,P1,P2;
   gp_Pnt P;
   gp_Vec T,N,B;
-  Standard_Integer ii, Deg;
-  Standard_Boolean isconst, israt=Standard_False;
-  Standard_Real t, v,w, OldAngle=0, Angle, DeltaG, Diff;
-  Standard_Real CurAngle =  PrecAngle, a1/*, a2*/;
+  Standard_Integer ii = 0, Deg = 0;
+  Standard_Boolean isconst = 0, israt=Standard_False;
+  Standard_Real t = NAN, v = NAN,w = NAN, OldAngle=0, Angle = NAN, DeltaG = NAN, Diff = NAN;
+  Standard_Real CurAngle =  PrecAngle, a1 = NAN/*, a2*/;
   gp_Pnt2d p1,p2;
   Handle(Geom_SurfaceOfRevolution) Revol; // surface de revolution
   Handle(GeomAdaptor_Surface) Pl; // = Revol
@@ -235,13 +237,13 @@ static void InGoodPeriod(const Standard_Real Prec,
   Standard_Real U=0, UPeriod=0;  
   Standard_Real f = myCurve->FirstParameter();
   Standard_Real l = myCurve->LastParameter();
-  Standard_Boolean Ok, uperiodic =  mySec->IsUPeriodic();
+  Standard_Boolean Ok = 0, uperiodic =  mySec->IsUPeriodic();
 
   DeltaG = (myGuide->LastParameter() - myGuide->FirstParameter())/5;
   Handle(Geom_Curve) mySection;
   Standard_Real Tol =1.e-9;
 
-  Standard_Integer NbPoles, NbKnots;
+  Standard_Integer NbPoles = 0, NbKnots = 0;
   mySec->SectionShape(NbPoles, NbKnots, Deg);
 
 
@@ -266,7 +268,7 @@ static void InGoodPeriod(const Standard_Real Prec,
   }
 
    // Bornes de calculs
-  Standard_Real Delta;
+  Standard_Real Delta = NAN;
 //  Standard_Integer bid1, bid2, NbK; 
   Delta =  myGuide->LastParameter() - myGuide->FirstParameter();
   Inf(1) =  myGuide->FirstParameter() - Delta/10;
@@ -511,7 +513,7 @@ static void InGoodPeriod(const Standard_Real Prec,
 //==================================================================
  Handle(GeomFill_LocationLaw) GeomFill_LocationGuide::Copy() const
 {  
-  Standard_Real la;
+  Standard_Real la = NAN;
   Handle(GeomFill_TrihedronWithGuide) L;
   L = Handle(GeomFill_TrihedronWithGuide)::DownCast(myLaw->Copy());
   Handle(GeomFill_LocationGuide) copy = new 
@@ -532,7 +534,7 @@ static void InGoodPeriod(const Standard_Real Prec,
 //==================================================================
 Standard_Boolean GeomFill_LocationGuide::SetCurve(const Handle(Adaptor3d_Curve)& C) 
 {
-  Standard_Real LastAngle;
+  Standard_Real LastAngle = NAN;
   myCurve = C;
   myTrimmed = C;
 
@@ -579,7 +581,7 @@ Standard_Boolean GeomFill_LocationGuide::SetCurve(const Handle(Adaptor3d_Curve)&
                                             gp_Mat& M,
                                             gp_Vec& V)
 {
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   gp_Vec T,N,B;
   gp_Pnt P;
 
@@ -653,7 +655,7 @@ Standard_Boolean GeomFill_LocationGuide::SetCurve(const Handle(Adaptor3d_Curve)&
 { 
   gp_Vec T, N, B;
   gp_Pnt P;
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
 
   myCurve->D0(Param, P);
   V.SetXYZ(P.XYZ());
@@ -733,7 +735,7 @@ Standard_Boolean GeomFill_LocationGuide::SetCurve(const Handle(Adaptor3d_Curve)&
   gp_Vec T, N, B, DT, DN, DB;
 //  gp_Pnt P, P0;
   gp_Pnt P;
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
 
   myCurve->D1(Param, P, DV);
   V.SetXYZ(P.XYZ());
@@ -901,7 +903,7 @@ Standard_Boolean GeomFill_LocationGuide::D2(const Standard_Real Param,
 //  gp_Vec T0, N0, B0, T1, N1, B1;
 //  gp_Pnt P, P0, P1;
   gp_Pnt P;
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
 
   myCurve->D2(Param, P, DV, D2V);
   V.SetXYZ(P.XYZ());
@@ -1177,7 +1179,7 @@ Standard_Boolean GeomFill_LocationGuide::D2(const Standard_Real Param,
  Standard_Integer GeomFill_LocationGuide::NbIntervals
  (const GeomAbs_Shape S) const
 {
-  Standard_Integer Nb_Sec, Nb_Law;
+  Standard_Integer Nb_Sec = 0, Nb_Law = 0;
   Nb_Sec  =  myTrimmed->NbIntervals(S);
   Nb_Law  =  myLaw->NbIntervals(S);
 
@@ -1206,7 +1208,7 @@ Standard_Boolean GeomFill_LocationGuide::D2(const Standard_Real Param,
  void GeomFill_LocationGuide::Intervals(TColStd_Array1OfReal& T,
                                        const GeomAbs_Shape S) const
 {
-   Standard_Integer Nb_Sec, Nb_Law;
+   Standard_Integer Nb_Sec = 0, Nb_Law = 0;
   Nb_Sec  =  myTrimmed->NbIntervals(S);
   Nb_Law  =  myLaw->NbIntervals(S);
 
@@ -1304,8 +1306,8 @@ void GeomFill_LocationGuide::Resolution (const Standard_Integer ,
  void GeomFill_LocationGuide::GetAverageLaw(gp_Mat& AM,
                                            gp_Vec& AV) 
 {
-  Standard_Integer ii;
-  Standard_Real U, delta;
+  Standard_Integer ii = 0;
+  Standard_Real U = NAN, delta = NAN;
   gp_Vec V, V1, V2, V3;
   
   myLaw->GetAverageLaw(V1, V2, V3);
@@ -1377,8 +1379,8 @@ void GeomFill_LocationGuide::Resolution (const Standard_Integer ,
 void GeomFill_LocationGuide::InitX(const Standard_Real Param)
 {
 
-  Standard_Integer Ideb = 1, Ifin =  myPoles2d->RowLength(), Idemi;
-  Standard_Real Valeur, t1, t2;
+  Standard_Integer Ideb = 1, Ifin =  myPoles2d->RowLength(), Idemi = 0;
+  Standard_Real Valeur = NAN, t1 = NAN, t2 = NAN;
 
   
   Valeur = myPoles2d->Value(1, Ideb).X();
@@ -1410,7 +1412,7 @@ void GeomFill_LocationGuide::InitX(const Standard_Real Param)
   t2 = myPoles2d->Value(1,Ifin).X();
   Standard_Real diff = t2-t1;
 
-  Standard_Real W1, W2;
+  Standard_Real W1 = NAN, W2 = NAN;
   W1 = myPoles2d->Value(1,Ideb).Coord(2);
   W2 =  myPoles2d->Value(1,Ifin).Coord(2);
   const gp_Pnt2d& P1 = myPoles2d->Value(2, Ideb);
@@ -1459,8 +1461,8 @@ GeomFill_PipeError GeomFill_LocationGuide::ComputeAutomaticLaw(Handle(TColgp_HAr
 {
   gp_Pnt P;
   gp_Vec T,N,B;
-  Standard_Integer ii;
-  Standard_Real t;
+  Standard_Integer ii = 0;
+  Standard_Real t = NAN;
 
   GeomFill_PipeError theStatus = GeomFill_PipeOk;
 
index 06dceceb2b747a3d6fb3eb1f9c6111b6b136db84..4da91f5821e735ba8f84d59c7ef1ecfe50bb4743 100644 (file)
@@ -190,11 +190,11 @@ private:
   Standard_Boolean rotation;
   Standard_Real OrigParam1;
   Standard_Real OrigParam2;
-  Standard_Real Uf;
-  Standard_Real Ul;
+  Standard_Real Uf{};
+  Standard_Real Ul{};
   Standard_Real myFirstS;
   Standard_Real myLastS;
-  Standard_Real ratio;
+  Standard_Real ratio{};
   Standard_Boolean WithTrans;
   gp_Mat Trans;
   math_Vector TolRes;
index 9fd91d3fcab731cd4652e6fe55c987361f805086..1ff941107a8f37950a1e12acd7747fee1a34006a 100644 (file)
@@ -43,6 +43,7 @@
 #include <TColStd_Array1OfInteger.hxx>
 #include <TColStd_Array1OfReal.hxx>
 
+#include <math.h>
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(GeomFill_NSections,GeomFill_SectionLaw)
 
@@ -164,7 +165,7 @@ static void ResultEval(const Handle(Geom_BSplineSurface)& surf,
   //  les poles
   Standard_Integer Psize = Cdim * NbP;
   TColStd_Array1OfReal SPoles(1,Psize);
-  Standard_Integer ii, jj, ipole=1;
+  Standard_Integer ii = 0, jj = 0, ipole=1;
   for (jj=1;jj<=NbP;jj++) {
     for (ii=1;ii<=surf->NbUPoles();ii++) {
       SPoles(ipole) = surf->Pole(ii,jj).X();
@@ -200,13 +201,13 @@ static void ResultEval(const Handle(Geom_BSplineSurface)& surf,
 //purpose  : 
 //=======================================================================
 
-GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC)
+GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC) : mySections(NC), UFirst(0.), ULast(1.), VFirst(0.), VLast(1.)
 {
-  mySections = NC;
-  UFirst = 0.;
-  ULast = 1.;
-  VFirst = 0.;
-  VLast = 1.;
+  
+  
+  
+  
+  
   myRefSurf.Nullify();
   ComputeSurface();
 }
@@ -217,14 +218,14 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC)
 //=======================================================================
 
 GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
-                                      const TColStd_SequenceOfReal& NP)
+                                      const TColStd_SequenceOfReal& NP) : mySections(NC), myParams(NP), UFirst(0.), ULast(1.), VFirst(0.), VLast(1.)
 {
-  mySections = NC;
-  myParams = NP;
-  UFirst = 0.;
-  ULast = 1.;
-  VFirst = 0.;
-  VLast = 1.;
+  
+  
+  
+  
+  
+  
   myRefSurf.Nullify();
   ComputeSurface();
 }
@@ -236,14 +237,14 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
 GeomFill_NSections::GeomFill_NSections (const TColGeom_SequenceOfCurve& theNC,
                                         const TColStd_SequenceOfReal& theNP,
                                         const Standard_Real theUF,
-                                        const Standard_Real theUL)
+                                        const Standard_Real theUL) : mySections(theNC), myParams(theNP), UFirst(theUF), ULast(theUL), VFirst(0.0), VLast(1.0)
 {
-  mySections = theNC;
-  myParams = theNP;
-  UFirst = theUF;
-  ULast = theUL;
-  VFirst = 0.0;
-  VLast = 1.0;
+  
+  
+  
+  
+  
+  
   myRefSurf.Nullify();
   ComputeSurface();
 }
@@ -258,14 +259,14 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
                                       const Standard_Real UF,
                                       const Standard_Real UL,
                                       const Standard_Real VF,
-                                      const Standard_Real VL)
+                                      const Standard_Real VL) : mySections(NC), myParams(NP), UFirst(UF), ULast(UL), VFirst(VF), VLast(VL)
 {
-  mySections = NC;
-  myParams = NP;
-  UFirst = UF;
-  ULast = UL;
-  VFirst = VF;
-  VLast = VL;
+  
+  
+  
+  
+  
+  
   myRefSurf.Nullify();
   ComputeSurface();
 }
@@ -282,16 +283,16 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
                                       const Standard_Real UL,
                                       const Standard_Real VF,
                                       const Standard_Real VL,
-                                      const Handle(Geom_BSplineSurface)& Surf)
+                                      const Handle(Geom_BSplineSurface)& Surf) : mySections(NC), myTrsfs(Trsfs), myParams(NP), UFirst(UF), ULast(UL), VFirst(VF), VLast(VL), myRefSurf(Surf)
 {
-  mySections = NC;
-  myTrsfs = Trsfs;
-  myParams = NP;
-  UFirst = UF;
-  ULast = UL;
-  VFirst = VF;
-  VLast = VL;
-  myRefSurf = Surf;
+  
+  
+  
+  
+  
+  
+  
+  
   ComputeSurface();
 }
 
@@ -312,7 +313,7 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
     TColStd_Array1OfReal weights(1,mySurface->NbUPoles());
     Curve->Poles(poles);
     Curve->Weights(weights);
-    Standard_Integer ii, L =  Poles.Length();
+    Standard_Integer ii = 0, L =  Poles.Length();
     for (ii=1; ii<=L; ii++) {
       Poles(ii).SetXYZ(poles(ii).XYZ());
       Weights(ii) = weights(ii);
@@ -356,10 +357,10 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
   }
 
 
-  Standard_Real ww, EpsW = 10*Precision::PConfusion();
+  Standard_Real ww = NAN, EpsW = 10*Precision::PConfusion();
   Standard_Boolean NullWeight = Standard_False;
   if (!rational) DWeights.Init(0.);
-  Standard_Integer indice = 1, ii;
+  Standard_Integer indice = 1, ii = 0;
 
   //  recopie des poles du resultat sous forme de points 3D et de poids
   for (ii=1; ii<=L && (!NullWeight) ; ii++) {
@@ -449,10 +450,10 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
   }
 
 
-  Standard_Real ww, EpsW = 10*Precision::PConfusion();
+  Standard_Real ww = NAN, EpsW = 10*Precision::PConfusion();
   Standard_Boolean NullWeight = Standard_False;
   if (!rational) D2Weights.Init(0.);
-  Standard_Integer indice = 1, ii;
+  Standard_Integer indice = 1, ii = 0;
 
   //  recopie des poles du resultat sous forme de points 3D et de poids
   for (ii=1; ii<=L && (!NullWeight) ; ii++) {
@@ -536,7 +537,7 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
   if (myRefSurf.IsNull()) {
 
     Standard_Real myPres3d = 1.e-06;
-    Standard_Integer i,j,jdeb=1,jfin=mySections.Length();
+    Standard_Integer i = 0,j = 0,jdeb=1,jfin=mySections.Length();
     
     if (jfin <= jdeb)
     {
@@ -619,11 +620,11 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
   else {
   
     // segmentation de myRefSurf
-    Standard_Real Ui1, Ui2, V0, V1;
+    Standard_Real Ui1 = NAN, Ui2 = NAN, V0 = NAN, V1 = NAN;
     BS = Handle(Geom_BSplineSurface)::DownCast(myRefSurf->Copy());
     Ui1 = UFirst;
     Ui2 = ULast;
-    Standard_Integer i1, i2;
+    Standard_Integer i1 = 0, i2 = 0;
     myRefSurf->LocateU( Ui1, Precision::PConfusion(), i1, i2 );
     if (Abs(Ui1 - myRefSurf->UKnot(i1)) <= Precision::PConfusion())
       Ui1 = myRefSurf->UKnot(i1);
@@ -808,8 +809,8 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
   if (mySurface.IsNull())
     return Bary;
 
-  Standard_Integer ii,jj;
-  Standard_Real U0, U1, V0, V1;
+  Standard_Integer ii = 0,jj = 0;
+  Standard_Real U0 = NAN, U1 = NAN, V0 = NAN, V1 = NAN;
   mySurface->Bounds(U0,U1,V0,V1);
   Standard_Real V = V0, DeltaV = ( V1 - V0 ) / 20;
   Standard_Real U = U0, DeltaU = ( U1 - U0 ) / 20;
@@ -830,8 +831,8 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
 //=======================================================
  Standard_Real GeomFill_NSections::MaximalSection() const
 {
-  Standard_Real L, Lmax=0.;
-  Standard_Integer ii;
+  Standard_Real L = NAN, Lmax=0.;
+  Standard_Integer ii = 0;
   for (ii=1; ii <=mySections.Length(); ii++) {
     GeomAdaptor_Curve AC (mySections(ii));
     L = GCPnts_AbscissaPoint::Length(AC);
@@ -854,7 +855,7 @@ void GeomFill_NSections::GetMinimalWeight(TColStd_Array1OfReal& Weights) const
                      NbV = mySurface->NbVPoles();
     TColStd_Array2OfReal WSurf(1,NbU,1,NbV);
     mySurface->Weights(WSurf);
-    Standard_Integer i,j;
+    Standard_Integer i = 0,j = 0;
     for (i=1;i<=NbU;i++) {
       Standard_Real min = WSurf(i,1);
       for (j=2;j<=NbV;j++) {
@@ -891,7 +892,7 @@ void GeomFill_NSections::GetMinimalWeight(TColStd_Array1OfReal& Weights) const
         gp_Circ C1 = AC1.Circle();
         gp_Circ C2 = AC2.Circle();
         Standard_Real Tol = 1.e-7;
-        Standard_Boolean samedir, samerad, samepos;
+        Standard_Boolean samedir = 0, samerad = 0, samepos = 0;
         samedir = (C1.Axis().IsParallel(C2.Axis(),1.e-4));
         samerad = (Abs(C1.Radius()-C2.Radius())<Tol);
         samepos = (C1.Location().Distance(C2.Location())<Tol);
@@ -905,7 +906,7 @@ void GeomFill_NSections::GetMinimalWeight(TColStd_Array1OfReal& Weights) const
         gp_Lin L1 = AC1.Line();
         gp_Lin L2 = AC2.Line(); 
         Standard_Real Tol = 1.e-7;
-        Standard_Boolean samedir, samelength, samepos;
+        Standard_Boolean samedir = 0, samelength = 0, samepos = 0;
         samedir = (L1.Direction().IsParallel(L2.Direction(),1.e-4));
         gp_Pnt P11 = AC1.Value(AC1.FirstParameter()),
                P12 = AC1.Value(AC1.LastParameter()),
@@ -1007,7 +1008,7 @@ void GeomFill_NSections::GetMinimalWeight(TColStd_Array1OfReal& Weights) const
 //=======================================================
  Handle(Geom_Curve) GeomFill_NSections::CirclSection(const Standard_Real V) const
 {
-  Standard_Real Err;
+  Standard_Real Err = NAN;
   if (!IsConicalLaw(Err)) throw StdFail_NotDone("The Law is not Conical!");
 
   GeomAdaptor_Curve AC1(mySections(1));
index 2f9c759747ef742e884007f4919213eee54a1a89..3d2a51a53119890a7d5b0e53266a65b30890ad63 100644 (file)
@@ -69,6 +69,7 @@
 #include <TColGeom_SequenceOfCurve.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 
+#include <math.h>
 #include <stdio.h>
 #ifdef OCCT_DEBUG
 static Standard_Boolean Affich = Standard_False;
@@ -87,9 +88,9 @@ static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1,
   Standard_Boolean no_sing = Standard_True;
   Seq2.Clear();
 
-  Handle(Geom_Curve) C1 = Seq1.Value(1);
+  const Handle(Geom_Curve)& C1 = Seq1.Value(1);
   Standard_Real f = C1->FirstParameter(), l = C1->LastParameter();
-  Standard_Integer iP, NP = 21;
+  Standard_Integer iP = 0, NP = 21;
   TColgp_Array1OfPnt Tab(1,NP);
   Standard_Real u = f, h = Abs(f-l) / 20.;
   for (iP=1;iP<=NP;iP++) {
@@ -99,14 +100,14 @@ static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1,
   }
   gp_Ax2 AxeRef, Axe;
   gp_Pnt Pos;
-  Standard_Boolean sing;
+  Standard_Boolean sing = 0;
   GeomLib::AxeOfInertia(Tab,AxeRef,sing);
 
   // si la section est une droite, ca ne marche pas
   if (sing) no_sing = Standard_False;
 
   Pos = AxeRef.Location();
-  Standard_Real alpha1, alpha2, alpha3;
+  Standard_Real alpha1 = NAN, alpha2 = NAN, alpha3 = NAN;
   gp_Pnt P1, P2;
   u = (f+l-h)/2 - h;
   C1->D0(u,P1);
@@ -125,7 +126,7 @@ static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1,
 
   for (Standard_Integer iseq=2; iseq<=Seq1.Length(); iseq++) {
     // discretisation de C2
-    Handle(Geom_Curve) C2 = Seq1.Value(iseq);
+    const Handle(Geom_Curve)& C2 = Seq1.Value(iseq);
     f = C2->FirstParameter();
     l = C2->LastParameter();
     u = f;
@@ -140,7 +141,7 @@ static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1,
     if (sing) no_sing = Standard_False;
 
     Pos = Axe.Location();
-    Standard_Real beta1, beta2, beta3;
+    Standard_Real beta1 = NAN, beta2 = NAN, beta3 = NAN;
     u = (f+l-h)/2 - h;
     C2->D0(u,P1);
     u += h;
@@ -363,7 +364,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path,
 // rotat : vrai si on veu la rotation false sinon
 // triedre : AC pour absc. curv. ou P pour plan ortho
 {
-  Standard_Real angle;
+  Standard_Real angle = NAN;
   myAdpPath = new (GeomAdaptor_Curve) 
     (Handle(Geom_Curve)::DownCast(Path->Copy()));
 
@@ -678,7 +679,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path,
     TColStd_SequenceOfReal SeqP;
     SeqC.Clear();
     SeqP.Clear();
-    Standard_Integer i ;
+    Standard_Integer i = 0 ;
     for ( i = 1; i<=NSections.Length(); i++) {
       GeomFill_SectionPlacement Place(myLoc, NSections(i));
       Place.Perform(Precision::Confusion());
@@ -713,7 +714,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path,
     // creation de la NSections
     Standard_Real first = Path->FirstParameter(),
                   last = Path->LastParameter();
-    Standard_Real deb,fin;
+    Standard_Real deb = NAN,fin = NAN;
     deb = SeqC.First()->FirstParameter();
     fin = SeqC.First()->LastParameter();
     mySec = new (GeomFill_NSections) (SeqC,SeqP,deb,fin,first,last);
@@ -769,7 +770,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path,
    if (CheckSense(SeqC, NewSeq)) SeqC = NewSeq;
 
    // creation of the NSections
-   Standard_Real deb, fin;
+   Standard_Real deb = NAN, fin = NAN;
    deb = SeqC.First()->FirstParameter();
    fin = SeqC.First()->LastParameter();
    mySec = new (GeomFill_NSections) (SeqC, SeqP, deb, fin, first, last);
@@ -1125,8 +1126,8 @@ void GeomFill_Pipe::ApproxSurf(const Standard_Boolean WithParameters) {
     //throw StdFail_NotDone("Pipe : App not done");
   }
   else {
-    Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots
-    NbVKnots;
+    Standard_Integer UDegree = 0, VDegree = 0, NbUPoles = 0, NbVPoles = 0, NbUKnots = 0
+    NbVKnots = 0;
     App.SurfShape(UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots);
     
     mySurface = new Geom_BSplineSurface(App.SurfPoles(),
@@ -1137,7 +1138,7 @@ void GeomFill_Pipe::ApproxSurf(const Standard_Boolean WithParameters) {
                                        App.SurfVMults(),
                                        App.UDegree(),
                                        App.VDegree());
-    Standard_Real t2d;
+    Standard_Real t2d = NAN;
     App.TolReached(myError, t2d);
     myStatus = GeomFill_PipeOk;
   }
index 4a88b3e16835a3d6b8e573d8b3601f67a469b1df..db6867981c6a6638e7dfc70b6b2eda65acefc087 100644 (file)
@@ -277,18 +277,18 @@ private:
   Standard_EXPORT Standard_Boolean KPartT4();
 
   GeomFill_PipeError myStatus;//!< Execution status
-  Standard_Real myRadius;
-  Standard_Real myError;
+  Standard_Real myRadius{};
+  Standard_Real myError{};
   Handle(Adaptor3d_Curve) myAdpPath;
   Handle(Adaptor3d_Curve) myAdpFirstSect;
   Handle(Adaptor3d_Curve) myAdpLastSect;
   Handle(Geom_Surface) mySurface;
   Handle(GeomFill_LocationLaw) myLoc;
   Handle(GeomFill_SectionLaw) mySec;
-  Standard_Integer myType;
+  Standard_Integer myType{};
   Standard_Boolean myExchUV;
   Standard_Boolean myKPart;
-  Standard_Boolean myPolynomial;
+  Standard_Boolean myPolynomial{};
 };
 
 
index 5c854e6d905ab2349d18982a1a3f75574c64d564..1dd9bc9edf459bbd92986d2900f15759b7891d67 100644 (file)
 GeomFill_PlanFunc::GeomFill_PlanFunc(const gp_Pnt& theP,
                                      const gp_Vec& theV,
                                      const Handle(Adaptor3d_Curve)& theC) :
-                                     myCurve(theC)
+                                     myPnt(theP.XYZ()), myVec(theV.XYZ()), myCurve(theC)
 {
-  myPnt = theP.XYZ();
-  myVec = theV.XYZ();
+  
+  
 }
 
 
index 8bbb524127b06fc9ec050646340c5b092f41f54b..b98a8f00bde7ff5ec18a21342cd649f74dc40e2c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Convert_CompPolynomialToPoles.hxx>
 #include <GeomFill_PolynomialConvertor.hxx>
 #include <gp_Mat.hxx>
@@ -41,8 +43,8 @@ Standard_Boolean GeomFill_PolynomialConvertor::Initialized() const
 void GeomFill_PolynomialConvertor::Init() 
 {
   if (myinit) return; //On n'initialise qu'une fois
-  Standard_Integer ii, jj;
-  Standard_Real terme;
+  Standard_Integer ii = 0, jj = 0;
+  Standard_Real terme = NAN;
   math_Matrix H(1,Ordre, 1,Ordre), B(1,Ordre, 1,Ordre);
   Handle(TColStd_HArray1OfReal) 
     Coeffs = new (TColStd_HArray1OfReal) (1, Ordre*Ordre),  
@@ -105,9 +107,9 @@ void GeomFill_PolynomialConvertor::Section(const gp_Pnt& FirstPnt,
 {
   math_Vector Vx(1, Ordre), Vy(1, Ordre);
   math_Vector Px(1, Ordre), Py(1, Ordre);
-  Standard_Integer ii;
+  Standard_Integer ii = 0;
   Standard_Real Cos_b = Cos(Angle), Sin_b = Sin(Angle);
-  Standard_Real beta, beta2, beta3;
+  Standard_Real beta = NAN, beta2 = NAN, beta3 = NAN;
   gp_Vec V1(Center, FirstPnt), V2;
   V2 =  Dir^V1;
   beta = Angle/2;
@@ -156,9 +158,9 @@ void GeomFill_PolynomialConvertor::Section(const gp_Pnt& FirstPnt,
               DVx(1, Ordre), DVy(1, Ordre);
   math_Vector Px(1, Ordre), Py(1, Ordre),
               DPx(1, Ordre), DPy(1, Ordre);
-  Standard_Integer ii;
+  Standard_Integer ii = 0;
   Standard_Real Cos_b = Cos(Angle), Sin_b = Sin(Angle);
-  Standard_Real beta, beta2, beta3, bprim;
+  Standard_Real beta = NAN, beta2 = NAN, beta3 = NAN, bprim = NAN;
   gp_Vec V1(Center, FirstPnt), V1Prim, V2;
   V2 =  Dir^V1;
   beta = Angle/2;
@@ -243,9 +245,9 @@ void GeomFill_PolynomialConvertor::Section(const gp_Pnt& FirstPnt,
               DPx(1, Ordre), DPy(1, Ordre),
               D2Px(1, Ordre), D2Py(1, Ordre);
 
-  Standard_Integer ii;
-  Standard_Real aux, Cos_b = Cos(Angle), Sin_b = Sin(Angle);
-  Standard_Real beta, beta2, beta3, bprim, bprim2, bsecn;
+  Standard_Integer ii = 0;
+  Standard_Real aux = NAN, Cos_b = Cos(Angle), Sin_b = Sin(Angle);
+  Standard_Real beta = NAN, beta2 = NAN, beta3 = NAN, bprim = NAN, bprim2 = NAN, bsecn = NAN;
   gp_Vec V1(Center, FirstPnt), V1Prim, V1Secn, V2;
   V2 =  Dir^V1;
   beta = Angle/2;
index 8a9c143b6a4b4657982b64b2736c49d70a3c9056..0a6551ed44fe23a0b72a383023bdba4289a1be42 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <Geom_Conic.hxx>
 #include <Geom_Curve.hxx>
@@ -35,7 +37,7 @@ static void UnifyByInsertingAllKnots(TColGeom_SequenceOfCurve& theCurves,
   // inserting in the first curve the knot-vector of all the others.
   Handle(Geom_BSplineCurve) C = Handle(Geom_BSplineCurve)::DownCast(theCurves(1));
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for ( i = 2; i <= theCurves.Length(); i++) {
     Handle(Geom_BSplineCurve) Ci = 
       Handle(Geom_BSplineCurve)::DownCast(theCurves(i));
@@ -64,7 +66,7 @@ static void UnifyByInsertingAllKnots(TColGeom_SequenceOfCurve& theCurves,
     if ( Ci->IsRational() ) {
       Standard_Integer np = Ci->NbPoles();
       Standard_Real sigma = 0.;
-      Standard_Integer j;
+      Standard_Integer j = 0;
       for ( j = 1; j <= np; j++) {
        sigma += Ci->Weight(j);
       }
@@ -83,7 +85,7 @@ static void UnifyByInsertingAllKnots(TColGeom_SequenceOfCurve& theCurves,
 //=======================================================================
 static void UnifyBySettingMiddleKnots(TColGeom_SequenceOfCurve& theCurves)
 {
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   
   Handle(Geom_BSplineCurve) C = Handle(Geom_BSplineCurve)::DownCast(theCurves(1));
   
@@ -119,10 +121,10 @@ static void UnifyBySettingMiddleKnots(TColGeom_SequenceOfCurve& theCurves)
 //purpose  : 
 //=======================================================================
 
-GeomFill_Profiler::GeomFill_Profiler()
+GeomFill_Profiler::GeomFill_Profiler() : myIsDone(Standard_False), myIsPeriodic(Standard_True)
 {
-  myIsDone = Standard_False;
-  myIsPeriodic = Standard_True;
+  
+  
 }
 
 
@@ -177,11 +179,11 @@ void GeomFill_Profiler::AddCurve(const Handle(Geom_Curve)& Curve)
 
 void GeomFill_Profiler::Perform(const Standard_Real PTol)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 //  Standard_Integer myDegree = 0, myNbPoles = 0;
   Standard_Integer myDegree = 0;
   Handle(Geom_BSplineCurve) C;
-  Standard_Real U1, U2, UFirst=0, ULast=0;
+  Standard_Real U1 = NAN, U2 = NAN, UFirst=0, ULast=0;
   Standard_Real EcartMax = 0.;
 
   for ( i = 1; i <= mySequence.Length(); i++) {
index 555cdcb971ca30065fde297eb3025ef17a4f9c2b..9ea4cc3a6e9265db60a4b7ea7194a7e3dde46cbf 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Convert_CompPolynomialToPoles.hxx>
 #include <GeomFill_QuasiAngularConvertor.hxx>
 #include <gp_Mat.hxx>
@@ -69,8 +71,8 @@ Standard_Boolean GeomFill_QuasiAngularConvertor::Initialized() const
 void GeomFill_QuasiAngularConvertor::Init() 
 {
   if (myinit) return; //On n'initialise qu'une fois
-  Standard_Integer ii, jj, Ordre=7;
-  Standard_Real terme;
+  Standard_Integer ii = 0, jj = 0, Ordre=7;
+  Standard_Real terme = NAN;
   TColStd_Array1OfReal Coeffs(1, Ordre*Ordre), TrueInter(1,2), Inter(1,2);
   Handle(TColStd_HArray2OfReal) 
     Poles1d = new (TColStd_HArray2OfReal) (1, Ordre, 1, Ordre);
@@ -118,9 +120,9 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
                                       TColgp_Array1OfPnt& Poles,
                                       TColStd_Array1OfReal& Weights) 
 { 
-  Standard_Real b, b2, c, c2,tan_b;
-  Standard_Integer ii;
-  Standard_Real beta, beta2, beta3, beta4, beta5, beta6, wi;
+  Standard_Real b = NAN, b2 = NAN, c = NAN, c2 = NAN,tan_b = NAN;
+  Standard_Integer ii = 0;
+  Standard_Real beta = NAN, beta2 = NAN, beta3 = NAN, beta4 = NAN, beta5 = NAN, beta6 = NAN, wi = NAN;
   gp_XYZ aux;
   gp_Mat Rot;
   // Calcul de la transformation
@@ -208,15 +210,15 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
   Standard_Integer Ordre = 7;
   math_Vector DVx(1, Ordre), DVy(1, Ordre), DVw(1, Ordre),
               DPx(1, Ordre), DPy(1, Ordre), DW(1, Ordre);
-  Standard_Real b, b2, c, c2,tan_b;
-  Standard_Real bpr, dtan_b;
-  Standard_Integer ii;
-  Standard_Real beta, beta2, beta3, beta4, beta5, beta6, betaprim;
+  Standard_Real b = NAN, b2 = NAN, c = NAN, c2 = NAN,tan_b = NAN;
+  Standard_Real bpr = NAN, dtan_b = NAN;
+  Standard_Integer ii = 0;
+  Standard_Real beta = NAN, beta2 = NAN, beta3 = NAN, beta4 = NAN, beta5 = NAN, beta6 = NAN, betaprim = NAN;
   gp_Vec V1(Center, FirstPnt), V1Prim, V2;
 
   // Calcul des  transformations
   gp_XYZ aux;
-  Standard_Real Sina, Cosa;
+  Standard_Real Sina = NAN, Cosa = NAN;
   gp_Mat Rot, RotPrim, D, DPrim;
   // La rotation s'ecrit I +  sin(Ang) * D + (1. - cos(Ang)) * D*D
   // ou D est l'application x -> Dir ^ x
@@ -262,7 +264,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
   if (Abs(beta) < NullAngle) {
     // On calcul b par D.L
      Standard_Real cf = 2.0/(3*5*7);
-     Standard_Real Num, Denom;
+     Standard_Real Num = NAN, Denom = NAN;
      Num = 0.2 + cf*beta2;
      Denom = 1+0.2*beta2;
      b = - Num/Denom;
@@ -326,7 +328,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
   DW.Multiply(B, DVw);
 
   gp_XYZ P, DP;
-  Standard_Real wi;
+  Standard_Real wi = NAN;
 
   for (ii=1; ii<=Ordre; ii++) {
     wi = W(ii);
@@ -369,13 +371,13 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
   math_Vector DPx(1, Ordre), DPy(1, Ordre), DW(1, Ordre),
               D2Px(1, Ordre), D2Py(1, Ordre), D2W(1, Ordre);
  
-  Standard_Integer ii;
-  Standard_Real daux, b, b2, c, c2, bpr, bsc;
+  Standard_Integer ii = 0;
+  Standard_Real daux = NAN, b = NAN, b2 = NAN, c = NAN, c2 = NAN, bpr = NAN, bsc = NAN;
   gp_Vec V1(Center, FirstPnt), V1Prim, V1Secn, V2;
 
   // Calcul des  transformations
   gp_XYZ auxyz;
-  Standard_Real Sina, Cosa;
+  Standard_Real Sina = NAN, Cosa = NAN;
   gp_Mat Rot, RotPrim, RotSecn, D, DPrim, DSecn, DDP, Maux;
   // La rotation s'ecrit I +  sin(Ang) * D + (1. - cos(Ang)) * D*D
   // ou D est l'application x -> Dir ^ x
@@ -442,9 +444,9 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
 
      
   // Calcul des coeff  -----------
-  Standard_Real tan_b, dtan_b, d2tan_b;
-  Standard_Real beta, beta2, beta3, beta4, beta5, beta6, betaprim, betasecn;
-  Standard_Real betaprim2, bpr2;
+  Standard_Real tan_b = NAN, dtan_b = NAN, d2tan_b = NAN;
+  Standard_Real beta = NAN, beta2 = NAN, beta3 = NAN, beta4 = NAN, beta5 = NAN, beta6 = NAN, betaprim = NAN, betasecn = NAN;
+  Standard_Real betaprim2 = NAN, bpr2 = NAN;
   beta = Angle/4;
   betaprim = DAngle/4;
   betasecn = D2Angle/4;
@@ -458,7 +460,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
  if (Abs(beta) < NullAngle) {
     // On calcul b par D.L
      Standard_Real cf =-2.0/21;
-     Standard_Real Num, Denom, aux;
+     Standard_Real Num = NAN, Denom = NAN, aux = NAN;
      Num = 0.2 + cf*beta2;
      Denom = 1+0.2*beta2;
      aux = (cf*Denom - 0.2*Num)/(Denom*Denom);
@@ -559,7 +561,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
   D2W.Multiply(B, D2Vw);
 
   gp_XYZ P, DP, D2P;
-  Standard_Real wi, dwi;
+  Standard_Real wi = NAN, dwi = NAN;
   for (ii=1; ii<=Ordre; ii++) {
      wi = W(ii);
      dwi = DW(ii);
index 9c09f281fb88c73cfc303db45507485c55bf6e3a..7a4ba8b7a44e2cf876a8f1db35a11e13b50bd308 100644 (file)
@@ -42,7 +42,7 @@ GeomFill_SectionGenerator::GeomFill_SectionGenerator()
 
 void GeomFill_SectionGenerator::SetParam(const Handle(TColStd_HArray1OfReal) & Params)
 {
-  Standard_Integer ii, L =  Params->Upper()-Params->Lower()+1;
+  Standard_Integer ii = 0, L =  Params->Upper()-Params->Lower()+1;
   myParams = Params;
   for (ii=1; ii<=L; ii++) {
     myParams->SetValue(ii,Params->Value(Params->Lower()+ii-1));
index 8d39b1c3cd011fa5d985948318f89882a17d1682..3a40d7c509dfcd6b2d1188c8cdb58615f357b7cc 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <Bnd_Box.hxx>
 #include <BndLib_Add3dCurve.hxx>
@@ -74,7 +76,7 @@ static void Tangente(const Adaptor3d_Curve& Path,
 static Standard_Real Penalite(const Standard_Real angle,
                              const Standard_Real dist)
 {
-  Standard_Real penal;
+  Standard_Real penal = NAN;
   
   if (dist < 1)
     penal = Sqrt(dist);
@@ -96,7 +98,7 @@ static Standard_Real Penalite(const Standard_Real angle,
 static Standard_Real EvalAngle(const gp_Vec& V1, 
                               const gp_Vec& V2)
 {
- Standard_Real angle;
+ Standard_Real angle = NAN;
  angle = V1.Angle(V2);
  if (angle > M_PI/2) angle = M_PI - angle;
  return angle;
@@ -111,8 +113,8 @@ static void DistMini(const Extrema_ExtPC& Ext,
                     Standard_Real& Dist,
                     Standard_Real& Param)
 {
-  Standard_Real dist1, dist2;
-  Standard_Integer ii;
+  Standard_Real dist1 = NAN, dist2 = NAN;
+  Standard_Integer ii = 0;
   gp_Pnt P1, P2;
   Standard_Real Dist2 = RealLast();
 
@@ -148,14 +150,14 @@ static void DistMini(const Extrema_ExtPC& Ext,
 GeomFill_SectionPlacement::
 GeomFill_SectionPlacement(const Handle(GeomFill_LocationLaw)& L,
               const Handle(Geom_Geometry)& Section) :
-              myLaw(L), /* myAdpSection(Section),  mySection(Section), */
+              done(Standard_False), isplan(Standard_False), myLaw(L), /* myAdpSection(Section),  mySection(Section), */
               SecParam(0.0), PathParam(0.0),
-              Dist(RealLast()), AngleMax(0.)
+              Dist(RealLast()), AngleMax(0.), myIsPoint(Standard_False)
 {
 
-  done   = Standard_False;
-  isplan = Standard_False;
-  myIsPoint = Standard_False;
+  
+  
+  
 
   if (Section->IsInstance(STANDARD_TYPE(Geom_CartesianPoint)))
     {
@@ -170,8 +172,8 @@ GeomFill_SectionPlacement(const Handle(GeomFill_LocationLaw)& L,
       mySection = CurveSection;
     }
 
-  Standard_Integer i, j, NbPoles=0;
-  Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+  Standard_Integer i = 0, j = 0, NbPoles=0;
+  Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN;
 
   // Boite d'encombrement de la section pour en deduire le gabarit
   Bnd_Box box;
@@ -264,12 +266,12 @@ GeomFill_SectionPlacement(const Handle(GeomFill_LocationLaw)& L,
             if (Abs(last - U2) <= Precision::PConfusion())
               last = U2;
           }
-         Standard_Real t, delta;
+         Standard_Real t = NAN, delta = NAN;
          if (myAdpSection.GetType() == GeomAbs_BSplineCurve)
            {
              Handle(Geom_BSplineCurve) BC =
                Handle(Geom_BSplineCurve)::DownCast(myAdpSection.Curve());
-             Standard_Integer I1, I2, I3, I4;
+             Standard_Integer I1 = 0, I2 = 0, I3 = 0, I4 = 0;
              BC->LocateU( first, Precision::Confusion(), I1, I2 );
              BC->LocateU( last,  Precision::Confusion(), I3, I4 );
              Standard_Integer NbKnots = I3 - I2 + 1;
@@ -335,7 +337,7 @@ GeomFill_SectionPlacement(const Handle(GeomFill_LocationLaw)& L,
                Pnts->SetValue( NbPnts, myAdpSection.Value(last) );
            }
          
-         Standard_Boolean issing;
+         Standard_Boolean issing = 0;
          gp_Ax2 axe;
          GeomLib::AxeOfInertia(Pnts->Array1(), axe, issing, Precision::Confusion());
          if (!issing) {
@@ -395,7 +397,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_Curve)& Path,
       PathParam = Path->FirstParameter();
       SecParam =  myAdpSection.FirstParameter();
       
-      Standard_Real distaux, taux = 0.0, alpha;
+      Standard_Real distaux = NAN, taux = 0.0, alpha = NAN;
       gp_Pnt PonPath, PonSec, P;
       gp_Vec VRef, dp1;
       VRef.SetXYZ(TheAxe.Direction().XYZ());
@@ -414,11 +416,11 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_Curve)& Path,
       if (isplan) AngleMax = M_PI/2 - AngleMax;
       
       Standard_Boolean Trouve = Standard_False; 
-      Standard_Integer ii;
+      Standard_Integer ii = 0;
       
       if (isplan) {
        // (1.1) Distances Point-Plan
-       Standard_Real DistPlan;
+       Standard_Real DistPlan = NAN;
        gp_Vec V1 (PonPath, TheAxe.Location());
        DistPlan = Abs(V1.Dot(VRef));
        if (DistPlan <= IntTol)
@@ -447,8 +449,8 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_Curve)& Path,
        Intersector.Perform(Path, adplan);
        if (Intersector.IsDone())
          {
-           Standard_Real w;
-           Standard_Real aDist;
+           Standard_Real w = NAN;
+           Standard_Real aDist = NAN;
            for (ii=1; ii<=Intersector.NbPoints(); ii++)
              {
                w = Intersector.Point(ii).W();
@@ -782,7 +784,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param,
   gp_Trsf Rot;
 
   if (WithCorrection && !myIsPoint) { 
-    Standard_Real angle;
+    Standard_Real angle = NAN;
     
     if (!isplan)
       throw Standard_Failure("Illegal usage: can't rotate non-planar profile");
@@ -919,7 +921,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param,
  Standard_Boolean GeomFill_SectionPlacement::Choix(const Standard_Real dist,
                                                   const Standard_Real  angle) const
 {
-  Standard_Real evoldist, evolangle;
+  Standard_Real evoldist = NAN, evolangle = NAN;
   evoldist = dist - Dist;
   evolangle = angle - AngleMax;
   // (1) Si la gain en distance est > que le gabarit, on prend
index b05469a0c953737d791be1693cca199f6ed02e69..c89602d32adabfa7d57ca059cb5af861fb6dc74f 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GeomFill_Stretch.hxx>
 #include <gp_Pnt.hxx>
 #include <TColgp_HArray2OfPnt.hxx>
@@ -85,12 +87,12 @@ void  GeomFill_Stretch::Init(const TColgp_Array1OfPnt& P1,
   myPoles = new TColgp_HArray2OfPnt( 1, NPolU, 1, NPolV);
   
   // The boundaries are not modified
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
   for ( i=1; i<=NPolU; i++) {
     myPoles->SetValue( i, 1    , P1(i));
     myPoles->SetValue( i, NPolV, P3(i));
   }
-  Standard_Real PU,PU1,PV,PV1;
+  Standard_Real PU = NAN,PU1 = NAN,PV = NAN,PV1 = NAN;
   
   for ( j=2; j<=NPolV-1; j++) {
     PV  = (j-1)/NV;
@@ -151,12 +153,12 @@ void  GeomFill_Stretch::Init(const TColgp_Array1OfPnt&   P1,
   myWeights = new TColStd_HArray2OfReal( 1, NPolU, 1, NPolV);
   
   // The boundaries are not modified
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   for ( i=1; i<=NPolU; i++) {
     myWeights->SetValue( i, 1    , W1(i));
     myWeights->SetValue( i, NPolV, W3(i));
   }
-  Standard_Real PU,PU1,PV,PV1;
+  Standard_Real PU = NAN,PU1 = NAN,PV = NAN,PV1 = NAN;
   
   for ( j=2; j<=NPolV-1; j++) {
     PV  = (j-1)/NV;
index 99611f10c7dc1d753d807f4287fc85069ce9c6fd..f2abe94f56b143b35f5f9147b6f4197e04420db4 100644 (file)
@@ -16,6 +16,8 @@
 
 //  Modified by skv - Fri Feb  6 11:44:48 2004 OCC5073
 
+#include <math.h>
+
 #include <AdvApprox_ApproxAFunction.hxx>
 #include <AdvApprox_PrefAndRec.hxx>
 #include <Approx_SweepApproximation.hxx>
@@ -77,12 +79,12 @@ public:
   GeomFill_Sweep_Eval(GeomFill_LocFunction& theTool)
     : theAncore(theTool) {}
 
-  virtual void Evaluate(Standard_Integer *Dimension,
+  void Evaluate(Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                         Standard_Real    *Parameter,
                         Standard_Integer *DerivativeRequest,
                         Standard_Real    *Result, // [Dimension]
-                        Standard_Integer *ErrorCode);
+                        Standard_Integer *ErrorCode) override;
 
 private:
   GeomFill_LocFunction& theAncore;
@@ -108,18 +110,18 @@ void GeomFill_Sweep_Eval::Evaluate(Standard_Integer *,/*Dimension*/
 // Purpose :
 //===============================================================
 GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location,
-                               const Standard_Boolean WithKpart)
+                               const Standard_Boolean WithKpart) : done(Standard_False), myLoc(Location), myKPart(WithKpart), myForceApproxC1(Standard_False), SError(RealLast())
 {
-  done = Standard_False;
+  
 
-  myLoc = Location;
-  myKPart = WithKpart;
+  
+  
   SetTolerance(1.e-4);
-  myForceApproxC1 = Standard_False;
+  
 
   myLoc->GetDomain(First, Last);
   SFirst = SLast = 30.081996;
-  SError = RealLast();
+  
 }
 
 //===============================================================
@@ -285,8 +287,8 @@ Standard_Boolean GeomFill_Sweep::BuildAll(const GeomAbs_Shape Continuity,
 #endif
 
     // La surface
-    Standard_Integer UDegree, VDegree, NbUPoles,
-                     NbVPoles, NbUKnots, NbVKnots;
+    Standard_Integer UDegree = 0, VDegree = 0, NbUPoles = 0,
+                     NbVPoles = 0, NbUKnots = 0, NbVKnots = 0;
     Approx.SurfShape(UDegree, VDegree, NbUPoles,
                      NbVPoles, NbUKnots, NbVKnots);
 
@@ -353,7 +355,7 @@ Standard_Boolean GeomFill_Sweep::BuildAll(const GeomAbs_Shape Continuity,
     {
       myCurve2d = new  (TColGeom2d_HArray1OfCurve) (1, 2 + myLoc->TraceNumber());
       CError = new (TColStd_HArray2OfReal) (1, 2, 1, 2 + myLoc->TraceNumber());
-      Standard_Integer kk, ii, ifin = 1, ideb;
+      Standard_Integer kk = 0, ii = 0, ifin = 1, ideb = 0;
 
       if (myLoc->HasFirstRestriction()) {
         ideb = 1;
@@ -418,7 +420,7 @@ Standard_Boolean GeomFill_Sweep::BuildProduct(const GeomAbs_Shape Continuity,
   if (BSurf.IsNull()) return Ok; // Ce mode de construction est impossible  
 
 
-  Standard_Integer NbIntervalC2, NbIntervalC3;
+  Standard_Integer NbIntervalC2 = 0, NbIntervalC3 = 0;
   GeomFill_LocFunction Func(myLoc);
 
   NbIntervalC2 = myLoc->NbIntervals(GeomAbs_C2);
@@ -501,8 +503,8 @@ static Standard_Boolean IsSweepParallelSpine(const Handle(GeomFill_LocationLaw)
                                              const Standard_Real                 theTol)
 {
   // Get the first and last transformations of the location
-  Standard_Real aFirst;
-  Standard_Real aLast;
+  Standard_Real aFirst = NAN;
+  Standard_Real aLast = NAN;
   gp_Vec        VBegin;
   gp_Vec        VEnd;
   gp_Mat        M;
@@ -534,10 +536,10 @@ static Standard_Boolean IsSweepParallelSpine(const Handle(GeomFill_LocationLaw)
                   GTfEnd(3, 1), GTfEnd(3, 2), GTfEnd(3, 3), GTfEnd(3, 4));
 
   Handle(Geom_Surface) aSurf = theSec->BSplineSurface();
-  Standard_Real Umin;
-  Standard_Real Umax;
-  Standard_Real Vmin;
-  Standard_Real Vmax;
+  Standard_Real Umin = NAN;
+  Standard_Real Umax = NAN;
+  Standard_Real Vmin = NAN;
+  Standard_Real Vmax = NAN;
 
   aSurf->Bounds(Umin, Umax, Vmin, Vmax);
 
@@ -583,7 +585,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
   GeomAbs_CurveType SectionType;
   gp_Vec V;
   gp_Mat M;
-  Standard_Real levier, error = 0;
+  Standard_Real levier = NAN, error = 0;
   Standard_Real UFirst = 0, VFirst = First, ULast = 0, VLast = Last;
   Standard_Real Tol = Min(Tol3d, BoundTol);
 
@@ -658,7 +660,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
             (axe, C.Radius());
           if (C.Position().Direction().
             IsOpposite(axe.Direction(), 0.1)) {
-            Standard_Real f, l;
+            Standard_Real f = NAN, l = NAN;
             // L'orientation parametrique est inversee
             l = 2 * M_PI - UFirst;
             f = 2 * M_PI - ULast;
@@ -693,7 +695,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
       Handle(Geom_Curve) Section;
       GeomAdaptor_Curve AC;
       gp_Circ C;
-      Standard_Real R1, R2;
+      Standard_Real R1 = NAN, R2 = NAN;
 
 
       Section = mySec->CirclSection(SLast);
@@ -720,7 +722,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
       C = AC.Circle();
       Centre0 = C.Location();
 
-      Standard_Real Angle;
+      Standard_Real Angle = NAN;
       gp_Vec  N(Centre1, P1);
       if (N.Magnitude() < 1.e-9) {
         gp_Vec Bis(Centre2, P2);
@@ -748,7 +750,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
         if (diso.Magnitude() > 1.e-9 && dsection.Magnitude() > 1.e-9)
           isUReversed = diso.IsOpposite(dsection, 0.1);
         if (isUReversed) {
-          Standard_Real f, l;
+          Standard_Real f = NAN, l = NAN;
           // L'orientation parametrique est inversee
           l = 2 * M_PI - UFirst;
           f = 2 * M_PI - ULast;
@@ -768,7 +770,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
       // La trajectoire
       gp_Pnt Centre;
       isVPeriodic = (Abs(Last - First - 2 * M_PI) < 1.e-15);
-      Standard_Real RotRadius;
+      Standard_Real RotRadius = NAN;
       gp_Vec DP, DS, DN;
       myLoc->D0(0.1, M, DS);
       myLoc->D0(0, M, V);
@@ -808,7 +810,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
       // (2.1) Tore/Sphere ?
       if ((SectionType == GeomAbs_Circle) && IsTrsf) {
         gp_Circ C = AC.Circle();
-        Standard_Real Radius;
+        Standard_Real Radius = NAN;
         Standard_Boolean IsGoodSide = Standard_True;
         C.Transform(Tf2);
         gp_Vec DC;
@@ -851,7 +853,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
             theSection->Transform(Tf2);
             gp_Pnt FirstPoint = theSection->Value(theSection->FirstParameter());
             gp_Pnt LastPoint = theSection->Value(theSection->LastParameter());
-            Standard_Real UfirstOnSec, VfirstOnSec, UlastOnSec, VlastOnSec;
+            Standard_Real UfirstOnSec = NAN, VfirstOnSec = NAN, UlastOnSec = NAN, VlastOnSec = NAN;
             ElSLib::Parameters(theSphere, FirstPoint, UfirstOnSec, VfirstOnSec);
             ElSLib::Parameters(theSphere, LastPoint, UlastOnSec, VlastOnSec);
             if (VfirstOnSec < VlastOnSec)
@@ -903,7 +905,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
 
             if (C.Position().Direction().
               IsOpposite(axeiso.Direction(), 0.1)) {
-              Standard_Real f, l;
+              Standard_Real f = NAN, l = NAN;
               // L'orientation parametrique est inversee
               l = 2 * M_PI - UFirst;
               f = 2 * M_PI - ULast;
@@ -912,7 +914,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
               isUReversed = Standard_True;
             }
             // On calcul le "glissement" parametrique.
-            Standard_Real rot;
+            Standard_Real rot = NAN;
             rot = C.Position().XDirection().AngleWithRef
             (axeiso.XDirection(), axeiso.Direction());
             UFirst -= rot;
@@ -940,9 +942,9 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
         // si la line est ortogonale au cercle de rotation  
         SError = error + levier * Abs(DL.Dot(DP));
         if (SError <= Tol) {
-          Standard_Boolean reverse;
+          Standard_Boolean reverse = 0;
           gp_Lin Dir(Centre, DN);
-          Standard_Real aux;
+          Standard_Real aux = NAN;
           aux = DL.Dot(DN);
           reverse = (aux < 0);  // On choisit ici le sens de parametrisation
 
@@ -997,7 +999,7 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
           }
           if (Ok && reverse) {
             // On reverse le parametre
-            Standard_Real uf, ul;
+            Standard_Real uf = NAN, ul = NAN;
             Handle(Geom_Line) CL = new (Geom_Line)(L);
             uf = CL->ReversedParameter(ULast);
             ul = CL->ReversedParameter(UFirst);
@@ -1030,9 +1032,9 @@ Standard_Boolean GeomFill_Sweep::BuildKPart()
 
   if (Ok) { // On trimme la surface
     if (myExchUV) {
-      Standard_Boolean b;
+      Standard_Boolean b = 0;
       b = isUPeriodic; isUPeriodic = isVPeriodic;  isVPeriodic = b;
-      Standard_Real r;
+      Standard_Real r = NAN;
       r = UFirst; UFirst = VFirst; VFirst = r;
       r = ULast; ULast = VLast; VLast = r;
     }
@@ -1091,7 +1093,7 @@ void GeomFill_Sweep::ErrorOnRestriction(const Standard_Boolean IsFirst,
                                         Standard_Real& UError,
                                         Standard_Real& VError) const
 {
-  Standard_Integer ind;
+  Standard_Integer ind = 0;
   if (IsFirst) ind = 1;
   else ind = myCurve2d->Length();
 
index 4851e5f6ad23ca39cca271ba7205a4c69b735ec2..bf254171b292e38dab97dff9ae71f50712fb583c 100644 (file)
@@ -144,14 +144,14 @@ private:
   Standard_EXPORT Standard_Boolean BuildKPart();
 
 
-  Standard_Real First;
-  Standard_Real Last;
+  Standard_Real First{};
+  Standard_Real Last{};
   Standard_Real SFirst;
   Standard_Real SLast;
-  Standard_Real Tol3d;
-  Standard_Real BoundTol;
-  Standard_Real Tol2d;
-  Standard_Real TolAngular;
+  Standard_Real Tol3d{};
+  Standard_Real BoundTol{};
+  Standard_Real Tol2d{};
+  Standard_Real TolAngular{};
   Standard_Real SError;
   Standard_Boolean myForceApproxC1;
   Handle(GeomFill_LocationLaw) myLoc;
@@ -160,9 +160,9 @@ private:
   Handle(TColGeom2d_HArray1OfCurve) myCurve2d;
   Handle(TColStd_HArray2OfReal) CError;
   Standard_Boolean done;
-  Standard_Boolean myExchUV;
-  Standard_Boolean isUReversed;
-  Standard_Boolean isVReversed;
+  Standard_Boolean myExchUV{};
+  Standard_Boolean isUReversed{};
+  Standard_Boolean isVReversed{};
   Standard_Boolean myKPart;
 
 
index 59c2c61365540fc04e47fefb238fb14aa797ffc8..401b2c061029121b21a543569f8c64ab0a662d9c 100644 (file)
@@ -21,6 +21,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <GeomFill_LocationLaw.hxx>
 #include <GeomFill_SectionLaw.hxx>
 #include <GeomFill_SweepFunction.hxx>
@@ -41,13 +43,13 @@ GeomFill_SweepFunction(const Handle(GeomFill_SectionLaw)& Section,
                       const Handle(GeomFill_LocationLaw)& Location,
                       const Standard_Real  FirstParameter,
                       const Standard_Real  FirstParameterOnS,
-                      const Standard_Real  RatioParameterOnS)
+                      const Standard_Real  RatioParameterOnS) : myLoc(Location), mySec(Section), myf(FirstParameter), myfOnS(FirstParameterOnS), myRatio(RatioParameterOnS)
 {
-  myLoc = Location;
-  mySec = Section;
-  myf = FirstParameter;
-  myfOnS = FirstParameterOnS;
-  myRatio =  RatioParameterOnS;
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -61,8 +63,8 @@ Standard_Boolean GeomFill_SweepFunction::D0(const Standard_Real Param,
                                            TColgp_Array1OfPnt2d& Poles2d,
                                            TColStd_Array1OfReal& Weigths) 
 {
-  Standard_Integer ii, L;
-  Standard_Boolean Ok;
+  Standard_Integer ii = 0, L = 0;
+  Standard_Boolean Ok = 0;
   Standard_Real T =  myfOnS + (Param - myf) * myRatio;
   L = Poles.Length();
 
@@ -93,8 +95,8 @@ Standard_Boolean GeomFill_SweepFunction::D0(const Standard_Real Param,
                                             TColStd_Array1OfReal& Weigths,
                                             TColStd_Array1OfReal& DWeigths) 
 {
-  Standard_Integer ii, L;
-  Standard_Boolean Ok;
+  Standard_Integer ii = 0, L = 0;
+  Standard_Boolean Ok = 0;
   Standard_Real T =  myfOnS + (Param - myf) * myRatio;
   gp_XYZ PPrim;
   L = Poles.Length();
@@ -137,8 +139,8 @@ Standard_Boolean GeomFill_SweepFunction::D0(const Standard_Real Param,
                                             TColStd_Array1OfReal& DWeigths,
                                             TColStd_Array1OfReal& D2Weigths) 
 {
-  Standard_Integer ii, L;
-  Standard_Boolean Ok;
+  Standard_Integer ii = 0, L = 0;
+  Standard_Boolean Ok = 0;
   Standard_Real T =  myfOnS + (Param - myf) * myRatio;
   Standard_Real squareratio = myRatio*myRatio;
   L = Poles.Length();
@@ -229,7 +231,7 @@ Standard_Boolean GeomFill_SweepFunction::D0(const Standard_Real Param,
 //=======================================================================
  Standard_Integer GeomFill_SweepFunction::NbIntervals(const GeomAbs_Shape S) const
 {
-  Standard_Integer Nb_Sec, Nb_Loc;
+  Standard_Integer Nb_Sec = 0, Nb_Loc = 0;
   Nb_Sec  =  mySec->NbIntervals(S);
   Nb_Loc  =  myLoc->NbIntervals(S);
 
@@ -243,8 +245,8 @@ Standard_Boolean GeomFill_SweepFunction::D0(const Standard_Real Param,
   TColStd_Array1OfReal IntS(1, Nb_Sec+1);
   TColStd_Array1OfReal IntL(1, Nb_Loc+1);
   TColStd_SequenceOfReal    Inter;
-  Standard_Real T;
-  Standard_Integer ii;
+  Standard_Real T = NAN;
+  Standard_Integer ii = 0;
   mySec->Intervals(IntS, S);
   for (ii=1; ii<=Nb_Sec+1; ii++) {
     T = (IntS(ii) - myfOnS) / myRatio +  myf;
@@ -262,7 +264,7 @@ Standard_Boolean GeomFill_SweepFunction::D0(const Standard_Real Param,
 //=======================================================================
  void GeomFill_SweepFunction::Intervals(TColStd_Array1OfReal& T,const GeomAbs_Shape S) const
 {
-  Standard_Integer Nb_Sec, Nb_Loc, ii;
+  Standard_Integer Nb_Sec = 0, Nb_Loc = 0, ii = 0;
   Nb_Sec  =  mySec->NbIntervals(S);
   Nb_Loc  =  myLoc->NbIntervals(S);
 
@@ -271,7 +273,7 @@ Standard_Boolean GeomFill_SweepFunction::D0(const Standard_Real Param,
     return;
   }
   else if (Nb_Loc==1) {
-    Standard_Real t;
+    Standard_Real t = NAN;
     mySec->Intervals(T, S);
     for (ii=1; ii<=Nb_Sec+1; ii++) {
       t = (T(ii) - myfOnS) / myRatio +  myf;
@@ -283,7 +285,7 @@ Standard_Boolean GeomFill_SweepFunction::D0(const Standard_Real Param,
   TColStd_Array1OfReal IntS(1, Nb_Sec+1);
   TColStd_Array1OfReal IntL(1, Nb_Loc+1);
   TColStd_SequenceOfReal    Inter;
-  Standard_Real t;
+  Standard_Real t = NAN;
 
   mySec->Intervals(IntS, S);
   for (ii=1; ii<=Nb_Sec+1; ii++) {
@@ -304,7 +306,7 @@ Standard_Boolean GeomFill_SweepFunction::D0(const Standard_Real Param,
  void GeomFill_SweepFunction::SetInterval(const Standard_Real First,
                                          const Standard_Real Last) 
 {
-  Standard_Real uf, ul;
+  Standard_Real uf = NAN, ul = NAN;
   myLoc->SetInterval(First, Last);
   uf = myf + (First - myf) * myRatio;
   ul = myf + (Last  - myf) * myRatio;
index dfd65583c6a039775129676d0c7cb2e0af755ce5..5a53f1bbda48f52e1054b111b6d41dbad30ab99f 100644 (file)
@@ -35,6 +35,7 @@
 #include <Standard_RangeError.hxx>
 #include <TColStd_Array1OfReal.hxx>
 
+#include <math.h>
 #include <stdio.h>
 #ifdef DRAW
 #include <DrawTrSurf.hxx>
@@ -274,7 +275,7 @@ void GeomFill_SweepSectionGenerator::Perform(const Standard_Boolean Polynomial)
 
   myNbSections = 21 * NSpans;
 
-  Standard_Real U;
+  Standard_Real U = NAN;
 
   Standard_Real U1 = myPath->FirstParameter();
   Standard_Real U2 = myPath->LastParameter();
@@ -493,7 +494,7 @@ Standard_Boolean GeomFill_SweepSectionGenerator::Section
 
   // calcul du cercle osculateur.
 
-  Standard_Real U;
+  Standard_Real U = NAN;
   if ( P == 1) {
     U = myPath->FirstParameter();
   }
@@ -526,7 +527,7 @@ Standard_Boolean GeomFill_SweepSectionGenerator::Section
   else {
     gp_Dir N = D;
     gp_Pnt Q = Pt.Translated( (1./c) * gp_Vec(N));
-    Standard_Real x, y;
+    Standard_Real x = NAN, y = NAN;
     gp_Vec V;
     for ( Standard_Integer i = 1; i <= myFirstSect->NbPoles(); i++) {
       V = gp_Vec(Q, Poles(i));
@@ -633,7 +634,7 @@ void GeomFill_SweepSectionGenerator::Section
     gp_Pnt P2 = myAdpLastSect->Value(U2);
     
     gp_Ax2 Axis;
-    Standard_Real Angle;
+    Standard_Real Angle = NAN;
     if ( P1.Distance(P2) < Precision::Confusion()) {
       Angle = 0.;
     }
index adeba24882d6d637f711240240eed3c7c443b359..db9b8f5889bbb40270d497e1e541f9f78d33401d 100644 (file)
@@ -115,12 +115,12 @@ private:
   Handle(Adaptor3d_Curve) myAdpFirstSect;
   Handle(Adaptor3d_Curve) myAdpLastSect;
   gp_Ax1 myCircPathAxis;
-  Standard_Real myRadius;
-  Standard_Boolean myIsDone;
-  Standard_Integer myNbSections;
+  Standard_Real myRadius{};
+  Standard_Boolean myIsDone{};
+  Standard_Integer myNbSections{};
   GeomFill_SequenceOfTrsf myTrsfs;
-  Standard_Integer myType;
-  Standard_Boolean myPolynomial;
+  Standard_Integer myType{};
+  Standard_Boolean myPolynomial{};
 
 
 };
index 166287161f16fad3e3a9dbb8f160f48758226385..e2612bd3cb70cc571d9a63e2e2a1d9160b9c8c28 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GeomFill_Tensor.hxx>
 #include <math_Matrix.hxx>
 
@@ -39,8 +41,8 @@ void GeomFill_Tensor::Init(const Standard_Real InitialValue)
 void GeomFill_Tensor::Multiply(const math_Vector& Right, 
                                math_Matrix& M) const 
 {
-  Standard_Integer i, j, k;
-  Standard_Real Somme;
+  Standard_Integer i = 0, j = 0, k = 0;
+  Standard_Real Somme = NAN;
   for ( i=1; i<=nbrow; i++) 
     {
       for ( j=1; j<=nbcol; j++) 
index 1d153407ed28496f32e4c49e93df842a2eba90b0..85a19d5ef220e78c9b31dd6a986bbf02dd6a5334 100644 (file)
@@ -30,6 +30,7 @@
 #include <TColStd_Array1OfInteger.hxx>
 #include <TColStd_Array1OfReal.hxx>
 
+#include <math.h>
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(GeomFill_UniformSection,GeomFill_SectionLaw)
 
@@ -124,7 +125,7 @@ GeomFill_UniformSection::GeomFill_UniformSection(const Handle(Geom_Curve)& C,
 //=======================================================
  Handle(Geom_BSplineSurface) GeomFill_UniformSection::BSplineSurface() const
 {
-  Standard_Integer ii, NbPoles = myCurve->NbPoles();
+  Standard_Integer ii = 0, NbPoles = myCurve->NbPoles();
   TColgp_Array2OfPnt Poles( 1, NbPoles, 1, 2);
   TColStd_Array1OfReal UKnots(1,myCurve->NbKnots()), VKnots(1,2); 
   TColStd_Array1OfInteger UMults(1,myCurve->NbKnots()), VMults(1,2);
@@ -271,7 +272,7 @@ GeomFill_UniformSection::GeomFill_UniformSection(const Handle(Geom_Curve)& C,
 //=======================================================
  gp_Pnt GeomFill_UniformSection::BarycentreOfSurf() const
 {
-  Standard_Real U = mySection->FirstParameter(), Delta;
+  Standard_Real U = mySection->FirstParameter(), Delta = NAN;
   gp_Pnt P, Bary;
 
   Delta = ( myCurve->LastParameter() - U ) / 20;
index a788e4352af9bbd9cb3ce302142425f1bab96c39..5f523206da09e160460243510c4865072cb219c4 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomInt.hxx>
 
 //=======================================================================
@@ -28,7 +30,7 @@ Standard_Boolean GeomInt::AdjustPeriodic(const Standard_Real thePar,
                                          Standard_Real &theOffset,
                                          const Standard_Real theEps)
 {
-  Standard_Boolean bMin, bMax;
+  Standard_Boolean bMin = 0, bMax = 0;
   //
   theOffset = 0.;
   theNewPar = thePar;
@@ -36,7 +38,7 @@ Standard_Boolean GeomInt::AdjustPeriodic(const Standard_Real thePar,
   bMax = thePar - theParMax > theEps;
   //
   if (bMin || bMax) {
-    Standard_Real dp, aNbPer;
+    Standard_Real dp = NAN, aNbPer = NAN;
     //
     dp = (bMin) ? (theParMax - thePar) : (theParMin - thePar);
     modf(dp / thePeriod, &aNbPer);
index 600fb45bb47fc573822abac9600fde719cf5f1b6..e50b2f5fc615c6a746f0222b5d0acda25a5173fa 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomInt_IntSS.hxx>
 
 #include <Adaptor3d_TopolTool.hxx>
@@ -183,7 +185,7 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1,
                                 const Standard_Boolean OnFirst) const
 {
   const IntPatch_Point&  thept = myIntersector.Point(Index);
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
   if (OnFirst)
     thept.ParametersOnS1(U,V);
   else
index 96727353014ca7ab7371987c3f1263cc370fbf46..528f0b5515e4e79e23ea26630ea4c220a37027e7 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <algorithm>
 #include <GeomInt_IntSS.hxx>
 
@@ -62,7 +64,7 @@
   const Standard_Real aEps=Precision::PConfusion();//1.e-9
   const Standard_Real aEpsilon=Epsilon(10.);//1.77e-15 
   //
-  Standard_Real umin,umax,vmin,vmax;
+  Standard_Real umin = NAN,umax = NAN,vmin = NAN,vmax = NAN;
   aS->Bounds(umin,umax,vmin,vmax);
   const Standard_Real aPeriod = aS->UPeriod();
   
@@ -267,8 +269,8 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
                                                const Standard_Boolean ApproxS2)
 
 {
-  Standard_Boolean myApprox1, myApprox2, myApprox;
-  Standard_Real Tolpc, myTolApprox;
+  Standard_Boolean myApprox1 = 0, myApprox2 = 0, myApprox = 0;
+  Standard_Real Tolpc = NAN, myTolApprox = NAN;
   IntPatch_IType typl;
   Handle(Geom2d_BSplineCurve) H1;
   Handle(Geom_Surface) aS1, aS2;
@@ -299,9 +301,9 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
     return;
   }
   // Do the Curve
-  Standard_Boolean ok;
-  Standard_Integer i, j,  aNbParts;
-  Standard_Real fprm, lprm;
+  Standard_Boolean ok = 0;
+  Standard_Integer i = 0, j = 0,  aNbParts = 0;
+  Standard_Real fprm = NAN, lprm = NAN;
   Handle(Geom_Curve) newc;
 
   switch (typl) {
@@ -370,9 +372,9 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
             slineS2.Append(H1);
             continue;
         }
-        Standard_Boolean bFNIt, bLPIt;
-        Standard_Real aTestPrm, dT=100.;
-        Standard_Real u1, v1, u2, v2, TolX;
+        Standard_Boolean bFNIt = 0, bLPIt = 0;
+        Standard_Real aTestPrm = NAN, dT=100.;
+        Standard_Real u1 = NAN, v1 = NAN, u2 = NAN, v2 = NAN, TolX = NAN;
         //
         bFNIt=Precision::IsNegativeInfinite(fprm);
         bLPIt=Precision::IsPositiveInfinite(lprm);
@@ -419,7 +421,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
         (Handle(IntPatch_GLine)::DownCast(L)->Ellipse());
     }
     //
-    Standard_Real aPeriod, aRealEpsilon;
+    Standard_Real aPeriod = NAN, aRealEpsilon = NAN;
     //
     aRealEpsilon=RealEpsilon();
     aPeriod=M_PI+M_PI;
@@ -501,7 +503,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
           }
         }
         //
-        Standard_Real aTwoPIdiv17, u1, v1, u2, v2, TolX;
+        Standard_Real aTwoPIdiv17 = NAN, u1 = NAN, v1 = NAN, u2 = NAN, v2 = NAN, TolX = NAN;
         //
         aTwoPIdiv17=2.*M_PI/17.;
         //
@@ -568,7 +570,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
 #endif
 
     //
-    Standard_Integer ifprm, ilprm;
+    Standard_Integer ifprm = 0, ilprm = 0;
     //
     if (!myApprox) {
       aNbParts=myLConstruct.NbParts();
@@ -595,11 +597,11 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
     }
     //
     else {
-      Standard_Boolean bIsDecomposited;
-      Standard_Integer nbiter, aNbSeqOfL;
+      Standard_Boolean bIsDecomposited = 0;
+      Standard_Integer nbiter = 0, aNbSeqOfL = 0;
       GeomInt_WLApprox theapp3d;
       IntPatch_SequenceOfLine aSeqOfL;
-      Standard_Real tol2d, aTolSS;
+      Standard_Real tol2d = NAN, aTolSS = NAN;
       //       
       tol2d = myTolApprox;
       aTolSS=2.e-7;
@@ -705,7 +707,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
             myTolReached3d = theapp3d.TolReached3d();
           }
 
-          Standard_Integer aNbMultiCurves, nbpoles;
+          Standard_Integer aNbMultiCurves = 0, nbpoles = 0;
           //
           aNbMultiCurves=theapp3d.NbMultiCurves(); 
           for (j=1; j<=aNbMultiCurves; j++) {
@@ -719,7 +721,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
               mbspc.Curve(1,tpoles2d);
               const gp_Pln&  Pln = myHS1->Plane();
               //
-              Standard_Integer ik; 
+              Standard_Integer ik = 0
               for(ik = 1; ik<= nbpoles; ik++) { 
                 tpoles.SetValue(ik,
                   ElSLib::Value(tpoles2d.Value(ik).X(),
@@ -782,7 +784,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
               mbspc.Curve((myApprox1==Standard_True)? 2 : 1,tpoles2d);
               const gp_Pln&  Pln = myHS2->Plane();
               //
-              Standard_Integer ik; 
+              Standard_Integer ik = 0
               for(ik = 1; ik<= nbpoles; ik++) { 
                 tpoles.SetValue(ik,
                   ElSLib::Value(tpoles2d.Value(ik).X(),
@@ -916,7 +918,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
         Handle(IntPatch_RLine)::DownCast(L);
       Handle(Geom_Curve) aC3d;
       Handle(Geom2d_Curve) aC2d1, aC2d2;
-      Standard_Real aTolReached;
+      Standard_Real aTolReached = NAN;
       TreatRLine(RL, myHS1, myHS2, aC3d,
                   aC2d1, aC2d2, aTolReached);
 
@@ -1009,7 +1011,7 @@ void GeomInt_IntSS::TreatRLine(const Handle(IntPatch_RLine)& theRL,
 {
   Handle(GeomAdaptor_Surface) aGAHS;
   Handle(Adaptor2d_Curve2d) anAHC2d;
-  Standard_Real tf, tl;
+  Standard_Real tf = NAN, tl = NAN;
   gp_Lin2d aL;
   // It is assumed that 2d curve is 2d line (rectangular surface domain)
   if(theRL->IsArcOnS1())
@@ -1169,8 +1171,8 @@ void GeomInt_IntSS::BuildPCurves (const Standard_Real theFirst, const Standard_R
   //
   if (theSurface->IsUPeriodic() && !theCurve2d.IsNull()) {
     // Recadre dans le domaine UV de la face
-    Standard_Real aTm, U0, aEps, period, du, U0x;
-    Standard_Boolean bAdjust;
+    Standard_Real aTm = NAN, U0 = NAN, aEps = NAN, period = NAN, du = NAN, U0x = NAN;
+    Standard_Boolean bAdjust = 0;
     //
     aEps = Precision::PConfusion();
     period = theSurface->UPeriod();
@@ -1205,7 +1207,7 @@ void GeomInt_IntSS::BuildPCurves (const Standard_Real f,
     return;
   }
   //
-  Standard_Real umin,umax,vmin,vmax;
+  Standard_Real umin = NAN,umax = NAN,vmin = NAN,vmax = NAN;
   // 
   S->Bounds(umin, umax, vmin, vmax);
   
@@ -1360,7 +1362,7 @@ Handle(Geom2d_BSplineCurve) GeomInt_IntSS::
   Standard_Integer i = 1, ipidebm1 = ideb;
   for(; i <= nbpnt; ipidebm1++, i++)
   {
-    Standard_Real U, V;
+    Standard_Real U = NAN, V = NAN;
     if(onFirst)
          theWLine->Point(ipidebm1).ParametersOnS1(U, V);
     else
index 9862f6fe1bd3fb808c31b38619771f545c24444a..688c09e8c7a9ac4332dbe981f0e63325bcf0ace6 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <algorithm>
 
 #include <Adaptor2d_Curve2d.hxx>
@@ -122,13 +124,13 @@ static void RejectDuplicates(NCollection_Array1<GeomInt_Vertex>& theVtxArr);
 //=======================================================================
 void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
 {
-  Standard_Integer i,nbvtx;
-  Standard_Real firstp,lastp;
+  Standard_Integer i = 0,nbvtx = 0;
+  Standard_Real firstp = NAN,lastp = NAN;
   const Standard_Real Tol = Precision::PConfusion() * 35.0;
   
   const IntPatch_IType typl = L->ArcType();
   if(typl == IntPatch_Analytic)  {
-    Standard_Real u1,v1,u2,v2;
+    Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
     Handle(IntPatch_ALine) ALine (Handle(IntPatch_ALine)::DownCast (L));
     seqp.Clear();
     nbvtx = GeomInt_LineTool::NbVertex(L);
@@ -154,7 +156,7 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
     return;
   } // if(typl == IntPatch_Analytic)  {
   else if(typl == IntPatch_Walking)  {
-    Standard_Real u1,v1,u2,v2;
+    Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
     Handle(IntPatch_WLine) WLine (Handle(IntPatch_WLine)::DownCast (L));
     seqp.Clear();
     nbvtx = GeomInt_LineTool::NbVertex(L);
@@ -201,7 +203,7 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
             //more strict check (all two points of WLine are checksed) is
             //applied in this case.
 
-            Standard_Real aU21, aV21, aU22, aV22;
+            Standard_Real aU21 = NAN, aV21 = NAN, aU22 = NAN, aV22 = NAN;
             const IntSurf_PntOn2S& aPfirst = WLine->Point((Standard_Integer) (firstp));
             const IntSurf_PntOn2S& aPlast = WLine->Point((Standard_Integer) (lastp));
             aPfirst.Parameters(u1, v1, u2, v2);
@@ -264,11 +266,11 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
     //     Why -? It is not known yet. 
     //                                             PKV 22.Apr.2002
     //
-    Standard_Integer aNbParts;
+    Standard_Integer aNbParts = 0;
     //
     aNbParts = seqp.Length()/2;
     if (aNbParts > 1) {  
-      Standard_Boolean bCond;
+      Standard_Boolean bCond = 0;
       GeomAbs_SurfaceType aST1, aST2;
       aST1 = myHS1->GetType();
       aST2 = myHS2->GetType();
@@ -288,7 +290,7 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
       }
       //
       if (bCond) {
-        Standard_Integer aNb, anIndex, aNbTmp, jx;
+        Standard_Integer aNb = 0, anIndex = 0, aNbTmp = 0, jx = 0;
         TColStd_IndexedMapOfInteger aMap;
         TColStd_SequenceOfReal aSeqTmp;
         //
@@ -334,8 +336,8 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
       return;
     }
     //----------------------------
-    Standard_Boolean intrvtested;
-    Standard_Real u1,v1,u2,v2;
+    Standard_Boolean intrvtested = 0;
+    Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
     //
     nbvtx = GeomInt_LineTool::NbVertex(L);
     intrvtested = Standard_False;
@@ -473,7 +475,7 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
   }
   
   if (i > nbvtx)  {
-    Standard_Real U,V;
+    Standard_Real U = NAN,V = NAN;
     for (i=1; i<=GeomInt_LineTool::NbVertex(L); i++ )    {
       if (!GeomInt_LineTool::Vertex(L,i).IsOnDomS1() )      {
         GeomInt_LineTool::Vertex(L,i).ParametersOnS1(U,V);
@@ -498,7 +500,7 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
   }
   
   if (i > nbvtx)  {
-    Standard_Real U,V;
+    Standard_Real U = NAN,V = NAN;
     for (i=1; i<=GeomInt_LineTool::NbVertex(L); i++ )    {
       if (!GeomInt_LineTool::Vertex(L,i).IsOnDomS2() )      {
         GeomInt_LineTool::Vertex(L,i).ParametersOnS2(U,V);
@@ -620,7 +622,7 @@ void GeomInt_LineConstructor::TreatCircle(const Handle(IntPatch_Line)& theLine,
 
   std::sort(aVtxArr.begin(), aVtxArr.end());
 
-  Standard_Real aU1, aV1, aU2, aV2;
+  Standard_Real aU1 = NAN, aV1 = NAN, aU2 = NAN, aV2 = NAN;
   gp_Pnt aPmid;
   gp_Pnt2d aP2D;
   for (Standard_Integer i = aVtxArr.Lower(); i <= aVtxArr.Upper() - 1; i++)
@@ -663,7 +665,7 @@ void AdjustPeriodic(const Handle(GeomAdaptor_Surface)& myHS1,
                     Standard_Real& u2,
                     Standard_Real& v2)
 {
-  Standard_Boolean myHS1IsUPeriodic, myHS1IsVPeriodic;
+  Standard_Boolean myHS1IsUPeriodic = 0, myHS1IsVPeriodic = 0;
   const GeomAbs_SurfaceType typs1 = myHS1->GetType();
   switch (typs1)
   {
@@ -687,7 +689,7 @@ void AdjustPeriodic(const Handle(GeomAdaptor_Surface)& myHS1,
       break;
     }
   }
-  Standard_Boolean myHS2IsUPeriodic, myHS2IsVPeriodic;
+  Standard_Boolean myHS2IsUPeriodic = 0, myHS2IsVPeriodic = 0;
   const GeomAbs_SurfaceType typs2 = myHS2->GetType();
   switch (typs2)
   {
@@ -711,7 +713,7 @@ void AdjustPeriodic(const Handle(GeomAdaptor_Surface)& myHS1,
       break;
     }
   }
-  Standard_Real du, dv;
+  Standard_Real du = NAN, dv = NAN;
   //
   if (myHS1IsUPeriodic)
   {
@@ -832,8 +834,8 @@ Standard_Boolean RejectMicroCircle(const Handle(IntPatch_GLine)& aGLine,
                                    const IntPatch_IType aType,
                                    const Standard_Real aTol3D)
 {
-  Standard_Boolean bRet;
-  Standard_Real aR;
+  Standard_Boolean bRet = 0;
+  Standard_Real aR = NAN;
   //
   bRet=Standard_False;
   //
index f33fedb3f9fb93e5c157aeaf11d79db45c21de65..d4f1f01022843f7a4e61b3a0185a39ed841637a5 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomInt_LineTool.hxx>
 
 #include <Extrema_ExtPS.hxx>
@@ -233,7 +235,7 @@ static Standard_Boolean FindPoint(const gp_Pnt2d&     theFirstPoint,
       gp_Vec2d acurvec(theLastPoint, acurpoint);
 
       //
-      Standard_Real aDotX, anAngleX, aPC;
+      Standard_Real aDotX = NAN, anAngleX = NAN, aPC = NAN;
       //
       aDotX=aVec.Dot(acurvec);
       anAngleX=aVec.Angle(acurvec);
@@ -311,7 +313,7 @@ Standard_Real GeomInt_LineTool::FirstParameter (const Handle(IntPatch_Line)& L)
       Handle(IntPatch_ALine) alin = Handle(IntPatch_ALine)::DownCast(L);
       if (alin->HasFirstPoint())
         return alin->FirstPoint().ParameterOnLine();
-      Standard_Boolean included;
+      Standard_Boolean included = 0;
       Standard_Real firstp = alin->FirstParameter(included);
       if (!included)
         firstp += Epsilon(firstp);
@@ -363,7 +365,7 @@ Standard_Real GeomInt_LineTool::LastParameter (const Handle(IntPatch_Line)& L)
       Handle(IntPatch_ALine) alin = Handle(IntPatch_ALine)::DownCast(L);
       if (alin->HasLastPoint())
         return alin->LastPoint().ParameterOnLine();
-      Standard_Boolean included;
+      Standard_Boolean included = 0;
       Standard_Real lastp = alin->LastParameter(included);
       if (!included)
         lastp -=Epsilon(lastp);
@@ -421,9 +423,9 @@ Standard_Boolean GeomInt_LineTool::
   typedef std::vector<ListOfInteger, NCollection_StdAllocator<
       ListOfInteger> > ArrayOfListOfInteger;
 
-  Standard_Boolean bIsPrevPointOnBoundary, bIsCurrentPointOnBoundary;
-  Standard_Integer nblines, aNbPnts, aNbParts, pit, i, j, aNbListOfPointIndex;
-  Standard_Real aTol, umin, umax, vmin, vmax;
+  Standard_Boolean bIsPrevPointOnBoundary = 0, bIsCurrentPointOnBoundary = 0;
+  Standard_Integer nblines = 0, aNbPnts = 0, aNbParts = 0, pit = 0, i = 0, j = 0, aNbListOfPointIndex = 0;
+  Standard_Real aTol = NAN, umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
 
   //an inc allocator, it will contain wasted space (upon list's Clear()) but it should
   //still be faster than the standard allocator, and wasted memory should not be
@@ -476,16 +478,16 @@ Standard_Boolean GeomInt_LineTool::
       aGASurface->Surface()->Bounds(umin, umax, vmin, vmax);
       //
       for(j=0; j<2; j++) {// exploration of coordinate U,V
-       Standard_Boolean isperiodic;
+       Standard_Boolean isperiodic = 0;
        //
        isperiodic = (!j) ? aGASurface->IsUPeriodic() : aGASurface->IsVPeriodic();
        if(!isperiodic) {
          continue;
        }
        //
-       Standard_Real aResolution, aPeriod, alowerboundary, aupperboundary, U, V;
-       Standard_Real aParameter, anoffset, anAdjustPar;
-       Standard_Boolean bIsOnFirstBoundary, bIsPointOnBoundary;
+       Standard_Real aResolution = NAN, aPeriod = NAN, alowerboundary = NAN, aupperboundary = NAN, U = NAN, V = NAN;
+       Standard_Real aParameter = NAN, anoffset = NAN, anAdjustPar = NAN;
+       Standard_Boolean bIsOnFirstBoundary = 0, bIsPointOnBoundary = 0;
        //
        aResolution = (!j) ? aGASurface->UResolution(aTol) : aGASurface->VResolution(aTol);
        aPeriod     = (!j) ? aGASurface->UPeriod() : aGASurface->VPeriod();
@@ -546,7 +548,7 @@ Standard_Boolean GeomInt_LineTool::
   }
   //
   // Correct wlines.begin
-  Standard_Integer aLineType;
+  Standard_Integer aLineType = 0;
   TColStd_Array1OfListOfInteger anArrayOfLineEnds(1, nblines);
   Handle(IntSurf_LineOn2S) aSeqOfPntOn2S = new IntSurf_LineOn2S (new NCollection_IncAllocator());
   //
@@ -562,7 +564,7 @@ Standard_Boolean GeomInt_LineTool::
     }
     //
     TColStd_ListOfInteger aListOfFLIndex;
-    Standard_Integer aneighbourindex, aLineTypeNeib;
+    Standard_Integer aneighbourindex = 0, aLineTypeNeib = 0;
     //
     for(j = 0; j < 2; j++) {// neighbour line choice 
       aneighbourindex = (!j) ? (i-1) : (i+1);
@@ -581,7 +583,7 @@ Standard_Boolean GeomInt_LineTool::
       // check if need use derivative.begin .end [absence]
       //
       IntSurf_PntOn2S aNewP = aPoint;
-      Standard_Integer surfit, parit;
+      Standard_Integer surfit = 0, parit = 0;
       //
       for(surfit = 0; surfit < 2; ++surfit) {
 
@@ -655,7 +657,7 @@ Standard_Boolean GeomInt_LineTool::
            anotherPar += anoffset;
            Standard_Integer aneighbourpointindex = (j == 0) ? aListOfIndex.First() : aListOfIndex.Last();
            const IntSurf_PntOn2S& aNeighbourPoint = theWLine->Point(aneighbourpointindex);
-           Standard_Real nU1, nV1;
+           Standard_Real nU1 = NAN, nV1 = NAN;
 
            if(surfit == 0)
              aNeighbourPoint.ParametersOnS1(nU1, nV1);
@@ -697,7 +699,7 @@ Standard_Boolean GeomInt_LineTool::
              while((anindexother <= aListOfIndex.Last()) && (anindexother >= aListOfIndex.First())) {
                anindexother = (j == 0) ? (anindexother + 1) : (anindexother - 1);
                const IntSurf_PntOn2S& aPrevNeighbourPoint = theWLine->Point(anindexother);
-               Standard_Real nU2, nV2;
+               Standard_Real nU2 = NAN, nV2 = NAN;
                
                if(surfit == 0)
                  aPrevNeighbourPoint.ParametersOnS1(nU2, nV2);
@@ -714,7 +716,7 @@ Standard_Boolean GeomInt_LineTool::
                  if((fabs(anAngle) < (M_PI * 0.25)) && (aNewVec.Dot(aVecOld) > 0.)) {
 
                    if(bCheckAngle1) {
-                     Standard_Real U1, U2, V1, V2;
+                     Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
                      IntSurf_PntOn2S atmppoint = aNewP;
                      atmppoint.SetValue((surfit == 0), anewU, anewV);
                      atmppoint.Parameters(U1, V1, U2, V2);
@@ -744,7 +746,7 @@ Standard_Boolean GeomInt_LineTool::
        if(bComputeLineEnd) {
          Standard_Integer aneighbourpointindex1 = (j == 0) ? aListOfIndex.First() : aListOfIndex.Last();
          const IntSurf_PntOn2S& aNeighbourPoint = theWLine->Point(aneighbourpointindex1);
-         Standard_Real nU1, nV1;
+         Standard_Real nU1 = NAN, nV1 = NAN;
 
          if(surfit == 0)
            aNeighbourPoint.ParametersOnS1(nU1, nV1);
@@ -757,7 +759,7 @@ Standard_Boolean GeomInt_LineTool::
          while((aneighbourpointindex2 <= aListOfIndex.Last()) && (aneighbourpointindex2 >= aListOfIndex.First())) {
            aneighbourpointindex2 = (j == 0) ? (aneighbourpointindex2 + 1) : (aneighbourpointindex2 - 1);
            const IntSurf_PntOn2S& aPrevNeighbourPoint = theWLine->Point(aneighbourpointindex2);
-           Standard_Real nU2, nV2;
+           Standard_Real nU2 = NAN, nV2 = NAN;
 
            if(surfit == 0)
              aPrevNeighbourPoint.ParametersOnS1(nU2, nV2);
@@ -964,8 +966,8 @@ Standard_Boolean GeomInt_LineTool::
   // Split wlines.end
   //
   // cda002/I3
-  Standard_Real fprm, lprm;
-  Standard_Integer ifprm, ilprm, aNbPoints, aIndex;
+  Standard_Real fprm = NAN, lprm = NAN;
+  Standard_Integer ifprm = 0, ilprm = 0, aNbPoints = 0, aIndex = 0;
   //
   aNbParts=theLConstructor.NbParts();
   //
index 3d48a5ae7d5f50e73b1105c0690759920a1aca25..2b88442e4d89c7fee414e883f28515e52681077c 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomLProp.hxx>
 
 #include <Geom_BSplineCurve.hxx>
@@ -68,13 +70,13 @@ GeomAbs_Shape GeomLProp::Continuity(const Handle(Geom_Curve)& C1,
                                    const Standard_Real ta)
 {
   GeomAbs_Shape cont = GeomAbs_C0;
-  Standard_Integer index1,
-    index2 ;
-  Standard_Real  tolerance ;
+  Standard_Integer index1 = 0,
+    index2 = 0 ;
+  Standard_Real  tolerance = NAN ;
   Standard_Boolean fini = Standard_False;
   gp_Vec d1,d2;
   gp_Dir dir1,dir2;
-  Standard_Integer cont1, cont2 ;
+  Standard_Integer cont1 = 0, cont2 = 0 ;
   GeomAbs_Shape gcont1 = C1->Continuity(), gcont2 = C2->Continuity();
   cont1 = GeomAbsToInteger(gcont1) ;
   cont2 = GeomAbsToInteger(gcont2) ;
index fcb2305344361980c7d885f403d518fcec2e601c..9fd144d906088ad40ed451aadf984c1b88a110a1 100644 (file)
@@ -41,6 +41,8 @@
 // Purpose:    
 // Declarations:       
 
+#include <math.h>
+
 #include <GeomLib.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -145,7 +147,7 @@ static void ComputeLambda(const math_Matrix& Constraint,
 {
   Standard_Integer size = Hermit.RowNumber();
   Standard_Integer Continuity = size-2;
-  Standard_Integer ii, jj, ip, pp;
+  Standard_Integer ii = 0, jj = 0, ip = 0, pp = 0;
 
   //Minimization
   math_Matrix HDer(1, size-1, 1, size);
@@ -165,7 +167,7 @@ static void ComputeLambda(const math_Matrix& Constraint,
   Standard_Real * valhder =  &V(1);
   Vec2 =  Constraint.Col(2);
   Vec2 /= Length;
-  Standard_Real t,  squared1 = Vec2.Norm2(), GW;
+  Standard_Real t = NAN,  squared1 = Vec2.Norm2(), GW = NAN;
 //  math_Matrix Vec(1, Constraint.RowNumber(), 1, size-1);
 //  gp_Vec Vfirst(p0.XYZ()), Vlast(Point.XYZ());
 //  TColgp_Array1OfVec Der(2, 4);
@@ -233,7 +235,7 @@ static void ComputeLambda(const math_Matrix& Constraint,
     }
   }
 
-  Standard_Real EMin, E;
+  Standard_Real EMin = NAN, E = NAN;
   PLib::NoDerivativeEvalPolynomial(Lambda , pol4.Length()-1, 1, 
                                   pol4.Length()-1,
                                   pol4(1), EMin); 
@@ -270,14 +272,14 @@ void GeomLib::RemovePointsFromArray(const Standard_Integer NumPoints,
                                    const TColStd_Array1OfReal& InParameters,
                                    Handle(TColStd_HArray1OfReal)& OutParameters) 
 {
- Standard_Integer ii,
-   jj,
-   add_one_point,
-   loc_num_points,
-   num_points,
-   index ;
- Standard_Real delta,
-   current_parameter ;
+ Standard_Integer ii = 0,
+   jj = 0,
+   add_one_point = 0,
+   loc_num_points = 0,
+   num_points = 0,
+   index = 0 ;
+ Standard_Real delta = NAN,
+   current_parameter = NAN ;
 
    loc_num_points = Max(0,NumPoints-2) ;
    delta = InParameters(InParameters.Upper()) - InParameters(InParameters.Lower()) ;
@@ -326,13 +328,13 @@ void GeomLib::DensifyArray1OfReal(const Standard_Integer MinNumPoints,
                                  const TColStd_Array1OfReal& InParameters,
                                  Handle(TColStd_HArray1OfReal)& OutParameters) 
 {
- Standard_Integer ii,
-   in_order,
-   num_points,
-   num_parameters_to_add,
-   index ;
- Standard_Real delta,
-   current_parameter ;
+ Standard_Integer ii = 0,
+   in_order = 0,
+   num_points = 0,
+   num_parameters_to_add = 0,
+   index = 0 ;
+ Standard_Real delta = NAN,
+   current_parameter = NAN ;
 
  in_order = 1 ;
  if (MinNumPoints > InParameters.Length()) {
@@ -408,7 +410,7 @@ void GeomLib::FuseIntervals(const  TColStd_Array1OfReal& I1,
                             const Standard_Boolean IsAdjustToFirstInterval)
 {
  Standard_Integer ind1=1, ind2=1;
- Standard_Real    v1, v2;
+ Standard_Real    v1 = NAN, v2 = NAN;
 // Initialisations : les IND1 et IND2 pointent sur le 1er element
 // de chacune des 2 tables a traiter.INDS pointe sur le dernier
 // element cree de TABSOR
@@ -474,11 +476,11 @@ void GeomLib::EvalMaxParametricDistance(const Adaptor3d_Curve& ACurve,
                               const TColStd_Array1OfReal& Parameters,
                               Standard_Real& MaxDistance) 
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
 
   Standard_Real max_squared = 0.0e0,
 //    tolerance_squared,
-    local_distance_squared ;
+    local_distance_squared = NAN ;
 
 //  tolerance_squared = Tolerance * Tolerance ;
   gp_Pnt Point1 ;
@@ -511,12 +513,12 @@ void GeomLib::EvalMaxDistanceAlongParameter(const Adaptor3d_Curve& ACurve,
                               const TColStd_Array1OfReal& Parameters,
                               Standard_Real& MaxDistance) 
 {
-  Standard_Integer ii ;
+  Standard_Integer ii = 0 ;
   Standard_Real max_squared = 0.0e0,
     tolerance_squared = Tolerance * Tolerance,
-    other_parameter,
-    para_tolerance,
-    local_distance_squared ;
+    other_parameter = NAN,
+    para_tolerance = NAN,
+    local_distance_squared = NAN ;
   gp_Pnt Point1 ;
   gp_Pnt Point2 ;
 
@@ -912,7 +914,7 @@ void GeomLib::SameRange(const Standard_Real         Tolerance,
       Handle(Geom2d_Circle) Circ = 
         Handle(Geom2d_Circle)::DownCast(NewCurvePtr);
       gp_Pnt2d P = Circ->Location();
-      Standard_Real dU;
+      Standard_Real dU = NAN;
       if (Circ->Circ2d().IsDirect()) {
         dU = FirstOnCurve - RequestedFirst;
       }
@@ -1017,12 +1019,12 @@ class GeomLib_CurveOnSurfaceEvaluator : public AdvApprox_EvaluatorFunction
                                    Standard_Real theFirst, Standard_Real theLast)
     : CurveOnSurface(theCurveOnSurface), FirstParam(theFirst), LastParam(theLast) {}
   
-  virtual void Evaluate (Standard_Integer *Dimension,
+  void Evaluate (Standard_Integer *Dimension,
                         Standard_Real     StartEnd[2],
                          Standard_Real    *Parameter,
                          Standard_Integer *DerivativeRequest,
                          Standard_Real    *Result, // [Dimension]
-                         Standard_Integer *ErrorCode);
+                         Standard_Integer *ErrorCode) override;
   
  private:
   Adaptor3d_CurveOnSurface& CurveOnSurface;
@@ -1125,8 +1127,8 @@ void GeomLib::BuildCurve3d(const Standard_Real           Tolerance,
 
     Handle(Adaptor2d_Curve2d) TrimmedC2D = geom_adaptor_curve_ptr->Trim (FirstParameter, LastParameter, Precision::PConfusion());
 
-    Standard_Boolean isU, isForward;
-    Standard_Real aParam;
+    Standard_Boolean isU = 0, isForward = 0;
+    Standard_Real aParam = NAN;
     if (isIsoLine(TrimmedC2D, isU, aParam, isForward))
     {
       NewCurvePtr = buildC3dOnIsoLine (TrimmedC2D, geom_adaptor_surface_ptr, FirstParameter, LastParameter, Tolerance, isU, aParam, isForward);
@@ -1204,7 +1206,7 @@ void GeomLib::AdjustExtremity(Handle(Geom_BoundedCurve)& Curve,
   Handle(Geom_BSplineCurve) aIn, aDef;  
   aIn = GeomConvert::CurveToBSplineCurve(Curve, Convert_QuasiAngular);
 
-  Standard_Integer ii, jj;
+  Standard_Integer ii = 0, jj = 0;
   gp_Pnt P;
   gp_Vec V, Vtan, DV;
   TColgp_Array1OfPnt PolesDef(1,4), Coeffs(1,4);
@@ -1289,10 +1291,10 @@ void GeomLib::ExtendCurveToPoint(Handle(Geom_BoundedCurve)& Curve,
 {
   if(Continuity < 1 || Continuity > 3) return;
   Standard_Integer size = Continuity + 2;
-  Standard_Real Ubord, Tol=1.e-6;
+  Standard_Real Ubord = NAN, Tol=1.e-6;
   math_Matrix  MatCoefs(1,size, 1,size);
-  Standard_Real Lambda, L1;
-  Standard_Integer ii, jj;
+  Standard_Real Lambda = NAN, L1 = NAN;
+  Standard_Integer ii = 0, jj = 0;
   gp_Vec d1, d2, d3;
   gp_Pnt p0;
 // il faut Convertir l'entree (en preservant si possible le parametrage)
@@ -1326,7 +1328,7 @@ void GeomLib::ExtendCurveToPoint(Handle(Geom_BoundedCurve)& Curve,
     // a sur la courbe.
     gp_Vec daux;
     gp_Pnt pp;
-    Standard_Real f= Curve->FirstParameter(), t, dt, norm
+    Standard_Real f= Curve->FirstParameter(), t = NAN, dt = NAN, norm = NAN
     dt = (Curve->LastParameter()-f)/9;
     norm = d1.Magnitude();
     for (ii=1, t=f+dt; ii<=8; ii++, t+=dt) {
@@ -1385,7 +1387,7 @@ void GeomLib::ExtendCurveToPoint(Handle(Geom_BoundedCurve)& Curve,
   Handle(Geom_BezierCurve) Bezier = new (Geom_BezierCurve) (ExtrapPoles);
 
   Standard_Real dist = ExtrapPoles(1).Distance(p0);
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   Tol += dist;
 
   // Concatenation
@@ -1410,7 +1412,7 @@ ExtendKPart(Handle(Geom_RectangularTrimmedSurface)& Surface,
   if  (Surface.IsNull()) return Standard_False;
 
   Standard_Boolean Ok=Standard_True;
-  Standard_Real Uf, Ul, Vf, Vl;
+  Standard_Real Uf = NAN, Ul = NAN, Vf = NAN, Vl = NAN;
   Handle(Geom_Surface) Support = Surface->BasisSurface();
   GeomAbs_SurfaceType Type;
 
@@ -1498,7 +1500,7 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface,
 
   // si BS etait periodique dans le sens de l'extension, elle ne le sera plus
   if ( (InU&&(BS->IsUPeriodic())) || (!InU&&(BS->IsVPeriodic())) ) {
-    Standard_Real U0,U1,V0,V1;
+    Standard_Real U0 = NAN,U1 = NAN,V0 = NAN,V1 = NAN;
     BS->Bounds(U0,U1,V0,V1);
     BS->Segment(U0,U1,V0,V1);
   }     
@@ -1508,7 +1510,7 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface,
 //   Standard_Boolean rational = ( InU && BS->IsURational() ) 
 //                                   || ( !InU && BS->IsVRational() ) ;
   Standard_Boolean rational = (BS->IsURational() ||  BS->IsVRational());
-  Standard_Boolean NullWeight;
+  Standard_Boolean NullWeight = 0;
    Standard_Real EpsW = 10*Precision::PConfusion();
   Standard_Integer gap = 3;
   if ( rational ) gap++;
@@ -1516,10 +1518,10 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface,
 
         
   Standard_Integer Cdeg = 0, Cdim = 0, NbP = 0, Ksize = 0, Psize = 1;
-  Standard_Integer ii, jj, ipole, Kount;  
-  Standard_Real Tbord, lambmin=Length;
+  Standard_Integer ii = 0, jj = 0, ipole = 0, Kount = 0;  
+  Standard_Real Tbord = NAN, lambmin=Length;
   Standard_Real * Padr = NULL;
-  Standard_Boolean Ok;
+  Standard_Boolean Ok = 0;
   Handle(TColStd_HArray1OfReal)  FKnots, Point, lambda, Tgte, Poles;
 
   
@@ -1614,7 +1616,7 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface,
 
     gp_Vec CurT, OldT;
   
-    Standard_Real NTgte, val, Tgtol = 1.e-12, OldN = 0.0;
+    Standard_Real NTgte = NAN, val = NAN, Tgtol = 1.e-12, OldN = 0.0;
     if (rational) {
       for (ii=gap;ii<=Cdim;ii+=gap) {
        tgte(ii) = 0.;
@@ -1701,14 +1703,14 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface,
   }
   
 //  tableaux necessaires pour l'extension
-  Standard_Integer Ksize2 = Ksize+Cdeg, NbPoles, NbKnots = 0;
+  Standard_Integer Ksize2 = Ksize+Cdeg, NbPoles = 0, NbKnots = 0;
   TColStd_Array1OfReal  FK(1, Ksize2) ; 
   Standard_Real * FKRadr = &FK(1);
 
   Standard_Integer Psize2 = Psize+Cdeg*Cdim;
   TColStd_Array1OfReal  PRes(1, Psize2) ; 
   Standard_Real * PRadr = &PRes(1);
-  Standard_Real ww;
+  Standard_Real ww = NAN;
   Standard_Boolean ExtOk = Standard_False;
   Handle(TColgp_HArray2OfPnt) NewPoles;
   Handle(TColStd_HArray2OfReal) NewWeights;
@@ -1723,7 +1725,7 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface,
                                     NbPoles, NbKnots,*FKRadr, *PRadr);
 
     //  recopie des poles du resultat sous forme de points 3D et de poids
-    Standard_Integer NU, NV, indice ;
+    Standard_Integer NU = 0, NV = 0, indice = 0 ;
     if (InU) {
       NU = NbPoles;
       NV = BS->NbVPoles();
@@ -1801,7 +1803,7 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface,
 
 // recopie des noeuds plats sous forme de noeuds avec leurs multiplicites
 // calcul des degres du resultat
-  Standard_Integer Usize = BS->NbUKnots(), Vsize = BS->NbVKnots(), UDeg, VDeg;
+  Standard_Integer Usize = BS->NbUKnots(), Vsize = BS->NbVKnots(), UDeg = 0, VDeg = 0;
   if (InU) 
     Usize++;
   else
@@ -1860,7 +1862,7 @@ void GeomLib::Inertia(const TColgp_Array1OfPnt& Points,
   gp_XYZ GB(0., 0., 0.), Diff;
 //  gp_Vec A,B,C,D;
 
-  Standard_Integer i,nb=Points.Length();
+  Standard_Integer i = 0,nb=Points.Length();
   GB.SetCoord(0.,0.,0.);
   for (i=1; i<=nb; i++) 
       GB += Points(i).XYZ();
@@ -1893,14 +1895,14 @@ void GeomLib::Inertia(const TColgp_Array1OfPnt& Points,
 #endif
   }
 
-  Standard_Real n1,n2,n3;
+  Standard_Real n1 = NAN,n2 = NAN,n3 = NAN;
 
   n1=J.Value(1);
   n2=J.Value(2);
   n3=J.Value(3);
 
-  Standard_Real r1 = Min(Min(n1,n2),n3), r2;
-  Standard_Integer m1, m2, m3;
+  Standard_Real r1 = Min(Min(n1,n2),n3), r2 = NAN;
+  Standard_Integer m1 = 0, m2 = 0, m3 = 0;
   if (r1==n1) {
     m1 = 1;
     r2 = Min(n2,n3);
@@ -1963,7 +1965,7 @@ void GeomLib::AxeOfInertia(const TColgp_Array1OfPnt& Points,
 {
   gp_Pnt Bary;
   gp_Dir OX,OY,OZ;
-  Standard_Real gx, gy, gz;
+  Standard_Real gx = NAN, gy = NAN, gz = NAN;
 
   GeomLib::Inertia(Points, Bary, OX, OY, gx, gy, gz);
   
@@ -1990,8 +1992,8 @@ void GeomLib::AxeOfInertia(const TColgp_Array1OfPnt& Points,
 
 static Standard_Boolean CanBeTreated(Handle(Geom_BSplineSurface)& BSurf)
      
-{Standard_Integer i;
- Standard_Real    lambda;                                    //proportionnality coefficient
+{Standard_Integer i = 0;
+ Standard_Real    lambda = NAN;                                    //proportionnality coefficient
  Standard_Boolean AlreadyTreated=Standard_True;
  
  if (!BSurf->IsURational()||(BSurf->IsUPeriodic()))
@@ -2030,11 +2032,11 @@ public:
   law_evaluator (const GeomLib_DenominatorMultiplierPtr theDenominatorPtr)
   : myDenominator (theDenominatorPtr) {}
 
-  virtual void Evaluate (const Standard_Integer theDerivativeRequest,
+  void Evaluate (const Standard_Integer theDerivativeRequest,
                          const Standard_Real    theUParameter,
                          const Standard_Real    theVParameter,
                          Standard_Real&         theResult,
-                         Standard_Integer&      theErrorCode) const
+                         Standard_Integer&      theErrorCode) const override
   {
     if ((myDenominator != NULL) && (theDerivativeRequest == 0))
     {
@@ -2061,7 +2063,7 @@ private:
 static Standard_Boolean CheckIfKnotExists(const TColStd_Array1OfReal&           surface_knots,
                                          const Standard_Real                   knot)
 
-{Standard_Integer    i;
+{Standard_Integer    i = 0;
  for (i=1;i<=surface_knots.Length();i++)
    if ((surface_knots(i)-Precision::Confusion()<=knot)&&(surface_knots(i)+Precision::Confusion()>=knot))
      return Standard_True;
@@ -2082,7 +2084,7 @@ static void AddAKnot(const TColStd_Array1OfReal&           knots,
                     Handle(TColStd_HArray1OfReal) &       newknots,
                     Handle(TColStd_HArray1OfInteger) &    newmults)
 
-{Standard_Integer      i;
+{Standard_Integer      i = 0;
 
  newknots=new TColStd_HArray1OfReal(1,knots.Length()+1);
  newmults=new TColStd_HArray1OfInteger(1,knots.Length()+1); 
@@ -2117,7 +2119,7 @@ static void BuildFlatKnot(const TColStd_Array1OfReal&           surface_knots,
                 Handle(TColStd_HArray1OfInteger)&     ResultMults)
                 
 {
-  Standard_Integer  i;
+  Standard_Integer  i = 0;
  
  if (CheckIfKnotExists(surface_knots,knotmin) &&
      CheckIfKnotExists(surface_knots,knotmax)){
@@ -2168,7 +2170,7 @@ static void FunctionMultiply(Handle(Geom_BSplineSurface)&          BSurf,
                                         1,BSurf->NbVPoles()) ;
  TColStd_Array2OfReal      surface_weights(1,BSurf->NbUPoles(),
                                           1,BSurf->NbVPoles()) ;
- Standard_Integer          i,j,k,status,new_num_u_poles,new_num_v_poles,length=0;
+ Standard_Integer          i = 0,j = 0,k = 0,status = 0,new_num_u_poles = 0,new_num_v_poles = 0,length=0;
  Handle(TColStd_HArray1OfReal)     newuknots,newvknots;
  Handle(TColStd_HArray1OfInteger)  newumults,newvmults;
 
@@ -2274,11 +2276,11 @@ static void FunctionMultiply(Handle(Geom_BSplineSurface)&          BSurf,
 
 static void CancelDenominatorDerivative1D(Handle(Geom_BSplineSurface) & BSurf)
      
-{Standard_Integer            i,j;
+{Standard_Integer            i = 0,j = 0;
  Standard_Real               uknotmin=1.0,uknotmax=0.0,
-                             x,y,
-                             startu_value,
-                             endu_value;
+                             x = NAN,y = NAN,
+                             startu_value = NAN,
+                             endu_value = NAN;
  TColStd_Array1OfReal        BSurf_u_knots(1,BSurf->NbUKnots()) ;
 
  startu_value=BSurf->UKnot(1);
@@ -2404,7 +2406,7 @@ Standard_Integer GeomLib::NormEstim (const Handle(Geom_Surface)& theSurf,
     return aStatus == CSLib_D1NIsNull ? 2 : 3;
   }
 
-  Standard_Real Umin, Umax, Vmin, Vmax;
+  Standard_Real Umin = NAN, Umax = NAN, Vmin = NAN, Vmax = NAN;
   Standard_Real step = 1.0e-5;
   Standard_Real eps  = 1.0e-16;
   Standard_Real sign = -1.0;
@@ -2516,7 +2518,7 @@ void GeomLib::IsClosed (const Handle(Geom_Surface)& S,
   GeomAdaptor_Surface aGAS(S);
   GeomAbs_SurfaceType aSType = aGAS.GetType();
   //
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
   u1 = aGAS.FirstUParameter();
   u2 = aGAS.LastUParameter();
   v1 = aGAS.FirstVParameter();
@@ -2646,8 +2648,8 @@ void GeomLib::IsClosed (const Handle(Geom_Surface)& S,
         nbp = Max(nbp, 2);
         dt = (v2 - v1) / (nbp - 1);
       }
-      Standard_Real t;
-      Standard_Integer i;
+      Standard_Real t = NAN;
+      Standard_Integer i = 0;
       for(i = 0; i < nbp;  ++i)
       {
         t = (i == nbp-1 ? v2 : v1 + i * dt);
@@ -2816,7 +2818,7 @@ static Standard_Boolean CompareWeightPoles(const TColgp_Array1OfPnt& thePoles1,
 //function : isIsoLine
 //purpose  :
 //=============================================================================
-Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
+Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
                                      Standard_Boolean&                theIsU,
                                      Standard_Real&                   theParam,
                                      Standard_Boolean&                theIsForward)
@@ -2896,8 +2898,8 @@ Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
 //function : buildC3dOnIsoLine
 //purpose  :
 //=============================================================================
-Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
-                                               const Handle(Adaptor3d_Surface) theSurf,
+Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
+                                               const Handle(Adaptor3d_Surface)& theSurf,
                                                const Standard_Real              theFirst,
                                                const Standard_Real              theLast,
                                                const Standard_Real              theTolerance,
@@ -2921,7 +2923,7 @@ Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) t
   gp_Pnt2d aL2d = theC2D->Value(theC2D->LastParameter());
 
   Standard_Boolean isToTrim = Standard_True;
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   aSurf->Bounds(U1, U2, V1, V2);
 
   if (theIsU)
index 71e817bb9042ddad0cc67b88774e850616e2cd06..a3a13fb96ab2a0a370996e087ec7b64812740c6b 100644 (file)
@@ -239,7 +239,7 @@ public:
   //! @param theParam     Line parameter.
   //! @param theIsForward Flag indicating forward parameterization on a isoline.
   //! @return Standard_True when 2d curve is a line and Standard_False otherwise.
-  Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
+  Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
                                                      Standard_Boolean&                theIsU,
                                                      Standard_Real&                   theParam,
                                                      Standard_Boolean&                theIsForward);
@@ -251,8 +251,8 @@ public:
   //! @param theParam Line parameter.
   //! @param theIsForward Flag indicating forward parameterization on a isoline.
   //! @return Standard_True when 3d curve is built and Standard_False otherwise.
-  Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
-                                                               const Handle(Adaptor3d_Surface) theSurf,
+  Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
+                                                               const Handle(Adaptor3d_Surface)& theSurf,
                                                                const Standard_Real              theFirst,
                                                                const Standard_Real              theLast,
                                                                const Standard_Real              theTolerance,
index ef25c17506f5c21092886837e68ee858d4f02949..a1eea680684580415831d97acf457f84e03e5bac 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_BSplineCurve.hxx>
 #include <Geom_BSplineCurve.hxx>
 #include <GeomLib_Check2dBSplineCurve.hxx>
@@ -37,11 +39,11 @@ GeomLib_Check2dBSplineCurve::GeomLib_Check2dBSplineCurve(const Handle(Geom2d_BSp
    myIndSecondPole(-1),
    myIndPrelastPole(-1)
 {
-  Standard_Integer ii,
-    num_poles ;
-  Standard_Real tangent_magnitude,
-    value,
-    vector_magnitude ;
+  Standard_Integer ii = 0,
+    num_poles = 0 ;
+  Standard_Real tangent_magnitude = NAN,
+    value = NAN,
+    vector_magnitude = NAN ;
   num_poles = myCurve->NbPoles() ;
   
   if (( ! myCurve->IsPeriodic() )&& num_poles >= 4) {
index 43cc8992b04bc32dfb3223ad8ba18531b99b46c8..956899a47391d42394b528a7de2f08cf4ecde58e 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_BSplineCurve.hxx>
 #include <GeomLib_CheckBSplineCurve.hxx>
 #include <gp_Pnt.hxx>
@@ -37,11 +39,11 @@ GeomLib_CheckBSplineCurve::GeomLib_CheckBSplineCurve(const Handle(Geom_BSplineCu
    myIndSecondPole(-1),
    myIndPrelastPole(-1)
 {
-  Standard_Integer ii,
-    num_poles ;
-  Standard_Real tangent_magnitude,
-    value,
-    vector_magnitude ;
+  Standard_Integer ii = 0,
+    num_poles = 0 ;
+  Standard_Real tangent_magnitude = NAN,
+    value = NAN,
+    vector_magnitude = NAN ;
   num_poles = myCurve->NbPoles() ;
   
   if (( ! myCurve->IsPeriodic() )&& num_poles >= 4) {
index 3e5df1ae20b54ecebaa27078e0ccfa7905b5973f..7499b3846a2a3e907df234dd9ebe52cdb1ad4cc9 100644 (file)
@@ -70,13 +70,13 @@ class GeomLib_CheckCurveOnSurface_TargetFunc :
   
   //returns the number of parameters of the function
   //(the function is one-dimension).
-  virtual Standard_Integer NbVariables() const {
+  Standard_Integer NbVariables() const override {
     return 1;
   }
   
   //returns value of the function when parameters are equal to theX
-  virtual Standard_Boolean Value(const math_Vector& theX,
-                                 Standard_Real& theFVal)
+  Standard_Boolean Value(const math_Vector& theX,
+                                 Standard_Real& theFVal) override
   {
     return Value(theX(1), theFVal);
   }
@@ -105,15 +105,15 @@ class GeomLib_CheckCurveOnSurface_TargetFunc :
   }
 
   //see analogical method for abstract owner class math_MultipleVarFunction
-  virtual Standard_Integer GetStateNumber()
+  Standard_Integer GetStateNumber() override
   {
     return 0;
   }
   
   //returns the gradient of the function when parameters are
   //equal to theX
-  virtual Standard_Boolean Gradient(const math_Vector& theX,
-                                    math_Vector& theGrad)
+  Standard_Boolean Gradient(const math_Vector& theX,
+                                    math_Vector& theGrad) override
   {
     return Derive(theX(1), theGrad(1));
   }
@@ -163,9 +163,9 @@ class GeomLib_CheckCurveOnSurface_TargetFunc :
   }
   
   //returns value and gradient   
-  virtual Standard_Boolean Values(const math_Vector& theX,
+  Standard_Boolean Values(const math_Vector& theX,
                                   Standard_Real& theVal,
-                                  math_Vector& theGrad) 
+                                  math_Vector& theGrad) override 
   {
     if (!Value(theX, theVal))
     {
@@ -180,10 +180,10 @@ class GeomLib_CheckCurveOnSurface_TargetFunc :
   }
 
   //returns value, gradient and hessian
-  virtual Standard_Boolean Values(const math_Vector& theX,
+  Standard_Boolean Values(const math_Vector& theX,
                                   Standard_Real& theVal,
                                   math_Vector& theGrad,
-                                  math_Matrix& theHessian)
+                                  math_Matrix& theHessian) override
   {
     if (!Value(theX, theVal))
     {
@@ -488,10 +488,10 @@ Standard_Integer FillSubIntervals(const Handle(Adaptor3d_Curve)& theCurve3d,
     }
     else
     {
-      Standard_Integer KnotCount;
+      Standard_Integer KnotCount = 0;
       if(isTrimmed3D)
       {
-        Standard_Integer i;
+        Standard_Integer i = 0;
         KnotCount = 0;
         const TColStd_Array1OfReal& aKnots = aBS3DCurv->Knots();
         for(i = aBS3DCurv->FirstUKnotIndex(); i <= aBS3DCurv->LastUKnotIndex(); ++i)
@@ -516,7 +516,7 @@ Standard_Integer FillSubIntervals(const Handle(Adaptor3d_Curve)& theCurve3d,
         anArrKnots3D = new TColStd_HArray1OfReal(1, aMaxKnots);
         anArrKnots3D->SetValue(1, theFirst);
         anArrKnots3D->SetValue(aMaxKnots, theLast);
-        Standard_Integer i;
+        Standard_Integer i = 0;
         Standard_Real dt = (theLast - theFirst) / (aMaxKnots - 1);
         Standard_Real t = theFirst + dt;
         for(i = 2; i < aMaxKnots; ++i, t += dt)
@@ -538,10 +538,10 @@ Standard_Integer FillSubIntervals(const Handle(Adaptor3d_Curve)& theCurve3d,
     }
     else
     {
-      Standard_Integer KnotCount;
+      Standard_Integer KnotCount = 0;
       if(isTrimmed2D)
       {
-        Standard_Integer i;
+        Standard_Integer i = 0;
         KnotCount = 0;
         const TColStd_Array1OfReal& aKnots = aBS2DCurv->Knots();
         for(i = aBS2DCurv->FirstUKnotIndex(); i <= aBS2DCurv->LastUKnotIndex(); ++i)
@@ -566,7 +566,7 @@ Standard_Integer FillSubIntervals(const Handle(Adaptor3d_Curve)& theCurve3d,
         anArrKnots2D = new TColStd_HArray1OfReal(1, aMaxKnots);
         anArrKnots2D->SetValue(1, theFirst);
         anArrKnots2D->SetValue(aMaxKnots, theLast);
-        Standard_Integer i;
+        Standard_Integer i = 0;
         Standard_Real dt = (theLast - theFirst) / (aMaxKnots - 1);
         Standard_Real t = theFirst + dt;
         for(i = 2; i < aMaxKnots; ++i, t += dt)
index 4f56a3d54955342ec2271bf7c87dd5dbc8be4d45..60472af1750be3787b2e60e724bd301b6de1e3f1 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BSplSLib.hxx>
 #include <Geom_BSplineSurface.hxx>
 #include <GeomLib_DenominatorMultiplier.hxx>
@@ -34,7 +36,7 @@ GeomLib_DenominatorMultiplier::GeomLib_DenominatorMultiplier
        (const Handle(Geom_BSplineSurface) & Surface,
         const TColStd_Array1OfReal &        KnotVector):mySurface(Surface),
                                                         myKnotFlatVector(1,KnotVector.Length())
-{Standard_Integer i;
+{Standard_Integer i = 0;
  for (i=1;i<=KnotVector.Length();i++)
    myKnotFlatVector.SetValue(i,KnotVector(i));
 }
@@ -47,8 +49,8 @@ GeomLib_DenominatorMultiplier::GeomLib_DenominatorMultiplier
 Standard_Real GeomLib_DenominatorMultiplier::Value(const Standard_Real  UParameter,
                                                   const Standard_Real  VParameter)const
 
-{Standard_Real  Dumaxv,Duminv,dDduumaxv,dDduuminv,
-                Dv,Buv=0.0;
+{Standard_Real  Dumaxv = NAN,Duminv = NAN,dDduumaxv = NAN,dDduuminv = NAN,
+                Dv = NAN,Buv=0.0;
 // gp_Pnt         HermPnt;
  gp_Pnt         N;
  gp_Vec         Nu,Nv;
@@ -61,7 +63,7 @@ Standard_Real GeomLib_DenominatorMultiplier::Value(const Standard_Real  UParamet
  
  TColStd_Array1OfReal      surface_v_knots(1,mySurface->NbVKnots()) ;
  TColStd_Array1OfInteger   surface_v_mults(1,mySurface->NbVKnots()) ;
- Standard_Integer          udegree,vdegree;
+ Standard_Integer          udegree = 0,vdegree = 0;
 
  mySurface->UKnots(surface_u_knots) ;
  mySurface->UMultiplicities(surface_u_mults) ;
@@ -100,9 +102,9 @@ Standard_Real GeomLib_DenominatorMultiplier::Value(const Standard_Real  UParamet
                         Dv);
 
  math_Matrix             BSplineBasisDeriv(1,2,1,4,0.0);
- Standard_Real           B1prim0,Bprelastprim1,
+ Standard_Real           B1prim0 = NAN,Bprelastprim1 = NAN,
                          lambda=(mySurface->Weight(1,1)/mySurface->Weight(mySurface->NbUPoles(),1));
- Standard_Integer        index,i;
+ Standard_Integer        index = 0,i = 0;
 
  BSplCLib::EvalBsplineBasis(1,
                            4,
index 43c2524e987d94a072b86361f47e828cf58dddde..981a584ae8fb061af810d86f146b05ab0e7618e8 100644 (file)
@@ -34,11 +34,11 @@ GeomLib_Interpolate::GeomLib_Interpolate
  const TColStd_Array1OfReal& ParametersArray) 
 : myIsDone(Standard_False)
 {
-  Standard_Integer ii,
-  num_knots,
-  inversion_problem,
-  num_controls,
-  jj ;
+  Standard_Integer ii = 0,
+  num_knots = 0,
+  inversion_problem = 0,
+  num_controls = 0,
+  jj = 0 ;
   
   
   if (NumPoints < Degree ||
@@ -54,7 +54,7 @@ GeomLib_Interpolate::GeomLib_Interpolate
   else {
     gp_Pnt null_point(0.0e0, 0.0e0, 0.0e0) ;
     Standard_Integer  order  = Degree + 1,
-    half_order ;
+    half_order = 0 ;
     if (order  % 2) {
       order  -= 1 ;
     }
index 16ec51a96386e778640bf2771af4ec47522c6d09..61ff6062a02e4480a343f8a461381963b776cd21 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_BezierCurve.hxx>
 #include <Geom_BezierSurface.hxx>
 #include <Geom_BSplineCurve.hxx>
@@ -37,7 +39,7 @@ static Standard_Boolean Controle(const TColgp_Array1OfPnt& Poles,
                                 gp_Pln& Plan) 
 {
   Standard_Boolean IsPlan = Standard_False;
-  Standard_Real gx,gy,gz;
+  Standard_Real gx = NAN,gy = NAN,gz = NAN;
   gp_Pnt Bary;
   gp_Dir DX, DY;
   Standard_Real aTolSingular = Precision::Confusion();
@@ -47,7 +49,7 @@ static Standard_Boolean Controle(const TColgp_Array1OfPnt& Poles,
   if (gz < Tol && gy > aTolSingular) {
     gp_Pnt P;
     gp_Vec DU, DV;
-    Standard_Real umin, umax, vmin, vmax;
+    Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
     S->Bounds(umin, umax, vmin, vmax);
     S->D1((umin + umax) / 2, (vmin + vmax) / 2, P, DU, DV);
     // On prend DX le plus proche possible de DU
@@ -75,7 +77,7 @@ static Standard_Boolean Controle(const Handle(Geom_Curve)& C,
                          const Standard_Real Tol) 
 {
   Standard_Boolean B = Standard_True;
-  Standard_Integer ii, Nb;
+  Standard_Integer ii = 0, Nb = 0;
   GeomAbs_CurveType Type;
   GeomAdaptor_Curve AC(C);
   Type = AC.GetType();
@@ -115,7 +117,7 @@ static Standard_Boolean Controle(const Handle(Geom_Curve)& C,
     }
   }
  
-  Standard_Real u, du, f, l, d;
+  Standard_Real u = NAN, du = NAN, f = NAN, l = NAN, d = NAN;
   f = AC.FirstParameter();
   l = AC.LastParameter();
   du = (l - f) / (Nb - 1);
@@ -161,7 +163,7 @@ GeomLib_IsPlanarSurface::GeomLib_IsPlanarSurface(const Handle(Geom_Surface)& S,
       gp_Pnt P;
       gp_Vec DU, DV, Dn;
       gp_Dir Dir = AS.AxeOfRevolution().Direction();
-      Standard_Real Umin, Umax, Vmin, Vmax;
+      Standard_Real Umin = NAN, Umax = NAN, Vmin = NAN, Vmax = NAN;
       S->Bounds(Umin, Umax, Vmin, Vmax);
       S->D1((Umin+Umax)/2, (Vmin+Vmax)/2, P, DU, DV);
       if (DU.Magnitude() <= gp::Resolution() ||
@@ -198,8 +200,8 @@ GeomLib_IsPlanarSurface::GeomLib_IsPlanarSurface(const Handle(Geom_Surface)& S,
   case GeomAbs_SurfaceOfExtrusion :
     {
       Standard_Boolean Essai = Standard_False;
-      Standard_Real Umin, Umax, Vmin, Vmax;
-      Standard_Real norm;
+      Standard_Real Umin = NAN, Umax = NAN, Vmin = NAN, Vmax = NAN;
+      Standard_Real norm = NAN;
       gp_Vec Du, Dv, Dn;
       gp_Pnt P;
 
@@ -235,10 +237,10 @@ GeomLib_IsPlanarSurface::GeomLib_IsPlanarSurface(const Handle(Geom_Surface)& S,
 
   default :
       {
-       Standard_Integer NbU,NbV, ii, jj, kk
+       Standard_Integer NbU = 0,NbV = 0, ii = 0, jj = 0, kk = 0
        NbU = 8 + 3*AS.NbUIntervals(GeomAbs_CN);
        NbV = 8 + 3*AS.NbVIntervals(GeomAbs_CN);
-        Standard_Real Umin, Umax, Vmin, Vmax, du, dv, U, V;
+        Standard_Real Umin = NAN, Umax = NAN, Vmin = NAN, Vmax = NAN, du = NAN, dv = NAN, U = NAN, V = NAN;
        S->Bounds(Umin, Umax, Vmin, Vmax);
        du = (Umax-Umin)/(NbU-1);
        dv = (Vmax-Vmin)/(NbV-1);
index 747ea227cbf38de6c8d2b4ced11260532d66e574..2ec6e75e9d8c0badb18a842978e4929be09aa090 100644 (file)
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GeomLib_LogSample.hxx>
 #include <Standard_OutOfRange.hxx>
 
 GeomLib_LogSample::GeomLib_LogSample(const Standard_Real A,
                                      const Standard_Real B,
                                      const Standard_Integer N)
-                   :math_FunctionSample(A, B, N)
+                   :math_FunctionSample(A, B, N), myF(A - 1), myexp(Log(B-A)/N)
 {
-  myF = A - 1;
-  myexp = Log(B-A)/N;
+  
+  
 }
 
 Standard_Real GeomLib_LogSample::GetParameter(const Standard_Integer Index) const
@@ -33,7 +35,7 @@ Standard_Real GeomLib_LogSample::GetParameter(const Standard_Integer Index) cons
  
 
   if ((Index >= aN) || (Index <= 1)) {
-    Standard_Real aA, aB;
+    Standard_Real aA = NAN, aB = NAN;
     Bounds(aA, aB);
     if (Index == 1) return aA;
     else if (Index == aN) return aB;
index 49aba3751347092290ff89a9c310acfc9934a127..65578383299afc18e276b779c97fcf7739c84ac8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AdvApprox_ApproxAFunction.hxx>
 #include <Geom2d_BSplineCurve.hxx>
 #include <Geom_BSplineCurve.hxx>
@@ -130,7 +132,7 @@ Handle(Geom2d_BSplineCurve) GeomLib_MakeCurvefromApprox::Curve2d
   Knots = myApprox.Knots()->Array1();
   Mults = myApprox.Multiplicities()->Array1();
   
-  Standard_Real X,Y,W;
+  Standard_Real X = NAN,Y = NAN,W = NAN;
   for ( Standard_Integer i = 1; i <= myApprox.NbPoles(); i++) {
     W = Weigths(i);
     Poles(i).Coord(X,Y);
@@ -241,7 +243,7 @@ Handle(Geom_BSplineCurve) GeomLib_MakeCurvefromApprox::Curve
   Knots = myApprox.Knots()->Array1();
   Mults = myApprox.Multiplicities()->Array1();
   
-  Standard_Real X,Y,Z,W;
+  Standard_Real X = NAN,Y = NAN,Z = NAN,W = NAN;
   for ( Standard_Integer i = 1; i <= myApprox.NbPoles(); i++) {
     W = Weigths(i);
     Poles(i).Coord(X,Y,Z);
index 2c38aed2680fd96b883b6f0cc1e19b9b44bbe2a5..735a2cd0f96d113cf432764dac4828fed503185a 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <GeomLib_Tool.hxx>
 
 #include <ElCLib.hxx>
@@ -192,11 +194,11 @@ public:
                      const gp_XY& thePf,
                      const gp_XY& thePl):
     myCurve(theCurve),
-    myPRef(thePf)
+    myIsValid(mySqMod > Precision::SquarePConfusion()), myPRef(thePf)
   {
     myDirRef = thePl - thePf;
     mySqMod = myDirRef.SquareModulus();
-    myIsValid = (mySqMod > Precision::SquarePConfusion());
+    
   }
 
   //! Compute additional parameters depending on the argument
@@ -231,7 +233,7 @@ public:
   }
 
   //! Returns number of variables
-  virtual Standard_Integer NbVariables() const Standard_OVERRIDE
+  Standard_Integer NbVariables() const Standard_OVERRIDE
   {
     return 1;
   }
@@ -265,18 +267,18 @@ public:
   }
 
   //! Returns value of *this (square deviation)
-  virtual Standard_Boolean Value(const math_Vector& thePrm,
+  Standard_Boolean Value(const math_Vector& thePrm,
                                  Standard_Real& theVal) Standard_OVERRIDE
   {
-    Standard_Real aD1;
-    Standard_Real aD2;
+    Standard_Real aD1 = NAN;
+    Standard_Real aD2 = NAN;
     ValueAndDerives(thePrm.Value(thePrm.Lower()), theVal, aD1, aD2);
     theVal = -theVal;
     return Standard_True;
   }
 
   //! Always returns 0. It is used for compatibility with the parent class.
-  virtual Standard_Integer GetStateNumber() Standard_OVERRIDE
+  Standard_Integer GetStateNumber() Standard_OVERRIDE
   {
     return 0;
   }
@@ -350,7 +352,7 @@ Standard_Real GeomLib_Tool::ComputeDeviation(const Geom2dAdaptor_Curve& theCurve
   Standard_Real aD2 = 0.0;
   Standard_Real aU0 = theStartParameter;
   Standard_Real aUmax = theStartParameter;
-  Standard_Real aSqDefl;
+  Standard_Real aSqDefl = NAN;
   aFunc.ValueAndDerives(aU0, aSqDefl, aD1, aD2);
   for (Standard_Integer anItr = 1; anItr <= theNbIters; anItr++)
   {
index 74540004c3ff9b9441e2b60418c59de5a0879e40..a7273b2cb458dd779028ee4d28b37d5c34c690ae 100644 (file)
@@ -27,9 +27,9 @@ GeomPlate_Aij::GeomPlate_Aij()
 
 GeomPlate_Aij::GeomPlate_Aij( const Standard_Integer anInd1,
                              const Standard_Integer anInd2,
-                             const gp_Vec& aVec )
+                             const gp_Vec& aVec ) : Ind1(anInd1), Ind2(anInd2), Vec(aVec)
 {
-  Ind1 = anInd1;
-  Ind2 = anInd2;
-  Vec  = aVec;
+  
+  
+  
 }
index 557906d138b1e1519139f6344b281ccffcf27583..a6360e6dc85f31dbf293fd936fd2dc2d110ecd1d 100644 (file)
@@ -22,6 +22,8 @@
 //    by:      Joelle CHAUVET
 //              correction sur le tri des valeurs propres quand valeurs egales
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <ElSLib.hxx>
 #include <Geom_Line.hxx>
@@ -72,7 +74,7 @@ myNbBoundPoints(NbBoundPoints)
       gp_Ax3 triedre(myG,NDir,UDir);
       myPlane = new Geom_Plane(triedre);
     }
-    Standard_Integer i,nb=myPts->Length();
+    Standard_Integer i = 0,nb=myPts->Length();
     gp_Pln P=myPlane->Pln();
     ElSLib::Parameters(P,myG,myUmax,myVmax);
     myUmin=myUmax;
@@ -96,7 +98,7 @@ GeomPlate_BuildAveragePlane::GeomPlate_BuildAveragePlane( const TColgp_SequenceO
                                                          const Handle( TColgp_HArray1OfPnt )& Pts ) :
 myPts(Pts)
 {
-  Standard_Integer i, j, k, n, m;
+  Standard_Integer i = 0, j = 0, k = 0, n = 0, m = 0;
 
   gp_Vec BestVec;
   Standard_Integer NN = Normals.Length();
@@ -198,7 +200,7 @@ myPts(Pts)
 
   //Making the plane myPlane
   gp_Ax2 Axe;
-  Standard_Boolean IsSingular;
+  Standard_Boolean IsSingular = 0;
   TColgp_Array1OfPnt PtsArray( 1, myPts->Length() );
   for (i = 1; i <= myPts->Length(); i++)
     PtsArray(i) = myPts->Value(i);
@@ -215,7 +217,7 @@ myPts(Pts)
   ElSLib::Parameters( Pln, Axe.Location(), myUmax, myVmax );
   myUmin = myUmax;
   myVmin = myVmax;
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
   for (i = 1; i <= myPts->Length(); i++)
     {
       gp_Vec aVec( Pln.Location(), myPts->Value(i) );
@@ -278,7 +280,7 @@ gp_Vec GeomPlate_BuildAveragePlane::DefPlan(const Standard_Integer NOption)
   gp_Pnt GB;
   gp_Vec A,B,C,D;
   gp_Vec OZ;
-  Standard_Integer i,nb=myPts->Length();
+  Standard_Integer i = 0,nb=myPts->Length();
   GB.SetCoord(0.,0.,0.);
   for (i=1; i<=nb; i++) {
       GB.SetCoord(1,(GB.Coord(1)+myPts->Value(i).Coord(1)));
@@ -291,7 +293,7 @@ gp_Vec GeomPlate_BuildAveragePlane::DefPlan(const Standard_Integer NOption)
 
   if (NOption==1) {
     gp_Ax2 Axe;
-    Standard_Boolean IsSingular;
+    Standard_Boolean IsSingular = 0;
     GeomLib::AxeOfInertia( myPts->Array1(), Axe, IsSingular, myTol );
 
     myOX = Axe.XDirection();
@@ -353,8 +355,8 @@ void GeomPlate_BuildAveragePlane::BasePlan(const gp_Vec& OZ)
     math_Matrix M (1, 3, 1, 3);
     M.Init(0.);
     gp_Vec Proj;
-    Standard_Integer i,nb=myPts->Length();
-    Standard_Real scal;
+    Standard_Integer i = 0,nb=myPts->Length();
+    Standard_Real scal = NAN;
 
     for (i=1; i<=nb; i++) {
       Proj.SetCoord(1,myPts->Value(i).Coord(1) - myG.Coord(1));
@@ -380,14 +382,14 @@ void GeomPlate_BuildAveragePlane::BasePlan(const gp_Vec& OZ)
     M(3,1) = M(1,3) ;
     M(3,2) = M(2,3) ;
     math_Jacobi J(M);
-    Standard_Real n1,n2,n3;
+    Standard_Real n1 = NAN,n2 = NAN,n3 = NAN;
     math_Vector V1(1,3),V2(1,3),V3(1,3);
     n1=J.Value(1);
     n2=J.Value(2);
     n3=J.Value(3);
 
-    Standard_Real r1 = Min(Min(n1,n2),n3), r2;
-    Standard_Integer m1, m2, m3;
+    Standard_Real r1 = Min(Min(n1,n2),n3), r2 = NAN;
+    Standard_Integer m1 = 0, m2 = 0, m3 = 0;
     if (r1==n1) {
       m1 = 1;
       r2 = Min(n2,n3);
@@ -501,7 +503,7 @@ Standard_Boolean GeomPlate_BuildAveragePlane::HalfSpace( const TColgp_SequenceOf
 
   gp_Vec Cross, NullVec( 0, 0, 0 );
   GeomPlate_SequenceOfAij B1set, B2set;
-  Standard_Integer i, j, k;
+  Standard_Integer i = 0, j = 0, k = 0;
   
   i = 1;
   if (Normals.IsEmpty())
@@ -527,7 +529,7 @@ Standard_Boolean GeomPlate_BuildAveragePlane::HalfSpace( const TColgp_SequenceOf
   for (; i <= NewNormals.Length(); i++)
     {
       // 3
-      Standard_Real Scal;
+      Standard_Real Scal = NAN;
       for (j = 1; j <= Bset.Length(); j++)
        if ((Scal = Bset(j).Vec * NewNormals(i)) >= -LinTol)
          B2set.Append( Bset(j) );
index 0a27e518485ef17cb5b406319bd2ccc1ebc65445..d0518ab4fc35da8b15b6f99120c7c0b3a4c51a19 100644 (file)
@@ -101,12 +101,12 @@ private:
   Standard_Real myVmin;
   Standard_Real myUmin;
   Handle(Geom_Plane) myPlane;
-  Standard_Real myTol;
+  Standard_Real myTol{};
   Handle(Geom_Line) myLine;
   gp_Vec myOX;
   gp_Vec myOY;
   gp_Pnt myG;
-  Standard_Integer myNbBoundPoints;
+  Standard_Integer myNbBoundPoints{};
 
 
 };
index 9f018a8a4d819764a3abcb467dd63d0f48b5c12e..b6082419c04881b8c5008a625ebb8f77f25da4e6 100644 (file)
@@ -64,6 +64,7 @@
 #include <TColStd_SequenceOfInteger.hxx>
 #include <Message_ProgressScope.hxx>
 
+#include <math.h>
 #include <stdio.h>
 
 #ifdef DRAW
@@ -108,18 +109,18 @@ GeomPlate_BuildPlateSurface::GeomPlate_BuildPlateSurface (
                    const Standard_Real ,
                    const Standard_Boolean Anisotropie
 ) :
-myAnisotropie(Anisotropie),
+myLinCont(new GeomPlate_HSequenceOfCurveConstraint), myPntCont(new GeomPlate_HSequenceOfPointConstraint), myAnisotropie(Anisotropie),
 myDegree(Degree),
-myNbIter(NbIter),
+myNbPtsOnCur(0), myNbIter(NbIter),
 myProj(),
 myTol2d(Tol2d),
 myTol3d(Tol3d),
 myTolAng(TolAng),
 myNbBounds(0)
 { Standard_Integer NTCurve=TabCurve->Length();// Number of linear constraints
-  myNbPtsOnCur = 0; // Different calculation of the number of points depending on the length
-  myLinCont = new GeomPlate_HSequenceOfCurveConstraint;
-  myPntCont = new GeomPlate_HSequenceOfPointConstraint;
+  // Different calculation of the number of points depending on the length
+  
+  
   if (myNbIter<1)
     throw Standard_ConstructionError("GeomPlate :  Number of iteration must be >= 1");
     
@@ -128,7 +129,7 @@ myNbBounds(0)
   if (Tang->Length()==0) 
     throw Standard_ConstructionError("GeomPlate : the constraints Array is null");
   Standard_Integer nbp = 0;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for ( i=1;i<=NTCurve;i++) 
     { nbp+=NPoints->Value(i);
     }
@@ -262,7 +263,7 @@ Handle(Geom2d_Curve)  GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Ada
 
  Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (hsur, Curv, myTol3d/10, myTol3d/10);
 
- Standard_Real UdebCheck, UfinCheck, ProjUdeb, ProjUfin;
+ Standard_Real UdebCheck = NAN, UfinCheck = NAN, ProjUdeb = NAN, ProjUfin = NAN;
  UdebCheck = Curv->FirstParameter();
  UfinCheck = Curv->LastParameter();
  HProjector->Bounds( 1, ProjUdeb, ProjUfin );
@@ -288,8 +289,8 @@ Handle(Geom2d_Curve)  GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Ada
    }
  else {
    GeomAbs_Shape Continuity = GeomAbs_C1;
-   Standard_Integer MaxDegree = 10, MaxSeg;
-   Standard_Real Udeb, Ufin;
+   Standard_Integer MaxDegree = 10, MaxSeg = 0;
+   Standard_Real Udeb = NAN, Ufin = NAN;
    HProjector->Bounds(1, Udeb, Ufin);
    
    MaxSeg = 20 + HProjector->NbIntervals(GeomAbs_C3);
@@ -326,7 +327,7 @@ Handle(Adaptor2d_Curve2d)  GeomPlate_BuildPlateSurface::ProjectedCurve( Handle(A
    }
  else
    { 
-     Standard_Real First1,Last1,First2,Last2;
+     Standard_Real First1 = NAN,Last1 = NAN,First2 = NAN,Last2 = NAN;
      First1=Curv->FirstParameter();
      Last1 =Curv->LastParameter();
      HProjector->Bounds(1,First2,Last2);
@@ -369,7 +370,7 @@ gp_Pnt2d GeomPlate_BuildPlateSurface::ProjectPoint(const gp_Pnt &p3d)
       }  
   }
   P=myProj.Point(nearest);
-  Standard_Real u,v;
+  Standard_Real u = NAN,v = NAN;
   P.Parameter(u,v);
   gp_Pnt2d p2d;
   p2d.SetCoord(u,v);
@@ -500,7 +501,7 @@ void GeomPlate_BuildPlateSurface::Perform(const Message_ProgressRange& theProgre
     return;
   }
 
-  Standard_Real u1,v1,u2,v2;
+  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
   mySurfInit->Bounds(u1,v1,u2,v2);
   GeomAdaptor_Surface aSurfInit(mySurfInit);
   myTolU = aSurfInit.UResolution(myTol3d);
@@ -659,7 +660,7 @@ void GeomPlate_BuildPlateSurface::Perform(const Message_ProgressRange& theProgre
           }
 
           myGeomPlateSurface = new GeomPlate_Surface(mySurfInit,myPlate);
-         Standard_Real Umin,Umax,Vmin,Vmax
+         Standard_Real Umin = NAN,Umax = NAN,Vmin = NAN,Vmax = NAN
           myPlate.UVBox(Umin,Umax,Vmin,Vmax);
          myGeomPlateSurface->SetBounds(Umin,Umax,Vmin,Vmax);
 
@@ -673,7 +674,7 @@ void GeomPlate_BuildPlateSurface::Perform(const Message_ProgressRange& theProgre
            }
 
          if ((NTPntCont != 0)&&(Fini))
-           { Standard_Real di,an,cu;
+           { Standard_Real di = NAN,an = NAN,cu = NAN;
              VerifPoints(di,an,cu);
            }
        }
@@ -698,11 +699,11 @@ void GeomPlate_BuildPlateSurface::Perform(const Message_ProgressRange& theProgre
           }
 
           myGeomPlateSurface = new GeomPlate_Surface(mySurfInit,myPlate);
-         Standard_Real Umin,Umax,Vmin,Vmax
+         Standard_Real Umin = NAN,Umax = NAN,Vmin = NAN,Vmax = NAN
           myPlate.UVBox(Umin,Umax,Vmin,Vmax);
          myGeomPlateSurface->SetBounds(Umin,Umax,Vmin,Vmax);
          Fini = Standard_True;
-          Standard_Real di,an,cu;
+          Standard_Real di = NAN,an = NAN,cu = NAN;
           VerifPoints(di,an,cu);
        }
     } while (!Fini); // End loop for better surface
@@ -734,14 +735,14 @@ EcartContraintesMil  ( const Standard_Integer c,
                      Handle(TColStd_HArray1OfReal)& courb)
 { 
   Standard_Integer NbPt=myParCont->Value(c).Length();
-  Standard_Real U;
+  Standard_Real U = NAN;
   if (NbPt<3)
     NbPt=4;
   else 
     NbPt=myParCont->Value(c).Length();
   gp_Vec v1i, v1f, v2i, v2f, v3i, v3f;
   gp_Pnt Pi, Pf;
-  gp_Pnt2d P2d;Standard_Integer i;
+  gp_Pnt2d P2d;Standard_Integer i = 0;
   Handle(GeomPlate_CurveConstraint) LinCont = myLinCont->Value(c);
   switch (LinCont->Order())
     { case 0 :
@@ -836,8 +837,8 @@ void GeomPlate_BuildPlateSurface::
   gp_Pnt2d P2d;
   gp_XY UV;
   gp_Pnt PP;
-  Standard_Real u1,v1,u2,v2;
-  Standard_Integer i ;
+  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
+  Standard_Integer i = 0 ;
 
   mySurfInit->Bounds(u1,v1,u2,v2);
   GeomAdaptor_Surface Surf(mySurfInit);
@@ -969,7 +970,7 @@ Disc3dContour (const Standard_Integer /*nbp*/,
   //  initialization
   Seq3d.Clear();
   //  sampling in "cosine" + 3 points on each interval
-  Standard_Real u1,v1,u2,v2;
+  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
   mySurfInit->Bounds(u1,v1,u2,v2);
   GeomAdaptor_Surface Surf(mySurfInit);
   myProj.Initialize(Surf,u1,v1,u2,v2,
@@ -981,7 +982,7 @@ Disc3dContour (const Standard_Integer /*nbp*/,
   gp_Pnt P3d;
   gp_Vec v1h,v2h,v3h;
   gp_XYZ Pos;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
 
   for( i=1; i<=NTPntCont; i++) 
     if (myPntCont->Value(i)->Order()!=-1) 
@@ -1253,10 +1254,10 @@ Handle(GeomPlate_PointConstraint) GeomPlate_BuildPlateSurface::PointConstraint(
 Standard_Boolean GeomPlate_BuildPlateSurface::
                                   CourbeJointive(const Standard_Real tolerance) 
 { Standard_Integer nbf = myLinCont->Length();
-  Standard_Real Ufinal1,Uinit1,Ufinal2,Uinit2;
+  Standard_Real Ufinal1 = NAN,Uinit1 = NAN,Ufinal2 = NAN,Uinit2 = NAN;
   mySense = new TColStd_HArray1OfInteger(1,nbf,0);
   Standard_Boolean result=Standard_True;
-  Standard_Integer j=1,i;
+  Standard_Integer j=1,i = 0;
   gp_Pnt P1,P2;
 
   while (j <= (myNbBounds-1))
@@ -1374,9 +1375,9 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t
       Handle( TColgp_HArray1OfPnt ) Pts = new TColgp_HArray1OfPnt( 1, (NbPoint+1)*NTLinCont+NTPntCont );
       TColgp_SequenceOfVec Vecs, NewVecs;
       GeomPlate_SequenceOfAij Aset;
-      Standard_Real Uinit, Ufinal, Uif;
+      Standard_Real Uinit = NAN, Ufinal = NAN, Uif = NAN;
       gp_Vec LastVec;
-      Standard_Integer i ;
+      Standard_Integer i = 0 ;
       for ( i = 1; i <= NTLinCont; i++)
        { 
          Standard_Integer Order = myLinCont->Value(i)->Order();
@@ -1417,7 +1418,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t
                  if (ToReverse)
                    Normal.Reverse();
                  Standard_Boolean isNew = Standard_True;
-                  Standard_Integer k ;
+                  Standard_Integer k = 0 ;
                  for ( k = 1; k <= Vecs.Length(); k++)
                    if (Vecs(k).IsEqual( Normal, LinTol, AngTol ))
                      {
@@ -1496,7 +1497,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t
                      }
                }
              GeomPlate_BuildAveragePlane BAP( Vecs, Pts );
-             Standard_Real u1,u2,v1,v2;
+             Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
              BAP.MinMaxBox(u1,u2,v1,v2);
              // The space is greater for projections
              Standard_Real du = u2 - u1;
@@ -1533,7 +1534,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t
       Standard_Real LenT=0;
       Standard_Integer Npt=0;
       Standard_Integer NTPoint=20*NTLinCont;
-      Standard_Integer i ;
+      Standard_Integer i = 0 ;
       for ( i=1;i<=NTLinCont;i++) 
        LenT+=myLinCont->Value(i)->Length();
       for (i=1;i<=NTLinCont;i++) 
@@ -1547,7 +1548,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t
       // Table containing a cloud of points for calculation of the plane
       Handle(TColgp_HArray1OfPnt) Pts = new TColgp_HArray1OfPnt(1,20*NTLinCont+NTPntCont);
       Standard_Integer  NbPoint=20;
-      Standard_Real Uinit,Ufinal, Uif;
+      Standard_Real Uinit = NAN,Ufinal = NAN, Uif = NAN;
       for ( i=1;i<=NTLinCont;i++)
        { Uinit=myLinCont->Value(i)->FirstParameter();
          Ufinal=myLinCont->Value(i)->LastParameter();
@@ -1581,7 +1582,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t
 
         return;
       }
-      Standard_Real u1,u2,v1,v2;
+      Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
       BAP.MinMaxBox(u1,u2,v1,v2);
       // The space is greater for projections
       Standard_Real du = u2 - u1;
@@ -1657,7 +1658,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t
        DrawTrSurf::Set(name, mySurfInit);
       }
 #endif
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       mySurfInit->Bounds(u1,v1,u2,v2);
       GeomAdaptor_Surface Surf(mySurfInit);
       myTolU = Surf.UResolution(myTol3d);
@@ -1668,7 +1669,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t
       //======================================================================
       // Projection of curves
       //======================================================================
-      Standard_Integer i;
+      Standard_Integer i = 0;
       for (i = 1; i <= NTLinCont; i++)
        if (myLinCont->Value(i)->Curve2dOnSurf().IsNull())
          myLinCont->ChangeValue(i)->SetCurve2dOnSurf(ProjectCurve(myLinCont->Value(i)->Curve3d()));
@@ -1840,9 +1841,9 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
                              ||(Abs(ant)>myTol3d/1000))  
                            // Non-compatible ==> remove zone in constraint G1
                            // corresponding to 3D tolerance of 0.01
-                           { Standard_Real coin;
+                           { Standard_Real coin = NAN;
                              Standard_Real Tol= 100 * myTol3d;
-                             Standard_Real A1;
+                             Standard_Real A1 = NAN;
                              gp_Pnt2d P1temp,P2temp;
                              gp_Vec2d V1,V2;
                              myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1temp, V1);
@@ -1894,9 +1895,9 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
                            {
                              // Non-compatible ==> one removes zone in constraint G0 and G1
                              // corresponding to 3D tolerance of 0.01
-                             Standard_Real coin;
+                             Standard_Real coin = NAN;
                              Standard_Real Tol= 100 * myTol3d;
-                             Standard_Real A1;
+                             Standard_Real A1 = NAN;
                              gp_Pnt2d P1temp,P2temp;
                              gp_Vec2d V1,V2;
                              myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1temp, V1);
@@ -1946,7 +1947,7 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
                    // the point on curve j is preserved.
                    // The length of interval is 2D length
                    // corresponding to the distance of points in 3D to myTol3d  
-                   Standard_Real tolint, Dist;
+                   Standard_Real tolint = NAN, Dist = NAN;
                    Dist = P1.Distance(P2);
                    tolint = Ci.Resolution(Dist);
                    PntInter->ChangeValue(i).Append( int2d.ParamOnFirst() - tolint);
@@ -1995,7 +1996,7 @@ Discretise(const Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
           const Handle(GeomPlate_HArray1OfSequenceOfReal)& PntG1G1) 
 { 
   Standard_Integer NTLinCont = myLinCont->Length();
-  Standard_Boolean ACR;
+  Standard_Boolean ACR = 0;
   Handle(Geom2d_Curve) C2d; 
   Geom2dAdaptor_Curve AC2d;
 //  Handle(Adaptor_HCurve2d) HC2d;
@@ -2007,9 +2008,9 @@ Discretise(const Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
   //===========================================================================
   // Construction of the table containing parameters of constraint points 
   //=========================================================================== 
-  Standard_Real  Uinit, Ufinal,  Length2d=0, Inter;
-  Standard_Real   CurLength;
-  Standard_Integer NbPnt_i, NbPtInter, NbPtG1G1;
+  Standard_Real  Uinit = NAN, Ufinal = NAN,  Length2d=0, Inter = NAN;
+  Standard_Real   CurLength = NAN;
+  Standard_Integer NbPnt_i = 0, NbPtInter = 0, NbPtG1G1 = 0;
   Handle(GeomPlate_CurveConstraint) LinCont;
   
   for (Standard_Integer i=1;i<=NTLinCont;i++) {
@@ -2025,8 +2026,8 @@ Discretise(const Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
       // Construct a law close to curvilinear abscissa
       if(!C2d.IsNull()) AC2d.Load(C2d);
 //      AC2d.Load(LinCont->Curve2dOnSurf());
-      Standard_Integer ii, Nbint = 20;
-      Standard_Real U;
+      Standard_Integer ii = 0, Nbint = 20;
+      Standard_Real U = NAN;
       TColgp_Array1OfPnt2d tabP2d(1,  Nbint+1);
       tabP2d(1).SetY(Uinit);
       tabP2d(1).SetX(0.);
@@ -2192,7 +2193,7 @@ void GeomPlate_BuildPlateSurface::CalculNbPtsInit ()
   Standard_Real LenT=0;
   Standard_Integer NTLinCont=myLinCont->Length();
   Standard_Integer NTPoint=(Standard_Integer )( myNbPtsOnCur*NTLinCont);
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
 
   for ( i=1;i<=NTLinCont;i++) 
     LenT+=myLinCont->Value(i)->Length();
@@ -2226,8 +2227,8 @@ void GeomPlate_BuildPlateSurface::LoadCurve(const Standard_Integer NbBoucle,
 { 
   gp_Pnt P3d,Pdif,PP;
   gp_Pnt2d P2d;
-  Standard_Integer NTLinCont=myLinCont->Length(), i, j;
-  Standard_Integer  Tang, Nt;
+  Standard_Integer NTLinCont=myLinCont->Length(), i = 0, j = 0;
+  Standard_Integer  Tang = 0, Nt = 0;
 
   
   for (i=1; i<=NTLinCont; i++){
@@ -2330,7 +2331,7 @@ void GeomPlate_BuildPlateSurface::LoadPoint(const Standard_Integer ,
   gp_Pnt P3d,Pdif,PP;
   gp_Pnt2d P2d;
   Standard_Integer NTPntCont=myPntCont->Length();
-  Standard_Integer Tang, i;
+  Standard_Integer Tang = 0, i = 0;
 //  gp_Vec  V1,V2,V3,V4,V5,V6,V7,V8,V9,V10;
  
   // Loading of points of point constraints
@@ -2428,13 +2429,13 @@ VerifSurface(const Standard_Integer NbBoucle)
            myG1Error=tang->Value(j);
          if (tcourb->Value(j)>myG2Error)
            myG2Error=tcourb->Value(j);
-         Standard_Real U;
+         Standard_Real U = NAN;
          if (myParCont->Value(i).Length()>3)
            U=(myParCont->Value(i).Value(j)+myParCont->Value(i).Value(j+1))/2;
          else 
            U=LinCont->FirstParameter()+
              ( LinCont->LastParameter()-LinCont->FirstParameter())*(j-1)/(NbPts_i-2);
-         Standard_Real diffDist=tdist->Value(j)-LinCont->G0Criterion(U),diffAng;
+         Standard_Real diffDist=tdist->Value(j)-LinCont->G0Criterion(U),diffAng = NAN;
          if (LinCont->Order()>0)
            diffAng=tang->Value(j)-LinCont->G1Criterion(U);
          else diffAng=0;
@@ -2492,7 +2493,7 @@ VerifSurface(const Standard_Integer NbBoucle)
         }
 
        if (NdiffDist>0) {// at least one point is not acceptable in G0
-         Standard_Real Coef;
+         Standard_Real Coef = NAN;
          if(LinCont->Order()== 0)
            Coef = 0.6*Log(diffDistMax+7.4);                     
          //7.4 corresponds to the calculation of min. coefficient = 1.2 is e^1.2/0.6
index db8e144d76d8d44843ce39fe5559a933162181f5..5eb12a9b65d7fa4b7a2c16fc40b6145f830c29ad 100644 (file)
@@ -246,9 +246,9 @@ private:
   Handle(TColStd_HArray1OfInteger) mySense;
   Standard_Integer myDegree;
   Handle(TColStd_HArray1OfInteger) myInitOrder;
-  Standard_Real myG0Error;
-  Standard_Real myG1Error;
-  Standard_Real myG2Error;
+  Standard_Real myG0Error{};
+  Standard_Real myG1Error{};
+  Standard_Real myG2Error{};
   Standard_Integer myNbPtsOnCur;
   Standard_Boolean mySurfInitIsGive;
   Standard_Integer myNbIter;
@@ -256,8 +256,8 @@ private:
   Standard_Real myTol2d;
   Standard_Real myTol3d;
   Standard_Real myTolAng;
-  Standard_Real myTolU;
-  Standard_Real myTolV;
+  Standard_Real myTolU{};
+  Standard_Real myTolV{};
   Standard_Integer myNbBounds;
   Standard_Boolean myIsLinear;
   Standard_Boolean myFree;
index d3a0cbbf29e4e61feb681e5e64e5869056edeaf2..29b9d323dff81bf1fda01e0eccc2199fd7765108 100644 (file)
@@ -63,12 +63,12 @@ GeomPlate_CurveConstraint :: GeomPlate_CurveConstraint (const Handle(Adaptor3d_C
                                                const Standard_Real TolAng,
                                                const Standard_Real TolCurv
 ) :
-myLProp(2,TolDist),
+myOrder(Tang), myLProp(2,TolDist),
 myTolDist(TolDist),
 myTolAng(TolAng),
 myTolCurv(TolCurv)
 {
-  myOrder=Tang;
+  
   if ((Tang<-1)||(Tang>2))
     throw Standard_Failure("GeomPlate : The continuity is not G0 G1 or G2");
   myNbPoints=NPt;
index 81d6f2e72dd725158e01923ed53a257336a47639..b81cecf513fcae0d38b444ec13b05bf5b91dcbed 100644 (file)
@@ -149,7 +149,7 @@ protected:
   Standard_Integer myNbPoints;
   Standard_Integer myOrder;
   Handle(Adaptor3d_Curve) my3dCurve;
-  Standard_Integer myTang;
+  Standard_Integer myTang{};
   Handle(Geom2d_Curve) my2dCurve;
   Handle(Adaptor2d_Curve2d) myHCurve2d;
   Handle(Law_Function) myG0Crit;
index 5de1d888b9234c89c61281204be5e5e07d655763..8e97c9806d1e1c22e65c4a3866b026a027743247 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AdvApp2Var_ApproxAFunc2Var.hxx>
 #include <AdvApprox_DichoCutting.hxx>
 #include <Geom_BSplineSurface.hxx>
@@ -41,7 +43,7 @@ public:
   GeomPlate_MakeApprox_Eval (const Handle(Geom_Surface)& theSurf)
   : mySurf (theSurf) {}
 
-  virtual void Evaluate (Standard_Integer* theDimension,
+  void Evaluate (Standard_Integer* theDimension,
                          Standard_Real*    theUStartEnd,
                          Standard_Real*    theVStartEnd,
                          Standard_Integer* theFavorIso,
@@ -51,7 +53,7 @@ public:
                          Standard_Integer* theUOrder,
                          Standard_Integer* theVOrder,
                          Standard_Real*    theResult,
-                         Standard_Integer* theErrorCode) const;
+                         Standard_Integer* theErrorCode) const override;
 
 private:
 
@@ -83,8 +85,8 @@ void GeomPlate_MakeApprox_Eval::Evaluate (Standard_Integer * Dimension,
                                // Error Code
 {
   *ErrorCode = 0;
-  Standard_Integer idim,jpar;
-  Standard_Real Upar,Vpar;
+  Standard_Integer idim = 0,jpar = 0;
+  Standard_Real Upar = NAN,Vpar = NAN;
 
 // Dimension incorrecte
   if (*Dimension!=3) {
@@ -247,9 +249,9 @@ GeomPlate_MakeApprox::GeomPlate_MakeApprox(const Handle(GeomPlate_Surface)& Surf
                                           const Standard_Integer Nbmax,
                                           const Standard_Integer dgmax,
                                           const GeomAbs_Shape Continuity,
-                                          const Standard_Real EnlargeCoeff)
+                                          const Standard_Real EnlargeCoeff) : myPlate(SurfPlate)
 {
-  myPlate = SurfPlate;
+  
 
   Standard_Real U0=0., U1=0., V0=0., V1=0.;
   myPlate->RealBounds(U0, U1, V0, V1);
@@ -311,9 +313,9 @@ GeomPlate_MakeApprox::GeomPlate_MakeApprox(const Handle(GeomPlate_Surface)& Surf
                                           const Standard_Real dmax,
                                           const Standard_Integer CritOrder,
                                           const GeomAbs_Shape Continuity,
-                                          const Standard_Real EnlargeCoeff)
+                                          const Standard_Real EnlargeCoeff) : myPlate(SurfPlate)
 {
-  myPlate = SurfPlate;
+  
 
   TColgp_SequenceOfXY Seq2d;
   TColgp_SequenceOfXYZ Seq3d;
@@ -324,7 +326,7 @@ GeomPlate_MakeApprox::GeomPlate_MakeApprox(const Handle(GeomPlate_Surface)& Surf
     myPlate->Constraints(Seq2d);
 
 //    contraintes 3d correspondantes sur plate
-    Standard_Integer i,nbp=Seq2d.Length();
+    Standard_Integer i = 0,nbp=Seq2d.Length();
     for(i=1;i<=nbp;i++){
       gp_XY P2d=Seq2d.Value(i);
       gp_Pnt PP;
index d7f8a1bc234178302a2c3bd1fde39c1b19900436..188c4ca9d8619e7222a8e39be3b454d581b8c0ef 100644 (file)
@@ -20,6 +20,8 @@
 //              Value (Appel a des distances remplace par le calcul
 //              de la distance au carre)
 
+#include <math.h>
+
 #include <AdvApp2Var_Context.hxx>
 #include <AdvApp2Var_Patch.hxx>
 #include <GeomPlate_PlateG0Criterion.hxx>
@@ -39,10 +41,10 @@ GeomPlate_PlateG0Criterion(const TColgp_SequenceOfXY& Data,
                           const TColgp_SequenceOfXYZ& G0Data,
                           const Standard_Real Maximum,
                           const AdvApp2Var_CriterionType Type,
-                          const AdvApp2Var_CriterionRepartition Repart)
+                          const AdvApp2Var_CriterionRepartition Repart) : myData(Data), myXYZ(G0Data)
 {
-  myData=Data;
-  myXYZ=G0Data;
+  
+  
   myMaxValue = Maximum;
   myType = Type;
   myRepartition = Repart;
@@ -71,7 +73,7 @@ void GeomPlate_PlateG0Criterion::Value(AdvApp2Var_Patch& P,
   VInt[0] = P.V0();
   VInt[1] = P.V1();
 
-  Standard_Real up,vp, dist = 0.;
+  Standard_Real up = NAN,vp = NAN, dist = 0.;
   
   Standard_Integer dimension = 3 * NbCoeff[1];
   TColStd_Array1OfReal Patch(1, NbCoeff[0] * dimension);
@@ -80,7 +82,7 @@ void GeomPlate_PlateG0Criterion::Value(AdvApp2Var_Patch& P,
   Standard_Real * Coeffs =  (Standard_Real *) &Patch.ChangeValue(1);
   Standard_Real * Digit  =  (Standard_Real *) &Point.ChangeValue(1);
   
-  Standard_Integer k1, k2, pos, ll=1;
+  Standard_Integer k1 = 0, k2 = 0, pos = 0, ll=1;
   for (k1 = 1; k1 <= NbCoeff[0]; k1++) {
 // JAG 99.04.29    pos = 3*(MaxNbCoeff[0])*(k1-1);
     pos = 3*(MaxNbCoeff[1])*(k1-1);
@@ -92,7 +94,7 @@ void GeomPlate_PlateG0Criterion::Value(AdvApp2Var_Patch& P,
     }
   }
 
-  Standard_Integer i, NbCtr = myData.Length();
+  Standard_Integer i = 0, NbCtr = myData.Length();
   for(i=1; i<=NbCtr; i++) {
     gp_XY P2d = myData.Value(i);
 //    gp_Pnt PP = myXYZ.Value(i);
index 324b068e642892a41417c57f62a7df37e0fd2951..9897074d0093485cb3dc577f5b4ca03072ca1df8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AdvApp2Var_Context.hxx>
 #include <AdvApp2Var_Patch.hxx>
 #include <GeomPlate_PlateG1Criterion.hxx>
@@ -35,10 +37,10 @@ GeomPlate_PlateG1Criterion(const TColgp_SequenceOfXY& Data,
                           const TColgp_SequenceOfXYZ& G1Data,
                           const Standard_Real Maximum,
                           const AdvApp2Var_CriterionType Type,
-                          const AdvApp2Var_CriterionRepartition Repart)
+                          const AdvApp2Var_CriterionRepartition Repart) : myData(Data), myXYZ(G1Data)
 {
-  myData=Data;
-  myXYZ=G1Data;
+  
+  
   myMaxValue = Maximum;
   myType = Type;
   myRepartition = Repart;
@@ -67,7 +69,7 @@ void GeomPlate_PlateG1Criterion::Value(AdvApp2Var_Patch& P,
   VInt[0] = P.V0();
   VInt[1] = P.V1();
 
-  Standard_Real up,vp, ang = 0.;
+  Standard_Real up = NAN,vp = NAN, ang = 0.;
   
   Standard_Integer dimension = 3 * NbCoeff[1];
   TColStd_Array1OfReal Patch(1, NbCoeff[0] * dimension);
@@ -76,7 +78,7 @@ void GeomPlate_PlateG1Criterion::Value(AdvApp2Var_Patch& P,
   Standard_Real * Coeffs =  (Standard_Real *) &Patch.ChangeValue(1);
   Standard_Real * Digit  =  (Standard_Real *) &Point.ChangeValue(1);
   
-  Standard_Integer k1, k2, pos, ll=1;
+  Standard_Integer k1 = 0, k2 = 0, pos = 0, ll=1;
   for (k1 = 1; k1 <= NbCoeff[0]; k1++) {
 // JAG 99.04.29    pos = 3*(MaxNbCoeff[0])*(k1-1);
     pos = 3*(MaxNbCoeff[1])*(k1-1);
@@ -88,7 +90,7 @@ void GeomPlate_PlateG1Criterion::Value(AdvApp2Var_Patch& P,
     }
   }
 
-  Standard_Integer i, NbCtr = myData.Length();
+  Standard_Integer i = 0, NbCtr = myData.Length();
   for(i=1; i<=NbCtr; i++) {
     gp_Vec v1s,v2s,v3s;
     gp_Vec v3h(myXYZ.Value(i).X(),myXYZ.Value(i).Y(),myXYZ.Value(i).Z());
index 06ebc0ccb1c9b451050fc869aa8ed129cb86298c..32e28ce5b3d37a7240f9d1b7091472443e4936a4 100644 (file)
@@ -47,6 +47,7 @@
 #include <ProjLib_ProjectedCurve.hxx>
 #include <ProjLib_ProjectOnPlane.hxx>
 
+#include <math.h>
 #include <stdio.h>
 #ifdef DRAW
 #include <DrawTrSurf.hxx>
@@ -170,10 +171,10 @@ Handle(Geom2d_Curve) GeomProjLib::Curve2d(const Handle(Geom_Curve)& C,
                                          const Handle(Geom_Surface)& S,
                                                Standard_Real& Tolerance)
 {
- Standard_Real  UFirst,
-                ULast,
-                VFirst,
-                VLast ;
+ Standard_Real  UFirst = NAN,
+                ULast = NAN,
+                VFirst = NAN,
+                VLast = NAN ;
 
  S->Bounds(UFirst,
           ULast,
@@ -330,7 +331,7 @@ Handle(Geom_Curve) GeomProjLib::Project( const Handle(Geom_Curve)& C,
     Standard_Real TolV = Pow(Tol, 2./3);
     ProjLib_CompProjectedCurve Proj(HS,HC,TolU,TolV,-1.);
     
-    Standard_Real f,l;
+    Standard_Real f = NAN,l = NAN;
     Proj.Bounds(1,f,l);
     Handle(Adaptor2d_Curve2d) HC2d = Proj.Trim(f,l,TolU);
     Approx_CurveOnSurface Approx(HC2d, HS, f, l, Tol);
index b248f2ae77fc72e7eb64e7c2b059f1d9c10969da..1a579c427a822c66fa570e3916e55e9bfdad27ad 100644 (file)
@@ -31,7 +31,7 @@
 //=============================================================================
 // Creation d' un axis1_placement de prostep a partir d' un Ax1 de gp
 //=============================================================================
-GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax1& A)
+GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax1& A) : GeomToStep_Root()
 {
 #include "GeomToStep_MakeAxis1Placement_gen.pxx"
 }
@@ -39,7 +39,7 @@ GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax1& A)
 // Creation d' un axis1_placement de prostep a partir d' un Ax2d de gp
 //=============================================================================
 
-GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax2d& A)
+GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax2d& A) : GeomToStep_Root()
 {
 #include "GeomToStep_MakeAxis1Placement_gen.pxx"
 }
@@ -50,7 +50,7 @@ GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax2d& A)
 //=============================================================================
 
 GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement
-  ( const Handle(Geom_Axis1Placement)& Axis1)
+  ( const Handle(Geom_Axis1Placement)& Axis1) : GeomToStep_Root()
 {
   gp_Ax1 A;
   A = Axis1->Ax1();
@@ -63,7 +63,7 @@ GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement
 //=============================================================================
 
 GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement
-  ( const Handle(Geom2d_AxisPlacement)& Axis1)
+  ( const Handle(Geom2d_AxisPlacement)& Axis1) : GeomToStep_Root()
 {
   gp_Ax2d A;
   A = Axis1->Ax2d();
index f988c9fdef8a1c1a5c779059ff2345d808371dd7..b212338bb9ead014d66300aab037f8a99560ef44 100644 (file)
@@ -30,7 +30,7 @@
 // Creation d' un axis2_placement_2d de prostep a partir d' un Ax2 de gp
 //=============================================================================
 GeomToStep_MakeAxis2Placement2d::GeomToStep_MakeAxis2Placement2d
-( const gp_Ax2& A)
+( const gp_Ax2& A) : GeomToStep_Root()
 {
   Handle(StepGeom_Axis2Placement2d) Axe;
   Handle(StepGeom_CartesianPoint) P;
@@ -56,7 +56,7 @@ GeomToStep_MakeAxis2Placement2d::GeomToStep_MakeAxis2Placement2d
 //=============================================================================
 
 GeomToStep_MakeAxis2Placement2d::GeomToStep_MakeAxis2Placement2d
-( const gp_Ax22d& A)
+( const gp_Ax22d& A) : GeomToStep_Root()
 {
   Handle(StepGeom_Axis2Placement2d) Axe;
   Handle(StepGeom_CartesianPoint) P;
index f0675809a5a34bf09e3f278babcecdd913c10fcc..53edb64754f93a6bbfa881c18279cc38129ea6ea 100644 (file)
@@ -55,7 +55,7 @@ static Handle(StepGeom_Axis2Placement3d)  MakeAxis2Placement3d
 // Creation d' un axis2_placement_3d a l origine
 //=============================================================================
 
-GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d ( )
+GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d ( ) : GeomToStep_Root()
 {
   gp_Ax2 A (gp_Pnt(0.,0.,0.), gp_Dir (0.,0.,1.), gp_Dir (1.,0.,0.));
 //   le reste inchange
@@ -71,7 +71,7 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d ( )
 //=============================================================================
 
 GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d( const gp_Ax2&
-                                                              A)
+                                                              A) : GeomToStep_Root()
 {
   Handle(StepGeom_Axis2Placement3d) Axe = MakeAxis2Placement3d
     (A.Location(), A.Direction(), A.XDirection(), "");
@@ -84,7 +84,7 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d( const gp_Ax2&
 //=============================================================================
 
 GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d
-( const gp_Ax3&         A)
+( const gp_Ax3&         A) : GeomToStep_Root()
 {
   Handle(StepGeom_Axis2Placement3d) Axe = MakeAxis2Placement3d
     (A.Location(), A.Direction(), A.XDirection(), "");
@@ -97,7 +97,7 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d
 //=============================================================================
 
 GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d
-  ( const gp_Trsf& T)
+  ( const gp_Trsf& T) : GeomToStep_Root()
 {
   gp_Ax2 A (gp_Pnt(0.,0.,0.), gp_Dir (0.,0.,1.), gp_Dir (1.,0.,0.));
   A.Transform (T);
@@ -115,7 +115,7 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d
 //=============================================================================
 
 GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d
-  ( const Handle(Geom_Axis2Placement)& Axis2)
+  ( const Handle(Geom_Axis2Placement)& Axis2) : GeomToStep_Root()
 {
   gp_Ax2 A;
   A = Axis2->Ax2();
index 37973471c99c95134439faff68dfed8d12c696bf..ec5ec14ef6ddbfc45ee504f7d7714a1e3c716158 100644 (file)
@@ -37,7 +37,7 @@
 //=============================================================================
 GeomToStep_MakeBSplineCurveWithKnots::
   GeomToStep_MakeBSplineCurveWithKnots( const
-    Handle(Geom_BSplineCurve)& BS )
+    Handle(Geom_BSplineCurve)& BS ) : GeomToStep_Root()
                                                                      
 {
 #define Array1OfPnt_gen TColgp_Array1OfPnt
@@ -51,7 +51,7 @@ GeomToStep_MakeBSplineCurveWithKnots::
 
 GeomToStep_MakeBSplineCurveWithKnots::
   GeomToStep_MakeBSplineCurveWithKnots( const
-    Handle(Geom2d_BSplineCurve)& BS )
+    Handle(Geom2d_BSplineCurve)& BS ) : GeomToStep_Root()
                                                                      
 {
 #define Array1OfPnt_gen TColgp_Array1OfPnt2d
index c04d867bbdfed6f22dcddd773245e9f9b7812a6c..0101879d92283a4a8befaae0b439bd39e5d59d6c 100644 (file)
@@ -37,7 +37,7 @@
 //=============================================================================
 GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve::
   GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve( const
-    Handle(Geom_BSplineCurve)& BS )
+    Handle(Geom_BSplineCurve)& BS ) : GeomToStep_Root()
                                                                      
 {
 #define Array1OfPnt_gen TColgp_Array1OfPnt
@@ -51,7 +51,7 @@ GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve::
 
 GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve::
   GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve( const
-    Handle(Geom2d_BSplineCurve)& BS )
+    Handle(Geom2d_BSplineCurve)& BS ) : GeomToStep_Root()
                                                                      
 {
 #define Array1OfPnt_gen TColgp_Array1OfPnt2d
index 02cdc589a32c525c96e2ed28ad83f475dd3054b9..99672b75eea3e41141aede3adc4d8305b08ab153 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_BSplineSurface.hxx>
 #include <GeomAbs_BSplKnotDistribution.hxx>
 #include <GeomToStep_MakeBSplineSurfaceWithKnots.hxx>
 //=============================================================================
 GeomToStep_MakeBSplineSurfaceWithKnots::
   GeomToStep_MakeBSplineSurfaceWithKnots( const
-    Handle(Geom_BSplineSurface)& BS )
+    Handle(Geom_BSplineSurface)& BS ) : GeomToStep_Root()
                                                                      
 {
   Handle(StepGeom_BSplineSurfaceWithKnots) BSWK;
-  Standard_Integer aUDegree, aVDegree, NU, NV, i, j, NUknots, NVknots, itampon;
-  Standard_Real rtampon;
+  Standard_Integer aUDegree = 0, aVDegree = 0, NU = 0, NV = 0, i = 0, j = 0, NUknots = 0, NVknots = 0, itampon = 0;
+  Standard_Real rtampon = NAN;
   Handle(StepGeom_CartesianPoint) Pt = new StepGeom_CartesianPoint; 
   Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
   StepGeom_BSplineSurfaceForm aSurfaceForm;
index 1e302f7aa2c5aeba362009cd6e9976a4ebf01f26..c49a29e29ae8a7155563e7d81968767666a38b9d 100644 (file)
@@ -16,6 +16,8 @@
 
 //              .cxx
 
+#include <math.h>
+
 #include <Geom_BSplineSurface.hxx>
 #include <GeomAbs_BSplKnotDistribution.hxx>
 #include <GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx>
 //=============================================================================
 GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface::
   GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface( const
-    Handle(Geom_BSplineSurface)& BS )
+    Handle(Geom_BSplineSurface)& BS ) : GeomToStep_Root()
                                                                      
 {
   Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) BSWK;
-  Standard_Integer aUDegree, aVDegree, NU, NV, i, j, NUknots, NVknots, itampon;
-  Standard_Real rtampon;
+  Standard_Integer aUDegree = 0, aVDegree = 0, NU = 0, NV = 0, i = 0, j = 0, NUknots = 0, NVknots = 0, itampon = 0;
+  Standard_Real rtampon = NAN;
   Handle(StepGeom_CartesianPoint) Pt = new StepGeom_CartesianPoint; 
   Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
   StepGeom_BSplineSurfaceForm aSurfaceForm;
index 95f49b50a4188a48b93ef3cb2b73a65f01cd0c24..276851582541ec0bc8c2082f6461707b66f32494 100644 (file)
@@ -34,7 +34,7 @@
 //=============================================================================
 // Creation d' une BoundedCurve de prostep a partir d' une BoundedCurve de Geom
 //=============================================================================
-GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom_BoundedCurve)& C)
+GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom_BoundedCurve)& C) : GeomToStep_Root()
 {
   done = Standard_True;
 
@@ -81,7 +81,7 @@ GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom_Bou
 // Geom2d
 //=============================================================================
 
-GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom2d_BoundedCurve)& C)
+GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom2d_BoundedCurve)& C) : GeomToStep_Root()
 {
   done = Standard_True;
   if (C->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)))
index 006b8d0f0e3e6371c1de3dc1fcaf8fd95003157e..282597ff0d34c469be15523b8bc818bde81c0de4 100644 (file)
@@ -35,7 +35,7 @@
 // de Geom
 //=============================================================================
 GeomToStep_MakeBoundedSurface::GeomToStep_MakeBoundedSurface
-  ( const Handle(Geom_BoundedSurface)& S)
+  ( const Handle(Geom_BoundedSurface)& S) : GeomToStep_Root()
 {
   done = Standard_True;
   if (S->IsKind(STANDARD_TYPE(Geom_BSplineSurface))) {
index 10f3f949c63f93c540bd9136cf876e19dec55efc..9ed9fdd122fb4ff7a01da08f81435d6f120a2be9 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_CartesianPoint.hxx>
 #include <Geom_CartesianPoint.hxx>
 #include <GeomToStep_MakeCartesianPoint.hxx>
 //=============================================================================
 // Creation d' un cartesian_point de prostep a partir d' un point3d de gp
 //=============================================================================
-GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt& P)
+GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt& P) : GeomToStep_Root()
 {
   Handle(StepGeom_CartesianPoint) Pstep = new StepGeom_CartesianPoint;
 //  Handle(TColStd_HArray1OfReal) Acoord = new TColStd_HArray1OfReal(1,3);
-  Standard_Real X, Y, Z;
+  Standard_Real X = NAN, Y = NAN, Z = NAN;
   
   P.Coord(X, Y, Z);
 //  Acoord->SetValue(1,X);
@@ -51,11 +53,11 @@ GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt& P)
 // Creation d' un cartesian_point de prostep a partir d' un point 2d de gp
 //=============================================================================
 
-GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt2d& P)
+GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt2d& P) : GeomToStep_Root()
 {
   Handle(StepGeom_CartesianPoint) Pstep = new StepGeom_CartesianPoint;
 //  Handle(TColStd_HArray1OfReal) Acoord = new TColStd_HArray1OfReal(1,2);
-  Standard_Real X, Y;
+  Standard_Real X = NAN, Y = NAN;
   
   P.Coord(X, Y);
 //  Acoord->SetValue(1,X);
@@ -73,12 +75,12 @@ GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt2d& P)
 //=============================================================================
 
 GeomToStep_MakeCartesianPoint::
-  GeomToStep_MakeCartesianPoint( const Handle(Geom_CartesianPoint)& P)
+  GeomToStep_MakeCartesianPoint( const Handle(Geom_CartesianPoint)& P) : GeomToStep_Root()
 
 {
   Handle(StepGeom_CartesianPoint) Pstep = new StepGeom_CartesianPoint;
 //  Handle(TColStd_HArray1OfReal) Acoord = new TColStd_HArray1OfReal(1,3);
-  Standard_Real X, Y, Z;
+  Standard_Real X = NAN, Y = NAN, Z = NAN;
   
   P->Coord(X, Y, Z);
 //  Acoord->SetValue(1,X);
@@ -98,12 +100,12 @@ GeomToStep_MakeCartesianPoint::
 //=============================================================================
 
 GeomToStep_MakeCartesianPoint::
-  GeomToStep_MakeCartesianPoint( const Handle(Geom2d_CartesianPoint)& P)
+  GeomToStep_MakeCartesianPoint( const Handle(Geom2d_CartesianPoint)& P) : GeomToStep_Root()
 
 {
   Handle(StepGeom_CartesianPoint) Pstep = new StepGeom_CartesianPoint;
 //  Handle(TColStd_HArray1OfReal) Acoord = new TColStd_HArray1OfReal(1,2);
-  Standard_Real X, Y;
+  Standard_Real X = NAN, Y = NAN;
   
   P->Coord(X, Y);
 //  Acoord->SetValue(1,X);
index d76adaf3a28971bd18219ee5b1612150234678b6..553476ccd370ad0e2867f173fa6bb46733dbcbd7 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Circle.hxx>
 #include <Geom_Circle.hxx>
 #include <GeomToStep_MakeAxis2Placement2d.hxx>
@@ -32,7 +34,7 @@
 //=============================================================================
 // Creation d' un cercle de prostep a partir d' un cercle 3d de gp
 //=============================================================================
-GeomToStep_MakeCircle::GeomToStep_MakeCircle( const gp_Circ& C)
+GeomToStep_MakeCircle::GeomToStep_MakeCircle( const gp_Circ& C) : GeomToStep_Root()
 {
 #include "GeomToStep_MakeCircle_gen.pxx"
 }
@@ -43,7 +45,7 @@ GeomToStep_MakeCircle::GeomToStep_MakeCircle( const gp_Circ& C)
 // Geom
 //=============================================================================
 
-GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom_Circle)& Cer)
+GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom_Circle)& Cer) : GeomToStep_Root()
 {
   gp_Circ C;
   C = Cer->Circ();
@@ -56,7 +58,7 @@ GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom_Circle)& Cer)
 // Geom2d
 //=============================================================================
 
-GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom2d_Circle)& Cer)
+GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom2d_Circle)& Cer) : GeomToStep_Root()
 {
   gp_Circ2d C2d;
   C2d = Cer->Circ2d();
@@ -64,7 +66,7 @@ GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom2d_Circle)& Cer)
   Handle(StepGeom_Circle) CStep = new StepGeom_Circle;
   StepGeom_Axis2Placement Ax2;
   Handle(StepGeom_Axis2Placement2d) Ax2Step;
-  Standard_Real Rayon;
+  Standard_Real Rayon = NAN;
   
   GeomToStep_MakeAxis2Placement2d MkAxis2(C2d.Position());
   Ax2Step = MkAxis2.Value();
index 5db9c52b525ee8a317ca7a0f23a24f828dea1482..7ec98088d75ce51b1c0e07d7f581d028fd6b0828 100644 (file)
@@ -40,7 +40,7 @@
 //=============================================================================
 // Creation d' une Conic de prostep a partir d' une Conic de Geom
 //=============================================================================
-GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom_Conic)& C)
+GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom_Conic)& C) : GeomToStep_Root()
 {
   done = Standard_True;
   if (C->IsKind(STANDARD_TYPE(Geom_Circle))) {
@@ -75,7 +75,7 @@ GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom_Conic)& C)
 // Creation d' une Conic2d de prostep a partir d' une Conic de Geom2d
 //=============================================================================
 
-GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom2d_Conic)& C)
+GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom2d_Conic)& C) : GeomToStep_Root()
 {
   done = Standard_True;
   if (C->IsKind(STANDARD_TYPE(Geom2d_Circle))) {
index a8c42bffafbaccf72506a8da25e042768f14a368..7880c7d97bade88457baf943f135855041aaf55d 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_ConicalSurface.hxx>
 #include <GeomToStep_MakeAxis2Placement3d.hxx>
 #include <GeomToStep_MakeConicalSurface.hxx>
 // de Geom
 //=============================================================================
 GeomToStep_MakeConicalSurface::GeomToStep_MakeConicalSurface
-  ( const Handle(Geom_ConicalSurface)& CS )
+  ( const Handle(Geom_ConicalSurface)& CS ) : GeomToStep_Root()
        
 {
   Handle(StepGeom_ConicalSurface) CSstep = new StepGeom_ConicalSurface;
   Handle(StepGeom_Axis2Placement3d) aPosition;
-  Standard_Real aRadius, aSemiAngle;
+  Standard_Real aRadius = NAN, aSemiAngle = NAN;
   
   GeomToStep_MakeAxis2Placement3d MkAxis(CS->Position());
   aPosition = MkAxis.Value();
index 6dfee4c0448fab3719580104ff84b350ea968bef..d0e2d3ff4a11e868d1d1376660493e08cdc2ca5b 100644 (file)
@@ -47,7 +47,7 @@
 //=============================================================================
 // Creation d' une Curve de prostep a partir d' une Curve de Geom
 //=============================================================================
-GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom_Curve)& C)
+GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom_Curve)& C) : GeomToStep_Root()
 {
   done = Standard_True;
   if (C->IsKind(STANDARD_TYPE(Geom_Line))) {
@@ -98,7 +98,7 @@ GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom_Curve)& C)
 // Creation d'une Curve de prostep a partir d' une Curve de Geom2d
 //=============================================================================
 
-GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C)
+GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C) : GeomToStep_Root()
 {
   done = Standard_True;
   if (C->IsKind(STANDARD_TYPE(Geom2d_Line))) {
index 08c4fb0b88227067b6819bcba078090add543482..6874d2aa70ff96c2d8544146097626f9ab9ea616 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_CylindricalSurface.hxx>
 #include <GeomToStep_MakeAxis2Placement3d.hxx>
 #include <GeomToStep_MakeCylindricalSurface.hxx>
 // CylindricalSurface de Geom
 //=============================================================================
 GeomToStep_MakeCylindricalSurface::GeomToStep_MakeCylindricalSurface
-  ( const Handle(Geom_CylindricalSurface)& CS )
+  ( const Handle(Geom_CylindricalSurface)& CS ) : GeomToStep_Root()
        
 {
   Handle(StepGeom_CylindricalSurface) CSstep;
   Handle(StepGeom_Axis2Placement3d) aPosition;
-  Standard_Real aRadius;
+  Standard_Real aRadius = NAN;
   
   GeomToStep_MakeAxis2Placement3d MkAxis2(CS->Position());
   aPosition = MkAxis2.Value();
index 8c643ec588ebe8731f43804ca64098a7a9e5cc23..62a4d6bf2b508fb7f1e9c8469c09b2741c9867da 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Direction.hxx>
 #include <Geom_Direction.hxx>
 #include <GeomToStep_MakeDirection.hxx>
 //=============================================================================
 // Creation d' une direction de prostep a partir d' une Dir de gp
 //=============================================================================
-GeomToStep_MakeDirection::GeomToStep_MakeDirection( const gp_Dir& D)
+GeomToStep_MakeDirection::GeomToStep_MakeDirection( const gp_Dir& D) : GeomToStep_Root()
 {
   Handle(StepGeom_Direction) Dir = new StepGeom_Direction;
   Handle(TColStd_HArray1OfReal) aDirRatios = new TColStd_HArray1OfReal(1,3);
-  Standard_Real X, Y, Z;
+  Standard_Real X = NAN, Y = NAN, Z = NAN;
 
   D.Coord(X, Y, Z);
   aDirRatios->SetValue(1,X);
@@ -47,11 +49,11 @@ GeomToStep_MakeDirection::GeomToStep_MakeDirection( const gp_Dir& D)
 // Creation d' une direction de prostep a partir d' une Dir2d de gp
 //=============================================================================
 
-GeomToStep_MakeDirection::GeomToStep_MakeDirection( const gp_Dir2d& D)
+GeomToStep_MakeDirection::GeomToStep_MakeDirection( const gp_Dir2d& D) : GeomToStep_Root()
 {
   Handle(StepGeom_Direction) Dir = new StepGeom_Direction;
   Handle(TColStd_HArray1OfReal) aDirRatios = new TColStd_HArray1OfReal(1,2);
-  Standard_Real X, Y;
+  Standard_Real X = NAN, Y = NAN;
 
   D.Coord(X, Y);
   aDirRatios->SetValue(1,X);
@@ -67,12 +69,12 @@ GeomToStep_MakeDirection::GeomToStep_MakeDirection( const gp_Dir2d& D)
 //=============================================================================
 
 GeomToStep_MakeDirection::GeomToStep_MakeDirection
-  ( const Handle(Geom_Direction)& Direc)
+  ( const Handle(Geom_Direction)& Direc) : GeomToStep_Root()
 {
   gp_Dir D;
   Handle(StepGeom_Direction) Dir = new StepGeom_Direction;
   Handle(TColStd_HArray1OfReal) aDirRatios = new TColStd_HArray1OfReal(1,3);
-  Standard_Real X, Y, Z;
+  Standard_Real X = NAN, Y = NAN, Z = NAN;
 
   D=Direc->Dir();
   D.Coord(X, Y, Z);
@@ -90,12 +92,12 @@ GeomToStep_MakeDirection::GeomToStep_MakeDirection
 //=============================================================================
 
 GeomToStep_MakeDirection::GeomToStep_MakeDirection
-  ( const Handle(Geom2d_Direction)& Direc)
+  ( const Handle(Geom2d_Direction)& Direc) : GeomToStep_Root()
 {
   gp_Dir2d D;
   Handle(StepGeom_Direction) Dir = new StepGeom_Direction;
   Handle(TColStd_HArray1OfReal) aDirRatios = new TColStd_HArray1OfReal(1,2);
-  Standard_Real X, Y;
+  Standard_Real X = NAN, Y = NAN;
 
   D=Direc->Dir2d();
   D.Coord(X, Y);
index bcfdfb90690cbea65fe6c87ff131c751705615c2..1708cdd1615c0e00e5de8bfd2beb82209eca23ac 100644 (file)
@@ -40,7 +40,7 @@
 // ElementarySurface de Geom
 //=============================================================================
 GeomToStep_MakeElementarySurface::GeomToStep_MakeElementarySurface
-  ( const Handle(Geom_ElementarySurface)& S)
+  ( const Handle(Geom_ElementarySurface)& S) : GeomToStep_Root()
 {
   done = Standard_True;
   if (S->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) {
index 34794facf8de5458ca980458729a6c93d08a5ee5..ddbb724ded3c4ab4949647b6735c6c032d5de0c7 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Ellipse.hxx>
 #include <Geom_Ellipse.hxx>
 #include <GeomToStep_MakeAxis2Placement2d.hxx>
@@ -32,7 +34,7 @@
 //=============================================================================
 // Creation d'une ellipse de prostep a partir d'une ellipse 3d de gp
 //=============================================================================
-GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const gp_Elips& E)
+GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const gp_Elips& E) : GeomToStep_Root()
 {
 #include "GeomToStep_MakeEllipse_gen.pxx"
 }
@@ -43,7 +45,7 @@ GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const gp_Elips& E)
 // Geom
 //=============================================================================
 
-GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom_Ellipse)& Cer)
+GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom_Ellipse)& Cer) : GeomToStep_Root()
 {
   gp_Elips E;
   E = Cer->Elips();
@@ -56,7 +58,7 @@ GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom_Ellipse)& Cer)
 // Geom2d
 //=============================================================================
 
-GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom2d_Ellipse)& Cer)
+GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom2d_Ellipse)& Cer) : GeomToStep_Root()
 {
   gp_Elips2d E2d;
   E2d = Cer->Elips2d();
@@ -64,7 +66,7 @@ GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom2d_Ellipse)& Ce
   Handle(StepGeom_Ellipse) EStep = new StepGeom_Ellipse;
   StepGeom_Axis2Placement Ax2;
   Handle(StepGeom_Axis2Placement2d) Ax2Step;
-  Standard_Real majorR, minorR;
+  Standard_Real majorR = NAN, minorR = NAN;
   
   GeomToStep_MakeAxis2Placement2d MkAxis2(E2d.Axis());
   Ax2Step = MkAxis2.Value();
index b0247d8a13cd31e06a1b7bdb5c063ef533e11946..925d8d0db9e0ac479b4813d89b03b386e43110b6 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Hyperbola.hxx>
 #include <Geom_Hyperbola.hxx>
 #include <GeomToStep_MakeAxis2Placement2d.hxx>
@@ -30,7 +32,7 @@
 // Creation d'une hyperbola de prostep a partir d'une hyperbola de
 // Geom2d
 //=============================================================================
-GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C)
+GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C) : GeomToStep_Root()
 {
   gp_Hypr2d gpHyp;
   gpHyp = C->Hypr2d();
@@ -38,7 +40,7 @@ GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola
   Handle(StepGeom_Hyperbola) HStep = new StepGeom_Hyperbola;
   StepGeom_Axis2Placement            Ax2;
   Handle(StepGeom_Axis2Placement2d)  Ax2Step;
-  Standard_Real                   majorR, minorR;
+  Standard_Real                   majorR = NAN, minorR = NAN;
   
   GeomToStep_MakeAxis2Placement2d MkAxis2(gpHyp.Axis());
   Ax2Step = MkAxis2.Value();
@@ -56,7 +58,7 @@ GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola
 // Geom
 //=============================================================================
 
- GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C)
+ GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C) : GeomToStep_Root()
 {
   gp_Hypr gpHyp;
   gpHyp = C->Hypr();
@@ -64,7 +66,7 @@ GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola
   Handle(StepGeom_Hyperbola) HStep = new StepGeom_Hyperbola;
   StepGeom_Axis2Placement            Ax2;
   Handle(StepGeom_Axis2Placement3d)  Ax2Step;
-  Standard_Real                   majorR, minorR;
+  Standard_Real                   majorR = NAN, minorR = NAN;
   
   GeomToStep_MakeAxis2Placement3d MkAxis2(gpHyp.Position());
   Ax2Step = MkAxis2.Value();
index f480b372d20dd853fa03c1d4071b1876f63b961c..273b77b42c9d8df8873447eb8989ff7813a053b1 100644 (file)
@@ -33,7 +33,7 @@
 //=============================================================================
 // Creation d' une line de prostep a partir d' une Lin de gp
 //=============================================================================
-GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin& L)
+GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin& L) : GeomToStep_Root()
 {
 #define Vec_gen gp_Vec
 #include "GeomToStep_MakeLine_gen.pxx"
@@ -44,7 +44,7 @@ GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin& L)
 // Creation d' une line de prostep a partir d' une Lin2d de gp
 //=============================================================================
 
-GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin2d& L)
+GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin2d& L) : GeomToStep_Root()
 {
 #define Vec_gen gp_Vec2d
 #include "GeomToStep_MakeLine_gen.pxx"
@@ -55,7 +55,7 @@ GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin2d& L)
 // Creation d' une line de prostep a partir d' une Line de Geom
 //=============================================================================
 
-GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom_Line)& Gline)
+GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom_Line)& Gline) : GeomToStep_Root()
 {
   gp_Lin L;
   L = Gline->Lin();
@@ -68,7 +68,7 @@ GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom_Line)& Gline)
 // Creation d' une line de prostep a partir d' une Line de Geom2d
 //=============================================================================
 
-GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom2d_Line)& Gline)
+GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom2d_Line)& Gline) : GeomToStep_Root()
 {
   gp_Lin2d L;
   L = Gline->Lin2d();
index 3650201603d0d6e4a2c1d3180334900a7741f4fc..81155099e7213fdb2c7c0b6c5e833c684a393a5c 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Parabola.hxx>
 #include <Geom_Parabola.hxx>
 #include <GeomToStep_MakeAxis2Placement2d.hxx>
@@ -30,7 +32,7 @@
 // Creation d'une Parabola de prostep a partir d'une Parabola de
 // Geom2d
 //=============================================================================
-GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C)
+GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C) : GeomToStep_Root()
 {
   gp_Parab2d gpPar;
   gpPar = C->Parab2d();
@@ -38,7 +40,7 @@ GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)&
   Handle(StepGeom_Parabola) PStep = new StepGeom_Parabola;
   StepGeom_Axis2Placement            Ax2;
   Handle(StepGeom_Axis2Placement2d)  Ax2Step;
-  Standard_Real                   focal;
+  Standard_Real                   focal = NAN;
   
   GeomToStep_MakeAxis2Placement2d MkAxis2(gpPar.Axis());
   Ax2Step = MkAxis2.Value();
@@ -55,7 +57,7 @@ GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)&
 // Geom
 //=============================================================================
 
- GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C)
+ GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C) : GeomToStep_Root()
 {
   gp_Parab gpPar;
   gpPar = C->Parab();
@@ -63,7 +65,7 @@ GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)&
   Handle(StepGeom_Parabola) PStep = new StepGeom_Parabola;
   StepGeom_Axis2Placement            Ax2;
   Handle(StepGeom_Axis2Placement3d)  Ax2Step;
-  Standard_Real                   focal;
+  Standard_Real                   focal = NAN;
   
   GeomToStep_MakeAxis2Placement3d MkAxis2(gpPar.Position());
   Ax2Step = MkAxis2.Value();
index 9f4aa34491329d13179cb0babb0d33fc42dfd720..b07bd2d3c70ccf760804fd88d4c315a86986280a 100644 (file)
@@ -27,7 +27,7 @@
 //=============================================================================
 // Creation d' un plane de prostep a partir d' un Pln de gp
 //=============================================================================
-GeomToStep_MakePlane::GeomToStep_MakePlane( const gp_Pln& P)
+GeomToStep_MakePlane::GeomToStep_MakePlane( const gp_Pln& P) : GeomToStep_Root()
 {
   Handle(StepGeom_Plane) Plan = new StepGeom_Plane;
   Handle(StepGeom_Axis2Placement3d) aPosition;
@@ -45,7 +45,7 @@ GeomToStep_MakePlane::GeomToStep_MakePlane( const gp_Pln& P)
 // Creation d' un plane de prostep a partir d' un Plane de Geom
 //=============================================================================
 
-GeomToStep_MakePlane::GeomToStep_MakePlane( const Handle(Geom_Plane)& Gpln)
+GeomToStep_MakePlane::GeomToStep_MakePlane( const Handle(Geom_Plane)& Gpln) : GeomToStep_Root()
 {
   gp_Pln P;
   Handle(StepGeom_Plane) Plan = new StepGeom_Plane;
index 48afe4d03036c13d5b8208a7cf4a9359ddf5d983..06875d761beabf6a514897726067aab1b8dbdffa 100644 (file)
@@ -28,7 +28,7 @@
 //=============================================================================
 // Creation d' une polyline Step a partir d' une Array1OfPnt 
 //=============================================================================
-GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt& P)
+GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt& P) : GeomToStep_Root()
 {
   gp_Pnt P1;
 #include "GeomToStep_MakePolyline_gen.pxx"
@@ -38,7 +38,7 @@ GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt& P)
 // Creation d' une polyline Step a partir d' une Array1OfPnt2d
 //=============================================================================
 
-GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt2d& P)
+GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt2d& P) : GeomToStep_Root()
 {
   gp_Pnt2d P1;
 #include "GeomToStep_MakePolyline_gen.pxx"
index 9d7bca0230a21c6be7df2b1d3a59c19ff26440d7..aa59b4ed3f3c9d145b279f4b2aa4dd203fb6b078 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_ConicalSurface.hxx>
 #include <Geom_CylindricalSurface.hxx>
 #include <Geom_Plane.hxx>
@@ -36,7 +38,7 @@
 //=============================================================================
 GeomToStep_MakeRectangularTrimmedSurface::
   GeomToStep_MakeRectangularTrimmedSurface( const
-    Handle(Geom_RectangularTrimmedSurface)& RTSurf )
+    Handle(Geom_RectangularTrimmedSurface)& RTSurf ) : GeomToStep_Root()
                                                                      
 {
 
@@ -49,9 +51,9 @@ GeomToStep_MakeRectangularTrimmedSurface::
     done = Standard_False;
     return;
   }
-  Handle(StepGeom_Surface) StepSurf = mkSurf.Value();
+  const Handle(StepGeom_Surface)& StepSurf = mkSurf.Value();
 
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   RTSurf->Bounds(U1, U2, V1, V2);
   
   // -----------------------------------------
index 404b5e4b394e9d3ce15e2ef6a6c7c62e783df36c..383668aa7f89f83595a8c5cb85973e5747cd0c19 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_SphericalSurface.hxx>
 #include <GeomToStep_MakeAxis2Placement3d.hxx>
 #include <GeomToStep_MakeSphericalSurface.hxx>
 // de Geom
 //=============================================================================
 GeomToStep_MakeSphericalSurface::GeomToStep_MakeSphericalSurface
-  ( const Handle(Geom_SphericalSurface)& S )
+  ( const Handle(Geom_SphericalSurface)& S ) : GeomToStep_Root()
        
 {
   Handle(StepGeom_SphericalSurface) Surf;
   Handle(StepGeom_Axis2Placement3d) aPosition;
-  Standard_Real aRadius;
+  Standard_Real aRadius = NAN;
   
   GeomToStep_MakeAxis2Placement3d MkAxis2(S->Position());
   aPosition = MkAxis2.Value();
index 30477d77f6e69ad650170e787f0e70926989f563..4e97297e2b82e9e7da8928a407fc0e57620aeaa5 100644 (file)
@@ -37,7 +37,7 @@
 //=============================================================================
 // Creation d' une Surface de prostep a partir d' une Surface de Geom
 //=============================================================================
-GeomToStep_MakeSurface::GeomToStep_MakeSurface ( const Handle(Geom_Surface)& S)
+GeomToStep_MakeSurface::GeomToStep_MakeSurface ( const Handle(Geom_Surface)& S) : GeomToStep_Root()
 {
   done = Standard_True;
   if (S->IsKind(STANDARD_TYPE(Geom_BoundedSurface))) {
index 2a33ec167b5d270f33b4cd206953f4a815ca2ae9..fbd5ac0b16fbb3f64b6038d0ca94f72ec428e1e4 100644 (file)
@@ -31,7 +31,7 @@
 // SurfaceOfLinearExtrusion de Geom
 //=============================================================================
 GeomToStep_MakeSurfaceOfLinearExtrusion::GeomToStep_MakeSurfaceOfLinearExtrusion
-  ( const Handle(Geom_SurfaceOfLinearExtrusion)& S )
+  ( const Handle(Geom_SurfaceOfLinearExtrusion)& S ) : GeomToStep_Root()
        
 {
   Handle(StepGeom_SurfaceOfLinearExtrusion) Surf;
index 8f8bc1d59f08a036de9fd33ffd6f391102c47bd6..27707f18958feb44fac281959d1d520255ebc4c7 100644 (file)
@@ -30,7 +30,7 @@
 // SurfaceOfRevolution de Geom
 //=============================================================================
 GeomToStep_MakeSurfaceOfRevolution::GeomToStep_MakeSurfaceOfRevolution
-  ( const Handle(Geom_SurfaceOfRevolution)& S )
+  ( const Handle(Geom_SurfaceOfRevolution)& S ) : GeomToStep_Root()
        
 {
   Handle(StepGeom_SurfaceOfRevolution) Surf;
index 20207243059f5a4bb92b5dec16623441c9c87d61..59c7a98f3aa930552e4a38bebd6a81956d380af4 100644 (file)
@@ -32,7 +32,7 @@
 // SweptSurface de Geom
 //=============================================================================
 GeomToStep_MakeSweptSurface::GeomToStep_MakeSweptSurface
-  ( const Handle(Geom_SweptSurface)& S)
+  ( const Handle(Geom_SweptSurface)& S) : GeomToStep_Root()
 {
   done = Standard_True;
   if (S->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) {
index 08d6466e9870202bb082eb19fe04131e7df70a97..0ff55ad93e999c5f0ae2c1e6fe231aa4830ce212 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_ToroidalSurface.hxx>
 #include <GeomToStep_MakeAxis2Placement3d.hxx>
 #include <GeomToStep_MakeToroidalSurface.hxx>
 // de Geom
 //=============================================================================
 GeomToStep_MakeToroidalSurface::GeomToStep_MakeToroidalSurface
-  ( const Handle(Geom_ToroidalSurface)& S )
+  ( const Handle(Geom_ToroidalSurface)& S ) : GeomToStep_Root()
        
 {
   Handle(StepGeom_ToroidalSurface) Surf;
   Handle(StepGeom_Axis2Placement3d) aPosition;
-  Standard_Real aMajorRadius, aMinorRadius;
+  Standard_Real aMajorRadius = NAN, aMinorRadius = NAN;
   
   GeomToStep_MakeAxis2Placement3d MkAxis2(S->Position());
   aPosition = MkAxis2.Value();
index 85729b167eae0e65974c784f21222b97fc79d370..7e4e66ad87021d7b4f2ebd02b2c66b43d1782c40 100644 (file)
@@ -31,7 +31,7 @@
 //=============================================================================
 // Creation d' un vector de prostep a partir d' un Vec de gp
 //=============================================================================
-GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec& V)
+GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec& V) : GeomToStep_Root()
 {
   gp_Dir D = gp_Dir(V);
   Standard_Real lFactor = StepData_GlobalFactors::Intance().LengthFactor();
@@ -41,7 +41,7 @@ GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec& V)
 // Creation d' un vector de prostep a partir d' un Vec2d de gp
 //=============================================================================
 
-GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec2d& V)
+GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec2d& V) : GeomToStep_Root()
 {
   gp_Dir2d D = gp_Dir2d(V);
   Standard_Real lFactor = 1.;
@@ -53,7 +53,7 @@ GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec2d& V)
 //=============================================================================
 
 GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom_Vector)&
-                                           GVector)
+                                           GVector) : GeomToStep_Root()
 {
   gp_Vec V;
   V = GVector->Vec();
@@ -67,7 +67,7 @@ GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom_Vector)&
 //=============================================================================
 
 GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom2d_Vector)&
-                                           GVector)
+                                           GVector) : GeomToStep_Root()
 {
   gp_Vec2d V;
   V = GVector->Vec2d();
index b8553f8bebe631eec5ca37d1014c5e436d18892d..2222274969c4df37b3e5f84ca86d79bf71fb2c3a 100644 (file)
@@ -302,7 +302,7 @@ static void Print(const Handle(Geom2d_BezierCurve)& B,
   }
 
   // poles and weights
-  Standard_Integer i,degree = B->Degree();
+  Standard_Integer i = 0,degree = B->Degree();
   if (!compact) OS << "\n  Degree :";
   OS << degree << " ";
   
@@ -350,7 +350,7 @@ static void Print(const Handle(Geom2d_BSplineCurve)& B,
   }
 
   // poles and weights
-  Standard_Integer i,degree,nbpoles,nbknots;
+  Standard_Integer i = 0,degree = 0,nbpoles = 0,nbknots = 0;
   degree = B->Degree();
   nbpoles = B->NbPoles();
   nbknots = B->NbKnots();
@@ -477,7 +477,7 @@ void GeomTools_Curve2dSet::PrintCurve2d(const Handle(Geom2d_Curve)& C,
 
 void  GeomTools_Curve2dSet::Dump(Standard_OStream& OS)const 
 {
-  Standard_Integer i, nbsurf = myMap.Extent();
+  Standard_Integer i = 0, nbsurf = myMap.Extent();
   OS << "\n -------\n";
   OS << "Dump of "<< nbsurf << " Curve2ds ";
   OS << "\n -------\n\n";
@@ -498,7 +498,7 @@ void  GeomTools_Curve2dSet::Write(Standard_OStream& OS, const Message_ProgressRa
 {
   std::streamsize prec = OS.precision(17);
 
-  Standard_Integer i, nbsurf = myMap.Extent();
+  Standard_Integer i = 0, nbsurf = myMap.Extent();
   OS << "Curve2ds "<< nbsurf << "\n";
   Message_ProgressScope aPS(theProgress, "2D Curves", nbsurf);
   for (i = 1; i <= nbsurf && aPS.More(); i++, aPS.Next()) {
@@ -732,7 +732,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS,
 
 Handle(Geom2d_Curve) GeomTools_Curve2dSet::ReadCurve2d(Standard_IStream& IS)
 {
-  Standard_Integer ctype;
+  Standard_Integer ctype = 0;
 
   Handle(Geom2d_Curve) C;
   try {
@@ -845,7 +845,7 @@ void  GeomTools_Curve2dSet::Read(Standard_IStream& IS, const Message_ProgressRan
     return;
   }
 
-  Standard_Integer i, nbcurve;
+  Standard_Integer i = 0, nbcurve = 0;
   IS >> nbcurve;
   Message_ProgressScope aPS(theProgress, "2D Curves", nbcurve);
   for (i = 1; i <= nbcurve && aPS.More(); i++, aPS.Next()) {
index 76f053cfb9b6ca13203d963a0eb4c4a17c1e5ac5..daf8a2fba7f0f767525ff8f058e8647503c82f65 100644 (file)
@@ -316,7 +316,7 @@ static void Print(const Handle(Geom_BezierCurve)& B,
   }
 
   // poles and weights
-  Standard_Integer i,degree = B->Degree();
+  Standard_Integer i = 0,degree = B->Degree();
   if (!compact) OS << "\n  Degree :";
   OS << degree << " ";
   
@@ -364,7 +364,7 @@ static void Print(const Handle(Geom_BSplineCurve)& B,
   }
 
   // poles and weights
-  Standard_Integer i,degree,nbpoles,nbknots;
+  Standard_Integer i = 0,degree = 0,nbpoles = 0,nbknots = 0;
   degree = B->Degree();
   nbpoles = B->NbPoles();
   nbknots = B->NbKnots();
@@ -494,7 +494,7 @@ void GeomTools_CurveSet::PrintCurve(const Handle(Geom_Curve)& C,
 
 void  GeomTools_CurveSet::Dump(Standard_OStream& OS)const 
 {
-  Standard_Integer i, nbsurf = myMap.Extent();
+  Standard_Integer i = 0, nbsurf = myMap.Extent();
   OS << "\n -------\n";
   OS << "Dump of "<< nbsurf << " Curves ";
   OS << "\n -------\n\n";
@@ -515,7 +515,7 @@ void  GeomTools_CurveSet::Write(Standard_OStream& OS, const Message_ProgressRang
 {
   std::streamsize  prec = OS.precision(17);
 
-  Standard_Integer i, nbcurve = myMap.Extent();
+  Standard_Integer i = 0, nbcurve = myMap.Extent();
   OS << "Curves "<< nbcurve << "\n";
   Message_ProgressScope aPS(theProgress, "3D Curves", nbcurve);
   for (i = 1; i <= nbcurve && aPS.More(); i++, aPS.Next()) {
@@ -754,7 +754,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS,
 
 Handle(Geom_Curve) GeomTools_CurveSet::ReadCurve (Standard_IStream& IS)
 {
-  Standard_Integer ctype;
+  Standard_Integer ctype = 0;
 
   Handle(Geom_Curve) C;
   try {
@@ -866,7 +866,7 @@ void  GeomTools_CurveSet::Read(Standard_IStream& IS, const Message_ProgressRange
     return;
   }
 
-  Standard_Integer i, nbcurve;
+  Standard_Integer i = 0, nbcurve = 0;
   IS >> nbcurve;
   Message_ProgressScope aPS(theProgress, "3D Curves", nbcurve);
   for (i = 1; i <= nbcurve && aPS.More(); i++, aPS.Next()) {
index 707cfde1d914b6a82aee69fcf89e7030c08cba30..5b123b2ef8b5e53e44b69e4cbc70916e41bc2c1d 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_BezierSurface.hxx>
 #include <Geom_ConicalSurface.hxx>
 #include <Geom_CylindricalSurface.hxx>
@@ -388,7 +390,7 @@ static void Print(const Handle(Geom_BezierSurface)& S,
   }
 
   // poles and weights
-  Standard_Integer i,j,udegree,vdegree;
+  Standard_Integer i = 0,j = 0,udegree = 0,vdegree = 0;
   udegree = S->UDegree();
   vdegree = S->VDegree();
   if (!compact) OS << "\n  Degrees :";
@@ -465,7 +467,7 @@ static void Print(const Handle(Geom_BSplineSurface)& S,
   
 
   // poles and weights
-  Standard_Integer i,j,udegree,vdegree,nbupoles,nbvpoles,nbuknots,nbvknots;
+  Standard_Integer i = 0,j = 0,udegree = 0,vdegree = 0,nbupoles = 0,nbvpoles = 0,nbuknots = 0,nbvknots = 0;
   udegree = S->UDegree();
   vdegree = S->VDegree();
   nbupoles = S->NbUPoles();
@@ -522,7 +524,7 @@ static void Print(const Handle(Geom_RectangularTrimmedSurface)& S,
   else
     OS << "RectangularTrimmedSurface";
 
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   S->Bounds(U1,U2,V1,V2);
   if (!compact) OS << "\nParameters : ";
   OS << U1 << " " << U2 << " " << V1 << " " << V2 <<"\n";
@@ -612,7 +614,7 @@ void GeomTools_SurfaceSet::PrintSurface(const Handle(Geom_Surface)& S,
 
 void  GeomTools_SurfaceSet::Dump(Standard_OStream& OS)const 
 {
-  Standard_Integer i, nbsurf = myMap.Extent();
+  Standard_Integer i = 0, nbsurf = myMap.Extent();
   OS << "\n -------\n";
   OS << "Dump of "<< nbsurf << " surfaces ";
   OS << "\n -------\n\n";
@@ -633,7 +635,7 @@ void  GeomTools_SurfaceSet::Write(Standard_OStream& OS, const Message_ProgressRa
 {
   std::streamsize  prec = OS.precision(17);
 
-  Standard_Integer i, nbsurf = myMap.Extent();
+  Standard_Integer i = 0, nbsurf = myMap.Extent();
   OS << "Surfaces "<< nbsurf << "\n";
   Message_ProgressScope aPS(theProgress, "Surfaces", nbsurf);
   for (i = 1; i <= nbsurf && aPS.More(); i++, aPS.Next()) {
@@ -817,7 +819,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS,
   TColgp_Array2OfPnt poles(1,udegree+1,1,vdegree+1);
   TColStd_Array2OfReal weights(1,udegree+1,1,vdegree+1);
   
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   for (i = 1; i <= udegree+1; i++) {
     for (j = 1; j <= vdegree+1; j++) {
       IS >> poles(i,j);
@@ -853,7 +855,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS,
   TColgp_Array2OfPnt poles(1,nbupoles,1,nbvpoles);
   TColStd_Array2OfReal weights(1,nbupoles,1,nbvpoles);
   
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   for (i = 1; i <= nbupoles; i++) {
     for (j = 1; j <= nbvpoles; j++) {
       IS >> poles(i,j);
@@ -926,7 +928,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS,
 
 Handle(Geom_Surface) GeomTools_SurfaceSet::ReadSurface (Standard_IStream& IS)
 {
-  Standard_Integer stype;
+  Standard_Integer stype = 0;
 
   Handle(Geom_Surface) S;
   try {
@@ -1055,7 +1057,7 @@ void  GeomTools_SurfaceSet::Read(Standard_IStream& IS, const Message_ProgressRan
     return;
   }
 
-  Standard_Integer i, nbsurf;
+  Standard_Integer i = 0, nbsurf = 0;
   IS >> nbsurf;
   Message_ProgressScope aPS(theProgress, "Surfaces", nbsurf);
   for (i = 1; i <= nbsurf && aPS.More(); i++, aPS.Next()) {
index bc9b09ca08981b0592303e8d6f5a6ca44db8dc14..45b31e201109a5485e392d528f62e09db258dd3e 100644 (file)
@@ -26,7 +26,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CStructure,Standard_Transient)
 //=============================================================================
 Graphic3d_CStructure::Graphic3d_CStructure (const Handle(Graphic3d_StructureManager)& theManager)
 : myGraphicDriver  (theManager->GraphicDriver()),
-  myId             (-1),
+  myId(myGraphicDriver->NewIdentification()),
   myZLayer         (Graphic3d_ZLayerId_Default),
   myPriority        (Graphic3d_DisplayPriority_Normal),
   myPreviousPriority(Graphic3d_DisplayPriority_Normal),
@@ -43,7 +43,7 @@ Graphic3d_CStructure::Graphic3d_CStructure (const Handle(Graphic3d_StructureMana
   IsMutable        (Standard_False),
   Is2dText         (Standard_False)
 {
-  myId = myGraphicDriver->NewIdentification();
+  
 }
 
 //=======================================================================
index 985692f00cba09e3682a861316ed6cf81109d957..59e0ee75a9f373e8d5ee4a256f20ed4629e3609f 100644 (file)
@@ -349,7 +349,7 @@ void Graphic3d_CView::SetComputedMode (const Standard_Boolean theMode)
 
   for (Graphic3d_MapOfStructure::Iterator aDispStructIter (myStructsDisplayed); aDispStructIter.More(); aDispStructIter.Next())
   {
-    Handle(Graphic3d_Structure) aStruct  = aDispStructIter.Key();
+    const Handle(Graphic3d_Structure)& aStruct  = aDispStructIter.Key();
     const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (aStruct->Visual());
     if (anAnswer != Graphic3d_TOA_COMPUTE)
     {
index ee7204fe8e3065ff573acfc3d69b90936f557e5b..41f230d4565fb706dea7e693b2a0e1d541959718 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Graphic3d_Camera.hxx>
 
 #include <gp_Pln.hxx>
@@ -782,7 +784,7 @@ gp_XYZ Graphic3d_Camera::ViewDimensions (const Standard_Real theZValue) const
 {
   // view plane dimensions
   Standard_Real aSize = IsOrthographic() ? myScale : (2.0 * theZValue * myFOVyTan);
-  Standard_Real aSizeX, aSizeY;
+  Standard_Real aSizeX = NAN, aSizeY = NAN;
   if (myAspect > 1.0)
   {
     aSizeX = aSize * myAspect;
index 52c1c309f52e0c7e15e032479155b8d31be8a825..99fb33025c54889cfdca106bf9f474a94d9a98b7 100644 (file)
@@ -54,7 +54,7 @@ Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (unsigned char thePosXLocation,
 // function : Graphic3d_CubeMapOrder
 // purpose  :
 // =======================================================================
-Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder theOrder)
+Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder& theOrder)
   :
   myConvolution  (theOrder.Order.myConvolution),
   myHasOverflows (theOrder.Order.myHasOverflows)
@@ -135,7 +135,7 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::SetDefault()
 // function : Permute
 // purpose  :
 // =======================================================================
-Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (Graphic3d_ValidatedCubeMapOrder thePermutation)
+Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (const Graphic3d_ValidatedCubeMapOrder& thePermutation)
 {
   for (unsigned char i = 0; i < 6; ++i)
   {
@@ -149,7 +149,7 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (Graphic3d_ValidatedCube
 // function : Permuted
 // purpose  :
 // =======================================================================
-Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted (Graphic3d_ValidatedCubeMapOrder thePermutation) const
+Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted (const Graphic3d_ValidatedCubeMapOrder& thePermutation) const
 {
   Graphic3d_CubeMapOrder anOrder = *this;
   anOrder.Permute (thePermutation);
index cbdeafc10dea8c78910835ecbef95eda3ca9d25c..a5cdeb82e678a9b81b172e8008146a44214d0ba0 100644 (file)
@@ -42,7 +42,7 @@ public:
                                           unsigned char theNegZLocation);
 
   //! Creates Graphic3d_CubeMapOrder using Graphic3d_ValidatedCubeMapOrder.
-  Standard_EXPORT Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder theOrder);
+  Standard_EXPORT Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder& theOrder);
 
   //! Alias of 'operator='.
   Standard_EXPORT Graphic3d_CubeMapOrder& Set (const Graphic3d_CubeMapOrder& theOrder);
@@ -61,10 +61,10 @@ public:
   Standard_EXPORT Graphic3d_CubeMapOrder& SetDefault();
 
   //! Applies another cubemap order as permutation for the current one.
-  Standard_EXPORT Graphic3d_CubeMapOrder& Permute (Graphic3d_ValidatedCubeMapOrder anOrder);
+  Standard_EXPORT Graphic3d_CubeMapOrder& Permute (const Graphic3d_ValidatedCubeMapOrder& anOrder);
 
   //! Returns permuted by other cubemap order copy of current one. 
-  Standard_EXPORT Graphic3d_CubeMapOrder Permuted (Graphic3d_ValidatedCubeMapOrder anOrder) const;
+  Standard_EXPORT Graphic3d_CubeMapOrder Permuted (const Graphic3d_ValidatedCubeMapOrder& anOrder) const;
 
   //! Swaps values of two cubemap sides.
   Standard_EXPORT Graphic3d_CubeMapOrder& Swap (Graphic3d_CubeMapSide theFirstSide,
index 2f9e18015847253f24d25aae42f6e84fdcfabeea..df8e6f71af094416ac149d0e45ee7ed3730773c4 100644 (file)
@@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMapPacked, Graphic3d_CubeMap)
 // purpose  :
 // =======================================================================
 Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const TCollection_AsciiString&        theFilePath,
-                                                  const Graphic3d_ValidatedCubeMapOrder theOrder)
+                                                  const Graphic3d_ValidatedCubeMapOrder& theOrder)
   :
   Graphic3d_CubeMap (theFilePath),
   myOrder           (theOrder),
@@ -36,7 +36,7 @@ Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const TCollection_AsciiString&
 // purpose  :
 // =======================================================================
 Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const Handle(Image_PixMap)&           theImage,
-                                                  const Graphic3d_ValidatedCubeMapOrder theOrder)
+                                                  const Graphic3d_ValidatedCubeMapOrder& theOrder)
   :
   Graphic3d_CubeMap (Handle(Image_PixMap)()),
   myOrder           (theOrder),
index 41a4f94d7e96f6d8f29be98df288e69afbbee70e..ef7bbd50e521155a17629e2b415fb1953685dda5 100644 (file)
@@ -29,13 +29,13 @@ public:
   //! @theFileName - path to the cubemap image
   //! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides
   Standard_EXPORT Graphic3d_CubeMapPacked (const TCollection_AsciiString&        theFileName,
-                                           const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default());
+                                           const Graphic3d_ValidatedCubeMapOrder& theOrder = Graphic3d_CubeMapOrder::Default());
 
   //! Initialization to set cubemap directly by PixMap.
   //! @thePixMap - origin PixMap
   //! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides
   Standard_EXPORT Graphic3d_CubeMapPacked (const Handle(Image_PixMap)&           theImage,
-                                           const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default());
+                                           const Graphic3d_ValidatedCubeMapOrder& theOrder = Graphic3d_CubeMapOrder::Default());
 
   //! Returns current cubemap side as compressed PixMap.
   Standard_EXPORT virtual Handle(Image_CompressedPixMap) CompressedValue (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE;
index 17504a4241a640c821b51dd4e39f2ecabc4f76f2..cefce420f390d84b08dd0cdfa24238ccaad3849d 100644 (file)
@@ -59,7 +59,7 @@ protected:
   OSD_Path             myPaths[6];  //!< array of paths to cubemap images
   Handle(Image_PixMap) myImages[6]; //!< array of cubemap images
 
-  Standard_Size        mySize;      //!< size of each side of cubemap
+  Standard_Size        mySize{};      //!< size of each side of cubemap
   Image_Format         myFormat;    //!< format each side of cubemap
 
 private:
index ce92e0edb0daf3fe286f363782d1a87ca851e634..7c52e728e6d321d629c44eb6a88ce909694c0758 100644 (file)
@@ -296,21 +296,21 @@ protected:
 
   // for caching clip points projections onto viewing area normals once per traverse
   // ORDER: LEFT, RIGHT, BOTTOM, TOP, NEAR, FAR
-  Standard_Real myMaxClipProjectionPts[PlanesNB]; //!< Max view volume's vertices projections onto its normals
-  Standard_Real myMinClipProjectionPts[PlanesNB]; //!< Min view volume's vertices projections onto its normals
+  Standard_Real myMaxClipProjectionPts[PlanesNB]{}; //!< Max view volume's vertices projections onto its normals
+  Standard_Real myMinClipProjectionPts[PlanesNB]{}; //!< Min view volume's vertices projections onto its normals
 
   // for caching clip points projections onto AABB normals once per traverse
   // ORDER: E0, E1, E2
-  Standard_Real myMaxOrthoProjectionPts[3]; //!< Max view volume's vertices projections onto normalized dimensions of AABB
-  Standard_Real myMinOrthoProjectionPts[3]; //!< Min view volume's vertices projections onto normalized dimensions of AABB
+  Standard_Real myMaxOrthoProjectionPts[3]{}; //!< Max view volume's vertices projections onto normalized dimensions of AABB
+  Standard_Real myMinOrthoProjectionPts[3]{}; //!< Min view volume's vertices projections onto normalized dimensions of AABB
 
   Standard_Boolean myIsProjectionParallel;
 
   Graphic3d_Mat4d myProjectionMat;
   Graphic3d_Mat4d myWorldViewMat;
 
-  Standard_Integer myViewportWidth;
-  Standard_Integer myViewportHeight;
+  Standard_Integer myViewportWidth{};
+  Standard_Integer myViewportHeight{};
 
   Graphic3d_WorldViewProjState myWorldViewProjState; //!< State of world view projection matrices.
 
index 2d0985038ab308c3ef747822a0c74183edd41957..65a6dee73db7aad65ead726a7687d8ffcbbd1aa8 100644 (file)
@@ -488,7 +488,7 @@ namespace
 //function : Graphic3d_HatchStyle
 //purpose  :
 //=======================================================================
-Graphic3d_HatchStyle::Graphic3d_HatchStyle (const Handle(Image_PixMap)& thePattern)
+Graphic3d_HatchStyle::Graphic3d_HatchStyle (const Handle(Image_PixMap)& thePattern) : myHatchType(Standard_Atomic_Increment (&THE_HATCH_STYLE_COUNTER))
 {
   Standard_ProgramError_Raise_if (thePattern.IsNull(), "Null pointer to a hatch pattern image");
   Standard_ProgramError_Raise_if (
@@ -501,7 +501,7 @@ Graphic3d_HatchStyle::Graphic3d_HatchStyle (const Handle(Image_PixMap)& thePatte
   myPattern->Allocate (aByteSize);
   std::memcpy (myPattern->ChangeData(), thePattern->Data(), aByteSize);
 
-  myHatchType = Standard_Atomic_Increment (&THE_HATCH_STYLE_COUNTER);
+  
 }
 
 //=======================================================================
index c73419b977cce8d478d5313fa679e6a14ca45124..61d8eda82424d43bbc282b8e7021a577c613165c 100644 (file)
@@ -188,7 +188,7 @@ private:
   mutable Standard_Boolean myIsBVHPrimitivesNeedsReset;
 
   //! Defines if the cached bounding box is outdated.
-  mutable bool myIsBoundingBoxNeedsReset[2];
+  mutable bool myIsBoundingBoxNeedsReset[2]{};
 
   //! Cached layer bounding box.
   mutable Bnd_Box myBoundingBox[2];
index 584cb4c3fd1aebb3bd113e8207eed0d8000c29c8..925980f7fe2b4174096e4abc84db626458c98ed3 100644 (file)
@@ -188,8 +188,8 @@ protected:
   Graphic3d_Vec4          myAmbient;                //!< cached value of cumulative ambient color
   TCollection_AsciiString myKeyEnabledLong;         //!< key identifying the list of enabled light sources by their type
   TCollection_AsciiString myKeyEnabledShort;        //!< key identifying the list of enabled light sources by the number of sources of each type
-  Standard_Integer        myLightTypes       [Graphic3d_TypeOfLightSource_NB]; //!< counters per each light source type defined in the list
-  Standard_Integer        myLightTypesEnabled[Graphic3d_TypeOfLightSource_NB]; //!< counters per each light source type enabled in the list
+  Standard_Integer        myLightTypes       [Graphic3d_TypeOfLightSource_NB]{}; //!< counters per each light source type defined in the list
+  Standard_Integer        myLightTypesEnabled[Graphic3d_TypeOfLightSource_NB]{}; //!< counters per each light source type enabled in the list
   Standard_Integer        myNbEnabled;              //!< number of enabled light sources, excluding ambient
   Standard_Integer        myNbCastShadows;          //!< number of enabled light sources casting shadows
   Standard_Size           myRevision;               //!< current revision of light source set
old mode 100755 (executable)
new mode 100644 (file)
index e78aa46..e3c7397
@@ -510,7 +510,7 @@ Handle(Graphic3d_MarkerImage) Graphic3d_MarkerImage::StandardMarker (const Aspec
       anImageA->InitZero (Image_Format_Alpha, aSize, aSize);
 
       // we draw a set of circles
-      Image_ColorRGBA aColor32;
+      Image_ColorRGBA aColor32{};
       aColor32.a() = 255;
       Standard_Real aHLS[3];
       const Standard_ShortReal aDelta = 0.1f;
index 497d68be400b956d0fa5cd7635f5a0070d335978..0847990349d546352729cc22360261a83b9547c9 100644 (file)
@@ -261,9 +261,9 @@ private:
   Graphic3d_PBRMaterial    myPBRMaterial;
   TCollection_AsciiString  myStringName;
   Quantity_Color           myColors[Graphic3d_TypeOfReflection_NB];
-  Standard_ShortReal       myTransparencyCoef;
-  Standard_ShortReal       myRefractionIndex;
-  Standard_ShortReal       myShininess;
+  Standard_ShortReal       myTransparencyCoef{};
+  Standard_ShortReal       myRefractionIndex{};
+  Standard_ShortReal       myShininess{};
 
   Graphic3d_TypeOfMaterial myMaterialType;
   Graphic3d_NameOfMaterial myMaterialName;
index ea91abeecd821b62f6051e807ff761378a078f95..26ecfd092f5c58ff39de65e9432631720e09e8d7 100644 (file)
@@ -190,10 +190,10 @@ private:
 private:
 
   Quantity_ColorRGBA myColor;     //!< albedo color with alpha component [0, 1]
-  Standard_ShortReal myMetallic;  //!< metallic coefficient of material [0, 1]
-  Standard_ShortReal myRoughness; //!< roughness coefficient of material [0, 1]
+  Standard_ShortReal myMetallic{};  //!< metallic coefficient of material [0, 1]
+  Standard_ShortReal myRoughness{}; //!< roughness coefficient of material [0, 1]
   Graphic3d_Vec3     myEmission;  //!< light intensity emitted by material [>= 0]
-  Standard_ShortReal myIOR;       //!< index of refraction [1, 3]
+  Standard_ShortReal myIOR{};       //!< index of refraction [1, 3]
 
 };
 
index 023b574260beb6282bb7d6af2f46926afbbd4fcc..fdcf3bb6b4f9401f16e74402eeae962319d1d0a0 100644 (file)
@@ -216,7 +216,7 @@ protected:
 
   Aspect_GraphicsLibrary myGapi;          //!< GAPI name
   Graphic3d_Vec2i  myGapiVersion;         //!< GAPI version major/minor number pair
-  Standard_Boolean myGlslExtensions[Graphic3d_GlslExtension_NB];
+  Standard_Boolean myGlslExtensions[Graphic3d_GlslExtension_NB]{};
   Standard_Boolean myHasFlatShading;      //!< flag indicating flat shading usage
   Standard_Boolean myToReverseDFdxSign;   //!< flag to reverse flat shading normal (workaround)
   Standard_Boolean mySetPointSize;        //!< always set gl_PointSize variable
index eace8db06f574d6c7ae66bdecbbdf241de7ba148..b5b3019d9407dfa2a2569cfc4e1e4b2bb25e9ff6 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <Standard_Dump.hxx>
 
+#include <math.h>
 #include <stdio.h>
 
 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Structure,Standard_Transient)
@@ -873,7 +874,7 @@ void Graphic3d_Structure::TransformBoundaries (const gp_Trsf& theTrsf,
                                                Standard_Real& theYMax,
                                                Standard_Real& theZMax)
 {
-  Standard_Real aXMin, aYMin, aZMin, aXMax, aYMax, aZMax, anU, aV, aW;
+  Standard_Real aXMin = NAN, aYMin = NAN, aZMin = NAN, aXMax = NAN, aYMax = NAN, aZMax = NAN, anU = NAN, aV = NAN, aW = NAN;
 
   Graphic3d_Structure::Transforms (theTrsf, theXMin, theYMin, theZMin, aXMin, aYMin, aZMin);
   Graphic3d_Structure::Transforms (theTrsf, theXMax, theYMax, theZMax, aXMax, aYMax, aZMax);
index a4e45a9b012145d3ae5f98a6bfe1b6c21f150a84..a5620e7733f5a376d4315f4bcf0ca35bb286e36e 100644 (file)
@@ -137,7 +137,7 @@ Handle(Graphic3d_Structure) Graphic3d_StructureManager::Identification (const St
   Handle(Graphic3d_Structure) SGfound;
 
   for (; it.More() && notfound; it.Next()) {
-    Handle(Graphic3d_Structure) SG = it.Key();
+    const Handle(Graphic3d_Structure)& SG = it.Key();
     if ( SG->Identification () == AId) {
       notfound  = Standard_False;
       SGfound = SG;
@@ -165,8 +165,7 @@ void Graphic3d_StructureManager::RecomputeStructures()
   NCollection_Map<Graphic3d_Structure*> aStructNetwork;
   for (Graphic3d_MapIteratorOfMapOfStructure anIter(myDisplayedStructure); anIter.More(); anIter.Next())
   {
-    Handle(Graphic3d_Structure) aStructure = anIter.Key();
-    anIter.Key()->Network (anIter.Key().get(), Graphic3d_TOC_DESCENDANT, aStructNetwork);
+       anIter.Key()->Network (anIter.Key().get(), Graphic3d_TOC_DESCENDANT, aStructNetwork);
   }
 
   RecomputeStructures (aStructNetwork);
index d3f9ed74806bb02dcf2a62751980e553b284884d..15f100e5e57eb75fe145c3cf94d38074aa32c756 100644 (file)
 
 #include <Graphic3d_Vertex.hxx>
 
+#include <cmath>
 #include <gp_XYZ.hxx>
 #include <Standard_Dump.hxx>
 
 Standard_ShortReal Graphic3d_Vertex::Distance(const Graphic3d_Vertex& AOther) const
 {
-  return sqrt( (X() - AOther.X()) * (X() - AOther.X())
+  return std::sqrt( (X() - AOther.X()) * (X() - AOther.X())
                     + (Y() - AOther.Y()) * (Y() - AOther.Y())
                     + (Z() - AOther.Z()) * (Z() - AOther.Z()) );
 }
index 04a5968f15c5e2157e70f06c603903e0edfee39c..91512ffcba994c21fbd123939a9986ad108109ef 100644 (file)
@@ -19,6 +19,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <HLRAlgo_EdgeIterator.hxx>
 #include <HLRAlgo_EdgeStatus.hxx>
 
@@ -56,8 +58,8 @@ void HLRAlgo_EdgeIterator::InitHidden (HLRAlgo_EdgeStatus& status)
   }
   else {
     myNbHid = ((HLRAlgo_EdgeStatus*)EHid)->NbVisiblePart();
-    Standard_Real B1;
-    Standard_ShortReal B2;
+    Standard_Real B1 = NAN;
+    Standard_ShortReal B2 = NAN;
     ((HLRAlgo_EdgeStatus*)EHid)->Bounds
       (myHidStart,myHidTolStart,B1,B2);
     ((HLRAlgo_EdgeStatus*)EHid)->VisiblePart
@@ -77,8 +79,8 @@ void HLRAlgo_EdgeIterator::NextHidden ()
 {
   if (iHid >= myNbHid + 1) iHid++;
   else {
-    Standard_Real B1;
-    Standard_ShortReal B2;
+    Standard_Real B1 = NAN;
+    Standard_ShortReal B2 = NAN;
     ((HLRAlgo_EdgeStatus*)EHid)->VisiblePart
       (iHid,B1,B2,myHidStart,myHidTolStart);
     iHid++;
index ad41eb8e19f5fe0f978d5469ac09f16a6107ffe5..84391a154fff70edb39f9795ed6cd395c7e92c8b 100644 (file)
@@ -162,7 +162,7 @@ private:
 
   TColStd_Array1OfInteger myEdges;
   TColStd_Array1OfInteger myFlags;
-  MinMaxIndices myMinMax;
+  MinMaxIndices myMinMax{};
 };
 
 #endif // _HLRAlgo_EdgesBlock_HeaderFile
index 31cd6e4dd70aca33057b851ae80410bf017f46de..312352673abb3df0c3bd429666a0b455f825947f 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <HLRAlgo_PolyAlgo.hxx>
 
 #include <HLRAlgo_BiPoint.hxx>
@@ -66,16 +68,16 @@ void HLRAlgo_PolyAlgo::Clear()
 
 void HLRAlgo_PolyAlgo::Update ()
 {
-  Standard_Integer j;
-  Standard_Integer nxMin,nyMin,nzMin,nxMax,nyMax,nzMax;
-  Standard_Real xShellMin,yShellMin,zShellMin;
-  Standard_Real xShellMax,yShellMax,zShellMax;
-  Standard_Real xPolyTMin,yPolyTMin,zPolyTMin;
-  Standard_Real xPolyTMax,yPolyTMax,zPolyTMax;
-  Standard_Real xTrianMin,yTrianMin,zTrianMin;
-  Standard_Real xTrianMax,yTrianMax,zTrianMax;
-  Standard_Real xSegmnMin,ySegmnMin,zSegmnMin;
-  Standard_Real xSegmnMax,ySegmnMax,zSegmnMax;
+  Standard_Integer j = 0;
+  Standard_Integer nxMin = 0,nyMin = 0,nzMin = 0,nxMax = 0,nyMax = 0,nzMax = 0;
+  Standard_Real xShellMin = NAN,yShellMin = NAN,zShellMin = NAN;
+  Standard_Real xShellMax = NAN,yShellMax = NAN,zShellMax = NAN;
+  Standard_Real xPolyTMin = NAN,yPolyTMin = NAN,zPolyTMin = NAN;
+  Standard_Real xPolyTMax = NAN,yPolyTMax = NAN,zPolyTMax = NAN;
+  Standard_Real xTrianMin = NAN,yTrianMin = NAN,zTrianMin = NAN;
+  Standard_Real xTrianMax = NAN,yTrianMax = NAN,zTrianMax = NAN;
+  Standard_Real xSegmnMin = NAN,ySegmnMin = NAN,zSegmnMin = NAN;
+  Standard_Real xSegmnMax = NAN,ySegmnMax = NAN,zSegmnMax = NAN;
   Standard_Real Big = Precision::Infinite();
   HLRAlgo_PolyData::Box aBox(Big, Big, Big, -Big, -Big, -Big);
 
@@ -158,10 +160,10 @@ void HLRAlgo_PolyAlgo::Update ()
        xPolyTMax = -Big;
        yPolyTMax = -Big;
        zPolyTMax = -Big;
-       Standard_Integer otheri,nbHide = 0;//min,max;
-       Standard_Real X1,X2,X3,Y1,Y2,Y3,Z1,Z2,Z3;
-       Standard_Real dn,dnx,dny,dnz,dx1,dy1,dz1,dx2,dy2,dz2,dx3,dy3;
-       Standard_Real adx1,ady1,adx2,ady2,adx3,ady3;
+       Standard_Integer otheri = 0,nbHide = 0;//min,max;
+       Standard_Real X1 = NAN,X2 = NAN,X3 = NAN,Y1 = NAN,Y2 = NAN,Y3 = NAN,Z1 = NAN,Z2 = NAN,Z3 = NAN;
+       Standard_Real dn = NAN,dnx = NAN,dny = NAN,dnz = NAN,dx1 = NAN,dy1 = NAN,dz1 = NAN,dx2 = NAN,dy2 = NAN,dz2 = NAN,dx3 = NAN,dy3 = NAN;
+       Standard_Real adx1 = NAN,ady1 = NAN,adx2 = NAN,ady2 = NAN,adx3 = NAN,ady3 = NAN;
        Standard_Real a =0.,b =0.,c =0.,d =0.;
        HLRAlgo_PolyData::FaceIndices& PolyTIndices = aPd->Indices();
        TColgp_Array1OfXYZ   & Nodes        = aPd->Nodes();
@@ -205,7 +207,7 @@ void HLRAlgo_PolyAlgo::Update ()
            nxMax = (Standard_Integer)((DecaX + xTrianMax) * SurDX);
            nyMax = (Standard_Integer)((DecaY + yTrianMax) * SurDY);
            nzMax = (Standard_Integer)((DecaZ + zTrianMax) * SurDZ);
-           Standard_Integer MinTrian,MaxTrian;
+           Standard_Integer MinTrian = 0,MaxTrian = 0;
            MinTrian   = nyMin + (nxMin << 11);
            MinTrian <<= 10;
            MinTrian  += nzMin - 0x00000200;
index 81a254a4b97d19ebf5090818358f7d5828cd2517..bf1d4d53caf34636b547c20e526e4415792e9055 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <HLRAlgo_PolyData.hxx>
 
 #include <HLRAlgo_EdgeStatus.hxx>
@@ -66,8 +68,8 @@ void HLRAlgo_PolyData::HPHDat(const Handle(HLRAlgo_HArray1OfPHDat)& HPHDat)
 void
 HLRAlgo_PolyData::UpdateGlobalMinMax (Box& theBox)
 {
-  Standard_Integer i;
-  Standard_Real X1,X2,X3,Y1,Y2,Y3,Z1,Z2,Z3;
+  Standard_Integer i = 0;
+  Standard_Real X1 = NAN,X2 = NAN,X3 = NAN,Y1 = NAN,Y2 = NAN,Y3 = NAN,Z1 = NAN,Z2 = NAN,Z3 = NAN;
   const TColgp_Array1OfXYZ& Nodes = myHNodes->Array1();
   HLRAlgo_Array1OfTData&    TData = myHTData->ChangeArray1();
   Standard_Integer          nbT   = TData.Upper();
@@ -125,12 +127,12 @@ void HLRAlgo_PolyData::HideByPolyData (const HLRAlgo_BiPoint::PointsT& thePoints
       ((theIndices.MaxSeg - myFaceIndices.Min) & 0x80100000) == 0) {
     HLRAlgo_Array1OfPHDat& PHDat = myHPHDat->ChangeArray1();
     const HLRAlgo_Array1OfTData& TData = myHTData->Array1();
-    Standard_Real d1,d2;
+    Standard_Real d1 = NAN,d2 = NAN;
     Standard_Boolean NotConnex    = Standard_False;
     Standard_Boolean isCrossing   = Standard_False;
     Standard_Boolean toHideBefore = Standard_False;
     Standard_Integer TFlag = 0;
-    Standard_Integer h,h2 = PHDat.Upper();
+    Standard_Integer h = 0,h2 = PHDat.Upper();
     HLRAlgo_PolyHidingData* PH = &(PHDat(1));
     
     for (h = 1; h <= h2; h++) {
@@ -709,7 +711,7 @@ void HLRAlgo_PolyData::hideByOneTriangle (const HLRAlgo_BiPoint::PointsT& thePoi
     }
   }
 
-  Standard_Boolean total;
+  Standard_Boolean total = 0;
   if (psta > 0) total = psta < theTriangle.TolParam;
   else          total = psta > -theTriangle.TolParam;
   if (total) {
index 3eca3e98d6f8fbd5237c2a0b08d3cef9a73888e6..84168249ea54eeef258cfaeaeccdfa6831977d52 100644 (file)
@@ -38,15 +38,15 @@ HLRAlgo_PolyInternalData::HLRAlgo_PolyInternalData
  myNbPISeg(0),
  myNbPINod(nbNod),
  myMxTData(nbTri),
- myMxPINod(nbNod),
+ myMxPISeg(2 + (3 * nbTri + nbNod) / 2), myMxPINod(nbNod),
  myIntOutL(Standard_False),
- myPlanar(Standard_False)
+ myPlanar(Standard_False), myTData(new HLRAlgo_HArray1OfTData(0,myMxTData)), myPISeg(new HLRAlgo_HArray1OfPISeg(0,myMxPISeg)), myPINod(new HLRAlgo_HArray1OfPINod(0,myMxPINod))
 {
-  Standard_Integer i;
-  myMxPISeg = 2 + (3 * nbTri + nbNod) / 2;
-  myTData = new HLRAlgo_HArray1OfTData(0,myMxTData);
-  myPISeg = new HLRAlgo_HArray1OfPISeg(0,myMxPISeg);
-  myPINod = new HLRAlgo_HArray1OfPINod(0,myMxPINod);
+  Standard_Integer i = 0;
+  
+  
+  
+  
   
   HLRAlgo_Array1OfPINod& PINod = myPINod->ChangeArray1();
   Handle(HLRAlgo_PolyInternalNode)* NN = &(PINod.ChangeValue(1));
@@ -65,8 +65,8 @@ void HLRAlgo_PolyInternalData::UpdateLinks (HLRAlgo_Array1OfTData& theTData,
                                             HLRAlgo_Array1OfPISeg& thePISeg,
                                             HLRAlgo_Array1OfPINod& thePINod)
 {
-  Standard_Integer n1,n2;
-  Standard_Integer find,iiii,icsv = 0;
+  Standard_Integer n1 = 0,n2 = 0;
+  Standard_Integer find = 0,iiii = 0,icsv = 0;
   HLRAlgo_PolyInternalSegment* aSegIndices = NULL;
 
   Standard_Boolean newSeg = Standard_False;  
@@ -338,7 +338,7 @@ HLRAlgo_PolyInternalData::UpdateLinks (const Standard_Integer ip1,
                                       HLRAlgo_Array1OfPINod*& PINod1,
                                       HLRAlgo_Array1OfPINod*& )
 {
-  Standard_Integer find,iiii,iisv,icsv,iip2 =0,cnx1 =0,cnx2 =0;
+  Standard_Integer find = 0,iiii = 0,iisv = 0,icsv = 0,iip2 =0,cnx1 =0,cnx2 =0;
   HLRAlgo_PolyInternalSegment* aSegIndices = NULL;
   HLRAlgo_PolyInternalSegment* aSegIndices2 = NULL;
   find = 0;
@@ -420,8 +420,8 @@ HLRAlgo_PolyInternalData::UpdateLinks (const Standard_Integer ip1,
     aSegIndices2->Conex2 = cnx2;
     aNodIndices3.NdSg   = find;
 
-    Standard_Integer iOld,iNew,iTr,skip,ip4,itpk[2];
-    Standard_Integer n1,n2,n3,nOld[3],nNew[3],New[4];
+    Standard_Integer iOld = 0,iNew = 0,iTr = 0,skip = 0,ip4 = 0,itpk[2];
+    Standard_Integer n1 = 0,n2 = 0,n3 = 0,nOld[3],nNew[3],New[4];
     New[0] = cnx1;
     New[2] = myNbTData + 1;
     if (cnx2 == 0) {
@@ -621,7 +621,7 @@ HLRAlgo_PolyInternalData::UpdateLinks (const Standard_Integer ip1,
 
 void HLRAlgo_PolyInternalData::Dump () const
 {
-  Standard_Integer i;//,i1,i2,i3;
+  Standard_Integer i = 0;//,i1,i2,i3;
   HLRAlgo_Array1OfTData* TData = &myTData->ChangeArray1();
   HLRAlgo_Array1OfPISeg* PISeg = &myPISeg->ChangeArray1();
   HLRAlgo_Array1OfPINod* PINod = &myPINod->ChangeArray1();
@@ -673,7 +673,7 @@ void HLRAlgo_PolyInternalData::IncTData(
     if (HLRAlgo_PolyInternalData_TRACE)
       std::cout << "HLRAlgo_PolyInternalData::IncTData : " << myMxTData << std::endl;
 #endif
-    Standard_Integer i,j,k;
+    Standard_Integer i = 0,j = 0,k = 0;
     j = myMxTData;
     k = 2 * j;
 
@@ -712,7 +712,7 @@ void HLRAlgo_PolyInternalData::IncPISeg(
     if (HLRAlgo_PolyInternalData_TRACE)
       std::cout << "HLRAlgo_PolyInternalData::IncPISeg : " << myMxPISeg << std::endl;
 #endif
-    Standard_Integer i,j,k;
+    Standard_Integer i = 0,j = 0,k = 0;
     j = myMxPISeg;
     k = 2 * j;
     Handle(HLRAlgo_HArray1OfPISeg) NwPISeg =
@@ -750,7 +750,7 @@ void HLRAlgo_PolyInternalData::IncPINod (HLRAlgo_Array1OfPINod*& PINod1,
     if (HLRAlgo_PolyInternalData_TRACE)
       std::cout << "HLRAlgo_PolyInternalData::IncPINod : " << myMxPINod << std::endl;
 #endif
-    Standard_Integer i,j,k;
+    Standard_Integer i = 0,j = 0,k = 0;
     j = myMxPINod;
     k = 2 * j;
     Handle(HLRAlgo_HArray1OfPINod) NwPINod = new HLRAlgo_HArray1OfPINod(0,k);
index 04bcf21adc3e082a1000c7e7baa24db28ff7ad15..4fddbd39ef7862ec5bc5f4650b3f35b1148528b8 100644 (file)
@@ -58,7 +58,7 @@ public:
 
 private:
 
-  ShellIndices myIndices;
+  ShellIndices myIndices{};
   NCollection_Array1<Handle(HLRAlgo_PolyData)> myPolyg;
   NCollection_Array1<Handle(HLRAlgo_PolyData)> myHPolHi;
   HLRAlgo_ListOfBPoint mySegList;
index e787c701a6b855094f44da85994318efdaa6e413..69cc0725bb223ee8b463451a3b45319b81f5a176 100644 (file)
@@ -19,6 +19,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <gp_Ax3.hxx>
 #include <gp_Lin.hxx>
 #include <gp_Pnt.hxx>
@@ -196,7 +198,7 @@ void HLRAlgo_Projector::Scaled (const Standard_Boolean On)
 void HLRAlgo_Projector::Project (const gp_Pnt& P, gp_Pnt2d& Pout) const
 {
   if(myType!=-1) { 
-    Standard_Real X,Y;
+    Standard_Real X = NAN,Y = NAN;
     switch (myType) { 
     case 0: {  //-- axono standard
       Standard_Real x07 = P.X()*0.7071067811865475;
index baec03ebba84af18ac0277075df86b2fb0a36d20..bf3650b7b24143b82cdf4295f9db775ecc586d8f 100644 (file)
@@ -119,7 +119,7 @@ private:
   Standard_EXPORT void SetDirection();
 
 
-  Standard_Integer myType;
+  Standard_Integer myType{};
   Standard_Boolean myPersp;
   Standard_Real myFocus;
   gp_Trsf myScaledTrsf;
index de98a22477053fff01b24415882fed3cb82490a9..56a759b3663537d41f3bbeaee25d74529934fa45 100644 (file)
@@ -26,9 +26,9 @@
 //purpose  : Constructor
 //=======================================================================
 
-HLRAppli_ReflectLines::HLRAppli_ReflectLines(const TopoDS_Shape& aShape)
+HLRAppli_ReflectLines::HLRAppli_ReflectLines(const TopoDS_Shape& aShape) : myShape(aShape)
 {
-  myShape = aShape;
+  
 }
 
 //=======================================================================
index 6f5fc6356d8e742e99f5cd0a1810297003652ea3..10bd4b13f8b49d32224c6d71e1e3be1104b0e7c9 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <HLRBRep.hxx>
 
 #include <BRep_Builder.hxx>
@@ -88,7 +90,7 @@ TopoDS_Edge HLRBRep::MakeEdge (const HLRBRep_Curve& ec,
     Handle(Geom2d_BSplineCurve) ec2d;
     GeomAdaptor_Curve GAcurve = ec.GetCurve().Curve();
     TopoDS_Edge anEdge = ec.GetCurve().Edge();
-    Standard_Real fpar, lpar;
+    Standard_Real fpar = NAN, lpar = NAN;
     Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
     if (aCurve->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve))
       aCurve = (Handle(Geom_TrimmedCurve)::DownCast(aCurve))->BasisCurve();
@@ -179,7 +181,7 @@ TopoDS_Edge HLRBRep::MakeEdge3d(const HLRBRep_Curve& ec,
   //const Standard_Real end = ec.Parameter2d(U2);
 
   TopoDS_Edge anEdge = ec.GetCurve().Edge();
-  Standard_Real fpar, lpar;
+  Standard_Real fpar = NAN, lpar = NAN;
   //BRep_Tool::Range(anEdge, fpar, lpar);
   //Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
   BRepAdaptor_Curve BAcurve(anEdge);
index e4db3314e0bc04cf7c026369645c4143ea6f9f24..00f652d1d1b6ebc15f9b0ae588fee6b60eadded0 100644 (file)
@@ -24,7 +24,7 @@
 Standard_Integer
 HLRBRep_BSurfaceTool::NbSamplesU(const BRepAdaptor_Surface& S)
 { 
-  Standard_Integer nbs;
+  Standard_Integer nbs = 0;
   GeomAbs_SurfaceType typS = S.GetType();
   switch(typS) { 
   case GeomAbs_Plane:
@@ -77,7 +77,7 @@ HLRBRep_BSurfaceTool::NbSamplesU(const BRepAdaptor_Surface& S)
 Standard_Integer
 HLRBRep_BSurfaceTool::NbSamplesV(const BRepAdaptor_Surface& S)
 { 
-  Standard_Integer nbs;
+  Standard_Integer nbs = 0;
   GeomAbs_SurfaceType typS = S.GetType();
   switch(typS) { 
   case GeomAbs_Plane:
index ab1869b36f5d51e14299c2f06113f8dafda8a5b9..a98926dd58b95888d0479106b31e0af0f4f6b438 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_BezierCurve.hxx>
 #include <Geom_BSplineCurve.hxx>
 #include <gp.hxx>
@@ -224,17 +226,17 @@ Standard_Real HLRBRep_Curve::UpdateMinMax(
 {
   Standard_Real a = HLRBRep_BCurveTool::FirstParameter(myCurve);
   Standard_Real b = HLRBRep_BCurveTool::LastParameter(myCurve);
-  Standard_Real x,y,z,tolMinMax = 0;
+  Standard_Real x = NAN,y = NAN,z = NAN,tolMinMax = 0;
   ((HLRAlgo_Projector*) myProj)->Project(Value3D(a),x,y,z);
   HLRAlgo::UpdateMinMax(x,y,z,TotMin,TotMax);
 
   if (myType != GeomAbs_Line) {
     Standard_Integer nbPnt = 30;
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real step = (b-a)/(nbPnt+1);
-    Standard_Real xa,ya,za,xb =0.,yb =0.,zb =0.;
-    Standard_Real dx1,dy1,dz1,dd1;
-    Standard_Real dx2,dy2,dz2,dd2;
+    Standard_Real xa = NAN,ya = NAN,za = NAN,xb =0.,yb =0.,zb =0.;
+    Standard_Real dx1 = NAN,dy1 = NAN,dz1 = NAN,dd1 = NAN;
+    Standard_Real dx2 = NAN,dy2 = NAN,dz2 = NAN,dd2 = NAN;
 
     for (i = 1; i <= nbPnt; i++) {
       a += step;
index 81d7a19b2254962b21ca2e1d332f746f3e6a99ac..2b617416ccdcc45875e87b28dee43052ceb379c1 100644 (file)
@@ -214,12 +214,12 @@ private:
 
   BRepAdaptor_Curve myCurve;
   GeomAbs_CurveType myType;
-  const HLRAlgo_Projector* myProj;
-  Standard_Real myOX;
-  Standard_Real myOZ;
-  Standard_Real myVX;
-  Standard_Real myVZ;
-  Standard_Real myOF;
+  const HLRAlgo_Projector* myProj{};
+  Standard_Real myOX{};
+  Standard_Real myOZ{};
+  Standard_Real myVX{};
+  Standard_Real myVZ{};
+  Standard_Real myOF{};
 
 
 };
index 2cebfec692b71eff29bbc45f8987aff85dacd149..c71e68283fc360615f67171a3119d83e6854246e 100644 (file)
@@ -41,6 +41,7 @@
 #include <StdFail_UndefinedDerivative.hxx>
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
 
+#include <math.h>
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_Data,Standard_Transient)
 
@@ -96,8 +97,8 @@ private:
 
 public:
   //-- ============================================================
-  TableauRejection() { 
-    N=0; nTabBit=0;  UV=NULL;  nbUV=NULL;  IndUV=NULL; TabBit=NULL;
+  TableauRejection() : UV(NULL), IndUV(NULL), nbUV(NULL), N(0), TabBit(NULL), nTabBit(0) 
+       
 #ifdef OCCT_DEBUG
     StNbLect=StNbEcr=StNbMax=StNbMoy=StNbMoyNonNul=0;
 #endif
@@ -117,7 +118,7 @@ public:
     IndUV = (Standard_Integer **)   malloc(N*sizeof(Standard_Integer *));
     nbUV = (Standard_Integer *)     malloc(N*sizeof(Standard_Integer));
 //    for(Standard_Integer i=0;i<N;i++) { 
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for( i=0;i<N;i++) { 
       UV[i]=(Standard_Real *)       malloc(SIZEUV*sizeof(Standard_Real));
     }
@@ -165,7 +166,7 @@ public:
     if(N) { 
       ResetTabBit(N);
 //      for(Standard_Integer i=0;i<N;i++) { 
-      Standard_Integer i;
+      Standard_Integer i = 0;
       for(i=0;i<N;i++) { 
        if(IndUV[i]) { 
          free(IndUV[i]);
@@ -200,7 +201,7 @@ public:
 #endif
     Standard_Integer k=-1;
 //    for(Standard_Integer i=0; k==-1 && i<nbUV[i0]; i++) { 
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for( i=0; k==-1 && i<nbUV[i0]; i++) { 
       if(IndUV[i0][i]==-1) { 
        k=i;
@@ -238,7 +239,7 @@ public:
     UV[i0][k]=u;
     
     //-- tri par ordre decroissant
-    Standard_Boolean TriOk;
+    Standard_Boolean TriOk = 0;
     do { 
       TriOk=Standard_True;
       Standard_Integer im1=0;
@@ -265,7 +266,7 @@ public:
 //--      }
 //--    }
     //-- ordre decroissant
-    Standard_Integer a=0,b=nbUV[i0]-1,ab;
+    Standard_Integer a=0,b=nbUV[i0]-1,ab = 0;
     if(IndUV[i0][a]==-1) return(RealLast());
     if(IndUV[i0][a]==j0) return(UV[i0][a]);
     if(IndUV[i0][b]==j0) return(UV[i0][b]);
@@ -381,8 +382,8 @@ static void AdjustParameter (HLRBRep_EdgeData* E,
                             Standard_Real& p,
                             Standard_ShortReal& t)
 {
-  Standard_Real p1,p2;
-  Standard_ShortReal t1,t2;
+  Standard_Real p1 = NAN,p2 = NAN;
+  Standard_ShortReal t1 = NAN,t2 = NAN;
   if (h) {
     E->Status().Bounds(p,t,p2,t2);
     if (E->VerAtSta()) p = p + (p2 - p) * CutBig;
@@ -411,9 +412,9 @@ HLRBRep_Data::HLRBRep_Data (const Standard_Integer NV,
                            myLLProps(2,Epsilon(1.)),
                            myFLProps(2,Epsilon(1.)),
                            mySLProps(2,Epsilon(1.)),
-                           myHideCount(0)
+                           myHideCount(0), myReject(new TableauRejection())
 {
-  myReject = new TableauRejection();
+  
   ((TableauRejection *)myReject)->SetDim(myNbEdges);
 }
 
@@ -491,21 +492,21 @@ void HLRBRep_Data::Update (const HLRAlgo_Projector& P)
 {
   myProj = P;
   const gp_Trsf& T = myProj.Transformation();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real tolMinMax = 0;
 
-  HLRAlgo_EdgesBlock::MinMaxIndices FaceMin, FaceMax;
-  HLRAlgo_EdgesBlock::MinMaxIndices MinMaxFace;
-  HLRAlgo_EdgesBlock::MinMaxIndices WireMin, WireMax, MinMaxWire;
-  HLRAlgo_EdgesBlock::MinMaxIndices EdgeMin, EdgeMax;
-  HLRAlgo_EdgesBlock::MinMaxIndices MinMaxEdge;
+  HLRAlgo_EdgesBlock::MinMaxIndices FaceMin{}, FaceMax{};
+  HLRAlgo_EdgesBlock::MinMaxIndices MinMaxFace{};
+  HLRAlgo_EdgesBlock::MinMaxIndices WireMin{}, WireMax{}, MinMaxWire{};
+  HLRAlgo_EdgesBlock::MinMaxIndices EdgeMin{}, EdgeMax{};
+  HLRAlgo_EdgesBlock::MinMaxIndices MinMaxEdge{};
   Standard_Real TotMin[16],TotMax[16];
   HLRAlgo::InitMinMax(Precision::Infinite(), TotMin, TotMax);
 
   // compute the global MinMax
   // *************************
 //  for (Standard_Integer edge = 1; edge <= myNbEdges; edge++) {
-  Standard_Integer edge;
+  Standard_Integer edge = 0;
   for ( edge = 1; edge <= myNbEdges; edge++) {
     HLRBRep_EdgeData& ed = myEData.ChangeValue(edge);
     HLRBRep_Curve& EC = ed.ChangeGeometry();
@@ -531,8 +532,8 @@ void HLRBRep_Data::Update (const HLRAlgo_Projector& P)
   for (i = 0; i <= 15; i++)
     myDeca[i] = - TotMin[i] + precad;
 
-  Standard_Real tol;
-  Standard_Boolean ver1,ver2;
+  Standard_Real tol = NAN;
+  Standard_Boolean ver1 = 0,ver2 = 0;
 
   // update the edges
   // ****************
@@ -694,7 +695,7 @@ void HLRBRep_Data::Update (const HLRAlgo_Projector& P)
       fd.Back(Standard_False);
     }
     else if (!fd.WithOutL()) {
-      Standard_Real p,pu,pv,r;
+      Standard_Real p = NAN,pu = NAN,pv = NAN,r = NAN;
       fd.Back(Standard_False);
       Standard_Boolean found = Standard_False;
 
@@ -1185,7 +1186,7 @@ void HLRBRep_Data::NextInterference ()
                  myIntersector.Perform(myLEData,da1,db1);
                }
                else {
-                 Standard_Real su,sv;
+                 Standard_Real su = NAN,sv = NAN;
                  ((TableauRejection *)myReject)->
                    GetSingleIntersection(myLE,myFE,su,sv);
                  if(su!=RealLast()) { 
@@ -1355,7 +1356,7 @@ void HLRBRep_Data::EdgeState (const Standard_Real p1,
   // this method should give the states before and after
   // it should get the parameters on the surface
 
-  Standard_Real pu,pv;
+  Standard_Real pu = NAN,pv = NAN;
   if (HLRBRep_EdgeFaceTool::UVPoint(p2,myFEGeom,iFaceGeom,pu,pv))
   {
     mySLProps.SetParameters(pu,pv);
@@ -1414,13 +1415,13 @@ HLRBRep_Data::HidingStartLevel (const Standard_Integer E,
                                const HLRBRep_EdgeData& ED,
                                const HLRAlgo_InterferenceList& IL)
 {
-  Standard_Boolean Loop;
+  Standard_Boolean Loop = 0;
   HLRAlgo_ListIteratorOfInterferenceList It;
   const HLRBRep_Curve& EC = ED.Geometry();
   Standard_Real sta = EC.Parameter3d(EC.FirstParameter());
   Standard_Real end = EC.Parameter3d(EC.LastParameter());
   Standard_Real tolpar = (end - sta) * 0.01;
-  Standard_Real param;
+  Standard_Real param = NAN;
   Loop = Standard_True;
   It.Initialize(IL);
   
@@ -1498,7 +1499,7 @@ Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_
 
   const Handle(HLRAlgo_WiresBlock)& wb = FD.Wires();
   Standard_Integer nw = wb->NbWires();
-  Standard_Integer iw1,ie1,ne1;
+  Standard_Integer iw1 = 0,ie1 = 0,ne1 = 0;
   const gp_Trsf& T  = myProj.Transformation();
   const gp_Trsf& TI = myProj.InvertedTransformation();
   Standard_Boolean inverted       = Standard_False;
@@ -1517,7 +1518,7 @@ Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_
       else                 ed1.Used(Standard_False);
       if ((eb1->OutLine(ie1) || eb1->Internal(ie1)) &&
          !ed1.Vertical()) {
-       Standard_Real p,pu,pv,r;
+       Standard_Real p = NAN,pu = NAN,pv = NAN,r = NAN;
        myFEGeom = &(ed1.ChangeGeometry());
        const HLRBRep_Curve& EC = ed1.Geometry();
        Standard_Integer vsta = ed1.VSta();
@@ -1605,10 +1606,10 @@ Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_
 void HLRBRep_Data::OrientOthEdge (const Standard_Integer I,
                                  HLRBRep_FaceData& FD)
 {
-  Standard_Real p,pu,pv,r;
+  Standard_Real p = NAN,pu = NAN,pv = NAN,r = NAN;
   const Handle(HLRAlgo_WiresBlock)& wb = FD.Wires();
   Standard_Integer nw = wb->NbWires();
-  Standard_Integer iw1,ie1,ne1;
+  Standard_Integer iw1 = 0,ie1 = 0,ne1 = 0;
   const gp_Trsf& T = myProj.Transformation();
   
   for (iw1 = 1; iw1 <= nw; iw1++) {
@@ -1721,15 +1722,15 @@ HLRBRep_Data::Classify (const Standard_Integer E,
   (void)E; // avoid compiler warning
 
   nbClassification++;
-  HLRAlgo_EdgesBlock::MinMaxIndices VertMin, VertMax, MinMaxVert;
+  HLRAlgo_EdgesBlock::MinMaxIndices VertMin{}, VertMax{}, MinMaxVert{};
   Standard_Real TotMin[16],TotMax[16];
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Level = 0;
   TopAbs_State state = TopAbs_OUT;
 //  Standard_Boolean rej = Standard_False;
   const HLRBRep_Curve& EC = ED.Geometry();
-  Standard_Real sta,xsta,ysta,zsta,end,xend,yend,zend;
+  Standard_Real sta = NAN,xsta = NAN,ysta = NAN,zsta = NAN,end = NAN,xend = NAN,yend = NAN,zend = NAN;
   Standard_Real tol = (Standard_Real)(ED.Tolerance());
   
   if (LevelFlag) {
@@ -1916,7 +1917,7 @@ HLRBRep_Data::Classify (const Standard_Integer E,
        else                               TolZ = myBigSize * 0.01;
       }
       wLim -= TolZ;
-      Standard_Real PeriodU,PeriodV,UMin =0.,UMax =0.,VMin =0.,VMax =0.;
+      Standard_Real PeriodU = NAN,PeriodV = NAN,UMin =0.,UMax =0.,VMin =0.,VMax =0.;
       if (((HLRBRep_Surface*)iFaceGeom)->IsUPeriodic()) { 
        PeriodU = ((HLRBRep_Surface*)iFaceGeom)->UPeriod();
        UMin = ((HLRBRep_Surface*)iFaceGeom)->FirstUParameter();
@@ -1932,13 +1933,13 @@ HLRBRep_Data::Classify (const Standard_Integer E,
       else 
        PeriodV = 0;
       gp_Pnt PInter;
-      Standard_Real u,v,w;
+      Standard_Real u = NAN,v = NAN,w = NAN;
       IntCurveSurface_TransitionOnCurve Tr;
       
       for (i = 1; i <= nbPoints; i++) {
        myIntersector.CSPoint(i).Values(PInter,u,v,w,Tr);
        if (w < wLim) {
-          Standard_Real aDummyShift;
+          Standard_Real aDummyShift = NAN;
           if (PeriodU > 0.)
             GeomInt::AdjustPeriodic(u, UMin, UMax, PeriodU, u, aDummyShift);
           if (PeriodV > 0.)
@@ -1974,14 +1975,14 @@ TopAbs_State HLRBRep_Data::SimplClassify (const Standard_Integer /*E*/,
                                          const Standard_Real p2)
 {
   nbClassification++;
-  HLRAlgo_EdgesBlock::MinMaxIndices VertMin, VertMax, MinMaxVert;
+  HLRAlgo_EdgesBlock::MinMaxIndices VertMin{}, VertMax{}, MinMaxVert{};
   Standard_Real TotMin[16],TotMax[16];
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   TopAbs_State state = TopAbs_IN;
 //  Standard_Boolean rej = Standard_False;
   const HLRBRep_Curve& EC = ED.Geometry();
-  Standard_Real sta,xsta,ysta,zsta, dp;
+  Standard_Real sta = NAN,xsta = NAN,ysta = NAN,zsta = NAN, dp = NAN;
   Standard_Real tol = (Standard_Real)(ED.Tolerance());
 
   dp = (p2 - p1)/(Nbp+1);
@@ -2029,15 +2030,15 @@ HLRBRep_Data::RejectedPoint (const IntRes2d_IntersectionPoint& PInter,
                             const Standard_Integer NumSeg)
 {
   Standard_Integer Ind = 0;
-  Standard_Integer decal;
-  Standard_Real p1,p2,dz;
-  Standard_ShortReal t1,t2;
+  Standard_Integer decal = 0;
+  Standard_Real p1 = NAN,p2 = NAN,dz = NAN;
+  Standard_ShortReal t1 = NAN,t2 = NAN;
   TopAbs_State st;
   TopAbs_Orientation Orie =TopAbs_FORWARD ;
   TopAbs_Orientation Or2 = TopAbs_INTERNAL;
   Standard_Boolean inverted = Standard_False;
-  const IntRes2d_Transition* Tr1;
-  const IntRes2d_Transition* Tr2;
+  const IntRes2d_Transition* Tr1 = nullptr;
+  const IntRes2d_Transition* Tr2 = nullptr;
   Standard_Real TolZ = myBigSize * 0.00001;
 
   p1 = ((HLRBRep_Curve*)myLEGeom)->Parameter3d(PInter.ParamOnFirst ());
@@ -2230,7 +2231,7 @@ Standard_Boolean
 HLRBRep_Data::SameVertex (const Standard_Boolean h1,
                          const Standard_Boolean h2)
 {
-  Standard_Integer v1,v2;
+  Standard_Integer v1 = 0,v2 = 0;
   if (h1) v1 = ((HLRBRep_EdgeData*)myLEData)->VSta();
   else    v1 = ((HLRBRep_EdgeData*)myLEData)->VEnd();
   if (h2) v2 = ((HLRBRep_EdgeData*)myFEData)->VSta();
index 121ec30824e3ffe48fec857c4681b9a9bc1c2ef6..4b0483bee9403e6db2b053323352a1354348f682 100644 (file)
@@ -212,51 +212,51 @@ private:
   HLRBRep_CLProps myLLProps;
   HLRBRep_CLProps myFLProps;
   HLRBRep_SLProps mySLProps;
-  Standard_Real myBigSize;
+  Standard_Real myBigSize{};
   HLRBRep_FaceIterator myFaceItr1;
   HLRBRep_FaceIterator myFaceItr2;
-  Standard_Integer iFace;
-  HLRBRep_FaceData* iFaceData;
-  Standard_Address iFaceGeom;
-  HLRAlgo_EdgesBlock::MinMaxIndices* iFaceMinMax;
+  Standard_Integer iFace{};
+  HLRBRep_FaceData* iFaceData{};
+  Standard_Address iFaceGeom{};
+  HLRAlgo_EdgesBlock::MinMaxIndices* iFaceMinMax{};
   GeomAbs_SurfaceType iFaceType;
-  Standard_Boolean iFaceBack;
-  Standard_Boolean iFaceSimp;
-  Standard_Boolean iFaceSmpl;
-  Standard_Boolean iFaceTest;
+  Standard_Boolean iFaceBack{};
+  Standard_Boolean iFaceSimp{};
+  Standard_Boolean iFaceSmpl{};
+  Standard_Boolean iFaceTest{};
   Standard_Integer myHideCount;
-  Standard_Real myDeca[16];
-  Standard_Real mySurD[16];
-  Standard_Integer myCurSortEd;
-  Standard_Integer myNbrSortEd;
-  Standard_Integer myLE;
-  Standard_Boolean myLEOutLine;
-  Standard_Boolean myLEInternal;
-  Standard_Boolean myLEDouble;
-  Standard_Boolean myLEIsoLine;
-  HLRBRep_EdgeData* myLEData;
-  const HLRBRep_Curve* myLEGeom;
-  HLRAlgo_EdgesBlock::MinMaxIndices* myLEMinMax;
+  Standard_Real myDeca[16]{};
+  Standard_Real mySurD[16]{};
+  Standard_Integer myCurSortEd{};
+  Standard_Integer myNbrSortEd{};
+  Standard_Integer myLE{};
+  Standard_Boolean myLEOutLine{};
+  Standard_Boolean myLEInternal{};
+  Standard_Boolean myLEDouble{};
+  Standard_Boolean myLEIsoLine{};
+  HLRBRep_EdgeData* myLEData{};
+  const HLRBRep_Curve* myLEGeom{};
+  HLRAlgo_EdgesBlock::MinMaxIndices* myLEMinMax{};
   GeomAbs_CurveType myLEType;
-  Standard_ShortReal myLETol;
-  Standard_Integer myFE;
+  Standard_ShortReal myLETol{};
+  Standard_Integer myFE{};
   TopAbs_Orientation myFEOri;
-  Standard_Boolean myFEOutLine;
-  Standard_Boolean myFEInternal;
-  Standard_Boolean myFEDouble;
-  HLRBRep_EdgeData* myFEData;
-  HLRBRep_Curve* myFEGeom;
+  Standard_Boolean myFEOutLine{};
+  Standard_Boolean myFEInternal{};
+  Standard_Boolean myFEDouble{};
+  HLRBRep_EdgeData* myFEData{};
+  HLRBRep_Curve* myFEGeom{};
   GeomAbs_CurveType myFEType;
-  Standard_ShortReal myFETol;
+  Standard_ShortReal myFETol{};
   HLRBRep_Intersector myIntersector;
   Handle(BRepTopAdaptor_TopolTool) myClassifier;
-  Standard_Boolean mySameVertex;
-  Standard_Boolean myIntersected;
-  Standard_Integer myNbPoints;
-  Standard_Integer myNbSegments;
-  Standard_Integer iInterf;
+  Standard_Boolean mySameVertex{};
+  Standard_Boolean myIntersected{};
+  Standard_Integer myNbPoints{};
+  Standard_Integer myNbSegments{};
+  Standard_Integer iInterf{};
   HLRAlgo_Interference myIntf;
-  Standard_Boolean myAboveIntf;
+  Standard_Boolean myAboveIntf{};
   TableauRejection* myReject;
 
 };
index 2ebcec31d21f98344bd7ae1a8ae6d1640e7d76fd..806c8ec0ea81106f1ebad137dacb5df5f91ac002 100644 (file)
@@ -127,7 +127,7 @@ private:
   Handle(HLRBRep_AreaLimit) myLimits;
   Handle(HLRBRep_AreaLimit) left;
   Handle(HLRBRep_AreaLimit) right;
-  Standard_Integer current;
+  Standard_Integer current{};
 
 
 };
index a2984bcc3e2ce29169b9518720022a861964db82..1d30e4ce0baac464cec1fa0bad9366887869c445 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve2d.hxx>
 #include <BRepExtrema_ExtPF.hxx>
@@ -70,7 +72,7 @@ Standard_Boolean HLRBRep_EdgeFaceTool::UVPoint(const Standard_Real Par,
                                                Standard_Real& U,
                                                Standard_Real& V)
 {
-  Standard_Real pfbid,plbid;
+  Standard_Real pfbid = NAN,plbid = NAN;
   if (BRep_Tool::CurveOnSurface
       (((HLRBRep_Curve  *)E)->Curve().Edge(),
        ((HLRBRep_Surface*)F)->Surface().Face(),pfbid,plbid).IsNull())
@@ -78,7 +80,7 @@ Standard_Boolean HLRBRep_EdgeFaceTool::UVPoint(const Standard_Real Par,
     BRepExtrema_ExtPF proj
       (BRepLib_MakeVertex(((HLRBRep_Curve*)E)->Value3D(Par)),
        ((HLRBRep_Surface*)F)->Surface().Face());
-    Standard_Integer i, index = 0;
+    Standard_Integer i = 0, index = 0;
     Standard_Real dist2 = RealLast();
     const Standard_Integer n = proj.NbExt();
     for (i = 1; i <= n; i++) {
index b416ea7fe16fbfe440a6583b13ff01ff6c045597..48876aab4832423c15754f9d53b9ba04661b148c 100644 (file)
@@ -19,6 +19,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <HLRBRep_EdgeIList.hxx>
 #include <HLRBRep_EdgeInterferenceTool.hxx>
 #include <TopCnx_EdgeFaceTransition.hxx>
@@ -77,7 +79,7 @@ ProcessComplex(HLRAlgo_InterferenceList& IL,
   TopCnx_EdgeFaceTransition transTool;
   gp_Dir TgtE, NormE, TgtI, NormI;
   const Standard_Real TolAng = 0.0001;
-  Standard_Real CurvE, CurvI;
+  Standard_Real CurvE = NAN, CurvI = NAN;
   HLRAlgo_ListIteratorOfInterferenceList It1(IL);
 
   while (It1.More()) {
index f888d8a4f4300f63e4a131e5de05b5afa17f8912..ebb031758a96bfee554908f450e0cc00c4e5fa67 100644 (file)
@@ -19,6 +19,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <HLRBRep_Data.hxx>
 #include <HLRBRep_EdgeInterferenceTool.hxx>
 
@@ -38,8 +40,8 @@ HLRBRep_EdgeInterferenceTool::HLRBRep_EdgeInterferenceTool
 
 void HLRBRep_EdgeInterferenceTool::LoadEdge()
 {
-  Standard_Real p1,p2;
-  Standard_ShortReal t1,t2;
+  Standard_Real p1 = NAN,p2 = NAN;
+  Standard_ShortReal t1 = NAN,t2 = NAN;
   HLRBRep_Array1OfEData& ED = myDS->EDataArray();
   HLRBRep_EdgeData& ed = ED(myDS->Edge());
   ed.Status().Bounds(p1,t1,p2,t2);
@@ -108,8 +110,8 @@ void HLRBRep_EdgeInterferenceTool::InterferenceBoundaryGeometry
    gp_Dir& Norm,
    Standard_Real& CrFE) const
 {
-  Standard_Integer FE;
-  Standard_Real Param;
+  Standard_Integer FE = 0;
+  Standard_Real Param = NAN;
   gp_Dir2d TgFE,NmFE;
   I.Boundary().Value2D(FE,Param);
   myDS->LocalFEGeometry2D(FE,Param,TgFE,NmFE,CrFE);
index 7633bcbed8d9131a9d62825e37aa82325654d322..37e5c4aefedb19daa9d6f206bf97ea3118f1eaad 100644 (file)
@@ -92,7 +92,7 @@ private:
 
   Handle(HLRBRep_Data) myDS;
   HLRAlgo_Intersection inter[2];
-  Standard_Integer cur;
+  Standard_Integer cur{};
 
 
 };
index 497772349fa7a7f879b74d1497788674ae0ca71d..80e32ec152afe20ba7c6df46def8082a00ebbc8d 100644 (file)
@@ -143,7 +143,7 @@ private:
   Handle(HLRAlgo_WiresBlock) myWires;
   HLRBRep_Surface myGeometry;
   Standard_Real mySize;
-  Standard_ShortReal myTolerance;
+  Standard_ShortReal myTolerance{};
 
 };
 
index dacea08a9b93a2f5c2047f493b7cdb1d96003fa1..937454627e6c9c09d8f2fa5e895ae1c69478f4a7 100644 (file)
@@ -84,10 +84,10 @@ private:
 
 
 
-  Standard_Integer iWire;
-  Standard_Integer nbWires;
-  Standard_Integer iEdge;
-  Standard_Integer nbEdges;
+  Standard_Integer iWire{};
+  Standard_Integer nbWires{};
+  Standard_Integer iEdge{};
+  Standard_Integer nbEdges{};
   Handle(HLRAlgo_WiresBlock) myWires;
   Handle(HLRAlgo_EdgesBlock) myEdges;
 
index b9cd3e1ed9a99f7db913241d9125367f5742aa2d..092c82992643fb43f9bd38224485179489e0a161 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <HLRAlgo_EdgeIterator.hxx>
 #include <HLRBRep.hxx>
@@ -60,7 +62,7 @@ HLRBRep_HLRToShape::InternalCompound (const Standard_Integer typ,
     Standard_Boolean explor = Standard_False;
 //    Standard_Boolean todraw;
     if (!S.IsNull()) {
-      Standard_Integer v1,v2;
+      Standard_Integer v1 = 0,v2 = 0;
       Standard_Integer index = myAlgo->Index(S);
       if (index == 0) explor = Standard_True;
       else            myAlgo->ShapeBounds(index).Bounds(v1,v2,e1,e2,f1,f2);
@@ -150,7 +152,7 @@ HLRBRep_HLRToShape::DrawFace (const Standard_Boolean visible,
     Standard_Integer ie = Itf.Edge();
     HLRBRep_EdgeData& edf = DS->EDataArray().ChangeValue(ie);
     if (!edf.Used()) {
-      Standard_Boolean todraw;
+      Standard_Boolean todraw = 0;
       if      (typ == 1) todraw =  Itf.IsoLine();
       else if (typ == 2) //outlines
       {
@@ -213,8 +215,8 @@ HLRBRep_HLRToShape::DrawEdge (const Standard_Boolean visible,
   else               todraw =!ed.Rg1Line();
 
   if (todraw) {
-    Standard_Real sta,end;
-    Standard_ShortReal tolsta,tolend;
+    Standard_Real sta = NAN,end = NAN;
+    Standard_ShortReal tolsta = NAN,tolend = NAN;
     BRep_Builder B;
     TopoDS_Edge E;
     HLRAlgo_EdgeIterator It;
index b97392a3f1f19c261ff41fa53d912db43ec0c103..161c4eb26805b891057f68c59c2841146629010d 100644 (file)
@@ -17,6 +17,8 @@
 #define No_Standard_OutOfRange
 
 
+#include <math.h>
+
 #include <HLRAlgo_Coincidence.hxx>
 #include <HLRBRep_Data.hxx>
 #include <HLRBRep_EdgeBuilder.hxx>
@@ -136,7 +138,7 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
       }
       
       //-- ============================================================
-      Standard_Boolean Modif;
+      Standard_Boolean Modif = 0;
       do { 
        Modif = Standard_False; 
        HLRAlgo_ListIteratorOfInterferenceList ItSegHidden1(ILHidden);
@@ -447,7 +449,7 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
          TopAbs_State aBuildIN = TopAbs_IN;
          Standard_Boolean IsSuspicion = Standard_True;
          
-         Standard_Real pmax, pmin;
+         Standard_Real pmax = NAN, pmin = NAN;
          Standard_Boolean allInt = Standard_False;
          Standard_Boolean allFor = Standard_False;
          Standard_Boolean allRev = Standard_False;
index d8f2b9d1415f4af01565129de3ff7f2d926f650b..56e475110682b6639c90354dafbd7fffeef03bb2 100644 (file)
@@ -59,12 +59,12 @@ myDebug       (Standard_False)
 //=======================================================================
 
 HLRBRep_InternalAlgo::
-HLRBRep_InternalAlgo (const Handle(HLRBRep_InternalAlgo)& A)
+HLRBRep_InternalAlgo (const Handle(HLRBRep_InternalAlgo)& A) : myProj(A->Projector()), myShapes(A->SeqOfShapeBounds()), myDebug(A->Debug())
 {
   myDS          = A->DataStructure();
-  myProj        = A->Projector();
-  myShapes      = A->SeqOfShapeBounds();
-  myDebug       = A->Debug();
+  
+  
+  
 }
 
 //=======================================================================
@@ -96,7 +96,7 @@ void HLRBRep_InternalAlgo::Update ()
     Standard_Integer n = myShapes.Length();
     Handle(HLRBRep_Data) *DS = new Handle(HLRBRep_Data) [n];
 
-    Standard_Integer i,dv,de,df,nv=0,ne=0,nf=0;
+    Standard_Integer i = 0,dv = 0,de = 0,df = 0,nv=0,ne=0,nf=0;
 
     for (i = 1; i <= n; i++) {
       HLRBRep_ShapeBounds& SB = myShapes(i);
@@ -152,15 +152,15 @@ void HLRBRep_InternalAlgo::Update ()
 
     myDS->Update(myProj);
 
-    HLRAlgo_EdgesBlock::MinMaxIndices ShapMin, ShapMax, MinMaxShap;
-    HLRAlgo_EdgesBlock::MinMaxIndices TheMin, TheMax;
+    HLRAlgo_EdgesBlock::MinMaxIndices ShapMin{}, ShapMax{}, MinMaxShap{};
+    HLRAlgo_EdgesBlock::MinMaxIndices TheMin{}, TheMax{};
     HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
     HLRBRep_Array1OfFData& aFDataArray = myDS->FDataArray();
 
     for (i = 1; i <= n; i++) {
       Standard_Boolean FirstTime = Standard_True;
       HLRBRep_ShapeBounds& SB = myShapes(i);
-      Standard_Integer v1,v2,e1,e2,f1,f2;
+      Standard_Integer v1 = 0,v2 = 0,e1 = 0,e2 = 0,f1 = 0,f2 = 0;
       SB.Bounds(v1,v2,e1,e2,f1,f2);
 
       for (Standard_Integer e = e1; e <= e2; e++) {
@@ -297,7 +297,7 @@ ShapeBounds (const Standard_Integer I)
 
 void HLRBRep_InternalAlgo::InitEdgeStatus () 
 {
-  Standard_Boolean visible;
+  Standard_Boolean visible = 0;
   HLRBRep_FaceIterator faceIt;
   
   HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
@@ -310,7 +310,7 @@ void HLRBRep_InternalAlgo::InitEdgeStatus ()
     if (ed.Selected()) ed.Status().ShowAll();
   }
 //  for (Standard_Integer f = 1; f <= nf; f++) {
-  Standard_Integer f;
+  Standard_Integer f = 0;
   for ( f = 1; f <= nf; f++) {
     HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
     if (fd.Selected()) {
@@ -390,7 +390,7 @@ void HLRBRep_InternalAlgo::Select (const Standard_Integer I)
       (I == 0 || I > myShapes.Length(),
        "HLRBRep_InternalAlgo::Select : unknown Shape");
 
-    Standard_Integer v1,v2,e1,e2,f1,f2;
+    Standard_Integer v1 = 0,v2 = 0,e1 = 0,e2 = 0,f1 = 0,f2 = 0;
     myShapes(I).Bounds(v1,v2,e1,e2,f1,f2);
     
     HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
@@ -422,7 +422,7 @@ void HLRBRep_InternalAlgo::SelectEdge (const Standard_Integer I)
       (I == 0 || I > myShapes.Length(),
        "HLRBRep_InternalAlgo::SelectEdge : unknown Shape");
     
-    Standard_Integer v1,v2,e1,e2,f1,f2;
+    Standard_Integer v1 = 0,v2 = 0,e1 = 0,e2 = 0,f1 = 0,f2 = 0;
     myShapes(I).Bounds(v1,v2,e1,e2,f1,f2);
     
     HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
@@ -447,7 +447,7 @@ void HLRBRep_InternalAlgo::SelectFace (const Standard_Integer I)
       (I == 0 || I > myShapes.Length(),
        "HLRBRep_InternalAlgo::SelectFace : unknown Shape");
     
-    Standard_Integer v1,v2,e1,e2,f1,f2;
+    Standard_Integer v1 = 0,v2 = 0,e1 = 0,e2 = 0,f1 = 0,f2 = 0;
     myShapes(I).Bounds(v1,v2,e1,e2,f1,f2);
     
     HLRBRep_Array1OfFData& aFDataArray = myDS->FDataArray();
@@ -552,7 +552,7 @@ void HLRBRep_InternalAlgo::HideAll (const Standard_Integer I)
 void HLRBRep_InternalAlgo::PartialHide ()
 {
   if (!myDS.IsNull()) {
-    Standard_Integer i,n = myShapes.Length();
+    Standard_Integer i = 0,n = myShapes.Length();
 
     if (myDebug)
       std::cout << " Partial hiding" << std::endl << std::endl;
@@ -572,7 +572,7 @@ void HLRBRep_InternalAlgo::PartialHide ()
 void HLRBRep_InternalAlgo::Hide ()
 {
   if (!myDS.IsNull()) {
-    Standard_Integer i,j,n = myShapes.Length();
+    Standard_Integer i = 0,j = 0,n = myShapes.Length();
 
     if (myDebug)
       std::cout << " Total hiding" << std::endl;
@@ -661,8 +661,8 @@ void HLRBRep_InternalAlgo::Hide (const Standard_Integer I,
 void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
                                         const Standard_Boolean SideFace)
 {
-  Standard_Integer e,f,j,nbVisEdges,nbSelEdges,nbSelFaces,nbCache;
-  Standard_Integer nbFSide,nbFSimp;
+  Standard_Integer e = 0,f = 0,j = 0,nbVisEdges = 0,nbSelEdges = 0,nbSelFaces = 0,nbCache = 0;
+  Standard_Integer nbFSide = 0,nbFSimp = 0;
 
 #ifdef OCCT_DEBUG
   if (myDebug) {
@@ -677,7 +677,7 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
 #endif
 
   HLRBRep_ShapeBounds& SB = myShapes(I);
-  Standard_Integer v1,v2,e1,e2,f1,f2;
+  Standard_Integer v1 = 0,v2 = 0,e1 = 0,e2 = 0,f1 = 0,f2 = 0;
   SB.Bounds(v1,v2,e1,e2,f1,f2);
 
   if (e2 >= e1) {
@@ -733,7 +733,7 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
     if (nf == 0)
       return;
 
-    Standard_Integer QWE=0,QWEQWE;
+    Standard_Integer QWE=0,QWEQWE = 0;
     QWEQWE=nf/10;
 
     if (SideFace) {
@@ -810,8 +810,8 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
 */
     //-- ======================================================================
     if(nf>2)  {
-      Standard_Integer i,ir,k,l;
-      Standard_Integer rra;
+      Standard_Integer i = 0,ir = 0,k = 0,l = 0;
+      Standard_Integer rra = 0;
       l=(nf>>1)+1;
       ir=nf;
       for(;;) { 
index e4a95f503711e0ebb1237ff8b81740c44db9ef32..3bda047dc685f857aa61d4c5d41672bba5f3820e 100644 (file)
@@ -19,6 +19,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <ElCLib.hxx>
 #include <gp_Lin.hxx>
@@ -106,8 +108,8 @@ void  HLRBRep_Intersector::Perform (const Standard_Address A1,
   myTypePerform = 1;
 
   gp_Pnt2d pa,pb;//,pa1,pb1;
-  Standard_Real a,b,d,tol;
-  Standard_ShortReal ta,tb;
+  Standard_Real a = NAN,b = NAN,d = NAN,tol = NAN;
+  Standard_ShortReal ta = NAN,tb = NAN;
   
   ((HLRBRep_EdgeData*) A1)->Status().Bounds(a,ta,b,tb);
   d = b - a;
@@ -156,8 +158,8 @@ void  HLRBRep_Intersector::Perform (const Standard_Integer /*nA*/,
 
   gp_Pnt2d pa1,pb1,pa2,pb2;
   gp_Vec2d va1,vb1,va2,vb2;
-  Standard_Real a1,b1,a2,b2,d,dd,tol,tol1,tol2;
-  Standard_ShortReal ta,tb;
+  Standard_Real a1 = NAN,b1 = NAN,a2 = NAN,b2 = NAN,d = NAN,dd = NAN,tol = NAN,tol1 = NAN,tol2 = NAN;
+  Standard_ShortReal ta = NAN,tb = NAN;
 
   //modified by jgv, 18.04.2016 for OCC27341
   //tol1 = (Standard_Real)(((HLRBRep_EdgeData*) A1)->Tolerance());
@@ -169,7 +171,7 @@ void  HLRBRep_Intersector::Perform (const Standard_Integer /*nA*/,
   else             tol = tol2;
 
 
-  Standard_Boolean PasBon;
+  Standard_Boolean PasBon = 0;
   Standard_Real    decalagea1=100.0;
   Standard_Real    decalagea2=100.0;
   Standard_Real    decalageb1=100.0;
@@ -458,8 +460,8 @@ void  HLRBRep_Intersector::Perform (const gp_Lin& L,
     default :
     {
       if (myPolyhedron == NULL) {
-       Standard_Integer nbsu,nbsv;
-       Standard_Real u1,v1,u2,v2;
+       Standard_Integer nbsu = 0,nbsv = 0;
+       Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
        u1   = HLRBRep_SurfaceTool::FirstUParameter(mySurface);
        v1   = HLRBRep_SurfaceTool::FirstVParameter(mySurface);
        u2   = HLRBRep_SurfaceTool::LastUParameter(mySurface);
@@ -469,7 +471,7 @@ void  HLRBRep_Intersector::Perform (const gp_Lin& L,
        myPolyhedron =
     new HLRBRep_ThePolyhedronOfInterCSurf(mySurface,nbsu,nbsv,u1,v1,u2,v2);
       }
-      Standard_Real x0,y0,z0,x1,y1,z1,pmin,pmax;//,pp;
+      Standard_Real x0 = NAN,y0 = NAN,z0 = NAN,x1 = NAN,y1 = NAN,z1 = NAN,pmin = NAN,pmax = NAN;//,pp;
       myPolyhedron->Bounding().Get(x0,y0,z0,x1,y1,z1);
 #if 0
       pmax = pmin = ElCLib::Parameter(L, gp_Pnt((x1+x0)*0.5,
@@ -487,7 +489,7 @@ void  HLRBRep_Intersector::Perform (const gp_Lin& L,
       break;
 #else 
       //-- On va rejeter tous les points de parametres > P
-      Standard_Real p;
+      Standard_Real p = NAN;
       p = ElCLib::Parameter(L, gp_Pnt(x0,y0,z0));  pmin=pmax=p;
       p = ElCLib::Parameter(L, gp_Pnt(x0,y0,z1));  if(pmin>p) pmin=p; if(pmax<p) pmax=p;
 
index 077498a74ac7979cb7d4b5964aee63420def3fa1..1b6704f53c4d835a59ff112425ab73c1e7e68df6 100644 (file)
@@ -77,10 +77,10 @@ public:
 private:
 
   IntRes2d_IntersectionPoint mySinglePoint;
-  Standard_Integer myTypePerform;
+  Standard_Integer myTypePerform{};
   HLRBRep_CInter myIntersector;
   HLRBRep_InterCSurf myCSIntersector;
-  Standard_Address mySurface;
+  Standard_Address mySurface{};
   HLRBRep_ThePolyhedronOfInterCSurf* myPolyhedron;
 
 };
index ebcc46fd3afcdb2a400b1f00c145a42c5d09e0e2..c8d24f8e4f96a4009bcafa945b7df88b5394211f 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <HLRAlgo_PolyAlgo.hxx>
 
 #include <BRep_Builder.hxx>
@@ -68,26 +70,26 @@ static Standard_Integer DoError = Standard_False;
 //purpose  :
 //=======================================================================
 HLRBRep_PolyAlgo::HLRBRep_PolyAlgo()
-: myDebug     (Standard_False),
+: myAlgo(new HLRAlgo_PolyAlgo()), myDebug     (Standard_False),
   myTolSta    (0.1),
   myTolEnd    (0.9),
   myTolAngular(0.001)
 {
-  myAlgo = new HLRAlgo_PolyAlgo();
+  
 }
 
 //=======================================================================
 //function : HLRBRep_PolyAlgo
 //purpose  :
 //=======================================================================
-HLRBRep_PolyAlgo::HLRBRep_PolyAlgo (const Handle(HLRBRep_PolyAlgo)& theOther)
+HLRBRep_PolyAlgo::HLRBRep_PolyAlgo (const Handle(HLRBRep_PolyAlgo)& theOther) : myDebug(theOther->Debug()), myTolAngular(theOther->TolAngular()), myTolSta(theOther->TolCoef()), myTolEnd(1.0 - myTolSta), myAlgo(theOther->Algo()), myProj(theOther->Projector())
 {
-  myDebug      = theOther->Debug();
-  myTolAngular = theOther->TolAngular();
-  myTolSta     = theOther->TolCoef();
-  myTolEnd     = 1.0 - myTolSta;
-  myAlgo       = theOther->Algo();
-  myProj       = theOther->Projector();
+  
+  
+  
+  
+  
+  
 
   const Standard_Integer aNbShapes = theOther->NbShapes();
   for (Standard_Integer i = 1; i <= aNbShapes; ++i)
@@ -101,13 +103,13 @@ HLRBRep_PolyAlgo::HLRBRep_PolyAlgo (const Handle(HLRBRep_PolyAlgo)& theOther)
 //purpose  :
 //=======================================================================
 HLRBRep_PolyAlgo::HLRBRep_PolyAlgo (const TopoDS_Shape& theShape)
-: myDebug     (Standard_False),
+: myAlgo(new HLRAlgo_PolyAlgo()), myDebug     (Standard_False),
   myTolSta    (0.1),
   myTolEnd    (0.9),
   myTolAngular(0.001)
 {
   myShapes.Append (theShape);
-  myAlgo = new HLRAlgo_PolyAlgo();
+  
 }
 
 //=======================================================================
@@ -716,7 +718,7 @@ Standard_Boolean HLRBRep_PolyAlgo::AverageNormal (const Standard_Integer iNode,
                                                   Standard_Real& theZ) const
 {
   Standard_Boolean isOK = Standard_False;
-  Standard_Integer jNode = 0, kNode, iiii;
+  Standard_Integer jNode = 0, kNode = 0, iiii = 0;
   theX = 0;
   theY = 0;
   theZ = 0;
@@ -832,8 +834,8 @@ void HLRBRep_PolyAlgo::InitBiPointsWithConnexity (const Standard_Integer theIEdg
                                                   TopTools_ListOfShape& theLS,
                                                   const Standard_Boolean theIsConnex)
 {
-  Standard_Real X1  , Y1  , Z1  , X2  , Y2  , Z2  ;
-  Standard_Real XTI1, YTI1, ZTI1, XTI2, YTI2, ZTI2;
+  Standard_Real X1 = NAN  , Y1 = NAN  , Z1 = NAN  , X2 = NAN  , Y2 = NAN  , Z2 = NAN  ;
+  Standard_Real XTI1 = NAN, YTI1 = NAN, ZTI1 = NAN, XTI2 = NAN, YTI2 = NAN, ZTI2 = NAN;
   Standard_Real U1 = 0.0, U2 = 0.0;
   Handle(Poly_PolygonOnTriangulation) aHPol[2];
   TopLoc_Location aLoc;
@@ -2087,7 +2089,7 @@ void HLRBRep_PolyAlgo::InsertOnOutLine (NCollection_Array1<Handle(HLRAlgo_PolyIn
 
   TopLoc_Location aLoc;
   Standard_Boolean mP3P1 = false;
-  Standard_Real aU3, aV3, aCoef3, X3 = 0., Y3 = 0., Z3 = 0.;
+  Standard_Real aU3 = NAN, aV3 = NAN, aCoef3 = NAN, X3 = 0., Y3 = 0., Z3 = 0.;
 
   const gp_Trsf& aProjTrsf = myProj.Transformation();
 
@@ -2252,8 +2254,8 @@ void HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& theList,
                                              NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID)
 {
   Standard_Real X1 =0.,Y1 =0.,X2 =0.,Y2 =0.,X3 =0.,Y3 =0.;
-  Standard_Real D1,D2,D3;
-  Standard_Real dd,dX,dY,nX,nY;
+  Standard_Real D1 = NAN,D2 = NAN,D3 = NAN;
+  Standard_Real dd = NAN,dX = NAN,dY = NAN,nX = NAN,nY = NAN;
 
   HLRAlgo_Array1OfTData* aTData1 = NULL;
   HLRAlgo_Array1OfPISeg* aPISeg1 = NULL;
@@ -2862,7 +2864,7 @@ void  HLRBRep_PolyAlgo::OrientTriangle (const Standard_Integer theITri,
           }
           else
           {
-            Standard_Real o;
+            Standard_Real o = NAN;
             if (myProj.Perspective())
             {
               aD *= 1 / aDNorm;
@@ -3022,8 +3024,8 @@ void HLRBRep_PolyAlgo::CheckDegeneratedSegment (HLRAlgo_PolyInternalNode::NodeIn
 void HLRBRep_PolyAlgo::UpdateOutLines (HLRAlgo_ListOfBPoint& theList,
                                        NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID)
 {
-  Standard_Real X1  ,Y1  ,Z1  ,X2  ,Y2  ,Z2;
-  Standard_Real XTI1,YTI1,ZTI1,XTI2,YTI2,ZTI2;
+  Standard_Real X1 = NAN  ,Y1 = NAN  ,Z1 = NAN  ,X2 = NAN  ,Y2 = NAN  ,Z2 = NAN;
+  Standard_Real XTI1 = NAN,YTI1 = NAN,ZTI1 = NAN,XTI2 = NAN,YTI2 = NAN,ZTI2 = NAN;
   const Standard_Integer aNbFaces = myFMap.Extent();
   for (Standard_Integer aFaceIter = 1; aFaceIter <= aNbFaces; ++aFaceIter)
   {
@@ -3041,7 +3043,7 @@ void HLRBRep_PolyAlgo::UpdateOutLines (HLRAlgo_ListOfBPoint& theList,
     HLRAlgo_Array1OfTData& aTData = aPid->TData();
     HLRAlgo_Array1OfPISeg& aPISeg = aPid->PISeg();
     HLRAlgo_Array1OfPINod& aPINod = aPid->PINod();
-    Standard_Integer j,it1,it2,tn1,tn2,tn3,pd,pf;
+    Standard_Integer j = 0,it1 = 0,it2 = 0,tn1 = 0,tn2 = 0,tn3 = 0,pd = 0,pf = 0;
     Standard_Boolean isOutl = false;
     const Standard_Integer aNbSegs = aPid->NbPISeg();
     for (Standard_Integer aSegIter = 1; aSegIter <= aNbSegs; ++aSegIter)
@@ -3157,7 +3159,7 @@ void HLRBRep_PolyAlgo::UpdateEdgesBiPoints (HLRAlgo_ListOfBPoint& theList,
                                             const NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
                                             const Standard_Boolean theIsClosed)
 {
-  Standard_Integer itri1, itri2, tbid;
+  Standard_Integer itri1 = 0, itri2 = 0, tbid = 0;
   for (HLRAlgo_ListIteratorOfListOfBPoint aBPntIter (theList); aBPntIter.More(); aBPntIter.Next())
   {
     HLRAlgo_BiPoint& aBP = aBPntIter.ChangeValue();
@@ -3192,7 +3194,7 @@ void HLRBRep_PolyAlgo::UpdateEdgesBiPoints (HLRAlgo_ListOfBPoint& theList,
             }
           }
 
-          Standard_Boolean isOutl;
+          Standard_Boolean isOutl = 0;
           if      (!(aTriangle.Flags & HLRAlgo_PolyMask_FMskSide) && !(aTriangle2.Flags & HLRAlgo_PolyMask_FMskSide))
           {
             isOutl =  (aTriangle.Flags & HLRAlgo_PolyMask_FMskBack) !=  (aTriangle2.Flags & HLRAlgo_PolyMask_FMskBack);
index dfa696e161103edd7dfe4e84cffbd9e34bd528c9..8c97b0950a25c3ef4a8acd75577596a6c178a007 100644 (file)
@@ -329,12 +329,12 @@ private:
 private:
 
   HLRAlgo_Projector myProj;
-  Standard_Real TMat[3][3];
-  Standard_Real TLoc[3];
-  Standard_Real TTMa[3][3];
-  Standard_Real TTLo[3];
-  Standard_Real TIMa[3][3];
-  Standard_Real TILo[3];
+  Standard_Real TMat[3][3]{};
+  Standard_Real TLoc[3]{};
+  Standard_Real TTMa[3][3]{};
+  Standard_Real TTLo[3]{};
+  Standard_Real TIMa[3][3]{};
+  Standard_Real TILo[3]{};
   TopTools_SequenceOfShape myShapes;
   TopTools_IndexedMapOfShape myEMap;
   TopTools_IndexedMapOfShape myFMap;
index e064eaab3747d21074b32fcf32fa8d64c70cbf34..867d58ca2c6154c5d67b1f52470aad3805bb5545 100644 (file)
@@ -16,6 +16,8 @@
 
 // Modified by cma, Fri Nov 10 17:36:13 1995
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRepLib_MakeEdge2d.hxx>
 #include <HLRAlgo_EdgeIterator.hxx>
@@ -44,13 +46,13 @@ void HLRBRep_PolyHLRToShape::Update (const Handle(HLRBRep_PolyAlgo)& A)
 {
   myAlgo = A;
   myHideMode = Standard_True;
-  Standard_Real sta,end;
-  Standard_ShortReal tolsta,tolend;
+  Standard_Real sta = NAN,end = NAN;
+  Standard_ShortReal tolsta = NAN,tolend = NAN;
   HLRAlgo_EdgeIterator It;
   myBiPntVis.Clear();
   myBiPntHid.Clear();
   TopoDS_Shape S;
-  Standard_Boolean reg1,regn,outl,intl;
+  Standard_Boolean reg1 = 0,regn = 0,outl = 0,intl = 0;
   const gp_Trsf& T = myAlgo->Projector().Transformation();
   HLRAlgo_EdgeStatus status;
 
@@ -106,7 +108,7 @@ HLRBRep_PolyHLRToShape::InternalCompound (const Standard_Integer typ,
     for (ex.Init(S,TopAbs_FACE); ex.More(); ex.Next())
       Map.Add(ex.Current());
   }
-  Standard_Boolean todraw,reg1,regn,outl,intl;
+  Standard_Boolean todraw = 0,reg1 = 0,regn = 0,outl = 0,intl = 0;
   Standard_Boolean added = Standard_False;
   TopoDS_Shape Result;
   BRep_Builder B;
index 806a4b379da322160f1028fbdf367186a3d39d94..3db2bc8f1aa5697dff8d8cb4964e5f5e98cfdfcc 100644 (file)
@@ -131,7 +131,7 @@ private:
   Handle(HLRBRep_PolyAlgo) myAlgo;
   HLRBRep_ListOfBPnt2D myBiPntVis;
   HLRBRep_ListOfBPnt2D myBiPntHid;
-  Standard_Boolean myHideMode;
+  Standard_Boolean myHideMode{};
 
 
 };
index 84e00fff85ef0db10e190df038629f248178ff3b..d83520f3e5edd7cab1a73b1ff87f7f2540658d81 100644 (file)
@@ -19,6 +19,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepTools.hxx>
 #include <HLRBRep_Data.hxx>
@@ -75,7 +77,7 @@ HLRBRep_ShapeToHLR::Load(const Handle(HLRTopoBRep_OutLiner)& S,
   
   TopExp::MapShapes(S->OutLinedShape(),TopAbs_EDGE,EM);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer nbEdge = EM.Extent ();
 
   for (i = 1; i <= nbEdge; i++)                 // vertices back to edges
@@ -87,11 +89,11 @@ HLRBRep_ShapeToHLR::Load(const Handle(HLRTopoBRep_OutLiner)& S,
 
   TopoDS_Vertex VF, VL;
   TopTools_ListIteratorOfListOfShape itn;
-  Standard_Integer   i1, i2;
-  Standard_Boolean   o1, o2;
-  Standard_Boolean   c1, c2;
-  Standard_Real      pf, pl;
-  Standard_ShortReal tf, tl;
+  Standard_Integer   i1 = 0, i2 = 0;
+  Standard_Boolean   o1 = 0, o2 = 0;
+  Standard_Boolean   c1 = 0, c2 = 0;
+  Standard_Real      pf = NAN, pl = NAN;
+  Standard_ShortReal tf = NAN, tl = NAN;
 
   // Create the data structure
   Handle(HLRBRep_Data) DS = new HLRBRep_Data (nbVert, nbEdge, nbFace);
@@ -245,7 +247,7 @@ HLRBRep_ShapeToHLR::ExploreShape (const Handle(HLRTopoBRep_OutLiner)& S,
     Standard_Boolean closed = exshell.Current().Closed();
 
     if (!closed) {
-      Standard_Integer ie;
+      Standard_Integer ie = 0;
       Standard_Integer nbEdge = EM.Extent ();
       Standard_Integer *flag = new Standard_Integer[nbEdge + 1];
 
index 7022dd87d0e19a2664d5c780e32a70cb61fdd629..3ded8750c4f1e0f891b59c19e20c33c735eb0fba 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Vec.hxx>
 #include <GProp_PEquation.hxx>
 #include <HLRAlgo_Projector.hxx>
@@ -80,9 +82,9 @@ HLRBRep_Surface::SideRowsOfPoles (const Standard_Real tol,
                                  const Standard_Integer nbvPoles,
                                  TColgp_Array2OfPnt& Pnt) const
 {
-  Standard_Integer iu,iv;
-  Standard_Real x0,y0,x,y,z;
-  Standard_Boolean result;
+  Standard_Integer iu = 0,iv = 0;
+  Standard_Real x0 = NAN,y0 = NAN,x = NAN,y = NAN,z = NAN;
+  Standard_Boolean result = 0;
   Standard_Real tole = (Standard_Real)tol;
   const gp_Trsf& T = myProj->Transformation();
 
@@ -144,7 +146,7 @@ HLRBRep_Surface::IsSide (const Standard_Real tolF,
 {
   gp_Pnt Pt;
   gp_Vec D;
-  Standard_Real r;
+  Standard_Real r = NAN;
 
   if (myType == GeomAbs_Plane) {
     gp_Pln Pl = Plane();
@@ -211,9 +213,9 @@ HLRBRep_Surface::IsAbove (const Standard_Boolean back,
   Standard_Boolean planar = (myType == GeomAbs_Plane);
   if (planar) {
     gp_Pln Pl = Plane();
-    Standard_Real a,b,c,d;
+    Standard_Real a = NAN,b = NAN,c = NAN,d = NAN;
     Pl.Coefficients(a,b,c,d);
-    Standard_Real u,u1,u2,dd,x,y,z;
+    Standard_Real u = NAN,u1 = NAN,u2 = NAN,dd = NAN,x = NAN,y = NAN,z = NAN;
     gp_Pnt P;
     u1 = A->Parameter3d(A->FirstParameter());
     u2 = A->Parameter3d(A->LastParameter());
index 7b3158059c98b5bbe65a9f0fad52d2261afe1adb..655b8a88eb124181f831801b7620e39be40a04a1 100644 (file)
@@ -18,7 +18,7 @@
 #include <BRepAdaptor_Surface.hxx>
 
 Standard_Integer  HLRBRep_SurfaceTool::NbSamplesU(const Standard_Address S) { 
-  Standard_Integer nbs;
+  Standard_Integer nbs = 0;
   GeomAbs_SurfaceType typS = ((BRepAdaptor_Surface *)S)->GetType();
   switch(typS) { 
   case GeomAbs_Plane:
@@ -64,7 +64,7 @@ Standard_Integer  HLRBRep_SurfaceTool::NbSamplesU(const Standard_Address S) {
 }
 
 Standard_Integer  HLRBRep_SurfaceTool::NbSamplesV(const Standard_Address S) { 
-  Standard_Integer nbs;
+  Standard_Integer nbs = 0;
   GeomAbs_SurfaceType typS = ((BRepAdaptor_Surface *)S)->GetType();
   switch(typS) { 
   case GeomAbs_Plane:
index 2f01a26096c17a6c614d804498d4a3d8996abe1b..d8e1db30d7893e79d9ecd911d92e58adb321d151 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <AppDef_BSplineCompute.hxx>
 #include <AppDef_MultiLine.hxx>
 #include <AppParCurves_MultiBSpCurve.hxx>
@@ -135,16 +137,16 @@ void  HLRTopoBRep_DSFiller::InsertFace (const Standard_Integer /*FI*/,
   */
 
   const Standard_Integer NbLines = FO.NbLines();
-  Standard_Integer CurLine;
+  Standard_Integer CurLine = 0;
   for (CurLine = 1; CurLine <= NbLines; CurLine++)
   {
     const Contap_Line& Line = FO.Line(CurLine);
     const Standard_Integer NbPoints = Line.NbVertex();
-    Standard_Integer CurPoint;
+    Standard_Integer CurPoint = 0;
     if (Line.TypeContour() == Contap_Restriction)
     {
       // OutLine on restriction
-      TopoDS_Edge E = (*(BRepAdaptor_Curve2d*)(Line.Arc().get())).Edge();
+      TopoDS_Edge E = (*dynamic_cast<BRepAdaptor_Curve2d*>(Line.Arc().get())).Edge();
       OutL.Append(E);
       TopExp::Vertices(E,VF,VL);
       // insert the Internal points.
@@ -311,7 +313,7 @@ void  HLRTopoBRep_DSFiller::InsertFace (const Standard_Integer /*FI*/,
                   if(withPCurve) { 
                     TColgp_Array1OfPnt2d Points2d(1,nbp);
                     for(Standard_Integer i=1;i<=nbp;i++) {
-                      Standard_Real u,v;
+                      Standard_Real u = NAN,v = NAN;
                       Line.Point(i+ipF-1).ParametersOnS2(u,v);
                       Points2d.SetValue(i,gp_Pnt2d(u,v));
                     }
@@ -326,8 +328,8 @@ void  HLRTopoBRep_DSFiller::InsertFace (const Standard_Integer /*FI*/,
                   TColStd_Array1OfInteger mults(1,nbp);
                   TColgp_Array1OfPnt Points(1,nbp);
 
-                  Standard_Real Maxx,Maxy,Maxz,Maxu,Maxv;
-                  Standard_Real Minx,Miny,Minz,Minu,Minv;
+                  Standard_Real Maxx = NAN,Maxy = NAN,Maxz = NAN,Maxu = NAN,Maxv = NAN;
+                  Standard_Real Minx = NAN,Miny = NAN,Minz = NAN,Minu = NAN,Minv = NAN;
                   Maxx=Maxy=Maxz=Maxu=Maxv=-RealLast();
                   Minx=Miny=Minz=Minu=Minv=RealLast();
                  
@@ -351,7 +353,7 @@ void  HLRTopoBRep_DSFiller::InsertFace (const Standard_Integer /*FI*/,
                   if(withPCurve) {
                     TColgp_Array1OfPnt2d Points2d(1,nbp);
                     for(Standard_Integer i=1;i<=nbp;i++) {
-                      Standard_Real u,v;
+                      Standard_Real u = NAN,v = NAN;
                       Line.Point(i+ipF-1).ParametersOnS2(u,v);
                       if(u<Minu) Minu=u;
                       if(v<Minv) Minv=v;
@@ -371,7 +373,7 @@ void  HLRTopoBRep_DSFiller::InsertFace (const Standard_Integer /*FI*/,
                   Standard_Integer dmin=4,dmax=8,niter=0;
                   Standard_Boolean tg= Standard_False;
                   BRepApprox_Approx Approx;
-                  Standard_Real TOL3d,TOL2d,TOL=0.0001;
+                  Standard_Real TOL3d = NAN,TOL2d = NAN,TOL=0.0001;
 
                   Maxx-=Minx; Maxy-=Miny; Maxz-=Minz;
                   Maxu-=Minu; Maxv-=Minv;
@@ -502,7 +504,7 @@ HLRTopoBRep_DSFiller::MakeVertex (const Contap_Point& P,
   else {
     // if on arc, insert in the DS
     if (P.IsOnArc()) {
-      const TopoDS_Edge& E = (*(BRepAdaptor_Curve2d*)(P.Arc().get())).Edge();
+      const TopoDS_Edge& E = (*dynamic_cast<BRepAdaptor_Curve2d*>(P.Arc().get())).Edge();
       Standard_Real Par = P.ParameterOnArc();
       const gp_Pnt& P3d = P.Value();
 
@@ -592,7 +594,7 @@ void  HLRTopoBRep_DSFiller::ProcessEdges (HLRTopoBRep_Data& DS)
   BRep_Builder B;
   TopoDS_Edge newE;
   TopoDS_Vertex VF,VL,VI;
-  Standard_Real PF,PL,PI;
+  Standard_Real PF = NAN,PL = NAN,PI = NAN;
 
   for (DS.InitEdge(); DS.MoreEdge(); DS.NextEdge()) {
     TopoDS_Edge E = DS.Edge();
index 77f8cca7fea2121ca912500d280e4421a1ff38b9..a0b7eeb80678a96a75e93ddf53a073592095abed 100644 (file)
@@ -153,7 +153,7 @@ private:
   HLRTopoBRep_MapOfShapeListOfVData myEdgesVertices;
   HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData myEIterator;
   HLRTopoBRep_ListIteratorOfListOfVData myVIterator;
-  HLRTopoBRep_ListOfVData* myVList;
+  HLRTopoBRep_ListOfVData* myVList{};
 
 
 };
index 6151e40bc43f10b480cac1dbb5047eaf372b1284..3d11272796f016059252079710399dcdc39bc72e 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Surface.hxx>
@@ -59,7 +61,7 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
 {
   (void)FI; // avoid compiler warning
 
-  Standard_Real UMin, UMax, VMin, VMax, U1, U2;
+  Standard_Real UMin = NAN, UMax = NAN, VMin = NAN, VMax = NAN, U1 = NAN, U2 = NAN;
   Standard_Integer ne = 0;
   //BRep_Builder Builder;
   TopoDS_Edge Edge;
@@ -118,7 +120,7 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
   for (ExpEdges.Init (TF, TopAbs_EDGE);
        ExpEdges.More();
        ExpEdges.Next()) {
-    Standard_Integer IndE;
+    Standard_Integer IndE = 0;
     const TopoDS_Edge& newE = TopoDS::Edge(ExpEdges.Current());
     const Handle(Geom2d_Curve) PC =
       BRep_Tool::CurveOnSurface (newE, TF, U1, U2);
@@ -142,7 +144,7 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
     for(itE.Initialize(DS.FaceIntL(TF));
        itE.More();
        itE.Next()) {
-      Standard_Integer IndE;
+      Standard_Integer IndE = 0;
       const TopoDS_Edge& newE = TopoDS::Edge(itE.Value());
       const Handle(Geom2d_Curve) PC =
        BRep_Tool::CurveOnSurface (newE, TF, U1, U2);
@@ -168,7 +170,7 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
   BRepAdaptor_Surface Surface (TF);
   Standard_Real Tolerance = BRep_Tool::Tolerance (TF);
   
-  Standard_Integer IIso;
+  Standard_Integer IIso = 0;
   Standard_Real DeltaU = Abs (UMax - UMin);
   Standard_Real DeltaV = Abs (VMax - VMin);
   Standard_Real Confusion = Min (DeltaU, DeltaV) * HatcherConfusion3d;
index e6b0880098b791a570d0a6802a5ec2ddc1da81a1..a7d6c97a5574bed410b19b9c3230f0b411765bd4 100644 (file)
@@ -194,7 +194,7 @@ void HLRTopoBRep_OutLiner::ProcessFace(const TopoDS_Face& F,
                Standard_Integer aNe = anExt.NbExt();
                if(aNe > 0) {
                  Standard_Real dist = RealLast();
-                 Standard_Integer ec;
+                 Standard_Integer ec = 0;
                  for(ec = 1; ec <= aNe; ++ec) {
 //                 dist = Min(dist, anExt.Value(ec));
                    dist = Min(dist, anExt.SquareDistance(ec));
index 830f318caf4dc7723f661dcb9a3111a40a861021..4a8c877c6454ff5f56b4833b66718d6e4c920587 100644 (file)
@@ -113,7 +113,7 @@ void  Hatch_Hatcher::Trim
 {
   IntAna2d_IntPoint        Pinter;
   IntAna2d_AnaIntersection Inters;
-  Standard_Integer         iLine;
+  Standard_Integer         iLine = 0;
   for (iLine = 1; iLine <= myLines.Length(); iLine++) {
     Inters.Perform(myLines(iLine).myLin,L);
     if (Inters.IsDone()) {
@@ -174,7 +174,7 @@ void  Hatch_Hatcher::Trim
 
 Standard_Integer Hatch_Hatcher::NbIntervals() const
 {
-  Standard_Integer i, nb = 0;
+  Standard_Integer i = 0, nb = 0;
   for (i = 1; i <= myLines.Length(); i++)
     nb += NbIntervals(i);
   return nb;
index 8a4d90448c0eee51132a772e9b9650f577ac0dbe..737650e0933f4858af739da4533a9568fe3da3bf 100644 (file)
@@ -53,7 +53,7 @@ void  Hatch_Line::AddIntersection
    const Standard_Real theToler)
 {
   Hatch_Parameter P(Par1,Start,Index,Par2);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= myInters.Length(); i++) {
     Standard_Real dfIntPar1 = myInters(i).myPar1;
     // akm OCC109 vvv : Two intersections too close
index 3afd2bb33471cf4209a6cd7d02cecb47c1051c86..a06fac839e4117b3f193969323c8be2d5d97124d 100644 (file)
@@ -63,7 +63,7 @@ void HatchGen_PointOnHatching::AddPoint (const HatchGen_PointOnElement& Point,
 {
   Standard_Integer NbPnt = myPoints.Length() ;
  // for (Standard_Integer IPnt = 1 ;
-  Standard_Integer IPnt;
+  Standard_Integer IPnt = 0;
   for ( IPnt = 1 ;
        IPnt <= NbPnt && myPoints(IPnt).IsDifferent (Point, Confusion) ;
        IPnt++) ;
index eeb22232eec6e372cb438727c587b4bc8005656f..6b51694e722693f3d0ef83b83ac2088261a87839 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <Geom2d_BSplineCurve.hxx>
 #include <Geom_BSplineCurve.hxx>
@@ -41,10 +43,10 @@ static void HermiteCoeff(const Handle(Geom_BSplineCurve)& BS,
   TColStd_Array1OfReal    Knots(1,BS->NbKnots());         
   TColStd_Array1OfReal    Weights(1,BS->NbPoles()); 
   TColStd_Array1OfInteger Mults(1,BS->NbKnots());
-  Standard_Integer        Degree,Index0,Index1;                     // denominateur value for u=0 & u=1
-  Standard_Real           Denom0,Denom1,                            // denominator value for u=0 & u=1
-                          Deriv0,Deriv1 ;                           // derivative denominator value for u=0 & 1
-  Standard_Boolean        Periodic;
+  Standard_Integer        Degree = 0,Index0 = 0,Index1 = 0;                     // denominateur value for u=0 & u=1
+  Standard_Real           Denom0 = NAN,Denom1 = NAN,                            // denominator value for u=0 & u=1
+                          Deriv0 = NAN,Deriv1 = NAN ;                           // derivative denominator value for u=0 & 1
+  Standard_Boolean        Periodic = 0;
   
   BS->Knots(Knots);
   BSplCLib::Reparametrize(0.0,1.0,Knots);                           //affinity on the nodal vector
@@ -77,10 +79,10 @@ static void HermiteCoeff(const Handle(Geom2d_BSplineCurve)& BS,
   TColStd_Array1OfReal    Knots(1,BS->NbKnots());         
   TColStd_Array1OfReal    Weights(1,BS->NbPoles()); 
   TColStd_Array1OfInteger Mults(1,BS->NbKnots());
-  Standard_Integer        Degree,Index0,Index1;
-  Standard_Real           Denom0,Denom1,                            // denominateur value for u=0 & u=1
-                          Deriv0,Deriv1 ;                           // denominator value for u=0 & u=1
-  Standard_Boolean        Periodic;                                 // derivative denominatur value for u=0 & 1
+  Standard_Integer        Degree = 0,Index0 = 0,Index1 = 0;
+  Standard_Real           Denom0 = NAN,Denom1 = NAN,                            // denominateur value for u=0 & u=1
+                          Deriv0 = NAN,Deriv1 = NAN ;                           // denominator value for u=0 & u=1
+  Standard_Boolean        Periodic = 0;                                 // derivative denominatur value for u=0 & 1
   
   BS->Knots(Knots);
   BSplCLib::Reparametrize(0.0,1.0,Knots);                           //affinity on the nodal vector
@@ -108,7 +110,7 @@ static void HermiteCoeff(const Handle(Geom2d_BSplineCurve)& BS,
 static Standard_Boolean SignDenom(const TColgp_Array1OfPnt2d& Poles)
 
 {
-  Standard_Boolean Result;
+  Standard_Boolean Result = 0;
   
   if (Poles(0).Y()<0)                                             
     Result=Standard_False;                                        
@@ -128,8 +130,8 @@ static void Polemax(const TColgp_Array1OfPnt2d& Poles,
 
 {
 //  Standard_Integer i,index=0;
-  Standard_Integer i;
-  Standard_Real Max,Min;                                         //intermediate value of max and min ordinates
+  Standard_Integer i = 0;
+  Standard_Real Max = NAN,Min = NAN;                                         //intermediate value of max and min ordinates
   min=0;max=0;                                                   //initialisation of the indices
   
   Min=Poles(0).Y();                                              //initialisation of the intermediate value
@@ -164,13 +166,13 @@ static void PolyTest(const TColStd_Array1OfReal&         Herm,
                     const Standard_Real                 Uy)
 
 {
-  Standard_Integer               index,i,                
+  Standard_Integer               index = 0,i = 0,                
                                  I1=0,I2=0,I3=0,I4=0;    //knots index
   TColgp_Array1OfPnt2d           Polesinit(0,3) ;        
   Handle(TColStd_HArray1OfReal)  Knots;                  //array of the BSpline knots + the ones inserted
   Standard_Integer               cas=0,mark=0,dercas=0,  //loop marks
-                                 min,max;                //Pole min and max indices
-  Standard_Real                  Us1,Us2,a;              //boundaries value of the knots to be inserted
+                                 min = 0,max = 0;                //Pole min and max indices
+  Standard_Real                  Us1 = NAN,Us2 = NAN,a = NAN;              //boundaries value of the knots to be inserted
   
   U4=0.0;U5=1.0;                                         //default value
   if (Ux!=1.0){
@@ -249,7 +251,7 @@ static void PolyTest(const TColStd_Array1OfReal&         Herm,
             mark=1;
           }
           if (mark==0){
-            Standard_Real Pole0,Pole3;
+            Standard_Real Pole0 = NAN,Pole3 = NAN;
             Pole0=Polesinit(0).Y();
             Pole3=Polesinit(3).Y();
             if (Pole0<3){                         
@@ -385,13 +387,13 @@ static void PolyTest(const TColStd_Array1OfReal&        Herm,
                     const Standard_Real                Uy)
 
 {
-  Standard_Integer               index,i,
+  Standard_Integer               index = 0,i = 0,
                                  I1=0,I2=0,I3=0,I4=0;    //knots index
   TColgp_Array1OfPnt2d           Polesinit(0,3) ;
   Handle(TColStd_HArray1OfReal)  Knots;                  //array of the BSpline knots + the ones inserted
   Standard_Integer               cas=0,mark=0,dercas=0,  //loop marks
-                                 min,max;                //Pole min and max indices
-  Standard_Real                  Us1,Us2,a;              //boundaries value of the knots to be inserted
+                                 min = 0,max = 0;                //Pole min and max indices
+  Standard_Real                  Us1 = NAN,Us2 = NAN,a = NAN;              //boundaries value of the knots to be inserted
   
   U4=0.0;U5=1.0;                                         //default value
   if (Ux!=1.0){
@@ -481,7 +483,7 @@ static void PolyTest(const TColStd_Array1OfReal&        Herm,
           }
           if (mark==0)
           {
-            Standard_Real Pole0,Pole3;
+            Standard_Real Pole0 = NAN,Pole3 = NAN;
             Pole0=Polesinit(0).Y();
             Pole3=Polesinit(3).Y();
             if (Pole0<3)
@@ -627,7 +629,7 @@ static void MovePoles(Handle(Geom2d_BSplineCurve)& BS)
 {
   gp_Pnt2d  P ;
 //  Standard_Integer i,index; 
-  Standard_Integer i; 
+  Standard_Integer i = 0
 
   for (i=3;i<=(BS->NbPoles()-2);i++){
     P.SetCoord(1,(BS->Pole(i).Coord(1)));           //raising of the no constrained poles to
index f185c25b0fac69c0426d21c4f10be6e8fc91f7b3..06664da2e34297bda4a35393f11eadfb02fb0018 100644 (file)
@@ -64,7 +64,7 @@ IFGraph_Articulations::IFGraph_Articulations
 
   for (Interface_EntityIterator iter = thegraph.Shareds(thegraph.Entity(num));
        iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     Standard_Integer nument  = thegraph.EntityNumber(ent);
     if (!thegraph.IsPresent(num)) {
       thegraph.GetFromEntity(ent,Standard_False);
index 94480c158e3468661b2c3d9eaab429237bc2c697..e5ee4acf9b27d4fbb55abac8b2853a57bf12610e 100644 (file)
@@ -67,7 +67,7 @@ private:
 private:
 
   Interface_Graph thegraph;
-  Standard_Integer thenow;
+  Standard_Integer thenow{};
   Handle(TColStd_HSequenceOfInteger) thelist;
 
 };
index 519e3b2ff4416b3373d55d92b0c942983c3aba62..6b75fdf301a5582151d3b0f1a0bbab69c4af51eb 100644 (file)
@@ -35,7 +35,7 @@ IFGraph_ConnectedComponants::IFGraph_ConnectedComponants
   Interface_EntityIterator loaded = Loaded();
   Reset();
   for (loaded.Start(); loaded.More(); loaded.Next()) {
-    Handle(Standard_Transient) ent = loaded.Value();
+    const Handle(Standard_Transient)& ent = loaded.Value();
     if (IsInPart(ent)) continue;
     IFGraph_AllConnected connect(Model(),ent);
     AddPart();
index 52ee0f2e6b27396ef59dc27224d77764350007ac..c6ce81aa120a92afb6f58d5a8b801fe12496cc0d 100644 (file)
@@ -38,11 +38,11 @@ IFGraph_SubPartsIterator::IFGraph_SubPartsIterator
 
     IFGraph_SubPartsIterator::IFGraph_SubPartsIterator
   (IFGraph_SubPartsIterator& other)
-      : thegraph (other.Graph())
+      : thegraph (other.Graph()), theparts(new TColStd_HSequenceOfInteger()), thepart(0)
 {
   Standard_Integer nb = thegraph.Size();
-  theparts = new TColStd_HSequenceOfInteger();
-  thepart = 0;
+  
+  
   for (other.Start(); other.More(); other.Next()) {
     thepart ++;
     Standard_Integer nbent = 0;
index 52f268a78da4ba710b97915f21e72a36b2ec5297..84299ae247a6505f4835e541c7622fcd783e24af 100644 (file)
@@ -63,7 +63,7 @@ static TColStd_SequenceOfTransient theacts;
   (const Standard_CString command, Standard_Integer& number,
    Handle(IFSelect_Activator)& actor)
 {
-  Standard_Integer num;
+  Standard_Integer num = 0;
   if (!thedico.Find(command, num)) return Standard_False;
   number = thenums(num);
   actor = Handle(IFSelect_Activator)::DownCast(theacts(num));
@@ -73,7 +73,7 @@ static TColStd_SequenceOfTransient theacts;
     Standard_Integer IFSelect_Activator::Mode
   (const Standard_CString command)
 {
-  Standard_Integer num;
+  Standard_Integer num = 0;
   if (!thedico.Find(command, num)) return -1;
   return themodes(num);
 }
@@ -82,7 +82,7 @@ static TColStd_SequenceOfTransient theacts;
     Handle(TColStd_HSequenceOfAsciiString) IFSelect_Activator::Commands
   (const Standard_Integer mode, const Standard_CString command)
 {
-  Standard_Integer num;
+  Standard_Integer num = 0;
   NCollection_DataMap<TCollection_AsciiString, Standard_Integer>::Iterator iter(thedico);
   Handle(TColStd_HSequenceOfAsciiString) list =
     new  TColStd_HSequenceOfAsciiString();
index 76e4bd40b6ef6cb7531e773294d5e818100e94a9..79a5269c3a3c3f79adda937ae268110edfa13c5c 100644 (file)
@@ -20,9 +20,9 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_AppliedModifiers,Standard_Transient)
 
 IFSelect_AppliedModifiers::IFSelect_AppliedModifiers
   (const Standard_Integer nbmax, const Standard_Integer nbent)
-    : thelists (nbmax+1)
+    : thelists (nbmax+1), thenbent(nbent), theentcnt(0)
 {
-  thenbent = nbent;  theentcnt = 0;
+   
 }
 
    Standard_Boolean  IFSelect_AppliedModifiers::AddModif
@@ -65,7 +65,7 @@ IFSelect_AppliedModifiers::IFSelect_AppliedModifiers
     Handle(TColStd_HSequenceOfInteger) IFSelect_AppliedModifiers::ItemList () const
 {
   Handle(TColStd_HSequenceOfInteger) list = new TColStd_HSequenceOfInteger();
-  Standard_Integer i, nb = (theentcnt > 0 ? theentcnt : thenbent);
+  Standard_Integer i = 0, nb = (theentcnt > 0 ? theentcnt : thenbent);
   for (i = 1; i <= nb; i ++)  list->Append (ItemNum(i));
   return list;
 }
index 26a04db16125158e6a455368505e985b3ffb46d1..35ffe4cdcde491fc01553e47a042babe99422bd2 100644 (file)
@@ -142,7 +142,7 @@ IFSelect_BasicDumper::IFSelect_BasicDumper ()  {  }
     return Standard_True;
   }
   if (type.IsEqual("IFSelect_SelectTextType")) {
-    const TCollection_AsciiString exname = file.ParamValue(1);
+    const TCollection_AsciiString& exname = file.ParamValue(1);
     if (exname.Length() < FIRSTCHAR) return Standard_False;
     if      (exname.Value(FIRSTCHAR) == 'e') {}
     else if (exname.Value(FIRSTCHAR) == 'c') {}
@@ -167,8 +167,8 @@ IFSelect_BasicDumper::IFSelect_BasicDumper ()  {  }
   }
 
   if (type.IsEqual("IFSelect_TransformStandard")) {
-    Standard_Boolean copyoption;
-    const TCollection_AsciiString copyname = file.ParamValue(1);
+    Standard_Boolean copyoption = 0;
+    const TCollection_AsciiString& copyname = file.ParamValue(1);
     if (copyname.Length() < FIRSTCHAR) return Standard_False;
     if      (copyname.Value(FIRSTCHAR) == 'c') copyoption = Standard_True;
     else if (copyname.Value(FIRSTCHAR) == 'o') copyoption = Standard_False;
index 6c3802c4e51a4ff8388eb248348e6fb2edff5161..702541e3293ba492c82e0788c8490762509913fc 100644 (file)
@@ -65,14 +65,14 @@ void  IFSelect_CheckCounter::Analyse(const Interface_CheckIterator& list,
                                      const Standard_Boolean original,
                                      const Standard_Boolean failsonly)
 {
-  Standard_Integer i,nb,num, nbe = (model.IsNull() ? 0 : model->NbEntities());
+  Standard_Integer i = 0,nb = 0,num = 0, nbe = (model.IsNull() ? 0 : model->NbEntities());
   char mess[300];
   sprintf (mess,"Check %s",list.Name());
   SetName (mess);
   for (list.Start(); list.More(); list.Next()) {
     num = list.Number();
     Handle(Standard_Transient) ent;
-    const Handle(Interface_Check) check = list.Value();
+    const Handle(Interface_Check)& check = list.Value();
     ent = check->Entity();
     if (ent.IsNull() && num > 0 && num <= nbe) ent = model->Value(num);
     nb = check->NbFails();
index c69ad559be5e6de5ed353e355949522b6b53af7b..1bcfaf6e50a62dd2fe36a4d3902a2bbff23b9013 100644 (file)
@@ -36,9 +36,9 @@ IFSelect_ContextModif::IFSelect_ContextModif(const Interface_Graph& graph,
                                              const Interface_CopyTool& TC,
                                              const Standard_CString filename)
      : thegraf (graph,Standard_False) , thefile (filename) ,
-       thelist (graph.Size(),' ')
+       thelist (graph.Size(),' '), thesel(Standard_False)
 {
-  themap = TC.Control();  thesel  = Standard_False;  thecurr = thecurt = 0;
+  themap = TC.Control();   thecurr = thecurt = 0;
   Standard_Integer nb = thelist.Length();
   Handle(Standard_Transient) newent;
   for (Standard_Integer i = 1; i <= nb; i ++) {
@@ -55,9 +55,9 @@ IFSelect_ContextModif::IFSelect_ContextModif(const Interface_Graph& graph,
 IFSelect_ContextModif::IFSelect_ContextModif(const Interface_Graph& graph,
                                              const Standard_CString filename)
      : thegraf (graph,Standard_False) , thefile (filename) ,
-       thelist (graph.Size(),' ')
+       thelist (graph.Size(),' '), thesel(Standard_False)
 {
-  thesel  = Standard_False;  thecurr = thecurt = 0;
+   thecurr = thecurt = 0;
   Standard_Integer nb = thelist.Length();
   Handle(Standard_Transient) newent;
   for (Standard_Integer i = 1; i <= nb; i ++)  thelist.SetValue(i,'1');
index fda05474fd1f0298aaf54eb9b39b576de4ffa091..54bc638104470737b4d2f7213dfd152c4589661a 100644 (file)
@@ -65,7 +65,7 @@ IFSelect_DispPerSignature::IFSelect_DispPerSignature ()    {  }
   thesign->Clear();
   thesign->AddList (FinalSelection()->RootResult(G).Content(),G.Model());
   Handle(TColStd_HSequenceOfHAsciiString) list = thesign->List();
-  Standard_Integer i,nb,is,nbs = list->Length();
+  Standard_Integer i = 0,nb = 0,is = 0,nbs = list->Length();
   Handle(TCollection_HAsciiString) asign;
   Handle(TColStd_HSequenceOfTransient) ents;
   for (is = 1; is <= nbs; is ++) {
index 7065164e56073e3100751bfd887911e83abf0a50..09262fbd2028439c669b75a7d409e89564b02db5 100644 (file)
@@ -56,7 +56,7 @@ IFSelect_EditForm::IFSelect_EditForm
       theeditor (editor) , 
       thetouched (0)
 {
-  Standard_Integer i,nb = nums.Length();
+  Standard_Integer i = 0,nb = nums.Length();
   for (i = 1; i <= nb; i ++) thenums.SetValue (i,nums.Value(i));
 }
 
@@ -116,7 +116,7 @@ IFSelect_EditForm::IFSelect_EditForm
   (const Standard_Integer num) const
 {
   if (thecomplete) return num;
-  Standard_Integer i, n = thenums.Upper();
+  Standard_Integer i = 0, n = thenums.Upper();
   for (i = 1; i <= n; i ++) {
     if (thenums.Value(i) == num) return i;
   }
@@ -129,7 +129,7 @@ IFSelect_EditForm::IFSelect_EditForm
   Standard_Integer res = theeditor->NameNumber(name);
   if (thecomplete || res == 0) return res;
 //   Sinon, chercher res dans thenums
-  Standard_Integer i, nb = thenums.Length();
+  Standard_Integer i = 0, nb = thenums.Length();
   for (i = 1; i <= nb; i ++) {
     if (res == thenums.Value(i)) return res;
   }
@@ -142,7 +142,7 @@ IFSelect_EditForm::IFSelect_EditForm
   Standard_Integer res = theeditor->NameNumber(name);
   if (thecomplete || res == 0) return res;
 //   Sinon, chercher res dans thenums
-  Standard_Integer i, nb = thenums.Length();
+  Standard_Integer i = 0, nb = thenums.Length();
   for (i = 1; i <= nb; i ++) {
     if (res == thenums.Value(i)) return i;
   }
@@ -154,7 +154,7 @@ IFSelect_EditForm::IFSelect_EditForm
 {
   theloaded = Standard_True;
   thetouched = 0;
-  Standard_Integer i,nb = theorigs.Upper();
+  Standard_Integer i = 0,nb = theorigs.Upper();
   if (nb == 0) return;
   for (i = 1; i <= nb; i ++) {
     Standard_Integer num = NumberFromRank(i);
@@ -393,7 +393,7 @@ IFSelect_EditForm::IFSelect_EditForm
 
     void  IFSelect_EditForm::ClearEdit (const Standard_Integer num)
 {
-  Standard_Integer i, nb = thestatus.Upper();
+  Standard_Integer i = 0, nb = thestatus.Upper();
   if (num == 0) {
     for (i = 1; i <= nb; i ++)   thestatus.SetValue (i,0);
   } else {
@@ -405,7 +405,7 @@ IFSelect_EditForm::IFSelect_EditForm
 
     void  IFSelect_EditForm::PrintDefs (Standard_OStream& S) const
 {
-  Standard_Integer iv, nbv = NbValues(Standard_True);
+  Standard_Integer iv = 0, nbv = NbValues(Standard_True);
   S<<"***** EditForm,  Label : "<<Label()<<std::endl;
   if (IsComplete()) S<<"Complete, "<<nbv<<" Values"<<std::endl;
   else {
@@ -423,7 +423,7 @@ static void PrintList
 {
   if (list.IsNull())  {  S<<"(NULL LIST)"<<std::endl;  return;  }
 
-  Standard_Integer i,nb = list->Length();
+  Standard_Integer i = 0,nb = list->Length();
   S<<"(List : "<<nb<<" Items)"<<std::endl;
   if (!alsolist) return;
 
@@ -437,7 +437,7 @@ static void PrintList
   (Standard_OStream& S, const Standard_Integer what,
    const Standard_Boolean names, const Standard_Boolean alsolist) const
 {
-  Standard_Integer iv, nbv = NbValues(Standard_True);
+  Standard_Integer iv = 0, nbv = NbValues(Standard_True);
   S<<  "****************************************************"<<std::endl;
   S<<"*****  "<<Label()<<Interface_MSG::Blanks(Label(),40)<<"*****"<<std::endl;
   S<<"*****                                          *****"<<std::endl;
@@ -538,7 +538,7 @@ static void PrintList
     Standard_Boolean  IFSelect_EditForm::Undo ()
 {
   if (thestatus.Upper() == 0 || theorigs.Upper() == 0) return Standard_False;
-  Standard_Integer i, nb = thestatus.Upper();
+  Standard_Integer i = 0, nb = thestatus.Upper();
   for (i = 1; i <= nb; i ++)  {
     if (thestatus.Value (i) != 0) themodifs.SetValue (i,theorigs.Value(i));
   }
index 49c9464c195af0a51499dd05f96f4075e98f553c..b5af50b846b428ac9f193920584fd57974d04436 100644 (file)
@@ -104,7 +104,7 @@ Standard_Integer  IFSelect_Editor::MaxList (const Standard_Integer num) const
 
     void  IFSelect_Editor::PrintNames (Standard_OStream& S) const
 {
-  Standard_Integer i, nb = NbValues();
+  Standard_Integer i = 0, nb = NbValues();
   S<<"****    Editor : "<<Label()<<std::endl;
   S<<"****    Nb Values = "<<nb<<"    ****    Names / Labels"<<std::endl;
   S<<" Num ";
@@ -126,7 +126,7 @@ Standard_Integer  IFSelect_Editor::MaxList (const Standard_Integer num) const
     void  IFSelect_Editor::PrintDefs
   (Standard_OStream& S, const Standard_Boolean labels) const
 {
-  Standard_Integer i, nb = NbValues();
+  Standard_Integer i = 0, nb = NbValues();
   S<<"****    Editor : "<<Label()<<std::endl;
   S<<"****    Nb Values = "<<nb<<"    ****    "<<(labels ? "Labels" : "Names")<<"  /  Definitions"<<std::endl;
   S<<" Num ";
@@ -184,7 +184,7 @@ Standard_Integer  IFSelect_Editor::MaxList (const Standard_Integer num) const
     Standard_Integer  IFSelect_Editor::NameNumber
   (const Standard_CString name) const
 {
-  Standard_Integer res;
+  Standard_Integer res = 0;
   if (thenames.Find(name,res))
     return res;
   res = atoi (name);  // si c est un entier, on tente le coup
index c04459131604207da930e5ec87f79b572ffb276f..5e7940cc5e8bb01b5cd130f235a072a24730e69c 100644 (file)
@@ -78,7 +78,7 @@ static void SplitFileName
    TCollection_AsciiString& fileroot,
    TCollection_AsciiString& suffix)
 {
-  Standard_Integer nomdeb, nomfin, nomlon;
+  Standard_Integer nomdeb = 0, nomfin = 0, nomlon = 0;
   TCollection_AsciiString resfile (filename);
   nomlon = resfile.Length();
   nomdeb = resfile.SearchFromEnd ("/");
@@ -240,7 +240,7 @@ static IFSelect_ReturnStatus fun8
   if (argc < 2) { sout<<"Give label to search"<<std::endl; return IFSelect_RetError; }
   if (!WS->HasModel()) { sout<<"No loaded model, abandon"<<std::endl; return IFSelect_RetError; }
   const Handle(Interface_InterfaceModel) &model = WS->Model();
-  Standard_Integer i, cnt = 0;
+  Standard_Integer i = 0, cnt = 0;
   Standard_Boolean exact = Standard_False;
   sout<<" **  Search Entity Number for Label : "<<arg1<<std::endl;
   for (i = model->NextNumberForLabel (arg1, 0, exact)  ; i != 0;
@@ -304,7 +304,7 @@ static IFSelect_ReturnStatus funcount
 //  Ajout : si Selection, on applique un GraphCounter
 //   Et en ce cas, on peut en avoir plusieurs : la limite est le mot-cle "on"
   Standard_Integer onflag = 0;
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 2; i < argc; i ++) {
     if (!strcmp (pilot->Arg(i),"on")) { onflag = i; break; }
   }
@@ -388,7 +388,7 @@ static IFSelect_ReturnStatus funsigncase
   Message_Messenger::StreamBuffer sout = Message::SendInfo();
   if (signcase.IsNull()) sout<<"Not a Signature : "<<arg1<<std::endl;
   else {
-    Standard_Boolean hasmin,hasmax;  Standard_Integer valmin,valmax;
+    Standard_Boolean hasmin = 0,hasmax = 0;  Standard_Integer valmin = 0,valmax = 0;
     if (signcase->IsIntCase(hasmin,valmin,hasmax,valmax)) {
       sout<<"Signature "<<arg1<<" : Integer Case";
       if (hasmin) sout<<" - Mini:"<<valmin;
@@ -398,7 +398,7 @@ static IFSelect_ReturnStatus funsigncase
     Handle(TColStd_HSequenceOfAsciiString) caselist = signcase->CaseList();
     if (caselist.IsNull()) sout<<"Signature "<<arg1<<" : no predefined case, see command  count "<<arg1<<std::endl;
     else {
-      Standard_Integer i, nb = caselist->Length();
+      Standard_Integer i = 0, nb = caselist->Length();
       sout<<"Signature "<<arg1<<" : "<<nb<<" basic cases :"<<std::endl;
       for (i = 1; i <= nb; i ++) sout<<"  "<<caselist->Value(i);
       sout<<std::endl;
@@ -415,7 +415,7 @@ static IFSelect_ReturnStatus fun10
   Standard_Integer argc = pilot->NbWords();
   const Standard_CString arg1 = pilot->Arg(1);
 //        ****    Entity Status          ****
-  Standard_Integer i,nb;
+  Standard_Integer i = 0,nb = 0;
   Message_Messenger::StreamBuffer sout = Message::SendInfo();
   if (argc < 2) {
     nb = Interface_Category::NbCategories();
@@ -479,7 +479,7 @@ static IFSelect_ReturnStatus fundumpent
   Handle(IFSelect_WorkSession) WS = pilot->Session();
   Standard_Integer argc = pilot->NbWords();
   Handle(IFSelect_WorkLibrary) WL = WS->WorkLibrary();
-  Standard_Integer levdef=0,levmax=10,level;
+  Standard_Integer levdef=0,levmax=10,level = 0;
   WL->DumpLevels (levdef,levmax);
   Message_Messenger::StreamBuffer sout = Message::SendInfo();
   if (argc < 2 || (argc == 2 && levmax < 0)) {
@@ -788,7 +788,7 @@ static IFSelect_ReturnStatus fun24
     if (i < argc-1) label.AssignCat(" ");
   }
   for (int mode = 0; mode <= 2; mode ++) {
-    int nbitems = 0;  int id;
+    int nbitems = 0;  int id = 0;
     sout<<"Searching label : "<<label<<". in mode ";
     if (mode == 0) sout <<" exact" << std::endl;
     if (mode == 1) sout <<" same head" << std::endl;
@@ -849,7 +849,7 @@ static IFSelect_ReturnStatus fun27
   Message_Messenger::StreamBuffer sout = Message::SendInfo();
   if (argc < 2 || (argc == 3 && strcmp (arg1, "-p") == 0)) {
     Handle(TColStd_HSequenceOfHAsciiString) li = Interface_Static::Items();
-    Standard_Integer i,nb = li->Length(), aPatternNb = 0;
+    Standard_Integer i = 0,nb = li->Length(), aPatternNb = 0;
     size_t aPatternLen = strlen(arg2);
     if (argc == 3)
     {
@@ -913,7 +913,7 @@ static IFSelect_ReturnStatus fun29
   Message_Messenger::StreamBuffer sout = Message::SendInfo();
   if (list.IsNull())
     { sout<<"List of Sent Files not enabled"<<std::endl; return IFSelect_RetVoid; }
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   sout<<"  Sent Files : "<<nb<<" : "<<std::endl;
   for (i = 1; i <= nb; i ++)
     sout<<list->Value(i)->ToCString()<<std::endl; 
@@ -1085,7 +1085,7 @@ static IFSelect_ReturnStatus fun38
 //        ****    SetModelContent    ****
   Message_Messenger::StreamBuffer sout = Message::SendInfo();
   if (argc < 3) { sout<<"Donner nom selection et mode (k=keep,r=remove)"<<std::endl;  return IFSelect_RetError; }
-  Standard_Boolean keepmode;
+  Standard_Boolean keepmode = 0;
   DeclareAndCast(IFSelect_Selection,sel,WS->NamedItem(arg1));
   if (sel.IsNull())
     { sout<<"Pas de Selection de Nom : "<<arg1<<std::endl; return IFSelect_RetError; }
@@ -1219,7 +1219,7 @@ static IFSelect_ReturnStatus fun45
 //        ****    ModifMove         ****
   Message_Messenger::StreamBuffer sout = Message::SendInfo();
   if (argc < 4) { sout<<"modifmove MF rang1 rang2, M pour Model F pour File"<<std::endl; return IFSelect_RetError; }
-  Standard_Boolean formodel;
+  Standard_Boolean formodel = 0;
   if      (arg1[0] == 'm' || arg1[0] == 'M') formodel = Standard_True;
   else if (arg1[0] == 'f' || arg1[0] == 'F') formodel = Standard_False;
   else { sout<<"preciser M pour Model, F pour File"<<std::endl; return IFSelect_RetError; }
@@ -1370,7 +1370,7 @@ static IFSelect_ReturnStatus fun58
                    <<"See also : evaladisp  writedisp  xsplit"<<std::endl;
                  return IFSelect_RetVoid;  }
   Standard_Boolean OK = Standard_True;
-  Standard_Integer i , mode = atoi(arg1);  sout<<" Mode "<<mode<<"\n";
+  Standard_Integer i = 0 , mode = atoi(arg1);  sout<<" Mode "<<mode<<"\n";
   for (i = 2; i < argc; i ++) {
     DeclareAndCast(IFSelect_Dispatch,disp,WS->NamedItem(pilot->Arg(i)));
     if (disp.IsNull())
@@ -2136,7 +2136,7 @@ static IFSelect_ReturnStatus fun_editvalue
     listr = edf->EditedList(num);
     if (listr.IsNull()) sout<<"(NULL LIST)"<<std::endl;
     else {
-      Standard_Integer ilist,nblist = listr->Length();
+      Standard_Integer ilist = 0,nblist = listr->Length();
       sout<<"(List : "<<nblist<<" Items)"<<std::endl;
       for (ilist = 1; ilist <= nblist; ilist ++) {
        str = listr->Value(ilist);
index 5e2e5de29f6c89870fca57c33ea4cdb85670e356..6a65214935c4d89131dba43278574e2f151a8a79 100644 (file)
@@ -21,7 +21,7 @@
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_GeneralModifier,Standard_Transient)
 
 IFSelect_GeneralModifier::IFSelect_GeneralModifier
-  (const Standard_Boolean maychangegraph)    {  thechgr = maychangegraph;  }
+  (const Standard_Boolean maychangegraph) : thechgr(maychangegraph)    {   }
 
     Standard_Boolean  IFSelect_GeneralModifier::MayChangeGraph () const
       {  return thechgr;  }
index 36a73006214d3d7c38331b50ba1b9e4aa0b9629a..16ad36108a7925efe614192deca42b7ed08e80bf 100644 (file)
@@ -39,7 +39,7 @@ IFSelect_GraphCounter::IFSelect_GraphCounter
 {
   if (theapplied.IsNull())  {  AddList (list,graph.Model());  return;  }
   if (list.IsNull()) return;
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   for (i = 1; i <= nb; i ++) {
     char val[12];
     Handle(Standard_Transient) ent = list->Value(i);
index 67d13bb7c8a5d9456887d6ea8ec29ee507a92a0d..df4b302b3cd4e3804bd3cf548a38e31c33a9012b 100644 (file)
@@ -18,8 +18,8 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_IntParam,Standard_Transient)
 
-IFSelect_IntParam::IFSelect_IntParam ()
-      {  theval = 0;  }
+IFSelect_IntParam::IFSelect_IntParam () : theval(0)
+      {   }
 
     void  IFSelect_IntParam::SetStaticName (const Standard_CString statname)
       {  thestn.Clear();  thestn.AssignCat (statname);  }
index d0ee3cb389198ab8569541e2b54bcac9eac2c88b..be3803b79ae9f7547e31a8f103b27b5b82598bdf 100644 (file)
@@ -46,7 +46,7 @@ void  IFSelect_ListEditor::ClearEdit ()
   theedit = new TColStd_HSequenceOfHAsciiString();
   thestat = new TColStd_HSequenceOfInteger();
   if (theorig.IsNull()) return;
-  Standard_Integer i,nb = theorig->Length();
+  Standard_Integer i = 0,nb = theorig->Length();
   for (i = 1; i <= nb; i ++) {
     theedit->Append (theorig->Value(i));
     thestat->Append (0);
@@ -78,7 +78,7 @@ Standard_Boolean  IFSelect_ListEditor::LoadEdited
   (const Handle(TColStd_HSequenceOfHAsciiString)& list)
 {
   if (list.IsNull()) return Standard_False;
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   if (nb > themax) return Standard_False;
 
 //   check values
index 79ddb58d50fb557213028455ecbd7a1aaab2ea24..fac1edfab44a5aa3b907857fa19ef4ee3225127f 100644 (file)
@@ -141,7 +141,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
     Handle(Interface_InterfaceModel) model;
     TCollection_AsciiString filename = eval.FileName();
     Standard_Integer dispnum = eval.DispatchRank();
-    Standard_Integer numod, nbmod;
+    Standard_Integer numod = 0, nbmod = 0;
     eval.PacketsInDispatch (numod,nbmod);
     Handle(IFSelect_AppliedModifiers) curapp;
     CopiedModel (G, WL,protocol, eval.PacketRoot(), filename,dispnum,numod, TC,
@@ -220,7 +220,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
     Handle(Interface_InterfaceModel) model;
     TCollection_AsciiString filename = eval.FileName();
     Standard_Integer dispnum = eval.DispatchRank();
-    Standard_Integer numod, nbmod;
+    Standard_Integer numod = 0, nbmod = 0;
     eval.PacketsInDispatch (numod,nbmod);
     Handle(IFSelect_AppliedModifiers) curapp;
     CopiedModel (G, WL,protocol, eval.PacketRoot(), filename,dispnum,numod, TC,
@@ -259,11 +259,11 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
   Interface_CheckIterator checks;
   checks.SetName ("X-STEP WorkSession : Send All");
   Message::SendInfo() << "** WorkSession : Sending all data"<<std::endl;
-  Handle(Interface_InterfaceModel)  model = G.Model();
+  const Handle(Interface_InterfaceModel)&  model = G.Model();
   if (model.IsNull() || protocol.IsNull() || WL.IsNull()) return checks;
 
   Interface_CopyTool TC (model, protocol);
-  Standard_Integer i, nb = model->NbEntities();
+  Standard_Integer i = 0, nb = model->NbEntities();
   for (i = 1; i <= nb; i ++)  TC.Bind (model->Value(i),model->Value(i));
 
   Interface_EntityIterator pipo;
@@ -298,7 +298,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
   Interface_CheckIterator checks;
   checks.SetName ("X-STEP WorkSession : Send Selected");
   Message::SendInfo() << "** WorkSession : Sending selected data"<<std::endl;
-  Handle(Interface_InterfaceModel)  original = G.Model();
+  const Handle(Interface_InterfaceModel)&  original = G.Model();
   if (original.IsNull() || protocol.IsNull() || WL.IsNull()) return checks;
   Handle(Interface_InterfaceModel) newmod  = original->NewEmptyModel();
   Interface_CopyTool TC (original, protocol);
@@ -309,7 +309,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
   for (list.Start(); list.More(); list.Next()) {
     newmod->AddWithRefs (list.Value(),lib);
   }
-  Standard_Integer i, nb = newmod->NbEntities();
+  Standard_Integer i = 0, nb = newmod->NbEntities();
   for (i = 1; i <= nb; i ++)  TC.Bind (newmod->Value(i),newmod->Value(i));
   if (theremain.IsNull())
     { theremain = new TColStd_HArray1OfInteger(0,G.Size()); theremain->Init(0); }
@@ -361,7 +361,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
 //                             et aussi : pas de Dispatch (envoi en bloc)
 
   applied.Nullify();
-  Handle(Interface_InterfaceModel) original = G.Model();
+  const Handle(Interface_InterfaceModel)& original = G.Model();
   if (dispnum > 0) {
     newmod  = original->NewEmptyModel();
     TC.Clear();
@@ -380,7 +380,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
 //  ...  Ensuite : On prend en compte les Model Modifiers  ...
   Standard_Integer nbmod = 0;
   if (!theshareout.IsNull()) nbmod = theshareout->NbModifiers(Standard_True);
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 1; i <= nbmod; i ++) {
     Handle(IFSelect_Modifier) unmod = theshareout->ModelModifier(i);
 
@@ -441,7 +441,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier ()    {  }
   (const Interface_Graph& G, const Handle(IFSelect_WorkLibrary)& WL,
    Interface_CopyTool& TC,   Handle(Interface_InterfaceModel)& newmod)
 {
-  Handle(Interface_InterfaceModel) original = G.Model();
+  const Handle(Interface_InterfaceModel)& original = G.Model();
 //  Interface_CopyTool TC(original,protocol);
   newmod  = original->NewEmptyModel();
   TC.Clear();
index 8a731b33bbb091a9038c5d34d938cbd3c8e9eb27..07c51b46b76c696d755bb35f3b8fa09c356dd6bf 100644 (file)
@@ -25,7 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_ModifEditForm,IFSelect_Modifier)
 
 IFSelect_ModifEditForm::IFSelect_ModifEditForm
   (const Handle(IFSelect_EditForm)& editform)
-    : IFSelect_Modifier (Standard_False)    {  theedit = editform;  }
+    : IFSelect_Modifier (Standard_False), theedit(editform)    {   }
 
     Handle(IFSelect_EditForm)  IFSelect_ModifEditForm::EditForm () const
       {  return theedit;  }
index 76f675e7ea8844a24cbfcf02c52c38a5d8e9a09d..416ad34529d8130095c872b6819d93e923214826 100644 (file)
@@ -25,7 +25,7 @@
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_ModifReorder,IFSelect_Modifier)
 
 IFSelect_ModifReorder::IFSelect_ModifReorder (const Standard_Boolean rootlast)
-    : IFSelect_Modifier (Standard_True)    {  thertl = rootlast;  }
+    : IFSelect_Modifier (Standard_True), thertl(rootlast)    {   }
 
     void  IFSelect_ModifReorder::Perform (IFSelect_ContextModif& ctx, 
                                           const Handle(Interface_InterfaceModel)& target,
index 64a974412c0a8275ef157a12ad93180959e9a02c..5cb0fa3b4b404677aa2774de700be1e1f806fabe 100644 (file)
@@ -27,12 +27,12 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_PacketList,Standard_Transient)
 
 IFSelect_PacketList::IFSelect_PacketList
   (const Handle(Interface_InterfaceModel)& model)
-    : thedupls (0,model->NbEntities()) , 
+    : themodel(model), thedupls (0,model->NbEntities()) , 
       thepacks (100) ,
       theflags (0,model->NbEntities()) ,
-      thename  ("Packets")
+      thelast(0), thebegin(Standard_False), thename  ("Packets")
 {
-  themodel = model;  thelast = 0;  thebegin = Standard_False;  // begin-begin
+     // begin-begin
   thedupls.Init(0);  theflags.Init(0);
 }
 
@@ -76,7 +76,7 @@ IFSelect_PacketList::IFSelect_PacketList
   (const Handle(TColStd_HSequenceOfTransient)& list)
 {
   if (list.IsNull()) return;
-  Standard_Integer i , nb = list->Length();
+  Standard_Integer i = 0 , nb = list->Length();
   thepacks.Reservate (nb+1);
   for (i = 1; i <= nb; i ++) Add (list->Value(i));
 }
@@ -99,7 +99,7 @@ IFSelect_PacketList::IFSelect_PacketList
   Interface_EntityIterator list;
   if (numpack <= 0 || numpack > NbPackets()) return list;
   Interface_IntList lisi(thepacks,Standard_False);  lisi.SetNumber (numpack);
-  Standard_Integer i , nb = lisi.Length();
+  Standard_Integer i = 0 , nb = lisi.Length();
   for (i = 1; i <= nb; i ++)
     list.AddItem(themodel->Value(lisi.Value(i)));
   return list;
@@ -107,7 +107,7 @@ IFSelect_PacketList::IFSelect_PacketList
 
     Standard_Integer  IFSelect_PacketList::HighestDuplicationCount () const
 {
-  Standard_Integer i , nb = themodel->NbEntities();
+  Standard_Integer i = 0 , nb = themodel->NbEntities();
   Standard_Integer high = 0;
   for (i = 1; i <= nb; i ++) {
     Standard_Integer j = thedupls.Value(i);
@@ -119,7 +119,7 @@ IFSelect_PacketList::IFSelect_PacketList
     Standard_Integer  IFSelect_PacketList::NbDuplicated
   (const Standard_Integer newcount, const Standard_Boolean andmore) const
 {
-  Standard_Integer i, nb = themodel->NbEntities();
+  Standard_Integer i = 0, nb = themodel->NbEntities();
   Standard_Integer nbdu = 0;
 
   for (i = 1; i <= nb; i ++) {
@@ -135,7 +135,7 @@ IFSelect_PacketList::IFSelect_PacketList
   Standard_Integer nb = themodel->NbEntities();
   Interface_EntityIterator list;
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= nb; i ++) {
     Standard_Integer j = thedupls.Value(i);
     if (j == newcount || (j > newcount && andmore)) list.AddItem(themodel->Value(i));
index 3380692fb02382a6ea0d72bdf18a3b92e9ce90db..ae04331f1a7bd31bf64cc30ff8e2dd896c4a4c4b 100644 (file)
@@ -68,7 +68,7 @@ Standard_Boolean  IFSelect_ParamEditor::Load
    const Handle(Standard_Transient)& /*ent*/,
    const Handle(Interface_InterfaceModel)& /*model*/) const
 {
-  Standard_Integer i, nb = NbValues();
+  Standard_Integer i = 0, nb = NbValues();
   for (i = 1; i <= nb; i ++) form->LoadValue (i,TypedValue(i)->HStringValue());
 
   return Standard_True;
@@ -80,7 +80,7 @@ Standard_Boolean  IFSelect_ParamEditor::Apply
    const Handle(Standard_Transient)& /*ent*/,
    const Handle(Interface_InterfaceModel)& /*model*/) const
 {
-  Standard_Integer i, nb = NbValues();
+  Standard_Integer i = 0, nb = NbValues();
   for (i = 1; i <= nb; i ++)
     if (form->IsModified(i))
       TypedValue (i)->SetHStringValue (form->EditedValue(i));
@@ -94,7 +94,7 @@ Handle(IFSelect_ParamEditor)  IFSelect_ParamEditor::StaticEditor
 {
   Handle(IFSelect_ParamEditor) editor;
   if (list.IsNull()) return editor;
-  Standard_Integer i,nb = list->Length();
+  Standard_Integer i = 0,nb = list->Length();
 //  if (nb == 0) return editor;
   editor = new IFSelect_ParamEditor (nb+10,label);
   for (i = 1; i <= nb; i ++) {
index c9686867dddcf02701053d5a74fdf4a8fce025a6..8e5f9a5e6f0dbf98d3b37f6121bfe17907a1975a 100644 (file)
@@ -80,7 +80,7 @@ void  IFSelect_SelectAnyList::SetRange
   Standard_Integer rankmax = NbItems(ent);
   Standard_Integer rankfrom = 1;
   if (!thelower.IsNull()) rankfrom = thelower->Value();
-  Standard_Integer rankto;
+  Standard_Integer rankto = 0;
   if (!theupper.IsNull()) rankto   = theupper->Value();
   else rankto = rankmax;
   if (rankfrom < 1) rankfrom = 1;
index f72253bfd23a7e10d0de0d253786845e7c152d19..5b6ef77b5320dc9a4016084a6f2cdd9a9ec49bc3 100644 (file)
@@ -34,7 +34,7 @@ IFSelect_SelectCombine::IFSelect_SelectCombine ()    {  }
   (const Handle(IFSelect_Selection)& sel) const 
 {
   if (sel.IsNull()) return 0;
-  Standard_Integer i, nb = thelist.Length();
+  Standard_Integer i = 0, nb = thelist.Length();
   for (i = 1; i <= nb; i ++)
     if (sel == thelist.Value(i)) return i;
   return 0;
index 477780bdbd3630f78f7deda16cf3c558b2be9266..8b8c2c875d63496ddd6440665249efb5a0f39e4d 100644 (file)
@@ -50,7 +50,7 @@ IFSelect_SelectExplore::IFSelect_SelectExplore (const Standard_Integer level)
   TColStd_IndexedMapOfTransient entrees (nb);
   TColStd_IndexedMapOfTransient result  (nb);
 //  Initialisation
-  Standard_Integer i, j, level = 1, ilev = 0;
+  Standard_Integer i = 0, j = 0, level = 1, ilev = 0;
   Interface_EntityIterator input; input = InputResult(G);
   for (input.Start(); input.More(); input.Next())
     i = entrees.Add (input.Value());
index 2985948be738bf40da89db112611f3ebfc76fa6f..bed75475b29ff6266b3a692e19eb2d65ab85ecb5 100644 (file)
@@ -22,8 +22,8 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectExtract,IFSelect_SelectDeduct)
 
-IFSelect_SelectExtract::IFSelect_SelectExtract ()
-      {  thesort = Standard_True;  }
+IFSelect_SelectExtract::IFSelect_SelectExtract () : thesort(Standard_True)
+      {   }
 
     Standard_Boolean  IFSelect_SelectExtract::IsDirect () const 
       {  return thesort;  }
@@ -37,10 +37,9 @@ IFSelect_SelectExtract::IFSelect_SelectExtract ()
 {
   Interface_EntityIterator iter;
   Interface_EntityIterator inputer = InputResult(G);  // tient compte de tout
-  Handle(Interface_InterfaceModel) model = G.Model();
-  Standard_Integer rank = 0;
+   Standard_Integer rank = 0;
   for (inputer.Start(); inputer.More(); inputer.Next()) {
-    Handle(Standard_Transient) ent = inputer.Value();
+    const Handle(Standard_Transient)& ent = inputer.Value();
     rank ++;
     if (SortInGraph(rank,ent,G) == thesort) iter.GetOneItem(ent);
   }
index 7524af418a50df926342a2c660bb7e09ba23c3a0..31d4b4d3fcfdd0874a3d07e7fbd982fa11c0a8a4 100644 (file)
@@ -48,7 +48,7 @@ IFSelect_SelectPointed::IFSelect_SelectPointed ()
   theitems.Clear();
   theset = Standard_True;
   if (list.IsNull()) return;
-  Standard_Integer i,nb = list->Length();
+  Standard_Integer i = 0,nb = list->Length();
   for (i = 1; i <= nb; i ++)  theitems.Append (list->Value(i));
 }
 
@@ -92,7 +92,7 @@ IFSelect_SelectPointed::IFSelect_SelectPointed ()
 //   Optimise avec une Map
   Standard_Boolean res = Standard_False;
   if (list.IsNull()) return res;
-  Standard_Integer i, nb = theitems.Length(), nl = list->Length();
+  Standard_Integer i = 0, nb = theitems.Length(), nl = list->Length();
   TColStd_MapOfTransient deja (nb+nl+1);
   for (i = 1; i <= nb; i ++) deja.Add (theitems.Value(i));
 
@@ -108,7 +108,7 @@ IFSelect_SelectPointed::IFSelect_SelectPointed ()
 {
   Standard_Boolean res = Standard_False;
   if (list.IsNull()) return res;
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   for (i = 1; i <= nb; i ++) res |= Remove (list->Value(i));
   return res;
 }
@@ -118,7 +118,7 @@ IFSelect_SelectPointed::IFSelect_SelectPointed ()
 {
   Standard_Boolean res = Standard_True;
   if (list.IsNull()) return res;
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   for (i = 1; i <= nb; i ++) res |= Toggle (list->Value(i));
   return res;
 }
index 368a82bf0c6c4a9e16bdd5e8e672ebf1f5384e6a..8b59c52a20eb1e2cb562021df06c20a0496ff191 100644 (file)
@@ -55,7 +55,7 @@ IFSelect_SelectRootComps::IFSelect_SelectRootComps ()    {  }
 //  A present, on retient, parmi les inputs, celles comptees une seule fois
 //  (N.B.: on prend inp1, qui donne UNE entite par composant, simple ou cycle)
   for (inp1.Start(); inp1.More(); inp1.Next()) {
-    Handle(Standard_Transient) ent = inp1.Value();
+    const Handle(Standard_Transient)& ent = inp1.Value();
     if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
   }
   return iter;
index a60c4e66538fe48c309553499af09c87b26ce462..32e517b43790f88313a030cf68118d63da7093a3 100644 (file)
@@ -38,12 +38,12 @@ IFSelect_SelectRoots::IFSelect_SelectRoots ()    {  }
 //  On note dans le graphe : le cumul de chaque ensemble (Entite + Shared tous
 //  niveaux). Les Roots initiales comptees une seule fois sont bonnes
   for (input.Start(); input.More(); input.Next()) {
-    Handle(Standard_Transient) ent = input.Value();
+    const Handle(Standard_Transient)& ent = input.Value();
     GC.GetFromEntity(ent);
   }
 //  A present, on retient, parmi les inputs, celles comptees une seule fois
   for (input.Start(); input.More(); input.Next()) {
-    Handle(Standard_Transient) ent = input.Value();
+    const Handle(Standard_Transient)& ent = input.Value();
     if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
   }
   return iter;
index e97dad4ee0263ee55ccffb7c1fd3c7b2950a9e81..6f8a739ed5a2ea087746c7e54cf187a04a398b2c 100644 (file)
@@ -24,8 +24,8 @@
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectSent,IFSelect_SelectExtract)
 
 IFSelect_SelectSent::IFSelect_SelectSent
-  (const Standard_Integer sentcount, const Standard_Boolean atleast)
-      {  thecnt = sentcount;  thelst = atleast;  }
+  (const Standard_Integer sentcount, const Standard_Boolean atleast) : thecnt(sentcount), thelst(atleast)
+      {    }
 
     Standard_Integer  IFSelect_SelectSent::SentCount () const
       {  return thecnt;  }
@@ -44,7 +44,7 @@ IFSelect_SelectSent::IFSelect_SelectSent
     Standard_Integer num = G.EntityNumber(inp.Value());
     if (num == 0) continue;
     Standard_Integer nb = G.Status(num);   // nb sent
-    Standard_Boolean ok;
+    Standard_Boolean ok = 0;
     if (thecnt == 0)  ok = (nb == 0);
     else if (thelst)  ok = (nb >= thecnt);
     else              ok = (nb == thecnt);
index c19bc5d3200f8b2e20cdeb24264a7ba4cb06032f..8af4238069e0590ce19df0f5151b300d52d58ea8 100644 (file)
@@ -32,7 +32,7 @@ static Standard_Integer multsign
    TColStd_SequenceOfAsciiString& signlist,
    TColStd_SequenceOfInteger&     signmode)
 {
-  Standard_Integer i, nb = signtext.Length(), mode = 0;
+  Standard_Integer i = 0, nb = signtext.Length(), mode = 0;
   for (i = 1; i <= nb; i ++) {
     char unsign = signtext.Value(i);
     if (unsign == '|' || unsign == '!' || unsign == '=') { mode = 1; break; }
@@ -96,9 +96,9 @@ static Standard_Integer multsign
   (const Standard_Integer , const Handle(Standard_Transient)& ent,
    const Interface_Graph& G) const
 {
-  Standard_Boolean res;
-  Standard_CString txt;
-  Handle(Interface_InterfaceModel) model = G.Model();
+  Standard_Boolean res = 0;
+  Standard_CString txt = nullptr;
+  const Handle(Interface_InterfaceModel)& model = G.Model();
   if (theexact <= 0) {
     if (!thematcher.IsNull()) return thematcher->Matches (ent,model,thesigntext, (theexact < 0));
     txt = thecounter->ComputedSign(ent,G);
@@ -121,7 +121,7 @@ static Standard_Integer multsign
     hmod = thesignmode.Value(i);
     jmod = hmod/8;
     imod = hmod - (jmod*8);
-    Standard_Boolean quid;
+    Standard_Boolean quid = 0;
     if (jmod == 0) {
       if (!thematcher.IsNull()) quid = thematcher->Matches (ent,model,signtext,(imod > 2));
       else quid = IFSelect_Signature::MatchValue
index 81a4e94ab37bde632753a5955277d4971ca47608..04d9bb112cfd756cd3ac352133a78d7191bc7fad 100644 (file)
@@ -64,7 +64,7 @@ IFSelect_SelectSuite::IFSelect_SelectSuite  ()    {  }
 //   Demarrage : on prend l Input/Alternate SI un des 2 est mis
 //   Sinon, on demarre sur la definition de base de la premiere selection
 
-  Standard_Integer i, nb = NbItems();
+  Standard_Integer i = 0, nb = NbItems();
   for (i = 1; i <= nb; i ++) {
     Handle(IFSelect_SelectDeduct) anitem = Item(i);
     if (firstin) anitem->Alternate()->SetList (iter.Content());
index 337bf7634a7b68e75219bf9075deafd54106edad..0207276b51dd7fae6152b7e458f3767681573125 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectType,IFSelect_SelectAnyType)
 
-IFSelect_SelectType::IFSelect_SelectType ()
-      {  thetype = STANDARD_TYPE(Standard_Transient);  }
+IFSelect_SelectType::IFSelect_SelectType () : thetype(STANDARD_TYPE(Standard_Transient))
+      {   }
 
-    IFSelect_SelectType::IFSelect_SelectType (const Handle(Standard_Type)& atype)
-      {  thetype = atype;  }
+    IFSelect_SelectType::IFSelect_SelectType (const Handle(Standard_Type)& atype) : thetype(atype)
+      {   }
 
     void  IFSelect_SelectType::SetType (const Handle(Standard_Type)& atype)
       {  thetype = atype;  }
index 0fcc5ef743367991b3efabb3d174b2f31ee84625..e777c9f371b57ab75076cf6753bd53ec5e858217 100644 (file)
@@ -46,7 +46,7 @@ Standard_Boolean  IFSelect_Selection::HasUniqueResult () const
 //  On peut utiliser le Graphe a present
   Interface_Graph GG(G);
   for (iter.Start(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     GG.GetFromEntity(ent,Standard_True);    // et voila
   }
   return Interface_GraphContent(GG); // EntityIterator specialise (meme taille)
index 50a2d93f58772358bb82f9791184d7f78ab92988..b5d9504b1958ec5ebec2f56b7a7a9c61df142895 100644 (file)
 #include <IFSelect_SelectionIterator.hxx>
 #include <Standard_NoSuchObject.hxx>
 
-IFSelect_SelectionIterator::IFSelect_SelectionIterator ()
+IFSelect_SelectionIterator::IFSelect_SelectionIterator () : thecurr(1), thelist(new IFSelect_HSeqOfSelection())
 {
-  thecurr = 1;
-  thelist = new IFSelect_HSeqOfSelection();
+  
+  
 }
 
     IFSelect_SelectionIterator::IFSelect_SelectionIterator
-  (const Handle(IFSelect_Selection)& sel)
+  (const Handle(IFSelect_Selection)& sel) : thecurr(1), thelist(new IFSelect_HSeqOfSelection())
 {
-  thecurr = 1;
-  thelist = new IFSelect_HSeqOfSelection();
+  
+  
   sel->FillIterator(*this);
 }
 
index 0f60292faf1ae5e9a57980272de6911baf384e26..2fb4d6f4bf2a0b8bc8ca68ca8c318bebbe9c801b 100644 (file)
@@ -39,10 +39,10 @@ static int deja = 0;
 
 
     IFSelect_SessionFile::IFSelect_SessionFile
-  (const Handle(IFSelect_WorkSession)& WS)
+  (const Handle(IFSelect_WorkSession)& WS) : themode(Standard_False)
 {
   ClearLines();
-  themode = Standard_False;
+  
   if (!deja) {    // au moins celui-la :
     Handle(IFSelect_BasicDumper) basedumper = new IFSelect_BasicDumper;
     deja = 1;
@@ -53,10 +53,10 @@ static int deja = 0;
 }
 
     IFSelect_SessionFile::IFSelect_SessionFile
-  (const Handle(IFSelect_WorkSession)& WS, const Standard_CString filename)
+  (const Handle(IFSelect_WorkSession)& WS, const Standard_CString filename) : themode(Standard_True)
 {
   ClearLines();
-  themode = Standard_True;
+  
   if (!deja) {    // au moins celui-la :
     Handle(IFSelect_BasicDumper) basedumper = new IFSelect_BasicDumper;
     deja = 1;
@@ -181,7 +181,7 @@ static int deja = 0;
   thenames.Clear();
   Standard_Integer nbidents = thesess->MaxIdent();
   thenums = new TColStd_HArray1OfInteger (0,nbidents); thenums->Init(0);
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for ( i = 1; i <= nbidents; i ++) {
     Handle(Standard_Transient) item = thesess->Item(i);
     if (!item.IsNull()) thenums->SetValue(i,-1);
@@ -195,13 +195,13 @@ static int deja = 0;
   sprintf (laligne,"ErrorHandle %d", (thesess->ErrorHandle() ? 1 : 0));
   WriteLine(laligne,'\n');
   Handle(TColStd_HSequenceOfInteger) idents;
-  Standard_Integer nb;
+  Standard_Integer nb = 0;
   Handle(TCollection_HAsciiString) name;
 
   idents = thesess->ItemIdents(STANDARD_TYPE(IFSelect_IntParam));
   nb = idents->Length();
   if (nb > 0) WriteLine ("!INTEGERS",'\n');
-  Standard_Integer j; // svv Jan11 2000 : porting on DEC
+  Standard_Integer j = 0; // svv Jan11 2000 : porting on DEC
   for (j = 1; j <= nb; j ++) {
     i = idents->Value(j);
     Handle(IFSelect_IntParam) P = thesess->IntParam(i);
@@ -866,7 +866,7 @@ static int deja = 0;
   Handle(Standard_Transient) res;
   Standard_Integer nm = num + thelastgen;
   if (nm <= 0 || nm > theline.Length()) return res;
-  Standard_Integer id;
+  Standard_Integer id = 0;
   TCollection_AsciiString name = theline.Value(nm);
   if (name.Value(1) == ':') name.Remove(1);
   if (name.IsEqual("$")) return res;    // item non-defini justement
index 930efc0859693abbd2641400f627f1762576b842..efe19fa4422d0bd2dea4d8d20e0ad42dbe99e69d 100644 (file)
@@ -270,7 +270,7 @@ protected:
   Handle(IFSelect_WorkSession) thesess;
   Handle(TColStd_HArray1OfInteger) thenums;
   NCollection_DataMap<TCollection_AsciiString, Standard_Integer> thenames;
-  Standard_Integer thenl;
+  Standard_Integer thenl{};
   TColStd_SequenceOfAsciiString theline;
 
 private:
@@ -280,8 +280,8 @@ private:
   TCollection_AsciiString thebuff;
   Standard_Integer thelastgen;
   Standard_Boolean thedone;
-  Standard_Boolean theownflag;
-  Standard_Integer thenewnum;
+  Standard_Boolean theownflag{};
+  Standard_Integer thenewnum{};
 
 };
 
index acf782e10e11603b395d7320810de70f5774e954..b50e19141f413ee7e65213a1eba9550de4bc18c6 100644 (file)
@@ -97,7 +97,7 @@ IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
   thecommand = command;
   if (thecommand.Value(lc) <= ' ')  {  thecommand.Remove(lc);  lc --;  }
   thenbwords = 0;
-  Standard_Integer i, nc = 0;
+  Standard_Integer i = 0, nc = 0;
   char unarg[MAXCARS];
   for (i = 1; i <= lc; i ++) {
     char val = command.Value(i);
@@ -189,7 +189,7 @@ IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
   (const Standard_Integer num)
 {
   if (num < 0 || num > thenbwords) return Standard_False;
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = num; i < thenbwords; i ++) {
     thewords(i).Clear();
     thewords(i).AssignCat(thewords(i+1).ToCString());
@@ -240,7 +240,7 @@ IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
     IFSelect_ReturnStatus  IFSelect_SessionPilot::ReadScript
   (const Standard_CString file)
 {
-  FILE* fic; int lefic = 0;
+  FILE* fic = nullptr; int lefic = 0;
   if (file != NULL && file[0] != '\0') {
     fic = OSD_OpenFile (file,"r");
     if (fic) lefic = 1;
@@ -288,7 +288,7 @@ IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
 //  Est-ce un nom ?
 
 //  Commande pour un Acteur
-  Handle(IFSelect_Activator) actor;  Standard_Integer num;
+  Handle(IFSelect_Activator) actor;  Standard_Integer num = 0;
   if (IFSelect_Activator::Select(thewords(0).ToCString(),num,actor)) {
     stat = actor->Do(num,this);
 //  Prise en compte des commandes a resultat
@@ -405,7 +405,7 @@ IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
 
        Standard_Integer nb = list->Length();
        for (Standard_Integer i = 1; i <= nb; i ++) {
-         Handle(IFSelect_Activator) actor;  Standard_Integer num;
+         Handle(IFSelect_Activator) actor;  Standard_Integer num = 0;
          if (IFSelect_Activator::Select
              (list->Value(i).ToCString(),num,actor)) {
            if (IFSelect_Activator::Mode (list->Value(i).ToCString()) == 1)
@@ -502,7 +502,7 @@ IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
        RemoveWord(0);  RemoveWord(0);
 
 //  Commande pour un Acteur
-       Handle(IFSelect_Activator) actor;  Standard_Integer num;
+       Handle(IFSelect_Activator) actor;  Standard_Integer num = 0;
        if (IFSelect_Activator::Select(thewords(0).ToCString(),num,actor)) {
          theobjrec.Nullify();
          stat = actor->Do(num,this);
index 34d4849a837a1d0b1bd21ebc1d0887867d2797ca..d65e989c7417db21d0c99ec27476bf8d0533da9c 100644 (file)
@@ -212,7 +212,7 @@ private:
   TColStd_Array1OfAsciiString thewords;
   TColStd_Array1OfInteger thewordeb;
   Standard_Boolean therecord;
-  Standard_Integer thenumrec;
+  Standard_Integer thenumrec{};
   Handle(Standard_Transient) theobjrec;
   TColStd_SequenceOfAsciiString thecomlist;
 
index 3b979ee5d8e2a22e48327c70c6bd544e67dcd826..c1c5983765ff80550923a493fff3dbbf8c759af4 100644 (file)
@@ -23,9 +23,9 @@
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_ShareOut,Standard_Transient)
 
-IFSelect_ShareOut::IFSelect_ShareOut ()
+IFSelect_ShareOut::IFSelect_ShareOut () : thedefrt(new TCollection_HAsciiString ("Default"))
 {
-  thedefrt  = new TCollection_HAsciiString ("Default");
+  
   thenbdefs = thelastrun = 0;
 }
 
@@ -166,7 +166,7 @@ IFSelect_ShareOut::IFSelect_ShareOut ()
     Standard_Integer  IFSelect_ShareOut::ModifierRank
   (const Handle(IFSelect_GeneralModifier)& modifier) const 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Boolean formodel = modifier->IsKind(STANDARD_TYPE(IFSelect_Modifier));
   if (formodel) {
     for (i = themodelmodifiers.Length(); i >= 1; i --)
@@ -200,7 +200,7 @@ IFSelect_ShareOut::IFSelect_ShareOut ()
   (const Standard_Boolean formodel,
    const Standard_Integer before,   const Standard_Integer after)
 {
-  Standard_Integer nb;
+  Standard_Integer nb = 0;
   if (before <= 0 || after <= 0) return Standard_False;
   if (before == after) return Standard_True;
   if (formodel) {
index e1159e3f1801f7a90bdcc86b74bbc257d1768cad..7737fbcaeaef25ed5a51b6c8bb330395f2d7a3c9 100644 (file)
 IFSelect_ShareOutResult::IFSelect_ShareOutResult
   (const Handle(IFSelect_ShareOut)& sho,
    const Handle(Interface_InterfaceModel)& amodel)
-      : thegraph(amodel) , thedispres(amodel,Standard_False)
+      : thegraph(amodel) , thedispres(amodel,Standard_False), theshareout(sho), theeval(Standard_False)
 {
-  theshareout = sho;
-  theeval     = Standard_False;
+  
+  
 //  thedisplist = new TColStd_SequenceOfInteger();
 }
 
     IFSelect_ShareOutResult::IFSelect_ShareOutResult
   (const Handle(IFSelect_ShareOut)& sho, const Interface_Graph& G)
-      : thegraph(G) , thedispres(G,Standard_False)
+      : thegraph(G) , thedispres(G,Standard_False), theshareout(sho), theeval(Standard_False)
 {
-  theshareout = sho;
-  theeval     = Standard_False;
+  
+  
 //  thedisplist = new TColStd_SequenceOfInteger();
 }
 
     IFSelect_ShareOutResult::IFSelect_ShareOutResult
   (const Handle(IFSelect_Dispatch)& disp,
    const Handle(Interface_InterfaceModel)& amodel)
-      : thegraph(amodel) , thedispres(amodel,Standard_False)
+      : thegraph(amodel) , thedispres(amodel,Standard_False), thedispatch(disp), theeval(Standard_False)
 {
-  thedispatch = disp;
-  theeval     = Standard_False;
+  
+  
 //  thedisplist = new TColStd_SequenceOfInteger();
 }
 
     IFSelect_ShareOutResult::IFSelect_ShareOutResult
   (const Handle(IFSelect_Dispatch)& disp, const Interface_Graph& G)
-      : thegraph(G) , thedispres(G,Standard_False)
+      : thegraph(G) , thedispres(G,Standard_False), thedispatch(disp), theeval(Standard_False)
 {
-  thedispatch = disp;
-  theeval     = Standard_False;
+  
+  
 //  thedisplist = new TColStd_SequenceOfInteger();
 }
 
@@ -108,7 +108,7 @@ IFSelect_ShareOutResult::IFSelect_ShareOutResult
     nb    = theshareout->NbDispatches();
     first = theshareout->LastRun() + 1;
   }
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = first; i <= nb; i ++) {
     if (!theshareout.IsNull()) disp = theshareout->Dispatch(i);
     if (disp->FinalSelection().IsNull()) continue;    // Dispatch neutralise
@@ -140,7 +140,7 @@ IFSelect_ShareOutResult::IFSelect_ShareOutResult
 {
   thedispres.Next();
   thepacknum ++;
-  Standard_Integer dispnum;
+  Standard_Integer dispnum = 0;
   if (thepacknum <= thedisplist.Length())
     dispnum = thedisplist.Value(thepacknum);
   else {
@@ -212,7 +212,7 @@ IFSelect_ShareOutResult::IFSelect_ShareOutResult
     TCollection_AsciiString IFSelect_ShareOutResult::FileName () const
 {
   Standard_Integer nd = DispatchRank();
-  Standard_Integer np,nbp;
+  Standard_Integer np = 0,nbp = 0;
   PacketsInDispatch(np,nbp);
   return  theshareout->FileName(nd,np,nbp);
 }
index 59c1efff44c3194b780b11e7b8b3eb6dfd00c9d3..600fbcc31bcf1078dab4a03425938b8422eea7d0 100644 (file)
@@ -155,10 +155,10 @@ private:
   Handle(IFSelect_ShareOut) theshareout;
   Handle(IFSelect_Dispatch) thedispatch;
   Standard_Boolean theeval;
-  Standard_Integer thedispnum;
-  Standard_Integer thepacknum;
-  Standard_Integer thepackdisp;
-  Standard_Integer thenbindisp;
+  Standard_Integer thedispnum{};
+  Standard_Integer thepacknum{};
+  Standard_Integer thepackdisp{};
+  Standard_Integer thenbindisp{};
   TColStd_SequenceOfInteger thedisplist;
 
 };
index c7d7988bb49f6ba07cc27e7ce3d9a7be992a6f12..e4971e4ac804676d54eb0aee551b5628b7fa28f4 100644 (file)
@@ -27,7 +27,7 @@ static Standard_CString nulsign = "";
     : IFSelect_Signature ("Category")
 {
   Interface_Category::Init();  // si pas deja fait
-  Standard_Integer i, nb = Interface_Category::NbCategories();
+  Standard_Integer i = 0, nb = Interface_Category::NbCategories();
   for (i = 1; i <= nb; i ++)  AddCase (Interface_Category::Name(i));
 }
 
index d0833fb65fdc7bdb5e5fcd3e1b2ee0250230f756..f55428e19a2f5fd6bb07a4608c89a0b846872d06 100644 (file)
@@ -26,17 +26,17 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SignCounter,IFSelect_SignatureList)
 
 IFSelect_SignCounter::IFSelect_SignCounter
   (const Standard_Boolean withmap, const Standard_Boolean withlist)
-    : IFSelect_SignatureList (withlist)
+    : IFSelect_SignatureList (withlist), themapstat(withmap)
 {
-  themapstat = withmap;  thenbcomp1 = thenbcomp2 = theselmode = 0;
+   thenbcomp1 = thenbcomp2 = theselmode = 0;
 }
 
     IFSelect_SignCounter::IFSelect_SignCounter
   (const Handle(IFSelect_Signature)& matcher,
    const Standard_Boolean withmap, const Standard_Boolean withlist)
-    : IFSelect_SignatureList (withlist) , thematcher (matcher)
+    : IFSelect_SignatureList (withlist) , themapstat(withmap), thematcher (matcher)
 {
-  themapstat = withmap;  thenbcomp1 = thenbcomp2 = theselmode = 0;
+   thenbcomp1 = thenbcomp2 = theselmode = 0;
   TCollection_AsciiString sign = thematcher->Name();
   SetName (sign.ToCString());
 }
index 3b5c691eb44891418d50fd170f126e7cdcfd8cbb..a7b881739693e68bdd99619f13151862edb43974 100644 (file)
@@ -39,7 +39,7 @@ static TCollection_AsciiString theval;    // temporaire pour construire Value
    const Handle(Interface_InterfaceModel)& model) const
 {
   theval.Clear();
-  Standard_Integer i, nb = thesubs.Length();
+  Standard_Integer i = 0, nb = thesubs.Length();
   for (i = 1; i <= nb; i ++) {
     Standard_Integer tabul = thetabs.Value(i);
     Standard_Boolean maxi  = (tabul < 0);
@@ -66,7 +66,7 @@ static TCollection_AsciiString theval;    // temporaire pour construire Value
    const TCollection_AsciiString& text, const Standard_Boolean exact) const
 {
   if (exact) return IFSelect_Signature::Matches (ent,model,text,exact);
-  Standard_Integer i, nb = thesubs.Length();
+  Standard_Integer i = 0, nb = thesubs.Length();
   for (i = 1; i <= nb; i ++) {
     Handle(IFSelect_Signature) sign =
       Handle(IFSelect_Signature)::DownCast(thesubs.Value(i));
index 29a846078f9cf7bb43540a83de9d6d6d9635bd06..2b4beddf5a5d2d70c37ba64ae61274e154531e79 100644 (file)
@@ -87,7 +87,7 @@ static char intval[20];
   if (exact) return text.IsEqual (val);
   // NB: no regexp
   char cardeb = text.Value(1);
-  Standard_Integer ln,lnt,i,j;
+  Standard_Integer ln = 0,lnt = 0,i = 0,j = 0;
   ln  = text.Length();
   lnt = (Standard_Integer)(strlen(val) - ln);
   for (i = 0; i <= lnt; i ++) {
index e99b7cbc7eb6e61e6f4058fea3d2446fbd639c5a..239cf5e305f607caf9c089ece0a58ad61e993c5d 100644 (file)
@@ -111,7 +111,7 @@ protected:
 private:
 
 
-  Standard_Integer thecasi[3];
+  Standard_Integer thecasi[3]{};
   Handle(TColStd_HSequenceOfAsciiString) thecasl;
 
 
index a56ab4a48f6d74898051a5b78b3bc9879dbfaf62..ca7b4ec2e07cc6c0a00b7830813ca05cfee00fd4 100644 (file)
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SignatureList,Standard_Transient)
 
 IFSelect_SignatureList::IFSelect_SignatureList
-  (const Standard_Boolean withlist)
+  (const Standard_Boolean withlist) : thesignonly(Standard_False), thelistat(withlist), thenbnuls(0)
 {
-  thesignonly = Standard_False;
-  thelistat = withlist;
-  thenbnuls = 0;
+  
+  
+  
   SetName("...");
 }
 
@@ -212,9 +212,9 @@ IFSelect_SignatureList::IFSelect_SignatureList
     nbtot += nbent;
     nbsign ++;
     if (nbent > maxent) maxent = nbent;
-    TCollection_AsciiString name = iter.Key();
+    const TCollection_AsciiString& name = iter.Key();
 //    if (!name.IsIntegerValue()) continue;  pas bien fiable
-    Standard_Integer ic, nc = name.Length();
+    Standard_Integer ic = 0, nc = name.Length();
     Standard_Boolean iaint = Standard_True;
     for (ic = 1; ic <= nc; ic ++) {
       char unc = name.Value(ic);
@@ -239,7 +239,7 @@ IFSelect_SignatureList::IFSelect_SignatureList
     S<<"    For Nb Entities  : "<<nbve<<std::endl;
     S<<"    Cumulated Values : "<<totval<<std::endl;
     S <<"    Maximum Value    : "<<maxval<<std::endl;
-    Standard_Integer avg1, avg2;
+    Standard_Integer avg1 = 0, avg2 = 0;
     avg1 = totval/nbve;
     avg2 = ((totval - (avg1*nbve)) * 10) / nbve;
     S <<"    Average Value    : "<<avg1<<" "<<avg2<<"/10"<<std::endl;
index ab4572d3294b1ec75e8e08354bff484312080f44..960382b48af1b3f0bc5ef736fff8078cc6c9e54d 100644 (file)
@@ -34,8 +34,8 @@
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_TransformStandard,IFSelect_Transformer)
 
-IFSelect_TransformStandard::IFSelect_TransformStandard ()
-      {  thecopy = Standard_True;  }
+IFSelect_TransformStandard::IFSelect_TransformStandard () : thecopy(Standard_True)
+      {   }
 
     void  IFSelect_TransformStandard::SetCopyOption
   (const Standard_Boolean option)
@@ -118,7 +118,7 @@ IFSelect_TransformStandard::IFSelect_TransformStandard ()
   (const Interface_Graph& G, Interface_CopyTool& TC,
    Handle(Interface_InterfaceModel)& newmod) const
 {
-  Handle(Interface_InterfaceModel) original = G.Model();
+  const Handle(Interface_InterfaceModel)& original = G.Model();
   newmod  = original->NewEmptyModel();
   TC.Clear();
   Standard_Integer nb = G.Size();
@@ -150,7 +150,7 @@ IFSelect_TransformStandard::IFSelect_TransformStandard ()
   Standard_Boolean res = Standard_True;
   Standard_Boolean chg = Standard_False;
   Standard_Integer nb = NbModifiers();
-  Handle(Interface_InterfaceModel) original = G.Model();
+  const Handle(Interface_InterfaceModel)& original = G.Model();
 
   for (Standard_Integer i = 1; i <= nb; i ++) {
     Handle(IFSelect_Modifier) unmod = Modifier(i);
index 7ed77b73cc91da1b8d0e4fa256fa04d3244bc42c..27336c1ecb5f5e8514b89bd6bac41941133134d5 100644 (file)
@@ -25,7 +25,7 @@
 IMPLEMENT_STANDARD_RTTIEXT(IFSelect_WorkLibrary,Standard_Transient)
 
 //  all deferred but Copy (virtual default)
-IFSelect_WorkLibrary::IFSelect_WorkLibrary ()  {  thelevdef = 0;  }
+IFSelect_WorkLibrary::IFSelect_WorkLibrary () : thelevdef(0)  {   }
 
     Standard_Boolean  IFSelect_WorkLibrary::CopyModel
   (const Handle(Interface_InterfaceModel)& /*original*/,
index 0de1d2a60f1ae0bd02aac72d723c0fe7d1942eb0..a5d7c62c774ac24d819ddacd3cdb079e354ca46d 100644 (file)
@@ -85,15 +85,15 @@ static TCollection_AsciiString bufstr;
 //purpose  : 
 //=======================================================================
 
-IFSelect_WorkSession::IFSelect_WorkSession ()
+IFSelect_WorkSession::IFSelect_WorkSession () : theerrhand(errhand = Standard_True), theshareout(new IFSelect_ShareOut), thegtool(new Interface_GTool), thecheckdone(Standard_False), thecopier(new IFSelect_ModelCopier), themodelstat(Standard_False)
 {
-  theshareout  = new IFSelect_ShareOut;
-  theerrhand   = errhand = Standard_True;
-  thecopier    = new IFSelect_ModelCopier;
+  
+  
+  
   thecopier->SetShareOut (theshareout);
-  thecheckdone = Standard_False;
-  thegtool     = new Interface_GTool;
-  themodelstat = Standard_False;
+  
+  
+  
 }
 
 //=======================================================================
@@ -295,7 +295,7 @@ Standard_Integer IFSelect_WorkSession::StartingNumber (const Handle(Standard_Tra
 Standard_Integer IFSelect_WorkSession::NumberFromLabel
   (const Standard_CString val, const Standard_Integer afternum) const
 {
-  Standard_Integer i, cnt = 0, num = atoi(val);
+  Standard_Integer i = 0, cnt = 0, num = atoi(val);
   if (num > 0 || myModel.IsNull()) return num;    // un n0 direct : gagne !
 //  Sinon, on considere que c est un label; a traiter en CaseNonSensitive ...
   if (num > myModel->NbEntities())  { num = 0; return num; }
@@ -336,7 +336,7 @@ Handle(TCollection_HAsciiString) IFSelect_WorkSession::EntityName (const Handle(
   if (myModel.IsNull() || ent.IsNull()) return 0;
   Interface_ShareTool sht(thegraph->Graph());
 
-  Standard_Integer CN;
+  Standard_Integer CN = 0;
   Handle(Interface_GeneralModule) module;
   if (!thegtool->Select (ent,module,CN)) return 0;
   return module->Name (CN,ent,sht);
@@ -403,7 +403,7 @@ void IFSelect_WorkSession::ClearData (const Standard_Integer mode)
       Handle(TColStd_HSequenceOfInteger) list =
        ItemIdents(STANDARD_TYPE(IFSelect_SelectPointed));
       Standard_Integer nb = list->Length();
-      Standard_Integer i; // svv #1 
+      Standard_Integer i = 0; // svv #1 
       for (i = 1; i <= nb; i ++) {
        DeclareAndCast(IFSelect_SelectPointed,sp,Item(list->Value(i)));
        if (!sp.IsNull()) sp->Clear();
@@ -452,7 +452,7 @@ Standard_Boolean  IFSelect_WorkSession::ComputeGraph
   Standard_Integer nb = myModel->NbEntities();
   if(themodelstat)
   {
-    Standard_Integer i; // svv #1
+    Standard_Integer i = 0; // svv #1
     for (i = 1; i <= nb; i ++) thegraph->CGraph().SetStatus(i,0);
     Interface_BitMap& bm = thegraph->CGraph().CBitMap();
     bm.AddFlag();
@@ -566,9 +566,9 @@ Standard_Boolean IFSelect_WorkSession::ComputeCheck
     //  Et on met a jour le Graphe (BitMap) !  Flag Incorrect (STX + SEM)
     Interface_BitMap& BM = CG.CBitMap();
     BM.Init (Standard_False,Flag_Incorrect);
-    Standard_Integer num, nb = CG.Size();
+    Standard_Integer num = 0, nb = CG.Size();
     for (checklist.Start(); checklist.More(); checklist.Next()) {
-      const Handle(Interface_Check) chk = checklist.Value();
+      const Handle(Interface_Check)& chk = checklist.Value();
       if (!chk->HasFailed()) continue;
       num = checklist.Number();
       if (num > 0 && num <= nb) BM.SetTrue (num,Flag_Incorrect);
@@ -1048,7 +1048,7 @@ Handle(TColStd_HSequenceOfHAsciiString) IFSelect_WorkSession::ItemNamesForLabel
 {
   Handle(TColStd_HSequenceOfHAsciiString) list =
     new TColStd_HSequenceOfHAsciiString();
-  Standard_Integer i,  nb = MaxIdent();
+  Standard_Integer i = 0,  nb = MaxIdent();
   for (i = 1; i <= nb; i ++) {
     Handle(TCollection_HAsciiString) lab = ItemLabel(i);
     Handle(Standard_Transient) item = Item(i);
@@ -1339,7 +1339,7 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::SelectionResultFromLi
 //   On va chercher la derniere deduction de la chaine des inputs
   Handle(IFSelect_Selection) ssel, newinput;
   ssel = sel;
-  Standard_Integer i, nb = MaxIdent();
+  Standard_Integer i = 0, nb = MaxIdent();
   for (i = 1; i <= nb * 2; i ++) {
     newinput  = deduct->Input();
     deduct = GetCasted(IFSelect_SelectDeduct,newinput);
@@ -1618,7 +1618,7 @@ void IFSelect_WorkSession::ClearFinalModifiers ()
 {
   Handle(TColStd_HSequenceOfInteger) list = FinalModifierIdents (Standard_True);
   Standard_Integer nb = list->Length();
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for (i = 1; i <= nb; i ++)
     RemoveItem(GeneralModifier(list->Value(i)));
   list = FinalModifierIdents (Standard_False);
@@ -1820,7 +1820,7 @@ Standard_Boolean IFSelect_WorkSession::SetModelContent
 
   Handle(Interface_InterfaceModel) newmod  = myModel->NewEmptyModel();
   Interface_CopyTool TC(myModel,theprotocol);
-  Standard_Integer i, nb = myModel->NbEntities();
+  Standard_Integer i = 0, nb = myModel->NbEntities();
   if (keep) {
     for (list.Start(); list.More(); list.Next())
       TC.TransferEntity (list.Value());
@@ -1988,7 +1988,7 @@ Standard_CString IFSelect_WorkSession::GiveFileComplete
 {
 //  ajouter si besoin : Prefix; Extension
   bufstr.Clear(); bufstr.AssignCat (file);
-  Standard_Integer i,j = 0,nb = bufstr.Length();
+  Standard_Integer i = 0,j = 0,nb = bufstr.Length();
   Handle(TCollection_HAsciiString) ext = FileExtension ();
   if (!ext.IsNull()) {
     char val0 = '\0';  if (ext->Length() > 0) val0 = ext->Value(1);
@@ -2173,7 +2173,7 @@ Standard_Boolean IFSelect_WorkSession::SendSplit ()
     */
 //  Decomposer
     if (theshareout.IsNull()) return Standard_False;
-    Standard_Integer i, nbd = theshareout->NbDispatches();
+    Standard_Integer i = 0, nbd = theshareout->NbDispatches();
     Standard_Integer nf = 0;
     Message_Messenger::StreamBuffer sout = Message::SendInfo();
     sout<<" SendSplit .. ";
@@ -2235,7 +2235,7 @@ Interface_EntityIterator IFSelect_WorkSession::SentList
   if (!IsLoaded()) return iter;
   const Interface_Graph& G = thegraph->Graph();
   Standard_Integer nb = G.Size();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for ( i = 1; i <= nb; i ++) {
     Standard_Integer stat = G.Status(i);
     if ( (stat > 0 && newcount < 0) || stat == newcount)
@@ -2256,7 +2256,7 @@ Standard_Integer IFSelect_WorkSession::MaxSendingCount () const
   if (!IsLoaded()) return newcount;
   const Interface_Graph& G = thegraph->Graph();
   Standard_Integer nb = G.Size();
-  Standard_Integer  i;
+  Standard_Integer  i = 0;
   for (i = 1; i <= nb; i ++) {
     Standard_Integer stat = G.Status(i);
     if (stat > newcount) newcount = stat;
@@ -2668,7 +2668,7 @@ static void IFSelect_QueryProp (Interface_IntList& list,
                                const Standard_Integer num, const int quoi)
 {
   list.SetNumber(num);
-  Standard_Integer i, nb = list.Length();
+  Standard_Integer i = 0, nb = list.Length();
   for (i = 1; i <= nb; i ++) {
     if (i > 1) list.SetNumber(num);  // because recursive call + depth first
     Standard_Integer n = list.Value(i);
@@ -2703,11 +2703,11 @@ static void IFSelect_QueryProp (Interface_IntList& list,
 void IFSelect_WorkSession::QueryCheckList (const Interface_CheckIterator& chl)
 {
   if (!IsLoaded()) return;
-  Standard_Integer i,nb = myModel->NbEntities();
+  Standard_Integer i = 0,nb = myModel->NbEntities();
   thecheckana = TCollection_AsciiString (nb+1,' ');
   for (chl.Start(); chl.More(); chl.Next()) {
     Standard_Integer num = chl.Number();
-    const Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->HasFailed())        thecheckana.SetValue(num,'2');
     else if (ach->HasWarnings()) thecheckana.SetValue(num,'1');
   }
@@ -2779,7 +2779,7 @@ Standard_Integer IFSelect_WorkSession::QueryParent
   Handle(TColStd_HSequenceOfTransient) list =
     thegraph->Graph().Sharings(entson).Content();
   if (list.IsNull()) return -1;
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   for (i = 1; i <= nb; i ++) {
     if (list->Value(i) == entdad) return 1;
     Standard_Integer stat = QueryParent ( entdad,list->Value(i) );
@@ -2803,7 +2803,7 @@ void IFSelect_WorkSession::SetParams
   (const NCollection_Vector<Handle(Standard_Transient)>& params,
    const NCollection_Vector<Standard_Integer>&   uselist)
 {
-  Standard_Integer i, nbp = params.Length(), nbu = uselist.Length();
+  Standard_Integer i = 0, nbp = params.Length(), nbu = uselist.Length();
   Handle(IFSelect_ParamEditor) editor = new IFSelect_ParamEditor
     (nbp+nbu+50,"Parameter Editor");
   for (i = params.Lower(); i <= params.Upper(); i ++) {
@@ -3038,7 +3038,7 @@ void IFSelect_WorkSession::DumpSelection
   IFSelect_SelectionIterator iter; sel->FillIterator(iter);
   for (; iter.More(); iter.Next()) {
     nb ++; 
-    Handle(IFSelect_Selection) newsel = iter.Value();
+    const Handle(IFSelect_Selection)& newsel = iter.Value();
     sout<<" -- "<<newsel->Label()<<std::endl;
   }
   sout << " Nb Inputs:"<<nb<<std::endl;
@@ -3132,7 +3132,7 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveList
 //   Le modele : son contenu
   list = new TColStd_HSequenceOfTransient();
   if (obj == myModel) {
-    Standard_Integer i, nb = myModel->NbEntities();
+    Standard_Integer i = 0, nb = myModel->NbEntities();
     for (i = 1; i <= nb; i ++)  list->Append (myModel->Value(i));
   }
 
@@ -3181,12 +3181,12 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveListFromList
   (const Standard_CString selname, const Handle(Standard_Transient)& ent) const
 {
   Handle(TColStd_HSequenceOfTransient) list;
-  Standard_Integer num;
+  Standard_Integer num = 0;
 
 //   LISTE DEFINIE D OFFICE (en ce cas, la liste d entree est ignoree)
   if (selname[0] == '(') {
 //  liste d entites donnees a la queue leu leu : (ID,ID,ID...)
-    char entid[50];     Standard_Integer i,j = 0;
+    char entid[50];     Standard_Integer i = 0,j = 0;
     TColStd_MapOfInteger numap;
     list = new TColStd_HSequenceOfTransient();
     for (i = 1; selname[i] != '\0'; i ++) {
@@ -3257,7 +3257,7 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveListCombined
 
 //  mode < 0 l1-l2  = 0 l1&l2  > 0 l1|l2 (l1+l2)
   TColStd_MapOfTransient numap;
-  Standard_Integer i,n = l2->Length();
+  Standard_Integer i = 0,n = l2->Length();
   for (i = n; i > 0; i --)  {
     Handle(Standard_Transient) ent = l2->Value(i);
     if (ent.IsNull()) continue;
@@ -3429,7 +3429,7 @@ void IFSelect_WorkSession::TraceDumpEntity
 void IFSelect_WorkSession::PrintEntityStatus
   (const Handle(Standard_Transient)& ent, Standard_OStream& S)
 {
-  Standard_Integer i,nb;
+  Standard_Integer i = 0,nb = 0;
   Standard_Integer num = StartingNumber(ent);
   if (num == 0)  {  std::cout<<" --  PrintEntityStatus : unknown"<<std::endl;  return;  }
 
@@ -3481,7 +3481,7 @@ void IFSelect_WorkSession::PrintCheckList (Standard_OStream& S,
 //  mode : 0  comptage   1 n0s entites   2 n0s+id ents
   if (mode == IFSelect_ItemsByEntity) checklist.Print (S,myModel,failsonly);
   else {
-    Interface_CheckIterator chks = checklist;
+    const Interface_CheckIterator& chks = checklist;
     Handle(IFSelect_CheckCounter) counter =
       new IFSelect_CheckCounter (mode>1 && mode != IFSelect_CountSummary);
     counter->Analyse (chks,myModel,Standard_True,failsonly);
@@ -3608,7 +3608,7 @@ void IFSelect_WorkSession::EvaluateDispatch
     Standard_Integer max = evres->HighestDuplicationCount();
     if (max < 2) sout<<" :   There are none"<<std::endl;
     else {
-      Standard_Integer newcount;
+      Standard_Integer newcount = 0;
       sout<<std::endl;
       for (newcount = 2; newcount <= max; newcount ++) {
        if (evres->NbDuplicated(newcount,Standard_False) == 0) continue;
@@ -3682,7 +3682,7 @@ void IFSelect_WorkSession::EvaluateComplete
     Standard_Integer max = evres->HighestDuplicationCount();
     if (max < 2) sout<<" :   There are none"<<std::endl;
     else {
-      Standard_Integer newcount;
+      Standard_Integer newcount = 0;
       sout<<std::endl;
       for (newcount = 2; newcount <= max; newcount ++) {
        if (evres->NbDuplicated(newcount,Standard_False) == 0) continue;
@@ -3722,7 +3722,7 @@ void IFSelect_WorkSession::ListEntities
       if (!titre && mode == 0) sout<<"  Keys : R Root   ? Unknown   * Unloaded"<<std::endl;
       if (!titre && mode == 2) sout<<"(";
       titre = 1;
-      Handle(Standard_Transient) ent = iter.Value();
+      const Handle(Standard_Transient)& ent = iter.Value();
       Standard_Integer num = myModel->Number(ent);
       if (mode == 1) {
     // n0 id (root?) category validity tracetype
index 99b84acebda1952d1d696cc38e2f2273e0c31269..443d50e5002cb0f8c824447e37cc4ec9e67ea866 100644 (file)
@@ -889,7 +889,7 @@ bool Image_AlienPixMap::savePPM (const TCollection_AsciiString& theFileName) con
   fprintf (aFile, "# Image stored by OpenCASCADE framework in linear RGB colorspace\n");
 
   // Write pixel data
-  Standard_Byte aByte;
+  Standard_Byte aByte = 0;
   for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow)
   {
     for (Standard_Size aCol = 0; aCol < SizeX(); ++aCol)
index 42c282c0c2d71e0b85b24f0b687a77f43344df93..0370e2e974cc23f6d061d0a4c1af03efef8d5c55 100644 (file)
@@ -138,7 +138,7 @@ protected:
   SwsContext*      myScaleCtx;    //!< scale context for conversion from RGBA to YUV
 
   Image_PixMap     myImgSrcRgba;  //!< input RGBA image
-  VideoRational    myFrameRate;   //!< video framerate
+  VideoRational    myFrameRate{};   //!< video framerate
   int64_t          myFrameCount;  //!< current frame index
 
 };
index 6959f546ea0b705d625c4b2658bee76d0ecc331b..30f2eaa006d4b98d6951127739269681967433d8 100644 (file)
@@ -37,6 +37,8 @@
 //--       pas etre mene a bien.  
 //----------------------------------------------------------------------
 
+#include <math.h>
+
 #include <algorithm>
 
 #include <ElSLib.hxx>
@@ -399,7 +401,7 @@ void IntAna_Curve::InternalUVValue(const Standard_Real theta,
 //=======================================================================
 gp_Pnt IntAna_Curve::Value(const Standard_Real theta)
 {
-  Standard_Real A, B, C, U, V, sint, cost, SigneSqrtDis;
+  Standard_Real A = NAN, B = NAN, C = NAN, U = NAN, V = NAN, sint = NAN, cost = NAN, SigneSqrtDis = NAN;
   //
   A=0.0;  B=0.0;   C=0.0;
   U=0.0;  V=0.0;  
@@ -418,7 +420,7 @@ Standard_Boolean IntAna_Curve::D1u(const Standard_Real theta,
                                    gp_Vec& Vec)
 {
   //-- Pour detecter le cas ou le calcul est impossible 
-  Standard_Real A, B, C, U, V, sint, cost, SigneSqrtDis;
+  Standard_Real A = NAN, B = NAN, C = NAN, U = NAN, V = NAN, sint = NAN, cost = NAN, SigneSqrtDis = NAN;
   A=0.0;  B=0.0;   C=0.0;
   U=0.0;  V=0.0;  
   sint=0.0;  cost=0.0;
@@ -467,14 +469,14 @@ void IntAna_Curve::FindParameter(const gp_Pnt& theP,
   {
     case GeomAbs_Cylinder:
     {
-      Standard_Real aZ;
+      Standard_Real aZ = NAN;
       ElSLib::CylinderParameters(Ax3, RCyl, theP, aTheta, aZ);
     }
     break;
 
     case GeomAbs_Cone:
     {
-      Standard_Real aZ;
+      Standard_Real aZ = NAN;
       ElSLib::ConeParameters(Ax3, RCyl, Angle, theP, aTheta, aZ);
     }
     break;
@@ -526,7 +528,7 @@ void IntAna_Curve::FindParameter(const gp_Pnt& theP,
                     cost, sint, SigneSqrtDis);
     const gp_Pnt aP(InternalValue(U, V));
     
-    Standard_Real aSqTol;
+    Standard_Real aSqTol = NAN;
     if (aParams[i] == aTheta ||
         (TwoCurves && aParams[i] == DomainSup + DomainSup - aTheta))
       aSqTol = InternalPrecision;
index 6932f46c9ea4f7d0ad694a64f140bfcec6a15b27..eb4a7db6273dcd6346ef2198441e595d77b8df91 100644 (file)
@@ -68,8 +68,8 @@ private:
 
 
 
-  Standard_Boolean done;
-  Standard_Boolean empt;
+  Standard_Boolean done{};
+  Standard_Boolean empt{};
   gp_Pnt pnt;
 
 
index 2ea0d72085a66709b49565c50c37e8410ec5e1d7..f44db75adbc121cfb398a2644ea02c6ff1dff0e9 100644 (file)
@@ -23,6 +23,8 @@
 #define PERFORM void IntAna_IntConicQuad::Perform
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <gp_Circ.hxx>
 #include <gp_Circ2d.hxx>
@@ -47,11 +49,11 @@ static Standard_Real PIpPI = M_PI + M_PI;
 //=============================================================================
 //==                                          E m p t y   C o n s t r u c t o r
 //== 
-CREATE(void) {
-  done=Standard_False;
-  parallel = Standard_False;
-  inquadric = Standard_False;
-  nbpts = 0;
+CREATE(void) : done(Standard_False), parallel(Standard_False), inquadric(Standard_False), nbpts(0) {
+  
+  
+  
+  
   memset (paramonc, 0, sizeof (paramonc));
 }
 //=============================================================================
@@ -63,7 +65,7 @@ CREATE(const gp_Lin& L,const IntAna_Quadric& Quad) {
 
 PERFORM(const gp_Lin& L,const IntAna_Quadric& Quad) {
 
-  Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte;
+  Standard_Real Qxx = NAN,Qyy = NAN,Qzz = NAN,Qxy = NAN,Qxz = NAN,Qyz = NAN,Qx = NAN,Qy = NAN,Qz = NAN,QCte = NAN;
   done=inquadric=parallel=Standard_False;
 
   //----------------------------------------------------------------------
@@ -80,7 +82,7 @@ PERFORM(const gp_Lin& L,const IntAna_Quadric& Quad) {
   //----------------------------------------------------------------------
 
 
-  Standard_Real Lx0,Ly0,Lz0,Lx,Ly,Lz;
+  Standard_Real Lx0 = NAN,Ly0 = NAN,Lz0 = NAN,Lx = NAN,Ly = NAN,Lz = NAN;
 
 
   nbpts=0;
@@ -135,7 +137,7 @@ CREATE(const gp_Circ& C,const IntAna_Quadric& Quad) {
 
 PERFORM(const gp_Circ& C,const IntAna_Quadric& Quad) {
   
-  Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte;
+  Standard_Real Qxx = NAN,Qyy = NAN,Qzz = NAN,Qxy = NAN,Qxz = NAN,Qyz = NAN,Qx = NAN,Qy = NAN,Qz = NAN,QCte = NAN;
   
   //----------------------------------------------------------------------
   //-- Dans le repere liee a C.Position() : 
@@ -197,7 +199,7 @@ CREATE(const gp_Elips& E,const IntAna_Quadric& Quad) {
 
 PERFORM(const gp_Elips& E,const IntAna_Quadric& Quad) {
   
-  Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte;
+  Standard_Real Qxx = NAN,Qyy = NAN,Qzz = NAN,Qxy = NAN,Qxz = NAN,Qyz = NAN,Qx = NAN,Qy = NAN,Qz = NAN,QCte = NAN;
   
   done=inquadric=parallel=Standard_False;  
   
@@ -259,7 +261,7 @@ CREATE(const gp_Parab& P,const IntAna_Quadric& Quad) {
 
 PERFORM(const gp_Parab& P,const IntAna_Quadric& Quad) {
   
-  Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte;
+  Standard_Real Qxx = NAN,Qyy = NAN,Qzz = NAN,Qxy = NAN,Qxz = NAN,Qyz = NAN,Qx = NAN,Qy = NAN,Qz = NAN,QCte = NAN;
   
   done=inquadric=parallel=Standard_False;
 
@@ -315,7 +317,7 @@ CREATE(const gp_Hypr& H,const IntAna_Quadric& Quad) {
 
 PERFORM(const gp_Hypr& H,const IntAna_Quadric& Quad) {
   
-  Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte;
+  Standard_Real Qxx = NAN,Qyy = NAN,Qzz = NAN,Qxy = NAN,Qxz = NAN,Qyz = NAN,Qx = NAN,Qy = NAN,Qz = NAN,QCte = NAN;
 
   done=inquadric=parallel=Standard_False;  
 
@@ -420,9 +422,9 @@ void IntAna_IntConicQuad::Perform (const gp_Lin& L, const gp_Pln& P,
   
   done=Standard_False;
   
-  Standard_Real A,B,C,D;
-  Standard_Real Al,Bl,Cl;
-  Standard_Real Dis,Direc;
+  Standard_Real A = NAN,B = NAN,C = NAN,D = NAN;
+  Standard_Real Al = NAN,Bl = NAN,Cl = NAN;
+  Standard_Real Dis = NAN,Direc = NAN;
   
   P.Coefficients(A,B,C,D);
   gp_Pnt Orig(L.Location());
index 18decab6516b30fe9ae1e1a034aba05e2be88085..91e25f737c4a04426f529eb2103326f888454d62 100644 (file)
@@ -16,6 +16,8 @@
 //-- lbr : la methode avec les coefficients est catastrophique. 
 //--       Mise en place d'une vraie solution. 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <ElSLib.hxx>
 #include <gp_Dir.hxx>
@@ -58,9 +60,9 @@ void IntAna_IntLinTorus::Perform (const gp_Lin& L, const gp_Torus& T) {
   NewPL.Transform(trsf);
   DL.Transform(trsf);
 
-  Standard_Real a,b,c,x1,y1,z1,x0,y0,z0;
-  Standard_Real a0,a1,a2,a3,a4;
-  Standard_Real R,r,R2,r2;
+  Standard_Real a = NAN,b = NAN,c = NAN,x1 = NAN,y1 = NAN,z1 = NAN,x0 = NAN,y0 = NAN,z0 = NAN;
+  Standard_Real a0 = NAN,a1 = NAN,a2 = NAN,a3 = NAN,a4 = NAN;
+  Standard_Real R = NAN,r = NAN,R2 = NAN,r2 = NAN;
 
   x1 = DL.X(); y1 = DL.Y(); z1 = DL.Z();
   x0 = NewPL.X(); y0 = NewPL.Y(); z0 = NewPL.Z();
@@ -77,7 +79,7 @@ void IntAna_IntLinTorus::Perform (const gp_Lin& L, const gp_Torus& T) {
   a1 = 2.0*b*c+8.0*R2*z1*z0;
   a0 = c*c+4.0*R2*(z0*z0-r2);
 
-  Standard_Real u,v;
+  Standard_Real u = NAN,v = NAN;
   math_DirectPolynomialRoots mdpr(a4,a3,a2,a1,a0);
   if(mdpr.IsDone()) {
      Standard_Integer nbsolvalid = 0; 
index 03d01a55f5e9cd76fd55818d4620126fcbb0d95d..cfb4eb5f53efbda9160472329d626ba47f78aab0 100644 (file)
@@ -72,12 +72,12 @@ private:
 
 
 
-  Standard_Boolean done;
-  Standard_Integer nbpt;
+  Standard_Boolean done{};
+  Standard_Integer nbpt{};
   gp_Pnt thePoint[4];
-  Standard_Real theParam[4];
-  Standard_Real theFi[4];
-  Standard_Real theTheta[4];
+  Standard_Real theParam[4]{};
+  Standard_Real theFi[4]{};
+  Standard_Real theTheta[4]{};
 
 
 };
index 20fb88e65ddac6b00fd5d8075bb13eac4bf5963f..31846002acf207d85836180761fcfb2e954b711c 100644 (file)
@@ -14,6 +14,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
 #include <stdio.h>
 
 #include <Standard_Stream.hxx>
@@ -117,7 +118,7 @@ static void AddSpecialPoints(const IntAna_Quadric& theQuad,
 class TrigonometricRoots {
 
  private:
-  Standard_Real Roots[4];
+  Standard_Real Roots[4]{};
   Standard_Boolean done;
   Standard_Integer NbRoots;
   Standard_Boolean infinite_roots;
@@ -136,7 +137,7 @@ class TrigonometricRoots {
   }
   //IsARoot
   Standard_Boolean IsARoot(Standard_Real u) {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real aEps=RealEpsilon();
     Standard_Real PIpPI = M_PI + M_PI;
     //
@@ -183,13 +184,13 @@ TrigonometricRoots::TrigonometricRoots(const Standard_Real CC,
                                       const Standard_Real Cte,
                                       const Standard_Real Binf,
                                       const Standard_Real Bsup)
-: infinite_roots(Standard_False)
+: done(Standard_False), infinite_roots(Standard_False)
 {
-  Standard_Integer i, j, SvNbRoots;
-  Standard_Boolean Triee;
+  Standard_Integer i = 0, j = 0, SvNbRoots = 0;
+  Standard_Boolean Triee = 0;
   Standard_Real PIpPI = M_PI + M_PI;
   //
-  done=Standard_False;
+  
   //
   //-- F= AA*CN*CN+2*BB*CN*SN+CC*CN+DD*SN+EE;
   math_TrigonometricFunctionRoots MTFR(CC, SC, C, S, Cte, Binf, Bsup); 
@@ -218,7 +219,7 @@ TrigonometricRoots::TrigonometricRoots(const Standard_Real CC,
   //-- La recherche directe donne n importe quoi. 
   SvNbRoots=NbRoots;
   for(i=0; i<SvNbRoots; ++i) {
-    Standard_Real y;
+    Standard_Real y = NAN;
     Standard_Real co=cos(Roots[i]);
     Standard_Real si=sin(Roots[i]);
     y=co*(CC*co + (SC+SC)*si + C) + S*si + Cte;
@@ -269,17 +270,17 @@ class MyTrigonometricFunction {
                          const Standard_Real xSC,
                          const Standard_Real xC,
                          const Standard_Real xS,
-                         const Standard_Real xCte) {
-    CC=xCC; 
-    SS=xSS; 
-    SC=xSC; 
-    S=xS; 
-    C=xC; 
-    Cte=xCte;
+                         const Standard_Real xCte) : CC(xCC), SS(xSS), SC(xSC), S(xS), C(xC), Cte(xCte) {
+    
+    
+    
+    
+    
+    
   }
  
   Standard_Real Value(const Standard_Real& U) {
-    Standard_Real sinus, cosinus, aRet;
+    Standard_Real sinus = NAN, cosinus = NAN, aRet = NAN;
     //
     sinus=sin(U);
     cosinus=cos(U);
@@ -292,7 +293,7 @@ class MyTrigonometricFunction {
   }  
   //
   Standard_Real Derivative(const Standard_Real& U) {
-    Standard_Real sinus, cosinus;
+    Standard_Real sinus = NAN, cosinus = NAN;
     //
     sinus=sin(U);
     cosinus=cos(U);
@@ -309,14 +310,14 @@ class MyTrigonometricFunction {
 //function : IntAna_IntQuadQuad::IntAna_IntQuadQuad
 //purpose  : C o n s t r u c t e u r    v i d e   
 //=======================================================================
-IntAna_IntQuadQuad::IntAna_IntQuadQuad(void) {
-  done=Standard_False;
-  identical = Standard_False;
-  NbCurves=0;
-  Nbpoints=0;
-  myNbMaxCurves=12;
-  myEpsilon=0.00000001;
-  myEpsilonCoeffPolyNull=0.00000001;
+IntAna_IntQuadQuad::IntAna_IntQuadQuad(void) : done(Standard_False), identical(Standard_False), NbCurves(0), Nbpoints(0), myNbMaxCurves(12), myEpsilon(0.00000001), myEpsilonCoeffPolyNull(0.00000001) {
+  
+  
+  
+  
+  
+  
+  
   memset (nextcurve, 0, sizeof (nextcurve));
   memset (previouscurve, 0, sizeof (previouscurve));
 }
@@ -326,10 +327,10 @@ IntAna_IntQuadQuad::IntAna_IntQuadQuad(void) {
 //=======================================================================
 IntAna_IntQuadQuad::IntAna_IntQuadQuad(const gp_Cylinder& Cyl,
                                       const IntAna_Quadric& Quad,
-                                      const Standard_Real Tol) {
-  myNbMaxCurves=12;
-  myEpsilon=0.00000001;
-  myEpsilonCoeffPolyNull=0.00000001;
+                                      const Standard_Real Tol) : myNbMaxCurves(12), myEpsilon(0.00000001), myEpsilonCoeffPolyNull(0.00000001) {
+  
+  
+  
   Perform(Cyl,Quad,Tol);
 }
 //=======================================================================
@@ -345,8 +346,8 @@ void IntAna_IntQuadQuad::Perform(const gp_Cylinder& Cyl,
   NbCurves=0;
   Nbpoints=0;
   //
-  Standard_Boolean UN_SEUL_Z_PAR_THETA, DEUX_Z_PAR_THETA
-                   Z_POSITIF, Z_INDIFFERENT, Z_NEGATIF;
+  Standard_Boolean UN_SEUL_Z_PAR_THETA = 0, DEUX_Z_PAR_THETA = 0
+                   Z_POSITIF = 0, Z_INDIFFERENT = 0, Z_NEGATIF = 0;
   //
   UN_SEUL_Z_PAR_THETA=Standard_False;
   DEUX_Z_PAR_THETA=Standard_True;
@@ -354,7 +355,7 @@ void IntAna_IntQuadQuad::Perform(const gp_Cylinder& Cyl,
   Z_INDIFFERENT=Standard_True;
   Z_NEGATIF=Standard_False;
   //
-  Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,Q1, aRealEpsilon, RCyl, R2;
+  Standard_Real Qxx = NAN,Qyy = NAN,Qzz = NAN,Qxy = NAN,Qxz = NAN,Qyz = NAN,Qx = NAN,Qy = NAN,Qz = NAN,Q1 = NAN, aRealEpsilon = NAN, RCyl = NAN, R2 = NAN;
   Standard_Real PIpPI = M_PI + M_PI;
   //
   for(Standard_Integer raz = 0 ; raz < myNbMaxCurves ; raz++) {
@@ -536,8 +537,8 @@ void IntAna_IntQuadQuad::Perform(const gp_Cylinder& Cyl,
          //-- On a au plus nbsol intervalles ( en fait 2 )
          //--  (1,2) (2,3) .. (nbsol,1+2PI)
          //-------------------------------------------------------------
-         Standard_Integer i;
-         Standard_Real Theta1, Theta2, Theta3, autrepar, qwet;
+         Standard_Integer i = 0;
+         Standard_Real Theta1 = NAN, Theta2 = NAN, Theta3 = NAN, autrepar = NAN, qwet = NAN;
          Standard_Boolean UnPtTg = Standard_False;
          //
          NbCurves=0;
@@ -644,11 +645,11 @@ void IntAna_IntQuadQuad::Perform(const gp_Cylinder& Cyl,
 //=======================================================================
 IntAna_IntQuadQuad::IntAna_IntQuadQuad(const gp_Cone& Cone,
                                       const IntAna_Quadric& Quad,
-                                      const Standard_Real Tol) 
+                                      const Standard_Real Tol) : myNbMaxCurves(12), myEpsilon(0.00000001), myEpsilonCoeffPolyNull(0.00000001) 
 { 
-  myNbMaxCurves=12;
-  myEpsilon=0.00000001;
-  myEpsilonCoeffPolyNull=0.00000001;
+  
+  
+  
   Perform(Cone,Quad,Tol);
 }
 //=======================================================================
@@ -660,16 +661,16 @@ void IntAna_IntQuadQuad::Perform(const gp_Cone& Cone,
                                 const Standard_Real)  
 { 
   //
-  Standard_Boolean UN_SEUL_Z_PAR_THETA,
-                   Z_POSITIF, Z_NEGATIF;
+  Standard_Boolean UN_SEUL_Z_PAR_THETA = 0,
+                   Z_POSITIF = 0, Z_NEGATIF = 0;
   //
   UN_SEUL_Z_PAR_THETA=Standard_False;
   Z_POSITIF=Standard_True;
   Z_NEGATIF=Standard_False;
   //
-  Standard_Integer i;
-  Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,Q1;
-  Standard_Real Theta1, Theta2, TgAngle;
+  Standard_Integer i = 0;
+  Standard_Real Qxx = NAN,Qyy = NAN,Qzz = NAN,Qxy = NAN,Qxz = NAN,Qyz = NAN,Qx = NAN,Qy = NAN,Qz = NAN,Q1 = NAN;
+  Standard_Real Theta1 = NAN, Theta2 = NAN, TgAngle = NAN;
   Standard_Real PIpPI = M_PI + M_PI;
   //
   done=Standard_True;
@@ -707,10 +708,10 @@ void IntAna_IntQuadQuad::Perform(const gp_Cone& Cone,
   //   
   // 1. Try to solve A(t)=0 -> PolZ2
   //
-  Standard_Integer nbsol, nbsol1, nbsolZ2;
-  Standard_Real Z2CC, Z2SS, Z2Cte, Z2SC, Z2C, Z2S;
-  Standard_Real Z1CC, Z1SS, Z1Cte, Z1SC, Z1C, Z1S
-  Standard_Real C_1,C_SS, C_CC, C_S, C_C, C_SC;
+  Standard_Integer nbsol = 0, nbsol1 = 0, nbsolZ2 = 0;
+  Standard_Real Z2CC = NAN, Z2SS = NAN, Z2Cte = NAN, Z2SC = NAN, Z2C = NAN, Z2S = NAN;
+  Standard_Real Z1CC = NAN, Z1SS = NAN, Z1Cte = NAN, Z1SC = NAN, Z1C = NAN, Z1S = NAN
+  Standard_Real C_1 = NAN,C_SS = NAN, C_CC = NAN, C_S = NAN, C_C = NAN, C_SC = NAN;
   //
   Z2CC = Qxx;
   Z2SS = Qyy;
@@ -882,9 +883,9 @@ void IntAna_IntQuadQuad::Perform(const gp_Cone& Cone,
     //--
     //-- Seule la courbe Z_NEGATIF est affectee
     //----------------------------------------------------------------------
-    Standard_Boolean RacinesdePolZ2DansTheta1Theta2;
-    Standard_Integer i2;
-    Standard_Real r;
+    Standard_Boolean RacinesdePolZ2DansTheta1Theta2 = 0;
+    Standard_Integer i2 = 0;
+    Standard_Real r = NAN;
     //
     //nbsolZ2=PolZ2.NbSolutions();
     RacinesdePolZ2DansTheta1Theta2=Standard_False;
@@ -916,8 +917,8 @@ void IntAna_IntQuadQuad::Perform(const gp_Cone& Cone,
     }
     
     else { //#1
-      Standard_Boolean NoChanges;
-      Standard_Real NewMin, NewMax, to;
+      Standard_Boolean NoChanges = 0;
+      Standard_Real NewMin = NAN, NewMax = NAN, to = NAN;
       //
       NewMin=Theta1;
       NewMax=Theta2;
@@ -1059,10 +1060,10 @@ void IntAna_IntQuadQuad::Perform(const gp_Cone& Cone,
 //=======================================================================
 void IntAna_IntQuadQuad::InternalSetNextAndPrevious() 
 {
-  Standard_Boolean NotLastOpenC2, NotFirstOpenC2;
-  Standard_Integer c1,c2;
-  Standard_Real aEps, aEPSILON_DISTANCE;
-  Standard_Real DInfC1,DSupC1, DInfC2,DSupC2;
+  Standard_Boolean NotLastOpenC2 = 0, NotFirstOpenC2 = 0;
+  Standard_Integer c1 = 0,c2 = 0;
+  Standard_Real aEps = NAN, aEPSILON_DISTANCE = NAN;
+  Standard_Real DInfC1 = NAN,DSupC1 = NAN, DInfC2 = NAN,DSupC2 = NAN;
   //
   aEps=0.0000001;
   aEPSILON_DISTANCE=0.0000000001;
index c286a05ca526b0e4fb3a9929e549d862d535055c..33fe9e83cdae81e369bbc6e834df5fc201c91673 100644 (file)
@@ -121,13 +121,13 @@ protected:
 
 protected:
 
-  Standard_Boolean done;
-  Standard_Boolean identical;
+  Standard_Boolean done{};
+  Standard_Boolean identical{};
   IntAna_Curve TheCurve[12];
-  Standard_Integer previouscurve[12];
-  Standard_Integer nextcurve[12];
-  Standard_Integer NbCurves;
-  Standard_Integer Nbpoints;
+  Standard_Integer previouscurve[12]{};
+  Standard_Integer nextcurve[12]{};
+  Standard_Integer NbCurves{};
+  Standard_Integer Nbpoints{};
   gp_Pnt Thepoints[2];
   Standard_Integer myNbMaxCurves;
   Standard_Real myEpsilon;
index c3dcf2c7673a3b64b1a5a45e2393b0a444937861..72d93e443c2171dc868c0ac12ec2bb750e161aaa 100644 (file)
@@ -25,6 +25,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <ElSLib.hxx>
 #include <gp_Circ.hxx>
@@ -140,7 +142,7 @@ AxeOperator::AxeOperator(const gp_Ax1& A1,const gp_Ax1& A2,
 :
   Axe1 (A1),
   Axe2 (A2),
-  myEPSILON_DISTANCE (theEpsDistance),
+  thecoplanar(Standard_False), thenormal(Standard_False), myEPSILON_DISTANCE (theEpsDistance),
   myEPSILON_AXES_PARA (theEpsAxesPara)
 {
   //---------------------------------------------------------------------
@@ -151,8 +153,8 @@ AxeOperator::AxeOperator(const gp_Ax1& A1,const gp_Ax1& A2,
   //
   RefineDir(V1);
   RefineDir(V2);
-  thecoplanar= Standard_False;
-  thenormal  = Standard_False;
+  
+  
 
   //--- check if the two axis are parallel
   theparallel=V1.IsParallel(V2, myEPSILON_AXES_PARA);  
@@ -167,7 +169,7 @@ AxeOperator::AxeOperator(const gp_Ax1& A1,const gp_Ax1& A2,
                                                            Axe2.Location())));
   }
   //--- check if Axis are Coplanar
-  Standard_Real D33;
+  Standard_Real D33 = NAN;
   if(thedistance<myEPSILON_DISTANCE) {
     D33=Det33(V1.X(),V1.Y(),V1.Z()
               ,V2.X(),V2.Y(),V2.Z()
@@ -184,7 +186,7 @@ AxeOperator::AxeOperator(const gp_Ax1& A1,const gp_Ax1& A2,
     Standard_Real smx=P2.X() - P1.X();
     Standard_Real smy=P2.Y() - P1.Y();
     Standard_Real smz=P2.Z() - P1.Z();
-    Standard_Real Det1,Det2,Det3,A;
+    Standard_Real Det1 = NAN,Det2 = NAN,Det3 = NAN,A = NAN;
     Det1=V1.Y() * V2.X() - V1.X() * V2.Y();
     Det2=V1.Z() * V2.Y() - V1.Y() * V2.Z();
     Det3=V1.Z() * V2.X() - V1.X() * V2.Z();
@@ -300,7 +302,7 @@ Standard_Real EstimDist(const gp_Cone& theCon1, const gp_Cone& theCon2)
 #endif
 
   Standard_Real aMinDist[2] = { Precision::Infinite(), Precision::Infinite() };
-  Standard_Integer i, j, k;
+  Standard_Integer i = 0, j = 0, k = 0;
   IntAna2d_AnaIntersection anInter;
   for (i = 0; i < 2; ++i)
   {
@@ -397,7 +399,7 @@ void IntAna_QuadQuadGeo::Perform (const gp_Pln& P1,
                                   const Standard_Real TolAng,
                                   const Standard_Real Tol)
 {
-  Standard_Real A1, B1, C1, D1, A2, B2, C2, D2, dist1, dist2, aMVD;
+  Standard_Real A1 = NAN, B1 = NAN, C1 = NAN, D1 = NAN, A2 = NAN, B2 = NAN, C2 = NAN, D2 = NAN, dist1 = NAN, dist2 = NAN, aMVD = NAN;
   //
   done=Standard_False;
   param2bis=0.;
@@ -422,8 +424,8 @@ void IntAna_QuadQuadGeo::Perform (const gp_Pln& P1,
       : IntAna_Empty;
   }
   else {
-    Standard_Real denom, denom2, ddenom, par1, par2;
-    Standard_Real X1, Y1, Z1, X2, Y2, Z2, aEps;
+    Standard_Real denom = NAN, denom2 = NAN, ddenom = NAN, par1 = NAN, par2 = NAN;
+    Standard_Real X1 = NAN, Y1 = NAN, Z1 = NAN, X2 = NAN, Y2 = NAN, Z2 = NAN, aEps = NAN;
     //
     aEps=1.e-16;
     denom=A1*A2 + B1*B2 + C1*C2;
@@ -460,19 +462,19 @@ void IntAna_QuadQuadGeo::Perform (const gp_Pln& P1,
     // So, 
     // the origin should be refined if it is possible
     //
-    Standard_Real aTreshAng, aTreshDist;
+    Standard_Real aTreshAng = NAN, aTreshDist = NAN;
     //
     aTreshAng=2.e-6; // 1.e-4 deg
     aTreshDist=1.e-12;
     //
     if (aMVD < aTreshAng) {
-      Standard_Real aDist1, aDist2;
+      Standard_Real aDist1 = NAN, aDist2 = NAN;
       //
       aDist1=A1*pt1.X() + B1*pt1.Y() + C1*pt1.Z() + D1;
       aDist2=A2*pt1.X() + B2*pt1.Y() + C2*pt1.Z() + D2;
       //
       if (fabs(aDist1)>aTreshDist || fabs(aDist2)>aTreshDist) {
-        Standard_Boolean bIsDone, bIsParallel;
+        Standard_Boolean bIsDone = 0, bIsParallel = 0;
         IntAna_IntConicQuad aICQ;
         //
         // 1.
@@ -549,10 +551,10 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo( const gp_Pln& P
                                    ,const Standard_Real H) 
 {
   done = Standard_False;
-  Standard_Real dist,radius;
-  Standard_Real A,B,C,D;
-  Standard_Real X,Y,Z;
-  Standard_Real sint,cost,h;
+  Standard_Real dist = NAN,radius = NAN;
+  Standard_Real A = NAN,B = NAN,C = NAN,D = NAN;
+  Standard_Real X = NAN,Y = NAN,Z = NAN;
+  Standard_Real sint = NAN,cost = NAN,h = NAN;
   gp_XYZ axex,axey,omega;
 
   
@@ -608,7 +610,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo( const gp_Pln& P
           {
             gp_XYZ omegaXYZ(X,Y,Z);
             gp_XYZ omegaXYZtrnsl( omegaXYZ + 100.*axec.Direction().XYZ() );
-            Standard_Real Xt,Yt,Zt,distt;
+            Standard_Real Xt = NAN,Yt = NAN,Zt = NAN,distt = NAN;
             omegaXYZtrnsl.Coord(Xt,Yt,Zt);
             distt = A*Xt + B*Yt + C*Zt + D;
             gp_XYZ omega1(omegaXYZtrnsl.X()-distt*A, 
@@ -636,7 +638,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo( const gp_Pln& P
           { 
             gp_XYZ omegaXYZ(X,Y,Z);
             gp_XYZ omegaXYZtrnsl( omegaXYZ + 100.*axec.Direction().XYZ() );
-            Standard_Real Xt,Yt,Zt,distt,ht;
+            Standard_Real Xt = NAN,Yt = NAN,Zt = NAN,distt = NAN,ht = NAN;
             omegaXYZtrnsl.Coord(Xt,Yt,Zt);
             distt = A*Xt + B*Yt + C*Zt + D;
             //             ht = Sqrt(radius*radius - distt*distt);
@@ -746,10 +748,10 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo( const gp_Pln& P
   done = Standard_False;
   nbint = 0;
 
-  Standard_Real A,B,C,D;
-  Standard_Real X,Y,Z;
-  Standard_Real dist,sint,cost,sina,cosa,angl,costa;
-  Standard_Real dh;
+  Standard_Real A = NAN,B = NAN,C = NAN,D = NAN;
+  Standard_Real X = NAN,Y = NAN,Z = NAN;
+  Standard_Real dist = NAN,sint = NAN,cost = NAN,sina = NAN,cosa = NAN,angl = NAN,costa = NAN;
+  Standard_Real dh = NAN;
   gp_XYZ axex,axey;
 
   gp_Lin axec(Co.Axis());
@@ -819,7 +821,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo( const gp_Pln& P
   else {
     // Solutions possibles : cercle, ellipse, parabole, hyperbole selon
     // l inclinaison du plan.
-    Standard_Real deltacenter, distance;
+    Standard_Real deltacenter = NAN, distance = NAN;
 
     if (cost < Tolang) {
       // Le plan contient la direction de l axe du cone. La solution est
@@ -958,8 +960,8 @@ void IntAna_QuadQuadGeo::Perform( const gp_Pln& P
 {
   
   done = Standard_False;
-  Standard_Real A,B,C,D,dist, radius;
-  Standard_Real X,Y,Z;
+  Standard_Real A = NAN,B = NAN,C = NAN,D = NAN,dist = NAN, radius = NAN;
+  Standard_Real X = NAN,Y = NAN,Z = NAN;
 
   nbint = 0;
 // debug JAG : on met typeres = IntAna_Empty par defaut...
@@ -1032,10 +1034,10 @@ void IntAna_QuadQuadGeo::Perform(const gp_Cylinder& Cyl1,
                    myEPSILON_CYLINDER_DELTA_DISTANCE, myEPSILON_AXES_PARA);
   Standard_Real R1=Cyl1.Radius();
   Standard_Real R2=Cyl2.Radius();
-  Standard_Real RmR, RmR_Relative;
+  Standard_Real RmR = NAN, RmR_Relative = NAN;
   RmR=(R1>R2)? (R1-R2) : (R2-R1);
   {
-    Standard_Real Rmax;
+    Standard_Real Rmax = NAN;
     Rmax=(R1>R2)? R1 : R2;
     RmR_Relative=RmR/Rmax;
   }
@@ -1209,7 +1211,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Cylinder& Cyl1,
       pt1=pt2=A1A2.PtIntersect();
       
       Standard_Real A=DirCyl1.Angle(DirCyl2);
-      Standard_Real B;
+      Standard_Real B = NAN;
       B=Abs(Sin(0.5*(M_PI-A)));
       A=Abs(Sin(0.5*A));
       
@@ -1245,7 +1247,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Cylinder& Cyl1,
       if(Abs(DistA1A2-Cyl1.Radius()-Cyl2.Radius())<Tol)
       {
         typeres = IntAna_Point;
-        Standard_Real d,p1,p2;
+        Standard_Real d = NAN,p1 = NAN,p2 = NAN;
 
         gp_Dir D1 = Cyl1.Axis().Direction();
         gp_Dir D2 = Cyl2.Axis().Direction();
@@ -1436,7 +1438,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
 {
   done = Standard_True;
   //
-  Standard_Real tg1, tg2, aDA1A2, aTol2;
+  Standard_Real tg1 = NAN, tg2 = NAN, aDA1A2 = NAN, aTol2 = NAN;
   gp_Pnt aPApex1, aPApex2;
 
   Standard_Real TOL_APEX_CONF = 1.e-10;
@@ -1478,7 +1480,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
   // 1
   if(A1A2.Same()) {
     //-- two circles 
-    Standard_Real x;
+    Standard_Real x = NAN;
     gp_Pnt P=Con1.Apex();
     gp_Dir D=Con1.Position().Direction();
     Standard_Real d=gp_Vec(D).Dot(gp_Vec(P,Con2.Apex()));
@@ -1610,10 +1612,10 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
     // 3.2 - one line  when cone1 touches cone2 (iRet=1)
     // 3.3 - two lines when cone1 intersects cone2 (iRet=2)
     //
-    Standard_Integer iRet;
-    Standard_Real aGamma, aBeta1, aBeta2;
-    Standard_Real aD1, aR1, aTgBeta1, aTgBeta2, aHalfPI;
-    Standard_Real aCosGamma, aSinGamma, aDx, aR2, aRD2, aD2;
+    Standard_Integer iRet = 0;
+    Standard_Real aGamma = NAN, aBeta1 = NAN, aBeta2 = NAN;
+    Standard_Real aD1 = NAN, aR1 = NAN, aTgBeta1 = NAN, aTgBeta2 = NAN, aHalfPI = NAN;
+    Standard_Real aCosGamma = NAN, aSinGamma = NAN, aDx = NAN, aR2 = NAN, aRD2 = NAN, aD2 = NAN;
     gp_Pnt2d aP0, aPA1, aP1, aPA2;
     gp_Vec2d aVAx2;
     gp_Ax1 aAx1, aAx2;
@@ -1675,7 +1677,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
     //
     // Finding the solution in 3D
     //
-    Standard_Real aDa;
+    Standard_Real aDa = NAN;
     gp_Pnt aQApex1, aQA1, aQA2, aQX, aQX1, aQX2;
     gp_Dir aD3Ax1, aD3Ax2;
     gp_Lin aLin;
@@ -1753,7 +1755,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
   //Case when cones have common generatrix
   else if(A1A2.Intersect()) {
     //Check if apex of one cone belongs another one
-    Standard_Real u, v, tol2 = Tol*Tol;
+    Standard_Real u = NAN, v = NAN, tol2 = Tol*Tol;
     ElSLib::Parameters(Con2, aPApex1, u, v);
     gp_Pnt p = ElSLib::Value(u, v, Con2);
     if(aPApex1.SquareDistance(p) > tol2) {
@@ -2026,7 +2028,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
   Standard_Real dO1O2=O1.Distance(O2);
   Standard_Real R1=Sph1.Radius();
   Standard_Real R2=Sph2.Radius();
-  Standard_Real Rmin,Rmax;
+  Standard_Real Rmin = NAN,Rmax = NAN;
   typeres=IntAna_Empty;
   param2bis=0.0; //-- pour eviter param2bis not used .... 
 
@@ -2052,7 +2054,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
     if(t >= 0.0  && t <=Tol) { 
       typeres = IntAna_Point;
       nbint = 1;
-      Standard_Real t2;
+      Standard_Real t2 = NAN;
       if(R1==Rmax) t2=(R1 + (R2 + dO1O2)) * 0.5;
       else         t2=(-R1+(dO1O2-R2))*0.5;
         
@@ -2136,7 +2138,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Pln& Pln,
 {
   done = Standard_True;
   //
-  Standard_Real aRMin, aRMaj;
+  Standard_Real aRMin = NAN, aRMaj = NAN;
   //
   aRMin = Tor.MinorRadius();
   aRMaj = Tor.MajorRadius();
@@ -2148,7 +2150,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Pln& Pln,
   const gp_Ax1 aPlnAx = Pln.Axis();
   const gp_Ax1 aTorAx = Tor.Axis();
   //
-  Standard_Boolean bParallel, bNormal;
+  Standard_Boolean bParallel = 0, bNormal = 0;
   //
   bParallel = aTorAx.IsParallel(aPlnAx, myEPSILON_AXES_PARA);
   bNormal = !bParallel ? aTorAx.IsNormal(aPlnAx, myEPSILON_AXES_PARA) : Standard_False;
@@ -2157,11 +2159,11 @@ void IntAna_QuadQuadGeo::Perform(const gp_Pln& Pln,
     return;
   }
   //
-  Standard_Real aDist;
+  Standard_Real aDist = NAN;
   //
   gp_Pnt aTorLoc = aTorAx.Location();
   if (bParallel) {
-    Standard_Real aDt, X, Y, Z, A, B, C, D, aDR, aTolNum;
+    Standard_Real aDt = NAN, X = NAN, Y = NAN, Z = NAN, A = NAN, B = NAN, C = NAN, D = NAN, aDR = NAN, aTolNum = NAN;
     //
     aTolNum=myEPSILON_CYLINDER_DELTA_RADIUS;
     //
@@ -2248,7 +2250,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Cylinder& Cyl,
 {
   done = Standard_True;
   //
-  Standard_Real aRMin, aRMaj;
+  Standard_Real aRMin = NAN, aRMaj = NAN;
   //
   aRMin = Tor.MinorRadius();
   aRMaj = Tor.MajorRadius();
@@ -2269,7 +2271,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Cylinder& Cyl,
     return;
   }
   //
-  Standard_Real aRCyl;
+  Standard_Real aRCyl = NAN;
   //
   aRCyl = Cyl.Radius();
   if (((aRCyl + Tol) < (aRMaj - aRMin)) || ((aRCyl - Tol) > (aRMaj + aRMin))) {
@@ -2331,7 +2333,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Cone& Con,
 {
   done = Standard_True;
   //
-  Standard_Real aRMin, aRMaj;
+  Standard_Real aRMin = NAN, aRMaj = NAN;
   //
   aRMin = Tor.MinorRadius();
   aRMaj = Tor.MajorRadius();
@@ -2352,8 +2354,8 @@ void IntAna_QuadQuadGeo::Perform(const gp_Cone& Con,
     return;
   }
   //
-  Standard_Real anAngle, aDist, aParam[4], aDt;
-  Standard_Integer i;
+  Standard_Real anAngle = NAN, aDist = NAN, aParam[4], aDt = NAN;
+  Standard_Integer i = 0;
   gp_Pnt aTorLoc, aPCT, aPN, aPt[4];
   gp_Dir aDir[4];
   //
@@ -2469,7 +2471,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Sphere& Sph,
 {
   done = Standard_True;
   //
-  Standard_Real aRMin, aRMaj;
+  Standard_Real aRMin = NAN, aRMaj = NAN;
   //
   aRMin = Tor.MinorRadius();
   aRMaj = Tor.MajorRadius();
@@ -2487,7 +2489,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Sphere& Sph,
     return;
   }
   //
-  Standard_Real aRSph, aDist;
+  Standard_Real aRSph = NAN, aDist = NAN;
   gp_Pnt aTorLoc;
   //
   gp_Dir aXDir = Tor.XAxis().Direction();
@@ -2504,7 +2506,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Sphere& Sph,
   //
   typeres = IntAna_Circle;
   //
-  Standard_Real anAlpha, aBeta;
+  Standard_Real anAlpha = NAN, aBeta = NAN;
   //
   anAlpha = 0.5*(aRMin*aRMin - aRSph*aRSph + aDist*aDist ) / aDist;
   aBeta = Sqrt(Abs(aRMin*aRMin - anAlpha*anAlpha));
@@ -2566,7 +2568,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
 {
   done = Standard_True;
   //
-  Standard_Real aRMin1, aRMin2, aRMaj1, aRMaj2;
+  Standard_Real aRMin1 = NAN, aRMin2 = NAN, aRMaj1 = NAN, aRMaj2 = NAN;
   //
   aRMin1 = Tor1.MinorRadius();
   aRMaj1 = Tor1.MajorRadius();
@@ -2598,7 +2600,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
     return;
   }
   //
-  Standard_Real aDist;
+  Standard_Real aDist = NAN;
   gp_Pnt aP1, aP2;
   //
   gp_Dir aXDir1 = Tor1.XAxis().Direction();
@@ -2615,7 +2617,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
   //
   typeres = IntAna_Circle;
   //
-  Standard_Real anAlpha, aBeta;
+  Standard_Real anAlpha = NAN, aBeta = NAN;
   //
   anAlpha = 0.5*(aRMin1*aRMin1 - aRMin2*aRMin2 + aDist*aDist ) / aDist;
   aBeta = Sqrt(Abs(aRMin1*aRMin1 - anAlpha*anAlpha));
@@ -2708,7 +2710,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
   }
 
   if(n==1) {
-    Standard_Real R1=param1, R2=param1bis, aTmp;
+    Standard_Real R1=param1, R2=param1bis, aTmp = NAN;
     if (R1<R2) {
       aTmp=R1; R1=R2; R2=aTmp;
     }
@@ -2717,7 +2719,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
     return anElips;
   }
   else {
-    Standard_Real R1=param2, R2=param2bis, aTmp;
+    Standard_Real R1=param2, R2=param2bis, aTmp = NAN;
     if (R1<R2) {
       aTmp=R1; R1=R2; R2=aTmp;
     }
@@ -2793,7 +2795,7 @@ const gp_Pnt& IntAna_QuadQuadGeo::PChar() const
 //=======================================================================
 void RefineDir(gp_Dir& aDir)
 {
-  Standard_Integer k, m, n;
+  Standard_Integer k = 0, m = 0, n = 0;
   Standard_Real aC[3];
   //
   aDir.Coord(aC[0], aC[1], aC[2]);
@@ -2810,7 +2812,7 @@ void RefineDir(gp_Dir& aDir)
   }
   //
   if (m && n) {
-    Standard_Real aEps, aR1, aR2, aNum;
+    Standard_Real aEps = NAN, aR1 = NAN, aR2 = NAN, aNum = NAN;
     //
     aEps=RealEpsilon();
     aR1=1.-aEps;
index 534a8ca5a6da5783d689381dcb3f826625bcd293..daa9a1de8304aec992e0975e8a9823f19c3bc520 100644 (file)
@@ -253,12 +253,12 @@ protected:
   Standard_Real param4;
   Standard_Real param1bis;
   Standard_Real param2bis;
-  Standard_Real myEPSILON_DISTANCE;
-  Standard_Real myEPSILON_ANGLE_CONE;
-  Standard_Real myEPSILON_MINI_CIRCLE_RADIUS;
-  Standard_Real myEPSILON_CYLINDER_DELTA_RADIUS;
-  Standard_Real myEPSILON_CYLINDER_DELTA_DISTANCE;
-  Standard_Real myEPSILON_AXES_PARA;
+  Standard_Real myEPSILON_DISTANCE{};
+  Standard_Real myEPSILON_ANGLE_CONE{};
+  Standard_Real myEPSILON_MINI_CIRCLE_RADIUS{};
+  Standard_Real myEPSILON_CYLINDER_DELTA_RADIUS{};
+  Standard_Real myEPSILON_CYLINDER_DELTA_DISTANCE{};
+  Standard_Real myEPSILON_AXES_PARA{};
   Standard_Boolean myCommonGen;
   gp_Pnt myPChar;
 
index ea6b9929f1bf99462dcf07c5a6b384e5e43b7160..54940d98f1fe4630bda75fbfe1c9e152408a82cc 100644 (file)
@@ -20,6 +20,8 @@
 #endif
 
 
+#include <math.h>
+
 #include <gp_Ax3.hxx>
 #include <gp_Trsf.hxx>
 #include <IntAna_Quadric.hxx>
@@ -42,8 +44,8 @@
 //----------------------------------------------------------------------
 //-- Quadric Vide
 //----------------------------------------------------------------------
-IntAna_Quadric::IntAna_Quadric(void) {
-  CXX=CYY=CZZ=CXY=CXZ=CYZ=CX=CY=CZ=0.0;   CCte=1.0;
+IntAna_Quadric::IntAna_Quadric(void) : CCte(1.0) {
+  CXX=CYY=CZZ=CXY=CXZ=CYZ=CX=CY=CZ=0.0;   
 }
 //----------------------------------------------------------------------
 //-- Pln  -----> Quadric
@@ -125,13 +127,13 @@ void IntAna_Quadric::NewCoefficients( Standard_Real& _CXX,Standard_Real& _CYY,St
                                     ,Standard_Real& _CCte
                                     ,const gp_Ax3& Axis) const 
 {
-  Standard_Real t11,t12,t13,t14;                  // x = t11 X + t12 Y + t13 Z + t14
-  Standard_Real t21,t22,t23,t24;                  // y = t21 X + t22 Y + t23 Z + t24
-  Standard_Real t31,t32,t33,t34;                  // z = t31 X + t32 Y + t33 Z + t34
+  Standard_Real t11 = NAN,t12 = NAN,t13 = NAN,t14 = NAN;                  // x = t11 X + t12 Y + t13 Z + t14
+  Standard_Real t21 = NAN,t22 = NAN,t23 = NAN,t24 = NAN;                  // y = t21 X + t22 Y + t23 Z + t24
+  Standard_Real t31 = NAN,t32 = NAN,t33 = NAN,t34 = NAN;                  // z = t31 X + t32 Y + t33 Z + t34
                                  
                                                   //   = X DirX + Y DirY + Z DirZ + Loc
   
-  Standard_Real Cxx,Cyy,Czz,Cxy,Cxz,Cyz,Cx,Cy,Cz,Ccte;            
+  Standard_Real Cxx = NAN,Cyy = NAN,Czz = NAN,Cxy = NAN,Cxz = NAN,Cyz = NAN,Cx = NAN,Cy = NAN,Cz = NAN,Ccte = NAN;            
   
   gp_Trsf Trans;
   Trans.SetTransformation(Axis);
index 4f2cddbca11caac18a20888e734f61b98cd92c40..8b3e259a202eb04f528b65cdf238043f008d22cf 100644 (file)
@@ -20,6 +20,8 @@
 #include <NCollection_List.hxx>
 #include <Standard_DefineAlloc.hxx>
 
+#include <gp_Pnt.hxx>
+
 class gp_Cone;
 class gp_Cylinder;
 class gp_Pln;
@@ -91,16 +93,16 @@ private:
 
 
 
-  Standard_Real CXX;
-  Standard_Real CYY;
-  Standard_Real CZZ;
-  Standard_Real CXY;
-  Standard_Real CXZ;
-  Standard_Real CYZ;
-  Standard_Real CX;
-  Standard_Real CY;
-  Standard_Real CZ;
-  Standard_Real CCte;
+  Standard_Real CXX{};
+  Standard_Real CYY{};
+  Standard_Real CZZ{};
+  Standard_Real CXY{};
+  Standard_Real CXZ{};
+  Standard_Real CYZ{};
+  Standard_Real CX{};
+  Standard_Real CY{};
+  Standard_Real CZ{};
+  Standard_Real CCte{};
   NCollection_List<gp_Pnt> mySpecialPoints;
 
 };
index 8892e62481b1cfc7f7ca939bec37073a9ddfa9da..aec387bc16c7673609bab7ffa3324e96abfd52ff 100644 (file)
@@ -138,11 +138,11 @@ private:
 
 
 
-  Standard_Boolean done;
-  Standard_Boolean para;
-  Standard_Boolean iden;
-  Standard_Boolean empt;
-  Standard_Integer nbp;
+  Standard_Boolean done{};
+  Standard_Boolean para{};
+  Standard_Boolean iden{};
+  Standard_Boolean empt{};
+  Standard_Integer nbp{};
   IntAna2d_IntPoint lpnt[4];
 
 
index f7d70afab78f1acdfe22ef20f80d987629525444..1dc6b30398f101bb52511c81d32737f2e75077d5 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Circ2d.hxx>
 #include <gp_Lin2d.hxx>
 #include <IntAna2d_AnaIntersection.hxx>
@@ -26,13 +28,13 @@ void IntAna2d_AnaIntersection::Perform (const gp_Lin2d& L1,
  
   done = Standard_False;
 
-  Standard_Real A1,B1,C1;
-  Standard_Real A2,B2,C2;
+  Standard_Real A1 = NAN,B1 = NAN,C1 = NAN;
+  Standard_Real A2 = NAN,B2 = NAN,C2 = NAN;
   L1.Coefficients(A1,B1,C1);
   L2.Coefficients(A2,B2,C2);
 
-  Standard_Real al1,be1,ga1;
-  Standard_Real al2,be2,ga2;
+  Standard_Real al1 = NAN,be1 = NAN,ga1 = NAN;
+  Standard_Real al2 = NAN,be2 = NAN,ga2 = NAN;
   
   Standard_Real Det =Max (Abs(A1),Max(Abs(A2),Max(Abs(B1),Abs(B2))));
 
@@ -99,7 +101,7 @@ void IntAna2d_AnaIntersection::Perform (const gp_Lin2d& L1,
       YS=temp;
     }
 
-    Standard_Real La,Mu;
+    Standard_Real La = NAN,Mu = NAN;
     if (Abs(A1)>=Abs(B1)) {
       La=(YS-L1.Location().Y())/A1;
     }
index 1f345e531ad9419bc4fcf5f569b67cf308c0a5be..f9a586c2ad46acbea43035d0d80f7eec52d8a477 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Circ2d.hxx>
 #include <gp_Vec2d.hxx>
 #include <IntAna2d_AnaIntersection.hxx>
@@ -97,7 +99,7 @@ void IntAna2d_AnaIntersection::Perform (const gp_Circ2d& C1,
     Standard_Real sint2=h     /R2;
     Standard_Real cost2=(l1-d)/R2;
 
-    Standard_Real ang1,ang2;
+    Standard_Real ang1 = NAN,ang2 = NAN;
 
     // ang1 et ang2 correspondent aux solutions avec sinus positif
     // si l'axe de reference est l'axe des centres C1C2
index fe31e86c7739b15141ddc6cf6b8e260b4b03b361..da7aef54265e1e7253c09ee1e9660beb26d21aeb 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <gp_Circ2d.hxx>
 #include <gp_Lin2d.hxx>
@@ -33,7 +35,7 @@ void IntAna2d_AnaIntersection::Perform(const gp_Lin2d& L,
   iden=Standard_False; 
   para=Standard_False;
   //
-  Standard_Real A,B,C0, d;
+  Standard_Real A = NAN,B = NAN,C0 = NAN, d = NAN;
   gp_Pnt2d aP2D, aP2D1, aP2D2;
   //
   L.Coefficients(A,B,C0);
@@ -53,7 +55,7 @@ void IntAna2d_AnaIntersection::Perform(const gp_Lin2d& L,
     //modified by NIZNHY-PKV Fri Jun 15 09:55:29 2007t
     if (Abs(Abs(d)-C.Radius())<=Epsilon(C.Radius())) {    // Cas de tangence
       
-      Standard_Real u, XS, YS, ang;
+      Standard_Real u = NAN, XS = NAN, YS = NAN, ang = NAN;
       //
       nbp=1;
       XS=C.Location().X() - d*A;
@@ -78,7 +80,7 @@ void IntAna2d_AnaIntersection::Perform(const gp_Lin2d& L,
       lpnt[0].SetValue(XS,YS,u,ang);
     }
     else { // 2 points d intersection
-      Standard_Real h, XS1,YS1, XS2,YS2, ang1,ang2, u1,u2;//,cost,sint angt;                                        
+      Standard_Real h = NAN, XS1 = NAN,YS1 = NAN, XS2 = NAN,YS2 = NAN, ang1 = NAN,ang2 = NAN, u1 = NAN,u2 = NAN;//,cost,sint angt;                                        
       nbp=2;
       h=Sqrt(C.Radius()*C.Radius()-d*d);
       //modified by NIZNHY-PKV Fri Jun 15 09:55:47 2007f
index d009e4dad4d7e3a0ce0083113d0cae93c626d016..fb4a39d725c992f0213dd4c9d06d174aeb55e2d5 100644 (file)
@@ -15,6 +15,8 @@
 //============================================ IntAna2d_AnaIntersection_4.cxx
 //============================================================================
 
+#include <math.h>
+
 #include <gp_Circ2d.hxx>
 #include <gp_Lin2d.hxx>
 #include <IntAna2d_AnaIntersection.hxx>
 void IntAna2d_AnaIntersection::Perform (const gp_Lin2d& L,
                                   const IntAna2d_Conic& Conic)
 {
-  Standard_Real A,B,C,D,E,F;
-  Standard_Real px0,px1,px2;
-  Standard_Real DR_A,DR_B,DR_C,X0,Y0;
-  Standard_Integer i;
-  Standard_Real tx,ty,S;
+  Standard_Real A = NAN,B = NAN,C = NAN,D = NAN,E = NAN,F = NAN;
+  Standard_Real px0 = NAN,px1 = NAN,px2 = NAN;
+  Standard_Real DR_A = NAN,DR_B = NAN,DR_C = NAN,X0 = NAN,Y0 = NAN;
+  Standard_Integer i = 0;
+  Standard_Real tx = NAN,ty = NAN,S = NAN;
   
   done = Standard_False;
   nbp  = 0;
index 5fc58732b8c4be540067d04eff1162cd1d7bc784..442b7e7e0b368db78dc47c107719ce62511155f7 100644 (file)
@@ -15,6 +15,8 @@
 //============================================ IntAna2d_AnaIntersection_5.cxx
 //============================================================================
 
+#include <math.h>
+
 #include <gp_Circ2d.hxx>
 #include <IntAna2d_AnaIntersection.hxx>
 #include <IntAna2d_Conic.hxx>
@@ -26,12 +28,12 @@ void IntAna2d_AnaIntersection::Perform(const gp_Circ2d& Circle,
                                  const IntAna2d_Conic& Conic)
 {
    Standard_Boolean CIsDirect = Circle.IsDirect();
-   Standard_Real A,B,C,D,E,F;
-   Standard_Real pcc,pss,p2sc,pc,ps,pcte;
+   Standard_Real A = NAN,B = NAN,C = NAN,D = NAN,E = NAN,F = NAN;
+   Standard_Real pcc = NAN,pss = NAN,p2sc = NAN,pc = NAN,ps = NAN,pcte = NAN;
    Standard_Real radius=Circle.Radius();
    Standard_Real radius_P2=radius*radius;
-   Standard_Integer i;
-   Standard_Real tx,ty,S;
+   Standard_Integer i = 0;
+   Standard_Real tx = NAN,ty = NAN,S = NAN;
 
    done = Standard_False;
    nbp  = 0;
index 81e697af340b5e602df174f1b5c47f834a2521aa..f2fe2dd030b23fbe371452a40920f5df7005deb7 100644 (file)
@@ -15,6 +15,8 @@
 //============================================ IntAna2d_AnaIntersection_6.cxx
 //============================================================================
 
+#include <math.h>
+
 #include <gp_Circ2d.hxx>
 #include <gp_Elips2d.hxx>
 #include <IntAna2d_AnaIntersection.hxx>
@@ -27,12 +29,12 @@ void IntAna2d_AnaIntersection::Perform(const gp_Elips2d& Elips,
                                  const IntAna2d_Conic& Conic)
 {
   Standard_Boolean EIsDirect = Elips.IsDirect();
-  Standard_Real A,B,C,D,E,F;
-  Standard_Real pcte,ps,pc,p2sc,pcc,pss;
+  Standard_Real A = NAN,B = NAN,C = NAN,D = NAN,E = NAN,F = NAN;
+  Standard_Real pcte = NAN,ps = NAN,pc = NAN,p2sc = NAN,pcc = NAN,pss = NAN;
   Standard_Real minor_radius=Elips.MinorRadius();
   Standard_Real major_radius=Elips.MajorRadius();
-  Standard_Integer i;
-  Standard_Real tx,ty,S;
+  Standard_Integer i = 0;
+  Standard_Real tx = NAN,ty = NAN,S = NAN;
   
   done = Standard_False;
   nbp = 0;
index 784cc5236bf3f0fc5b98c604b5679a7787f41fa0..0d82573c6fd6c5bff9e12ad9968cc8d2aaf25acb 100644 (file)
@@ -15,6 +15,8 @@
 //============================================ IntAna2d_AnaIntersection_7.cxx
 //============================================================================
 
+#include <math.h>
+
 #include <gp_Circ2d.hxx>
 #include <gp_Parab2d.hxx>
 #include <IntAna2d_AnaIntersection.hxx>
@@ -27,10 +29,10 @@ void IntAna2d_AnaIntersection::Perform(const gp_Parab2d& P,
                                       const IntAna2d_Conic& Conic)
   {
     Standard_Boolean PIsDirect = P.IsDirect();
-    Standard_Real A,B,C,D,E,F;
-    Standard_Real px4,px3,px2,px1,px0;
-    Standard_Integer i;
-    Standard_Real tx,ty,S;
+    Standard_Real A = NAN,B = NAN,C = NAN,D = NAN,E = NAN,F = NAN;
+    Standard_Real px4 = NAN,px3 = NAN,px2 = NAN,px1 = NAN,px0 = NAN;
+    Standard_Integer i = 0;
+    Standard_Real tx = NAN,ty = NAN,S = NAN;
     Standard_Real un_sur_2p=0.5/(P.Parameter());
     gp_Ax2d Axe_rep(P.MirrorAxis());
 
index e9eebdffcb0ddb87ca0b73731348623643af1848..e068fbc504294c5ecbb5fcd08a439029ec91fb3f 100644 (file)
@@ -15,6 +15,8 @@
 //============================================ IntAna2d_AnaIntersection_8.cxx
 //============================================================================
 
+#include <math.h>
+
 #include <gp_Circ2d.hxx>
 #include <gp_Hypr2d.hxx>
 #include <IntAna2d_AnaIntersection.hxx>
@@ -42,12 +44,12 @@ void IntAna2d_AnaIntersection::Perform(const gp_Hypr2d& H,
                                       const IntAna2d_Conic& Conic)
   {
     Standard_Boolean HIsDirect = H.IsDirect();
-    Standard_Real A,B,C,D,E,F;
-    Standard_Real px0,px1,px2,px3,px4;
+    Standard_Real A = NAN,B = NAN,C = NAN,D = NAN,E = NAN,F = NAN;
+    Standard_Real px0 = NAN,px1 = NAN,px2 = NAN,px3 = NAN,px4 = NAN;
     Standard_Real minor_radius=H.MinorRadius();
     Standard_Real major_radius=H.MajorRadius();
-    Standard_Integer i;
-    Standard_Real tx,ty,S;
+    Standard_Integer i = 0;
+    Standard_Real tx = NAN,ty = NAN,S = NAN;
 
     done = Standard_False;
     nbp = 0;
index 78348a95b3fc4b01c2347e80f9a5e1c8032131b9..6370a5626b9a6b9a2fd115f682927f068f2bfeb9 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Circ2d.hxx>
 #include <gp_Elips2d.hxx>
 #include <gp_Hypr2d.hxx>
 #include <gp_XY.hxx>
 #include <IntAna2d_Conic.hxx>
 
-IntAna2d_Conic::IntAna2d_Conic (const gp_Lin2d& L) {
+IntAna2d_Conic::IntAna2d_Conic (const gp_Lin2d& L) : a(0.0), b(0.0), c(0.0) {
 
-  a = 0.0;
-  b = 0.0;
-  c = 0.0;
+  
+  
+  
   L.Coefficients(d,e,f);
   f = 2*f;
 }
@@ -55,9 +57,9 @@ IntAna2d_Conic::IntAna2d_Conic (const gp_Hypr2d& H) {
 void IntAna2d_Conic::NewCoefficients(Standard_Real& A,Standard_Real& B,Standard_Real& C
                          ,Standard_Real& D,Standard_Real& E,Standard_Real& F
                          ,const gp_Ax2d& Dir1)  const {
-  Standard_Real t11,t12,t13;                  // x = t11 X + t12 Y + t13
-  Standard_Real t21,t22,t23;                  // y = t21 X + t22 Y + t23
-  Standard_Real A1,B1,C1,D1,E1,F1;            
+  Standard_Real t11 = NAN,t12 = NAN,t13 = NAN;                  // x = t11 X + t12 Y + t13
+  Standard_Real t21 = NAN,t22 = NAN,t23 = NAN;                  // y = t21 X + t22 Y + t23
+  Standard_Real A1 = NAN,B1 = NAN,C1 = NAN,D1 = NAN,E1 = NAN,F1 = NAN;            
 
   //      P0(x,y)=A x x + B y y + ... + F =0  (x,y "absolute" coordinates)
   // and  P1(X(x,y),Y(x,y))=P0(x,y)
@@ -82,20 +84,20 @@ void IntAna2d_Conic::NewCoefficients(Standard_Real& A,Standard_Real& B,Standard_
 
 
 Standard_Real IntAna2d_Conic::Value (const Standard_Real X, const Standard_Real Y) const {
-  Standard_Real _a,_b,_c,_d,_e,_f;
+  Standard_Real _a = NAN,_b = NAN,_c = NAN,_d = NAN,_e = NAN,_f = NAN;
   this->Coefficients(_a,_b,_c,_d,_e,_f);
   return (_a*X*X + _b*Y*Y + 2.*_c*X*Y + 2.*_d*X + 2.*_e*Y +_f);
 }
 
 gp_XY IntAna2d_Conic::Grad (const Standard_Real X, const Standard_Real Y) const {
-  Standard_Real _a,_b,_c,_d,_e,_f;
+  Standard_Real _a = NAN,_b = NAN,_c = NAN,_d = NAN,_e = NAN,_f = NAN;
   this->Coefficients(_a,_b,_c,_d,_e,_f);
   return gp_XY(2.*_a*X + 2.*_c*Y + 2.*_d, 2.*_b*Y + 2.*_c*X + 2.*_e);
 }
 
 void IntAna2d_Conic::ValAndGrad (const Standard_Real X, const Standard_Real Y, 
                                  Standard_Real& Val, gp_XY& Grd) const {
-  Standard_Real la,lb,lc,ld,le,lf;
+  Standard_Real la = NAN,lb = NAN,lc = NAN,ld = NAN,le = NAN,lf = NAN;
   this->Coefficients(la,lb,lc,ld,le,lf);
   Grd.SetCoord(2.*la*X + 2.*lc*Y + 2.*ld, 2.*lb*Y + 2.*lc*X + 2.*le);
   Val = la*X*X + lb*Y*Y + 2.*lc*X*Y + 2.*ld*X + 2.*le*Y +lf;
index af8ec25fe122593cce8813d878146a774c3cff89..12694609d0dfa76ada26612e0cfc97017681abfb 100644 (file)
@@ -82,12 +82,12 @@ private:
 
 
 
-  Standard_Real a;
-  Standard_Real b;
-  Standard_Real c;
-  Standard_Real d;
-  Standard_Real e;
-  Standard_Real f;
+  Standard_Real a{};
+  Standard_Real b{};
+  Standard_Real c{};
+  Standard_Real d{};
+  Standard_Real e{};
+  Standard_Real f{};
 
 
 };
index d5b960ad247a5d256cea44db491c17d860bb2ca8..c0dfba3b064b4bd9e220b7aed7208fe1ae290202 100644 (file)
@@ -15,6 +15,8 @@
 //============================================================================
 //======================================================= IntAna2d_Outils.cxx
 //============================================================================
+#include <math.h>
+
 #include <IntAna2d_Outils.hxx>
 #include <math_DirectPolynomialRoots.hxx>
 
@@ -22,10 +24,10 @@ MyDirectPolynomialRoots::MyDirectPolynomialRoots(const Standard_Real A4,
                                                 const Standard_Real A3,
                                                 const Standard_Real A2,
                                                 const Standard_Real A1,
-                                                const Standard_Real A0) { 
+                                                const Standard_Real A0) : nbsol(0), same(Standard_False) 
   //-- std::cout<<" IntAna2d : A4..A0 "<<A4<<" "<<A3<<" "<<A2<<" "<<A1<<" "<<A0<<" "<<std::endl;
-  nbsol = 0;
-  same = Standard_False;
+  
+  
 //  Modified by Sergey KHROMOV - Thu Oct 24 13:10:14 2002 Begin
   Standard_Real anAA[5];
 
@@ -41,7 +43,7 @@ MyDirectPolynomialRoots::MyDirectPolynomialRoots(const Standard_Real A4,
     same = Standard_True;
     return;
   }
-  Standard_Integer i,j,nbp;
+  Standard_Integer i = 0,j = 0,nbp = 0;
   for (size_t anIdx = 0; anIdx < sizeof (val) / sizeof (val[0]); anIdx++)
   {
     val[anIdx] = RealLast();
@@ -164,7 +166,7 @@ MyDirectPolynomialRoots::MyDirectPolynomialRoots(const Standard_Real A4,
       TriOK = Standard_True;
       for(i=1; i<nbsol;i++) { 
        if(Abs(val[i])<Abs(val[i-1])) { 
-         Standard_Real t;
+         Standard_Real t = NAN;
          t        = val[i];
          val[i]   = val[i-1];
          val[i-1] = t;
@@ -239,7 +241,7 @@ Standard_Boolean Points_Confondus(const Standard_Real x1,const Standard_Real y1
 
 void Traitement_Points_Confondus(Standard_Integer& nb_pts,
                                 IntAna2d_IntPoint* pts) {
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   for(i=nb_pts;i>1;i--) {  
     Standard_Boolean Non_Egalite=Standard_True;
     for(j=i-1;(j>0) && Non_Egalite;j--) { 
@@ -251,10 +253,10 @@ void Traitement_Points_Confondus(Standard_Integer& nb_pts,
                          pts[i-1].Value().Y(),
                          pts[j-1].Value().X(),
                          pts[j-1].Value().Y())) {
-       Standard_Integer k;
+       Standard_Integer k = 0;
        Non_Egalite=Standard_False;
        for(k=i;k<nb_pts;k++) {
-         Standard_Real Xk,Yk,Uk;
+         Standard_Real Xk = NAN,Yk = NAN,Uk = NAN;
          Xk=pts[k].Value().X();
          Yk=pts[k].Value().Y();
          Uk=pts[k].ParamOnFirst();
@@ -271,8 +273,8 @@ void Coord_Ancien_Repere(Standard_Real& x1,
                          Standard_Real& y1,
                          const gp_Ax2d& Dir1)
 {
-  Standard_Real t11,t12,t21,t22,t13,t23;
-  Standard_Real x0,y0;  
+  Standard_Real t11 = NAN,t12 = NAN,t21 = NAN,t22 = NAN,t13 = NAN,t23 = NAN;
+  Standard_Real x0 = NAN,y0 = NAN;  
 
   // x1 et y1 Sont les Coordonnees dans le repere lie a Dir1
   // On Renvoie ces Coordonnees dans le repere "absolu"
index 9e72716d280c3fabb5566156bacf93ee3cf91926..2cb6d703b0e2752b7a4cf7b8c97ffb4e7d3f0eea 100644 (file)
@@ -38,8 +38,8 @@ public:
   Standard_Real    IsDone() const { return(nbsol>-1); }
   Standard_Boolean InfiniteRoots() const { return(same); } 
 private:
-  Standard_Real      sol[16];
-  Standard_Real      val[16];
+  Standard_Real      sol[16]{};
+  Standard_Real      val[16]{};
   Standard_Integer   nbsol;
   Standard_Boolean   same;
 }; 
index aa21a3f1befaf253b39572ca0efd49cc90605ebe..f08109d42ecb64648b3de32d4586f25cbfb3f4d9 100644 (file)
@@ -62,74 +62,61 @@ IntCurve_IConicTool::IntCurve_IConicTool(void)
 }
 
 
-IntCurve_IConicTool::IntCurve_IConicTool(const IntCurve_IConicTool& ITool) {
-  prm1=ITool.prm1;
-  prm2=ITool.prm2;
-  prm3=ITool.prm3;
-  Axis=ITool.Axis;
-  Abs_To_Object=ITool.Abs_To_Object;
-  type=ITool.type;
+IntCurve_IConicTool::IntCurve_IConicTool(const IntCurve_IConicTool& ITool) : prm1(ITool.prm1), prm2(ITool.prm2), prm3(ITool.prm3), Axis(ITool.Axis), type(ITool.type), Abs_To_Object(ITool.Abs_To_Object) {
+  
+  
+  
+  
+  
+  
 }
 //======================================================================
 //======================================================================
 IntCurve_IConicTool::IntCurve_IConicTool(const gp_Lin2d& Line)
 : prm1(0.0),
   prm2(0.0),
-  prm3(0.0) 
+  prm3(0.0), type(GeomAbs_Line) 
 {
   Line.Coefficients(Line_a,Line_b,Line_c);
   Axis = gp_Ax22d(Line.Position(),Standard_True);
-  type = GeomAbs_Line;
+  
 }
 //======================================================================
 IntCurve_IConicTool::IntCurve_IConicTool(const gp_Elips2d& Elips)
-: prm1(0.0),
-  prm2(0.0),
-  prm3(0.0) 
+: prm1(Elips.MajorRadius()),
+  prm2(Elips.MinorRadius()),
+  prm3(sqrt(Elips_a*Elips_a-Elips_b*Elips_b)),
+  Axis(Elips.Axis()),
+  type(GeomAbs_Ellipse) 
 {
-  Elips_a = Elips.MajorRadius();
-  Elips_b = Elips.MinorRadius();
-  Elips_c = sqrt(Elips_a*Elips_a-Elips_b*Elips_b);
-  Axis = Elips.Axis();
   Abs_To_Object.SetTransformation(gp::OX2d(),Axis.XAxis());
-  type = GeomAbs_Ellipse;
 }
 //======================================================================
 IntCurve_IConicTool::IntCurve_IConicTool(const gp_Circ2d& C)
-: prm1(0.0),
-  prm2(0.0),
-  prm3(0.0)
+: prm1(C.Radius()), prm2(0.0),
+  prm3(0.0), Axis(C.Axis()), type(GeomAbs_Circle)
 {
-  Circle_r=C.Radius();
-  Axis=C.Axis();
+  
+  
   Circle_x0=Axis.Location().X();
   Circle_y0=Axis.Location().Y();
   Abs_To_Object.SetTransformation(gp::OX2d(),Axis.XAxis());
-  type = GeomAbs_Circle;
+  
 }
 //======================================================================
 IntCurve_IConicTool::IntCurve_IConicTool(const gp_Parab2d& P)
-: prm1(0.0),
-  prm2(0.0),
-  prm3(0.0)
+: prm1(P.Focal()),
+  prm2(4.0*Parab_f), prm3(0.0), type(GeomAbs_Parabola)
 {
-  Parab_f=P.Focal();
-  Parab_2p=4.0*Parab_f;
   Axis=P.Axis();
   Abs_To_Object.SetTransformation(gp::OX2d(),Axis.XAxis());
-  type = GeomAbs_Parabola;
 }
 //======================================================================
 IntCurve_IConicTool::IntCurve_IConicTool(const gp_Hypr2d& H)
-: prm1(0.0),
-  prm2(0.0),
-  prm3(0.0)
+: prm1(H.MajorRadius()),
+  prm2(H.MinorRadius()), prm3(0.0), Axis(H.Axis()), type(GeomAbs_Hyperbola)
 {
-  Hypr_a = H.MajorRadius();
-  Hypr_b = H.MinorRadius();
-  Axis = H.Axis();
   Abs_To_Object.SetTransformation(gp::OX2d(),Axis.XAxis());
-  type = GeomAbs_Hyperbola;
 }
 //----------------------------------------------------------------------
 gp_Pnt2d IntCurve_IConicTool::Value(const Standard_Real X) const {
index 37f4833da14c397540a57f8ec051e4fa383e84d7..7839cbdf0d9d517cfb842a4b586d2a38128cbce7 100644 (file)
@@ -16,6 +16,8 @@
 
 // Modified:    OFV Thu Nov  6 17:03:52 2003
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <gp_Circ2d.hxx>
 #include <gp_Elips2d.hxx>
@@ -206,7 +208,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d&        L,
 
   Inter.SetReversedParameters(ReversedParameters());
 
-  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
+  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol = NAN;
   gp_Pnt2d Pntinf,Pntsup;
   if(Tol > TolConf) maxtol = Tol; else maxtol = TolConf;
   maxtol*=100.0;
@@ -283,7 +285,7 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d&       C,
     D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+M_PI+M_PI);
   }
   
-  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
+  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol = NAN;
   gp_Pnt2d Pntinf,Pntsup;
   maxtol = C.Radius() / 10.0;
   gp_Circ2d Cp(C);
@@ -400,7 +402,7 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d&       C,
   if(! DC.IsClosed()) {
     D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+M_PI+M_PI); 
   }
-  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
+  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol = NAN;
   gp_Pnt2d Pntinf,Pntsup;
   maxtol = C.Radius() / 10.0;
   gp_Vec2d Offset(maxtol*H.XAxis().Direction().X(),
@@ -470,7 +472,7 @@ void IntCurve_IntConicConic::Perform(const gp_Parab2d& P1,
   PCurve.SetAccuracy(20);
   Inter.SetReversedParameters(ReversedParameters());
   
-  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
+  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol = NAN;
   gp_Pnt2d Pntinf,Pntsup;
   if(Tol > TolConf) maxtol = Tol; else maxtol = TolConf;
   maxtol*=100.0;
@@ -549,7 +551,7 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d&      E,
 
   //-- std::cout<<" Parab Elips "<<std::endl;
 
-  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
+  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol = NAN;
   gp_Pnt2d Pntinf,Pntsup;
   if(Tol > TolConf) maxtol = Tol; else maxtol = TolConf;
 
@@ -625,7 +627,7 @@ void IntCurve_IntConicConic::Perform(const gp_Parab2d&      P,
   IntCurve_PConic PCurve(H);
   Inter.SetReversedParameters(ReversedParameters());
 
-  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
+  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol = NAN;
   gp_Pnt2d Pntinf,Pntsup;
   if(Tol > TolConf) maxtol = Tol; else maxtol = TolConf;
   maxtol*=100.0;
@@ -747,7 +749,7 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d&      E,
     DEModif.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
   }
   
-  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
+  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol = NAN;
   gp_Pnt2d Pntinf,Pntsup;
   maxtol = E.MinorRadius() / 10.0;
   gp_Vec2d Offset(maxtol*H.XAxis().Direction().X(),
@@ -822,7 +824,7 @@ void IntCurve_IntConicConic::Perform(const gp_Hypr2d&       H1,
   
   Inter.SetReversedParameters(ReversedParameters());
 
-  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
+  Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol = NAN;
   gp_Pnt2d Pntinf,Pntsup;
   if(Tol > TolConf) maxtol = Tol; else maxtol = TolConf;
   maxtol*=100.0;
index 4ecd7bce427467374c4b8354ef5f5db4a9365ce7..d1245ef188559f305970ccccbc97550b024695dc 100644 (file)
@@ -16,6 +16,8 @@
 
 // a modifier le cas de 2 points confondus ( Insert a la place d'append ? ) 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <gp.hxx>
 #include <gp_Circ2d.hxx>
@@ -140,7 +142,7 @@ void CircleCircleGeometricIntersection(const gp_Circ2d& C1
                                       ,PeriodicInterval& C1_Res2
                                       ,Standard_Integer& nbsol) {
   
-  Standard_Real C1_binf1,C1_binf2=0,C1_bsup1,C1_bsup2=0;
+  Standard_Real C1_binf1 = NAN,C1_binf2=0,C1_bsup1 = NAN,C1_bsup2=0;
   Standard_Real dO1O2=(C1.Location()).Distance(C2.Location());
   Standard_Real R1=C1.Radius();
   Standard_Real R2=C2.Radius();
@@ -172,7 +174,7 @@ void CircleCircleGeometricIntersection(const gp_Circ2d& C1
     Standard_Real R1pTolR1pTol=R1pTol*R1pTol;
     Standard_Real R1mTolR1mTol=R1mTol*R1mTol;
     Standard_Real dO1O2dO1O2=dO1O2*dO1O2;
-    Standard_Real dAlpha1;
+    Standard_Real dAlpha1 = NAN;
     //--------------------------------------------------------------- Cas 
     //-- C2 coupe le cercle C1+ (=C(x1,y1,R1+Tol))
     //--            1 seul segment donne par Inter C2 C1+
@@ -258,7 +260,7 @@ void CircleCircleGeometricIntersection(const gp_Circ2d& C1
   gp_Vec2d Axe1=C1.XAxis().Direction();
   gp_Vec2d AxeO1O2=gp_Vec2d(C1.Location(),C2.Location());
   
-  Standard_Real dAngle1;
+  Standard_Real dAngle1 = NAN;
   if(AxeO1O2.Magnitude() <= gp::Resolution()) 
     dAngle1=Axe1.Angle(C2.XAxis().Direction());
   else
@@ -392,7 +394,7 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
   Standard_Real dO1O2=Line.Distance(Circle.Location());
   Standard_Real R=Circle.Radius();
   Standard_Real RmTol=R-Tol;
-  Standard_Real binf1,binf2=0,bsup1,bsup2=0;
+  Standard_Real binf1 = NAN,binf2=0,bsup1 = NAN,bsup2=0;
     
   //---------------------------------------------------------------- 
   if(dO1O2 > (R+Tol))  {  //-- pas d intersection avec le 'tuyau'
@@ -408,13 +410,13 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
   }
   else { 
     //---------------------------------------------------------------- 
-    Standard_Boolean b2Sol;
-    Standard_Real dAlpha1;
+    Standard_Boolean b2Sol = 0;
+    Standard_Real dAlpha1 = NAN;
     //---------------------------------------------------------------
     //-- Line coupe le cercle Circle+ (=C(x1,y1,R1+Tol))
     b2Sol=Standard_False;
     if (R>dO1O2+TolTang) {
-      Standard_Real aX2, aTol2;
+      Standard_Real aX2 = NAN, aTol2 = NAN;
       //
       aTol2=Tol*Tol;
       aX2=4.*(R*R-dO1O2*dO1O2);
@@ -479,7 +481,7 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
 #endif  
   
   
-  Standard_Real a,b,c,d;
+  Standard_Real a = NAN,b = NAN,c = NAN,d = NAN;
   Line.Coefficients(a,b,c);
   
   d = a*Circle.Location().X() + b*Circle.Location().Y() + c;
@@ -832,7 +834,7 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d& Circle1
   Standard_Real R2=Circle2.Radius();
   Standard_Real Tol2=Tol+Tol;     //---- Pour eviter de toujours retourner
                                   //des segments
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   if(Tol < (1e-10))
     Tol2 = 1e-10; 
 
@@ -1110,7 +1112,7 @@ static Standard_Boolean computeIntPoint(const IntRes2d_Domain& theCurDomain,
 
   Standard_Real aRes2 = theParOther + (theResSup - theParCur) * theCosT1T2;
 
-  Standard_Real aFirst2, aLast2, aTol21, aTol22, aTol11, aTol12 ;
+  Standard_Real aFirst2 = NAN, aLast2 = NAN, aTol21 = NAN, aTol22 = NAN, aTol11 = NAN, aTol12 = NAN ;
   
   getDomainParametrs(theDomainOther,aFirst2, aLast2, aTol21, aTol22);
   
@@ -1142,7 +1144,7 @@ static Standard_Boolean computeIntPoint(const IntRes2d_Domain& theCurDomain,
   Standard_Real aResU1 = theParCur;
   Standard_Real aResU2 = theParOther;
 
-  Standard_Real aFirst1, aLast1;
+  Standard_Real aFirst1 = NAN, aLast1 = NAN;
   getDomainParametrs(theCurDomain,aFirst1, aLast1, aTol11, aTol12);
   
   Standard_Boolean isInside1 = (theParCur >= aFirst1 && theParCur <= aLast1);
@@ -1219,13 +1221,13 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1
   this->ResetFields();
 
   //-- Coordonnees du point d intersection sur chacune des 2 droites
-  Standard_Real U1,U2
+  Standard_Real U1 = NAN,U2 = NAN
   //-- Nombre de points solution : 1 : Intersection
   //--                             0 : Non Confondues
   //--                             2 : Confondues a la tolerance pres
-  Standard_Integer nbsol;
+  Standard_Integer nbsol = 0;
   IntRes2d_IntersectionPoint PtSeg1,PtSeg2;
-  Standard_Real aHalfSinL1L2;
+  Standard_Real aHalfSinL1L2 = NAN;
   Standard_Real Tol = TolR;
   if(Tol < Precision::PConfusion())
     Tol = Precision::PConfusion();
@@ -1255,8 +1257,8 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1
     Standard_Real U1sup=U1+d;
     Standard_Real U1mU2=U1-U2;
     Standard_Real U1pU2=U1+U2;
-    Standard_Real Res1inf,Res1sup;
-    Standard_Real ProdVectTan;
+    Standard_Real Res1inf = NAN,Res1sup = NAN;
+    Standard_Real ProdVectTan = NAN;
     
 
     //---------------------------------------------------
@@ -1345,8 +1347,8 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1
       
       else {
        //-- Intersection AND Domain1  --------> Segment ---------------------
-       Standard_Real U2inf,U2sup;
-       Standard_Real Res2inf,Res2sup;
+       Standard_Real U2inf = NAN,U2sup = NAN;
+       Standard_Real Res2inf = NAN,Res2sup = NAN;
        
        if (isOpposite) { U2inf = U1pU2 -Res1sup; U2sup= U1pU2-Res1inf; }
        else            { U2inf = Res1inf-U1mU2;  U2sup= Res1sup-U1mU2; }
@@ -1459,7 +1461,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1
            }
            gp_Pnt2d Ptdebut;
            if(Pos1a==IntRes2d_Middle) { 
-             Standard_Real t3;
+             Standard_Real t3 = NAN;
              if (isOpposite) {
                t3 = (Pos2a == IntRes2d_Head)? Res2sup : Res2inf;
              }
@@ -1529,7 +1531,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1
              if(Pos1b!=IntRes2d_Middle || Pos2b!=IntRes2d_Middle) {
                gp_Pnt2d Ptfin;
                if(Pos1b==IntRes2d_Middle) {
-                 Standard_Real t2;
+                 Standard_Real t2 = NAN;
                  if (isOpposite) {
                    t2 = (Pos2b == IntRes2d_Head)? Res2sup : Res2inf;
                  }
@@ -1682,7 +1684,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1
       //--
       Standard_Integer ResHasFirstPoint=0;    
       Standard_Integer ResHasLastPoint=0;
-      Standard_Real ParamStart = 0.,ParamStart2,ParamEnd = 0.,ParamEnd2;
+      Standard_Real ParamStart = 0.,ParamStart2 = NAN,ParamEnd = 0.,ParamEnd2 = NAN;
       Standard_Real Org2SurL1=ElCLib::Parameter(L1,L2.Location());
       //== 3 : L1 et L2 bornent
       //== 2 :       L2 borne
@@ -1998,7 +2000,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& Line
   //--      ( Rayon * Intervalle.Length()    <    TolConf   )   ### Modif 19 Nov Tol-->TolConf
   //--
   Standard_Real R=Circle.Radius();
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   Standard_Real MaxTol = TolConf;
   if(MaxTol<Tol) MaxTol = Tol;
   if(MaxTol<1.0e-10) MaxTol = 1.0e-10; 
@@ -2110,7 +2112,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& Line
       IntImpParGen::DeterminePosition(Pos1a,CIRC_Domain,P1a,SolutionCircle[i].Binf);
       IntImpParGen::DeterminePosition(Pos2a,LIG_Domain,P2a,Linf); 
       Determine_Transition_LC(Pos1a,Tan1,Norm1,T1a , Pos2a,Tan2,Norm2,T2a, Tol);
-      Standard_Real Cinf;
+      Standard_Real Cinf = NAN;
       if(Pos1a==IntRes2d_End) {
        Cinf = CIRC_Domain.LastParameter();
        P1a  = CIRC_Domain.LastPoint();
@@ -2147,7 +2149,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& Line
        IntImpParGen::DeterminePosition(Pos1b,CIRC_Domain,P1b,SolutionCircle[i].Bsup);
        IntImpParGen::DeterminePosition(Pos2b,LIG_Domain,P2b,Lsup);
        Determine_Transition_LC(Pos1b,Tan1,Norm1,T1b , Pos2b,Tan2,Norm2,T2b, Tol);
-       Standard_Real Csup;
+       Standard_Real Csup = NAN;
        if(Pos1b==IntRes2d_End) {
          Csup = CIRC_Domain.LastParameter();
          P1b  = CIRC_Domain.LastPoint();
@@ -2273,7 +2275,7 @@ void LineEllipseGeometricIntersection(const gp_Lin2d& Line,
     eps0 = 1.e-6;
   }
   //
-  Standard_Real anA, aB, aC;
+  Standard_Real anA = NAN, aB = NAN, aC = NAN;
   aTLine.Coefficients(anA, aB, aC);
   if (IsVert)
   {
@@ -2292,7 +2294,7 @@ void LineEllipseGeometricIntersection(const gp_Lin2d& Line,
     if (D < 0.)
     {
       Extrema_ExtElC2d anExt(aTLine, aTEllipse);
-      Standard_Integer i, imin = 0;
+      Standard_Integer i = 0, imin = 0;
       Standard_Real dmin = RealLast();
       for (i = 1; i <= anExt.NbExt(); ++i)
       {
@@ -2542,7 +2544,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L, const
   //-- Calculation of Transitions at Positions.
   //----------------------------------------------------------------------
   Standard_Real R = E.MinorRadius();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real MaxTol = TolConf;
   if (MaxTol<Tol) MaxTol = Tol;
   if (MaxTol<1.0e-10) MaxTol = 1.0e-10;
@@ -2619,7 +2621,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L, const
       IntImpParGen::DeterminePosition(Pos1a, DE, P1a, SolutionEllipse[i].Binf);
       IntImpParGen::DeterminePosition(Pos2a, DL, P2a, Linf);
       Determine_Transition_LC(Pos1a, Tan1, Norm1, T1a, Pos2a, Tan2, Norm2, T2a, Tol);
-      Standard_Real Einf;
+      Standard_Real Einf = NAN;
       if (Pos1a == IntRes2d_End) {
         Einf = DE.LastParameter();
         P1a = DE.LastPoint();
@@ -2659,7 +2661,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L, const
         IntImpParGen::DeterminePosition(Pos1b, DE, P1b, SolutionEllipse[i].Bsup);
         IntImpParGen::DeterminePosition(Pos2b, DL, P2b, Lsup);
         Determine_Transition_LC(Pos1b, Tan1, Norm1, T1b, Pos2b, Tan2, Norm2, T2b, Tol);
-        Standard_Real Esup;
+        Standard_Real Esup = NAN;
         if (Pos1b == IntRes2d_End) {
           Esup = DL.LastParameter();
           P1b = DE.LastPoint();
index dba97847bd2cb5fc3132015734fdad59bc3eb25d..1ad220b63c7ba283c318edb5849aa06985deb703 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntCurve_IntConicConic_Tool.hxx>
 #include <gp.hxx>
 
@@ -91,7 +93,7 @@ Standard_Real NormalizeOnCircleDomain(const Standard_Real _Param
 //----------------------------------------------------------------------
 PeriodicInterval PeriodicInterval::FirstIntersection(PeriodicInterval& PInter)
 {
-  Standard_Real a,b;
+  Standard_Real a = NAN,b = NAN;
   if(PInter.isnull  || isnull) {
     PeriodicInterval PourSGI; return(PourSGI);
   }
@@ -123,7 +125,7 @@ PeriodicInterval PeriodicInterval::FirstIntersection(PeriodicInterval& PInter)
 //----------------------------------------------------------------------
 PeriodicInterval PeriodicInterval::SecondIntersection(PeriodicInterval& PInter)
 {
-  Standard_Real a,b;
+  Standard_Real a = NAN,b = NAN;
 
   
   if(PInter.isnull 
@@ -153,8 +155,8 @@ Interval::Interval() :
     Binf(0.),
     Bsup(0.),
     HasFirstBound(Standard_False),
-    HasLastBound(Standard_False)
-{ IsNull=Standard_True; }
+    HasLastBound(Standard_False), IsNull(Standard_True)
+{ }
 
 Interval::Interval(const Standard_Real a,const Standard_Real b) { 
   HasFirstBound=HasLastBound=Standard_True;
@@ -165,9 +167,9 @@ Interval::Interval(const Standard_Real a,const Standard_Real b) {
 
 Interval::Interval(const IntRes2d_Domain& Domain)
 : Binf(0.0),
-  Bsup(0.0)
+  Bsup(0.0), IsNull(Standard_False)
 {
-  IsNull=Standard_False;
+  
   if(Domain.HasFirstPoint()) {
     HasFirstBound=Standard_True;
     Binf=Domain.FirstParameter()-Domain.FirstTolerance();
@@ -182,11 +184,11 @@ Interval::Interval(const IntRes2d_Domain& Domain)
 }
 
 Interval::Interval( const Standard_Real a,const Standard_Boolean hf
-                  ,const Standard_Real b,const Standard_Boolean hl) { 
-  Binf=a; Bsup=b;
-  IsNull=Standard_False;
-  HasFirstBound=hf;
-  HasLastBound=hl;
+                  ,const Standard_Real b,const Standard_Boolean hl) : Binf(a), Bsup(b), IsNull(Standard_False), HasFirstBound(hf), HasLastBound(hl) 
+  
+  
+  
+  
 }
   
 Standard_Real Interval::Length()   { return((IsNull)? -1.0 :Abs(Bsup-Binf)); }
@@ -195,7 +197,7 @@ Interval Interval::IntersectionWithBounded(const Interval& Inter) {
   if(IsNull || Inter.IsNull) { Interval PourSGI; return(PourSGI); }
   if(!(HasFirstBound || HasLastBound)) 
     return(Interval(Inter.Binf,Inter.Bsup));
-  Standard_Real a,b;
+  Standard_Real a = NAN,b = NAN;
   if(HasFirstBound) {
     if(Inter.Bsup < Binf) { Interval PourSGI; return(PourSGI); }
     a=(Inter.Binf < Binf)? Binf : Inter.Binf;
index 25f2a2f1f325acefae7595f9ec4ea8b7d309e60d..76b7782903445f69980307ce3437c20e941c486b 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <gp_Pnt2d.hxx>
 #include <IntCurve_PConic.hxx>
@@ -28,7 +30,7 @@ Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
                                        const Standard_Real)  {
 
 
-  Standard_Real ParamSup,ParamInf,Param=0;
+  Standard_Real ParamSup = NAN,ParamInf = NAN,Param=0;
   if(LowParameter>HighParameter) {
     ParamSup=LowParameter;
     ParamInf=HighParameter;
index 62e6b30c74e8fb83cb60fe5f4c32a8d1f14c0be4..c8e97f09074d1b34d8a30d0359bff3c6543959df 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <IntCurveSurface_Intersection.hxx>
 #include <IntCurveSurface_IntersectionPoint.hxx>
 #include <IntCurveSurface_IntersectionSegment.hxx>
@@ -62,7 +64,7 @@ void IntCurveSurface_Intersection::SetValues(const IntCurveSurface_Intersection&
     lseg.Clear();
     lpnt.Clear();
     Standard_Integer N = Other.lpnt.Length();
-    Standard_Integer i ;
+    Standard_Integer i = 0 ;
     for( i=1; i<= N ; i++) { 
       lpnt.Append(Other.lpnt.Value(i));
     }
@@ -83,7 +85,7 @@ void IntCurveSurface_Intersection::Append(const IntCurveSurface_Intersection& Ot
 //                                       const Standard_Real b) 
                                          const Standard_Real ) 
 { 
-  Standard_Integer i,ni;
+  Standard_Integer i = 0,ni = 0;
   if(Other.done) { 
     ni = Other.lpnt.Length();
     for(i=1;i<=ni;i++) {   Append(Other.Point(i)); }
@@ -93,8 +95,8 @@ void IntCurveSurface_Intersection::Append(const IntCurveSurface_Intersection& Ot
 }
 //================================================================================
 void IntCurveSurface_Intersection::Append(const IntCurveSurface_IntersectionPoint& OtherPoint) { 
-  Standard_Integer i,ni;
-  Standard_Real anu,anv,anw,u,v,w;
+  Standard_Integer i = 0,ni = 0;
+  Standard_Real anu = NAN,anv = NAN,anw = NAN,u = NAN,v = NAN,w = NAN;
   IntCurveSurface_TransitionOnCurve   TrOnCurve,anTrOnCurve;
   gp_Pnt P,anP;
   ni = lpnt.Length();
@@ -129,7 +131,7 @@ void IntCurveSurface_Intersection::ResetFields() {
 //================================================================================
 void IntCurveSurface_Intersection::Dump() const { 
   if(done) { 
-    Standard_Integer i,ni;
+    Standard_Integer i = 0,ni = 0;
     ni = lpnt.Length();
     for(i=1;i<=ni;i++) {   Point(i).Dump(); }
     ni = lseg.Length();
index 6db23180f96a603569236e26be4ad14d5f638d28..f042a1457e4fbb1990ae8a342bf00f17e6c4aa22 100644 (file)
@@ -16,6 +16,8 @@
 
 #define OPTIMISATION 1 
 
+#include <math.h>
+
 #include <IntCurvesFace_Intersector.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -58,8 +60,8 @@ static void ComputeSamplePars(const Handle(Adaptor3d_Surface)& Hsurface,
   TColStd_Array1OfInteger NbUSubInts(1, NbUInts);
   TColStd_Array1OfInteger NbVSubInts(1, NbVInts);
   //
-  Standard_Integer i, j, ind, NbU, NbV;
-  Standard_Real t, dt;
+  Standard_Integer i = 0, j = 0, ind = 0, NbU = 0, NbV = 0;
+  Standard_Real t = NAN, dt = NAN;
   t = UInts(NbUInts + 1) - UInts(1);
   t = 1. / t;
   NbU = 0;
@@ -132,11 +134,11 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face,
   done(Standard_False),
   myReady(Standard_False),
   nbpnt(0),
-  myUseBoundTol (UseBToler),
+  face(Face), myUseBoundTol (UseBToler),
   myIsParallel(Standard_False)
 { 
   BRepAdaptor_Surface surface;
-  face = Face;
+  
   surface.Initialize(Face, aRestr);
   Hsurface = new BRepAdaptor_Surface(surface);
   myTopolTool = new BRepTopAdaptor_TopolTool(Hsurface);
@@ -147,8 +149,8 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face,
      && (SurfaceType != GeomAbs_Cone) 
      && (SurfaceType != GeomAbs_Sphere)
      && (SurfaceType != GeomAbs_Torus)) {
-    Standard_Integer nbsu,nbsv;
-    Standard_Real U0,V0,U1,V1;
+    Standard_Integer nbsu = 0,nbsv = 0;
+    Standard_Real U0 = NAN,V0 = NAN,U1 = NAN,V1 = NAN;
     U0 = Hsurface->FirstUParameter();
     U1 = Hsurface->LastUParameter();
     V0 = Hsurface->FirstVParameter();
@@ -253,7 +255,7 @@ void IntCurvesFace_Intersector::InternalCall(const IntCurveSurface_HInter &HICS,
           for(; anExp.More(); anExp.Next())
           {
             TopoDS_Edge anE = TopoDS::Edge(anExp.Current());
-            Standard_Real f, l;
+            Standard_Real f = NAN, l = NAN;
             Handle(Geom_Curve) aPC = BRep_Tool::Curve (anE, f, l);
             GeomAPI_ProjectPointOnCurve aProj (HICSPointindex.Pnt(), aPC, f, l);
             if (aProj.NbPoints() > 0)
@@ -445,7 +447,7 @@ void IntCurvesFace_Intersector::Perform(const Handle(Adaptor3d_Curve)& HCu,
     if(parinf<ParMin) parinf = ParMin;
     if(parsup>ParMax) parsup = ParMax;
     if(parinf>(parsup-1e-9)) return; 
-    Standard_Integer nbs;
+    Standard_Integer nbs = 0;
     nbs = IntCurveSurface_TheHCurveTool::NbSamples(HCu,parinf,parsup);
     
     IntCurveSurface_ThePolygonOfHInter polygon(HCu,
index 8010244384079c4bab7a38bd5256dd6dbecd4ee5..4564cf498a9309195cf99c2f66ffa937bb3c8072 100644 (file)
@@ -36,7 +36,7 @@ void IntCurvesFace_ShapeIntersector::Load(const TopoDS_Shape& theShape,
                                           const Standard_Real theTol) 
 { 
   TopExp_Explorer Ex;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(myNbFaces = 0, i = 0, Ex.Init(theShape, TopAbs_FACE); Ex.More(); ++i, Ex.Next()) 
   {
     ++myNbFaces;
@@ -116,7 +116,7 @@ void IntCurvesFace_ShapeIntersector::PerformNearest(const gp_Lin& theL,
   if (!myPtrNums.IsEmpty() && anIndexFace >= 0)
   { 
     myPtrNums.ChangeValue(anIndexFace) += 1;
-    Standard_Integer im1;
+    Standard_Integer im1 = 0;
     for (im1 = anIndexFace - 1, i = anIndexFace; i >= 1 && myPtrNums.Value(i) > myPtrNums.Value(im1); --i, --im1)
     { 
       std::swap(myPtrIndexNums.ChangeValue(i), myPtrIndexNums.ChangeValue(im1));
@@ -186,7 +186,7 @@ void IntCurvesFace_ShapeIntersector::SortResult()
   }
 
   //Sort according to parameter  w
-  Standard_Boolean isOK;
+  Standard_Boolean isOK = 0;
   do 
   { 
     isOK = Standard_True;
index e1c740fc275468ffc3cdd0653c87919b0105c978..8b43044ab42d6ad53ed2bb2378b9411588b0d257 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntImp_ComputeTangence.hxx>
 #include <IntImp_ConstIsoparametric.hxx>
 #include <Standard_OutOfRange.hxx>
@@ -67,8 +69,8 @@ Standard_Boolean IntImp_ComputeTangence(const gp_Vec DPuv[],
 // l intersection 
 
 {
-   Standard_Real NormDuv[4], aM2, aTol2;
-   Standard_Integer i;
+   Standard_Real NormDuv[4], aM2 = NAN, aTol2 = NAN;
+   Standard_Integer i = 0;
    //
    aTol2=1.e-32;
    //
@@ -134,7 +136,7 @@ Standard_Boolean IntImp_ComputeTangence(const gp_Vec DPuv[],
 
      //-- Tri sur NormDuv  ( en para. avec ChoixRef ) 
      Standard_Boolean triOk = Standard_False;
-     Standard_Real t;
+     Standard_Real t = NAN;
      IntImp_ConstIsoparametric ti;
      for ( i=0;i<=3;i++)
      {
index b83b7be16e606307a66acf29ca0b81e8c8c15581..23e5f9b2071466076b4dd8ad7e36dd3fdf7ca0b0 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntImpParGen.hxx>
 
 #include <IntImpParGen_Tool.hxx>
@@ -28,7 +30,7 @@ Standard_Real IntImpParGen::NormalizeOnDomain(Standard_Real& Param,
                                              const IntRes2d_Domain& TheDomain) {
   Standard_Real modParam = Param;
   if(TheDomain.IsClosed()) {
-    Standard_Real Periode,t;
+    Standard_Real Periode = NAN,t = NAN;
     TheDomain.EquivalentParameters(t,Periode);
     Periode-=t;
     while(   modParam<TheDomain.FirstParameter()
@@ -123,7 +125,7 @@ void IntImpParGen::DetermineTransition(const IntRes2d_Position    Pos1,
       else {
        gp_Vec2d Norm;
        Norm.SetCoord(-Tan1.Y(),Tan1.X());
-       Standard_Real Val1,Val2;
+       Standard_Real Val1 = NAN,Val2 = NAN;
        if (!courbure1) {
          Val1=0.0;
        }
index 01cda619d01ead61007cc396d6cb547882755b6b..bd63aa9c4780a64da5dbf3caf046170c7a1ce8d5 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntImpParGen_Tool.hxx>
 #include <gp.hxx>
 
@@ -24,7 +26,7 @@
 Standard_Real NormalizeOnDomain(Standard_Real& Param,const IntRes2d_Domain& TheDomain) {
   Standard_Real modParam = Param;
   if(TheDomain.IsClosed()) {
-    Standard_Real Periode,t;
+    Standard_Real Periode = NAN,t = NAN;
     TheDomain.EquivalentParameters(t,Periode);
     Periode-=t;
     if(TheDomain.HasFirstPoint()) {
@@ -117,7 +119,7 @@ void Determine_Transition(const IntRes2d_Position    Pos1,
       else {
        gp_Vec2d Norm;
        Norm.SetCoord(-Tan1.Y(),Tan1.X());
-       Standard_Real Val1,Val2;
+       Standard_Real Val1 = NAN,Val2 = NAN;
        if (!courbure1) {
          Val1=0.0;
        }
index ff79b379bde3276b6fb0da02345e16dd740c2e24..d36044eef20299f84dcef789bc470a9afe45574b 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Pnt.hxx>
 #include <IntPatch_ALine.hxx>
 #include <IntPatch_Point.hxx>
@@ -29,13 +31,13 @@ IntPatch_ALine::IntPatch_ALine (const IntAna_Curve& C,
                                const IntSurf_TypeTrans Trans1,
                                const IntSurf_TypeTrans Trans2) :
   IntPatch_Line(Tang,Trans1,Trans2),
-  fipt(Standard_False),
+  curv(C), fipt(Standard_False),
   lapt(Standard_False),
   indf(0),
   indl(0)
 {
   typ = IntPatch_Analytic;
-  curv = C;
+  
 }
 
 
@@ -44,26 +46,26 @@ IntPatch_ALine::IntPatch_ALine (const IntAna_Curve& C,
                                const IntSurf_Situation Situ1,
                                const IntSurf_Situation Situ2) :
   IntPatch_Line(Tang,Situ1,Situ2),
-  fipt(Standard_False),
+  curv(C), fipt(Standard_False),
   lapt(Standard_False),
   indf(0),
   indl(0)
 {
   typ = IntPatch_Analytic;
-  curv = C;
+  
 }
 
 
 IntPatch_ALine::IntPatch_ALine (const IntAna_Curve& C,
                                const Standard_Boolean Tang) :
   IntPatch_Line(Tang),
-  fipt(Standard_False),
+  curv(C), fipt(Standard_False),
   lapt(Standard_False),
   indf(0),
   indl(0)
 {
   typ = IntPatch_Analytic;
-  curv = C;
+  
 }
 
 const IntAna_Curve&  IntPatch_ALine::Curve() const { 
@@ -234,11 +236,11 @@ void IntPatch_ALine::AddVertex (const IntPatch_Point& VTXj) {
 
 
 void IntPatch_ALine::ComputeVertexParameters(const Standard_Real Tol) { 
-  Standard_Boolean   SortIsOK,APointDeleted;
+  Standard_Boolean   SortIsOK = 0,APointDeleted = 0;
   Standard_Boolean   SortAgain = Standard_True;
-  Standard_Integer   nbvtx,i,j;
-  Standard_Real ParamMinOnLine,ParamMaxOnLine;
-  Standard_Boolean OpenFirst,OpenLast;
+  Standard_Integer   nbvtx = 0,i = 0,j = 0;
+  Standard_Real ParamMinOnLine = NAN,ParamMaxOnLine = NAN;
+  Standard_Boolean OpenFirst = 0,OpenLast = 0;
   
   ParamMinOnLine = FirstParameter(OpenFirst);
   ParamMaxOnLine = LastParameter(OpenLast);
@@ -605,7 +607,7 @@ void IntPatch_ALine::ComputeVertexParameters(const Standard_Real Tol) {
          IntPatch_Point CopyVtx = VTXm1;
          VTXm1.SetParameter(VTX.ParameterOnLine());
          VTXm1.SetValue(VTX.Value(),VTX.Tolerance(),VTX.IsTangencyPoint());
-         Standard_Real u1,v1,u2,v2;
+         Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
          VTX.Parameters(u1,v1,u2,v2);
          VTXm1.SetParameters(u1,v1,u2,v2);
          if(CopyVtx.IsOnDomS1()) { 
index 54f8f0745324444e7bf50fd29cc6e910df67d16d..0a71ff0afdb7197d2142f5c5e0c15b48d940a44d 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntPatch_ALineToWLine.hxx>
 
 #include <Adaptor3d_Surface.hxx>
@@ -263,7 +265,7 @@ void IntPatch_ALineToWLine::CorrectEndPoint(Handle(IntSurf_LineOn2S)& theLine,
   const Standard_Real aSqTol = 1.e-10;
 
   //Perform linear extrapolation from two previous points
-  Standard_Integer anIndFirst, anIndSecond;
+  Standard_Integer anIndFirst = 0, anIndSecond = 0;
   if (theIndex == 1)
   {
     anIndFirst  = 3;
@@ -290,7 +292,7 @@ void IntPatch_ALineToWLine::CorrectEndPoint(Handle(IntSurf_LineOn2S)& theLine,
     }
     else if (aQuad.TypeQuadric() == GeomAbs_Sphere)
     {
-      Standard_Real aU, aV;
+      Standard_Real aU = NAN, aV = NAN;
       aPntOn2S.ParametersOnSurface(anIsOnFirst, aU, aV);
       if (Abs(aV - M_PI/2) > aTol &&
           Abs(aV + M_PI/2) > aTol)
@@ -303,7 +305,7 @@ void IntPatch_ALineToWLine::CorrectEndPoint(Handle(IntSurf_LineOn2S)& theLine,
     gp_Pnt2d PrevP2d     = theLine->Value (anIndSecond).ValueOnSurface(anIsOnFirst);
     gp_Dir2d aDir = gp_Vec2d(PrevPrevP2d, PrevP2d);
     Standard_Real aX0 = PrevPrevP2d.X(), aY0 = PrevPrevP2d.Y();
-    Standard_Real aXend, aYend;
+    Standard_Real aXend = NAN, aYend = NAN;
     aPntOn2S.ParametersOnSurface(anIsOnFirst, aXend, aYend);
 
     if (Abs(aDir.Y()) < gp::Resolution())
@@ -363,7 +365,7 @@ Standard_Real IntPatch_ALineToWLine::GetSectionRadius(const gp_Pnt& thePnt3d) co
 void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theAline,
                                       IntPatch_SequenceOfLine& theLines) const
 { 
-  Standard_Boolean included;
+  Standard_Boolean included = 0;
   Standard_Real f = theAline->FirstParameter(included); 
   if(!included) {
     f+=myTolOpenDomain;
@@ -615,7 +617,7 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
           }
 
           const gp_Pnt aPnt3d(theALine->Value(aPrt));
-          Standard_Real u1, v1, u2, v2;
+          Standard_Real u1 = NAN, v1 = NAN, u2 = NAN, v2 = NAN;
           myQuad1.Parameters(aPnt3d, u1, v1);
           myQuad2.Parameters(aPnt3d, u2, v2);
           aRPT.SetValue(aPnt3d, u1, v1, u2, v2);
index 0486a742fb65271a25a025bd242c090695e9a061..cef44b08ba8fad1034ad278f06101bd91106eff0 100644 (file)
 
 IntPatch_CSFunction::IntPatch_CSFunction(const Handle(Adaptor3d_Surface)& S1,
                                               const Handle(Adaptor2d_Curve2d)& C,
-                                              const Handle(Adaptor3d_Surface)& S2)
+                                              const Handle(Adaptor3d_Surface)& S2) : surface1((Standard_Address)(&S1)), surface2((Standard_Address)(&S2)), curve((Standard_Address)(&C)), f(0.)
 {
-  surface1 = (Standard_Address)(&S1);
-  surface2 = (Standard_Address)(&S2);
-  curve    = (Standard_Address)(&C);
-  f = 0.;
+  
+  
+  
+  
 }
 
 Standard_Integer IntPatch_CSFunction::NbVariables()const { return 3;}
index 6769b3e04ea47bdae71ecd03e27d75698e149d54..091d654c054892760403f274fb3bef488eebda44 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Circ.hxx>
 #include <IntPatch_GLine.hxx>
 #include <IntPatch_Point.hxx>
@@ -379,9 +381,9 @@ void IntPatch_GLine::AddVertex (const IntPatch_Point& Pnt)
 
 void IntPatch_GLine::ComputeVertexParameters(const Standard_Real /*Tol*/)
 { 
-  Standard_Boolean   SortIsOK,APointDeleted;
+  Standard_Boolean   SortIsOK = 0,APointDeleted = 0;
   Standard_Boolean   SortAgain = Standard_True;
-  Standard_Integer   i,j;
+  Standard_Integer   i = 0,j = 0;
   const Standard_Real ParamMinOnLine = (fipt? Vertex(indf).ParameterOnLine() : -100000.0);
   const Standard_Real ParamMaxOnLine = (lapt? Vertex(indl).ParameterOnLine() :  100000.0);
 
@@ -740,7 +742,7 @@ void IntPatch_GLine::ComputeVertexParameters(const Standard_Real /*Tol*/)
               //                  ||(Abs(ponline-M_PI-M_PI) <=PrecisionPConfusion))
               // eap, <<=
 
-              Standard_Real u1a,v1a,u2a,v2a,u1b,v1b,u2b,v2b;
+              Standard_Real u1a = NAN,v1a = NAN,u2a = NAN,v2a = NAN,u1b = NAN,v1b = NAN,u2b = NAN,v2b = NAN;
               VTXM1.Parameters(u1a,v1a,u2a,v2a);
               VTX.Parameters(u1b,v1b,u2b,v2b);
               Standard_Integer flag  = 0;
index bb2d2eae53f687df4acd5d8a3f1ea00f0d6caeb7..e740f1fe3cb16c49277d8b40a51457ba27130a74 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <IntPatch_HCurve2dTool.hxx>
 
 //============================================================
@@ -22,7 +24,7 @@ Standard_Integer IntPatch_HCurve2dTool::NbSamples (const Handle(Adaptor2d_Curve2
                                                    const Standard_Real U0,
                                                    const Standard_Real U1)
 {
-  Standard_Real nbs;
+  Standard_Real nbs = NAN;
   switch (C->GetType())
   {
     case GeomAbs_Line: return 2;
index 623febdf282e8839495bbf9018d3edd3cf0b59af..fc7a382f59fd95af856e6452025bb278c0f7be58 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_HVertex.hxx>
 #include <Extrema_EPCOfExtPC2d.hxx>
 #include <Extrema_POnCurv2d.hxx>
@@ -235,7 +237,7 @@ Standard_Boolean IntPatch_HInterTool::Project (const Handle(Adaptor2d_Curve2d)&
   Standard_Real epsX = 1.e-8;
   Standard_Integer Nbu = 20;
   Standard_Real Tol = 1.e-5;
-  Standard_Real Dist2;
+  Standard_Real Dist2 = NAN;
 
   Extrema_EPCOfExtPC2d extrema(P,*C,Nbu,epsX,Tol);
   if (!extrema.IsDone()) {
index 6ecec5365188e4692a133a6874487c99d6af7ffe..62c7c6a480100e3539bb0a9124b542759d0e05a3 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntPatch_ImpPrmIntersection.hxx>
 
 #include <Adaptor3d_Surface.hxx>
@@ -99,8 +101,8 @@ static IntPatch_SpecPntType IsSeamOrPole(const Handle(Adaptor3d_Surface)& theQSu
     return IntPatch_SPntNone;
 
   //Parameters on Quadric and on parametric for reference point
-  Standard_Real aUQRef, aVQRef, aUPRef, aVPRef;
-  Standard_Real aUQNext, aVQNext, aUPNext, aVPNext;
+  Standard_Real aUQRef = NAN, aVQRef = NAN, aUPRef = NAN, aVPRef = NAN;
+  Standard_Real aUQNext = NAN, aVQNext = NAN, aUPNext = NAN, aVPNext = NAN;
 
   const gp_Pnt &aP3d = theLine->Value(theRefIndex + 1).Value();
 
@@ -234,9 +236,9 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst,
   const Handle(Adaptor3d_Surface)& PSurf,
   TColStd_Array1OfInteger& Destination)
 {
-  Standard_Integer i,k, NbPoints, seqlength;
-  Standard_Real theparam,test;
-  Standard_Boolean fairpt, ispassing;
+  Standard_Integer i = 0,k = 0, NbPoints = 0, seqlength = 0;
+  Standard_Real theparam = NAN,test = NAN;
+  Standard_Boolean fairpt = 0, ispassing = 0;
   TopAbs_Orientation arcorien,vtxorien;
   Handle(Adaptor2d_Curve2d) thearc;
   Handle(Adaptor3d_HVertex) vtx,vtxbis;
@@ -451,7 +453,7 @@ void Recadre(const Standard_Boolean ,
   Standard_Real U2,
   Standard_Real V2)
 {
-  Standard_Real U1p,V1p,U2p,V2p;
+  Standard_Real U1p = NAN,V1p = NAN,U2p = NAN,V2p = NAN;
   iwline->Line()->Value(Param).Parameters(U1p,V1p,U2p,V2p);
   switch(typeS1)
   {
@@ -518,7 +520,7 @@ Standard_Real GetLocalStep(const Handle(Adaptor3d_Surface)& theSurf,
     {
       TColStd_Array1OfReal anInts(1, aNbInt + 1);
       theSurf->UIntervals(anInts, GeomAbs_C1);
-      Standard_Integer i;
+      Standard_Integer i = 0;
       Standard_Real aMinInt = Precision::Infinite();
       for (i = 1; i <= aNbInt; ++i)
       {
@@ -541,7 +543,7 @@ Standard_Real GetLocalStep(const Handle(Adaptor3d_Surface)& theSurf,
     {
       TColStd_Array1OfReal anInts(1, aNbInt + 1);
       theSurf->VIntervals(anInts, GeomAbs_C1);
-      Standard_Integer i;
+      Standard_Integer i = 0;
       Standard_Real aMinInt = Precision::Infinite();
       for (i = 1; i <= aNbInt; ++i)
       {
@@ -572,10 +574,10 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
   const Standard_Real Fleche,
   const Standard_Real Pas)
 {
-  Standard_Boolean reversed, procf, procl, dofirst, dolast;
-  Standard_Integer indfirst = 0, indlast = 0, ind2, NbSegm;
-  Standard_Integer NbPointIns, NbPointRst, Nblines, Nbpts, NbPointDep;
-  Standard_Real U1,V1,U2,V2,paramf,paraml,currentparam;
+  Standard_Boolean reversed = 0, procf = 0, procl = 0, dofirst = 0, dolast = 0;
+  Standard_Integer indfirst = 0, indlast = 0, ind2 = 0, NbSegm = 0;
+  Standard_Integer NbPointIns = 0, NbPointRst = 0, Nblines = 0, Nbpts = 0, NbPointDep = 0;
+  Standard_Real U1 = NAN,V1 = NAN,U2 = NAN,V2 = NAN,paramf = NAN,paraml = NAN,currentparam = NAN;
 
   IntPatch_TheSegmentOfTheSOnBounds thesegm;
   IntSurf_PathPoint PPoint;
@@ -778,7 +780,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
       return;
     }
 
-    Standard_Real Vmin, Vmax, TolV = 1.e-14;
+    Standard_Real Vmin = NAN, Vmax = NAN, TolV = 1.e-14;
     if (!reversed) { //Surf1 is quadric
       Vmin = Surf1->FirstVParameter();
       Vmax = Surf1->LastVParameter();
@@ -822,7 +824,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
         }
 
         //
-        Standard_Real AnU1,AnU2,AnV2;
+        Standard_Real AnU1 = NAN,AnU2 = NAN,AnV2 = NAN;
 
         GeomAbs_SurfaceType typQuad = Quad.TypeQuadric();
         Standard_Boolean arecadr=Standard_False;
@@ -860,7 +862,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
           //
           if(arecadr) {
             //modified by NIZNHY-PKV Fri Mar 28 15:06:01 2008f
-            Standard_Real aCf, aTwoPI;
+            Standard_Real aCf = NAN, aTwoPI = NAN;
             //
             aCf=0.;
             aTwoPI=M_PI+M_PI;
@@ -1263,7 +1265,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
       Standard_Boolean TransitionOK=Standard_False;
 
       if(thesegm.HasFirstPoint()) { 
-        Standard_Real _u1,_v1,_u2,_v2;
+        Standard_Real _u1 = NAN,_v1 = NAN,_u2 = NAN,_v2 = NAN;
 
         dofirst = Standard_True;
         PStartf = thesegm.FirstPoint();
@@ -1318,7 +1320,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
         }
       }
       if(thesegm.HasLastPoint()) {  
-        Standard_Real _u1,_v1,_u2,_v2;
+        Standard_Real _u1 = NAN,_v1 = NAN,_u2 = NAN,_v2 = NAN;
 
         dolast = Standard_True;
         PStartl = thesegm.LastPoint();
@@ -1410,11 +1412,11 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
 
       // Polygone sur restriction solution
       if (dofirst && dolast) {
-        Standard_Real prm;
+        Standard_Real prm = NAN;
         gp_Pnt ptpoly;
         IntSurf_PntOn2S p2s;
         Handle(IntSurf_LineOn2S) Thelin = new IntSurf_LineOn2S ();
-        Handle(Adaptor2d_Curve2d) arcsegm = thesegm.Curve();
+        const Handle(Adaptor2d_Curve2d)& arcsegm = thesegm.Curve();
         Standard_Integer nbsample = 100;
 
         if (!reversed) {
@@ -2572,7 +2574,7 @@ static void DetectOfBoundaryAchievement(const Handle(Adaptor3d_Surface)& theQSur
 
   const IntSurf_PntOn2S &aPPrev = theSourceLine->Value(thePointIndex - 1),
                         &aPCurr = theSourceLine->Value(thePointIndex);
-  Standard_Real aUPrev, aVPrev, aUCurr, aVCurr;
+  Standard_Real aUPrev = NAN, aVPrev = NAN, aUCurr = NAN, aVCurr = NAN;
   if (theIsReversed)
   {
     aPPrev.ParametersOnS2(aUPrev, aVPrev);   // S2 - quadric, set U,V by Pnt3D
@@ -3314,7 +3316,7 @@ Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc,
 
     const Standard_Real aUl = aPmin.X(), aVl = aPmin.Y();
 
-    Standard_Real aU, aV;
+    Standard_Real aU = NAN, aV = NAN;
     Standard_Real dU = aUl - aUf, dV = aVl - aVf;
     for(Standard_Integer i = 0; i < 7; i++)
     {
index 046c2e8a4caf767f71ba1810d2482b93117803bc..0606314dee2c32176bc536dbb8c5e17ae09920f9 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_BoundSortBox.hxx>
 #include <Bnd_HArray1OfBox.hxx>
 #include <gp_Pnt.hxx>
@@ -142,7 +144,7 @@ void IntPatch_InterferencePolyhedron::Interference
   Standard_Boolean  gridOnFirst=Standard_True;
   Standard_Integer  NbTrianglesFirstPol  = IntPatch_PolyhedronTool::NbTriangles(FirstPol);
   Standard_Integer  NbTrianglesSecondPol = IntPatch_PolyhedronTool::NbTriangles(SeconPol);  
-  Standard_Integer iFirst, iSecon;
+  Standard_Integer iFirst = 0, iSecon = 0;
 
   //------------------------------------------------------------------------------------------
   //-- the same number of triangles it is necessary to test better on
@@ -156,7 +158,7 @@ void IntPatch_InterferencePolyhedron::Interference
   if(!SelfIntf) { 
     if(NbTrianglesFirstPol > NbTrianglesSecondPol+NbTrianglesSecondPol) gridOnFirst=Standard_False;
 
-    Standard_Real vol1,vol2,Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
+    Standard_Real vol1 = NAN,vol2 = NAN,Xmin = NAN, Ymin = NAN, Zmin = NAN, Xmax = NAN, Ymax = NAN, Zmax = NAN;
     IntPatch_PolyhedronTool::Bounding(FirstPol).Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
     vol1 = (Xmax-Xmin)*(Ymax-Ymin)*(Zmax-Zmin);
 
@@ -252,7 +254,7 @@ void IntPatch_InterferencePolyhedron::Intersect
   
   // Equation of the triangle plane of the objet 
   gp_XYZ ONor; // Normal vector.
-  Standard_Real Odp;    // Polar Distance.
+  Standard_Real Odp = NAN;    // Polar Distance.
   Intf::PlaneEquation(IntPatch_PolyhedronTool::Point(FirstPol, OI[0]),
                      IntPatch_PolyhedronTool::Point(FirstPol, OI[1]),
                      IntPatch_PolyhedronTool::Point(FirstPol, OI[2]),
@@ -261,7 +263,7 @@ void IntPatch_InterferencePolyhedron::Intersect
   
 // Equation of the triangle plane of the tool
   gp_XYZ TNor; // Normal vector.
-  Standard_Real Tdp;    // Polar distance.
+  Standard_Real Tdp = NAN;    // Polar distance.
   Intf::PlaneEquation(IntPatch_PolyhedronTool::Point(SeconPol, TI[0]),
                      IntPatch_PolyhedronTool::Point(SeconPol, TI[1]),
                      IntPatch_PolyhedronTool::Point(SeconPol, TI[2]),
@@ -309,7 +311,7 @@ void IntPatch_InterferencePolyhedron::Intersect
 
 // Otherwise line of section is calculated:
   else {
-    Standard_Integer iObj, iToo;
+    Standard_Integer iObj = 0, iToo = 0;
 
     // Zone de stockage des resultats :
     Standard_Integer nbpiOT=0;
@@ -364,7 +366,7 @@ void IntPatch_InterferencePolyhedron::Intersect
       
       
       // Singularite VERTEX EDGE
-    Standard_Integer inext, jnext;
+    Standard_Integer inext = 0, jnext = 0;
     for (iObj=0; iObj<3; iObj++) {
       if (parO[iObj]==-1.) {
        for (iToo=0; iToo<3; iToo++) {
@@ -452,7 +454,7 @@ void IntPatch_InterferencePolyhedron::Intersect
     // Singularite EDGE EDGE
     gp_Pnt piO;
     gp_XYZ piT;
-    Standard_Real lg;
+    Standard_Real lg = NAN;
     for (iObj=0; iObj<3; iObj++) {
       inext=Pourcent3[iObj+1];
       if (edOT[iObj]==1 && (dpOfT[iObj]*dpOfT[inext])<0.) {
@@ -580,12 +582,12 @@ void IntPatch_InterferencePolyhedron::Intersect
 
       gp_XYZ dir=ONor^TNor;
       NCollection_LocalArray <Standard_Real> d(nbpiOT);
-      Standard_Integer iPi, iPs;
+      Standard_Integer iPi = 0, iPs = 0;
       for (iPi=0; iPi<nbpiOT; iPi++) {
        d[iPi]=dir*piOT(iPi+1).Pnt().XYZ();
       }
 
-      Standard_Integer di;
+      Standard_Integer di = 0;
       id[0]=0;
       for (iPi=1; iPi<nbpiOT; iPi++) {
        id[iPi]=iPi;
@@ -751,8 +753,8 @@ Standard_Boolean IntPatch_InterferencePolyhedron::TangentZoneValue
   // ------------------------
 
   Standard_Boolean finished=Standard_False;
-  Standard_Integer nob, nou, nob2, nou2;
-  Standard_Real par;
+  Standard_Integer nob = 0, nou = 0, nob2 = 0, nou2 = 0;
+  Standard_Real par = NAN;
 
   Intf_PIType tOP[3];
   Intf_PIType tTP[3];
@@ -941,8 +943,8 @@ Standard_Boolean IntPatch_InterferencePolyhedron::TangentZoneValue
 void IntPatch_InterferencePolyhedron::CoupleCharacteristics (const IntPatch_Polyhedron& FirstPol,
                                                          const IntPatch_Polyhedron& SeconPol)
 {
-  Standard_Integer n1, n2;
-  Standard_Real lg;
+  Standard_Integer n1 = 0, n2 = 0;
+  Standard_Real lg = NAN;
 
   for (n1=0; n1<3; n1++) {
     n2=Pourcent3[n1+1];
index 206f7e90f8623374cbe99f87f29be3f4c2342fc7..a36567209d6af6f8483584d1727fb40b6b529d12 100644 (file)
@@ -84,11 +84,11 @@ private:
   Standard_EXPORT void CoupleCharacteristics (const IntPatch_Polyhedron& FirstPol, const IntPatch_Polyhedron& SeconPol);
 
 
-  Standard_Integer OI[3];
-  Standard_Integer TI[3];
-  Standard_Real dpOpT[3][3];
-  Standard_Real dpOeT[3][3];
-  Standard_Real deOpT[3][3];
+  Standard_Integer OI[3]{};
+  Standard_Integer TI[3]{};
+  Standard_Real dpOpT[3][3]{};
+  Standard_Real dpOeT[3][3]{};
+  Standard_Real deOpT[3][3]{};
   gp_XYZ voo[3];
   gp_XYZ vtt[3];
   Standard_Real Incidence;
index b06c8513d146ab55a588f415b4ea132c138fcbd2..be8d2320fe80e9bcb0de53b4e68900febd03fc7d 100644 (file)
@@ -12,6 +12,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
 #include <stdio.h>
 #include <IntPatch_Intersection.hxx>
 
@@ -260,7 +261,7 @@ static void FUN_TrimInfSurf(const gp_Pnt& Pmin,
   Extrema_ExtPS ext2(Pmax, *InfSurf, 1.e-7, 1.e-7);
   if(ext1.IsDone() || ext2.IsDone())
   {
-    Standard_Real Umax = -1.e+100, Umin = 1.e+100, Vmax = -1.e+100, Vmin = 1.e+100, cU, cV;
+    Standard_Real Umax = -1.e+100, Umin = 1.e+100, Vmax = -1.e+100, Vmin = 1.e+100, cU = NAN, cV = NAN;
     if(ext1.IsDone())
     {
       for(Standard_Integer i = 1; i <= ext1.NbExt(); i++)
@@ -358,7 +359,7 @@ static void FUN_GetUiso(const Handle(Geom_Surface)& GS,
     }
     else//Offset Line, Parab, Hyperb
     {
-      Standard_Real VmTr, VMTr;
+      Standard_Real VmTr = NAN, VMTr = NAN;
       if(GACT != GeomAbs_Hyperbola)
       {
         if(FirstV >= 0. && LastV >= 0.){ VmTr = FirstV; VMTr = ((LastV - FirstV) > 1.e+4) ? (FirstV + 1.e+4) : LastV; }
@@ -428,7 +429,7 @@ static void FUN_GetViso(const Handle(Geom_Surface)& GS,
     }
     else//Offset Line, Parab, Hyperb
     {
-      Standard_Real UmTr, UMTr;
+      Standard_Real UmTr = NAN, UMTr = NAN;
       if(GACT != GeomAbs_Hyperbola)
       {
         if(FirstU >= 0. && LastU >= 0.){ UmTr = FirstU; UMTr = ((LastU - FirstU) > 1.e+4) ? (FirstU + 1.e+4) : LastU; }
@@ -472,8 +473,8 @@ static void FUN_PL_Intersection(const Handle(Adaptor3d_Surface)& S1,
   Standard_Boolean isoS1isLine[2] = {0, 0};
   Standard_Boolean isoS2isLine[2] = {0, 0};
   Handle(Geom_Curve) C1, C2;
-  const GeomAdaptor_Surface & gas1 = *(GeomAdaptor_Surface*)(S1.get());
-  const GeomAdaptor_Surface & gas2 = *(GeomAdaptor_Surface*)(S2.get());
+  const GeomAdaptor_Surface & gas1 = *dynamic_cast<GeomAdaptor_Surface*>(S1.get());
+  const GeomAdaptor_Surface & gas2 = *dynamic_cast<GeomAdaptor_Surface*>(S2.get());
   const Handle(Geom_Surface) gs1 = gas1.Surface();
   const Handle(Geom_Surface) gs2 = gas2.Surface();
   Standard_Real MS1[2], MS2[2];
@@ -672,8 +673,8 @@ static void FUN_TrimBothSurf(const Handle(Adaptor3d_Surface)& S1,
                              Handle(Adaptor3d_Surface)&       NS1,
                              Handle(Adaptor3d_Surface)&       NS2)
 {
-  const GeomAdaptor_Surface & gas1 = *(GeomAdaptor_Surface*)(S1.get());
-  const GeomAdaptor_Surface & gas2 = *(GeomAdaptor_Surface*)(S2.get());
+  const GeomAdaptor_Surface & gas1 = *dynamic_cast<GeomAdaptor_Surface*>(S1.get());
+  const GeomAdaptor_Surface & gas2 = *dynamic_cast<GeomAdaptor_Surface*>(S2.get());
   const Handle(Geom_Surface) gs1 = gas1.Surface();
   const Handle(Geom_Surface) gs2 = gas2.Surface();
   const Standard_Real UM1 = 0.5 * (S1->LastUParameter() + S1->FirstUParameter());
@@ -708,7 +709,7 @@ static void FUN_TrimBothSurf(const Handle(Adaptor3d_Surface)& S1,
   Standard_Boolean TrmV1 = Standard_False;
   Standard_Boolean TrmU2 = Standard_False;
   Standard_Boolean TrmV2 = Standard_False;
-  Standard_Real V1S1,V2S1,U1S1,U2S1, V1S2,V2S2,U1S2,U2S2;
+  Standard_Real V1S1 = NAN,V2S1 = NAN,U1S1 = NAN,U2S1 = NAN, V1S2 = NAN,V2S2 = NAN,U1S2 = NAN,U2S2 = NAN;
   FUN_NewFirstLast(GA_U1,S1->FirstVParameter(),S1->LastVParameter(),TV,V1S1,V2S1,TrmV1);
   FUN_NewFirstLast(GA_V1,S1->FirstUParameter(),S1->LastUParameter(),TV,U1S1,U2S1,TrmU1);
   FUN_NewFirstLast(GA_U2,S2->FirstVParameter(),S2->LastVParameter(),TV,V1S2,V2S2,TrmV2);
@@ -774,7 +775,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)&  theS1,
       typs1 == GeomAbs_Torus || typs2 == GeomAbs_Torus) {
     gp_Ax1 aCTAx, aGeomAx;
     GeomAbs_SurfaceType aCTType;
-    Standard_Boolean bToCheck;
+    Standard_Boolean bToCheck = 0;
     //
     const Handle(Adaptor3d_Surface)& aCTSurf = 
       (typs1 == GeomAbs_Cone || typs1 == GeomAbs_Torus) ? theS1 : theS2;
@@ -1032,7 +1033,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)&  theS1,
       typs1 == GeomAbs_Torus || typs2 == GeomAbs_Torus) {
     gp_Ax1 aCTAx, aGeomAx;
     GeomAbs_SurfaceType aCTType;
-    Standard_Boolean bToCheck;
+    Standard_Boolean bToCheck = 0;
     //
     const Handle(Adaptor3d_Surface)& aCTSurf = 
       (typs1 == GeomAbs_Cone || typs1 == GeomAbs_Torus) ? theS1 : theS2;
@@ -1802,7 +1803,7 @@ Standard_Boolean IntPatch_Intersection::CheckSingularPoints(
   //
   const Standard_Integer aNbBndPnts = 5;
   const Standard_Real aTol = Precision::Confusion();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   theD1->Init();
   Standard_Boolean isU = Standard_True;
   for (; theD1->More(); theD1->Next())
@@ -1813,7 +1814,7 @@ Standard_Boolean IntPatch_Intersection::CheckSingularPoints(
     {
       continue;
     }
-    Standard_Real t, dt = (psup - pinf) / (aNbBndPnts - 1);
+    Standard_Real t = NAN, dt = (psup - pinf) / (aNbBndPnts - 1);
     gp_Pnt2d aP1;
     gp_Vec2d aDir;
     aBnd->D1((pinf + psup) / 2., aP1, aDir);
@@ -1930,7 +1931,7 @@ static void splitCone(
 
   gp_Cone aCone = theS->Cone();
 
-  Standard_Real aU0, aV0;
+  Standard_Real aU0 = NAN, aV0 = NAN;
   Adaptor3d_TopolTool::GetConeApexParam (aCone, aU0, aV0);
 
   TopAbs_State aState = theD->Classify (gp_Pnt2d (aU0, aV0), theTol);
index 42746650231488d809d2bc0a1d1a50ce75d3e7c7..eb5388b963490889b176cb98ad503eab5fee6e5a 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor2d_Curve2d.hxx>
 #include <Adaptor3d_TopolTool.hxx>
 #include <IntPatch_ALine.hxx>
@@ -51,11 +53,11 @@ static void Recadre(const Handle(Adaptor3d_Surface)& myHS1,
                    Standard_Real& v1,
                    Standard_Real& u2,
                    Standard_Real& v2) { 
-  Standard_Real f,l,lmf;
+  Standard_Real f = NAN,l = NAN,lmf = NAN;
   GeomAbs_SurfaceType typs1 = myHS1->GetType();
   GeomAbs_SurfaceType typs2 = myHS2->GetType();
 
-  Standard_Boolean myHS1IsUPeriodic,myHS1IsVPeriodic;
+  Standard_Boolean myHS1IsUPeriodic = 0,myHS1IsVPeriodic = 0;
   switch (typs1) { 
   case GeomAbs_Cylinder:
   case GeomAbs_Cone:
@@ -78,7 +80,7 @@ static void Recadre(const Handle(Adaptor3d_Surface)& myHS1,
      }
   }
 
-  Standard_Boolean myHS2IsUPeriodic,myHS2IsVPeriodic;
+  Standard_Boolean myHS2IsUPeriodic = 0,myHS2IsVPeriodic = 0;
   switch (typs2) { 
   case GeomAbs_Cylinder:
   case GeomAbs_Cone:
@@ -206,7 +208,7 @@ static Standard_Real LocalFirstParameter (const Handle(IntPatch_Line)& L)
        firstp = alin->FirstPoint().ParameterOnLine();
       }
       else {
-       Standard_Boolean included;
+       Standard_Boolean included = 0;
        firstp = alin->FirstParameter(included);
        if (!included) {
          firstp +=Epsilon(firstp);
@@ -286,7 +288,7 @@ static Standard_Real LocalLastParameter (const Handle(IntPatch_Line)& L)
        lastp = alin->LastPoint().ParameterOnLine();
       }
       else {
-       Standard_Boolean included;
+       Standard_Boolean included = 0;
        lastp = alin->LastParameter(included);
        if (!included) {
          lastp -=Epsilon(lastp);
@@ -392,7 +394,7 @@ static Standard_Integer AppendSameVertexA(Handle(IntPatch_ALine)&alig,
                                  const Handle(IntPatch_ALine)& L,
                                  const Standard_Integer index,
                                  Standard_Integer *TabIndex) { 
-  Standard_Integer i,a,n;
+  Standard_Integer i = 0,a = 0,n = 0;
   a=0;
   n=L->NbVertex();
   const IntPatch_Point& Vtxindex = L->Vertex(index);
@@ -423,9 +425,9 @@ static Standard_Integer AppendSameVertexG(Handle(IntPatch_GLine)& glig,const Han
                                  const Standard_Integer index,
                                  const Standard_Real decal,
                                  Standard_Integer *TabIndex) { 
-  Standard_Integer i,a,n;
-  Standard_Real p1,p2,d; //,tol
-  Standard_Boolean aajouter;
+  Standard_Integer i = 0,a = 0,n = 0;
+  Standard_Real p1 = NAN,p2 = NAN,d = NAN; //,tol
+  Standard_Boolean aajouter = 0;
   a=0;
   n=L->NbVertex();
   const IntPatch_Point& Vtxindex = L->Vertex(index);
@@ -474,7 +476,7 @@ static Standard_Integer AppendSameVertexW(Handle(IntPatch_WLine)& wlig,
                                  const Standard_Integer index,
                                  const Standard_Real par,
                                  Standard_Integer *TabIndex) { 
-  Standard_Integer i,a,n;
+  Standard_Integer i = 0,a = 0,n = 0;
   a=0;
   n=L->NbVertex();
   const IntPatch_Point& Vtxindex = L->Vertex(index);
@@ -490,7 +492,7 @@ static Standard_Integer AppendSameVertexW(Handle(IntPatch_WLine)& wlig,
       //-- le debugger voit 2 fois la variable d ici. ???? -> d_2
       if(d_2 <= thetol2) { 
        Vtxi.SetParameter(par);
-       Standard_Real u1,v1,u2,v2;
+       Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
        Vtxindex.ParametersOnS1(u1,v1);
        Vtxindex.ParametersOnS2(u2,v2);
        Vtxi.SetParameters(u1,v1,u2,v2);
@@ -513,7 +515,7 @@ static Standard_Integer AppendSameVertexR(Handle(IntPatch_RLine)&rlig,
                                  const Handle(IntPatch_RLine)& L,
                                  const Standard_Integer index,
                                  Standard_Integer *TabIndex) { 
-  Standard_Integer i,a,n;
+  Standard_Integer i = 0,a = 0,n = 0;
   a=0;
   n=L->NbVertex();
   const IntPatch_Point& Vtxindex = L->Vertex(index);
@@ -824,7 +826,7 @@ static Standard_Boolean TestWLineIsARLine(const IntPatch_SequenceOfLine& slinref
         Standard_Boolean onFirst = is==0;
         if((onFirst && rlin->IsArcOnS1()) || (!onFirst && rlin->IsArcOnS2())) {
           Handle(Adaptor2d_Curve2d) arc;
-          Standard_Real u,v,u1,v1;
+          Standard_Real u = NAN,v = NAN,u1 = NAN,v1 = NAN;
           if (onFirst) {
             arc = rlin->ArcOnS1();
             POn2S.ParametersOnS1(u,v);
@@ -867,16 +869,16 @@ static Standard_Boolean TestIfWLineIsRestriction(const IntPatch_SequenceOfLine&
                                          Standard_Real TolArc) { 
 
   Standard_Integer NbPnts = wlin->NbPnts();
-  Standard_Integer allon1=0,allon2=0,i;
+  Standard_Integer allon1=0,allon2=0,i = 0;
   Standard_Real tol2d1=0., tol2d2=0.;
   for(i=1;i<=NbPnts;i++) { 
     const IntSurf_PntOn2S& Pmid = wlin->Point(i);
-    Standard_Real u1,v1,u2,v2;
+    Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
     Pmid.Parameters(u1,v1,u2,v2);
     //-- Estimation d un majorant de Toluv a partir de Tol
     gp_Pnt ap;
     gp_Vec ad1u,ad1v;
-    Standard_Real tol;
+    Standard_Real tol = NAN;
     //------------------------------------------
     S1->D1(u1,v1,ap,ad1u,ad1v);
     tol = ComputeParametricTolerance(TolArc,ad1u,ad1v);
@@ -955,7 +957,7 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref,
   Standard_Integer midInd = (ParamMaxOnLine + ParamMinOnLine) / 2;
 
   TColStd_SequenceOfInteger indicesV1,indicesV2;
-  Standard_Integer iv;
+  Standard_Integer iv = 0;
   for (iv=1; iv <= nbvtx; iv++) {
     Standard_Integer plin = (Standard_Integer) WLine->Vertex(iv).ParameterOnLine();
     if (plin == ParamMinOnLine) indicesV1.Append(iv);
@@ -970,7 +972,7 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref,
   typedef Standard_Real (IntPatch_Point::* PParOnArc)() const;
 
   // cycle for both surfaces
-  Standard_Integer is;
+  Standard_Integer is = 0;
   for (is=0; is<2; is++) {
     Standard_Boolean onFirst = is==0;
     if(( onFirst && WLine->HasArcOnS1()) ||
@@ -999,7 +1001,7 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref,
       }
 
       // resolve arcs for vertices not having a link to an arc
-      Standard_Real utst,vtst;
+      Standard_Real utst = NAN,vtst = NAN;
       TColStd_Array1OfReal paramsResolved(1,nbvtx);
       TColStd_Array1OfTransient arcsResolved(1,nbvtx);
       arcsResolved.Init(Handle(Adaptor2d_Curve2d)());
@@ -1010,7 +1012,7 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref,
          Standard_Real distmin=RealLast();
          for (aDomain->Init(); aDomain->More(); aDomain->Next()) {
            const Handle(Adaptor2d_Curve2d)& arc = aDomain->Value();
-           Standard_Real par,dist;
+           Standard_Real par = NAN,dist = NAN;
            if (ProjectOnArc(utst,vtst,arc,surf,TolArc,par,dist) && dist < distmin) {
              arcsResolved(iv) = arc;
              paramsResolved(iv) = par;
@@ -1022,7 +1024,7 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref,
 
       // prepare list of common arcs for both ends of wline
       TColStd_IndexedMapOfTransient mapArcsV1,mapArcs;
-      Standard_Integer i;
+      Standard_Integer i = 0;
       for (i=1; i <= indicesV1.Length(); i++) {
        iv = indicesV1(i);
        Handle(Adaptor2d_Curve2d) arc;
@@ -1081,7 +1083,7 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref,
          utst = (utst+utst1)*0.5;
          vtst = (vtst+vtst1)*0.5;
        }
-       Standard_Real par,dist;
+       Standard_Real par = NAN,dist = NAN;
        if (!ProjectOnArc(utst,vtst,arc,surf,TolArc,par,dist)) {
 #ifdef OCCT_DEBUG
          std::cout<<" Pb en projection ds IntPatch_LineConstructor"<<std::endl;
@@ -1096,10 +1098,10 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref,
 
        Handle(IntSurf_LineOn2S) LineOn2S = new IntSurf_LineOn2S();
        const Handle(IntSurf_LineOn2S)& Lori = WLine->Curve();
-       Standard_Integer ivmin,ivmax;
-       Standard_Real parmin, parmax;
+       Standard_Integer ivmin = 0,ivmax = 0;
+       Standard_Real parmin = NAN, parmax = NAN;
        Standard_Boolean reverse = Standard_False;
-       TColStd_SequenceOfInteger *pIndVmin, *pIndVmax;
+       TColStd_SequenceOfInteger *pIndVmin = nullptr, *pIndVmax = nullptr;
        if (par1<par2) {
          for(i=ParamMinOnLine; i<=ParamMaxOnLine; i++) { 
            LineOn2S->Add(Lori->Value(i));
@@ -1187,15 +1189,15 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
                                       const Handle(Adaptor3d_TopolTool)& myDom2,
                                       const Standard_Real TolArc)  {
 
-  Standard_Integer i=1,nbvtx;
-  Standard_Real firstp,lastp;
+  Standard_Integer i=1,nbvtx = 0;
+  Standard_Real firstp = NAN,lastp = NAN;
   Standard_Real Tol = Precision::PConfusion()*100.; // JMB le 13 Jan 2000. Report de la correction du PRO19653
   GeomAbs_SurfaceType typs1 = mySurf1->GetType();
   GeomAbs_SurfaceType typs2 = mySurf2->GetType();
 
   IntPatch_IType typl = L->ArcType();
   if(typl == IntPatch_Analytic) { 
-    Standard_Real u1,v1,u2,v2;
+    Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
     Handle(IntPatch_ALine) ALine (Handle(IntPatch_ALine)::DownCast (L));
     slin.Clear();
     nbvtx = ALine->NbVertex();
@@ -1247,7 +1249,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
     return;
   }
   else if(typl == IntPatch_Walking) { 
-    Standard_Real u1,v1,u2,v2;
+    Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
     Handle(IntPatch_WLine) WLine (Handle(IntPatch_WLine)::DownCast (L));
     slin.Clear();
     nbvtx = WLine->NbVertex();
@@ -1265,7 +1267,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
       firstp = WLineVertex_i.ParameterOnLine();
       lastp =  WLineVertex_ip1.ParameterOnLine();
       if(firstp!=lastp && !IsSegmentSmall(WLine,i,i+1/*,TolArc*/)) {  
-       Standard_Integer pmid;
+       Standard_Integer pmid = 0;
        pmid = (Standard_Integer)((firstp+lastp)/2);
        Standard_Integer int_lastp = (Standard_Integer)lastp;
        Standard_Integer int_firstp = (Standard_Integer)firstp;
@@ -1303,7 +1305,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
        //            situation when (lastp-firstp) != 1.
        if(Abs(int_lastp-int_firstp) == 1)
          {
-           Standard_Real vFu1,vFv1,vFu2,vFv2,vLu1,vLv1,vLu2,vLv2;
+           Standard_Real vFu1 = NAN,vFv1 = NAN,vFu2 = NAN,vFv2 = NAN,vLu1 = NAN,vLv1 = NAN,vLu2 = NAN,vLv2 = NAN;
            const IntSurf_PntOn2S& vF = WLineVertex_i. PntOn2S();
            const IntSurf_PntOn2S& vL = WLineVertex_ip1. PntOn2S();
            vF.Parameters(vFu1,vFv1,vFu2,vFv2);
@@ -1312,7 +1314,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
            Recadre(mySurf1,mySurf2,vLu1,vLv1,vLu2,vLv2);
            if(in1 != TopAbs_IN)
              {
-               Standard_Real du,dv;
+               Standard_Real du = NAN,dv = NAN;
                gp_Pnt2d pvF(vFu1,vFv1);
                gp_Pnt2d pvL(vLu1,vLv1);
                gp_Pnt2d pPm(u1,v1);
@@ -1334,7 +1336,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
              }
            if(in2 != TopAbs_IN)
              {
-               Standard_Real du,dv;
+               Standard_Real du = NAN,dv = NAN;
                gp_Pnt2d pvF(vFu2,vFv2);
                gp_Pnt2d pvL(vLu2,vLv2);
                gp_Pnt2d pPm(u2,v2);
@@ -1359,13 +1361,13 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
        if (in1 != TopAbs_OUT && in2 != TopAbs_OUT)
          {
            Standard_Boolean   LignetropPetite=Standard_False;
-           Standard_Real u1a,v1a,u2a,v2a;
+           Standard_Real u1a = NAN,v1a = NAN,u2a = NAN,v2a = NAN;
            const IntSurf_PntOn2S& Pmid1 = WLine->Point((Standard_Integer)firstp);
            Pmid1.Parameters(u1a,v1a,u2a,v2a);
            Recadre(mySurf1,mySurf2,u1a,v1a,u2a,v2a);
            
            const IntSurf_PntOn2S& Pmid2 = WLine->Point((Standard_Integer)lastp);
-           Standard_Real u1b,v1b,u2b,v2b;
+           Standard_Real u1b = NAN,v1b = NAN,u2b = NAN,v2b = NAN;
            Pmid2.Parameters(u1b,v1b,u2b,v2b);
            Recadre(mySurf1,mySurf2,u1b,v1b,u2b,v2b);
            
@@ -1406,7 +1408,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
     return;
   }
   else if (typl != IntPatch_Restriction) { // JAG 01.07.96
-    Standard_Real u1,v1,u2,v2;
+    Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
     Handle(IntPatch_GLine) GLine (Handle(IntPatch_GLine)::DownCast (L));
     slin.Clear();
     nbvtx = GLine->NbVertex();
@@ -1567,7 +1569,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
          gp_Pnt   Px = mySurf1->Value(Px2d.X(),Px2d.Y());
          gp_Vec P0Px=gp_Vec(P0,Px);
          
-         Standard_Real U1,V1,U2,V2;
+         Standard_Real U1 = NAN,V1 = NAN,U2 = NAN,V2 = NAN;
          Vtx1.PntOn2S().Parameters(U1,V1,U2,V2);
 
          gp_Vec D1u,D1v;
@@ -1580,7 +1582,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
          //-- le 23 mars 1999 
          TopAbs_State bornin = myDom2->Classify(gp_Pnt2d(U2,V2),Tol,Standard_False);
          if(bornin!=TopAbs_OUT) { 
-           Standard_Real U1t,V1t,U2t,V2t;
+           Standard_Real U1t = NAN,V1t = NAN,U2t = NAN,V2t = NAN;
            Vtx2.PntOn2S().Parameters(U1t,V1t,U2t,V2t);
            bornin = myDom2->Classify(gp_Pnt2d(U2t,V2t),Tol,Standard_False);
          }
@@ -1593,7 +1595,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
          //-- POPx . D1v = deltau * D1u.D1v  + deltav * D1v.D1v
          //--
          //-- deltau=
-         Standard_Real D1uD1v,TgD1u,TgD1v,D1uD1u,D1vD1v,DIS;
+         Standard_Real D1uD1v = NAN,TgD1u = NAN,TgD1v = NAN,D1uD1u = NAN,D1vD1v = NAN,DIS = NAN;
          //Standard_Real DeltaU,DeltaV;
          D1uD1u = D1u.Dot(D1u);
          D1vD1v = D1v.Dot(D1v);
@@ -1646,7 +1648,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
          gp_Pnt   Px = mySurf2->Value(Px2d.X(),Px2d.Y());
          gp_Vec P0Px=gp_Vec(P0,Px);
          
-         Standard_Real U1,V1,U2,V2;
+         Standard_Real U1 = NAN,V1 = NAN,U2 = NAN,V2 = NAN;
          Vtx1.PntOn2S().Parameters(U1,V1,U2,V2);
          
          gp_Vec D1u,D1v;
@@ -1659,7 +1661,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
          //-- le 23 mars 1999 
          TopAbs_State bornin = myDom1->Classify(gp_Pnt2d(U1,V1),Tol,Standard_False);
          if(bornin!=TopAbs_OUT) { 
-           Standard_Real U1t,V1t,U2t,V2t;
+           Standard_Real U1t = NAN,V1t = NAN,U2t = NAN,V2t = NAN;
            Vtx2.PntOn2S().Parameters(U1t,V1t,U2t,V2t);
            bornin = myDom1->Classify(gp_Pnt2d(U1t,V1t),Tol,Standard_False);
          }
@@ -1672,7 +1674,7 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
          //-- POPx . D1v = deltau * D1u.D1v  + deltav * D1v.D1v
          //--
          //-- deltau=
-         Standard_Real D1uD1v,TgD1u,TgD1v,D1uD1u,D1vD1v,DIS;
+         Standard_Real D1uD1v = NAN,TgD1u = NAN,TgD1v = NAN,D1uD1u = NAN,D1vD1v = NAN,DIS = NAN;
          //Standard_Real DeltaU,DeltaV;
          D1uD1u = D1u.Dot(D1u);
          D1vD1v = D1v.Dot(D1v);
index 6c681d27da408f9a5de780d20f9e476e8bade69f..e37283fc495139a927f30eab3f80cb30b8b37738 100644 (file)
@@ -21,6 +21,7 @@
 #include <IntSurf_PntOn2S.hxx>
 #include <IntSurf_Transition.hxx>
 
+#include <math.h>
 #include <stdio.h>
 void IntPatch_Point::SetValue (const gp_Pnt& Pt,
                                const Standard_Real Tol,
@@ -147,7 +148,7 @@ static void DumpTransition(const IntSurf_Transition& T)
 
 void IntPatch_Point::Dump() const { 
   std::cout<<"----------- IntPatch_Point : "<<std::endl;
-  Standard_Real u1,v1,u2,v2;
+  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
   pt.Parameters(u1,v1,u2,v2);
 
   printf("P(%+10.20f,%+10.20f,%+10.20f) UV1(%+10.20f,%+10.20f)  UV2(%+10.20f,%+10.20f) (Para:%+10.20f)\n",
index 1253fe17da8aaab1f4e1880a310b82a4ecd11695..c48e0aa9f17462a27f5b08be7ff472c844ceca31 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor2d_Curve2d.hxx>
 #include <gp_Pnt2d.hxx>
 #include <IntPatch_PolyArc.hxx>
@@ -63,15 +65,15 @@ IntPatch_PolyArc::IntPatch_PolyArc(const Handle(Adaptor2d_Curve2d)& Line ,
   Standard_Integer IndexInf = NbSample+1;
   Standard_Integer IndexSup = 0;
   
-  Standard_Real bx0,by0,bxmin,bxmax,bymin,bymax,r,r2;
+  Standard_Real bx0 = NAN,by0 = NAN,bxmin = NAN,bxmax = NAN,bymin = NAN,bymax = NAN,r = NAN,r2 = NAN;
   
   BoxOtherPolygon.Get(bxmin,bymin,bxmax,bymax);
   r=(bxmax-bxmin)+(bymax-bymin);
   bx0=(bxmax+bxmin)*0.5;
   by0=(bymax+bymin)*0.5;
   
-  Standard_Real Pas;
-  Standard_Real X,Y,Xs,Ys,Xm,Ym,XXs,YYs;
+  Standard_Real Pas = NAN;
+  Standard_Real X = NAN,Y = NAN,Xs = NAN,Ys = NAN,Xm = NAN,Ym = NAN,XXs = NAN,YYs = NAN;
   
   r*=0.8;
   r2 = r*r*49.;
@@ -108,7 +110,7 @@ IntPatch_PolyArc::IntPatch_PolyArc(const Handle(Adaptor2d_Curve2d)& Line ,
       if(!isMidPtInBox) {
        Standard_Real d = (X-Xs)*(X-Xs)+(Y-Ys)*(Y-Ys);
        if (d > r2) {
-         Standard_Real xmin,xmax,ymin,ymax;
+         Standard_Real xmin = NAN,xmax = NAN,ymin = NAN,ymax = NAN;
          MinMax (Xs,X, xmin,xmax);
          MinMax (Ys,Y, ymin,ymax);
          isSegOut = (xmax < bxmin || xmin > bxmax ||
@@ -184,7 +186,7 @@ Standard_Real IntPatch_PolyArc::Parameter(const Standard_Integer Index ) const
 
 
 void IntPatch_PolyArc::SetOffset(const Standard_Real ox,const Standard_Real oy) { 
-  Standard_Real xmin,ymin,xmax,ymax,g;
+  Standard_Real xmin = NAN,ymin = NAN,xmax = NAN,ymax = NAN,g = NAN;
   myBox.Get(xmin,ymin,xmax,ymax);
   g = myBox.GetGap();
   
index fa7eaeaed13f2f484a2160e5acff5407d2ed667f..74f469c8ddd6c5b3c8f423d3b358a7e1651e8619 100644 (file)
@@ -17,6 +17,8 @@
 //-- lbr le 12 juin : Ajout des fleches sur les Lines
 //-- msv 13.03.2002 : compute deflection for WLine; Error() returns deflection
 
+#include <math.h>
+
 #include <IntPatch_PolyLine.hxx>
 #include <IntPatch_RLine.hxx>
 #include <IntPatch_WLine.hxx>
@@ -79,7 +81,7 @@ void IntPatch_PolyLine::SetRLine(const Standard_Boolean OnFirst, const Handle(In
 
 void IntPatch_PolyLine::Prepare()
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   myBox.SetVoid();
   Standard_Integer n=NbPoints();
   const Standard_Real eps_2 = myError * myError;
@@ -93,7 +95,7 @@ void IntPatch_PolyLine::Prepare()
     if (i >= 3) {
       gp_XY V13 = P3.XY() - P1.XY();
       gp_XY V12 = P2.XY() - P1.XY();
-      Standard_Real d13_2 = V13.SquareModulus(), d_2;
+      Standard_Real d13_2 = V13.SquareModulus(), d_2 = NAN;
       if (d13_2 > eps_2)
        d_2 = V13.CrossSquareMagnitude(V12) / d13_2;
       else
@@ -171,7 +173,7 @@ Standard_Integer IntPatch_PolyLine::NbPoints() const
 
 gp_Pnt2d IntPatch_PolyLine::Point(const Standard_Integer Index )  const 
 { 
-  Standard_Real X,Y,X1,Y1,DX,DY;
+  Standard_Real X = NAN,Y = NAN,X1 = NAN,Y1 = NAN,DX = NAN,DY = NAN;
   DX=DY=0;
   if (onfirst) {
     if (typ == IntPatch_Walking) {
index 9f436bbb229883b69f24c3dfc9870b703911d899..5ac490c7fe0eeea989f96471e721a06a8dfc3a4e 100644 (file)
@@ -23,6 +23,7 @@
 #include <IntPatch_Polyhedron.hxx>
 #include <TColStd_Array2OfReal.hxx>
 
+#include <math.h>
 #include <stdio.h>
 #define MSG_DEBUG                   0
 
@@ -90,8 +91,8 @@ IntPatch_Polyhedron::IntPatch_Polyhedron (const Handle(Adaptor3d_Surface)& Surfa
   const Standard_Real V1mV0sNbdeltaV = (v1-v0)/(Standard_Real)nbdeltaV;
 
   gp_Pnt TP;
-  Standard_Real    U,V;
-  Standard_Integer i1, i2, Index=1;
+  Standard_Real    U = NAN,V = NAN;
+  Standard_Integer i1 = 0, i2 = 0, Index=1;
   for (i1 = 0, U = u0; i1 <= nbdeltaU; i1++, U+= U1mU0sNbdeltaU) {
     for (i2 = 0, V = v0; i2 <= nbdeltaV; i2++, V+= V1mV0sNbdeltaV ) {
       Surface->D0(U,V,TP);
@@ -149,8 +150,8 @@ IntPatch_Polyhedron::IntPatch_Polyhedron (const Handle(Adaptor3d_Surface)& Surfa
   const Standard_Real V1mV0sNbdeltaV = (v1-v0)/(Standard_Real)nbdeltaV;
 
   gp_Pnt TP;
-  Standard_Real U,V;
-  Standard_Integer i1, i2, Index=1;
+  Standard_Real U = NAN,V = NAN;
+  Standard_Integer i1 = 0, i2 = 0, Index=1;
   for (i1 = 0, U = u0; i1 <= nbdeltaU; i1++, U+= U1mU0sNbdeltaU) {
     for (i2 = 0, V = v0; i2 <= nbdeltaV; i2++, V+= V1mV0sNbdeltaV ) {
       Surface->D0(U,V,TP);
@@ -185,11 +186,11 @@ Standard_Real IntPatch_Polyhedron::DeflectionOnTriangle
   (const Handle(Adaptor3d_Surface)& Surface,
    const Standard_Integer Triang) const 
 {
-  Standard_Integer i1,i2,i3;    
+  Standard_Integer i1 = 0,i2 = 0,i3 = 0;    
 
   Triangle(Triang,i1,i2,i3);
   //-- Calcul de l eqution du plan
-  Standard_Real u1,v1,u2,v2,u3,v3;
+  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN,u3 = NAN,v3 = NAN;
   gp_Pnt P1,P2,P3;
   P1 = Point(i1,u1,v1);
   P2 = Point(i2,u2,v2);
@@ -268,7 +269,7 @@ void IntPatch_Polyhedron::FillBounding()
 {
   TheComponentsBnd=new Bnd_HArray1OfBox(1, NbTriangles());
   Bnd_Box Boite;
-  Standard_Integer p1, p2, p3;
+  Standard_Integer p1 = 0, p2 = 0, p3 = 0;
   Standard_Integer nbtriangles = NbTriangles();
   for (Standard_Integer iTri=1; iTri<=nbtriangles; iTri++) {
     Triangle(iTri, p1, p2, p3);
@@ -354,7 +355,7 @@ Standard_Integer IntPatch_Polyhedron::TriConnex (const Standard_Integer Triang,
 // Triangle position General case :
   Standard_Integer linT = 0, colT = 0;
   Standard_Integer linO = 0, colO = 0;
-  Standard_Integer t,tt;
+  Standard_Integer t = 0,tt = 0;
   if (Triang!=0) {
     t = (Triang-1)/(nbdeltaVm2);
     tt= (Triang-1)-t*nbdeltaVm2;
@@ -530,7 +531,7 @@ void IntPatch_Polyhedron::PlaneEquation (const Standard_Integer Triang,
                                         gp_XYZ&        NormalVector,
                                         Standard_Real& PolarDistance)  const
 {
-  Standard_Integer i1,i2,i3;
+  Standard_Integer i1 = 0,i2 = 0,i3 = 0;
   Triangle(Triang,i1,i2,i3);
 
   gp_XYZ Pointi1(Point(i1).XYZ());
@@ -563,7 +564,7 @@ void IntPatch_Polyhedron::PlaneEquation (const Standard_Integer Triang,
 Standard_Boolean IntPatch_Polyhedron::Contain (const Standard_Integer Triang,
                                               const gp_Pnt& ThePnt) const
 {  
-  Standard_Integer i1,i2,i3;
+  Standard_Integer i1 = 0,i2 = 0,i3 = 0;
   Triangle(Triang,i1,i2,i3);
   gp_XYZ Pointi1(Point(i1).XYZ());
   gp_XYZ Pointi2(Point(i2).XYZ());
index a3ba76ddb431dfa3eb498847dd00c4cf71859f91..630d4bfd1b8c6fc6b40c48363ee0aa237eabfe53 100644 (file)
@@ -17,6 +17,8 @@
 // modified by Edward AGAPOV (eap) Tue Jan 22 12:29:55 2002
 // modified by Oleg FEDYAED  (ofv) Fri Nov 29 16:08:02 2002
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Adaptor3d_TopolTool.hxx>
 #include <gp_Dir.hxx>
@@ -81,7 +83,7 @@ static void SeveralWlinesProcessing(const Handle(Adaptor3d_Surface)& theSurf1,
   Standard_Real aU1 = 0.0, aV1 = 0.0, aU2 = 0.0, aV2 = 0.0;
 
   Standard_Integer cnbV = theWLline->NbVertex();
-  Standard_Integer ciV;
+  Standard_Integer ciV = 0;
   for( ciV = 1; ciV <= cnbV; ciV++ )
   {
     Standard_Real pntDMin = 1.e+100;
@@ -90,7 +92,7 @@ static void SeveralWlinesProcessing(const Handle(Adaptor3d_Surface)& theSurf1,
     gp_Pnt cPV = theWLline->Vertex(ciV).Value();
     theWLline->Vertex(ciV).Parameters(aU1, aV1, aU2, aV2);
     const gp_Pnt2d aPCS1(aU1, aV1), aPCS2(aU2, aV2);
-    Standard_Integer iL;
+    Standard_Integer iL = 0;
     for( iL = 1; iL <= theSLin.Length(); iL++)
     {
       const Handle(IntPatch_Line)& aSLine = theSLin.Value(iL);
@@ -99,7 +101,7 @@ static void SeveralWlinesProcessing(const Handle(Adaptor3d_Surface)& theSurf1,
         continue;
       const Handle(IntPatch_WLine) aWLine = Handle(IntPatch_WLine)::DownCast(aSLine);
       Standard_Integer tnbV = aWLine->NbVertex();
-      Standard_Integer tiV;
+      Standard_Integer tiV = 0;
       for( tiV = 1; tiV <= tnbV; tiV++ )
       {
         gp_Pnt tPV = aWLine->Vertex(tiV).Value();
@@ -148,7 +150,7 @@ static void SeveralWlinesProcessing(const Handle(Adaptor3d_Surface)& theSurf1,
       Standard_Integer cNbP = theWLline->NbPnts();
 
       TColStd_SequenceOfInteger VPold;
-      Standard_Integer iPo;
+      Standard_Integer iPo = 0;
       for( iPo = 1; iPo <= cnbV; iPo++ )
       {
         Standard_Real Po = theWLline->Vertex(iPo).ParameterOnLine();
@@ -208,7 +210,7 @@ static void SeveralWlinesProcessing(const Handle(Adaptor3d_Surface)& theSurf1,
 
       Standard_Integer pI = ciVpar;
 
-      Standard_Integer iP;
+      Standard_Integer iP = 0;
       for( iP = 1; iP <= cNbP; iP++)
       {
         if( pI == iP )
@@ -233,7 +235,7 @@ static void SeveralWlinesProcessing(const Handle(Adaptor3d_Surface)& theSurf1,
       Handle(IntPatch_WLine) NWLine = new IntPatch_WLine(newL2s,Standard_False,theTrans1,theTrans2);
       NWLine->SetCreatingWayInfo(IntPatch_WLine::IntPatch_WLPrmPrm);
 
-      Standard_Integer iV;
+      Standard_Integer iV = 0;
       for( iV = 1; iV <= cnbV; iV++ )
       {
         if( iV == ciV )
@@ -378,32 +380,32 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
 
   Standard_Integer NbLigCalculee = 0;
 
-  Standard_Real U1,U2,V1,V2;
-  Standard_Real pu1,pu2,pv1,pv2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
+  Standard_Real pu1 = NAN,pu2 = NAN,pv1 = NAN,pv2 = NAN;
 
   TColStd_Array1OfReal StartParams(1,4);
 
   IntWalk_PWalking PW( Surf1, Surf2, TolTangency, Epsilon, Deflection, Increment );
 
   Standard_Real    SeuildPointLigne = 15.0 * Increment * Increment; //-- 10 est insuffisant
-  Standard_Real    incidence;
-  Standard_Real    dminiPointLigne;
+  Standard_Real    incidence = NAN;
+  Standard_Real    dminiPointLigne = NAN;
 
-  Standard_Boolean HasStartPoint,RejetLigne;
+  Standard_Boolean HasStartPoint = 0,RejetLigne = 0;
 
   IntSurf_PntOn2S StartPOn2S;
 
-  Standard_Integer ver;
+  Standard_Integer ver = 0;
 
   gp_Pnt Point3dDebut,Point3dFin;
 
   if( nbLigSec >= 1 ) {
     Standard_Integer *TabL = new Standard_Integer [nbLigSec+1];
-    Standard_Integer ls;
+    Standard_Integer ls = 0;
     for( ls = 1; ls <= nbLigSec; ls++ )
       TabL[ls]=ls;
 
-    Standard_Boolean triok;
+    Standard_Boolean triok = 0;
     do { 
       triok=Standard_True;
       for(Standard_Integer b=2; b<=nbLigSec; b++) {
@@ -423,12 +425,12 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
       Standard_Integer nbp = LineSec.NumberOfPoints();
 
       Standard_Integer *TabPtDep = new Standard_Integer [nbp+1];
-      Standard_Integer ilig;
+      Standard_Integer ilig = 0;
       for( ilig = 1; ilig <= nbp; ilig++) 
         TabPtDep[ilig]=0;
 
-      Standard_Real UminLig1,VminLig1,UmaxLig1,VmaxLig1;
-      Standard_Real UminLig2,VminLig2,UmaxLig2,VmaxLig2;
+      Standard_Real UminLig1 = NAN,VminLig1 = NAN,UmaxLig1 = NAN,VmaxLig1 = NAN;
+      Standard_Real UminLig2 = NAN,VminLig2 = NAN,UmaxLig2 = NAN,VmaxLig2 = NAN;
 
       SectionPointToParameters(LineSec.GetPoint(1),Poly1,Poly2,UminLig1,VminLig1,UminLig2,VminLig2);
 
@@ -463,7 +465,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
           Standard_Integer nbp1_4=nbp/4;
           Standard_Integer nbp3_4=nbp-nbp1_4;
 
-          Standard_Integer nsp;
+          Standard_Integer nsp = 0;
           for(nsp=nbp/2; nsp<nbp3_4; nsp++) { 
             Standard_Real CurrentIncidence =  LineSec.GetPoint(nsp).Incidence();
             if(CurrentIncidence < incidence) { 
@@ -521,7 +523,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
           if(HasStartPoint) { 
             StartPOn2S.Parameters(pu1,pv1,pu2,pv2);
             NbLigCalculee = SLin.Length();
-            Standard_Integer l;
+            Standard_Integer l = 0;
             for( l=1; (l <= NbLigCalculee) && (dminiPointLigne >= SeuildPointLigne); l++) { 
               const Handle(IntPatch_WLine)& testwline = *((Handle(IntPatch_WLine)*)&SLin.Value(l));
 
@@ -566,10 +568,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
                   if(!RejetLigne) { 
                     // Calculation transition
                     IntSurf_TypeTrans trans1,trans2;
-                    Standard_Real locu,locv;
+                    Standard_Real locu = NAN,locv = NAN;
                     gp_Vec norm1,norm2,d1u,d1v;
                     gp_Pnt ptbid;
-                    Standard_Integer indextg;
+                    Standard_Integer indextg = 0;
                     gp_Vec tgline(PW.TangentAtLine(indextg));
                     PW.Line()->Value(indextg).ParametersOnS1(locu,locv);
                     Surf1->D1(locu,locv,ptbid,d1u,d1v);
@@ -633,13 +635,13 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
     delete [] TabL;
   }// nbLigSec >= 1
 
-  Standard_Real UminLig1,VminLig1,UmaxLig1,VmaxLig1;
-  Standard_Real UminLig2,VminLig2,UmaxLig2,VmaxLig2;
+  Standard_Real UminLig1 = NAN,VminLig1 = NAN,UmaxLig1 = NAN,VmaxLig1 = NAN;
+  Standard_Real UminLig2 = NAN,VminLig2 = NAN,UmaxLig2 = NAN,VmaxLig2 = NAN;
 
   UminLig1=VminLig1=UminLig2=VminLig2=RealLast();
   UmaxLig1=VmaxLig1=UmaxLig2=VmaxLig2=-UminLig1;
 
-  Standard_Integer z;
+  Standard_Integer z = 0;
   for(z=1; z <= nbTanZon; z++) { 
     const Intf_TangentZone& TangentZone=Interference.ZoneValue(z);
     for(Standard_Integer pz=1; pz<=TangentZone.NumberOfPoints(); pz++) { 
@@ -659,7 +661,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
 
   for(z=1; z <= nbTanZon; z++) {
     const Intf_TangentZone& TangentZone=Interference.ZoneValue(z);
-    Standard_Integer pz;
+    Standard_Integer pz = 0;
     for( pz=1; pz<=TangentZone.NumberOfPoints(); pz++) { 
       SectionPointToParameters(TangentZone.GetPoint(pz),Poly1,Poly2,U1,V1,U2,V2);
 
@@ -673,7 +675,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
         StartPOn2S.Parameters(pu1,pv1,pu2,pv2);
         NbLigCalculee = SLin.Length();
         dminiPointLigne = SeuildPointLigne + SeuildPointLigne; 
-        Standard_Integer l;
+        Standard_Integer l = 0;
         for( l = 1; (l <= NbLigCalculee) && (dminiPointLigne >= SeuildPointLigne); l++)        { 
           const Handle(IntPatch_WLine)& testwline = *((Handle(IntPatch_WLine)*)&SLin.Value(l));
 
@@ -717,10 +719,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
 
               if(!RejetLigne) { 
                 IntSurf_TypeTrans trans1,trans2;
-                Standard_Real locu,locv;
+                Standard_Real locu = NAN,locv = NAN;
                 gp_Vec norm1,norm2,d1u,d1v;
                 gp_Pnt ptbid;
-                Standard_Integer indextg;
+                Standard_Integer indextg = 0;
                 gp_Vec tgline(PW.TangentAtLine(indextg));
                 PW.Line()->Value(indextg).ParametersOnS1(locu,locv);
                 Surf1->D1(locu,locv,ptbid,d1u,d1v);
@@ -797,29 +799,29 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
   Standard_Integer nbLigSec = Interference.NbSectionLines();
   Standard_Integer nbTanZon = Interference.NbTangentZones();
 
-  Standard_Integer NbPntOn2SOnLine;
+  Standard_Integer NbPntOn2SOnLine = 0;
   Standard_Integer NbLigCalculee = 0;
 
-  Standard_Real U1,U2,V1,V2;
-  Standard_Real pu1,pu2,pv1,pv2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
+  Standard_Real pu1 = NAN,pu2 = NAN,pv1 = NAN,pv2 = NAN;
 
   TColStd_Array1OfReal StartParams(1,4);
   IntWalk_PWalking PW(Surf1,Surf1,TolTangency,Epsilon,Deflection,Increment);
 
   Standard_Real    SeuildPointLigne = 15.0 * Increment * Increment; //-- 10 est insuffisant
-  Standard_Real    incidence;
-  Standard_Real    dminiPointLigne;
+  Standard_Real    incidence = NAN;
+  Standard_Real    dminiPointLigne = NAN;
 
-  Standard_Boolean HasStartPoint,RejetLigne;
+  Standard_Boolean HasStartPoint = 0,RejetLigne = 0;
 
   IntSurf_PntOn2S StartPOn2S;
 
-  Standard_Integer ver;
+  Standard_Integer ver = 0;
 
   gp_Pnt Point3dDebut,Point3dFin;
 
   if(nbLigSec>=1) {
-    Standard_Integer ls;
+    Standard_Integer ls = 0;
     for( ls = 1; ls <= nbLigSec; ls++) {
       const Intf_SectionLine& LineSec=Interference.LineValue(ls);
       Standard_Integer nbp = LineSec.NumberOfPoints();
@@ -830,7 +832,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
         NombreDePointsDeDepartDuCheminement++;
         if(NombreDePointsDeDepartDuCheminement == 1) { 
           incidence = 0.0;
-          Standard_Integer nsp1;
+          Standard_Integer nsp1 = 0;
           for( nsp1= nbp/2; nsp1 >= 1; nsp1--) { 
             SectionPointToParameters(LineSec.GetPoint(nsp1),Poly1,Poly1,U1,V1,U2,V2);
             Standard_Real CurrentIncidence =  Abs(U1-U2)+Abs(V1-V2);
@@ -883,16 +885,16 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
           StartPOn2S.Parameters(pu1,pv1,pu2,pv2);
           if(Abs(pu1-pu2)>1e-7 || Abs(pv1-pv2)>1e-7) { 
             NbLigCalculee = SLin.Length();
-            Standard_Integer l;
+            Standard_Integer l = 0;
             for( l = 1; (l <= NbLigCalculee) && (dminiPointLigne >= SeuildPointLigne); l++) { 
               const Handle(IntPatch_WLine)& testwline = *((Handle(IntPatch_WLine)*)&SLin.Value(l));
               if( (testwline->IsOutSurf1Box(gp_Pnt2d(pu1,pv1))==Standard_False) &&
                 (testwline->IsOutSurf2Box(gp_Pnt2d(pu2,pv2))==Standard_False) &&
                 (testwline->IsOutBox(StartPOn2S.Value())==Standard_False) ) { 
                   NbPntOn2SOnLine = testwline->NbPnts();
-                  Standard_Integer ll;
+                  Standard_Integer ll = 0;
                   for( ll=1; (ll < NbPntOn2SOnLine) && (dminiPointLigne >= SeuildPointLigne); ll++) { 
-                    Standard_Real t,Au1,Av1,Au2,Av2,Bu1,Bv1,Bu2,Bv2;
+                    Standard_Real t = NAN,Au1 = NAN,Av1 = NAN,Au2 = NAN,Av2 = NAN,Bu1 = NAN,Bv1 = NAN,Bu2 = NAN,Bv2 = NAN;
                     testwline->Point(ll).Parameters(Au1,Av1,Au2,Av2);
                     testwline->Point(ll+1).Parameters(Bu1,Bv1,Bu2,Bv2);
                     if(Au1>Bu1) {
@@ -946,10 +948,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
 
                   if(!RejetLigne) { 
                     IntSurf_TypeTrans trans1,trans2;
-                    Standard_Real locu,locv;
+                    Standard_Real locu = NAN,locv = NAN;
                     gp_Vec norm1,norm2,d1u,d1v;
                     gp_Pnt ptbid;
-                    Standard_Integer indextg;
+                    Standard_Integer indextg = 0;
                     gp_Vec tgline(PW.TangentAtLine(indextg));
                     PW.Line()->Value(indextg).ParametersOnS1(locu,locv);
                     Surf1->D1(locu,locv,ptbid,d1u,d1v);
@@ -967,9 +969,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
                     }
 
                     IntSurf_LineOn2S LineOn2S;
-                    Standard_Integer nbpw,imin,imax,i;
+                    Standard_Integer nbpw = 0,imin = 0,imax = 0,i = 0;
                     nbpw = PW.Line()->NbPoints();
-                    Standard_Real u1,v1,u2,v2;
+                    Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
                     i=0;
                     do { 
                       i++;
@@ -1004,7 +1006,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
                       const IntSurf_PntOn2S& POn2SDeb = wline->Point(1);
                       const IntSurf_PntOn2S& POn2SFin = wline->Point(wline->NbPnts());
                       if((POn2SDeb.Value()).Distance(POn2SFin.Value()) <= TolTangency) { 
-                        Standard_Real u1t,v1t,u2t,v2t
+                        Standard_Real u1t = NAN,v1t = NAN,u2t = NAN,v2t = NAN
                         POn2SDeb.Parameters(u1t,v1t,u2t,v2t);
                         IntPatch_Point vtx;
                         vtx.SetValue(POn2SDeb.Value(),TolTang,Standard_False);
@@ -1045,7 +1047,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
     }// for( ls ...
   }// nbLigSec>=1
 
-  Standard_Integer z;
+  Standard_Integer z = 0;
   for( z = 1; z <= nbTanZon; z++) { 
     const Intf_TangentZone& TangentZone=Interference.ZoneValue(z);
     for(Standard_Integer pz=1; pz<=TangentZone.NumberOfPoints(); pz++) { 
@@ -1062,16 +1064,16 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
         if(Abs(pu1-pu2)>1e-7 || Abs(pv1-pv2)>1e-7) { 
           NbLigCalculee = SLin.Length();
           dminiPointLigne = SeuildPointLigne + SeuildPointLigne; 
-          Standard_Integer l;
+          Standard_Integer l = 0;
           for( l = 1; (l <= NbLigCalculee) && (dminiPointLigne >= SeuildPointLigne); l++) { 
             const Handle(IntPatch_WLine)& testwline = *((Handle(IntPatch_WLine)*)&SLin.Value(l));
             if( (testwline->IsOutSurf1Box(gp_Pnt2d(pu1,pv1))==Standard_False) &&
               (testwline->IsOutSurf2Box(gp_Pnt2d(pu2,pv2))==Standard_False) &&
               (testwline->IsOutBox(StartPOn2S.Value())==Standard_False) ) { 
                 NbPntOn2SOnLine = testwline->NbPnts();
-                Standard_Integer ll;
+                Standard_Integer ll = 0;
                 for( ll = 1; (ll < NbPntOn2SOnLine) && (dminiPointLigne >= SeuildPointLigne); ll++) { 
-                  Standard_Real t,Au1,Av1,Au2,Av2,Bu1,Bv1,Bu2,Bv2;
+                  Standard_Real t = NAN,Au1 = NAN,Av1 = NAN,Au2 = NAN,Av2 = NAN,Bu1 = NAN,Bv1 = NAN,Bu2 = NAN,Bv2 = NAN;
                   testwline->Point(ll).Parameters(Au1,Av1,Au2,Av2);
                   testwline->Point(ll+1).Parameters(Bu1,Bv1,Bu2,Bv2);
                   if(Au1>Bu1) {
@@ -1124,10 +1126,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
 
                 if(!RejetLigne)        { 
                   IntSurf_TypeTrans trans1,trans2;
-                  Standard_Real locu,locv;
+                  Standard_Real locu = NAN,locv = NAN;
                   gp_Vec norm1,norm2,d1u,d1v;
                   gp_Pnt ptbid;
-                  Standard_Integer indextg;
+                  Standard_Integer indextg = 0;
                   gp_Vec tgline(PW.TangentAtLine(indextg));
                   PW.Line()->Value(indextg).ParametersOnS1(locu,locv);
                   Surf1->D1(locu,locv,ptbid,d1u,d1v);
@@ -1145,9 +1147,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
                   }
 
                   IntSurf_LineOn2S LineOn2S;
-                  Standard_Integer nbp,imin,imax,i;
+                  Standard_Integer nbp = 0,imin = 0,imax = 0,i = 0;
                   nbp = PW.Line()->NbPoints();
-                  Standard_Real u1,v1,u2,v2;
+                  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
                   i=0;
                   do { 
                     i++;
@@ -1182,7 +1184,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
                     const IntSurf_PntOn2S& POn2SDeb = wline->Point(1);
                     const IntSurf_PntOn2S& POn2SFin = wline->Point(wline->NbPnts());
                     if((POn2SDeb.Value()).Distance(POn2SFin.Value()) <= TolTangency) { 
-                      Standard_Real u1t,v1t,u2t,v2t
+                      Standard_Real u1t = NAN,v1t = NAN,u2t = NAN,v2t = NAN
                       POn2SDeb.Parameters(u1t,v1t,u2t,v2t);
                       IntPatch_Point vtx;
                       vtx.SetValue(POn2SDeb.Value(),TolTang,Standard_False);
@@ -1255,10 +1257,10 @@ Handle(IntPatch_Line) IntPatch_PrmPrmIntersection::NewLine (const Handle(Adaptor
   TColStd_Array1OfReal V2(Low,High);
   TColStd_Array1OfReal AC(Low,High);
 
-  Standard_Real s,ds;
+  Standard_Real s = NAN,ds = NAN;
   Handle(IntPatch_WLine) TheLine = Handle(IntPatch_WLine)::DownCast(Line(NumLine));
   const IntSurf_PntOn2S& Point=TheLine->Point(Low);
-  Standard_Real u1,v1,u2,v2;
+  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
   Point.Parameters(u1,v1,u2,v2);
   U1(Low) = u1;
   V1(Low) = v1;
@@ -1268,7 +1270,7 @@ Handle(IntPatch_Line) IntPatch_PrmPrmIntersection::NewLine (const Handle(Adaptor
 
   IntWalk_PWalking PW(Surf1,Surf2,0.000001,0.000001,0.001,0.001);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i=Low+1; i<=High; i++)
   {
     const IntSurf_PntOn2S& Pointi=TheLine->Point(i);
@@ -1348,11 +1350,11 @@ void SectionPointToParameters(const Intf_SectionPoint& Sp,
                               Standard_Real& v2)
 {
   Intf_PIType       typ;
-  Standard_Integer  Adr1,Adr2;
-  Standard_Real     Param,u,v;
+  Standard_Integer  Adr1 = 0,Adr2 = 0;
+  Standard_Real     Param = NAN,u = NAN,v = NAN;
   gp_Pnt P(Sp.Pnt());
 
-  Standard_Integer Pt1,Pt2,Pt3;
+  Standard_Integer Pt1 = 0,Pt2 = 0,Pt3 = 0;
 
   Sp.InfoFirst(typ,Adr1,Adr2,Param);
   switch(typ) { 
@@ -1371,7 +1373,7 @@ void SectionPointToParameters(const Intf_SectionPoint& Sp,
     }
   case Intf_FACE:
     {
-      Standard_Real ua,va,ub,vb,uc,vc,ca,cb,cc,cabc;
+      Standard_Real ua = NAN,va = NAN,ub = NAN,vb = NAN,uc = NAN,vc = NAN,ca = NAN,cb = NAN,cc = NAN,cabc = NAN;
       Poly1.Triangle(Adr1,Pt1,Pt2,Pt3);
       gp_Pnt PA(Poly1.Point(Pt1));
       gp_Pnt PB(Poly1.Point(Pt2));
@@ -1416,7 +1418,7 @@ void SectionPointToParameters(const Intf_SectionPoint& Sp,
     }
   case Intf_FACE:
     {
-      Standard_Real ua,va,ub,vb,uc,vc,ca,cb,cc,cabc;
+      Standard_Real ua = NAN,va = NAN,ub = NAN,vb = NAN,uc = NAN,vc = NAN,ca = NAN,cb = NAN,cc = NAN,cabc = NAN;
       Poly2.Triangle(Adr1,Pt1,Pt2,Pt3);
       gp_Pnt PA(Poly2.Point(Pt1));
       gp_Pnt PB(Poly2.Point(Pt2));
@@ -1456,7 +1458,7 @@ void IntPatch_PrmPrmIntersection::RemplitLin(const Standard_Integer x1,
                                              const Standard_Integer z2,
                                              IntPatch_PrmPrmIntersection_T3Bits& Map) const 
 {
-  int xg,yg,zg;
+  int xg = 0,yg = 0,zg = 0;
   xg=x1-x2; if(xg<0) xg=-xg; 
   yg=y1-y2; if(yg<0) yg=-yg; 
   zg=z1-z2; if(zg<0) zg=-zg; 
@@ -1532,7 +1534,7 @@ void IntPatch_PrmPrmIntersection::Remplit(const Standard_Integer a,
                                           const Standard_Integer c,
                                           IntPatch_PrmPrmIntersection_T3Bits& Map) const 
 { 
-  int iax,iay,iaz,ibx,iby,ibz,icx,icy,icz;
+  int iax = 0,iay = 0,iaz = 0,ibx = 0,iby = 0,ibz = 0,icx = 0,icy = 0,icz = 0;
   if(a!=-1) Map.Add(a);
   if(b!=-1) Map.Add(b);
   if(c!=-1) Map.Add(c);
@@ -1569,9 +1571,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
   empt = Standard_True;
   SLin.Clear();  
 
-  Standard_Real UminLig1,VminLig1,UmaxLig1,VmaxLig1;
-  Standard_Real UminLig2,VminLig2,UmaxLig2,VmaxLig2;
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real UminLig1 = NAN,VminLig1 = NAN,UmaxLig1 = NAN,VmaxLig1 = NAN;
+  Standard_Real UminLig2 = NAN,VminLig2 = NAN,UmaxLig2 = NAN,VmaxLig2 = NAN;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
 
   UminLig1 = Surf1->FirstUParameter();
   VminLig1 = Surf1->FirstVParameter();
@@ -1594,7 +1596,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
   {
     Standard_Real TolPar = Precision::PConfusion();
     IntSurf_ListOfPntOn2S AdditionalPnts;
-    Standard_Real NewU1, NewV1, NewU2, NewV2;
+    Standard_Real NewU1 = NAN, NewV1 = NAN, NewU2 = NAN, NewV2 = NAN;
     for(; IterLOP1.More(); IterLOP1.Next())
     {
       IntSurf_PntOn2S Pnt = IterLOP1.Value();
@@ -1700,9 +1702,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
 
   Standard_Real SeuildPointLigne = 15.0 * Increment * Increment;
 
-  Standard_Integer NbLigCalculee = 0, ver;
-  Standard_Real pu1,pu2,pv1,pv2, dminiPointLigne;
-  Standard_Boolean HasStartPoint,RejetLigne;
+  Standard_Integer NbLigCalculee = 0, ver = 0;
+  Standard_Real pu1 = NAN,pu2 = NAN,pv1 = NAN,pv2 = NAN, dminiPointLigne = NAN;
+  Standard_Boolean HasStartPoint = 0,RejetLigne = 0;
   IntSurf_PntOn2S StartPOn2S;
   gp_Pnt Point3dDebut,Point3dFin;
 
@@ -1725,7 +1727,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
     if(HasStartPoint) {
       StartPOn2S.Parameters(pu1,pv1,pu2,pv2);
       NbLigCalculee = SLin.Length();
-      Standard_Integer l;
+      Standard_Integer l = 0;
       for( l = 1; (l <= NbLigCalculee) && (dminiPointLigne >= SeuildPointLigne); l++) { 
         const Handle(IntPatch_WLine)& testwline = *((Handle(IntPatch_WLine)*)&SLin.Value(l));
 
@@ -1773,10 +1775,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)&    S
 
             if(!RejetLigne) {
               IntSurf_TypeTrans trans1,trans2;
-              Standard_Real locu,locv;
+              Standard_Real locu = NAN,locv = NAN;
               gp_Vec norm1,norm2,d1u,d1v;
               gp_Pnt ptbid;
-              Standard_Integer indextg;
+              Standard_Integer indextg = 0;
               gp_Vec tgline(PW.TangentAtLine(indextg));
               PW.Line()->Value(indextg).ParametersOnS1(locu,locv);
               Surf1->D1(locu,locv,ptbid,d1u,d1v);
@@ -1866,7 +1868,7 @@ void IntPatch_PrmPrmIntersection::Perform(const Handle(Adaptor3d_Surface)&    Su
 
   //------------------------------------------------------------
 
-  Standard_Real pu1,pu2,pv1,pv2;
+  Standard_Real pu1 = NAN,pu2 = NAN,pv1 = NAN,pv2 = NAN;
 
   TColStd_Array1OfReal StartParams(1,4);
 
@@ -1894,7 +1896,7 @@ void IntPatch_PrmPrmIntersection::Perform(const Handle(Adaptor3d_Surface)&    Su
   //Standard_Real    incidence;
   //Standard_Real    dminiPointLigne;
 
-  Standard_Boolean HasStartPoint;//,RejetLigne;
+  Standard_Boolean HasStartPoint = 0;//,RejetLigne;
 
   IntSurf_PntOn2S StartPOn2S;
 
@@ -1927,10 +1929,10 @@ void IntPatch_PrmPrmIntersection::Perform(const Handle(Adaptor3d_Surface)&    Su
         Point3dFin   = PW.Value(PW.NbPoints()).Value();
 
         IntSurf_TypeTrans trans1,trans2;
-        Standard_Real locu,locv;
+        Standard_Real locu = NAN,locv = NAN;
         gp_Vec norm1,norm2,d1u,d1v;
         gp_Pnt ptbid;
-        Standard_Integer indextg;
+        Standard_Integer indextg = 0;
         gp_Vec tgline(PW.TangentAtLine(indextg));
         PW.Line()->Value(indextg).ParametersOnS1(locu,locv);
         Surf1->D1(locu,locv,ptbid,d1u,d1v);
@@ -1992,9 +1994,9 @@ void AdjustOnPeriodic(const Handle(Adaptor3d_Surface)& Surf1,
                       const Handle(Adaptor3d_Surface)& Surf2,
                       IntPatch_SequenceOfLine& aSLin)
 {
-  Standard_Boolean bIsPeriodic[4], bModified, bIsNull, bIsPeriod;
-  Standard_Integer i, j, k, aNbLines, aNbPx, aIndx, aIndq;
-  Standard_Real aPeriod[4], dPeriod[4], ux[4], uq[4], aEps, du;
+  Standard_Boolean bIsPeriodic[4], bModified = 0, bIsNull = 0, bIsPeriod = 0;
+  Standard_Integer i = 0, j = 0, k = 0, aNbLines = 0, aNbPx = 0, aIndx = 0, aIndq = 0;
+  Standard_Real aPeriod[4], dPeriod[4], ux[4], uq[4], aEps = NAN, du = NAN;
   //
   aEps=Precision::Confusion();
   //
@@ -2105,7 +2107,7 @@ IntSurf_PntOn2S MakeNewPoint(const IntSurf_PntOn2S& replacePnt,
   oldPnt.Parameters(OldParams[0], OldParams[1], OldParams[2], OldParams[3]);
   replacePnt.Parameters(NewParams[0], NewParams[1], NewParams[2], NewParams[3]);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 0; i < 4; i++)
   {
     if (Periods[i] != 0.)
@@ -2208,8 +2210,8 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
     Standard_Integer nbTanZon = Interference.NbTangentZones();
     Standard_Real SeuildPointLigne = 15.0 * Increment * Increment;
 
-    Standard_Integer NbLigCalculee = 0, ver;
-    Standard_Real pu1,pu2,pv1,pv2, incidence, dminiPointLigne;
+    Standard_Integer NbLigCalculee = 0, ver = 0;
+    Standard_Real pu1 = NAN,pu2 = NAN,pv1 = NAN,pv2 = NAN, incidence = NAN, dminiPointLigne = NAN;
     Standard_Boolean HasStartPoint = Standard_False, RejectLine = Standard_False;
     IntSurf_PntOn2S StartPOn2S;
     gp_Pnt Point3dDebut,Point3dFin;
@@ -2226,8 +2228,8 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
       }
       //----------------------------------------1.1
       {
-        Standard_Boolean triok;
-        Standard_Integer nb_A, nb_B, tyu;
+        Standard_Boolean triok = 0;
+        Standard_Integer nb_A = 0, nb_B = 0, tyu = 0;
         do
         {
           triok=Standard_True;
@@ -2265,9 +2267,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
           TabPtDep[ilig]=0;
         }
         //
-        Standard_Real UminLig1,VminLig1,UmaxLig1,VmaxLig1;
-        Standard_Real UminLig2,VminLig2,UmaxLig2,VmaxLig2;
-        Standard_Real _x,_y,_z;
+        Standard_Real UminLig1 = NAN,VminLig1 = NAN,UmaxLig1 = NAN,VmaxLig1 = NAN;
+        Standard_Real UminLig2 = NAN,VminLig2 = NAN,UmaxLig2 = NAN,VmaxLig2 = NAN;
+        Standard_Real _x = NAN,_y = NAN,_z = NAN;
         //
         Interference.GetLinePoint(TabL[ls], 1, _x, _y, _z,
           UminLig1, VminLig1, UminLig2, VminLig2, 
@@ -2280,7 +2282,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
         //
         for(Standard_Integer ilig = 2; ilig <= nbp; ilig++ )
         {
-          Standard_Real U1, U2, V1, V2;
+          Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
           Interference.GetLinePoint(TabL[ls],ilig,_x,_y,_z,U1,V1,U2,V2,incidence);
           //
           if(U1>UmaxLig1) UmaxLig1=U1;
@@ -2334,7 +2336,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
           //
           if(TabPtDep[nbps2] == 0)
           {
-            Standard_Real U1, U2, V1, V2;
+            Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
 
             TabPtDep[nbps2] = 1;
             Interference.GetLinePoint(TabL[ls],nbps2,_x,_y,_z,U1,V1,U2,V2,incidence);
@@ -2350,7 +2352,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
             {
               StartPOn2S.Parameters(pu1,pv1,pu2,pv2);
               NbLigCalculee = SLin.Length();
-              Standard_Integer l;
+              Standard_Integer l = 0;
               for( l = 1; (l <= NbLigCalculee) && (dminiPointLigne >= SeuildPointLigne); l++)
               {
                 const Handle(IntPatch_WLine)& testwline = *((Handle(IntPatch_WLine)*)&SLin.Value(l));
@@ -2367,8 +2369,8 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
                   UmaxLig1, VmaxLig1, UmaxLig2, VmaxLig2);
 
                 //
-                Standard_Boolean bPWIsDone;
-                Standard_Real aD11, aD12, aD21, aD22, aDx;
+                Standard_Boolean bPWIsDone = 0;
+                Standard_Real aD11 = NAN, aD12 = NAN, aD21 = NAN, aD22 = NAN, aDx = NAN;
                 //
                 bPWIsDone=PW.IsDone();
 
@@ -2418,7 +2420,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
                       if((aD11<=TolTangency && aD22<=TolTangency) ||
                         (aD12<=TolTangency && aD21<=TolTangency))
                       {
-                        Standard_Integer m, mx;
+                        Standard_Integer m = 0, mx = 0;
                         //
                         mx=aNbPointsVer/2;
                         if (aNbPointsVer%2)
@@ -2465,10 +2467,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
                     if(!RejectLine)
                     {
                       IntSurf_TypeTrans trans1,trans2;
-                      Standard_Real locu,locv;
+                      Standard_Real locu = NAN,locv = NAN;
                       gp_Vec norm1,norm2,d1u,d1v;
                       gp_Pnt ptbid;
-                      Standard_Integer indextg;
+                      Standard_Integer indextg = 0;
                       gp_Vec tgline(PW.TangentAtLine(indextg));
                       PW.Line()->Value(indextg).ParametersOnS1(locu,locv);
                       Surf1->D1(locu,locv,ptbid,d1u,d1v);
@@ -2545,22 +2547,22 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
     //--------------------------------------------------------------------
     //-- Calcul des parametres approches a partir des Zones De Tangence --
     //--------------------------------------------------------------------
-    Standard_Real UminLig1,VminLig1,UmaxLig1,VmaxLig1;
-    Standard_Real UminLig2,VminLig2,UmaxLig2,VmaxLig2;
+    Standard_Real UminLig1 = NAN,VminLig1 = NAN,UmaxLig1 = NAN,VmaxLig1 = NAN;
+    Standard_Real UminLig2 = NAN,VminLig2 = NAN,UmaxLig2 = NAN,VmaxLig2 = NAN;
 
     UminLig1=VminLig1=UminLig2=VminLig2=RealLast();
     UmaxLig1=VmaxLig1=UmaxLig2=VmaxLig2=-UminLig1;
 
     // NbPointsInTangentZone always == 1 (eap)
 
-    Standard_Integer z;
+    Standard_Integer z = 0;
     for( z=1; z <= nbTanZon; z++)
     { 
       //Standard_Integer NbPointsInTangentZone=Interference.NbPointsInTangentZone(z);
       //for(Standard_Integer pz=1; pz<=NbPointsInTangentZone; pz++) {
       Standard_Integer pz=1;
-      Standard_Real _x,_y,_z;
-      Standard_Real U1, U2, V1, V2;
+      Standard_Real _x = NAN,_y = NAN,_z = NAN;
+      Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
       Interference.GetTangentZonePoint(z,pz,_x,_y,_z,U1,V1,U2,V2);
 
       if(U1>UmaxLig1) UmaxLig1=U1;
@@ -2580,8 +2582,8 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
       //Standard_Integer NbPointsInTangentZone=Interference.NbPointsInTangentZone(z);
       //for(Standard_Integer pz=1; pz<=NbPointsInTangentZone; pz++) { 
       Standard_Integer pz=1;
-      Standard_Real _x,_y,_z;
-      Standard_Real U1, U2, V1, V2;
+      Standard_Real _x = NAN,_y = NAN,_z = NAN;
+      Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
       Interference.GetTangentZonePoint(z,pz,_x,_y,_z,U1,V1,U2,V2);
 
       StartParams(1) = U1;
@@ -2680,10 +2682,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
               if(!RejectLine)
               { 
                 IntSurf_TypeTrans trans1,trans2;
-                Standard_Real locu,locv;
+                Standard_Real locu = NAN,locv = NAN;
                 gp_Vec norm1,norm2,d1u,d1v;
                 gp_Pnt ptbid;
-                Standard_Integer indextg;
+                Standard_Integer indextg = 0;
                 gp_Vec tgline(PW.TangentAtLine(indextg));
                 PW.Line()->Value(indextg).ParametersOnS1(locu,locv);
                 Surf1->D1(locu,locv,ptbid,d1u,d1v);
@@ -2764,8 +2766,8 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
   done = Standard_True;
 
   Standard_Integer NbLigCalculee = 0;
-  Standard_Real U1,U2,V1,V2;
-  Standard_Real pu1,pu2,pv1,pv2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
+  Standard_Real pu1 = NAN,pu2 = NAN,pv1 = NAN,pv2 = NAN;
 
   TColStd_Array1OfReal StartParams(1,4);
   Standard_Integer MaxOscill = NbU1;
@@ -2779,10 +2781,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
 
   IntWalk_PWalking PW(Surf1,Surf2,TolTangency,Epsilon,Deflection,nIncrement);
   Standard_Real    SeuildPointLigne = 15.0 * Increment * Increment; //-- 10 est insuffisant
-  Standard_Real    dminiPointLigne;
-  Standard_Boolean HasStartPoint,RejetLigne;
+  Standard_Real    dminiPointLigne = NAN;
+  Standard_Boolean HasStartPoint = 0,RejetLigne = 0;
   IntSurf_PntOn2S StartPOn2S;
-  Standard_Integer ver;
+  Standard_Integer ver = 0;
   gp_Pnt Point3dDebut,Point3dFin;
 
   //------------------------------------------------------------
@@ -2879,10 +2881,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
             if(!RejetLigne)
             {
               IntSurf_TypeTrans trans1,trans2;
-              Standard_Real locu,locv;
+              Standard_Real locu = NAN,locv = NAN;
               gp_Vec norm1,norm2,d1u,d1v;
               gp_Pnt ptbid;
-              Standard_Integer indextg;
+              Standard_Integer indextg = 0;
               gp_Vec tgline(PW.TangentAtLine(indextg));
               PW.Line()->Value(indextg).ParametersOnS1(locu,locv);
               Surf1->D1(locu,locv,ptbid,d1u,d1v);
@@ -2954,9 +2956,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
 class IntPatch_InfoPD {
 public:
   //----------------------------------------C-tor
-  IntPatch_InfoPD(const Standard_Integer aNBI) {
-    Standard_Integer aNBI2, i, j;
-    myNBI=aNBI;
+  IntPatch_InfoPD(const Standard_Integer aNBI) : myNBI(aNBI) {
+    Standard_Integer aNBI2 = 0, i = 0, j = 0;
+    
     //
     aNBI2=aNBI*aNBI;
     myP1DS2=new char[aNBI2];
@@ -3054,16 +3056,16 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S
                                               const Standard_Integer SU_2,
                                               const Standard_Integer SV_2) const 
 { 
-  Standard_Integer i, j, xNBI;
+  Standard_Integer i = 0, j = 0, xNBI = 0;
   //modified by NIZNHY-PKV Tue May 24 11:37:38 2011f
   xNBI=200;
   IntPatch_InfoPD aIPD(xNBI);
   //modified by NIZNHY-PKV Wed May 25 06:47:12 2011t
-  Standard_Integer iC15, SU1, SV1, SU2, SV2;
-  Standard_Real U0, U1, V0, V1, U, V;
-  Standard_Real resu0,resv0;
-  Standard_Real  du1,du2,dv1,dv2, dmaxOn1, dmaxOn2;
-  Standard_Real x0,y0,z0, x1,y1,z1,d;
+  Standard_Integer iC15 = 0, SU1 = 0, SV1 = 0, SU2 = 0, SV2 = 0;
+  Standard_Real U0 = NAN, U1 = NAN, V0 = NAN, V1 = NAN, U = NAN, V = NAN;
+  Standard_Real resu0 = NAN,resv0 = NAN;
+  Standard_Real  du1 = NAN,du2 = NAN,dv1 = NAN,dv2 = NAN, dmaxOn1 = NAN, dmaxOn2 = NAN;
+  Standard_Real x0 = NAN,y0 = NAN,z0 = NAN, x1 = NAN,y1 = NAN,z1 = NAN,d = NAN;
   Bnd_Box Box1, Box2;
   //
   iC15=15;
@@ -3144,11 +3146,11 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S
     return;
   }
   //
-  Standard_Integer aNbPG;
-  Standard_Real x10,y10,z10,x11,y11,z11;
-  Standard_Real x20,y20,z20,x21,y21,z21;
-  Standard_Real dx, dy, dz, dmax;
-  Standard_Real dx2, dy2, dz2;
+  Standard_Integer aNbPG = 0;
+  Standard_Real x10 = NAN,y10 = NAN,z10 = NAN,x11 = NAN,y11 = NAN,z11 = NAN;
+  Standard_Real x20 = NAN,y20 = NAN,z20 = NAN,x21 = NAN,y21 = NAN,z21 = NAN;
+  Standard_Real dx = NAN, dy = NAN, dz = NAN, dmax = NAN;
+  Standard_Real dx2 = NAN, dy2 = NAN, dz2 = NAN;
   //
   Box1.Get(x10,y10,z10,x11,y11,z11);
   Box2.Get(x20,y20,z20,x21,y21,z21);
@@ -3290,7 +3292,7 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S
   long unsigned Compt=0;
   int ok=0;
   int indicepointtraite = 0;
-  Standard_Integer k,nu,nv;
+  Standard_Integer k = 0,nu = 0,nv = 0;
   //
   do { 
     indicepointtraite--;
@@ -3301,7 +3303,7 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S
       int LIM=3;
       if(   DansGrille(i-1) && DansGrille(j-1) && DansGrille(k-1) 
         && DansGrille(i+1) && DansGrille(j+1) && DansGrille(k+1)) { 
-          int si,sj,sk;
+          int si = 0,sj = 0,sk = 0;
           for(si=-1; si<= 1 && nb<LIM; si++) { 
             for(sj=-1; sj<= 1 && nb<LIM; sj++) { 
               for(sk=-1; sk<= 1 && nb<LIM; sk++) { 
@@ -3374,19 +3376,19 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S
             Standard_Real t = aIPD.xP1(i, j).SquareDistance(P);
             //-- On remplace la plus grande valeur ds Dist[.] par la val courante
             if(Dist3[0]<Dist3[1]) { 
-              Standard_Real z;
+              Standard_Real z = NAN;
               z=Dist3[0]; Dist3[0]=Dist3[1]; Dist3[1]=z;
               z=u3[0]; u3[0]=u3[1]; u3[1]=z;
               z=v3[0]; v3[0]=v3[1]; v3[1]=z;
             }
             if(Dist3[1]<Dist3[2]) { 
-              Standard_Real z;
+              Standard_Real z = NAN;
               z=Dist3[1]; Dist3[1]=Dist3[2]; Dist3[2]=z;
               z=u3[1]; u3[1]=u3[2]; u3[2]=z;
               z=v3[1]; v3[1]=v3[2]; v3[2]=z;
             }
             if(Dist3[0]<Dist3[1]) { 
-              Standard_Real z;
+              Standard_Real z = NAN;
               z=Dist3[0]; Dist3[0]=Dist3[1]; Dist3[1]=z;
               z=u3[0]; u3[0]=u3[1]; u3[1]=z;
               z=v3[0]; v3[0]=v3[1]; v3[1]=z;
@@ -3408,19 +3410,19 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S
             Standard_Real t = aIPD.xP2(i, j).SquareDistance(P);
             //-- On remplace la plus grande valeur ds Dist3[.] par la val courante
             if(Dist3[0]<Dist3[1]) { 
-              Standard_Real z;
+              Standard_Real z = NAN;
               z=Dist3[0]; Dist3[0]=Dist3[1]; Dist3[1]=z;
               z=u3[0]; u3[0]=u3[1]; u3[1]=z;
               z=v3[0]; v3[0]=v3[1]; v3[1]=z;
             }
             if(Dist3[1]<Dist3[2]) { 
-              Standard_Real z;
+              Standard_Real z = NAN;
               z=Dist3[1]; Dist3[1]=Dist3[2]; Dist3[2]=z;
               z=u3[1]; u3[1]=u3[2]; u3[2]=z;
               z=v3[1]; v3[1]=v3[2]; v3[2]=z;
             }
             if(Dist3[0]<Dist3[1]) { 
-              Standard_Real z;
+              Standard_Real z = NAN;
               z=Dist3[0]; Dist3[0]=Dist3[1]; Dist3[1]=z;
               z=u3[0]; u3[0]=u3[1]; u3[1]=z;
               z=v3[0]; v3[0]=v3[1]; v3[1]=z;
@@ -3456,7 +3458,7 @@ Standard_Boolean IsPointOnLine(const IntSurf_PntOn2S        &thePOn2S,
 {
   Standard_Boolean isOnLine = Standard_False;
   Standard_Real Deflection2 = Deflection*Deflection;
-  Standard_Real pu1, pu2, pv1, pv2;
+  Standard_Real pu1 = NAN, pu2 = NAN, pv1 = NAN, pv2 = NAN;
 
   thePOn2S.Parameters(pu1, pv1, pu2, pv2);
 
@@ -3464,7 +3466,7 @@ Standard_Boolean IsPointOnLine(const IntSurf_PntOn2S        &thePOn2S,
     (theWLine->IsOutSurf2Box(gp_Pnt2d(pu2, pv2)) == Standard_False) &&
     (theWLine->IsOutBox(thePOn2S.Value())        == Standard_False)) {
       const Standard_Integer NbPntOn2SOnLine = theWLine->NbPnts();
-      Standard_Integer ll;
+      Standard_Integer ll = 0;
 
       for (ll=1; ll < NbPntOn2SOnLine && !isOnLine; ll++) {
         const gp_Pnt &Pa     = theWLine->Point(ll).Value();
@@ -3533,7 +3535,7 @@ void AddWLine(IntPatch_SequenceOfLine      &theLines,
 {
   Standard_Integer i = 1;
   Standard_Integer aNbLines = theLines.Length();
-  Standard_Boolean isToRemove;
+  Standard_Boolean isToRemove = 0;
 
   // Check each line of theLines if it is on theWLine.
   while (i <= aNbLines) {
@@ -3553,7 +3555,7 @@ void AddWLine(IntPatch_SequenceOfLine      &theLines,
           // Middle point is on theWLine. Check vertices.
           isToRemove = Standard_True;
 
-          Standard_Integer j;
+          Standard_Integer j = 0;
           const Standard_Integer aNbVtx = aWLine->NbVertex();
 
           for (j = 1; j <= aNbVtx; j++) {
index 4e552fc0679c78e42311f91e8800e0e927351f2f..bbf9571dfc9f99f49ff23feb2a7f852d9204017e 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <IntPatch_RLine.hxx>
 #include <IntSurf_LineOn2S.hxx>
 #include <IntSurf_PntOn2S.hxx>
@@ -26,7 +28,7 @@ IntPatch_RLine::IntPatch_RLine (const Standard_Boolean Tang,
                                 const IntSurf_TypeTrans Trans1,
                                 const IntSurf_TypeTrans Trans2) :
   IntPatch_PointLine(Tang,Trans1,Trans2),
-  ParamInf1(0.0),
+  onS2(Standard_False), onS1(Standard_False), ParamInf1(0.0),
   ParamSup1(0.0),
   ParamInf2(0.0),
   ParamSup2(0.0),
@@ -36,8 +38,8 @@ IntPatch_RLine::IntPatch_RLine (const Standard_Boolean Tang,
   indl(0)
 {
   typ = IntPatch_Restriction;
-  onS2=Standard_False;
-  onS1=Standard_False;
+  
+  
 }
 
 
@@ -45,7 +47,7 @@ IntPatch_RLine::IntPatch_RLine (const Standard_Boolean Tang,
                                 const IntSurf_Situation Situ1,
                                 const IntSurf_Situation Situ2) :
   IntPatch_PointLine(Tang,Situ1,Situ2),
-  ParamInf1(0.0),
+  onS2(Standard_False), onS1(Standard_False), ParamInf1(0.0),
   ParamSup1(0.0),
   ParamInf2(0.0),
   ParamSup2(0.0),
@@ -55,14 +57,14 @@ IntPatch_RLine::IntPatch_RLine (const Standard_Boolean Tang,
   indl(0)
 {
   typ = IntPatch_Restriction;
-  onS2=Standard_False;
-  onS1=Standard_False;
+  
+  
 }
 
 
 IntPatch_RLine::IntPatch_RLine (const Standard_Boolean Tang) :
   IntPatch_PointLine(Tang),
-  ParamInf1(0.0),
+  onS2(Standard_False), onS1(Standard_False), ParamInf1(0.0),
   ParamSup1(0.0),
   ParamInf2(0.0),
   ParamSup2(0.0),
@@ -72,8 +74,8 @@ IntPatch_RLine::IntPatch_RLine (const Standard_Boolean Tang) :
   indl(0)
 {
   typ = IntPatch_Restriction;
-  onS2=Standard_False;
-  onS1=Standard_False;
+  
+  
 }
 
 void IntPatch_RLine::ParamOnS1(Standard_Real& a,Standard_Real& b) const { 
@@ -124,7 +126,7 @@ void IntPatch_RLine::SetPoint(const Standard_Integer Index,
 //void IntPatch_RLine::ComputeVertexParameters(const Standard_Real Tol)
 void IntPatch_RLine::ComputeVertexParameters(const Standard_Real )
 {
-  Standard_Integer i,j,nbvtx;//k;
+  Standard_Integer i = 0,j = 0,nbvtx = 0;//k;
   
   Standard_Boolean APointDeleted = Standard_False;
   //----------------------------------------------------------
@@ -194,7 +196,7 @@ void IntPatch_RLine::ComputeVertexParameters(const Standard_Real )
 
   //----------------------------------------------------
   //-- On trie les Vertex 
-  Standard_Boolean SortIsOK;
+  Standard_Boolean SortIsOK = 0;
   do { 
     SortIsOK = Standard_True;
     for(i=2; i<=nbvtx; i++) { 
@@ -208,7 +210,7 @@ void IntPatch_RLine::ComputeVertexParameters(const Standard_Real )
   
   do {         
     APointDeleted = Standard_False;
-    Standard_Boolean restrdiff;
+    Standard_Boolean restrdiff = 0;
     for(i=1; i<=nbvtx && (APointDeleted == Standard_False); i++) { 
       const IntPatch_Point& VTX   = svtx.Value(i);      
       for(j=1; j<=nbvtx && (APointDeleted == Standard_False) ; j++) { 
@@ -374,7 +376,7 @@ void IntPatch_RLine::Dump(const Standard_Integer theMode) const
     printf("Num    [X  Y  Z]     [U1  V1]   [U2  V2]\n");
     for(Standard_Integer i=1; i<=aNbPoints; i++)
     {
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       Point(i).Parameters(u1,v1,u2,v2);
       printf("%4d  [%+10.20f %+10.20f %+10.20f]  [%+10.20f %+10.20f]  [%+10.20f %+10.20f]\n",
               i,Point(i).Value().X(),Point(i).Value().Y(),Point(i).Value().Z(),
@@ -400,7 +402,7 @@ void IntPatch_RLine::Dump(const Standard_Integer theMode) const
   case 1:
     for(Standard_Integer i = 1; i <= aNbPoints; i++)
     {
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       Point(i).Parameters(u1,v1,u2,v2);
       printf("point p%d %+10.20f %+10.20f %+10.20f\n",
               i,Point(i).Value().X(),Point(i).Value().Y(),Point(i).Value().Z());
@@ -410,7 +412,7 @@ void IntPatch_RLine::Dump(const Standard_Integer theMode) const
   case 2:
     for(Standard_Integer i = 1; i <= aNbPoints; i++)
     {
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       Point(i).Parameters(u1,v1,u2,v2);
       printf("point p%d %+10.20f %+10.20f\n", i, u1, v1);
     }
@@ -419,7 +421,7 @@ void IntPatch_RLine::Dump(const Standard_Integer theMode) const
   default:
     for(Standard_Integer i = 1; i <= aNbPoints; i++)
     {
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       Point(i).Parameters(u1,v1,u2,v2);
       printf("point p%d %+10.20f %+10.20f\n", i, u2, v2);
     }
index b1b996ff92be2600a407305a9712dc3f8abbcbbb..863206b4ecfb0acb3ad2c4d110af7053fd8b810b 100644 (file)
@@ -25,6 +25,8 @@
 //--      - Pour rester coherent avec cette facon de faire, 
 //--      Chercher(Nbvtx++). 
 
+#include <math.h>
+
 #include <Adaptor2d_Curve2d.hxx>
 #include <Adaptor3d_TopolTool.hxx>
 #include <gp_Pnt2d.hxx>
@@ -57,7 +59,7 @@ static void Recadre(GeomAbs_SurfaceType typeS1,
 {
   Standard_Integer nbpnts = wlin->NbPnts();
   if(Param<1) Param=1; else if(Param>nbpnts) Param=nbpnts;
-  Standard_Real U1p,V1p,U2p,V2p;
+  Standard_Real U1p = NAN,V1p = NAN,U2p = NAN,V2p = NAN;
 
   wlin->Point(Param).Parameters(U1p,V1p,U2p,V2p);
   switch(typeS1) { 
@@ -153,7 +155,7 @@ static void VerifyTgline(const Handle(IntPatch_WLine)& wlin,
      && Abs(Tgl.Z())<Tol) { 
     //-- On construit une tangente plus grande
     //-- (Eviter des points tres proches ds Walking)               
-    Standard_Integer i, n, nbpt=wlin->NbPnts();
+    Standard_Integer i = 0, n = 0, nbpt=wlin->NbPnts();
     Standard_Boolean forward = (nbpt-param) >= (param-1);
     for (n = 2; n > 0; n--, forward = !forward) {
       if (forward) {
@@ -203,7 +205,7 @@ static void GetLinePoint2d (const Handle(IntPatch_Line)& L,
   else
     par = Abs(param-par);
 
-  Standard_Real us1,vs1,us2,vs2;
+  Standard_Real us1 = NAN,vs1 = NAN,us2 = NAN,vs2 = NAN;
   if (typL == IntPatch_Walking) {
     if (OnFirst) {
       wlin->Point(Irang).ParametersOnS1(us1,vs1);
@@ -281,8 +283,8 @@ static Standard_Boolean FindParameter(const Handle(IntPatch_Line)& L,
   }
 
   else if (typL == IntPatch_Walking) {
-    Standard_Integer i, is, nbpt=wlin->NbPnts();
-    Standard_Real norm1,norm2;
+    Standard_Integer i = 0, is = 0, nbpt=wlin->NbPnts();
+    Standard_Real norm1 = NAN,norm2 = NAN;
     Standard_Integer ParamSearchInf=1;
     Standard_Integer ParamSearchSup=nbpt;
 
@@ -375,10 +377,10 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
 
   IntPatch_SearchPnt Commun;
 
-  Standard_Real U,V,W;
-  Standard_Real U1,V1,U2 = 0.,V2 = 0.;
+  Standard_Real U = NAN,V = NAN,W = NAN;
+  Standard_Real U1 = NAN,V1 = NAN,U2 = 0.,V2 = 0.;
   Standard_Real paramarc=0.,paramline=0.;
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
   TColgp_SequenceOfPnt locpt;
   TColgp_SequenceOfPnt2d locpt2;
   Handle(IntPatch_RLine) rlin (Handle(IntPatch_RLine)::DownCast (L)); //-- aucune verification n est 
@@ -389,8 +391,8 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
   tolPLin = Min (tolPLin, Precision::Confusion());
   IntPatch_PolyLine PLin(tolPLin);
 
-  Standard_Real PFirst,PLast;
-  Standard_Integer NbEchant;
+  Standard_Real PFirst = NAN,PLast = NAN;
+  Standard_Integer NbEchant = 0;
   gp_Pnt ptsommet, ptbid;
   gp_Vec tgline, tgrst, d1u, d1v, normsurf;
 
@@ -400,7 +402,7 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
   IntPatch_Point Sommet, ptline;
   Handle(Adaptor3d_HVertex) vtxarc,vtxline;
   Handle(Adaptor2d_Curve2d) arc;
-  Standard_Boolean VtxOnArc, duplicate, found;
+  Standard_Boolean VtxOnArc = 0, duplicate = 0, found = 0;
   IntSurf_Transition transarc,transline;
 
   IntPatch_IType typL = L->ArcType();
@@ -502,7 +504,7 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
         {
           NbEchant=10;
           
-          Standard_Real aXmin, aYmin, aXmax, aYmax;
+          Standard_Real aXmin = NAN, aYmin = NAN, aXmax = NAN, aYmax = NAN;
           BPLin.Get(aXmin, aYmin, aXmax, aYmax);
           gp_Lin2d aLin = arc->Line();
           const gp_Pnt2d& aLoc = aLin.Location();
@@ -550,7 +552,7 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
     }
 
     if(SurfaceIsPeriodic) { 
-      Standard_Real xmin,ymin,xmax,ymax,g;
+      Standard_Real xmin = NAN,ymin = NAN,xmax = NAN,ymax = NAN,g = NAN;
       BPLin.Get(xmin,ymin,xmax,ymax);
       g = BPLin.GetGap();
       BPLin.SetVoid();
@@ -559,7 +561,7 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
       BPLin.SetGap(g);
     }
     if(SurfaceIsBiPeriodic) { 
-      Standard_Real xmin,ymin,xmax,ymax,g;
+      Standard_Real xmin = NAN,ymin = NAN,xmax = NAN,ymax = NAN,g = NAN;
       BPLin.Get(xmin,ymin,xmax,ymax);
       g = BPLin.GetGap();
       BPLin.SetVoid();
@@ -709,7 +711,7 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
              }
 
              VtxOnArc = CoincideOnArc(ptsommet,arc,Surf,edgeTol,Domain,vtxarc);
-             Standard_Real vtxTol;
+             Standard_Real vtxTol = NAN;
              if (VtxOnArc) {
                vtxTol = Tol3d(vtxarc,Domain);
                if (edgeTol > vtxTol) vtxTol = edgeTol;
@@ -1000,7 +1002,7 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
   //-- On reprend la ligne et on recale les parametres des vertex.
   //-- 
   if (typL == IntPatch_Walking) {
-    Standard_Real pu1,pv1,pu2,pv2;
+    Standard_Real pu1 = NAN,pv1 = NAN,pu2 = NAN,pv2 = NAN;
     pu1=pv1=pu2=pv2=0.0;
     switch(TypeS1) { 
     case GeomAbs_Cylinder:
index d2fb94add03c64e6f52d72b6efdc20a8716fa20e..27d65df8868c8aa6a8c0a3da3de41268e7e9171e 100644 (file)
@@ -43,18 +43,18 @@ public:
   {
   };
   
-  virtual Standard_Integer NbVariables() const
+  Standard_Integer NbVariables() const override
   {
     return 3;
   };
 
-  virtual Standard_Integer NbEquations() const
+  Standard_Integer NbEquations() const override
   {
     return 3;
   }
 
-  virtual Standard_Boolean Value(const math_Vector& theX,
-                                 math_Vector& theF)
+  Standard_Boolean Value(const math_Vector& theX,
+                                 math_Vector& theF) override
   {
     try
     {
@@ -74,8 +74,8 @@ public:
     return Standard_True;
   };
 
-  virtual Standard_Boolean Derivatives(const math_Vector& theX,
-                                       math_Matrix& theD)
+  Standard_Boolean Derivatives(const math_Vector& theX,
+                                       math_Matrix& theD) override
   {
     try
     {
@@ -112,9 +112,9 @@ public:
     return Standard_True;
   };
 
-  virtual Standard_Boolean Values (const math_Vector& theX,
+  Standard_Boolean Values (const math_Vector& theX,
                                    math_Vector& theF,
-                                   math_Matrix& theD)
+                                   math_Matrix& theD) override
   {
     if(!Value(theX, theF))
       return Standard_False;
index 7cdb93daafac8d797eee389435a3d81e6d563fa7..f3855e7b62d8c9dd5c9df93a8e79d7257ad0769b 100644 (file)
@@ -26,6 +26,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IntPatch_WLine,IntPatch_PointLine)
 #define DEBUGV 0
 
 #include <Precision.hxx>
+#include <math.h>
 #include <stdio.h>
 
 
@@ -33,13 +34,13 @@ IntPatch_WLine::IntPatch_WLine (const Handle(IntSurf_LineOn2S)& Line,
                                 const Standard_Boolean Tang,
                                 const IntSurf_TypeTrans Trans1,
                                 const IntSurf_TypeTrans Trans2) :
-  IntPatch_PointLine(Tang,Trans1,Trans2),fipt(Standard_False),lapt(Standard_False),
+  IntPatch_PointLine(Tang,Trans1,Trans2),curv(Line), fipt(Standard_False),lapt(Standard_False),
   hasArcOnS1(Standard_False),hasArcOnS2(Standard_False),
   myIsPurgerAllowed(Standard_True),
   myCreationWay(IntPatch_WLUnknown)
 {
   typ = IntPatch_Walking;
-  curv = Line;
+  
   u1period=v1period=u2period=v2period=0.0;
 }
 
@@ -48,26 +49,26 @@ IntPatch_WLine::IntPatch_WLine (const Handle(IntSurf_LineOn2S)& Line,
                                 const Standard_Boolean Tang,
                                 const IntSurf_Situation Situ1,
                                 const IntSurf_Situation Situ2) :
-  IntPatch_PointLine(Tang,Situ1,Situ2),fipt(Standard_False),lapt(Standard_False),
+  IntPatch_PointLine(Tang,Situ1,Situ2),curv(Line), fipt(Standard_False),lapt(Standard_False),
   hasArcOnS1(Standard_False),hasArcOnS2(Standard_False),
   myIsPurgerAllowed(Standard_True),
   myCreationWay(IntPatch_WLUnknown)
 {
   typ = IntPatch_Walking;
-  curv = Line;
+  
   u1period=v1period=u2period=v2period=0.0;
 }
 
 
 IntPatch_WLine::IntPatch_WLine (const Handle(IntSurf_LineOn2S)& Line,
                                 const Standard_Boolean Tang) :
-  IntPatch_PointLine(Tang),fipt(Standard_False),lapt(Standard_False),
+  IntPatch_PointLine(Tang),curv(Line), fipt(Standard_False),lapt(Standard_False),
   hasArcOnS1(Standard_False),hasArcOnS2(Standard_False),
   myIsPurgerAllowed(Standard_True),
   myCreationWay(IntPatch_WLUnknown)
 {
   typ = IntPatch_Walking;
-  curv = Line;
+  
   u1period=v1period=u2period=v2period=0.0;
 }
 
@@ -114,7 +115,7 @@ static void RecadreMemePeriode(IntSurf_PntOn2S& POn2S,const IntSurf_PntOn2S& Ref
                               const Standard_Real vp1,
                               const Standard_Real up2,
                               const Standard_Real vp2) { 
-  Standard_Real u1,v1,u2,v2,pu1,pv1,pu2,pv2;
+  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN,pu1 = NAN,pv1 = NAN,pu2 = NAN,pv2 = NAN;
   POn2S.Parameters(u1,v1,u2,v2);
   RefPOn2S.Parameters(pu1,pv1,pu2,pv2);
   RecadreMemePeriode(u1,v1,u2,v2,pu1,pv1,pu2,pv2,up1,vp1,up2,vp2);
@@ -221,7 +222,7 @@ static Standard_Boolean CompareVerticesOnSurf(const IntPatch_Point& vtx1,
                                              const IntPatch_Point& vtx2,
                                              const Standard_Boolean onFirst)
 {
-  Standard_Real u1,v1,u2,v2, tolU, tolV;
+  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN, tolU = NAN, tolV = NAN;
   if (onFirst) {
     vtx1.ParametersOnS1(u1,v1);
     vtx2.ParametersOnS1(u2,v2);
@@ -247,9 +248,9 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
   // MSV Oct 15, 2001: use tolerance of vertex instead of RTol where 
   //                   it is possible
 
-  Standard_Integer i,j,k,nbvtx,nbponline;
-  Standard_Integer indicevertexonline;
-  Standard_Real    indicevertex;
+  Standard_Integer i = 0,j = 0,k = 0,nbvtx = 0,nbponline = 0;
+  Standard_Integer indicevertexonline = 0;
+  Standard_Real    indicevertex = NAN;
 
   Standard_Boolean APointDeleted = Standard_False;
   //----------------------------------------------------------
@@ -282,7 +283,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
   //-- sur des restrictions differentes
   //-- 
   //-- Phase Creation de nouveaux points sur S1 
-  Standard_Boolean encoreunefois;
+  Standard_Boolean encoreunefois = 0;
   do { 
     nbvtx=NbVertex();
     encoreunefois=Standard_False;
@@ -450,7 +451,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
 
   //----------------------------------------------------
   //-- On trie les Vertex 
-  Standard_Boolean SortIsOK;
+  Standard_Boolean SortIsOK = 0;
   do { 
     SortIsOK = Standard_True;
     for(i=2; i<=nbvtx; i++) { 
@@ -513,7 +514,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
           //Adjust first point of curve to corresponding vertex the following way:
           //set 3D point as the point of the vertex and 2D points as the points of the point on curve.
           curv->SetPoint (1, POn2S.Value());
-          Standard_Real mu1,mv1,mu2,mv2;
+          Standard_Real mu1 = NAN,mv1 = NAN,mu2 = NAN,mv2 = NAN;
           curv->Value(1).Parameters(mu1,mv1,mu2,mv2);
           svtx.ChangeValue(i).SetParameter(1);
           svtx.ChangeValue(i).SetParameters(mu1,mv1,mu2,mv2);
@@ -556,7 +557,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
       //---------------------------------------------------------
       Standard_Boolean Substitution = Standard_False;
       //-- for(k=indicevertexonline+1; !Substitution && k>=indicevertexonline-1;k--) {   avant le 9 oct 97 
-      Standard_Real mu1,mv1,mu2,mv2;
+      Standard_Real mu1 = NAN,mv1 = NAN,mu2 = NAN,mv2 = NAN;
       curv->Value(indicevertexonline).Parameters(mu1,mv1,mu2,mv2);
       
       for(k=indicevertexonline+1; k>=indicevertexonline-1;k--) { 
@@ -593,7 +594,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
       //Remove duplicating points
       if (Substitution)
       {
-        Standard_Integer ind_point;
+        Standard_Integer ind_point = 0;
         for(ind_point = 2; (ind_point <= nbponline && nbponline > 1); ind_point++) { 
           Standard_Real d = (curv->Value(ind_point-1).Value()).SquareDistance((curv->Value(ind_point).Value()));
           if(d < dmini) { 
@@ -771,7 +772,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
     }
   }
   if(bFirst == Standard_False) { 
-    Standard_Real pu1,pv1,pu2,pv2;
+    Standard_Real pu1 = NAN,pv1 = NAN,pu2 = NAN,pv2 = NAN;
     Standard_Boolean vtxfound = Standard_False;
     IntPatch_Point vtx;
     curv->Value(1).Parameters(pu1,pv1,pu2,pv2);
@@ -796,7 +797,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
     indf = 1;
   }
   if(bLast == Standard_False) { 
-    Standard_Real pu1,pv1,pu2,pv2;
+    Standard_Real pu1 = NAN,pv1 = NAN,pu2 = NAN,pv2 = NAN;
     Standard_Boolean vtxfound = Standard_False;    
     IntPatch_Point vtx;
     curv->Value(nbponline).Parameters(pu1,pv1,pu2,pv2);   
@@ -1000,7 +1001,7 @@ void IntPatch_WLine::Dump(const Standard_Integer theMode) const
     printf("Num    [X  Y  Z]     [U1  V1]   [U2  V2]\n");
     for(Standard_Integer i=1; i<=aNbPoints; i++)
     {
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       Point(i).Parameters(u1,v1,u2,v2);
       printf("%4d  [%+10.20f %+10.20f %+10.20f]  [%+10.20f %+10.20f]  [%+10.20f %+10.20f]\n",
               i,Point(i).Value().X(),Point(i).Value().Y(),Point(i).Value().Z(),
@@ -1026,7 +1027,7 @@ void IntPatch_WLine::Dump(const Standard_Integer theMode) const
   case 1:
     for(Standard_Integer i = 1; i <= aNbPoints; i++)
     {
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       Point(i).Parameters(u1,v1,u2,v2);
       printf("point p%d %+10.20f %+10.20f %+10.20f\n",
               i,Point(i).Value().X(),Point(i).Value().Y(),Point(i).Value().Z());
@@ -1036,7 +1037,7 @@ void IntPatch_WLine::Dump(const Standard_Integer theMode) const
   case 2:
     for(Standard_Integer i = 1; i <= aNbPoints; i++)
     {
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       Point(i).Parameters(u1,v1,u2,v2);
       printf("point p%d %+10.20f %+10.20f\n", i, u1, v1);
     }
@@ -1045,7 +1046,7 @@ void IntPatch_WLine::Dump(const Standard_Integer theMode) const
   default:
     for(Standard_Integer i = 1; i <= aNbPoints; i++)
     {
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       Point(i).Parameters(u1,v1,u2,v2);
       printf("point p%d %+10.20f %+10.20f\n", i, u2, v2);
     }
index ccebfe4fec987c08c2674bfe9d021648746fed48..784d041105bffc19b2e980f973ee5e670be88b3b 100644 (file)
@@ -225,8 +225,8 @@ private:
   Handle(IntSurf_LineOn2S) curv;
   Standard_Boolean fipt;
   Standard_Boolean lapt;
-  Standard_Integer indf;
-  Standard_Integer indl;
+  Standard_Integer indf{};
+  Standard_Integer indl{};
   IntPatch_SequenceOfPoint svtx;
   Standard_Real u1period;
   Standard_Real v1period;
index 9132bf33e04f397c36a8db3052a94f02e19fb22c..8ac6ee873ac9f31440af47400f14251aec942ba9 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntPatch_WLineTool.hxx>
 
 #include <Adaptor3d_Surface.hxx>
@@ -73,7 +75,7 @@ static void FillPointsHash(const Handle(IntPatch_WLine)         &theWLine,
   // 1 - Delete point.
   // 0 - Store point.
   // -1 - Vertex point (not delete).
-  Standard_Integer i, v;
+  Standard_Integer i = 0, v = 0;
 
   for(i = 1; i <= theWLine->NbPnts(); i++)
     thePointsHash.SetValue(i, 0);
@@ -95,7 +97,7 @@ static Handle(IntPatch_WLine) MakeNewWLine(const Handle(IntPatch_WLine)
                                            NCollection_Array1<Standard_Integer> &thePointsHash,
                                            const Standard_Boolean theIsOuter)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   Handle(IntSurf_LineOn2S) aPurgedLineOn2S = new IntSurf_LineOn2S();
   Handle(IntPatch_WLine) aLocalWLine = new IntPatch_WLine(aPurgedLineOn2S, Standard_False);
@@ -219,7 +221,7 @@ static Handle(IntPatch_WLine)
                     const Handle(Adaptor3d_TopolTool)  &theDom1,
                     const Handle(Adaptor3d_TopolTool)  &theDom2)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   NCollection_Array1<Standard_Integer> aDelOuterPointsHash(1, theWLine->NbPnts());
   FillPointsHash(theWLine, aDelOuterPointsHash);
@@ -229,7 +231,7 @@ static Handle(IntPatch_WLine)
       return theWLine;
 
   gp_Pnt2d aPntOnF1, aPntOnF2;
-  Standard_Real aX1, aY1, aX2, aY2;
+  Standard_Real aX1 = NAN, aY1 = NAN, aX2 = NAN, aY2 = NAN;
 
   // Iterate over points in walking line and delete which are out of bounds.
   // Forward.
@@ -314,7 +316,7 @@ static Handle(IntPatch_WLine)
     // Vertex geometry.
     IntPatch_Point aVertex = aLocalWLine->Vertex(1);
     aVertex.SetValue(theWLine->Point(aFirstGeomIdx).Value());
-    Standard_Real aU1, aU2, aV1, aV2;
+    Standard_Real aU1 = NAN, aU2 = NAN, aV1 = NAN, aV2 = NAN;
     theWLine->Point(aFirstGeomIdx).Parameters(aU1, aV1, aU2, aV2);
     MovePoint(theS1, aU1, aV1);
     MovePoint(theS2, aU2, aV2);
@@ -329,7 +331,7 @@ static Handle(IntPatch_WLine)
     // Vertex geometry.
     IntPatch_Point aVertex = aLocalWLine->Vertex(aLocalWLine->NbVertex());
     aVertex.SetValue(theWLine->Point(aLastGeomIdx).Value());
-    Standard_Real aU1, aU2, aV1, aV2;
+    Standard_Real aU1 = NAN, aU2 = NAN, aV1 = NAN, aV2 = NAN;
     theWLine->Point(aLastGeomIdx).Parameters(aU1, aV1, aU2, aV2);
     MovePoint(theS1, aU1, aV1);
     MovePoint(theS2, aU2, aV2);
@@ -421,7 +423,7 @@ static Handle(IntPatch_WLine)
   // III: Check points for tube criteria:
   // Workaround to handle case of small amount points after purge.
   // Test "boolean boptuc_complex B5" and similar.
-  Standard_Integer aNbPnt = 0 , i;
+  Standard_Integer aNbPnt = 0 , i = 0;
 
   if (theWLine->NbPnts() <= 2)
     return theWLine;
@@ -1373,7 +1375,7 @@ Handle(IntPatch_WLine) IntPatch_WLineTool::
                      const Handle(Adaptor3d_TopolTool)  &theDom1,
                      const Handle(Adaptor3d_TopolTool)  &theDom2)
 {
-  Standard_Integer i, k, v, nb, nbvtx;
+  Standard_Integer i = 0, k = 0, v = 0, nb = 0, nbvtx = 0;
   Handle(IntPatch_WLine) aResult;
   nbvtx = theWLine->NbVertex();
   nb = theWLine->NbPnts();
@@ -1726,7 +1728,7 @@ static Standard_Boolean IsNeedSkipWL(const Handle(IntPatch_WLine)& theWL,
                                      const Bnd_Box2d& theBoxS2,
                                      const Standard_Real* const theArrPeriods)
 {
-  Standard_Real aFirstp, aLastp;
+  Standard_Real aFirstp = NAN, aLastp = NAN;
   Standard_Integer aNbVtx = theWL->NbVertex();
   Standard_Boolean isNeedSkip = Standard_True;
 
@@ -1734,7 +1736,7 @@ static Standard_Boolean IsNeedSkipWL(const Handle(IntPatch_WLine)& theWL,
     aFirstp = theWL->Vertex (i).ParameterOnLine();
     aLastp  = theWL->Vertex (i + 1).ParameterOnLine();
 
-    Standard_Real aU1, aV1, aU2, aV2;
+    Standard_Real aU1 = NAN, aV1 = NAN, aU2 = NAN, aV2 = NAN;
     const Standard_Integer pmid = (Standard_Integer)((aFirstp + aLastp) / 2);
     const IntSurf_PntOn2S& aPmid = theWL->Point (pmid);
     aPmid.Parameters (aU1, aV1, aU2, aV2);
index 0c8b2d59cde84e426373780a3fe22136092bf244..3c9215f8a35f012d08ec0d17daead5eefbc2b5f0 100644 (file)
@@ -36,16 +36,16 @@ static Standard_Integer ComputeIntersection(IntPolyh_PMaillageAffinage& theMaill
 //purpose  : 
 //=======================================================================
 IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& theS1,
-                                             const Handle(Adaptor3d_Surface)& theS2)
+                                             const Handle(Adaptor3d_Surface)& theS2) : mySurf1(theS1), mySurf2(theS2), myNbSU1(10), myNbSV1(10), myNbSU2(10), myNbSV2(10), myIsDone(Standard_False), myIsParallel(Standard_False)
 {
-  mySurf1 = theS1;
-  mySurf2 = theS2;
-  myNbSU1 = 10;
-  myNbSV1 = 10;
-  myNbSU2 = 10;
-  myNbSV2 = 10;
-  myIsDone = Standard_False;
-  myIsParallel = Standard_False;
+  
+  
+  
+  
+  
+  
+  
+  
   mySectionLines.Init(1000);
   myTangentZones.Init(10000);
   Perform();
@@ -60,16 +60,16 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
                                              const Standard_Integer            theNbSV1,
                                              const Handle(Adaptor3d_Surface)& theS2,
                                              const Standard_Integer            theNbSU2,
-                                             const Standard_Integer            theNbSV2)
+                                             const Standard_Integer            theNbSV2) : mySurf1(theS1), mySurf2(theS2), myNbSU1(theNbSU1), myNbSV1(theNbSV1), myNbSU2(theNbSU2), myNbSV2(theNbSV2), myIsDone(Standard_False), myIsParallel(Standard_False)
 {
-  mySurf1 = theS1;
-  mySurf2 = theS2;
-  myNbSU1 = theNbSU1;
-  myNbSV1 = theNbSV1;
-  myNbSU2 = theNbSU2;
-  myNbSV2 = theNbSV2;
-  myIsDone = Standard_False;
-  myIsParallel = Standard_False;
+  
+  
+  
+  
+  
+  
+  
+  
   mySectionLines.Init(1000);
   myTangentZones.Init(10000);
   Perform();
@@ -84,16 +84,16 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
                                              const TColStd_Array1OfReal&       theVPars1,
                                              const Handle(Adaptor3d_Surface)& theS2,
                                              const TColStd_Array1OfReal&       theUPars2,
-                                             const TColStd_Array1OfReal&       theVPars2)
+                                             const TColStd_Array1OfReal&       theVPars2) : mySurf1(theS1), mySurf2(theS2), myNbSU1(theUPars1.Length()), myNbSV1(theVPars1.Length()), myNbSU2(theUPars2.Length()), myNbSV2(theVPars2.Length()), myIsDone(Standard_False), myIsParallel(Standard_False)
 {
-  mySurf1 = theS1;
-  mySurf2 = theS2;
-  myNbSU1 = theUPars1.Length();
-  myNbSV1 = theVPars1.Length();
-  myNbSU2 = theUPars2.Length();
-  myNbSV2 = theVPars2.Length();
-  myIsDone = Standard_False;
-  myIsParallel = Standard_False;
+  
+  
+  
+  
+  
+  
+  
+  
   mySectionLines.Init(1000);
   myTangentZones.Init(10000);
   Perform(theUPars1, theVPars1, theUPars2, theVPars2);
@@ -358,7 +358,7 @@ Standard_Boolean IntPolyh_Intersection::PerformMaillage(const TColStd_Array1OfRe
   if (FinTTC == 0)
   {
     // Check if enlarge for the surfaces is possible
-    Standard_Boolean isEnlargeU1, isEnlargeV1, isEnlargeU2, isEnlargeV2;
+    Standard_Boolean isEnlargeU1 = 0, isEnlargeV1 = 0, isEnlargeU2 = 0, isEnlargeV2 = 0;
     IntPolyh_Tools::IsEnlargePossible(mySurf1, isEnlargeU1, isEnlargeV1);
     IntPolyh_Tools::IsEnlargePossible(mySurf2, isEnlargeU2, isEnlargeV2);
 
index 1e2300416b9116e87dbbc0a15cf7e25ecbd47b3e..532af0662ba982d7aeef66035ad10e74cb093ad3 100644 (file)
@@ -23,6 +23,8 @@
 //  Modified by skv - Thu Sep 25 17:42:42 2003 OCC567
 //  modified by ofv Thu Apr  8 14:58:13 2004 fip
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Bnd_BoundSortBox.hxx>
 #include <Bnd_Box.hxx>
@@ -170,7 +172,7 @@ public:
   {}
 
   //! Rejects the node
-  virtual Standard_Boolean RejectNode (const BVH_Vec3d& theCMin1,
+  Standard_Boolean RejectNode (const BVH_Vec3d& theCMin1,
                                        const BVH_Vec3d& theCMax1,
                                        const BVH_Vec3d& theCMin2,
                                        const BVH_Vec3d& theCMax2,
@@ -180,7 +182,7 @@ public:
   }
 
   //! Accepts the element
-  virtual Standard_Boolean Accept (const Standard_Integer theID1,
+  Standard_Boolean Accept (const Standard_Integer theID1,
                                    const Standard_Integer theID2) Standard_OVERRIDE
   {
     if (!myBVHSet1->Box (theID1).IsOut (myBVHSet2->Box (theID2)))
@@ -371,10 +373,10 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt
    const TColStd_Array1OfReal& Vpars,
    const Standard_Real *theDeflTol)
 {
-  Standard_Boolean bDegI, bDeg;
-  Standard_Integer aNbU, aNbV, iCnt, i, j;
-  Standard_Integer aID1, aID2, aJD1, aJD2;
-  Standard_Real aTol, aU, aV, aX, aY, aZ;
+  Standard_Boolean bDegI = 0, bDeg = 0;
+  Standard_Integer aNbU = 0, aNbV = 0, iCnt = 0, i = 0, j = 0;
+  Standard_Integer aID1 = 0, aID2 = 0, aJD1 = 0, aJD2 = 0;
+  Standard_Real aTol = NAN, aU = NAN, aV = NAN, aX = NAN, aY = NAN, aZ = NAN;
   gp_Pnt aP;
   //
   aNbU=(SurfID==1)? NbSamplesU1 : NbSamplesU2;
@@ -418,7 +420,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt
   aTol = !theDeflTol ? IntPolyh_Tools::ComputeDeflection(aS, Upars, Vpars) : *theDeflTol;
   aTol *= 1.2;
 
-  Standard_Real a1,a2,a3,b1,b2,b3;
+  Standard_Real a1 = NAN,a2 = NAN,a3 = NAN,b1 = NAN,b2 = NAN,b3 = NAN;
   //
   aBox.Get(a1,a2,a3,b1,b2,b3);
   aBox.Update(a1-aTol,a2-aTol,a3-aTol,b1+aTol,b2+aTol,b3+aTol);
@@ -447,9 +449,9 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt(const Standard_Integer SurfID,
   if (!(aJD1 || aJD2))
     DegeneratedIndex(theUPars, aNbU, aS, 2, aID1, aID2);
 
-  Standard_Boolean bDegI, bDeg;
-  Standard_Integer iCnt(0), i, j;
-  Standard_Real aX, aY, aZ, aU, aV;
+  Standard_Boolean bDegI = 0, bDeg = 0;
+  Standard_Integer iCnt(0), i = 0, j = 0;
+  Standard_Real aX = NAN, aY = NAN, aZ = NAN, aU = NAN, aV = NAN;
 
   TPoints.Init(thePointsNorm.NbItems());
 
@@ -483,7 +485,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt(const Standard_Integer SurfID,
 
   // Update box
   Standard_Real Tol = theDeflTol*1.2;
-  Standard_Real a1,a2,a3,b1,b2,b3;
+  Standard_Real a1 = NAN,a2 = NAN,a3 = NAN,b1 = NAN,b2 = NAN,b3 = NAN;
   aBox.Get(a1,a2,a3,b1,b2,b3);
   aBox.Update(a1-Tol,a2-Tol,a3-Tol,b1+Tol,b2+Tol,b3+Tol);
   aBox.Enlarge(MyTolerance);
@@ -518,7 +520,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt
 //=======================================================================
 void IntPolyh_MaillageAffinage::CommonBox()
 {
-  Standard_Real XMin, YMin, ZMin, XMax, YMax, ZMax;
+  Standard_Real XMin = NAN, YMin = NAN, ZMin = NAN, XMax = NAN, YMax = NAN, ZMax = NAN;
   CommonBox(GetBox(1), GetBox(2), XMin, YMin, ZMin, XMax, YMax, ZMax);
 }
 
@@ -539,8 +541,8 @@ void IntPolyh_MaillageAffinage::CommonBox (const Bnd_Box &,
                                            Standard_Real &YMax,
                                            Standard_Real &ZMax) 
 {
-  Standard_Real x10,y10,z10,x11,y11,z11;
-  Standard_Real x20,y20,z20,x21,y21,z21;
+  Standard_Real x10 = NAN,y10 = NAN,z10 = NAN,x11 = NAN,y11 = NAN,z11 = NAN;
+  Standard_Real x20 = NAN,y20 = NAN,z20 = NAN,x21 = NAN,y21 = NAN,z21 = NAN;
 
   MyBox1.Get(x10,y10,z10,x11,y11,z11);
   MyBox2.Get(x20,y20,z20,x21,y21,z21);
@@ -567,7 +569,7 @@ void IntPolyh_MaillageAffinage::CommonBox (const Bnd_Box &,
     }
   }
   //
-  Standard_Real X,Y,Z;
+  Standard_Real X = NAN,Y = NAN,Z = NAN;
   X=XMax-XMin; 
   Y=YMax-YMin; 
   Z=ZMax-ZMin; 
@@ -596,10 +598,10 @@ void IntPolyh_MaillageAffinage::CommonBox (const Bnd_Box &,
   //Marking of points included in the common
   const Standard_Integer FinTP1 = TPoints1.NbItems();
 //  for(Standard_Integer i=0; i<FinTP1; i++) {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for( i=0; i<FinTP1; i++) {
     IntPolyh_Point & Pt1 = TPoints1[i];
-    Standard_Integer r;
+    Standard_Integer r = 0;
     if(Pt1.X()<XMin) { 
       r=1; 
     }   
@@ -631,7 +633,7 @@ void IntPolyh_MaillageAffinage::CommonBox (const Bnd_Box &,
   const Standard_Integer FinTP2 = TPoints2.NbItems();
   for(Standard_Integer ii=0; ii<FinTP2; ii++) {
     IntPolyh_Point & Pt2 = TPoints2[ii];
-    Standard_Integer rr;
+    Standard_Integer rr = 0;
     if(Pt2.X()<XMin) { 
       rr=1;
     }   
@@ -706,7 +708,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfEdges
   
   //maillage surU=u0
   Standard_Integer PntInit=1;
-  Standard_Integer BoucleMeshV;
+  Standard_Integer BoucleMeshV = 0;
   for(BoucleMeshV=1; BoucleMeshV<NbSamplesV-1;BoucleMeshV++){
     TEdges[CpteurTabEdges].SetFirstPoint(PntInit);                // U V
     TEdges[CpteurTabEdges].SetSecondPoint(PntInit+1);             // U V+1
@@ -1031,7 +1033,7 @@ static
   // Find all triangles of the bigger surface with bounding boxes
   // overlapping the bounding box the other surface
   TColStd_ListOfInteger aLIT;
-  Standard_Integer i, aNbT = theTriangles.NbItems();
+  Standard_Integer i = 0, aNbT = theTriangles.NbItems();
   for (i = 0; i < aNbT; ++i) {
     IntPolyh_Triangle& aTriangle = theTriangles[i];
     if (!aTriangle.IsIntersectionPossible() || aTriangle.IsDegenerated()) {
@@ -1059,7 +1061,7 @@ static
   // The criterion of refining for large surface depends on the size of
   // the bounding box of the other - since the criterion should be minimized,
   // the smallest side of the bounding box is taken
-  Standard_Real x0, y0, z0, x1, y1, z1;
+  Standard_Real x0 = NAN, y0 = NAN, z0 = NAN, x1 = NAN, y1 = NAN, z1 = NAN;
   theOppositeBox.Get(x0, y0, z0, x1, y1, z1);
   Standard_Real dx = Abs(x1 - x0);
   Standard_Real dy = Abs(y1 - y0);
@@ -1100,7 +1102,7 @@ void IntPolyh_MaillageAffinage::TrianglesDeflectionsRefinementBSB()
   // to calculate all deflections
   ComputeDeflections(1);
   // Check deflection at output
-  Standard_Real FlecheCritique1;
+  Standard_Real FlecheCritique1 = NAN;
   if (FlecheMin1 > FlecheMax1) {
     return;
   }
@@ -1113,7 +1115,7 @@ void IntPolyh_MaillageAffinage::TrianglesDeflectionsRefinementBSB()
   ComputeDeflections(2);
 
   //-- Check arrows at output
-  Standard_Real FlecheCritique2;
+  Standard_Real FlecheCritique2 = NAN;
   if (FlecheMin2 > FlecheMax2) {
     return;
   }
@@ -1125,8 +1127,8 @@ void IntPolyh_MaillageAffinage::TrianglesDeflectionsRefinementBSB()
   // The greatest of two bounding boxes created in FillArrayOfPoints is found.
   // Then this value is weighted depending on the discretization 
   // (NbSamplesU and NbSamplesV)
-  Standard_Real diag1, diag2;
-  Standard_Real x0, y0, z0, x1, y1, z1;
+  Standard_Real diag1 = NAN, diag2 = NAN;
+  Standard_Real x0 = NAN, y0 = NAN, z0 = NAN, x1 = NAN, y1 = NAN, z1 = NAN;
 
   MyBox1.Get(x0, y0, z0, x1, y1, z1);
   x0 -= x1; y0 -= y1; z0 -= z1;
@@ -1438,7 +1440,7 @@ Standard_Integer IntPolyh_MaillageAffinage::StartingPointsResearch
   nn1.Cross(e1, e2); //normal to the first triangle
   mm1.Cross(f1, f2); //normal to the second triangle
 
-  Standard_Real nn1modulus, mm1modulus;
+  Standard_Real nn1modulus = NAN, mm1modulus = NAN;
   nn1modulus=sqrt(nn1.SquareModulus());
   mm1modulus=sqrt(mm1.SquareModulus());
 
@@ -1561,7 +1563,7 @@ Standard_Integer IntPolyh_MaillageAffinage::NextStartingPointsResearch
     nn1.Cross(e1, e2); //normal to the first triangle
     mm1.Cross(f1, f2); //normal to the second triangle
 
-    Standard_Real nn1modulus, mm1modulus;
+    Standard_Real nn1modulus = NAN, mm1modulus = NAN;
     nn1modulus=sqrt(nn1.SquareModulus());
     mm1modulus=sqrt(mm1.SquareModulus());
     
@@ -1666,7 +1668,7 @@ void CalculPtsInterTriEdgeCoplanaires(const Standard_Integer TriSurfID,
                                       IntPolyh_StartPoint &SP2,
                                       Standard_Integer &NbPoints)
 {
-  Standard_Real aDE, aDC;
+  Standard_Real aDE = NAN, aDC = NAN;
   //
   gp_Vec aVE(Edge.X(), Edge.Y(), Edge.Z());
   gp_Vec aVC(Cote.X(), Cote.Y(), Cote.Z());
@@ -2162,7 +2164,7 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleEdgeContact
         
       Standard_Real Cote23X=Cote23.X();
       Standard_Real D1=0.0;
-      Standard_Real D3,D4;
+      Standard_Real D3 = NAN,D4 = NAN;
 
       //Combination Eq1 Eq2
       if(Abs(Cote23X)>MyConfusionPrecision) {
@@ -2351,7 +2353,7 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleCompare ()
   Standard_Real CoupleAngle = -2.0;
   //
   // Intersection of the triangles
-  Standard_Integer i, aNb = aDMILI.Extent();
+  Standard_Integer i = 0, aNb = aDMILI.Extent();
   for (i = 1; i <= aNb; ++i) {
     const Standard_Integer i_S1 = aDMILI.FindKey(i);
     IntPolyh_Triangle &Triangle1 =  TTriangles1[i_S1];
@@ -2419,7 +2421,7 @@ Standard_Boolean CheckCoupleAndGetAngle2(const Standard_Integer T1,
   ///T11 and T22 are two other triangles implied  in the contact edge edge
   /// CT11 couple( T1,T22) and CT22 couple (T2,T11)
   /// these couples will be marked if there is a start point
-  Standard_Boolean Test1 , Test2, Test3;
+  Standard_Boolean Test1 = 0 , Test2 = 0, Test3 = 0;
   Test1 = Test2 = Test3 = Standard_False;
   //
   IntPolyh_ListIteratorOfListOfCouples aIt(TTrianglesContacts);
@@ -2534,7 +2536,7 @@ Standard_Integer IntPolyh_MaillageAffinage::StartPointsChain
         MySectionLine.Init(10000);//Initialisation of array of StartPoint
 
       Standard_Integer NbPoints=-1;
-      Standard_Integer T1I, T2I;
+      Standard_Integer T1I = 0, T2I = 0;
       T1I = aCouple.FirstValue();
       T2I = aCouple.SecondValue();
       
@@ -2600,7 +2602,7 @@ Standard_Integer IntPolyh_MaillageAffinage::StartPointsChain
           //chain of the other side
           IntPolyh_StartPoint SP12;//=SP1;
           if (SP1.E2()>=0) { //&&(SP1.E1()!=-1) already tested
-            Standard_Integer NextTriangle2;
+            Standard_Integer NextTriangle2 = 0;
             if (TEdges2[SP1.E2()].FirstTriangle()!=T2I) NextTriangle2=TEdges2[SP1.E2()].FirstTriangle();
             else NextTriangle2=TEdges2[SP1.E2()].SecondTriangle();
             
@@ -2724,7 +2726,7 @@ Standard_Integer IntPolyh_MaillageAffinage::GetNextChainStartPoint
   Standard_Integer NbPoints=0;
   if( (SP.E1()>=0)&&(SP.E2()==-2) ) {
     //case if the point is on edge of T1
-    Standard_Integer NextTriangle1;
+    Standard_Integer NextTriangle1 = 0;
     if (TEdges1[SP.E1()].FirstTriangle()!=SP.T1()) NextTriangle1=TEdges1[SP.E1()].FirstTriangle();
     else 
       NextTriangle1=TEdges1[SP.E1()].SecondTriangle();
@@ -2747,7 +2749,7 @@ Standard_Integer IntPolyh_MaillageAffinage::GetNextChainStartPoint
   }
   else if( (SP.E1()==-2)&&(SP.E2()>=0) ) {
     //case if the point is on edge of T2
-    Standard_Integer NextTriangle2;
+    Standard_Integer NextTriangle2 = 0;
     if (TEdges2[SP.E2()].FirstTriangle()!=SP.T2()) NextTriangle2=TEdges2[SP.E2()].FirstTriangle();
     else 
       NextTriangle2=TEdges2[SP.E2()].SecondTriangle();
@@ -2774,11 +2776,11 @@ Standard_Integer IntPolyh_MaillageAffinage::GetNextChainStartPoint
   }
   else if( (SP.E1()>=0)&&(SP.E2()>=0) ) {
     ///the point is located on two edges
-      Standard_Integer NextTriangle1;
+      Standard_Integer NextTriangle1 = 0;
       if (TEdges1[SP.E1()].FirstTriangle()!=SP.T1()) NextTriangle1=TEdges1[SP.E1()].FirstTriangle();
       else 
         NextTriangle1=TEdges1[SP.E1()].SecondTriangle();
-      Standard_Integer NextTriangle2;
+      Standard_Integer NextTriangle2 = 0;
       if (TEdges2[SP.E2()].FirstTriangle()!=SP.T2()) NextTriangle2=TEdges2[SP.E2()].FirstTriangle();
       else 
         NextTriangle2=TEdges2[SP.E2()].SecondTriangle();
@@ -2912,9 +2914,9 @@ void DegeneratedIndex(const TColStd_Array1OfReal& aXpars,
                       Standard_Integer& aI1,
                       Standard_Integer& aI2)
 {
-  Standard_Integer i;
-  Standard_Boolean bDegX1, bDegX2;
-  Standard_Real aDegX1, aDegX2, aTol2, aX;
+  Standard_Integer i = 0;
+  Standard_Boolean bDegX1 = 0, bDegX2 = 0;
+  Standard_Real aDegX1 = NAN, aDegX2 = NAN, aTol2 = NAN, aX = NAN;
   //
   aI1=0;
   aI2=0;
@@ -2959,9 +2961,9 @@ Standard_Boolean IsDegenerated(const Handle(Adaptor3d_Surface)& aS,
                                const Standard_Real aTol2,
                                Standard_Real& aDegX)
 {
-  Standard_Boolean bRet;
-  Standard_Integer i, aNbP;
-  Standard_Real aU, dU, aU1, aU2, aV, dV, aV1, aV2, aD2;
+  Standard_Boolean bRet = 0;
+  Standard_Integer i = 0, aNbP = 0;
+  Standard_Real aU = NAN, dU = NAN, aU1 = NAN, aU2 = NAN, aV = NAN, dV = NAN, aV1 = NAN, aV2 = NAN, aD2 = NAN;
   gp_Pnt aP1, aP2;
   //
   bRet=Standard_False;
index 91136a8e6be07c88f65745c5ab50b846782f48c2..08fa311fa00dabc39251397e10946d3adda94306 100644 (file)
@@ -40,13 +40,13 @@ IntPolyh_StartPoint::IntPolyh_StartPoint(const Standard_Real _x,
                                         const Standard_Integer _t2,
                                         const Standard_Integer _e2,
                                         const Standard_Real _lambda2,
-                                        const Standard_Integer _chainlist):angle(-2.0) { 
-  x=_x; y=_y; z=_z; 
-  u1=_u1; v1=_v1; 
-  u2=_u2; v2=_v2; 
-  t1=_t1; e1=_e1; lambda1=_lambda1; 
-  t2=_t2; e2=_e2; lambda2=_lambda2; 
-  chainlist=_chainlist;
+                                        const Standard_Integer _chainlist):x(_x), y(_y), z(_z), u1(_u1), v1(_v1), u2(_u2), v2(_v2), lambda1(_lambda1), lambda2(_lambda2), angle(-2.0), t1(_t1), e1(_e1), t2(_t2), e2(_e2), chainlist(_chainlist) { 
+  
+  
+  
+  
+  
+  
 }
 
 Standard_Real IntPolyh_StartPoint::X() const { return(x); } 
@@ -69,7 +69,7 @@ Standard_Integer IntPolyh_StartPoint::GetEdgePoints(const IntPolyh_Triangle &Tri
                                                    Standard_Integer &FirstEdgePoint, 
                                                    Standard_Integer &SecondEdgePoint,
                                                    Standard_Integer &LastPoint) const {
- Standard_Integer SurfID;
+ Standard_Integer SurfID = 0;
  if(e1!=-1) {
    if(e1==1)      { FirstEdgePoint = Triangle.FirstPoint();  SecondEdgePoint = Triangle.SecondPoint(); 
                    LastPoint = Triangle.ThirdPoint();  }
index 6d2ce1e0cce7eb2875d49e8fcdfecd11f31100b8..684ba300a07dd49910500da8a21ab4bfdc0b6452 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntPolyh_Tools.hxx>
 
 #include <Adaptor3d_Surface.hxx>
@@ -68,7 +70,7 @@ static void EnlargeZone(const Handle(Adaptor3d_Surface)& theSurf,
                         Standard_Real &v0,
                         Standard_Real &v1)
 {
-  Standard_Boolean isToEnlargeU, isToEnlargeV;
+  Standard_Boolean isToEnlargeU = 0, isToEnlargeV = 0;
   IntPolyh_Tools::IsEnlargePossible(theSurf, isToEnlargeU, isToEnlargeV);
   // Enlarge U
   if (isToEnlargeU)
@@ -101,7 +103,7 @@ void IntPolyh_Tools::MakeSampling(const Handle(Adaptor3d_Surface)& theSurf,
   theUPars.Resize(1, theNbSU, Standard_False);
   theVPars.Resize(1, theNbSV, Standard_False);
   //
-  Standard_Real u0, u1, v0, v1;
+  Standard_Real u0 = NAN, u1 = NAN, v0 = NAN, v1 = NAN;
   u0 = theSurf->FirstUParameter();
   u1 = theSurf->LastUParameter();
   v0 = theSurf->FirstVParameter();
index 4e0aab33c3fdf47abbac8610f85b66b1137dde05..959db95155fe7261eee864c918437fbc390c464a 100644 (file)
@@ -294,7 +294,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
     (TPoints[FinTP]).Middle( MySurface,P1, P2);
     
     ///les nouveaux triangles
-    Standard_Integer T1,T2,T3,T4;
+    Standard_Integer T1 = 0,T2 = 0,T3 = 0,T4 = 0;
 
     T1=FinTT;
     NewTriangle(numP2,numP3,FinTP,TTriangles,MySurface,TPoints);
@@ -323,7 +323,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
       NewTriangle(numP3b,numP1,FinTP,TTriangles,MySurface,TPoints);
 
       ///On cree les nouveaux edges
-      Standard_Integer E1,E2,E3,E4;
+      Standard_Integer E1 = 0,E2 = 0,E3 = 0,E4 = 0;
       
       E1=FinTE;
       NewEdge(numP1,FinTP,T2,T4,TEdges);
@@ -356,7 +356,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
     }
     else { ///seulement deux nouveaux triangles
       //on cree les nouveaux edges avec T1 et T2
-      Standard_Integer E1,E2,E3;
+      Standard_Integer E1 = 0,E2 = 0,E3 = 0;
       
       E1=FinTE;
       NewEdge(numP1,FinTP,T2,-1,TEdges);
@@ -382,7 +382,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
     (TPoints[FinTP]).Middle(MySurface, P2,P3);
 
     ///les nouveaux triangles
-    Standard_Integer T1,T2,T3,T4;    
+    Standard_Integer T1 = 0,T2 = 0,T3 = 0,T4 = 0;    
     
     T1=FinTT;
     NewTriangle(numP1,numP2,FinTP,TTriangles,MySurface,TPoints);
@@ -411,7 +411,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
       NewTriangle(numP1b,numP3,FinTP,TTriangles,MySurface,TPoints);
 
       ///Nouveaux Edges
-      Standard_Integer E1,E2,E3,E4;
+      Standard_Integer E1 = 0,E2 = 0,E3 = 0,E4 = 0;
 
       E1=FinTE;
       NewEdge(numP2,FinTP,T1,T3,TEdges);
@@ -443,7 +443,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
     }
     else { ///seulement deux nouveaux triangles
       ///Nouveaux Edges
-      Standard_Integer E1,E2,E3;
+      Standard_Integer E1 = 0,E2 = 0,E3 = 0;
 
       E1=FinTE;
       NewEdge(numP2,FinTP,T1,-1,TEdges);
@@ -467,7 +467,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
     const Standard_Integer FinTP = TPoints.NbItems();
     (TPoints[FinTP]).Middle(MySurface, P3,P1);
 
-    Standard_Integer T1,T2,T3,T4;
+    Standard_Integer T1 = 0,T2 = 0,T3 = 0,T4 = 0;
     
     T1=FinTT;
     NewTriangle(numP1,numP2,FinTP,TTriangles,MySurface,TPoints);
@@ -497,7 +497,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
       NewTriangle(numP2b,numP3,FinTP,TTriangles,MySurface,TPoints);
 
       ///Nouveaux Edges
-      Standard_Integer E1,E2,E3,E4;
+      Standard_Integer E1 = 0,E2 = 0,E3 = 0,E4 = 0;
 
       E1=FinTE;
       NewEdge(numP2,FinTP,T1,T2,TEdges);
@@ -529,7 +529,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
     }
     else { ///seulement deux nouveaux triangles
       ///Nouveaux Edges
-      Standard_Integer E1,E2,E4;
+      Standard_Integer E1 = 0,E2 = 0,E4 = 0;
 
       E1=FinTE;
       NewEdge(numP2,FinTP,T1,T2,TEdges);
index 634a9989f72f79c6c4a2c936dd01d27a890f718d..ac9ee021a3d2a43aa7062aa1c22ba8851681548f 100644 (file)
@@ -129,15 +129,15 @@ private:
 
 
 
-  Standard_Integer status;
-  Standard_Real first_param;
-  Standard_Real last_param;
-  Standard_Real first_tol;
-  Standard_Real last_tol;
+  Standard_Integer status{};
+  Standard_Real first_param{};
+  Standard_Real last_param{};
+  Standard_Real first_tol{};
+  Standard_Real last_tol{};
   gp_Pnt2d first_point;
   gp_Pnt2d last_point;
-  Standard_Real periodfirst;
-  Standard_Real periodlast;
+  Standard_Real periodfirst{};
+  Standard_Real periodlast{};
 
 
 };
index 1986ec78d83bc5029ae4bbefd3a864c1e1a4872a..d1b166abd031bb8317e5b8b51a4c1f62b9ce3ce3 100644 (file)
@@ -97,7 +97,7 @@ void IntRes2d_Intersection::Insert(const IntRes2d_IntersectionPoint& Pnt) {
 }
 
 void IntRes2d_Intersection::SetValues(const IntRes2d_Intersection& Other) {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   if(Other.done) {
     lseg.Clear();
     lpnt.Clear();
@@ -168,7 +168,7 @@ void IntRes2d_Intersection::Append( const IntRes2d_Intersection& Other
   if(Other.done) {
     //-- Verification of the Position of the IntersectionPoints
     Standard_Integer n=Other.lpnt.Length();
-    Standard_Integer i ;
+    Standard_Integer i = 0 ;
     for( i=1; i<=n ; i++) {
       
       const IntRes2d_IntersectionPoint& P=Other.lpnt(i);
index 2608c4eae571b924a8a4a2c80cffb793d03b11e4..6b6b249462d1ccb06c008a9768f7207ce0c6b534 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <IntSurf_LineOn2S.hxx>
 #include <IntSurf_PntOn2S.hxx>
 #include <Standard_Type.hxx>
@@ -33,7 +35,7 @@ Handle(IntSurf_LineOn2S) IntSurf_LineOn2S::Split (const Standard_Integer Index)
   IntSurf_SequenceOfPntOn2S SS;
   mySeq.Split(Index,SS);
   Handle(IntSurf_LineOn2S) NS = new IntSurf_LineOn2S ();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer leng = SS.Length();
   for (i=1; i<=leng; i++) {
     NS->Add(SS(i));
@@ -84,7 +86,7 @@ Standard_Boolean IntSurf_LineOn2S::IsOutBox(const gp_Pnt& Pxyz)
       gp_Pnt P = mySeq(i).Value();
       myBxyz.Add(P);
     }
-    Standard_Real x0, y0, z0, x1, y1, z1;
+    Standard_Real x0 = NAN, y0 = NAN, z0 = NAN, x1 = NAN, y1 = NAN, z1 = NAN;
     myBxyz.Get(x0, y0, z0, x1, y1, z1);
     x1 -= x0; y1 -= y0; z1 -= z0;
     if (x1>y1)
@@ -119,7 +121,7 @@ Standard_Boolean IntSurf_LineOn2S::IsOutSurf1Box(const gp_Pnt2d& P1uv)
   if (myBuv1.IsWhole())
   {
     Standard_Integer n = NbPoints();
-    Standard_Real pu1, pu2, pv1, pv2;
+    Standard_Real pu1 = NAN, pu2 = NAN, pv1 = NAN, pv2 = NAN;
     myBuv1.SetVoid();
     for (Standard_Integer i = 1; i <= n; i++)
     {
@@ -147,7 +149,7 @@ Standard_Boolean IntSurf_LineOn2S::IsOutSurf2Box(const gp_Pnt2d& P2uv)
   if (myBuv2.IsWhole())
   {
     Standard_Integer n = NbPoints();
-    Standard_Real pu1, pu2, pv1, pv2;
+    Standard_Real pu1 = NAN, pu2 = NAN, pv1 = NAN, pv2 = NAN;
     myBuv2.SetVoid();
     for (Standard_Integer i = 1; i <= n; i++)
     {
index e00db4fd3bd2cdf9ece5f52d9e82971356fe6606..910c1817d839f14ee15c46279b9228ec6895e05f 100644 (file)
@@ -27,9 +27,9 @@ IntSurf_PathPoint::IntSurf_PathPoint ():
 IntSurf_PathPoint::IntSurf_PathPoint (const gp_Pnt& P,
                                      const Standard_Real U,
                                      const Standard_Real V):
-       pt(P),ispass(Standard_True),istgt(Standard_True) 
+       pt(P),ispass(Standard_True),istgt(Standard_True), sequv(new TColgp_HSequenceOfXY ()) 
 {
-  sequv = new TColgp_HSequenceOfXY ();
+  
   sequv->Append(gp_XY(U,V));
 }
 
index 5dba23198d4d2ad47f5e98c58100ef90b6b86b17..882004967b43c88827f1f6393a2a0b8b4f421c1b 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <ElSLib.hxx>
 #include <gp_Cone.hxx>
@@ -32,52 +34,52 @@ IntSurf_Quadric::IntSurf_Quadric ():typ(GeomAbs_OtherSurface),
 }
 // ============================================================
 IntSurf_Quadric::IntSurf_Quadric (const gp_Pln& P):
-      ax3(P.Position()),typ(GeomAbs_Plane)
+      ax3(P.Position()),typ(GeomAbs_Plane), ax3direc(ax3.Direct())
 {
-  ax3direc = ax3.Direct();
+  
   P.Coefficients(prm1,prm2,prm3,prm4); 
 }
 // ============================================================
 IntSurf_Quadric::IntSurf_Quadric (const gp_Cylinder& C):
 
-       ax3(C.Position()),lin(ax3.Axis()),typ(GeomAbs_Cylinder)
+       ax3(C.Position()),lin(ax3.Axis()),typ(GeomAbs_Cylinder), ax3direc(ax3.Direct()), prm1(C.Radius())
 {
   prm2=prm3=prm4=0.0;
-  ax3direc=ax3.Direct();
-  prm1=C.Radius();
+  
+  
 }
 // ============================================================
 IntSurf_Quadric::IntSurf_Quadric (const gp_Sphere& S):
 
-       ax3(S.Position()),lin(ax3.Axis()),typ(GeomAbs_Sphere)
+       ax3(S.Position()),lin(ax3.Axis()),typ(GeomAbs_Sphere), ax3direc(ax3.Direct()), prm1(S.Radius())
 {
   prm2=prm3=prm4=0.0;
-  ax3direc = ax3.Direct();
-  prm1=S.Radius();
+  
+  
 }
 // ============================================================
 IntSurf_Quadric::IntSurf_Quadric (const gp_Cone& C):
 
-       ax3(C.Position()),typ(GeomAbs_Cone)
+       ax3(C.Position()),typ(GeomAbs_Cone), ax3direc(ax3.Direct()), prm1(C.RefRadius()), prm2(C.SemiAngle()), prm3(Cos(prm2)), prm4(0.0)
 {
-  ax3direc = ax3.Direct();
+  
   lin.SetPosition(ax3.Axis());
-  prm1 = C.RefRadius();
-  prm2 = C.SemiAngle();
-  prm3 = Cos(prm2);
-  prm4 = 0.0;
+  
+  
+  
+  
 }
 // ============================================================
 IntSurf_Quadric::IntSurf_Quadric (const gp_Torus& T):
 
-       ax3(T.Position()),typ(GeomAbs_Torus)
+       ax3(T.Position()),typ(GeomAbs_Torus), ax3direc(ax3.Direct()), prm1(T.MajorRadius()), prm2(T.MinorRadius()), prm3(0.0), prm4(0.0)
 {
-  ax3direc = ax3.Direct();
+  
   lin.SetPosition(ax3.Axis());
-  prm1 = T.MajorRadius();
-  prm2 = T.MinorRadius();
-  prm3 = 0.0;
-  prm4 = 0.0;
+  
+  
+  
+  
 }
 // ============================================================
 void IntSurf_Quadric::SetValue (const gp_Pln& P)
@@ -143,7 +145,7 @@ Standard_Real IntSurf_Quadric::Distance (const gp_Pnt& P) const {
   case GeomAbs_Cone:   // cone
     {
       Standard_Real dist = lin.Distance(P);
-      Standard_Real U,V;
+      Standard_Real U = NAN,V = NAN;
       ElSLib::ConeParameters(ax3,prm1,prm2,P,U,V);
       gp_Pnt Pp = ElSLib::ConeValue(U,V,ax3,prm1,prm2);
       Standard_Real distp = lin.Distance(Pp);
@@ -200,7 +202,7 @@ gp_Vec IntSurf_Quadric::Gradient (const gp_Pnt& P) const {
     break;
   case GeomAbs_Cone:   // cone
     {
-      Standard_Real U,V;
+      Standard_Real U = NAN,V = NAN;
       ElSLib::ConeParameters(ax3,prm1,prm2,P,U,V);
       gp_Pnt Pp = ElSLib::ConeValue(U,V,ax3,prm1,prm2);
       gp_Vec D1u,D1v;
@@ -273,7 +275,7 @@ void IntSurf_Quadric::ValAndGrad (const gp_Pnt& P,
   case GeomAbs_Cone:  
     {
       Standard_Real dist = lin.Distance(P);
-      Standard_Real U,V;
+      Standard_Real U = NAN,V = NAN;
       gp_Vec D1u,D1v;
       gp_Pnt Pp;
       ElSLib::ConeParameters(ax3,prm1,prm2,P,U,V);
@@ -473,7 +475,7 @@ gp_Vec IntSurf_Quadric::Normale (const gp_Pnt& P) const
     }
   case GeomAbs_Cone:   
     {
-      Standard_Real U,V;
+      Standard_Real U = NAN,V = NAN;
       ElSLib::ConeParameters(ax3,prm1,prm2,P,U,V);
       return Normale(U,V);
     }
index 28374d715a9e2378f601fd689f1abad1fad245d5..8e740d7f21834f948242549bbe6db030a49a09cc 100644 (file)
@@ -114,10 +114,10 @@ private:
   gp_Ax3 ax3;
   gp_Lin lin;
   GeomAbs_SurfaceType typ;
-  Standard_Real prm1;
-  Standard_Real prm2;
-  Standard_Real prm3;
-  Standard_Real prm4;
+  Standard_Real prm1{};
+  Standard_Real prm2{};
+  Standard_Real prm3{};
+  Standard_Real prm4{};
   Standard_Boolean ax3direc;
 
 
index fd16f03e57215e384ea6a99b79b0a10ef45759d4..44b2751b2a08094c5a675ecea87dac923f9e460d 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntTools.hxx>
 
 #include <BRep_Tool.hxx>
@@ -51,7 +53,7 @@
     return 0;
   }
 
-  Standard_Real t2;
+  Standard_Real t2 = NAN;
   gp_Pnt P1, P2, P3;
 
   t2=0.5*(t1+t3);
@@ -96,9 +98,9 @@ Standard_Integer IntTools::PrepareArgs (BRepAdaptor_Curve& C,
 {
   
   TColStd_ListOfReal aPars;
-  Standard_Real dt, tCurrent, tNext, aR, anAbsDeflection;
-  Standard_Integer ip, i, j, aNbDeflectionPoints;
-  Standard_Boolean aRFlag; 
+  Standard_Real dt = NAN, tCurrent = NAN, tNext = NAN, aR = NAN, anAbsDeflection = NAN;
+  Standard_Integer ip = 0, i = 0, j = 0, aNbDeflectionPoints = 0;
+  Standard_Boolean aRFlag = 0
   
   GeomAbs_CurveType aCurveType;
   aCurveType=C.GetType();
@@ -183,7 +185,7 @@ Standard_Integer IntTools::PrepareArgs (BRepAdaptor_Curve& C,
   void IntTools::RemoveIdenticalRoots(IntTools_SequenceOfRoots& aSR,
                                      const Standard_Real anEpsT)
 {
-  Standard_Integer aNbRoots, j, k;
+  Standard_Integer aNbRoots = 0, j = 0, k = 0;
   Standard_Real anEpsT2=0.5*anEpsT;
   aNbRoots=aSR.Length();
   for (j=1; j<=aNbRoots; j++) { 
@@ -215,7 +217,7 @@ namespace {
   void IntTools::SortRoots(IntTools_SequenceOfRoots& mySequenceOfRoots,
                           const Standard_Real /*myEpsT*/)
 {
-  Standard_Integer j, aNbRoots;
+  Standard_Integer j = 0, aNbRoots = 0;
 
   aNbRoots=mySequenceOfRoots.Length();
 
@@ -238,8 +240,8 @@ namespace {
   void  IntTools::FindRootStates(IntTools_SequenceOfRoots& mySequenceOfRoots,
                                 const Standard_Real myEpsNull)
 {
-  Standard_Integer aType, j, aNbRoots;
-  Standard_Real t1, t2, f1, f2, absf2;
+  Standard_Integer aType = 0, j = 0, aNbRoots = 0;
+  Standard_Real t1 = NAN, t2 = NAN, f1 = NAN, f2 = NAN, absf2 = NAN;
 
   aNbRoots=mySequenceOfRoots.Length();
 
@@ -309,7 +311,7 @@ namespace {
                                         const Handle(Geom_Curve)& aCurve,
                                         Standard_Real& aParameter)
 {
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   GeomAbs_CurveType aCurveType;
 
   aFirst=aCurve->FirstParameter();
index 45600377a3bc8e8263c8fbdc86da58ccc02b2dc0..174b3bf353b9e76c068a9ccadbb8a00c31d7aead 100644 (file)
 
 #include <IntTools_BaseRangeSample.hxx>
 
-IntTools_BaseRangeSample::IntTools_BaseRangeSample()
+IntTools_BaseRangeSample::IntTools_BaseRangeSample() : myDepth(0)
 {
-  myDepth = 0;
+  
 }
 
-IntTools_BaseRangeSample::IntTools_BaseRangeSample(const Standard_Integer theDepth)
+IntTools_BaseRangeSample::IntTools_BaseRangeSample(const Standard_Integer theDepth) : myDepth(theDepth)
 {
-  myDepth = theDepth;
+  
 }
index b5095096ebafa3376ecaca96335f482f61a6b84f..a5865f2bf9a423f038ed5a9cd7302a987563610d 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntTools_BeanFaceIntersector.hxx>
 
 #include <BndLib_Add3dCurve.hxx>
@@ -114,11 +116,11 @@ myVMinParameter(0.),
 myVMaxParameter(0.),
 myBeanTolerance(0.),
 myFaceTolerance(0.),
-myIsDone(Standard_False),
+myCurveResolution(Precision::PConfusion()), myCriteria(Precision::Confusion()), myIsDone(Standard_False),
 myMinSqDistance(RealLast())
 {
-  myCriteria        = Precision::Confusion();
-  myCurveResolution = Precision::PConfusion();
+  
+  
   
 }
 
@@ -176,7 +178,7 @@ IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector(const BRepAdaptor_Cur
                                                            const Standard_Real        theVMaxParameter,
                                                            const Standard_Real        theBeanTolerance,
                                                            const Standard_Real        theFaceTolerance) :
-       myFirstParameter(theFirstParOnCurve),
+       myCurve(theCurve), mySurface(theSurface), myFirstParameter(theFirstParOnCurve),
        myLastParameter(theLastParOnCurve),
        myUMinParameter(theUMinParameter),
        myUMaxParameter(theUMaxParameter),
@@ -184,15 +186,15 @@ IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector(const BRepAdaptor_Cur
        myVMaxParameter(theVMaxParameter),
        myBeanTolerance(theBeanTolerance),
        myFaceTolerance(theFaceTolerance),
-       myIsDone(Standard_False),
+       myCriteria(myBeanTolerance + myFaceTolerance), myIsDone(Standard_False),
        myMinSqDistance(RealLast())
 {
-  myCurve = theCurve;
   
-  myCriteria = myBeanTolerance + myFaceTolerance;
+  
+  
   myCurveResolution = myCurve.Resolution(myCriteria);
 
-  mySurface = theSurface;
+  
   myTrsfSurface = Handle(Geom_Surface)::DownCast(mySurface.Surface().Surface()->Transformed(mySurface.Trsf()));
 }
 
@@ -606,7 +608,7 @@ void IntTools_BeanFaceIntersector::ComputeAroundExactIntersection()
             solutionIsValid = Standard_False;
             //
             if(mySurface.IsUPeriodic()) {
-              Standard_Real aNewU, aUPeriod, aEps, du;
+              Standard_Real aNewU = NAN, aUPeriod = NAN, aEps = NAN, du = NAN;
               //
               aUPeriod = mySurface.UPeriod();
               aEps = Epsilon(aUPeriod);
@@ -623,7 +625,7 @@ void IntTools_BeanFaceIntersector::ComputeAroundExactIntersection()
             solutionIsValid = Standard_False;
             //
             if(mySurface.IsVPeriodic()) {
-              Standard_Real aNewV, aVPeriod, aEps, dv;
+              Standard_Real aNewV = NAN, aVPeriod = NAN, aEps = NAN, dv = NAN;
               //
               aVPeriod = mySurface.VPeriod();
               aEps = Epsilon(aVPeriod);
@@ -811,9 +813,9 @@ void IntTools_BeanFaceIntersector::ComputeLinePlane()
 
   myIsDone = Standard_True;
 
-  Standard_Real A,B,C,D;
-  Standard_Real Al,Bl,Cl;
-  Standard_Real Dis,Direc;
+  Standard_Real A = NAN,B = NAN,C = NAN,D = NAN;
+  Standard_Real Al = NAN,Bl = NAN,Cl = NAN;
+  Standard_Real Dis = NAN,Direc = NAN;
   
   P.Coefficients(A,B,C,D);
   gp_Pnt Orig(L.Location());
@@ -861,14 +863,14 @@ void IntTools_BeanFaceIntersector::ComputeLinePlane()
 
   gp_Pnt pint(Orig.X()+t*Al, Orig.Y()+t*Bl, Orig.Z()+t*Cl);
 
-  Standard_Real u, v;
+  Standard_Real u = NAN, v = NAN;
   ElSLib::Parameters(P, pint, u, v);
   if(myUMinParameter > u || u > myUMaxParameter || myVMinParameter > v || v > myVMaxParameter) {
     return;
   }
   //
   // compute correct range on the edge
-  Standard_Real anAngle, aDt;
+  Standard_Real anAngle = NAN, aDt = NAN;
   gp_Dir aDL, aDP;
   //
   aDL = L.Position().Direction();
@@ -893,7 +895,7 @@ void IntTools_BeanFaceIntersector::ComputeLinePlane()
 // ==================================================================================
 void IntTools_BeanFaceIntersector::ComputeUsingExtremum() 
 {
-  Standard_Real Tol, af, al;
+  Standard_Real Tol = NAN, af = NAN, al = NAN;
   Tol = Precision::PConfusion();
   Handle(Geom_Curve) aCurve = BRep_Tool::Curve  (myCurve.Edge(), af, al);
   GeomAdaptor_Surface aGASurface (myTrsfSurface, 
@@ -942,7 +944,7 @@ void IntTools_BeanFaceIntersector::ComputeUsingExtremum()
         myMinSqDistance = Min (myMinSqDistance, aSqDist);
         if (aSqDist < myCriteria * myCriteria)
         {
-          Standard_Real U1, V1, U2, V2;
+          Standard_Real U1 = NAN, V1 = NAN, U2 = NAN, V2 = NAN;
           Standard_Real adistance1 = Distance(anarg1, U1, V1);
           Standard_Real adistance2 = Distance(anarg2, U2, V2);
           Standard_Boolean validdistance1 = (adistance1 < myCriteria);
@@ -1012,7 +1014,7 @@ void IntTools_BeanFaceIntersector::ComputeUsingExtremum()
             Extrema_POnCurv p1;
             Extrema_POnSurf p2;
             anExtCS.Points (j, p1, p2);
-            Standard_Real U, V;
+            Standard_Real U = NAN, V = NAN;
             p2.Parameter(U, V);
             
             Standard_Integer aNbRanges = myRangeManager.Length();
@@ -1896,7 +1898,7 @@ Standard_Boolean IntTools_BeanFaceIntersector::ComputeLocalized() {
             Extrema_POnSurf p2;
             p1 = anExtremaGen.PointOnCurve(j);
             p2 = anExtremaGen.PointOnSurface(j);
-            Standard_Real U, V, T;
+            Standard_Real U = NAN, V = NAN, T = NAN;
             T = p1.Parameter();
             p2.Parameter(U, V);
             
@@ -1963,7 +1965,7 @@ Standard_Boolean IntTools_BeanFaceIntersector::TestComputeCoinside()
 
   Standard_Integer i = 0;
 
-  Standard_Real U, V;
+  Standard_Real U = NAN, V = NAN;
 
   if(Distance(cfp, U, V) > myCriteria)
     return Standard_False;
@@ -2040,9 +2042,9 @@ void ComputeGridPoints
    const Standard_Real                      theTolerance,
    IntTools_SurfaceRangeLocalizeData &theSurfaceData)
 {
-  Standard_Integer     i;
-  Standard_Integer     j;
-  Standard_Integer     k;
+  Standard_Integer     i = 0;
+  Standard_Integer     j = 0;
+  Standard_Integer     k = 0;
   Standard_Integer     aNbSamples[2] = { theSurf->UDegree(),
                                          theSurf->VDegree() };
   Standard_Integer     aNbKnots[2]   = { theSurf->NbUKnots(),
@@ -2053,7 +2055,7 @@ void ComputeGridPoints
   theSurf->UKnots(aKnotsU);
   theSurf->VKnots(aKnotsV);
 
-  Standard_Integer iLmI;
+  Standard_Integer iLmI = 0;
   Standard_Integer iMin[2]   = { -1, -1 };
   Standard_Integer iMax[2]   = { -1, -1 };
   Standard_Integer aNbGridPnts[2];
@@ -2121,7 +2123,7 @@ void ComputeGridPoints
     
     // Setting the first and last parameters.
     Standard_Integer iAbs    = 1;
-    Standard_Real    aMinPar;
+    Standard_Real    aMinPar = NAN;
     Standard_Real    aMaxPar = (j == 0) ? theLastU : theLastV;
     
     for (i = iMin[j]; i < iMax[j]; i++) {
@@ -2167,8 +2169,8 @@ void ComputeGridPoints
   
   // Compute of grid points.
   gp_Pnt        aPnt;
-  Standard_Real aParU;
-  Standard_Real aParV;
+  Standard_Real aParU = NAN;
+  Standard_Real aParV = NAN;
   gp_Vec aDU, aDV;
   Standard_Real du = 0, dv = 0;
   Standard_Boolean isCalcDefl = aNbGridPnts[0] < 30 && aNbGridPnts[1] < 30;
@@ -2215,8 +2217,8 @@ void ComputeGridPoints
   Standard_Real aDef = 0.;
   if (isCalcDefl)
   {
-    Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
-    Standard_Real xmin1, ymin1, zmin1, xmax1, ymax1, zmax1;
+    Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
+    Standard_Real xmin1 = NAN, ymin1 = NAN, zmin1 = NAN, xmax1 = NAN, ymax1 = NAN, zmax1 = NAN;
     aGridBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
     anExtBox.Get(xmin1, ymin1, zmin1, xmax1, ymax1, zmax1);
     Standard_Integer anExtCount = 0;
@@ -2274,11 +2276,11 @@ void BuildBox(const Handle(Geom_BSplineSurface)       &theSurf,
             IntTools_SurfaceRangeLocalizeData &theSurfaceData,
               Bnd_Box                           &theBox)
 {
-  Standard_Integer i;
-  Standard_Integer j;
-  Standard_Integer aNbUPnts;
-  Standard_Integer aNbVPnts;
-  Standard_Real    aParam;
+  Standard_Integer i = 0;
+  Standard_Integer j = 0;
+  Standard_Integer aNbUPnts = 0;
+  Standard_Integer aNbVPnts = 0;
+  Standard_Real    aParam = NAN;
   gp_Pnt           aPnt;
 
   theSurfaceData.SetFrame(theFirstU, theLastU, theFirstV, theLastV);
index 3660372f6b8d9c5d2268a7ebd58c62f12c91fb16..13482f1a6d4123bdb00bd13a6bab351cda3c15e9 100644 (file)
@@ -175,10 +175,10 @@ private:
   Standard_Real myUMaxParameter;
   Standard_Real myVMinParameter;
   Standard_Real myVMaxParameter;
-  Standard_Real myBeanTolerance;
-  Standard_Real myFaceTolerance;
-  Standard_Real myCurveResolution;
-  Standard_Real myCriteria;
+  Standard_Real myBeanTolerance{};
+  Standard_Real myFaceTolerance{};
+  Standard_Real myCurveResolution{};
+  Standard_Real myCriteria{};
   GeomAPI_ProjectPointOnSurf myProjector;
   IntTools_MarkedRangeSet myRangeManager;
   Handle(IntTools_Context) myContext;
index 4a2a88f7d627f45ea1bd32d99d9c84c89b74834b..7e23fb8cf6170d55f9f29a2ee154670facd42dbd 100644 (file)
@@ -26,7 +26,7 @@
 IntTools_CommonPrt::IntTools_CommonPrt() 
   :
   myType(TopAbs_SHAPE),
-  myAllNullFlag(Standard_False)
+  myVertPar1(0.), myVertPar2(0.), myAllNullFlag(Standard_False)
   
 {
   //
@@ -34,8 +34,8 @@ IntTools_CommonPrt::IntTools_CommonPrt()
   myPnt2.SetCoord(0.,0.,0.);
   //
   // modified by NIZHNY-MKK  Wed Jun  8 16:47:04 2005.BEGIN
-  myVertPar1 = 0.;
-  myVertPar2 = 0.;
+  
+  
   // modified by NIZHNY-MKK  Wed Jun  8 16:47:07 2005.END
 }
 
@@ -57,7 +57,7 @@ IntTools_CommonPrt::IntTools_CommonPrt()
   myPnt2(Other.myPnt2)
 //
 {
-  Standard_Integer i, aNb=Other.myRanges2.Length();
+  Standard_Integer i = 0, aNb=Other.myRanges2.Length();
   for (i=1; i<=aNb; i++) {
     myRanges2.Append(Other.myRanges2(i));
   }
@@ -79,7 +79,7 @@ IntTools_CommonPrt::IntTools_CommonPrt()
   myPnt1=Other.myPnt1;
   myPnt2=Other.myPnt2;
   //
-  Standard_Integer i, aNb=Other.myRanges2.Length();
+  Standard_Integer i = 0, aNb=Other.myRanges2.Length();
   for (i=1; i<=aNb; i++) {
     myRanges2.Append(Other.myRanges2(i));
   }
@@ -263,7 +263,7 @@ IntTools_CommonPrt::IntTools_CommonPrt()
   aCP.SetVertexParameter2(myVertPar2);
 
   IntTools_SequenceOfRanges aSeqRanges;
-  Standard_Integer i, aNb;
+  Standard_Integer i = 0, aNb = 0;
   aNb=myRanges2.Length();
   for (i=1; i<=aNb; i++) {
     aCP.AppendRange2(myRanges2(i));
index 286bac96fc1d34fe98ad3a6032be544f8e4838cf..4b305bee737f95a66f3c5f616151eb50080f944c 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <Bnd_OBB.hxx>
 #include <BRep_Tool.hxx>
@@ -225,7 +227,7 @@ IntTools_FClass2d& IntTools_Context::FClass2d(const TopoDS_Face& aF)
   IntTools_FClass2d* pFClass2d = NULL;
   if (!myFClass2dMap.Find (aF, pFClass2d))
   {
-    Standard_Real aTolF;
+    Standard_Real aTolF = NAN;
     TopoDS_Face aFF;
     //
     aFF=aF;
@@ -249,7 +251,7 @@ GeomAPI_ProjectPointOnSurf& IntTools_Context::ProjPS(const TopoDS_Face& aF)
   GeomAPI_ProjectPointOnSurf* pProjPS = NULL;
   if (!myProjPSMap.Find (aF, pProjPS))
   {
-    Standard_Real Umin, Usup, Vmin, Vsup;
+    Standard_Real Umin = NAN, Usup = NAN, Vmin = NAN, Vsup = NAN;
     UVBounds(aF, Umin, Usup, Vmin, Vsup);
     const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aF);
     //
@@ -271,7 +273,7 @@ GeomAPI_ProjectPointOnCurve& IntTools_Context::ProjPC(const TopoDS_Edge& aE)
   GeomAPI_ProjectPointOnCurve* pProjPC = NULL;
   if (!myProjPCMap.Find (aE, pProjPC))
   {
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     //
     Handle(Geom_Curve)aC3D=BRep_Tool::Curve (aE, f, l);
     //
@@ -295,7 +297,7 @@ GeomAPI_ProjectPointOnCurve& IntTools_Context::ProjPT
   GeomAPI_ProjectPointOnCurve* pProjPT = NULL;
   if (!myProjPTMap.Find (aC3D, pProjPT))
   {
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     f=aC3D->FirstParameter();
     l=aC3D->LastParameter();
     //
@@ -354,8 +356,8 @@ Geom2dHatch_Hatcher& IntTools_Context::Hatcher(const TopoDS_Face& aF)
   Geom2dHatch_Hatcher* pHatcher = NULL;
   if (!myHatcherMap.Find (aF, pHatcher))
   {
-    Standard_Real aTolArcIntr, aTolTangfIntr, aTolHatch2D, aTolHatch3D;
-    Standard_Real aU1, aU2, aEpsT;
+    Standard_Real aTolArcIntr = NAN, aTolTangfIntr = NAN, aTolHatch2D = NAN, aTolHatch3D = NAN;
+    Standard_Real aU1 = NAN, aU2 = NAN, aEpsT = NAN;
     TopAbs_Orientation aOrE;
     Handle(Geom_Surface) aS;
     Handle(Geom2d_Curve) aC2D;
@@ -462,8 +464,8 @@ Standard_Integer IntTools_Context::ComputePE
   if (!BRep_Tool::IsGeometric(aE2)) { 
     return -2;
   }
-  Standard_Real aTolE2, aTolSum;
-  Standard_Integer aNbProj;
+  Standard_Real aTolE2 = NAN, aTolSum = NAN;
+  Standard_Integer aNbProj = 0;
   //
   GeomAPI_ProjectPointOnCurve& aProjector=ProjPC(aE2);
   aProjector.Perform(aP1);
@@ -526,8 +528,8 @@ Standard_Integer IntTools_Context::ComputeVE
   if (!BRep_Tool::IsGeometric(theE)) { 
     return -2;
   }
-  Standard_Real aDist, aTolV, aTolE, aTolSum;
-  Standard_Integer aNbProj;
+  Standard_Real aDist = NAN, aTolV = NAN, aTolE = NAN, aTolSum = NAN;
+  Standard_Integer aNbProj = 0;
   gp_Pnt aP;
   //
   aP=BRep_Tool::Pnt(theV);
@@ -565,7 +567,7 @@ Standard_Integer IntTools_Context::ComputeVF
    Standard_Real& theTol,
    const Standard_Real theFuzz)
 {
-  Standard_Real aTolV, aTolF, aTolSum, aDist;
+  Standard_Real aTolV = NAN, aTolF = NAN, aTolSum = NAN, aDist = NAN;
   gp_Pnt aP;
 
   aP = BRep_Tool::Pnt(theVertex);
@@ -638,7 +640,7 @@ Standard_Boolean IntTools_Context::IsPointInFace
    const Standard_Real aTol) 
 {
   Standard_Boolean bIn = Standard_False;
-  Standard_Real aDist;
+  Standard_Real aDist = NAN;
   //
   GeomAPI_ProjectPointOnSurf& aProjector=ProjPS(aF);
   aProjector.Perform(aP);
@@ -647,7 +649,7 @@ Standard_Boolean IntTools_Context::IsPointInFace
   if (bDone) {
     aDist = aProjector.LowerDistance();
     if (aDist < aTol) {
-      Standard_Real U, V;
+      Standard_Real U = NAN, V = NAN;
       //
       aProjector.LowerDistanceParameters(U, V);
       gp_Pnt2d aP2D(U, V);
@@ -679,8 +681,8 @@ Standard_Boolean IntTools_Context::IsValidPointForFace
    const TopoDS_Face& aF,
    const Standard_Real aTol) 
 {
-  Standard_Boolean bFlag;
-  Standard_Real Umin, U, V;
+  Standard_Boolean bFlag = 0;
+  Standard_Real Umin = NAN, U = NAN, V = NAN;
 
   GeomAPI_ProjectPointOnSurf& aProjector=ProjPS(aF);
   aProjector.Perform(aP);
@@ -710,7 +712,7 @@ Standard_Boolean IntTools_Context::IsValidPointForFaces
    const TopoDS_Face& aF2,
    const Standard_Real aTol) 
 {
-  Standard_Boolean bFlag1, bFlag2;
+  Standard_Boolean bFlag1 = 0, bFlag2 = 0;
 
   bFlag1=IsValidPointForFace(aP, aF1, aTol);
   if (!bFlag1) {
@@ -730,13 +732,13 @@ Standard_Boolean IntTools_Context::IsValidBlockForFace
    const TopoDS_Face& aF,
    const Standard_Real aTol) 
 {
-  Standard_Boolean bFlag;
-  Standard_Real aTInterm;
+  Standard_Boolean bFlag = 0;
+  Standard_Real aTInterm = NAN;
   gp_Pnt aPInterm;
 
   aTInterm=IntTools_Tools::IntermediatePoint(aT1, aT2);
 
-  Handle(Geom_Curve) aC3D=aC.Curve();
+  const Handle(Geom_Curve)& aC3D=aC.Curve();
   // point 3D
   aC3D->D0(aTInterm, aPInterm);
   //
@@ -796,8 +798,8 @@ Standard_Boolean IntTools_Context::IsVertexOnLine
    const Standard_Real aTolC,
    Standard_Real& aT)
 {
-  Standard_Boolean bRet;
-  Standard_Real aTolV;
+  Standard_Boolean bRet = 0;
+  Standard_Real aTolV = NAN;
   //
   aTolV=BRep_Tool::Tolerance(aV);
   bRet=IntTools_Context::IsVertexOnLine(aV, aTolV, aC, aTolC , aT);
@@ -815,13 +817,13 @@ Standard_Boolean IntTools_Context::IsVertexOnLine
    const Standard_Real aTolC,
    Standard_Real& aT)
 {
-  Standard_Real aFirst, aLast, aDist, aTolSum;
-  Standard_Integer aNbProj;
+  Standard_Real aFirst = NAN, aLast = NAN, aDist = NAN, aTolSum = NAN;
+  Standard_Integer aNbProj = 0;
   gp_Pnt aPv; 
   
   aPv=BRep_Tool::Pnt(aV);
 
-  Handle(Geom_Curve) aC3D=aC.Curve();
+  const Handle(Geom_Curve)& aC3D=aC.Curve();
   
   
   aTolSum=aTolV+aTolC;
@@ -1006,7 +1008,7 @@ Standard_Boolean IntTools_Context::ProjectPointOnEdge
    const TopoDS_Edge& anEdge,
    Standard_Real& aT)
 {
-  Standard_Integer aNbPoints;
+  Standard_Integer aNbPoints = 0;
 
   GeomAPI_ProjectPointOnCurve& aProjector=ProjPC(anEdge);
   aProjector.Perform(aP);
index 20fc8a2781148be64e8b71e55ce748db1a090819..7f86df281e0db3ff94c2e1b69e143ad373e3ab10 100644 (file)
 #include <IntTools_MapIteratorOfMapOfCurveSample.hxx>
 
 IntTools_CurveRangeLocalizeData::IntTools_CurveRangeLocalizeData(const Standard_Integer theNbSample,
-                                                                const Standard_Real theMinRange)
+                                                                const Standard_Real theMinRange) : myNbSampleC(theNbSample), myMinRangeC(theMinRange)
 {
-  myNbSampleC = theNbSample;
-  myMinRangeC = theMinRange;
+  
+  
 }
 
 void IntTools_CurveRangeLocalizeData::AddOutRange(const IntTools_CurveRangeSample& theRange) 
index 90c3ac3c045e9a384bf0a76ef63de2358dadba32..0276b5dad26fe02bed60a46a849d81445a2a2309 100644 (file)
 #include <IntTools_CurveRangeSample.hxx>
 #include <IntTools_Range.hxx>
 
-IntTools_CurveRangeSample::IntTools_CurveRangeSample()
+IntTools_CurveRangeSample::IntTools_CurveRangeSample() : myIndex(0)
 {
-  myIndex = 0;
+  
 }
 
-IntTools_CurveRangeSample::IntTools_CurveRangeSample(const Standard_Integer theIndex)
+IntTools_CurveRangeSample::IntTools_CurveRangeSample(const Standard_Integer theIndex) : myIndex(theIndex)
 {
-  myIndex = theIndex;
+  
 }
 
 IntTools_Range IntTools_CurveRangeSample::GetRange(const Standard_Real    theFirst,
index f5aa29374f43e3d202a6008ab3018b7cb91e9870..4ebc9711eb5dbf347c7b401cb75f94a1230390f7 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BndLib_Add3dCurve.hxx>
 #include <TColStd_MapOfInteger.hxx>
@@ -105,7 +107,7 @@ static
 void IntTools_EdgeEdge::Prepare()
 {
   GeomAbs_CurveType aCT1, aCT2;
-  Standard_Integer iCT1, iCT2;
+  Standard_Integer iCT1 = 0, iCT2 = 0;
   //
   myCurve1.Initialize(myEdge1);
   myCurve2.Initialize(myEdge2);
@@ -129,7 +131,7 @@ void IntTools_EdgeEdge::Prepare()
   if (iCT1 == iCT2) {
     if (iCT1 != 0) {
       //compute deflection
-      Standard_Real aC1, aC2;
+      Standard_Real aC1 = NAN, aC2 = NAN;
       //
       aC2 = CurveDeflection(myCurve2, myRange2);
       aC1 = (aC2 > Precision::Confusion()) ? 
@@ -163,7 +165,7 @@ void IntTools_EdgeEdge::Prepare()
   myTol = myTol1 + myTol2;
   //
   if (iCT1 != 0 || iCT2 != 0) {
-    Standard_Real f, l, aTM;
+    Standard_Real f = NAN, l = NAN, aTM = NAN;
     //
     myGeom1 = BRep_Tool::Curve(myEdge1, f, l);
     myGeom2 = BRep_Tool::Curve(myEdge2, f, l);
@@ -212,7 +214,7 @@ void IntTools_EdgeEdge::Perform()
   //
   if (myQuickCoincidenceCheck) {
     if (IsCoincident()) {
-      Standard_Real aT11, aT12, aT21, aT22;
+      Standard_Real aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN;
       //
       myRange1.Range(aT11, aT12);
       myRange2.Range(aT21, aT22);
@@ -242,7 +244,7 @@ void IntTools_EdgeEdge::Perform()
   IntTools_SequenceOfRanges aRanges1, aRanges2;
   //
   //3.2. Find ranges containing solutions
-  Standard_Boolean bSplit2;
+  Standard_Boolean bSplit2 = 0;
   FindSolutions(aRanges1, aRanges2, bSplit2);
   //
   //4. Merge solutions and save common parts
@@ -255,9 +257,9 @@ void IntTools_EdgeEdge::Perform()
 //=======================================================================
 Standard_Boolean IntTools_EdgeEdge::IsCoincident() 
 {
-  Standard_Integer i, iCnt, aNbSeg, aNbP2;
-  Standard_Real dT, aT1, aCoeff, aTresh, aD;
-  Standard_Real aT11, aT12, aT21, aT22;
+  Standard_Integer i = 0, iCnt = 0, aNbSeg = 0, aNbP2 = 0;
+  Standard_Real dT = NAN, aT1 = NAN, aCoeff = NAN, aTresh = NAN, aD = NAN;
+  Standard_Real aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN;
   GeomAPI_ProjectPointOnCurve aProjPC;
   gp_Pnt aP1;
   //
@@ -298,8 +300,8 @@ void IntTools_EdgeEdge::FindSolutions(IntTools_SequenceOfRanges& theRanges1,
                                       IntTools_SequenceOfRanges& theRanges2,
                                       Standard_Boolean& bSplit2)
 {
-  Standard_Boolean bIsClosed2;
-  Standard_Real aT11, aT12, aT21, aT22;
+  Standard_Boolean bIsClosed2 = 0;
+  Standard_Real aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN;
   Bnd_Box aB1, aB2;
   //
   bSplit2 = Standard_False;
@@ -328,7 +330,7 @@ void IntTools_EdgeEdge::FindSolutions(IntTools_SequenceOfRanges& theRanges1,
     return;
   }
   //
-  Standard_Integer i, j, aNb1, aNb2;
+  Standard_Integer i = 0, j = 0, aNb1 = 0, aNb2 = 0;
   IntTools_SequenceOfRanges aSegments1, aSegments2;
   //
   aNb1 = IsClosed(myGeom1, aT11, aT12, myTol1, myRes1) ? 2 : 1;
@@ -361,11 +363,11 @@ void IntTools_EdgeEdge::FindSolutions(const IntTools_Range& theR1,
                                       IntTools_SequenceOfRanges& theRanges1,
                                       IntTools_SequenceOfRanges& theRanges2)
 {
-  Standard_Boolean bOut, bStop, bThin;
-  Standard_Real aT11, aT12, aT21, aT22;
-  Standard_Real aTB11, aTB12, aTB21, aTB22;
-  Standard_Real aSmallStep1, aSmallStep2;
-  Standard_Integer iCom;
+  Standard_Boolean bOut = 0, bStop = 0, bThin = 0;
+  Standard_Real aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN;
+  Standard_Real aTB11 = NAN, aTB12 = NAN, aTB21 = NAN, aTB22 = NAN;
+  Standard_Real aSmallStep1 = NAN, aSmallStep2 = NAN;
+  Standard_Integer iCom = 0;
   Bnd_Box aB1, aB2;
   //
   theR1.Range(aT11, aT12);
@@ -453,8 +455,8 @@ void IntTools_EdgeEdge::FindSolutions(const IntTools_Range& theR1,
   if (bThin) {
     if (iCom != 0) {
       //check intermediate points
-      Standard_Boolean bSol;
-      Standard_Real aT1;
+      Standard_Boolean bSol = 0;
+      Standard_Real aT1 = NAN;
       gp_Pnt aP1;
       GeomAPI_ProjectPointOnCurve aProjPC;
       //
@@ -468,7 +470,7 @@ void IntTools_EdgeEdge::FindSolutions(const IntTools_Range& theR1,
         bSol = aProjPC.LowerDistance() <= myTol;
       }
       else {
-        Standard_Real aT2;
+        Standard_Real aT2 = NAN;
         gp_Pnt aP2;
         //
         aT2 = (aT21 + aT22) * .5;
@@ -494,7 +496,7 @@ void IntTools_EdgeEdge::FindSolutions(const IntTools_Range& theR1,
   }
   //
   //split ranges on segments and repeat
-  Standard_Integer i, aNb1;
+  Standard_Integer i = 0, aNb1 = 0;
   IntTools_SequenceOfRanges aSegments1;
   //
   // Build box for first curve to compare
@@ -529,10 +531,10 @@ Standard_Boolean IntTools_EdgeEdge::FindParameters(const BRepAdaptor_Curve& theB
                                                    Standard_Real& aTB1, 
                                                    Standard_Real& aTB2)
 {
-  Standard_Boolean bRet;
-  Standard_Integer aC, i;
-  Standard_Real aCf, aDiff, aDt, aT, aTB, aTOut, aTIn;
-  Standard_Real aDist, aDistP;
+  Standard_Boolean bRet = 0;
+  Standard_Integer aC = 0, i = 0;
+  Standard_Real aCf = NAN, aDiff = NAN, aDt = NAN, aT = NAN, aTB = NAN, aTOut = NAN, aTIn = NAN;
+  Standard_Real aDist = NAN, aDistP = NAN;
   gp_Pnt aP;
   Bnd_Box aCBx;
   //
@@ -632,13 +634,13 @@ void IntTools_EdgeEdge::MergeSolutions(const IntTools_SequenceOfRanges& theRange
   }
   //
   IntTools_Range aRi1, aRi2, aRj1, aRj2;
-  Standard_Boolean bCond;
-  Standard_Integer i, j;
+  Standard_Boolean bCond = 0;
+  Standard_Integer i = 0, j = 0;
   TopAbs_ShapeEnum aType;
-  Standard_Real aT11, aT12, aT21, aT22;
-  Standard_Real aTi11, aTi12, aTi21, aTi22;
-  Standard_Real aTj11, aTj12, aTj21, aTj22;
-  Standard_Real aRes1, aRes2, dTR1, dTR2;
+  Standard_Real aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN;
+  Standard_Real aTi11 = NAN, aTi12 = NAN, aTi21 = NAN, aTi22 = NAN;
+  Standard_Real aTj11 = NAN, aTj12 = NAN, aTj21 = NAN, aTj22 = NAN;
+  Standard_Real aRes1 = NAN, aRes2 = NAN, dTR1 = NAN, dTR2 = NAN;
   TColStd_MapOfInteger aMI;
   //
   aRes1 = Resolution(myCurve1.Curve().Curve(), 
@@ -744,7 +746,7 @@ void IntTools_EdgeEdge::AddSolution(const Standard_Real aT11,
   }
   //
   if (theType == TopAbs_VERTEX) {
-    Standard_Real aT1, aT2;
+    Standard_Real aT1 = NAN, aT2 = NAN;
     //
     FindBestSolution(aT11, aT12, aT21, aT22, aT1, aT2);
     //
@@ -770,9 +772,9 @@ void IntTools_EdgeEdge::FindBestSolution(const Standard_Real aT11,
                                          Standard_Real& aT1,
                                          Standard_Real& aT2)
 {
-  Standard_Integer i, aNbS, iErr;
-  Standard_Real aDMin, aD, aRes1, aSolCriteria, aTouchCriteria;
-  Standard_Real aT1A, aT1B, aT1Min, aT2Min;
+  Standard_Integer i = 0, aNbS = 0, iErr = 0;
+  Standard_Real aDMin = NAN, aD = NAN, aRes1 = NAN, aSolCriteria = NAN, aTouchCriteria = NAN;
+  Standard_Real aT1A = NAN, aT1B = NAN, aT1Min = NAN, aT2Min = NAN;
   GeomAPI_ProjectPointOnCurve aProjPC;
   IntTools_SequenceOfRanges aRanges;
   //
@@ -853,7 +855,7 @@ void IntTools_EdgeEdge::ComputeLineLine()
       return;
   }
 
-  Standard_Real aT11, aT12, aT21, aT22;
+  Standard_Real aT11 = NAN, aT12 = NAN, aT21 = NAN, aT22 = NAN;
   myRange1.Range (aT11, aT12);
   myRange2.Range (aT21, aT22);
 
@@ -981,11 +983,11 @@ Standard_Boolean IntTools_EdgeEdge::IsIntersection(const Standard_Real aT11,
                                                    const Standard_Real aT21,
                                                    const Standard_Real aT22)
 {
-  Standard_Boolean bRet;
+  Standard_Boolean bRet = 0;
   gp_Pnt aP11, aP12, aP21, aP22;
   gp_Vec aV11, aV12, aV21, aV22;
-  Standard_Real aD11_21, aD11_22, aD12_21, aD12_22, aCriteria, aCoef;
-  Standard_Boolean bSmall_11_21, bSmall_11_22, bSmall_12_21, bSmall_12_22;
+  Standard_Real aD11_21 = NAN, aD11_22 = NAN, aD12_21 = NAN, aD12_22 = NAN, aCriteria = NAN, aCoef = NAN;
+  Standard_Boolean bSmall_11_21 = 0, bSmall_11_22 = 0, bSmall_12_21 = 0, bSmall_12_22 = 0;
   //
   bRet = Standard_True;
   aCoef = 1.e+5;
@@ -1022,7 +1024,7 @@ Standard_Boolean IntTools_EdgeEdge::IsIntersection(const Standard_Real aT11,
       return bRet;
     }
     //
-    Standard_Real anAngleCriteria;
+    Standard_Real anAngleCriteria = NAN;
     Standard_Real anAngle1 = 0.0,
                   anAngle2 = 0.0;
     //
@@ -1044,8 +1046,8 @@ Standard_Boolean IntTools_EdgeEdge::IsIntersection(const Standard_Real aT11,
     if (((anAngle1 < anAngleCriteria) || ((M_PI - anAngle1) < anAngleCriteria)) ||
         ((anAngle2 < anAngleCriteria) || ((M_PI - anAngle2) < anAngleCriteria))) {
       GeomAPI_ProjectPointOnCurve aProjPC;
-      Standard_Integer iErr;
-      Standard_Real aD, aT1Min, aT2Min;
+      Standard_Integer iErr = 0;
+      Standard_Real aD = NAN, aT1Min = NAN, aT2Min = NAN;
       //
       aD = Precision::Infinite();
       aProjPC.Init(myGeom2, aT21, aT22);
@@ -1068,8 +1070,8 @@ Standard_Integer IntTools_EdgeEdge::CheckCoincidence(const Standard_Real aT11,
                                                      const Standard_Real theCriteria,
                                                      const Standard_Real theCurveRes1)
 {
-  Standard_Integer iErr, aNb, aNb1, i;
-  Standard_Real aT1A, aT1B, aT1max, aT2max, aDmax;
+  Standard_Integer iErr = 0, aNb = 0, aNb1 = 0, i = 0;
+  Standard_Real aT1A = NAN, aT1B = NAN, aT1max = NAN, aT2max = NAN, aDmax = NAN;
   GeomAPI_ProjectPointOnCurve aProjPC;
   IntTools_SequenceOfRanges aRanges;
   //
@@ -1129,8 +1131,8 @@ Standard_Integer FindDistPC(const Standard_Real aT1A,
                             Standard_Real& aT2max,
                             const Standard_Boolean bMaxDist) 
 {
-  Standard_Integer iErr, iC;
-  Standard_Real aGS, aXP, aA, aB, aXL, aYP, aYL, aT2P, aT2L;
+  Standard_Integer iErr = 0, iC = 0;
+  Standard_Real aGS = NAN, aXP = NAN, aA = NAN, aB = NAN, aXL = NAN, aYP = NAN, aYL = NAN, aT2P = NAN, aT2L = NAN;
   //
   iC = bMaxDist ? 1 : -1;
   iErr = 0;
@@ -1218,7 +1220,7 @@ Standard_Integer DistPC(const Standard_Real aT1,
                         Standard_Real& aT2max,
                         const Standard_Integer iC)
 {
-  Standard_Integer iErr;
+  Standard_Integer iErr = 0;
   //
   iErr = DistPC(aT1, theC1, theCriteria, theProjPC, aD, aT2, iC);
   if (iErr == 1) {
@@ -1245,7 +1247,7 @@ Standard_Integer DistPC(const Standard_Real aT1,
                         Standard_Real& aT2,
                         const Standard_Integer iC) 
 {
-  Standard_Integer iErr, aNbP2;
+  Standard_Integer iErr = 0, aNbP2 = 0;
   gp_Pnt aP1;
   //
   iErr = 0;
@@ -1283,8 +1285,8 @@ Standard_Integer SplitRangeOnSegments(const Standard_Real aT1,
     return 1;
   }
   //
-  Standard_Real aDt, aT1x, aT2x, aSeg;
-  Standard_Integer aNbSegments, i;
+  Standard_Real aDt = NAN, aT1x = NAN, aT2x = NAN, aSeg = NAN;
+  Standard_Integer aNbSegments = 0, i = 0;
   //
   aNbSegments = theNbSeg;
   aDt = aDiff / aNbSegments;
@@ -1334,8 +1336,8 @@ Standard_Real PointBoxDistance(const Bnd_Box& aB,
 {
   Standard_Real aPCoord[3];
   Standard_Real aBMinCoord[3], aBMaxCoord[3];
-  Standard_Real aDist, aR1, aR2;
-  Standard_Integer i;
+  Standard_Real aDist = NAN, aR1 = NAN, aR2 = NAN;
+  Standard_Integer i = 0;
   //
   aP.Coord(aPCoord[0], aPCoord[1], aPCoord[2]);
   aB.Get(aBMinCoord[0], aBMinCoord[1], aBMinCoord[2], 
@@ -1365,7 +1367,7 @@ Standard_Real PointBoxDistance(const Bnd_Box& aB,
 //=======================================================================
 Standard_Integer TypeToInteger(const GeomAbs_CurveType theCType)
 {
-  Standard_Integer iRet;
+  Standard_Integer iRet = 0;
   //
   switch(theCType) {
   case GeomAbs_Line:
@@ -1430,8 +1432,8 @@ Standard_Real ResolutionCoeff(const BRepAdaptor_Curve& theBAC,
   case GeomAbs_Hyperbola :
   case GeomAbs_Parabola : 
   case GeomAbs_OtherCurve :{
-    Standard_Real k, kMin, aDist, aDt, aT1, aT2, aT;
-    Standard_Integer aNbP, i;
+    Standard_Real k = NAN, kMin = NAN, aDist = NAN, aDt = NAN, aT1 = NAN, aT2 = NAN, aT = NAN;
+    Standard_Integer aNbP = 0, i = 0;
     gp_Pnt aP1, aP2;
     //
     aNbP = 30;
@@ -1471,7 +1473,7 @@ Standard_Real Resolution(const Handle(Geom_Curve)& theCurve,
                          const Standard_Real theResCoeff,
                          const Standard_Real theR3D)
 {
-  Standard_Real aRes;
+  Standard_Real aRes = NAN;
   //
   switch (theCurveType) {
   case GeomAbs_Line :
@@ -1518,8 +1520,8 @@ Standard_Real Resolution(const Handle(Geom_Curve)& theCurve,
 Standard_Real CurveDeflection(const BRepAdaptor_Curve& theBAC,
                               const IntTools_Range& theRange)
 {
-  Standard_Real aDt, aT, aT1, aT2, aDefl;
-  Standard_Integer i, aNbP;
+  Standard_Real aDt = NAN, aT = NAN, aT1 = NAN, aT2 = NAN, aDefl = NAN;
+  Standard_Integer i = 0, aNbP = 0;
   gp_Vec aV1, aV2;
   gp_Pnt aP;
   //
index 7d4f236b6c3c6eae898b0271274e001ca6c454bf..652532fc435319e439db81e1127042fe17bead08 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntTools_EdgeFace.hxx>
 
 #include <BRep_Tool.hxx>
@@ -53,13 +55,13 @@ static
 //function : IntTools_EdgeFace::IntTools_EdgeFace
 //purpose  : 
 //=======================================================================
-  IntTools_EdgeFace::IntTools_EdgeFace()
+  IntTools_EdgeFace::IntTools_EdgeFace() : myFuzzyValue(Precision::Confusion()), myIsDone(Standard_False), myErrorStatus(1), myQuickCoincidenceCheck(Standard_False), myMinDistance(RealLast())
 {
-  myFuzzyValue = Precision::Confusion();
-  myIsDone=Standard_False;
-  myErrorStatus=1;
-  myQuickCoincidenceCheck=Standard_False;
-  myMinDistance = RealLast();
+  
+  
+  
+  
+  
 }
 //=======================================================================
 //function :  IsCoincident
@@ -67,8 +69,8 @@ static
 //=======================================================================
 Standard_Boolean IntTools_EdgeFace::IsCoincident() 
 {
-  Standard_Integer i, iCnt;
-  Standard_Real dT, aT, aD, aT1, aT2, aU, aV;
+  Standard_Integer i = 0, iCnt = 0;
+  Standard_Real dT = NAN, aT = NAN, aD = NAN, aT1 = NAN, aT2 = NAN, aU = NAN, aV = NAN;
 
   gp_Pnt aP;
   TopAbs_State aState;
@@ -172,7 +174,7 @@ void IntTools_EdgeFace::CheckData()
 Standard_Boolean IntTools_EdgeFace::IsProjectable
   (const Standard_Real aT) const
 {
-  Standard_Boolean bFlag; 
+  Standard_Boolean bFlag = 0
   gp_Pnt aPC;
   //
   myC.D0(aT, aPC);
@@ -187,13 +189,13 @@ Standard_Boolean IntTools_EdgeFace::IsProjectable
 Standard_Real IntTools_EdgeFace::DistanceFunction
   (const Standard_Real t)
 {
-  Standard_Real aD;
+  Standard_Real aD = NAN;
 
   //
   gp_Pnt P;
   myC.D0(t, P);
   //
-  Standard_Boolean bIsEqDistance;
+  Standard_Boolean bIsEqDistance = 0;
 
   bIsEqDistance= IntTools_EdgeFace::IsEqDistance(P, myS, 1.e-7, aD); 
   if (bIsEqDistance) {
@@ -243,7 +245,7 @@ Standard_Boolean IntTools_EdgeFace::IsEqDistance
     gp_Cylinder aCyl=aBAS.Cylinder();
     const gp_Ax1& anAx1  =aCyl.Axis();
     gp_Lin aLinAxis(anAx1);
-    Standard_Real aDC, aRadius=aCyl.Radius();
+    Standard_Real aDC = NAN, aRadius=aCyl.Radius();
     aDC=aLinAxis.Distance(aP);
     if (aDC < aTol) {
       aD=aRadius;
@@ -255,7 +257,7 @@ Standard_Boolean IntTools_EdgeFace::IsEqDistance
     gp_Cone aCone=aBAS.Cone();
     const gp_Ax1& anAx1  =aCone.Axis();
     gp_Lin aLinAxis(anAx1);
-    Standard_Real aDC, aRadius, aDS, aSemiAngle;
+    Standard_Real aDC = NAN, aRadius = NAN, aDS = NAN, aSemiAngle = NAN;
     aDC=aLinAxis.Distance(aP);
     if (aDC < aTol) {
       gp_Pnt anApex=aCone.Apex();
@@ -269,7 +271,7 @@ Standard_Boolean IntTools_EdgeFace::IsEqDistance
   }
 
   if (aSurfType==GeomAbs_Torus) {
-    Standard_Real aMajorRadius, aMinorRadius, aDC;
+    Standard_Real aMajorRadius = NAN, aMinorRadius = NAN, aDC = NAN;
 
     gp_Torus aTorus=aBAS.Torus();
     gp_Pnt aPLoc=aTorus.Location();
@@ -292,9 +294,9 @@ Standard_Boolean IntTools_EdgeFace::IsEqDistance
 Standard_Integer IntTools_EdgeFace::MakeType
   (IntTools_CommonPrt&  aCommonPrt)
 {
-  Standard_Real  af1, al1;
-  Standard_Real  df1, tm;
-  Standard_Boolean bAllNullFlag;
+  Standard_Real  af1 = NAN, al1 = NAN;
+  Standard_Real  df1 = NAN, tm = NAN;
+  Standard_Boolean bAllNullFlag = 0;
   //
   bAllNullFlag=aCommonPrt.AllNullFlag();
   if (bAllNullFlag) {
@@ -349,14 +351,14 @@ Standard_Boolean IntTools_EdgeFace::CheckTouch
   (const IntTools_CommonPrt& aCP,
    Standard_Real&            aTx) 
 {
-  Standard_Real aTF, aTL, Tol, U1f, U1l, V1f, V1l, af, al,aDist2, aMinDist2;
+  Standard_Real aTF = NAN, aTL = NAN, Tol = NAN, U1f = NAN, U1l = NAN, V1f = NAN, V1l = NAN, af = NAN, al = NAN,aDist2 = NAN, aMinDist2 = NAN;
   Standard_Boolean theflag=Standard_False;
-  Standard_Integer aNbExt, iLower;
+  Standard_Integer aNbExt = 0, iLower = 0;
 
   aCP.Range1(aTF, aTL);
 
   //
-  Standard_Real aCR;
+  Standard_Real aCR = NAN;
   aCR=myC.Resolution(myCriteria);
   if((Abs(aTF - myRange.First()) < aCR) &&
      (Abs(aTL - myRange.Last())  < aCR)) {
@@ -429,7 +431,7 @@ Standard_Boolean IntTools_EdgeFace::CheckTouch
     }
   }
 
-  Standard_Real aBoundaryDist;
+  Standard_Real aBoundaryDist = NAN;
 
   aBoundaryDist = DistanceFunction(aTF) + myCriteria;
   if(aBoundaryDist * aBoundaryDist < aDist2) {
@@ -475,7 +477,7 @@ Standard_Boolean IntTools_EdgeFace::CheckTouch
 //=======================================================================
 void IntTools_EdgeFace::Perform() 
 {
-  Standard_Integer i, aNb;
+  Standard_Integer i = 0, aNb = 0;
   IntTools_CommonPrt aCommonPrt;
   //
   aCommonPrt.SetEdge1(myEdge);
@@ -554,7 +556,7 @@ void IntTools_EdgeFace::Perform()
   for (i=1; i<=aNb; i++) {
     IntTools_CommonPrt& aCP=mySeqOfCommonPrts.ChangeValue(i);
     //
-    Standard_Real aTx1, aTx2;
+    Standard_Real aTx1 = NAN, aTx2 = NAN;
     gp_Pnt aPx1, aPx2;
     //
     aCP.Range1(aTx1, aTx2);
@@ -569,8 +571,8 @@ void IntTools_EdgeFace::Perform()
     GeomAbs_CurveType   aCType;
     GeomAbs_SurfaceType aSType;
     TopAbs_ShapeEnum aType;
-    Standard_Boolean bIsTouch;
-    Standard_Real aTx;
+    Standard_Boolean bIsTouch = 0;
+    Standard_Real aTx = NAN;
     
     aCType=myC.GetType();
     aSType=myS.GetType();
@@ -600,7 +602,7 @@ void IntTools_EdgeFace::Perform()
     // Circle\Plane's Common Parts treatment
     
     if (aCType==GeomAbs_Circle && aSType==GeomAbs_Plane) {
-      Standard_Boolean bIsCoplanar, bIsRadius;
+      Standard_Boolean bIsCoplanar = 0, bIsRadius = 0;
       bIsCoplanar=IsCoplanar(myC, myS);
       bIsRadius=IsRadius(myC, myS, myCriteria);
       if (!bIsCoplanar && !bIsRadius) {
@@ -637,10 +639,10 @@ Standard_Boolean IntTools_EdgeFace::CheckTouchVertex
   (const IntTools_CommonPrt& aCP,
    Standard_Real& aTx) 
 {
-  Standard_Real aTF, aTL, Tol, U1f,U1l,V1f,V1l;
-  Standard_Real aEpsT, af, al,aDist2, aMinDist2, aTm, aDist2New;
+  Standard_Real aTF = NAN, aTL = NAN, Tol = NAN, U1f = NAN,U1l = NAN,V1f = NAN,V1l = NAN;
+  Standard_Real aEpsT = NAN, af = NAN, al = NAN,aDist2 = NAN, aMinDist2 = NAN, aTm = NAN, aDist2New = NAN;
   Standard_Boolean theflag=Standard_False;
-  Standard_Integer aNbExt, i, iLower ;
+  Standard_Integer aNbExt = 0, i = 0, iLower = 0 ;
   GeomAbs_CurveType aType;
   //
   aCP.Range1(aTF, aTL);
@@ -788,7 +790,7 @@ Standard_Integer AdaptiveDiscret (const Standard_Integer iDiscret,
                                   const BRepAdaptor_Curve& aCurve ,
                                   const BRepAdaptor_Surface& aSurface)
 {
-  Standard_Integer iDiscretNew;
+  Standard_Integer iDiscretNew = 0;
 
   iDiscretNew=iDiscret;
 
@@ -797,7 +799,7 @@ Standard_Integer AdaptiveDiscret (const Standard_Integer iDiscret,
   aSType=aSurface.GetType();
     
   if (aSType==GeomAbs_Cylinder) {
-   Standard_Real aELength, aRadius, dLR;
+   Standard_Real aELength = NAN, aRadius = NAN, dLR = NAN;
 
    aELength=IntTools::Length(aCurve.Edge());
    
index 8ecf4f946729fc1693f7fca0c1c80222a924decf..2a04d9682672ec21cf611b4d2af2e377b63a56a6 100644 (file)
@@ -202,7 +202,7 @@ protected:
   Standard_Real myFuzzyValue;
   BRepAdaptor_Curve myC;
   BRepAdaptor_Surface myS;
-  Standard_Real myCriteria;
+  Standard_Real myCriteria{};
   Standard_Boolean myIsDone;
   Standard_Integer myErrorStatus;
   Handle(IntTools_Context) myContext;
index ab6d700a72a0a464f096bd3274efb7d1730a3a2c..43a9de2469599198afc0b9c953aecd02533accae 100644 (file)
@@ -44,6 +44,7 @@
 #include <TopoDS_Wire.hxx>
 #include <Poly.hxx>
 
+#include <math.h>
 #include <stdio.h>
 
 //#define DEBUG_PCLASS_POLYGON
@@ -84,13 +85,13 @@ Standard_Boolean IntTools_FClass2d::IsHole() const
 void IntTools_FClass2d::Init(const TopoDS_Face& aFace,
                             const Standard_Real TolUV) 
 {
-  Standard_Boolean WireIsNotEmpty, Ancienpnt3dinitialise, degenerated;
-  Standard_Integer firstpoint, NbEdges;
-  Standard_Integer iX, aNbs1, nbs, Avant, BadWire;
-  Standard_Real u, du, Tole, Tol, pfbid, plbid;
-  Standard_Real FlecheU, FlecheV, TolVertex1, TolVertex;
-  Standard_Real uFirst, uLast;
-  Standard_Real aPrCf, aPrCf2;
+  Standard_Boolean WireIsNotEmpty = 0, Ancienpnt3dinitialise = 0, degenerated = 0;
+  Standard_Integer firstpoint = 0, NbEdges = 0;
+  Standard_Integer iX = 0, aNbs1 = 0, nbs = 0, Avant = 0, BadWire = 0;
+  Standard_Real u = NAN, du = NAN, Tole = NAN, Tol = NAN, pfbid = NAN, plbid = NAN;
+  Standard_Real FlecheU = NAN, FlecheV = NAN, TolVertex1 = NAN, TolVertex = NAN;
+  Standard_Real uFirst = NAN, uLast = NAN;
+  Standard_Real aPrCf = NAN, aPrCf2 = NAN;
   //
   TopoDS_Edge  edge;
   TopoDS_Vertex Va,Vb;
@@ -265,9 +266,9 @@ void IntTools_FClass2d::Init(const TopoDS_Face& aFace,
       //-- afar from the last saved point
       Avant = SeqPnt2d.Length();
       for(iX=firstpoint; iX<=aNbs1; iX++) {
-        Standard_Boolean IsRealCurve3d;
-        Standard_Integer ii;
-        Standard_Real aDstX;
+        Standard_Boolean IsRealCurve3d = 0;
+        Standard_Integer ii = 0;
+        Standard_Real aDstX = NAN;
         gp_Pnt2d P2d;
         gp_Pnt P3d;
         //
@@ -291,7 +292,7 @@ void IntTools_FClass2d::Init(const TopoDS_Face& aFace,
         IsRealCurve3d = Standard_True; 
         if (aDstX < aPrCf2)  {
           if(iX>1) {
-            Standard_Real aDstX1;
+            Standard_Real aDstX1 = NAN;
             gp_Pnt MidP3d;
             //
             MidP3d = C3d.Value(0.5*(u+aPrms(iX-1)));
@@ -312,7 +313,7 @@ void IntTools_FClass2d::Init(const TopoDS_Face& aFace,
         //
         ii= SeqPnt2d.Length();
         if(ii>(Avant+4)) { 
-          Standard_Real ul, dU, dV;
+          Standard_Real ul = NAN, dU = NAN, dV = NAN;
           gp_Pnt2d Pp;
           //
           gp_Lin2d Lin(SeqPnt2d(ii-2),gp_Dir2d(gp_Vec2d(SeqPnt2d(ii-2),SeqPnt2d(ii))));
@@ -589,14 +590,14 @@ TopAbs_State IntTools_FClass2d::Perform
   const Standard_Real    uperiod = IsUPer ? surf->UPeriod() : 0.0;
   const Standard_Real    vperiod = IsVPer ? surf->VPeriod() : 0.0;
 
-  Standard_Boolean urecadre, vrecadre, bUseClassifier;
+  Standard_Boolean urecadre = 0, vrecadre = 0, bUseClassifier = 0;
   Standard_Integer dedans = 1;
   //
   urecadre = Standard_False;
   vrecadre = Standard_False;
   //
   if (RecadreOnPeriodic) {
-    Standard_Real du, dv;
+    Standard_Real du = NAN, dv = NAN;
     if (IsUPer) {
       GeomInt::AdjustPeriodic(uu, Umin, Umax, uperiod, uu, du);
     }// if (IsUPer) {
@@ -611,7 +612,7 @@ TopAbs_State IntTools_FClass2d::Perform
     gp_Pnt2d Puv(u,v);
     bUseClassifier = (TabOrien(1) == -1);
     if(!bUseClassifier) {
-      Standard_Integer n, cur, TabOrien_n ;
+      Standard_Integer n = 0, cur = 0, TabOrien_n = 0 ;
       for(n=1; n<=nbtabclass; n++) { 
         cur = ((CSLib_Class2d *)TabClass(n))->SiDans(Puv);
         TabOrien_n=TabOrien(n);
@@ -644,8 +645,8 @@ TopAbs_State IntTools_FClass2d::Perform
     //compute state of the point using face classifier
     if (bUseClassifier) {
       //compute tolerance to use in face classifier
-      Standard_Real aURes, aVRes, aFCTol;
-      Standard_Boolean bUIn, bVIn;
+      Standard_Real aURes = NAN, aVRes = NAN, aFCTol = NAN;
+      Standard_Boolean bUIn = 0, bVIn = 0;
       //
       aURes = surf->UResolution(Toluv);
       aVRes = surf->VResolution(Toluv);
@@ -736,7 +737,7 @@ TopAbs_State IntTools_FClass2d::TestOnRestriction
   Standard_Integer dedans = 1;
 
   if (RecadreOnPeriodic) {
-    Standard_Real du, dv;
+    Standard_Real du = NAN, dv = NAN;
     if (IsUPer) {
       GeomInt::AdjustPeriodic(uu, Umin, Umax, uperiod, uu, du);
     }// if (IsUPer) {
index 5b37565f1b222eb8e2c74d6209fd1e1b2bf12ca5..3fbb872de40db965f661236306fdd48f2b83cd07 100644 (file)
@@ -72,17 +72,17 @@ private:
 
   BRepTopAdaptor_SeqOfPtr TabClass;
   TColStd_SequenceOfInteger TabOrien;
-  Standard_Real Toluv;
+  Standard_Real Toluv{};
   TopoDS_Face Face;
-  Standard_Real U1;
-  Standard_Real V1;
-  Standard_Real U2;
-  Standard_Real V2;
-  Standard_Real Umin;
-  Standard_Real Umax;
-  Standard_Real Vmin;
-  Standard_Real Vmax;
-  Standard_Boolean myIsHole;
+  Standard_Real U1{};
+  Standard_Real V1{};
+  Standard_Real U2{};
+  Standard_Real V2{};
+  Standard_Real Umin{};
+  Standard_Real Umax{};
+  Standard_Real Vmin{};
+  Standard_Real Vmax{};
+  Standard_Boolean myIsHole{};
 
   mutable std::unique_ptr<BRepClass_FaceExplorer> myFExplorer;
 
index b95022f00bcd376f90b6b59e079a58753fd556ef..1988af14b34dcf73e79bf5c959fedb2659a5eb62 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntTools_FaceFace.hxx>
 
 #include <BRepTools.hxx>
@@ -160,17 +162,17 @@ static
 //function : 
 //purpose  : 
 //=======================================================================
-IntTools_FaceFace::IntTools_FaceFace()
+IntTools_FaceFace::IntTools_FaceFace() : myIsDone(Standard_False), myTangentFaces(Standard_False), myHS1(new GeomAdaptor_Surface ()), myHS2(new GeomAdaptor_Surface ()), myTolF1(0.), myTolF2(0.), myTol(0.), myFuzzyValue(Precision::Confusion())
 {
-  myIsDone=Standard_False;
-  myTangentFaces=Standard_False;
+  
+  
   //
-  myHS1 = new GeomAdaptor_Surface ();
-  myHS2 = new GeomAdaptor_Surface ();
-  myTolF1 = 0.;
-  myTolF2 = 0.;
-  myTol = 0.;
-  myFuzzyValue = Precision::Confusion();
+  
+  
+  
+  
+  
+  
   SetParameters(Standard_True, Standard_True, Standard_True, 1.e-07);
 }
 //=======================================================================
@@ -385,7 +387,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
 
     if (myListOfPnts.Extent())
     {
-      Standard_Real aU1,aV1,aU2,aV2;
+      Standard_Real aU1 = NAN,aV1 = NAN,aU2 = NAN,aV2 = NAN;
       IntSurf_ListIteratorOfListOfPntOn2S aItP2S;
       //
       aItP2S.Initialize(myListOfPnts);
@@ -423,7 +425,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
                                         aType2 == GeomAbs_Torus);
 
   if(aType1==GeomAbs_Plane && aType2==GeomAbs_Plane)  {
-    Standard_Real umin, umax, vmin, vmax;
+    Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
     //
     myContext->UVBounds(myFace1, umin, umax, vmin, vmax);
     myHS1->Load(S1, umin, umax, vmin, vmax);
@@ -459,7 +461,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
 
   if ((aType1==GeomAbs_Plane) && isFace2Quad)
   {
-    Standard_Real umin, umax, vmin, vmax;
+    Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
     // F1
     myContext->UVBounds(myFace1, umin, umax, vmin, vmax); 
     CorrectPlaneBoundaries(umin, umax, vmin, vmax);
@@ -471,7 +473,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
   }
   else if ((aType2==GeomAbs_Plane) && isFace1Quad)
   {
-    Standard_Real umin, umax, vmin, vmax;
+    Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
     //F1
     myContext->UVBounds(myFace1, umin, umax, vmin, vmax);
     CorrectSurfaceBoundaries(myFace1, myTol * 2., umin, umax, vmin, vmax);
@@ -483,7 +485,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
   }
   else
   {
-    Standard_Real umin, umax, vmin, vmax;
+    Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
     myContext->UVBounds(myFace1, umin, umax, vmin, vmax);
     CorrectSurfaceBoundaries(myFace1, myTol * 2., umin, umax, vmin, vmax);
     myHS1->Load(S1, umin, umax, vmin, vmax);
@@ -581,8 +583,8 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
     }
 
     // Points
-    Standard_Boolean bValid2D1, bValid2D2;
-    Standard_Real U1,V1,U2,V2;
+    Standard_Boolean bValid2D1 = 0, bValid2D2 = 0;
+    Standard_Real U1 = NAN,V1 = NAN,U2 = NAN,V2 = NAN;
     IntTools_PntOnFace aPntOnF1, aPntOnF2;
     IntTools_PntOn2Faces aPntOn2Faces;
     //
@@ -630,7 +632,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
 //=======================================================================
 void IntTools_FaceFace::ComputeTolReached3d (const Standard_Boolean theToRunParallel)
 {
-  Standard_Integer i, j, aNbLin = mySeqOfCurve.Length();
+  Standard_Integer i = 0, j = 0, aNbLin = mySeqOfCurve.Length();
   if (!aNbLin) {
     return;
   }
@@ -664,7 +666,7 @@ void IntTools_FaceFace::ComputeTolReached3d (const Standard_Boolean theToRunPara
       if (!aC2D.IsNull())
       {
         // Look for the maximal deviation between 3D and 2D curves
-        Standard_Real aD, aT;
+        Standard_Real aD = NAN, aT = NAN;
         const Handle(Geom_Surface)& aS = !j ? aS1 : aS2;
         if (IntTools_Tools::ComputeTolerance (aC3D, aC2D, aS, aFirst, aLast, aD, aT, Precision::PConfusion(), theToRunParallel))
         {
@@ -707,11 +709,11 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
                                   const Handle(Adaptor3d_TopolTool)& dom2,
                                   const Standard_Real theToler) 
 {
-  Standard_Boolean bDone, rejectSurface, reApprox, bAvoidLineConstructor;
-  Standard_Boolean ok, bPCurvesOk;
-  Standard_Integer i, j, aNbParts;
-  Standard_Real fprm, lprm;
-  Standard_Real Tolpc;
+  Standard_Boolean bDone = 0, rejectSurface = 0, reApprox = 0, bAvoidLineConstructor = 0;
+  Standard_Boolean ok = 0, bPCurvesOk = 0;
+  Standard_Integer i = 0, j = 0, aNbParts = 0;
+  Standard_Real fprm = NAN, lprm = NAN;
+  Standard_Real Tolpc = NAN;
   Handle(IntPatch_Line) L;
   IntPatch_IType typl;
   Handle(Geom_Curve) newc;
@@ -802,7 +804,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
     //
     aNbParts=myLConstruct.NbParts();
     for (i=1; i<=aNbParts; i++) {
-      Standard_Boolean bFNIt, bLPIt;
+      Standard_Boolean bFNIt = 0, bLPIt = 0;
       //
       myLConstruct.Part(i, fprm, lprm);
         //
@@ -847,7 +849,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
       else {
         //  on regarde si on garde
         //
-        Standard_Real aTestPrm, dT=100.;
+        Standard_Real aTestPrm = NAN, dT=100.;
         //
         aTestPrm=0.;
         if (bFNIt && !bLPIt) {
@@ -876,7 +878,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
           continue;
         }
 
-        Standard_Real u1, v1, u2, v2, Tol;
+        Standard_Real u1 = NAN, v1 = NAN, u2 = NAN, v2 = NAN, Tol = NAN;
         
         Tol = Precision::Confusion();
         Parameters(myHS1, myHS2, ptref,  u1, v1, u2, v2);
@@ -910,7 +912,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
     //
     aNbParts=myLConstruct.NbParts();
     //
-    Standard_Real aPeriod, aNul;
+    Standard_Real aPeriod = NAN, aNul = NAN;
     TColStd_SequenceOfReal aSeqFprm,  aSeqLprm;
     
     aNul=0.;
@@ -1042,7 +1044,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
           }
         }
         //
-        Standard_Real aTwoPIdiv17, u1, v1, u2, v2, Tol;
+        Standard_Real aTwoPIdiv17 = NAN, u1 = NAN, v1 = NAN, u2 = NAN, v2 = NAN, Tol = NAN;
 
         aTwoPIdiv17=2.*M_PI/17.;
 
@@ -1104,7 +1106,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
 #endif
 
     //
-    Standard_Integer ifprm, ilprm;
+    Standard_Integer ifprm = 0, ilprm = 0;
     //
     if (!myApprox) {
       aNbParts = 1;
@@ -1140,9 +1142,9 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
     }// if (!myApprox) {
     //
     else { // X
-      Standard_Boolean bIsDecomposited;
-      Standard_Integer nbiter, aNbSeqOfL;
-      Standard_Real tol2d, aTolApproxImp;
+      Standard_Boolean bIsDecomposited = 0;
+      Standard_Integer nbiter = 0, aNbSeqOfL = 0;
+      Standard_Real tol2d = NAN, aTolApproxImp = NAN;
       IntPatch_SequenceOfLine aSeqOfL;
       GeomInt_WLApprox theapp3d;
       Approx_ParametrizationType aParType = Approx_ChordLength;
@@ -1241,7 +1243,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
           if (reApprox && !rejectSurface)
             theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_False, aParType);
           else {
-            Standard_Integer iDegMax, iDegMin, iNbIter;
+            Standard_Integer iDegMax = 0, iDegMin = 0, iNbIter = 0;
             //
             ApproxParameters(myHS1, myHS2, iDegMin, iDegMax, iNbIter);
             theapp3d.SetParameters(myTolApprox, tol2d, iDegMin, iDegMax,
@@ -1267,7 +1269,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
               theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30,
                                                                 Standard_True, aParType);
               
-              Standard_Boolean bUseSurfaces;
+              Standard_Boolean bUseSurfaces = 0;
               bUseSurfaces = IntTools_WLineTool::NotUseSurfacesForApprox(myFace1, myFace2, WL, ifprm,  ilprm);
               if (bUseSurfaces) {
                 // ######
@@ -1309,7 +1311,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
             }
           }
           //
-          Standard_Integer aNbMultiCurves, nbpoles;
+          Standard_Integer aNbMultiCurves = 0, nbpoles = 0;
           aNbMultiCurves=theapp3d.NbMultiCurves(); 
           for (j=1; j<=aNbMultiCurves; j++) {
             if(typs1 == GeomAbs_Plane) {
@@ -1322,7 +1324,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
               mbspc.Curve(1,tpoles2d);
               const gp_Pln&  Pln = myHS1->Plane();
               //
-              Standard_Integer ik; 
+              Standard_Integer ik = 0
               for(ik = 1; ik<= nbpoles; ik++) { 
                 tpoles.SetValue(ik,
                                 ElSLib::Value(tpoles2d.Value(ik).X(),
@@ -1401,7 +1403,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
               mbspc.Curve((myApprox1==Standard_True)? 2 : 1,tpoles2d);
               const gp_Pln&  Pln = myHS2->Plane();
               //
-              Standard_Integer ik; 
+              Standard_Integer ik = 0
               for(ik = 1; ik<= nbpoles; ik++) { 
                 tpoles.SetValue(ik,
                                 ElSLib::Value(tpoles2d.Value(ik).X(),
@@ -1497,7 +1499,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
             }// else if(typs2 == GeomAbs_Plane)
             //
             else { //typs2 != GeomAbs_Plane && typs1 != GeomAbs_Plane
-              Standard_Boolean bIsValid1, bIsValid2;
+              Standard_Boolean bIsValid1 = 0, bIsValid2 = 0;
               Handle(Geom_BSplineCurve) BS;
               IntTools_Curve aCurve;
               //
@@ -1608,7 +1610,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
 
       Handle(Geom_Curve) aC3d;
       Handle(Geom2d_Curve) aC2d1, aC2d2;
-      Standard_Real aTolReached;
+      Standard_Real aTolReached = NAN;
       GeomInt_IntSS::TreatRLine(RL, myHS1, myHS2, aC3d,
                                   aC2d1, aC2d2, aTolReached);
 
@@ -1770,11 +1772,11 @@ Handle(Geom_Curve) MakeBSpline  (const Handle(IntPatch_WLine)& WL,
                                  const Standard_Integer ideb,
                                  const Standard_Integer ifin)
 {
-  Standard_Integer i,nbpnt = ifin-ideb+1;
+  Standard_Integer i = 0,nbpnt = ifin-ideb+1;
   TColgp_Array1OfPnt poles(1,nbpnt);
   TColStd_Array1OfReal knots(1,nbpnt);
   TColStd_Array1OfInteger mults(1,nbpnt);
-  Standard_Integer ipidebm1;
+  Standard_Integer ipidebm1 = 0;
   for(i=1,ipidebm1=i+ideb-1; i<=nbpnt;ipidebm1++, i++) {
     poles(i) = WL->Point(ipidebm1).Value();
     mults(i) = 1;
@@ -1791,7 +1793,7 @@ Handle(Geom_Curve) MakeBSpline  (const Handle(IntPatch_WLine)& WL,
 //=======================================================================
   void IntTools_FaceFace::PrepareLines3D(const Standard_Boolean bToSplit)
 {
-  Standard_Integer i, aNbCurves;
+  Standard_Integer i = 0, aNbCurves = 0;
   GeomAbs_SurfaceType aType1, aType2;
   IntTools_SequenceOfCurves aNewCvs;
   //
@@ -1801,7 +1803,7 @@ Handle(Geom_Curve) MakeBSpline  (const Handle(IntPatch_WLine)& WL,
     const IntTools_Curve& aIC=mySeqOfCurve(i);
     //
     if (bToSplit) {
-      Standard_Integer j, aNbC;
+      Standard_Integer j = 0, aNbC = 0;
       IntTools_SequenceOfCurves aSeqCvs;
       //
       aNbC=IntTools_Tools::SplitCurve(aIC, aSeqCvs);
@@ -1870,8 +1872,8 @@ Handle(Geom_Curve) MakeBSpline  (const Handle(IntPatch_WLine)& WL,
                               Standard_Real&      thevmin, 
                               Standard_Real&      thevmax) 
 {
-  Standard_Boolean enlarge, isuperiodic, isvperiodic;
-  Standard_Real uinf, usup, vinf, vsup, delta;
+  Standard_Boolean enlarge = 0, isuperiodic = 0, isvperiodic = 0;
+  Standard_Real uinf = NAN, usup = NAN, vinf = NAN, vsup = NAN, delta = NAN;
   GeomAbs_SurfaceType aType;
   Handle(Geom_Surface) aSurface;
   //
@@ -1960,7 +1962,7 @@ Handle(Geom_Curve) MakeBSpline  (const Handle(IntPatch_WLine)& WL,
     for(anExp.Init(theFace, TopAbs_EDGE); anExp.More(); anExp.Next()) {
       if(BRep_Tool::IsClosed(TopoDS::Edge(anExp.Current()), theFace)) {
         correct = Standard_True;
-        Standard_Real f, l;
+        Standard_Real f = NAN, l = NAN;
         TopoDS_Edge anEdge = TopoDS::Edge(anExp.Current());
         
         for(Standard_Integer i = 0; i < 2; i++) {
@@ -2000,7 +2002,7 @@ Handle(Geom_Curve) MakeBSpline  (const Handle(IntPatch_WLine)& WL,
     }
 
     if(correct) {
-      Standard_Real umin, vmin, umax, vmax;
+      Standard_Real umin = NAN, vmin = NAN, umax = NAN, vmax = NAN;
       aBox.Get(umin, vmin, umax, vmax);
 
       if(isuperiodic && correctU) {
@@ -2047,7 +2049,7 @@ Standard_Boolean ParameterOutOfBoundary(const Standard_Real       theParameter,
   Handle(Geom_Surface) aSurf1 = BRep_Tool::Surface(theFace1);
   Handle(Geom_Surface) aSurf2 = BRep_Tool::Surface(theFace2);
 
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
 
   GeomAPI_ProjectPointOnSurf aPrj1;
   aSurf1->Bounds(u1, u2, v1, v2);
@@ -2151,7 +2153,7 @@ Standard_Boolean ApproxWithPCurves(const gp_Cylinder& theCyl,
   Standard_Real R1 = theCyl.Radius(), R2 = theSph.Radius();
   //
   {
-    Standard_Real aD2, aRc2, aEps;
+    Standard_Real aD2 = NAN, aRc2 = NAN, aEps = NAN;
     gp_Pnt aApexSph;
     //
     aEps=1.E-7;
@@ -2252,11 +2254,11 @@ void  PerformPlanes(const Handle(GeomAdaptor_Surface)& theS1,
   gp_Lin2d aLin2d2 = aProj.Line();
   //
   //classify line2d1 relatively first plane
-  Standard_Real P11, P12;
+  Standard_Real P11 = NAN, P12 = NAN;
   Standard_Boolean IsCrossed = ClassifyLin2d(theS1, aLin2d1, TolTang, P11, P12);
   if(!IsCrossed) return;
   //classify line2d2 relatively second plane
-  Standard_Real P21, P22;
+  Standard_Real P21 = NAN, P22 = NAN;
   IsCrossed = ClassifyLin2d(theS2, aLin2d2, TolTang, P21, P22);
   if(!IsCrossed) return;
 
@@ -2265,7 +2267,7 @@ void  PerformPlanes(const Handle(GeomAdaptor_Surface)& theS1,
   if(P21 >= P12) return;
   if(P22 <= P11) return;
 
-  Standard_Real pmin, pmax;
+  Standard_Real pmin = NAN, pmax = NAN;
   pmin = Max(P11, P21);
   pmax = Min(P12, P22);
 
@@ -2301,7 +2303,7 @@ void  PerformPlanes(const Handle(GeomAdaptor_Surface)& theS1,
   aCurve.SetTolerance(aTolC);
   //
   // Computation of the tangential tolerance
-  Standard_Real anAngle, aDt;
+  Standard_Real anAngle = NAN, aDt = NAN;
   gp_Dir aD1, aD2;
   //
   aD1 = aPln1.Position().Direction();
@@ -2342,7 +2344,7 @@ Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_Surface)& theS,
                                Standard_Real& theP2)
 
 {
-  Standard_Real xmin, xmax, ymin, ymax, d1, d2, A, B, C;
+  Standard_Real xmin = NAN, xmax = NAN, ymin = NAN, ymax = NAN, d1 = NAN, d2 = NAN, A = NAN, B = NAN, C = NAN;
   Standard_Real par[2];
   Standard_Integer nbi = 0;
 
@@ -2490,7 +2492,7 @@ void ApproxParameters(const Handle(GeomAdaptor_Surface)& aHS1,
   // Cylinder/Torus
   if ((aTS1==GeomAbs_Cylinder && aTS2==GeomAbs_Torus) ||
       (aTS2==GeomAbs_Cylinder && aTS1==GeomAbs_Torus)) {
-    Standard_Real aRC, aRT, dR, aPC;
+    Standard_Real aRC = NAN, aRT = NAN, dR = NAN, aPC = NAN;
     gp_Cylinder aCylinder;
     gp_Torus aTorus;
     //
@@ -2530,7 +2532,7 @@ void Tolerances(const Handle(GeomAdaptor_Surface)& aHS1,
   // Cylinder/Torus
   if ((aTS1==GeomAbs_Cylinder && aTS2==GeomAbs_Torus) ||
       (aTS2==GeomAbs_Cylinder && aTS1==GeomAbs_Torus)) {
-    Standard_Real aRC, aRT, dR, aPC;
+    Standard_Real aRC = NAN, aRT = NAN, dR = NAN, aPC = NAN;
     gp_Cylinder aCylinder;
     gp_Torus aTorus;
     //
@@ -2558,8 +2560,8 @@ void Tolerances(const Handle(GeomAdaptor_Surface)& aHS1,
 Standard_Boolean SortTypes(const GeomAbs_SurfaceType aType1,
                            const GeomAbs_SurfaceType aType2)
 {
-  Standard_Boolean bRet;
-  Standard_Integer aI1, aI2;
+  Standard_Boolean bRet = 0;
+  Standard_Integer aI1 = 0, aI2 = 0;
   //
   bRet=Standard_False;
   //
@@ -2576,7 +2578,7 @@ Standard_Boolean SortTypes(const GeomAbs_SurfaceType aType1,
 //=======================================================================
 Standard_Integer IndexType(const GeomAbs_SurfaceType aType)
 {
-  Standard_Integer aIndex;
+  Standard_Integer aIndex = 0;
   //
   aIndex=11;
   //
@@ -2626,8 +2628,8 @@ Standard_Real FindMaxDistance(const Handle(Geom_Curve)& theCurve,
                               const TopoDS_Face& theFace,
                               const Handle(IntTools_Context)& theContext)
 {
-  Standard_Integer aNbS;
-  Standard_Real aT1, aT2, aDt, aD, aDMax, anEps;
+  Standard_Integer aNbS = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN, aDt = NAN, aD = NAN, aDMax = NAN, anEps = NAN;
   //
   aNbS = 11;
   aDt = (theLast - theFirst) / aNbS;
@@ -2663,7 +2665,7 @@ Standard_Real FindMaxDistance(const Handle(Geom_Curve)& theC,
                               GeomAPI_ProjectPointOnSurf& theProjPS,
                               const Standard_Real theEps)
 {
-  Standard_Real aA, aB, aCf, aX, aX1, aX2, aF1, aF2, aF;
+  Standard_Real aA = NAN, aB = NAN, aCf = NAN, aX = NAN, aX1 = NAN, aX2 = NAN, aF1 = NAN, aF2 = NAN, aF = NAN;
   //
   aCf = 0.61803398874989484820458683436564;//(sqrt(5.)-1)/2.;
   aA = theFirst;
@@ -2714,7 +2716,7 @@ Standard_Real MaxDistance(const Handle(Geom_Curve)& theC,
                           const Standard_Real aT,
                           GeomAPI_ProjectPointOnSurf& theProjPS)
 {
-  Standard_Real aD;
+  Standard_Real aD = NAN;
   gp_Pnt aP;
   //
   theC->D0(aT, aP);
@@ -2733,8 +2735,8 @@ Standard_Real MaxDistance(const Handle(Geom_Curve)& theC,
                                const Handle(IntTools_Context)& theCtx)
 {
   const Standard_Integer NPoints = 23;
-  Standard_Integer i;
-  Standard_Real umin,umax,vmin,vmax;
+  Standard_Integer i = 0;
+  Standard_Real umin = NAN,umax = NAN,vmin = NAN,vmax = NAN;
 
   theCtx->UVBounds(aFace, umin, umax, vmin, vmax);
   Standard_Real tolU = Max ((umax-umin)*0.01, Precision::Confusion());
@@ -2750,7 +2752,7 @@ Standard_Real MaxDistance(const Handle(Geom_Curve)& theC,
     aSurf = (Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf))->BasisSurface();
   }
   gp_Pnt2d pnt = aPC->Value((fp+lp)/2);
-  Standard_Real u,v;
+  Standard_Real u = NAN,v = NAN;
   pnt.Coord(u,v);
   //
   if (aSurf->IsUPeriodic()) {
@@ -2769,9 +2771,9 @@ Standard_Real MaxDistance(const Handle(Geom_Curve)& theC,
   }
   //
   //--------------------------------------------------------
-  Standard_Boolean bRet;
-  Standard_Integer j, aNbIntervals;
-  Standard_Real aT, dT;
+  Standard_Boolean bRet = 0;
+  Standard_Integer j = 0, aNbIntervals = 0;
+  Standard_Real aT = NAN, dT = NAN;
   gp_Pnt2d aP2D; 
   //
   Geom2dAdaptor_Curve aGAC(aPC);
@@ -2809,7 +2811,7 @@ Standard_Real MaxDistance(const Handle(Geom_Curve)& theC,
 {
   if (!(Precision::IsInfinite(aUmin) ||
         Precision::IsInfinite(aUmax))) { 
-    Standard_Real dU;
+    Standard_Real dU = NAN;
     //
     dU=0.1*(aUmax-aUmin);
     aUmin=aUmin-dU;
@@ -2817,7 +2819,7 @@ Standard_Real MaxDistance(const Handle(Geom_Curve)& theC,
   }
   if (!(Precision::IsInfinite(aVmin) ||
         Precision::IsInfinite(aVmax))) { 
-    Standard_Real dV;
+    Standard_Real dV = NAN;
     //
     dV=0.1*(aVmax-aVmin);
     aVmin=aVmin-dV;
index 228bc57ee516be7b0b44ceaac28e6dfb69ea1e6c..5d45c215dc2ae0881f6af5b7d7bb14398f4aae8a 100644 (file)
@@ -117,11 +117,11 @@ protected:
   GeomInt_LineConstructor myLConstruct;
   Handle(GeomAdaptor_Surface) myHS1;
   Handle(GeomAdaptor_Surface) myHS2;
-  Standard_Integer myNbrestr;
-  Standard_Boolean myApprox;
-  Standard_Boolean myApprox1;
-  Standard_Boolean myApprox2;
-  Standard_Real myTolApprox;
+  Standard_Integer myNbrestr{};
+  Standard_Boolean myApprox{};
+  Standard_Boolean myApprox1{};
+  Standard_Boolean myApprox2{};
+  Standard_Real myTolApprox{};
   Standard_Real myTolF1;
   Standard_Real myTolF2;
   Standard_Real myTol;
index 8d5ac3d1d10775f46fae74892e3e88d52bfddd1d..892f2202b084901bacfbfcbaeb0dfac49164ae8d 100644 (file)
@@ -125,7 +125,7 @@ public:
 private:
 
   TColStd_SequenceOfReal myRangeSetStorer;
-  Standard_Integer myRangeNumber;
+  Standard_Integer myRangeNumber{};
   TColStd_SequenceOfInteger myFlags;
   TColStd_SequenceOfInteger myFoundIndices;
 
index 14d4a2376fa672f98bec48becdee68385bd698b2..a7caefabd7dfcbe5f511bff1bffdf10bab794665 100644 (file)
@@ -32,10 +32,10 @@ IntTools_PntOn2Faces::IntTools_PntOn2Faces()
   IntTools_PntOn2Faces::IntTools_PntOn2Faces(const IntTools_PntOnFace& aP1,
                                             const IntTools_PntOnFace& aP2)
 :
-  myIsValid(Standard_False)
+  myIsValid(Standard_False), myPnt1(aP1), myPnt2(aP2)
 {
-  myPnt1=aP1;
-  myPnt2=aP2;
+  
+  
 }
 //=======================================================================
 //function : SetP1
index f07cb7ad9be8c9e8c2099dbed894457108e246a2..8900ec821c47d3f09159facdfb7cb8a65adbde2b 100644 (file)
@@ -26,10 +26,10 @@ IntTools_Range::IntTools_Range():myFirst(0.), myLast(0.) {}
 //function : IntTools_Range::IntTools_Range
 //purpose  : 
 //=======================================================================
-  IntTools_Range::IntTools_Range(const Standard_Real aFirst,const Standard_Real aLast)
+  IntTools_Range::IntTools_Range(const Standard_Real aFirst,const Standard_Real aLast) : myFirst(aFirst), myLast(aLast)
 {
-  myFirst=aFirst;
-  myLast=aLast;
+  
+  
 }
 //=======================================================================
 //function : SetFirst
index f12476335b7b0d49e5d3bfdd2571056a271e052e..30771d62c01bde921eab4aec1d280e0ce040470a 100644 (file)
@@ -36,7 +36,7 @@ IntTools_Root::IntTools_Root():
 //=======================================================================
   IntTools_Root::IntTools_Root(const Standard_Real aRoot,
                               const Standard_Integer aType):
-  myLayerHeight(0.),
+  myRoot(aRoot), myType(aType), myLayerHeight(0.),
   myStateBefore(TopAbs_UNKNOWN), 
   myStateAfter(TopAbs_UNKNOWN),
   myt1(0.), 
@@ -44,8 +44,8 @@ IntTools_Root::IntTools_Root():
   myf1(0.), 
   myf2(0.)  
 {
-  myRoot=aRoot;
-  myType=aType;
+  
+  
 } 
 
 //=======================================================================
index 646a629395d735f798eea95e6fcea9dc71187920..b4dd3cc3cb2866e0b64602ffd6db1bd10a9818b3 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRepLib.hxx>
 #include <BndLib_Add3dCurve.hxx>
 #include <BRep_Tool.hxx>
 //function : 
 //purpose  : 
 //=======================================================================
-  IntTools_ShrunkRange::IntTools_ShrunkRange ()
+  IntTools_ShrunkRange::IntTools_ShrunkRange () : myT1(-99), myT2(myT1), myTS1(myT1), myTS2(myT1), myIsDone(Standard_False), myIsSplittable(Standard_False), myLength(0.0)
 {
-  myT1=-99;
-  myT2=myT1;
-  myTS1=myT1;
-  myTS2=myT1;
-  myIsDone=Standard_False;
-  myIsSplittable=Standard_False;
-  myLength = 0.0;
+  
+  
+  
+  
+  
+  
+  
 }
 //=======================================================================
 //function : ~
@@ -137,7 +139,7 @@ void IntTools_ShrunkRange::Perform()
   //
   gp_Pnt aP1 = BRep_Tool::Pnt(myV1);
   gp_Pnt aP2 = BRep_Tool::Pnt(myV2);
-  Standard_Real aTolE, aTolV1, aTolV2;
+  Standard_Real aTolE = NAN, aTolV1 = NAN, aTolV2 = NAN;
   aTolE = BRep_Tool::Tolerance(myEdge);
   aTolV1 = BRep_Tool::Tolerance(myV1);
   aTolV2 = BRep_Tool::Tolerance(myV2);
index 4e13d4ad4cc265ea07b491cb7c3ad63b7df3e8c0..c469ed0b500c1d081eec87787a81982ec889510e 100644 (file)
 #include <IntTools_SurfaceRangeSample.hxx>
 #include <Precision.hxx>
 
-IntTools_SurfaceRangeLocalizeData::IntTools_SurfaceRangeLocalizeData()
+IntTools_SurfaceRangeLocalizeData::IntTools_SurfaceRangeLocalizeData() : myNbSampleU(1), myNbSampleV(1), myMinRangeU(0.), myMinRangeV(0.), myDeflection(0.), myUIndMin(0), myUIndMax(0), myVIndMin(0), myVIndMax(0)
 {
-  myNbSampleU = 1;
-  myNbSampleV = 1;
-  myMinRangeU = 0.;
-  myMinRangeV = 0.;
+  
+  
+  
+  
 //  Modified by skv - Thu Nov  3 11:58:24 2005 Optimization Begin
-  myDeflection = 0.;
-  myUIndMin    = 0;
-  myUIndMax    = 0;
-  myVIndMin    = 0;
-  myVIndMax    = 0;
+  
+  
+  
+  
+  
 //  Modified by skv - Thu Nov  3 11:58:24 2005 Optimization End
 }
 
@@ -40,18 +40,18 @@ IntTools_SurfaceRangeLocalizeData::IntTools_SurfaceRangeLocalizeData()
 IntTools_SurfaceRangeLocalizeData::IntTools_SurfaceRangeLocalizeData(const Standard_Integer theNbSampleU,
                                                                     const Standard_Integer theNbSampleV,
                                                                     const Standard_Real theMinRangeU,
-                                                                    const Standard_Real theMinRangeV)
+                                                                    const Standard_Real theMinRangeV) : myNbSampleU(theNbSampleU), myNbSampleV(theNbSampleV), myMinRangeU(theMinRangeU), myMinRangeV(theMinRangeV), myDeflection(0.), myUIndMin(0), myUIndMax(0), myVIndMin(0), myVIndMax(0)
 {
-  myNbSampleU = theNbSampleU;
-  myNbSampleV = theNbSampleV;
-  myMinRangeU = theMinRangeU;
-  myMinRangeV = theMinRangeV;
+  
+  
+  
+  
 //  Modified by skv - Thu Nov  3 11:58:24 2005 Optimization Begin
-  myDeflection = 0.;
-  myUIndMin    = 0;
-  myUIndMax    = 0;
-  myVIndMin    = 0;
-  myVIndMax    = 0;
+  
+  
+  
+  
+  
 //  Modified by skv - Thu Nov  3 11:58:24 2005 Optimization End
 }
 
@@ -181,8 +181,8 @@ void IntTools_SurfaceRangeLocalizeData::SetFrame(const Standard_Real theUMin,
     return;
   }
 
-  Standard_Integer i;
-  Standard_Integer aLmI;
+  Standard_Integer i = 0;
+  Standard_Integer aLmI = 0;
   Standard_Integer aLen = myUParams->Length();
 
   // Compute frame along U.
index eec3296f5c60f97829594932397d167420828f9f..076b4b9d632df2777e901ab7a743d8f9beb50857 100644 (file)
@@ -143,20 +143,20 @@ private:
 
 
 
-  Standard_Integer myNbSampleU;
-  Standard_Integer myNbSampleV;
-  Standard_Real myMinRangeU;
-  Standard_Real myMinRangeV;
+  Standard_Integer myNbSampleU{};
+  Standard_Integer myNbSampleV{};
+  Standard_Real myMinRangeU{};
+  Standard_Real myMinRangeV{};
   IntTools_MapOfSurfaceSample myMapRangeOut;
   IntTools_DataMapOfSurfaceSampleBox myMapBox;
   Handle(TColStd_HArray1OfReal) myUParams;
   Handle(TColStd_HArray1OfReal) myVParams;
   Handle(TColgp_HArray2OfPnt) myGridPoints;
-  Standard_Integer myUIndMin;
-  Standard_Integer myUIndMax;
-  Standard_Integer myVIndMin;
-  Standard_Integer myVIndMax;
-  Standard_Real myDeflection;
+  Standard_Integer myUIndMin{};
+  Standard_Integer myUIndMax{};
+  Standard_Integer myVIndMin{};
+  Standard_Integer myVIndMax{};
+  Standard_Real myDeflection{};
 
 
 };
index 63cc80e878e994811cfc976bf6b738318c7f8d92..c20c84096f7b2a3ca4aa751bdb130a64625697a0 100644 (file)
@@ -31,10 +31,10 @@ IntTools_SurfaceRangeSample::IntTools_SurfaceRangeSample(const Standard_Integer
 }
 
 IntTools_SurfaceRangeSample::IntTools_SurfaceRangeSample(const IntTools_CurveRangeSample& theRangeU,
-                                                        const IntTools_CurveRangeSample& theRangeV)
+                                                        const IntTools_CurveRangeSample& theRangeV) : myRangeU(theRangeU), myRangeV(theRangeV)
 {
-  myRangeU = theRangeU;
-  myRangeV = theRangeV;
+  
+  
 }
 
 IntTools_SurfaceRangeSample::IntTools_SurfaceRangeSample(const IntTools_SurfaceRangeSample& Other)
index 3c72ec99066e75ca77f9ac15e6181ca814931c0c..f871d90b3abb2ff0dd37d082116f4b1bcf0b8b24 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -81,8 +83,8 @@ static
 //=======================================================================
   Standard_Boolean IntTools_Tools::IsClosed (const Handle(Geom_Curve)& aC3D)
 {
-  Standard_Boolean bRet;
-  Standard_Real aF, aL, aDist, aPC;
+  Standard_Boolean bRet = 0;
+  Standard_Real aF = NAN, aL = NAN, aDist = NAN, aPC = NAN;
   gp_Pnt aP1, aP2;
   
   Handle (Geom_BoundedCurve) aGBC=
@@ -113,8 +115,8 @@ static
    void IntTools_Tools::RejectLines(const IntTools_SequenceOfCurves& aSIn,
         IntTools_SequenceOfCurves& aSOut)
 {
-  Standard_Integer i, j, aNb;
-  Standard_Boolean bFlag;
+  Standard_Integer i = 0, j = 0, aNb = 0;
+  Standard_Boolean bFlag = 0;
   Handle (Geom_Curve) aC3D;
 
   gp_Dir aD1, aD2;
@@ -168,10 +170,10 @@ static
 //=======================================================================
   Standard_Boolean IntTools_Tools::IsDirsCoinside  (const gp_Dir& D1, const gp_Dir& D2)
 {
-  Standard_Boolean bFlag;
+  Standard_Boolean bFlag = 0;
   gp_Pnt P1(D1.X(), D1.Y(), D1.Z());  
   gp_Pnt P2(D2.X(), D2.Y(), D2.Z());
-  Standard_Real dLim=0.0002, d;
+  Standard_Real dLim=0.0002, d = NAN;
   d=P1.Distance (P2); 
   bFlag= (d<dLim || fabs (2.-d)<dLim); 
   return bFlag;
@@ -185,8 +187,8 @@ static
           const gp_Dir& D2,
           const Standard_Real dLim)
 {
-  Standard_Boolean bFlag;
-  Standard_Real d;
+  Standard_Boolean bFlag = 0;
+  Standard_Real d = NAN;
   //
   gp_Pnt P1(D1.X(), D1.Y(), D1.Z());  
   gp_Pnt P2(D2.X(), D2.Y(), D2.Z());
@@ -201,20 +203,20 @@ static
   Standard_Integer IntTools_Tools::SplitCurve(const IntTools_Curve& IC,
            IntTools_SequenceOfCurves& aCvs)
 {
-  Handle (Geom_Curve) aC3D =IC.Curve();
+  const Handle (Geom_Curve)& aC3D =IC.Curve();
   if(aC3D.IsNull())
     return 0;
   //
-  Handle (Geom2d_Curve) aC2D1=IC.FirstCurve2d();
-  Handle (Geom2d_Curve) aC2D2=IC.SecondCurve2d();
-  Standard_Boolean bIsClosed;
+  const Handle (Geom2d_Curve)& aC2D1=IC.FirstCurve2d();
+  const Handle (Geom2d_Curve)& aC2D2=IC.SecondCurve2d();
+  Standard_Boolean bIsClosed = 0;
 
   bIsClosed=IntTools_Tools::IsClosed(aC3D);
   if (!bIsClosed) {
     return 0;
   }
 
-  Standard_Real aF, aL, aMid;
+  Standard_Real aF = NAN, aL = NAN, aMid = NAN;
   
   //
   aF=aC3D->FirstParameter();
@@ -264,7 +266,7 @@ static
 {
   //define parameter division number as 10*e^(-M_PI) = 0.43213918
   const Standard_Real PAR_T = 0.43213918;
-  Standard_Real aParm;
+  Standard_Real aParm = NAN;
   aParm=(1.-PAR_T)*aFirst + PAR_T*aLast;
   return aParm;
 }
@@ -277,8 +279,8 @@ static
           const Standard_Real aTolPV,
           const TopoDS_Vertex& aV)
 {
-  Standard_Boolean bRet;
-  Standard_Real aTolV, aD, dTol;
+  Standard_Boolean bRet = 0;
+  Standard_Real aTolV = NAN, aD = NAN, dTol = NAN;
   gp_Pnt aPv; 
   
   aTolV=BRep_Tool::Tolerance(aV);
@@ -301,8 +303,8 @@ static
 //=======================================================================
   Standard_Boolean IntTools_Tools::IsVertex (const IntTools_CommonPrt& aCmnPrt)
 {
-  Standard_Boolean anIsVertex;
-  Standard_Real aParam;
+  Standard_Boolean anIsVertex = 0;
+  Standard_Real aParam = NAN;
 
   const TopoDS_Edge&    aE1=aCmnPrt.Edge1();
   const IntTools_Range& aR1=aCmnPrt.Range1();
@@ -332,7 +334,7 @@ static
           const TopoDS_Vertex& aV,
           const Standard_Real t)
 {
-  Standard_Real aTolV, aTolV2, d2;
+  Standard_Real aTolV = NAN, aTolV2 = NAN, d2 = NAN;
   gp_Pnt aPv, aPt; 
   
   BRepAdaptor_Curve aBAC(aE);
@@ -354,7 +356,7 @@ static
   Standard_Boolean IntTools_Tools::IsVertex (const TopoDS_Edge& aE,
           const Standard_Real t)
 {
-  Standard_Real aTolV, aTolV2, d2;
+  Standard_Real aTolV = NAN, aTolV2 = NAN, d2 = NAN;
   TopoDS_Vertex aV;
   gp_Pnt aPv, aPt; 
   
@@ -384,7 +386,7 @@ static
   Standard_Integer IntTools_Tools::ComputeVV(const TopoDS_Vertex& aV1, 
           const TopoDS_Vertex& aV2)
 {
-  Standard_Real aTolV1, aTolV2, aTolSum, d;
+  Standard_Real aTolV1 = NAN, aTolV2 = NAN, aTolSum = NAN, d = NAN;
   gp_Pnt aP1, aP2;
 
   aTolV1=BRep_Tool::Tolerance(aV1);
@@ -424,7 +426,7 @@ static
   TopAbs_State IntTools_Tools::ClassifyPointByFace(const TopoDS_Face& aF,
          const gp_Pnt2d& aP2d)
 {
-  Standard_Real aFaceTolerance;
+  Standard_Real aFaceTolerance = NAN;
   TopAbs_State aState;
   
   aFaceTolerance=BRep_Tool::Tolerance(aF);
@@ -442,8 +444,8 @@ static
              const TopoDS_Edge& aE2)
              
 {
-  Standard_Boolean bRet;
-  Standard_Real f1, l1, m1, f2, l2, m2, aTol1, aTol2, aSumTol, aD2;
+  Standard_Boolean bRet = 0;
+  Standard_Real f1 = NAN, l1 = NAN, m1 = NAN, f2 = NAN, l2 = NAN, m2 = NAN, aTol1 = NAN, aTol2 = NAN, aSumTol = NAN, aD2 = NAN;
   gp_Pnt aP1, aP2;
 
   aTol1=BRep_Tool::Tolerance(aE1);
@@ -470,7 +472,7 @@ static
   Standard_Real IntTools_Tools::CurveTolerance(const Handle(Geom_Curve)& aC3D,
             const Standard_Real aTolBase)
 {
-  Standard_Real aTolReached, aTf, aTl, aTolMin, aTolMax;
+  Standard_Real aTolReached = NAN, aTf = NAN, aTl = NAN, aTolMin = NAN, aTolMax = NAN;
 
   aTolReached=aTolBase;
   //
@@ -525,8 +527,8 @@ void ParabolaTolerance(const Handle(Geom_Curve)& aC3D,
     return;
   }
 
-  Standard_Integer aNbPoints;
-  Standard_Real aFocal, aX1, aX2, aTol1, aTol2;
+  Standard_Integer aNbPoints = 0;
+  Standard_Real aFocal = NAN, aX1 = NAN, aX2 = NAN, aTol1 = NAN, aTol2 = NAN;
   gp_Pnt aPf, aPl;
   gp_Parab aParab=aGP->Parab();
   gp_Ax1 aXAxis=aParab.XAxis();
@@ -613,7 +615,7 @@ Standard_Boolean IntTools_Tools::IsOnPave(const Standard_Real aT1,
                                           const IntTools_Range& aRange,
                                           const Standard_Real aTolerance)
 {
-  Standard_Boolean firstisonpave1, firstisonpave2, bIsOnPave;
+  Standard_Boolean firstisonpave1 = 0, firstisonpave2 = 0, bIsOnPave = 0;
   //
   firstisonpave1  = (Abs(aRange.First() - aT1) < aTolerance);
   firstisonpave2  = (Abs(aRange.Last()  - aT1) < aTolerance);
@@ -667,8 +669,8 @@ Standard_Boolean IntTools_Tools::IsOnPave1(const Standard_Real aTR,
                                            const IntTools_Range& aCPRange,
                                            const Standard_Real aTolerance)
 {
-  Standard_Boolean bIsOnPave;
-  Standard_Real aT1, aT2, dT1, dT2;
+  Standard_Boolean bIsOnPave = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN, dT1 = NAN, dT2 = NAN;
   //
   aT1=aCPRange.First();
   aT2=aCPRange.Last();
@@ -690,8 +692,8 @@ Standard_Boolean IntTools_Tools::IsInRange(const IntTools_Range& aRRef,
                                            const IntTools_Range& aR,
                                            const Standard_Real aTolerance)
 {
-  Standard_Boolean bIsIn;
-  Standard_Real aT1, aT2, aTRef1, aTRef2;
+  Standard_Boolean bIsIn = 0;
+  Standard_Real aT1 = NAN, aT2 = NAN, aTRef1 = NAN, aTRef2 = NAN;
   //
   aR.Range(aT1, aT2);
   aRRef.Range(aTRef1, aTRef2);
@@ -720,8 +722,8 @@ Standard_Integer IntTools_Tools::SegPln(const gp_Lin& theLin,
                                         Standard_Real& theTPmin,
                                         Standard_Real& theTPmax)
 {
-  Standard_Integer iRet;
-  Standard_Real aTol, aA, aB, aC, aD, aE, aH, aTP, aDist1, aDist2;
+  Standard_Integer iRet = 0;
+  Standard_Real aTol = NAN, aA = NAN, aB = NAN, aC = NAN, aD = NAN, aE = NAN, aH = NAN, aTP = NAN, aDist1 = NAN, aDist2 = NAN;
   gp_Pnt aP1, aP2;
   //
   iRet=0;
@@ -826,13 +828,13 @@ Standard_Real IntTools_Tools::ComputeIntRange(const Standard_Real theTol1,
                                               const Standard_Real theTol2,
                                               const Standard_Real theAngle)
 {
-  Standard_Real aDt;
+  Standard_Real aDt = NAN;
   //
   if (Abs(M_PI_2 - theAngle) < Precision::Angular()) {
     aDt = theTol2;
   }
   else {
-    Standard_Real a1, a2, anAngle;
+    Standard_Real a1 = NAN, a2 = NAN, anAngle = NAN;
     //
     anAngle = (theAngle > M_PI_2) ? (M_PI - theAngle) : theAngle;
     a1 = theTol1 * tan(M_PI_2 - anAngle);
index a5b8bdaa0ed239ec7e084867393173ce9c5df51e..269ba1b249fa123709a581092fb236d51cc481d3 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <ElSLib.hxx>
 #include <Geom_BezierSurface.hxx>
@@ -37,25 +39,25 @@ static void Analyse(const TColgp_Array2OfPnt& array2,
 // function: Constructor
 // purpose:
 // =====================================================================================
-IntTools_TopolTool::IntTools_TopolTool()
+IntTools_TopolTool::IntTools_TopolTool() : myNbSmplU(0), myNbSmplV(0), myDU(1.), myDV(1.)
 {
-  myNbSmplU = 0;
-  myNbSmplV = 0;
-  myDU = 1.;
-  myDV = 1.;
+  
+  
+  
+  
 }
 
 // =====================================================================================
 // function: Constructor
 // purpose:
 // =====================================================================================
-IntTools_TopolTool::IntTools_TopolTool(const Handle(Adaptor3d_Surface)& theSurface)
+IntTools_TopolTool::IntTools_TopolTool(const Handle(Adaptor3d_Surface)& theSurface) : myNbSmplU(0), myNbSmplV(0), myDU(1.), myDV(1.)
 {
   Initialize(theSurface);
-  myNbSmplU = 0;
-  myNbSmplV = 0;
-  myDU = 1.;
-  myDV = 1.;
+  
+  
+  
+  
 }
 
 // =====================================================================================
@@ -87,7 +89,7 @@ void IntTools_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& theSurface)
 // =====================================================================================
 void IntTools_TopolTool::ComputeSamplePoints() 
 {
-  Standard_Real uinf, usup, vinf, vsup;
+  Standard_Real uinf = NAN, usup = NAN, vinf = NAN, vsup = NAN;
   uinf = myS->FirstUParameter();  
   usup = myS->LastUParameter();
   vinf = myS->FirstVParameter();  
@@ -96,7 +98,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
 
   if (usup < uinf) { Standard_Real temp = uinf; uinf = usup; usup = temp; }
   if (vsup < vinf) { Standard_Real temp = vinf; vinf = vsup; vsup = temp; }
-  Standard_Boolean isbiguinf, isbigusup, isbigvinf, isbigvsup;
+  Standard_Boolean isbiguinf = 0, isbigusup = 0, isbigvinf = 0, isbigvsup = 0;
   isbiguinf = Precision::IsNegativeInfinite(uinf);
   isbigusup = Precision::IsPositiveInfinite(usup);
   isbigvinf = Precision::IsNegativeInfinite(vinf);
@@ -176,7 +178,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
   case GeomAbs_Sphere:
   case GeomAbs_Torus: {
     gp_Circ aCircle;
-    Standard_Real aRadius1, aRadius2;
+    Standard_Real aRadius1 = NAN, aRadius2 = NAN;
 
     if(typS == GeomAbs_Torus) {
       gp_Torus aTorus = myS->Torus();
@@ -358,7 +360,7 @@ void Analyse(const TColgp_Array2OfPnt& array2,
             Standard_Integer&         theNbSamplesV) 
 { 
   gp_Vec Vi,Vip1;
-  Standard_Integer sh,nbch,i,j;
+  Standard_Integer sh = 0,nbch = 0,i = 0,j = 0;
   const Standard_Integer nbup = array2.UpperRow() - array2.LowerRow() + 1;
   const Standard_Integer nbvp = array2.UpperCol() - array2.LowerCol() + 1;
   
index 2a5bcc6fbfd84b729478147904a1586209f1f7ae..04b026194ca09dc56e3c7774a245f4b8dca239c9 100644 (file)
@@ -97,8 +97,8 @@ private:
 
   Standard_Integer myNbSmplU;
   Standard_Integer myNbSmplV;
-  Standard_Real myU0;
-  Standard_Real myV0;
+  Standard_Real myU0{};
+  Standard_Real myV0{};
   Standard_Real myDU;
   Standard_Real myDV;
 
index 8d8e1a6b316a26b4d58c8404ef75e86c875c69f3..44c335b565dc80b12dd311870d91fa12bb573d1f 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <IntTools_WLineTool.hxx>
 
 #include <BRep_Tool.hxx>
@@ -51,8 +53,8 @@ Standard_Boolean IsDegeneratedZone(const gp_Pnt2d& aP2d,
                                    const Standard_Integer iDir)
 {
   Standard_Boolean bFlag=Standard_True;
-  Standard_Real US1, US2, VS1, VS2, dY, dX, d1, d2, dD;
-  Standard_Real aXm, aYm, aXb, aYb, aXe, aYe;
+  Standard_Real US1 = NAN, US2 = NAN, VS1 = NAN, VS2 = NAN, dY = NAN, dX = NAN, d1 = NAN, d2 = NAN, dD = NAN;
+  Standard_Real aXm = NAN, aYm = NAN, aXb = NAN, aYb = NAN, aXe = NAN, aYe = NAN;
   aS->Bounds(US1, US2, VS1, VS2); 
 
   gp_Pnt aPm, aPb, aPe;
@@ -123,8 +125,8 @@ Standard_Boolean IsPointInDegeneratedZone(const IntSurf_PntOn2S& aP2S,
                                           
 {
   Standard_Boolean bFlag=Standard_True;
-  Standard_Real US11, US12, VS11, VS12, US21, US22, VS21, VS22;
-  Standard_Real U1, V1, U2, V2, aDelta, aD;
+  Standard_Real US11 = NAN, US12 = NAN, VS11 = NAN, VS12 = NAN, US21 = NAN, US22 = NAN, VS21 = NAN, VS22 = NAN;
+  Standard_Real U1 = NAN, V1 = NAN, U2 = NAN, V2 = NAN, aDelta = NAN, aD = NAN;
   gp_Pnt2d aP2d;
 
   Handle(Geom_Surface)aS1 = BRep_Tool::Surface(aF1);
@@ -208,7 +210,7 @@ Standard_Boolean IntTools_WLineTool::NotUseSurfacesForApprox(const TopoDS_Face&
                                                              const Standard_Integer ifprm,
                                                              const Standard_Integer ilprm)
 {
-  Standard_Boolean bPInDZ;
+  Standard_Boolean bPInDZ = 0;
 
   Handle(IntSurf_LineOn2S) aLineOn2S=WL->Curve();
   
@@ -239,9 +241,9 @@ Standard_Boolean IsPointOnBoundary(const Standard_Real theParameter,
                                    const Standard_Real theResolution,
                                    Standard_Boolean&   IsOnFirstBoundary) 
 {
-  Standard_Boolean bRet;
-  Standard_Integer i;
-  Standard_Real adist;
+  Standard_Boolean bRet = 0;
+  Standard_Integer i = 0;
+  Standard_Real adist = NAN;
   //
   bRet=Standard_False;
   for(i = 0; i < 2; ++i) {
@@ -311,8 +313,8 @@ gp_Pnt2d AdjustByNeighbour(const gp_Pnt2d&     theaNeighbourPoint,
 static
 void RefineVector(gp_Vec2d& aV2D)
 {
-  Standard_Integer k,m;
-  Standard_Real aC[2], aEps, aR1, aR2, aNum;
+  Standard_Integer k = 0,m = 0;
+  Standard_Real aC[2], aEps = NAN, aR1 = NAN, aR2 = NAN, aNum = NAN;
   //
   aEps=RealEpsilon();
   aR1=1.-aEps;
@@ -407,7 +409,7 @@ Standard_Boolean FindPoint(const gp_Pnt2d&     theFirstPoint,
       if ( bIsOut )
         acurvec.Reverse();
 
-      Standard_Real aDotX, anAngleX;
+      Standard_Real aDotX = NAN, anAngleX = NAN;
       //
       aDotX = aVec.Dot(acurvec);
       anAngleX = aVec.Angle(acurvec);
@@ -449,8 +451,8 @@ Standard_Boolean IntTools_WLineTool::
                        IntPatch_SequenceOfLine&                       theNewLines,
                        const Handle(IntTools_Context)& aContext) 
 {
-  Standard_Boolean bRet, bAvoidLineConstructor;
-  Standard_Integer aNbPnts, aNbParts;
+  Standard_Boolean bRet = 0, bAvoidLineConstructor = 0;
+  Standard_Integer aNbPnts = 0, aNbParts = 0;
   //
   bRet=Standard_False;
   aNbPnts=theWLine->NbPnts();
@@ -466,9 +468,9 @@ Standard_Boolean IntTools_WLineTool::
     }
   }
   //
-  Standard_Boolean bIsPrevPointOnBoundary, bIsPointOnBoundary, bIsCurrentPointOnBoundary;
-  Standard_Integer nblines, pit, i, j;
-  Standard_Real aTol;
+  Standard_Boolean bIsPrevPointOnBoundary = 0, bIsPointOnBoundary = 0, bIsCurrentPointOnBoundary = 0;
+  Standard_Integer nblines = 0, pit = 0, i = 0, j = 0;
+  Standard_Real aTol = NAN;
   TColStd_Array1OfListOfInteger anArrayOfLines(1, aNbPnts); 
   TColStd_Array1OfInteger       anArrayOfLineType(1, aNbPnts);
   TColStd_ListOfInteger aListOfPointIndex;
@@ -484,10 +486,10 @@ Standard_Boolean IntTools_WLineTool::
   //
   // Points
   for(pit = 1; pit <= aNbPnts; ++pit) {
-    Standard_Boolean bIsOnFirstBoundary, isperiodic;
-    Standard_Real aResolution, aPeriod, alowerboundary, aupperboundary, U, V;
-    Standard_Real aParameter, anoffset, anAdjustPar;
-    Standard_Real umin, umax, vmin, vmax;
+    Standard_Boolean bIsOnFirstBoundary = 0, isperiodic = 0;
+    Standard_Real aResolution = NAN, aPeriod = NAN, alowerboundary = NAN, aupperboundary = NAN, U = NAN, V = NAN;
+    Standard_Real aParameter = NAN, anoffset = NAN, anAdjustPar = NAN;
+    Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
     //
     bIsCurrentPointOnBoundary = Standard_False;
     const IntSurf_PntOn2S& aPoint = theWLine->Point(pit);
@@ -647,7 +649,7 @@ Standard_Boolean IntTools_WLineTool::
           }
           else {
             Standard_Real aPeriod     = (parit == 0) ? aGASurface->UPeriod() : aGASurface->VPeriod();
-            Standard_Real anoffset, anAdjustPar;
+            Standard_Real anoffset = NAN, anAdjustPar = NAN;
             GeomInt::AdjustPeriodic(aParameter, alowerboundary, aupperboundary,
                                            aPeriod, anAdjustPar, anoffset);
 
@@ -686,7 +688,7 @@ Standard_Boolean IntTools_WLineTool::
             Standard_Real aupperboundary = (bIsUBoundary) ? umax : vmax;
             Standard_Real aPeriod     = (bIsUBoundary) ? aGASurface->UPeriod() : aGASurface->VPeriod();
             Standard_Real aParameter = (bIsUBoundary) ? U : V;
-            Standard_Real anoffset, anAdjustPar;
+            Standard_Real anoffset = NAN, anAdjustPar = NAN;
             GeomInt::AdjustPeriodic(aParameter, alowerboundary, aupperboundary, 
                                            aPeriod, anAdjustPar, anoffset);
 
@@ -695,7 +697,7 @@ Standard_Boolean IntTools_WLineTool::
             anotherPar += anoffset;
             Standard_Integer aneighbourpointindex = (j == 0) ? aListOfIndex.First() : aListOfIndex.Last();
             const IntSurf_PntOn2S& aNeighbourPoint = theWLine->Point(aneighbourpointindex);
-            Standard_Real nU1, nV1;
+            Standard_Real nU1 = NAN, nV1 = NAN;
 
             if(surfit == 0)
               aNeighbourPoint.ParametersOnS1(nU1, nV1);
@@ -737,7 +739,7 @@ Standard_Boolean IntTools_WLineTool::
               while((anindexother <= iLast) && (anindexother >= iFirst)) {
                 anindexother = (j == 0) ? (anindexother + 1) : (anindexother - 1);
                 const IntSurf_PntOn2S& aPrevNeighbourPoint = theWLine->Point(anindexother);
-                Standard_Real nU2, nV2;
+                Standard_Real nU2 = NAN, nV2 = NAN;
                 
                 if(surfit == 0)
                   aPrevNeighbourPoint.ParametersOnS1(nU2, nV2);
@@ -754,7 +756,7 @@ Standard_Boolean IntTools_WLineTool::
                   if((fabs(anAngle) < (M_PI * 0.25)) && (aNewVec.Dot(aVecOld) > 0.)) {
 
                     if(bCheckAngle1) {
-                      Standard_Real U1, U2, V1, V2;
+                      Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
                       IntSurf_PntOn2S atmppoint = aNewP;
                       atmppoint.SetValue((surfit == 0), anewU, anewV);
                       atmppoint.Parameters(U1, V1, U2, V2);
@@ -791,7 +793,7 @@ Standard_Boolean IntTools_WLineTool::
 
           if ( bIsNearBoundary ) {
             // re-compute point near natural boundary or near tangent zone
-            Standard_Real u1, v1, u2, v2;
+            Standard_Real u1 = NAN, v1 = NAN, u2 = NAN, v2 = NAN;
             aNewP.Parameters( u1, v1, u2, v2 );
             if(surfit == 0)
               anewpoint = gp_Pnt2d( u1, v1 );
@@ -800,7 +802,7 @@ Standard_Boolean IntTools_WLineTool::
             
             Standard_Integer aneighbourpointindex1 = (j == 0) ? iFirst : iLast;
             const IntSurf_PntOn2S& aNeighbourPoint = theWLine->Point(aneighbourpointindex1);
-            Standard_Real nU1, nV1;
+            Standard_Real nU1 = NAN, nV1 = NAN;
             
             if(surfit == 0)
               aNeighbourPoint.ParametersOnS1(nU1, nV1);
@@ -827,7 +829,7 @@ Standard_Boolean IntTools_WLineTool::
 
             Standard_Integer aneighbourpointindex1 = (j == 0) ? iFirst : iLast;
             const IntSurf_PntOn2S& aNeighbourPoint = theWLine->Point(aneighbourpointindex1);
-            Standard_Real nU1, nV1;
+            Standard_Real nU1 = NAN, nV1 = NAN;
 
             if(surfit == 0)
               aNeighbourPoint.ParametersOnS1(nU1, nV1);
@@ -840,7 +842,7 @@ Standard_Boolean IntTools_WLineTool::
             while((aneighbourpointindex2 <= iLast) && (aneighbourpointindex2 >= iFirst)) {
               aneighbourpointindex2 = (j == 0) ? (aneighbourpointindex2 + 1) : (aneighbourpointindex2 - 1);
               const IntSurf_PntOn2S& aPrevNeighbourPoint = theWLine->Point(aneighbourpointindex2);
-              Standard_Real nU2, nV2;
+              Standard_Real nU2 = NAN, nV2 = NAN;
 
               if(surfit == 0)
                 aPrevNeighbourPoint.ParametersOnS1(nU2, nV2);
@@ -877,7 +879,7 @@ Standard_Boolean IntTools_WLineTool::
                 //Note, it may be shifted on a period
                 Standard_Integer aneindex1 = (j == 0) ? iFirst : iLast;
                 const IntSurf_PntOn2S& aNeighbourPoint = theWLine->Point(aneindex1);
-                Standard_Real nUn, nVn;
+                Standard_Real nUn = NAN, nVn = NAN;
                 
                 if(surfit == 0)
                   aNeighbourPoint.ParametersOnS2(nUn, nVn);
@@ -930,7 +932,7 @@ Standard_Boolean IntTools_WLineTool::
   // Correct wlines.end
 
   // Split wlines.begin
-  Standard_Integer nbiter;
+  Standard_Integer nbiter = 0;
   //
   nbiter=1;
   if (!bAvoidLineConstructor) {
@@ -938,8 +940,8 @@ Standard_Boolean IntTools_WLineTool::
   }
   //
   for(j = 1; j <= nbiter; ++j) {
-    Standard_Real fprm, lprm;
-    Standard_Integer ifprm, ilprm;
+    Standard_Real fprm = NAN, lprm = NAN;
+    Standard_Integer ifprm = 0, ilprm = 0;
     //
     if(bAvoidLineConstructor) {
       ifprm = 1;
index bc32b6a9edb8d4c41be79a716800893d74f8ebbc..85cc24f4ad71815aa50f5dac9d418c6f043cfb8f 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Adaptor3d_HSurfaceTool.hxx>
 #include <Extrema_GenLocateExtPS.hxx>
@@ -136,7 +138,7 @@ static void IsParallel(const Handle(IntSurf_LineOn2S)& theLine,
     if (aNPoint > aNbLinePnts)
       aNPoint = aNbLinePnts;
 
-    Standard_Real u, v;
+    Standard_Real u = NAN, v = NAN;
     if(theCheckSurf1)
       theLine->Value(RealToInt(aNPoint)).ParametersOnS1(u, v);
     else
@@ -206,10 +208,9 @@ tgfirst(Standard_False),
 tglast(Standard_False),
 myTangentIdx(0),
 fleche(Deflection),
-pasMax(0.0),
-tolconf(Epsilon),
+pasMax(Increment*0.2), tolconf(Epsilon),
 myTolTang(TolTangency),
-sensCheminement(1),
+Um1(Adaptor3d_HSurfaceTool::FirstUParameter(Caro1)), UM1(Adaptor3d_HSurfaceTool::LastUParameter(Caro1)), Vm1(Adaptor3d_HSurfaceTool::FirstVParameter(Caro1)), VM1(Adaptor3d_HSurfaceTool::LastVParameter(Caro1)), Um2(Adaptor3d_HSurfaceTool::FirstUParameter(Caro2)), UM2(Adaptor3d_HSurfaceTool::LastUParameter(Caro2)), Vm2(Adaptor3d_HSurfaceTool::FirstVParameter(Caro2)), VM2(Adaptor3d_HSurfaceTool::LastVParameter(Caro2)), ResoU1(Adaptor3d_HSurfaceTool::UResolution(Caro1,Precision::Confusion())), ResoU2(Adaptor3d_HSurfaceTool::UResolution(Caro2,Precision::Confusion())), ResoV1(Adaptor3d_HSurfaceTool::VResolution(Caro1,Precision::Confusion())), ResoV2(Adaptor3d_HSurfaceTool::VResolution(Caro2,Precision::Confusion())), sensCheminement(1),
 previoustg(Standard_False),
 myIntersectionOn2S(Caro1,Caro2,TolTangency),
 STATIC_BLOCAGE_SUR_PAS_TROP_GRAND(0),
@@ -217,26 +218,26 @@ STATIC_PRECEDENT_INFLEXION(0)
 {
   Standard_Real KELARG=20.;
   //
-  pasMax=Increment*0.2; //-- June 25 99 after problems with precision 
-  Um1 = Adaptor3d_HSurfaceTool::FirstUParameter(Caro1);
-  Vm1 = Adaptor3d_HSurfaceTool::FirstVParameter(Caro1);
-  UM1 = Adaptor3d_HSurfaceTool::LastUParameter(Caro1);
-  VM1 = Adaptor3d_HSurfaceTool::LastVParameter(Caro1);
-
-  Um2 = Adaptor3d_HSurfaceTool::FirstUParameter(Caro2);
-  Vm2 = Adaptor3d_HSurfaceTool::FirstVParameter(Caro2);
-  UM2 = Adaptor3d_HSurfaceTool::LastUParameter(Caro2);
-  VM2 = Adaptor3d_HSurfaceTool::LastVParameter(Caro2);
-
-  ResoU1 = Adaptor3d_HSurfaceTool::UResolution(Caro1,Precision::Confusion());
-  ResoV1 = Adaptor3d_HSurfaceTool::VResolution(Caro1,Precision::Confusion());
-
-  ResoU2 = Adaptor3d_HSurfaceTool::UResolution(Caro2,Precision::Confusion());
-  ResoV2 = Adaptor3d_HSurfaceTool::VResolution(Caro2,Precision::Confusion());
-
-  Standard_Real NEWRESO;
-  Standard_Real MAXVAL;
-  Standard_Real MAXVAL2;
+  //-- June 25 99 after problems with precision 
+  
+  
+  
+  
+
+  
+  
+  
+  
+
+  
+  
+
+  
+  
+
+  Standard_Real NEWRESO = NAN;
+  Standard_Real MAXVAL = NAN;
+  Standard_Real MAXVAL2 = NAN;
   //
   MAXVAL  = Abs(Um1);  MAXVAL2 = Abs(UM1);
   if(MAXVAL2 > MAXVAL) MAXVAL = MAXVAL2;
@@ -354,34 +355,34 @@ IntWalk_PWalking::IntWalk_PWalking(const Handle(Adaptor3d_Surface)& Caro1,
 done(Standard_True),
 close(Standard_False),
 fleche(Deflection),
-tolconf(Epsilon),
+pasMax(Increment*0.2), tolconf(Epsilon),
 myTolTang(TolTangency),
-sensCheminement(1),
+Um1(Adaptor3d_HSurfaceTool::FirstUParameter(Caro1)), UM1(Adaptor3d_HSurfaceTool::LastUParameter(Caro1)), Vm1(Adaptor3d_HSurfaceTool::FirstVParameter(Caro1)), VM1(Adaptor3d_HSurfaceTool::LastVParameter(Caro1)), Um2(Adaptor3d_HSurfaceTool::FirstUParameter(Caro2)), UM2(Adaptor3d_HSurfaceTool::LastUParameter(Caro2)), Vm2(Adaptor3d_HSurfaceTool::FirstVParameter(Caro2)), VM2(Adaptor3d_HSurfaceTool::LastVParameter(Caro2)), ResoU1(Adaptor3d_HSurfaceTool::UResolution(Caro1,Precision::Confusion())), ResoU2(Adaptor3d_HSurfaceTool::UResolution(Caro2,Precision::Confusion())), ResoV1(Adaptor3d_HSurfaceTool::VResolution(Caro1,Precision::Confusion())), ResoV2(Adaptor3d_HSurfaceTool::VResolution(Caro2,Precision::Confusion())), sensCheminement(1),
 myIntersectionOn2S(Caro1,Caro2,TolTangency),
 STATIC_BLOCAGE_SUR_PAS_TROP_GRAND(0),
 STATIC_PRECEDENT_INFLEXION(0)
 {
   Standard_Real KELARG=20.;
   //
-  pasMax=Increment*0.2; //-- June 25 99 after problems with precision 
+  //-- June 25 99 after problems with precision 
   //
-  Um1 = Adaptor3d_HSurfaceTool::FirstUParameter(Caro1);
-  Vm1 = Adaptor3d_HSurfaceTool::FirstVParameter(Caro1);
-  UM1 = Adaptor3d_HSurfaceTool::LastUParameter(Caro1);
-  VM1 = Adaptor3d_HSurfaceTool::LastVParameter(Caro1);
+  
+  
+  
+  
 
-  Um2 = Adaptor3d_HSurfaceTool::FirstUParameter(Caro2);
-  Vm2 = Adaptor3d_HSurfaceTool::FirstVParameter(Caro2);
-  UM2 = Adaptor3d_HSurfaceTool::LastUParameter(Caro2);
-  VM2 = Adaptor3d_HSurfaceTool::LastVParameter(Caro2);
+  
+  
+  
+  
 
-  ResoU1 = Adaptor3d_HSurfaceTool::UResolution(Caro1,Precision::Confusion());
-  ResoV1 = Adaptor3d_HSurfaceTool::VResolution(Caro1,Precision::Confusion());
+  
+  
 
-  ResoU2 = Adaptor3d_HSurfaceTool::UResolution(Caro2,Precision::Confusion());
-  ResoV2 = Adaptor3d_HSurfaceTool::VResolution(Caro2,Precision::Confusion());
+  
+  
   //
-  Standard_Real NEWRESO, MAXVAL, MAXVAL2;
+  Standard_Real NEWRESO = NAN, MAXVAL = NAN, MAXVAL2 = NAN;
   //
   MAXVAL  = Abs(Um1);  
   MAXVAL2 = Abs(UM1);
@@ -517,7 +518,7 @@ Standard_Boolean IntWalk_PWalking::PerformFirstPoint  (const TColStd_Array1OfRea
   sensCheminement = 1;
   close = Standard_False;
   //
-  Standard_Integer i;
+  Standard_Integer i = 0;
   TColStd_Array1OfReal Param(1,4);
   //
   for (i=1; i<=4; ++i) {
@@ -720,9 +721,9 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
     return;
   }
   //
-  Standard_Boolean Arrive, DejaReparti;
+  Standard_Boolean Arrive = 0, DejaReparti = 0;
   const Standard_Integer RejectIndexMAX = 250000;
-  Standard_Integer IncKey, RejectIndex;
+  Standard_Integer IncKey = 0, RejectIndex = 0;
   gp_Pnt pf,pl;
   //
   DejaReparti = Standard_False;
@@ -757,7 +758,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
   //
   IntWalk_StatusDeflection aStatus = IntWalk_OK, aPrevStatus = IntWalk_OK;
   Standard_Boolean NoTestDeflection = Standard_False;
-  Standard_Real SvParam[4], f;
+  Standard_Real SvParam[4], f = NAN;
   Standard_Integer LevelOfEmptyInmyIntersectionOn2S=0;
   Standard_Integer LevelOfPointConfondu = 0; 
   Standard_Integer LevelOfIterWithoutAppend = -1;
@@ -803,7 +804,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
     previousPoint.Parameters(Param(1),Param(2),Param(3),Param(4));
     //
     //--ofv.begin
-    Standard_Real aIncKey, aEps, dP1, dP2, dP3, dP4;
+    Standard_Real aIncKey = NAN, aEps = NAN, dP1 = NAN, dP2 = NAN, dP3 = NAN, dP4 = NAN;
     //
     dP1 = sensCheminement * pasuv[0] * previousd1.X() /f;
     dP2 = sensCheminement * pasuv[1] * previousd1.Y() /f;
@@ -917,7 +918,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
       //== Calculation of exact point from Param(.) is possible
       if (myIntersectionOn2S.IsEmpty())
       {
-        Standard_Real u1,v1,u2,v2;
+        Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
         previousPoint.Parameters(u1,v1,u2,v2);
         //
         Arrive = Standard_False;
@@ -1006,8 +1007,8 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
           if(NbPasOKConseq >= 5)
           {
             NbPasOKConseq=0;
-            Standard_Boolean pastroppetit;
-            Standard_Real t;
+            Standard_Boolean pastroppetit = 0;
+            Standard_Real t = NAN;
             //
             do
             {
@@ -1126,7 +1127,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
 
             if(LevelOfPointConfondu>5)
             {
-              Standard_Boolean pastroppetit;
+              Standard_Boolean pastroppetit = 0;
               //
               do
               {
@@ -1233,7 +1234,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
               //== Check on the current point of myInters
               Standard_Boolean pointisvalid = Standard_False;
               {
-                Standard_Real u1,v1,u2,v2
+                Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN
                 myIntersectionOn2S.Point().Parameters(u1,v1,u2,v2);
 
                 //
@@ -1260,7 +1261,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
                 //=====================================================
                 //== Check on the previous Point
                 {
-                  Standard_Real u1,v1,u2,v2;
+                  Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
                   previousPoint.Parameters(u1,v1,u2,v2); 
                   if( u1 <= UM1  && u2 <= UM2 && v1 <= VM1 &&
                     v2 <= VM2  && u1 >= Um1 && u2 >= Um2 &&
@@ -1428,7 +1429,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
                     //== Check on PreviousPoint @@
 
                     {
-                      Standard_Real u1,v1,u2,v2;
+                      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
                       previousPoint.Parameters(u1,v1,u2,v2);
 
                       //To save initial 2d points
@@ -1443,7 +1444,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
                       //
 
                       //xf
-                      Standard_Boolean bFlag1, bFlag2;
+                      Standard_Boolean bFlag1 = 0, bFlag2 = 0;
                       Standard_Real aTol2D=1.e-11;
                       //
                       bFlag1=u1 >= Um1-aTol2D && v1 >= Vm1-aTol2D && u1 <= UM1+aTol2D && v1 <= VM1+aTol2D;
@@ -1453,9 +1454,9 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
                         if (line->NbPoints() > 1)
                         {
                           IntSurf_PntOn2S prevprevPoint = line->Value(line->NbPoints()-1);
-                          Standard_Real ppU1, ppV1, ppU2, ppV2;
+                          Standard_Real ppU1 = NAN, ppV1 = NAN, ppU2 = NAN, ppV2 = NAN;
                           prevprevPoint.Parameters(ppU1, ppV1, ppU2, ppV2);
-                          Standard_Real pU1, pV1, pU2, pV2;
+                          Standard_Real pU1 = NAN, pV1 = NAN, pU2 = NAN, pV2 = NAN;
                           previousPointSave.Parameters(pU1, pV1, pU2, pV2);
                           gp_Vec2d V1onS1(gp_Pnt2d(ppU1, ppV1), gp_Pnt2d(pU1, pV1));
                           gp_Vec2d V2onS1(gp_Pnt2d(pU1, pV1), gp_Pnt2d(u1, v1));
@@ -1504,7 +1505,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
                           //There are three consecutive points:
                           //previousPointSave -> ParamPnt -> curPnt.
 
-                          Standard_Real prevU1, prevV1, prevU2, prevV2;
+                          Standard_Real prevU1 = NAN, prevV1 = NAN, prevU2 = NAN, prevV2 = NAN;
                           previousPointSave.Parameters(prevU1, prevV1, prevU2, prevV2);
                           gp_Pnt2d prevPntOnS1(prevU1, prevV1), prevPntOnS2(prevU2, prevV2);
                           gp_Pnt2d curPntOnS1(u1, v1), curPntOnS2(u2, v2);
@@ -1863,9 +1864,9 @@ Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(const IntImp_ConstIsop
 
           //
           if(!bStop) {
-            Standard_Real u11,v11,u12,v12
+            Standard_Real u11 = NAN,v11 = NAN,u12 = NAN,v12 = NAN
             myIntersectionOn2S.Point().Parameters(u11,v11,u12,v12); 
-            Standard_Real u21,v21,u22,v22;
+            Standard_Real u21 = NAN,v21 = NAN,u22 = NAN,v22 = NAN;
             previousPoint.Parameters(u21,v21,u22,v22); 
 
             if(((fabs(u11-u21) < ResoU1) && (fabs(v11-v21) < ResoV1)) ||
@@ -1883,7 +1884,7 @@ Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(const IntImp_ConstIsop
 
           if(!bStop) {
             Standard_Boolean pointisvalid = Standard_False;
-            Standard_Real u1,v1,u2,v2
+            Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN
             myIntersectionOn2S.Point().Parameters(u1,v1,u2,v2); 
 
             if(u1 <= UM1  && u2 <= UM2 && v1 <= VM1 && 
@@ -1962,7 +1963,7 @@ Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(const IntImp_ConstIsop
                 Standard_Boolean pointisvalid = Standard_False;
 
                 previousPoint = myIntersectionOn2S.Point();
-                Standard_Real u1,v1,u2,v2
+                Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN
                 previousPoint.Parameters(u1,v1,u2,v2); 
 
                 if(u1 <= UM1  && u2 <= UM2 && v1 <= VM1 && 
@@ -2374,10 +2375,10 @@ Standard_Boolean IntWalk_PWalking::HandleSingleSingularPoint(const Handle(Adapto
       gp_Pnt aP;
       gp_Vec aDU, aDV;
       gp_Pnt aPInt;
-      Standard_Integer k;
+      Standard_Integer k = 0;
       for (k = 0; k < 2; ++k)
       {
-        Standard_Integer iu, iv;
+        Standard_Integer iu = 0, iv = 0;
         iu = 2*k;
         iv = iu + 1;
         aSurfs[k]->D1(aPars[iu], aPars[iv], aPInt, aDU, aDV);
@@ -2418,7 +2419,7 @@ Standard_Boolean IntWalk_PWalking::HandleSingleSingularPoint(const Handle(Adapto
       }
       //
       //
-      Standard_Integer j;
+      Standard_Integer j = 0;
       for (j = 1; j <= 4; ++j)
       {
         thePnt(j) = aPars[j - 1];
@@ -2704,7 +2705,7 @@ PutToBoundary(const Handle(Adaptor3d_Surface)& theASurf1,
   IsParallel(line, Standard_True, aTol, isU1parallel, isV1parallel);
   IsParallel(line, Standard_False, aTol, isU2parallel, isV2parallel);
 
-  Standard_Real u1, v1, u2, v2;
+  Standard_Real u1 = NAN, v1 = NAN, u2 = NAN, v2 = NAN;
   line->Value(1).Parameters(u1, v1, u2, v2);
   Standard_Real aDelta = 0.0;
 
@@ -2916,8 +2917,8 @@ SeekAdditionalPoints( const Handle(Adaptor3d_Surface)& theASurf1,
     aNbPointsPrev = aNbPoints;
     for(Standard_Integer fp = 1, lp = 2; fp < aNbPoints; fp = lp + 1)
     {
-      Standard_Real U1f, V1f, U2f, V2f; //first point in 1st and 2nd surafaces
-      Standard_Real U1l, V1l, U2l, V2l; //last  point in 1st and 2nd surafaces
+      Standard_Real U1f = NAN, V1f = NAN, U2f = NAN, V2f = NAN; //first point in 1st and 2nd surafaces
+      Standard_Real U1l = NAN, V1l = NAN, U2l = NAN, V2l = NAN; //last  point in 1st and 2nd surafaces
 
       lp = fp+1;
       line->Value(fp).Parameters(U1f, V1f, U2f, V2f);
@@ -3038,8 +3039,8 @@ RepartirOuDiviser(Standard_Boolean& DejaReparti,
       pasuv[2]=pasSav[2];
       pasuv[3]=pasSav[3];
 #else 
-      Standard_Real u1,v1,u2,v2;
-      Standard_Real U1,V1,U2,V2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
+      Standard_Real U1 = NAN,V1 = NAN,U2 = NAN,V2 = NAN;
       Standard_Integer nn=line->NbPoints();
       if(nn>2) { 
         line->Value(nn).Parameters(u1,v1,u2,v2);
@@ -3088,8 +3089,8 @@ RepartirOuDiviser(Standard_Boolean& DejaReparti,
           pasuv[2]=pasSav[2];
           pasuv[3]=pasSav[3];
 #else 
-          Standard_Real u1,v1,u2,v2;
-          Standard_Real U1,V1,U2,V2;
+          Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
+          Standard_Real U1 = NAN,V1 = NAN,U2 = NAN,V2 = NAN;
           Standard_Integer nn=line->NbPoints();
           if(nn>2) { 
             line->Value(nn).Parameters(u1,v1,u2,v2);
@@ -3141,7 +3142,7 @@ IntWalk_StatusDeflection  IntWalk_PWalking::TestDeflection(const IntImp_ConstIso
   }
 
   IntWalk_StatusDeflection aStatus = IntWalk_OK;
-  Standard_Real FlecheCourante , Ratio = 1.0;
+  Standard_Real FlecheCourante = NAN , Ratio = 1.0;
 
   // Caro1 and Caro2
   const Handle(Adaptor3d_Surface)& Caro1 = myIntersectionOn2S.Function().AuxillarSurface1();
@@ -3208,7 +3209,7 @@ IntWalk_StatusDeflection  IntWalk_PWalking::TestDeflection(const IntImp_ConstIso
     //Compute local resolution: for OCC26717
     if (Abs(pasuv[choixIso] - pasInit[choixIso]) <= Precision::Confusion())
     {
-      Standard_Real CurU, CurV;
+      Standard_Real CurU = NAN, CurV = NAN;
       if (choixIso == IntImp_UIsoparametricOnCaro1 ||
           choixIso == IntImp_VIsoparametricOnCaro1)
         previousPoint.ParametersOnS1(CurU, CurV);
@@ -3259,8 +3260,8 @@ IntWalk_StatusDeflection  IntWalk_PWalking::TestDeflection(const IntImp_ConstIso
   }
 
   //==================================================================================
-  Standard_Real Up1,Vp1,Uc1,Vc1,Du1,Dv1,AbsDu1,AbsDu2,AbsDv1,AbsDv2;
-  Standard_Real Up2,Vp2,Uc2,Vc2,Du2,Dv2;
+  Standard_Real Up1 = NAN,Vp1 = NAN,Uc1 = NAN,Vc1 = NAN,Du1 = NAN,Dv1 = NAN,AbsDu1 = NAN,AbsDu2 = NAN,AbsDv1 = NAN,AbsDv2 = NAN;
+  Standard_Real Up2 = NAN,Vp2 = NAN,Uc2 = NAN,Vc2 = NAN,Du2 = NAN,Dv2 = NAN;
 
   previousPoint.Parameters(Up1,Vp1,Up2,Vp2);
   CurrentPoint.Parameters(Uc1,Vc1,Uc2,Vc2);               
@@ -3289,8 +3290,8 @@ IntWalk_StatusDeflection  IntWalk_PWalking::TestDeflection(const IntImp_ConstIso
     ResoV2 < Precision::PConfusion() )
     tolArea =  tolArea*2.0;
 
-  Standard_Real Cosi1, CosRef1, Ang1, AngRef1, ResoUV1, Duv1, d1, tolCoeff1;   
-  Standard_Real Cosi2, CosRef2, Ang2, AngRef2, ResoUV2, Duv2, d2, tolCoeff2;   
+  Standard_Real Cosi1 = NAN, CosRef1 = NAN, Ang1 = NAN, AngRef1 = NAN, ResoUV1 = NAN, Duv1 = NAN, d1 = NAN, tolCoeff1 = NAN;   
+  Standard_Real Cosi2 = NAN, CosRef2 = NAN, Ang2 = NAN, AngRef2 = NAN, ResoUV2 = NAN, Duv2 = NAN, d2 = NAN, tolCoeff2 = NAN;   
   Cosi1 = Du1*previousd1.X() + Dv1*previousd1.Y();
   Cosi2 = Du2*previousd2.X() + Dv2*previousd2.Y();
   Duv1 = Du1*Du1 + Dv1*Dv1;
@@ -3402,7 +3403,7 @@ IntWalk_StatusDeflection  IntWalk_PWalking::TestDeflection(const IntImp_ConstIso
     if(pasuv[2]<ResoU2) pasuv[2]=ResoU2;
     if(pasuv[3]<ResoV2) pasuv[3]=ResoV2;
     //-- if(Ratio>10.0 ) { Ratio=10.0; } 
-    Standard_Real R1,R = pasInit[0]/pasuv[0];
+    Standard_Real R1 = NAN,R = pasInit[0]/pasuv[0];
     R1= pasInit[1]/pasuv[1];     if(R1<R) R=R1;
     R1= pasInit[2]/pasuv[2];     if(R1<R) R=R1;
     R1= pasInit[3]/pasuv[3];     if(R1<R) R=R1;
@@ -3566,8 +3567,8 @@ TestArret(const Standard_Boolean DejaReparti,
           // otherwise test if closed line is present  
           // 
 {
-  Standard_Real Uvd[4],Uvf[4],Epsuv[4],Duv[4],Uvp[4],dv,dv2,ParC[4];
-  Standard_Real DPc,DPb;
+  Standard_Real Uvd[4],Uvf[4],Epsuv[4],Duv[4],Uvp[4],dv = NAN,dv2 = NAN,ParC[4];
+  Standard_Real DPc = NAN,DPb = NAN;
   Standard_Integer i = 0, k = 0;
   Epsuv[0] = ResoU1;
   Epsuv[1] = ResoV1;
@@ -3583,7 +3584,7 @@ TestArret(const Standard_Boolean DejaReparti,
   Uvd[0]=Um1;   Uvf[0]=UM1;   Uvd[1]=Vm1;   Uvf[1]=VM1;
   Uvd[2]=Um2;   Uvf[2]=UM2;   Uvd[3]=Vm2;   Uvf[3]=VM2;
 
-  Standard_Integer im1;
+  Standard_Integer im1 = 0;
   for ( i = 1,im1 = 0;i<=4;i++,im1++) {
     switch(i) { 
     case 1: k=2; break;
@@ -3671,7 +3672,7 @@ TestArret(const Standard_Boolean DejaReparti,
   {  
     if (!DejaReparti) { // find if line closed
 
-      Standard_Real u,v;
+      Standard_Real u = NAN,v = NAN;
       const IntSurf_PntOn2S& POn2S1=line->Value(1);
       //On S1
       POn2S1.ParametersOnS1(u,v);
index d2442ad0ff2f414ebacb3f5f0fb3775af55ae622..716fd83a189c506f7930d055440c3b2e6aa55ea9 100644 (file)
@@ -27,6 +27,7 @@
 #include <IntWalk_StatusDeflection.hxx>
 
 class gp_Pnt;
+class IntSurf_LineOn2S;
 
 //! This class implements an algorithm to determine the
 //! intersection between 2 parametrized surfaces, marching from
@@ -248,12 +249,12 @@ private:
   Standard_Boolean done;
   Handle(IntSurf_LineOn2S) line;
   Standard_Boolean close;
-  Standard_Boolean tgfirst;
-  Standard_Boolean tglast;
+  Standard_Boolean tgfirst{};
+  Standard_Boolean tglast{};
 
   //! Index of point on the surface boundary.
   //! It is used for transition computation
-  Standard_Integer myTangentIdx;
+  Standard_Integer myTangentIdx{};
 
   //! Tangent to WLine in the point with index myTangentIdx
   gp_Dir tgdir;
@@ -262,10 +263,10 @@ private:
   Standard_Real pasMax;
   Standard_Real tolconf;
   Standard_Real myTolTang;
-  Standard_Real pasuv[4];
-  Standard_Real myStepMin[4];
-  Standard_Real pasSav[4];
-  Standard_Real pasInit[4];
+  Standard_Real pasuv[4]{};
+  Standard_Real myStepMin[4]{};
+  Standard_Real pasSav[4]{};
+  Standard_Real pasInit[4]{};
   Standard_Real Um1;
   Standard_Real UM1;
   Standard_Real Vm1;
@@ -281,7 +282,7 @@ private:
   Standard_Integer sensCheminement;
   IntImp_ConstIsoparametric choixIsoSav;
   IntSurf_PntOn2S previousPoint;
-  Standard_Boolean previoustg;
+  Standard_Boolean previoustg{};
   gp_Dir previousd;
   gp_Dir2d previousd1;
   gp_Dir2d previousd2;
index 10af42ec9eca8ba6e730bd93150740c9fe0c13d3..0d8a719344cd4631fb0cd375b06e1fc7d864d049 100644 (file)
@@ -70,7 +70,7 @@ void  Interface_BitMap::Reservate (const Standard_Integer moreflags)
   if (nbflags >= thenbflags + moreflags) return;
   Standard_Integer nbw = thenbwords * (thenbflags+moreflags+2);
   Handle(TColStd_HArray1OfInteger) flags = new TColStd_HArray1OfInteger(0,nbw);
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 0; i <= nb; i ++)
     flags->SetValue (i,theflags->Value(i));
   for (i = nb+1; i <= nbw; i ++) flags->SetValue (i,0);
@@ -104,7 +104,7 @@ Standard_Integer  Interface_BitMap::AddFlag (const Standard_CString name)
   Standard_Integer deja = 0;
   if (thenames.IsNull()) thenames = new TColStd_HSequenceOfAsciiString();
   else {
-    Standard_Integer i, nb = thenames->Length();
+    Standard_Integer i = 0, nb = thenames->Length();
     for (i = 1; i <= nb; i ++) {
       if (thenames->Value(i).IsEqual("."))
       {  thenames->ChangeValue(i).AssignCat(name);  deja = i;  }
@@ -165,7 +165,7 @@ Standard_Integer  Interface_BitMap::FlagNumber
 {
   if (name[0] == '\0') return 0;
   if (thenames.IsNull()) return 0;
-  Standard_Integer i, nb = thenames->Length();
+  Standard_Integer i = 0, nb = thenames->Length();
   for (i = 1; i <= nb; i ++)
     if (thenames->Value(i).IsEqual(name)) return i;
   return 0;
@@ -217,7 +217,7 @@ Standard_Boolean  Interface_BitMap::CTrue
   Standard_Integer numw = (thenbwords * flag) + (item >> 5);
   Standard_Integer numb = item & 31;
   Standard_Integer& val = theflags->ChangeValue (numw);
-  Standard_Integer  res, mot = (1 << numb);
+  Standard_Integer  res = 0, mot = (1 << numb);
 
   if (val == 0)  {  val = mot;  return Standard_False;  }
   else           {  res = val & mot;  val |= mot;  }
@@ -230,7 +230,7 @@ Standard_Boolean  Interface_BitMap::CFalse
   Standard_Integer numw = (thenbwords * flag) + (item >> 5);
   Standard_Integer numb = item & 31;
   Standard_Integer& val = theflags->ChangeValue (numw);
-  Standard_Integer  res, mot = ~(1 << numb);
+  Standard_Integer  res = 0, mot = ~(1 << numb);
 
   if (val == ~(0))  {  val = mot;  return Standard_False;  }
   else              {  res = val | mot;  val &= mot;  }
@@ -241,7 +241,7 @@ Standard_Boolean  Interface_BitMap::CFalse
 void  Interface_BitMap::Init
 (const Standard_Boolean val, const Standard_Integer flag) const
 {
-  Standard_Integer i, ii = thenbwords, i1 = thenbwords *flag;
+  Standard_Integer i = 0, ii = thenbwords, i1 = thenbwords *flag;
   if (flag < 0)  {  i1 = 0;  ii = thenbwords*(thenbflags+1);  }
   if (val)  for (i = 0; i < ii; i ++) theflags->SetValue (i1+i,~(0));
   else      for (i = 0; i < ii; i ++) theflags->SetValue (i1+i,  0 );
index fd21c3f588fc56ae68f9f975fbab80c62db3591e..0d163774967f78de0581842607f406b8cae2425b 100644 (file)
@@ -149,9 +149,9 @@ private:
 
 
 
-  Standard_Integer thenbitems;
-  Standard_Integer thenbwords;
-  Standard_Integer thenbflags;
+  Standard_Integer thenbitems{};
+  Standard_Integer thenbwords{};
+  Standard_Integer thenbflags{};
   Handle(TColStd_HArray1OfInteger) theflags;
   Handle(TColStd_HSequenceOfAsciiString) thenames;
 
index 05c3060aac18dc09cc7f1738cc1bd7586743d875..4c3a1af709ba3683f8b3ddbecb563c1b6b777616 100644 (file)
@@ -38,7 +38,7 @@ Standard_Integer Interface_Category::CatNum
    const Interface_ShareTool& theShares)
 {
   if (theEnt.IsNull()) return 0;
-  Standard_Integer CN;
+  Standard_Integer CN = 0;
   Handle(Interface_GeneralModule) aModule;
   if (!myGTool->Select (theEnt,aModule,CN)) return 0;
   return aModule->CategoryNumber (CN,theEnt,theShares);
@@ -50,7 +50,7 @@ void Interface_Category::Compute
 {
   ClearNums();
   if (theModel.IsNull()) return;
-  Standard_Integer CN, i, nb = theModel->NbEntities();
+  Standard_Integer CN = 0, i = 0, nb = theModel->NbEntities();
   myGTool->Reservate (nb);
   if (nb == 0) return;
   myNum = new TColStd_HArray1OfInteger (1,nb);  myNum->Init(0);
@@ -94,7 +94,7 @@ Standard_CString Interface_Category::Name (const Standard_Integer theNum)
 
 Standard_Integer Interface_Category::Number (const Standard_CString theName)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = theCats().Lower(); i <= theCats().Upper(); i ++) {
     if (theCats().ChangeValue(i).IsEqual(theName)) return i;
   }
index b6ff1aff343402b74954d158c6719c0c13de09c4..576d9a4d661ac621be78d1b4ee6b19fec0106363 100644 (file)
@@ -39,9 +39,9 @@ Interface_Check::Interface_Check()
 //purpose  : 
 //=======================================================================
 
-Interface_Check::Interface_Check(const Handle(Standard_Transient)& anentity)
+Interface_Check::Interface_Check(const Handle(Standard_Transient)& anentity) : theent(anentity)
 {
-  theent = anentity;
+  
 }
 
 // ....      Ajout de message d Erreur vraie (Fail)
@@ -421,7 +421,7 @@ Standard_Boolean Interface_Check::Complies(const Handle(TCollection_HAsciiString
   if (mess.IsNull()) return Standard_False;
   Standard_Integer lng = mess->Length();
   if (status == Interface_CheckWarning || status == Interface_CheckAny) {
-    Standard_Integer i, nb = NbWarnings();
+    Standard_Integer i = 0, nb = NbWarnings();
     for (i = nb; i > 0; i --) {
       Handle(TCollection_HAsciiString) ames = Warning(i);
       if (incl == 0)  {  if (mess->IsSameString (ames)) return Standard_True;  }
@@ -430,7 +430,7 @@ Standard_Boolean Interface_Check::Complies(const Handle(TCollection_HAsciiString
     }
   }
   if (status == Interface_CheckFail || status == Interface_CheckAny) {
-    Standard_Integer i, nb = NbWarnings();
+    Standard_Integer i = 0, nb = NbWarnings();
     for (i = nb; i > 0; i --) {
       Handle(TCollection_HAsciiString) ames = Warning(i);
       if (incl == 0)  {  if (mess->IsSameString (ames)) return Standard_True;  }
@@ -528,7 +528,7 @@ Standard_Boolean Interface_Check::Remove(const Handle(TCollection_HAsciiString)&
   Standard_Boolean res = Standard_False;
   Standard_Integer lng = mess->Length();
   if (status == Interface_CheckWarning || status == Interface_CheckAny) {
-    Standard_Integer i, nb = NbWarnings();
+    Standard_Integer i = 0, nb = NbWarnings();
     for (i = nb; i > 0; i --) {
       Standard_Boolean rem = Standard_False;
       Handle(TCollection_HAsciiString) ames = Warning(i);
@@ -539,7 +539,7 @@ Standard_Boolean Interface_Check::Remove(const Handle(TCollection_HAsciiString)&
     }
   }
   if (status == Interface_CheckFail || status == Interface_CheckAny) {
-    Standard_Integer i, nb = NbWarnings();
+    Standard_Integer i = 0, nb = NbWarnings();
     for (i = nb; i > 0; i --) {
       Standard_Boolean rem = Standard_False;
       Handle(TCollection_HAsciiString) ames = Warning(i);
@@ -561,7 +561,7 @@ Standard_Boolean Interface_Check::Remove(const Handle(TCollection_HAsciiString)&
 Standard_Boolean  Interface_Check::Mend(const Standard_CString pref,
                                         const Standard_Integer num)
 {
-  Standard_Integer i, n1 = num, n2 = num;
+  Standard_Integer i = 0, n1 = num, n2 = num;
   if (pref && pref[2] == '\0') {
     if (pref[0] == 'F' && pref[1] == 'M') return Mend ("Mended",num);
     if (pref[0] == 'C' && pref[1] == 'A') {  Clear();  return Standard_True;  }
@@ -634,7 +634,7 @@ void Interface_Check::GetEntity(const Handle(Standard_Transient)& anentity)
 
 void Interface_Check::GetMessages (const Handle(Interface_Check)& other)
 {
-  Standard_Integer nb,i;
+  Standard_Integer nb = 0,i = 0;
   if ( (nb = other->NbFails()) != 0) {
     if (thefails.IsNull()) thefails = new TColStd_HSequenceOfHAsciiString();
     if (thefailo.IsNull()) thefailo = new TColStd_HSequenceOfHAsciiString();
@@ -664,7 +664,7 @@ void Interface_Check::GetMessages (const Handle(Interface_Check)& other)
 void Interface_Check::GetAsWarning(const Handle(Interface_Check)& other,
                                    const Standard_Boolean failsonly)
 {
-  Standard_Integer nb,i;
+  Standard_Integer nb = 0,i = 0;
   if ( (nb = other->NbFails()) != 0) {
     if (thewarns.IsNull()) thewarns = new TColStd_HSequenceOfHAsciiString();
     if (thewarno.IsNull()) thewarno = new TColStd_HSequenceOfHAsciiString();
@@ -688,7 +688,7 @@ void Interface_Check::GetAsWarning(const Handle(Interface_Check)& other,
 void Interface_Check::Print(Standard_OStream& S, const Standard_Integer level,
                             const Standard_Integer final) const
 {
-  Standard_Integer j, nb = NbFails();
+  Standard_Integer j = 0, nb = NbFails();
 
   if (level >= 1) {
     nb = NbFails();
index 645be1169c5a14cc5df96196f11f0ed1f88d48dc..3cd569ea206db43372d634ab39be216822903c94 100644 (file)
@@ -141,7 +141,7 @@ void Interface_CheckIterator::Add(const Handle(Interface_Check)& ach,
     else nm = -1;
   }
   if (nm >= 0 && nm <= - (thecurr->Value()) ) {
-    Standard_Integer i , numpos = 0 , nb = thelist->Length();
+    Standard_Integer i = 0 , numpos = 0 , nb = thelist->Length();
     for (i = nb; i > 0; i --)
       if (thenums->Value(i) == nm) {  numpos = i; break;  }
     if (numpos > 0 && nm >= 0) {
@@ -164,7 +164,7 @@ void Interface_CheckIterator::Add(const Handle(Interface_Check)& ach,
 const Handle(Interface_Check)& Interface_CheckIterator::Check
        (const Standard_Integer num) const
 {
-  Standard_Integer i, nb = thelist->Length();
+  Standard_Integer i = 0, nb = thelist->Length();
   for (i = 1; i <= nb; i ++) {
     if (num == thenums->Value(i)) return thelist->Value(i);
   }
@@ -184,7 +184,7 @@ const Handle(Interface_Check)& Interface_CheckIterator::Check
   if (!themod.IsNull()) num = themod->Number(ent);
   if (num > 0) return Check(num);
 
-  Standard_Integer i, nb = thelist->Length();
+  Standard_Integer i = 0, nb = thelist->Length();
   for (i = 1; i <= nb; i ++) {
     if (ent == thelist->Value(i)->Entity()) return thelist->Value(i);
   }
@@ -200,7 +200,7 @@ const Handle(Interface_Check)& Interface_CheckIterator::Check
 Handle(Interface_Check)& Interface_CheckIterator::CCheck
        (const Standard_Integer num)
 {
-  Standard_Integer i, nb = thenums->Length();
+  Standard_Integer i = 0, nb = thenums->Length();
   for (i = 1; i <= nb; i ++) {
     if (num == thenums->Value(i)) return thelist->ChangeValue(i);
   }
@@ -222,7 +222,7 @@ Handle(Interface_Check)& Interface_CheckIterator::CCheck
   if (!themod.IsNull()) num = themod->Number(ent);
   if (num > 0) return CCheck(num);
 
-  Standard_Integer i, nb = thelist->Length();
+  Standard_Integer i = 0, nb = thelist->Length();
   for (i = 1; i <= nb; i ++) {
     if (ent == thelist->Value(i)->Entity()) return thelist->ChangeValue(i);
   }
@@ -243,7 +243,7 @@ Standard_Boolean Interface_CheckIterator::IsEmpty
 {
   if (thelist->IsEmpty()) return Standard_True;
   if (!failsonly) return Standard_False;
-  Standard_Integer i, nb = thelist->Length();
+  Standard_Integer i = 0, nb = thelist->Length();
   for (i = 1; i <= nb; i ++) {
     if (thelist->Value(i)->HasFailed()) return Standard_False;
   }
@@ -259,7 +259,7 @@ Standard_Boolean Interface_CheckIterator::IsEmpty
 Interface_CheckStatus Interface_CheckIterator::Status () const
 {
   Interface_CheckStatus stat = Interface_CheckOK;
-  Standard_Integer i, nb = thelist->Length();
+  Standard_Integer i = 0, nb = thelist->Length();
   for (i = 1; i <= nb; i ++) {
     const Handle(Interface_Check) ach = thelist->Value(i);
     if (ach->HasFailed()) return Interface_CheckFail;
@@ -351,7 +351,7 @@ Interface_CheckIterator Interface_CheckIterator::Extract
 {
   Interface_CheckIterator res;
   res.SetModel (themod);  res.SetName (thename.ToCString());
-  Standard_Integer i, nb = thelist->Length();
+  Standard_Integer i = 0, nb = thelist->Length();
   for (i = 1; i <= nb; i ++) {
     const Handle(Interface_Check) ach = thelist->Value(i);
     Standard_Integer nbf = ach->NbFails(), nbw = ach->NbWarnings();
@@ -383,7 +383,7 @@ Interface_CheckIterator Interface_CheckIterator::Extract
   Handle(TCollection_HAsciiString) str = new TCollection_HAsciiString (mess);
   Interface_CheckIterator res;
   res.SetModel (themod);  res.SetName (thename.ToCString());
-  Standard_Integer i, nb = thelist->Length();
+  Standard_Integer i = 0, nb = thelist->Length();
   for (i = 1; i <= nb; i ++) {
     const Handle(Interface_Check) ach = thelist->Value(i);
     if (ach->Complies(str,incl,stat)) res.Add (ach,thenums->Value(i));
@@ -403,7 +403,7 @@ Standard_Boolean Interface_CheckIterator::Remove(const Standard_CString mess,
 {
   Handle(TCollection_HAsciiString) str = new TCollection_HAsciiString (mess);
   Standard_Boolean res = Standard_False;
-  Standard_Integer i, nb = thelist->Length();
+  Standard_Integer i = 0, nb = thelist->Length();
   for (i = 1; i <= nb; i ++) {
     Handle(Interface_Check) ach = thelist->ChangeValue(i);
     if (ach->Remove (str,incl,stat)) res = Standard_True;
@@ -423,7 +423,7 @@ Handle(TColStd_HSequenceOfTransient) Interface_CheckIterator::Checkeds
   Handle(TColStd_HSequenceOfTransient) list;
   if (themod.IsNull()) return list;
   list = new TColStd_HSequenceOfTransient();
-  Standard_Integer num, i, nb = thelist->Length();
+  Standard_Integer num = 0, i = 0, nb = thelist->Length();
   for (i = 1; i <= nb; i ++) {
     const Handle(Interface_Check) chk = thelist->Value(i);
     if (failsonly && !chk->HasFailed()) continue;
@@ -523,7 +523,7 @@ void Interface_CheckIterator::Print(Standard_OStream& S,
     Standard_CString mesnum0 = ":";
     Standard_CString mesnum1 = " (original):";
     Standard_CString mesnum2 = " (computed):";    */
-  Standard_Integer i, nbch = 0, nb = thelist->Length();//,j; svv #2
+  Standard_Integer i = 0, nbch = 0, nb = thelist->Length();//,j; svv #2
   Standard_Boolean yamod = !model.IsNull();
   for (i = 1; i <= nb; i ++) {
     const Handle(Interface_Check) ach = thelist->Value(i);
index fb44054c48630b43fc597c8932c9f0e7f77fb0ca..64450061e414d3bf63741ad81ae2f5ce8538d687 100644 (file)
@@ -70,9 +70,9 @@ static void raisecheck (Standard_Failure& theException,Handle(Interface_Check)&
 Interface_CheckTool::Interface_CheckTool(const Handle(Interface_InterfaceModel)& model,
                                          const Handle(Interface_Protocol)& protocol)
      :  thegtool ( new Interface_GTool(protocol,model->NbEntities()) ) ,
-       theshare (model,protocol)
+       theshare (model,protocol), thestat(0)
 {
-  thestat = 0;
+  
 }
 
 
@@ -82,9 +82,9 @@ Interface_CheckTool::Interface_CheckTool(const Handle(Interface_InterfaceModel)&
 //=======================================================================
 
 Interface_CheckTool::Interface_CheckTool(const Handle(Interface_InterfaceModel)& model)
-     :  thegtool(model->GTool()) , theshare (model,model->GTool())
+     :  thegtool(model->GTool()) , theshare (model,model->GTool()), thestat(0)
 {
-  thestat = 0;
+  
   thegtool->Reservate(model->NbEntities());
 }
 
@@ -121,7 +121,7 @@ void Interface_CheckTool::FillCheck(const Handle(Standard_Transient)& ent,
                                     Handle(Interface_Check)& ach)
 {
   Handle(Interface_GeneralModule) module;
-  Standard_Integer CN;
+  Standard_Integer CN = 0;
   if (thegtool->Select(ent,module,CN)) {
 //    Sans try/catch (fait par l appelant, evite try/catch en boucle)
     if (!errh) {
@@ -155,7 +155,7 @@ void Interface_CheckTool::FillCheck(const Handle(Standard_Transient)& ent,
 void Interface_CheckTool::Print(const Handle(Interface_Check)& ach,
                                 Standard_OStream& S) const 
 {
-  Standard_Integer i, nb;
+  Standard_Integer i = 0, nb = 0;
   nb = ach->NbFails();
   if (nb > 0) S << " Fail Messages : " << nb << " :\n";
   for (i = 1; i <= nb; i ++) {
index f948e371df056d2a947fa0c31de0c47ecb89017c..4fb14b0d46cb9d3ee98651bfc9c3dfe1f35e516b 100644 (file)
@@ -130,7 +130,7 @@ private:
 
   Handle(Interface_GTool) thegtool;
   Interface_ShareTool theshare;
-  Standard_Integer thestat;
+  Standard_Integer thestat{};
 
 
 };
index 60db31fbc52db6abd5c38fd314fc7e08487be898..3361316d87c2b297b9c48da2270057bded99dd16 100644 (file)
@@ -23,8 +23,8 @@ 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;  }
+    : themod(amodel), theres (0,amodel->NbEntities())
+      {   }
 
 
     void Interface_CopyMap::Clear ()
index 323308ee17fc18c24a54a84ddc9658d546a7816b..39308534acd6f24fe2063ac403f6c926cbb374bf 100644 (file)
 Interface_CopyTool::Interface_CopyTool
   (const Handle(Interface_InterfaceModel)& amodel,
    const Interface_GeneralLib& lib)
-    : thelib (lib) , thelst (amodel->NbEntities())
+    : thelib (lib) , themod(amodel), themap(new Interface_CopyMap (amodel)), therep(new Interface_CopyMap (amodel)), thelst (amodel->NbEntities()), thelev(0), theimp(Standard_False)
 {
   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())
+    : thelib (protocol) , themod(amodel), themap(new Interface_CopyMap (amodel)), therep(new Interface_CopyMap (amodel)), thelst (amodel->NbEntities()), thelev(0), theimp(Standard_False)
 {
   thelst.Init(Standard_False);
-  themod = amodel;
-  themap = new Interface_CopyMap (amodel);
-  therep = new Interface_CopyMap (amodel);
-  thelev = 0;  theimp = Standard_False;
+  
+  
+  
+   
 }
 
 
@@ -154,7 +154,7 @@ Interface_CopyTool::Interface_CopyTool
    const Handle(Standard_Transient)& entto)
 {
   Handle(Interface_GeneralModule) module;
-  Standard_Integer CN;
+  Standard_Integer CN = 0;
   if (thelib.Select(entfrom,module,CN))
     module->RenewImpliedCase(CN,entfrom,entto,*this);
 }
index 984129c3414c821604b8cf9ca21882892cbf9c80..911f6950b1ef810b6927ba6e330940f79351288d 100644 (file)
@@ -209,7 +209,7 @@ private:
   Standard_Boolean theimp;
   Handle(Standard_Transient) theent;
   Handle(Interface_GeneralModule) themdu;
-  Standard_Integer theCN;
+  Standard_Integer theCN{};
 
 
 };
index 45fdfd659e8fe2df2a6a9125cc99a78e6f248d9c..da1303d7a9a8c83bd4147e416b5f9b809964d390 100644 (file)
@@ -36,13 +36,13 @@ Interface_EntityCluster::Interface_EntityCluster ()    {  }
       {  theents[0] = ent;  }
 
     Interface_EntityCluster::Interface_EntityCluster
-  (const Handle(Interface_EntityCluster)& ec)
-      {  thenext = ec;  }
+  (const Handle(Interface_EntityCluster)& ec) : thenext(ec)
+      {   }
 
     Interface_EntityCluster::Interface_EntityCluster
   (const Handle(Standard_Transient)& ent,
-   const Handle(Interface_EntityCluster)& ec)
-      {  theents[0] = ent;  thenext = ec;  }
+   const Handle(Interface_EntityCluster)& ec) : thenext(ec)
+      {  theents[0] = ent;   }
 
 //  ....                        AJOUT - SUPPRESSION                        ....
 
@@ -69,7 +69,7 @@ Interface_EntityCluster::Interface_EntityCluster ()    {  }
   (const Handle(Standard_Transient)& ent)
 {
   if (ent.IsNull()) throw Standard_NullObject("Interface_EntityCluster Remove");
-  Standard_Integer i;
+  Standard_Integer i = 0;
 //  <ent> est-il ici ? si oui, on a son rang
   if      (ent == theents[0]) i = 1;
   else if (ent == theents[1]) i = 2;
@@ -174,7 +174,7 @@ Standard_Boolean  Interface_EntityCluster::IsLocalFull () const
 
     Standard_Integer  Interface_EntityCluster::NbLocal () const
 {
-  Standard_Integer nb;
+  Standard_Integer nb = 0;
   if      (!theents[3].IsNull()) nb = 4;
   else if (!theents[2].IsNull()) nb = 3;
   else if (!theents[1].IsNull()) nb = 2;
index 7c7dd75a78a776d695769d3257d874d8653d5d66..932f7d00fe7d65bfba1a1401522211f3d2886c2d 100644 (file)
@@ -31,11 +31,11 @@ Interface_EntityIterator::Interface_EntityIterator ()
 }
 
     Interface_EntityIterator::Interface_EntityIterator
-  (const Handle(TColStd_HSequenceOfTransient)& list)
+  (const Handle(TColStd_HSequenceOfTransient)& list) : thecurr(new Interface_IntVal), thelist(list)
 {
-  thecurr = new Interface_IntVal;
+  
   thecurr->CValue() = 0;
-  thelist = list;
+  
 }
 
     void Interface_EntityIterator::AddList
@@ -78,7 +78,7 @@ Interface_EntityIterator::Interface_EntityIterator ()
   (const Handle(Standard_Type)& atype, const Standard_Boolean keep)
 {
   if (thelist.IsNull()) return;
-  Standard_Integer i, n = thelist->Length();
+  Standard_Integer i = 0, n = thelist->Length();
   Handle(TColStd_HSequenceOfTransient) nlist = new TColStd_HSequenceOfTransient();
   for (i = 1 ; i <= n ; i ++) {
     if (thelist->Value(i)->IsKind(atype) == keep) nlist->Append(thelist->Value(i));
@@ -100,7 +100,7 @@ Interface_EntityIterator::Interface_EntityIterator ()
 {
   Standard_Integer res = 0;
   if (thelist.IsNull()) return res;
-  Standard_Integer i, n = thelist->Length();
+  Standard_Integer i = 0, n = thelist->Length();
   for (i = 1 ; i <= n ; i ++) {
     if (thelist->Value(i)->IsKind(atype)) res ++;
   }
@@ -112,7 +112,7 @@ Interface_EntityIterator::Interface_EntityIterator ()
 {
   Interface_EntityIterator res;
   if (thelist.IsNull()) return res;
-  Standard_Integer i, n = thelist->Length();
+  Standard_Integer i = 0, n = thelist->Length();
   for (i = 1 ; i <= n ; i ++) {
     if (thelist->Value(i)->IsKind(atype)) res.AddItem (thelist->Value(i));
   }
index 897deed8e6d6cc664fbdb8f0e92dccc105235305..95c41498a34855287892c585e0384caf8dac99d7 100644 (file)
@@ -19,9 +19,9 @@
 //function : Interface_FileParameter
 //purpose  : 
 //=======================================================================
-Interface_FileParameter::Interface_FileParameter ()
+Interface_FileParameter::Interface_FileParameter () : thetype(Interface_ParamMisc), thenum(0)
 {  
-thetype = Interface_ParamMisc;  thenum = 0;  
+  
 }
 
 //=======================================================================
index d806f909f14bbae3fc932eb5c1ff14e8e7d94ec1..6b5a71c19e9f3e8f1c1e86cee595bdea71f0e78b 100644 (file)
@@ -87,7 +87,7 @@ private:
 
 
   Interface_ParamType thetype;
-  Standard_PCharacter theval;
+  Standard_PCharacter theval{};
   Standard_Integer thenum;
 
 
index 810e298500ea3dd3c9bbbc32a2b5b6bf21c77c70..e6b61d993ad6fe9384f1203acf163910beb2396a 100644 (file)
@@ -41,12 +41,12 @@ static Standard_Integer thenp0 = -1;
 
 Interface_FileReaderData::Interface_FileReaderData (const Standard_Integer nbr,
                                                    const Standard_Integer npar)
-     : therrload (0), thenumpar (0,nbr), theents (0,nbr)
+     : thenum0(++thefic), therrload (0), theparams(new Interface_ParamSet (npar)), thenumpar (0,nbr), theents (0,nbr)
 {
-  theparams = new Interface_ParamSet (npar);
+  
   thenumpar.Init(0);
   thenm0 = -1;
-  thenum0 = ++thefic;
+  
 }
 
     Standard_Integer Interface_FileReaderData::NbRecords () const
index a2504d05a119df045cbe192b154df8e528d25896..f354ee75096ee34059a0c6ef0510fc019440e5ea 100644 (file)
 //purpose  : 
 //=======================================================================
 
-Interface_FileReaderTool::Interface_FileReaderTool ()
+Interface_FileReaderTool::Interface_FileReaderTool () : themessenger(Message::DefaultMessenger()), theerrhand(Standard_True), thetrace(0)
 {
-  themessenger = Message::DefaultMessenger();
-  theerrhand = Standard_True;
-  thetrace = 0;
+  
+  
+  
   thenbrep0 = thenbreps = 0;
 }
 
@@ -201,7 +201,7 @@ Standard_Boolean  Interface_FileReaderTool::ErrorHandle() const
 
 void Interface_FileReaderTool::SetEntities ()
 {
-  Standard_Integer num;
+  Standard_Integer num = 0;
   thenbreps = 0;  thenbrep0 = 0;
 
   for (num = thereader->FindNextRecord(0);  num > 0;
@@ -342,7 +342,7 @@ void Interface_FileReaderTool::LoadModel
 
   amodel->Reservate (thereader->NbEntities());
 
-  Standard_Integer num, num0 = thereader->FindNextRecord(0);
+  Standard_Integer num = 0, num0 = thereader->FindNextRecord(0);
   num = num0;
 
   while (num > 0) {
index e4d20b1eae92653f11238a808c80a5117f859c3e..e9f45b4128a564282f7e9d1a07bb2121189add23 100644 (file)
@@ -98,7 +98,7 @@ Standard_Integer Interface_FloatWriter::Convert (const Standard_Real val,
 {
 //    Valeur flottante, expurgee de "0000" qui trainent et de "E+00"
   const Standard_Integer anMasSize = 5; // change 6 to 5: index 5 is not used below
-  char lxp[anMasSize], *pText; 
+  char lxp[anMasSize], *pText = nullptr
   int i0 = 0, j0 = 0;
 
   for (Standard_Integer i = 0; i < anMasSize; ++i)
index bd092a068c78d5dd3d036fffd97c171126ba55b5..505a55423c8199b50ed2c3b4357c87173f348d1a 100644 (file)
@@ -111,11 +111,11 @@ private:
 
 
 
-  Standard_Character themainform[12];
-  Standard_Real therange1;
-  Standard_Real therange2;
-  Standard_Character therangeform[12];
-  Standard_Boolean thezerosup;
+  Standard_Character themainform[12]{};
+  Standard_Real therange1{};
+  Standard_Real therange2{};
+  Standard_Character therangeform[12]{};
+  Standard_Boolean thezerosup{};
 
 
 };
index 7d6412474e998f6cbdf7d3b28f06be7ce5d68c4c..e9cefcd0f26558940c7d9edcadcc76d110c4b956 100644 (file)
@@ -87,9 +87,9 @@ Interface_Graph::Interface_Graph
 
 Interface_Graph::Interface_Graph
 (const Interface_Graph& agraph, const Standard_Boolean /*copied*/)
-: themodel   (agraph.Model()), thepresents ("") 
+: themodel   (agraph.Model()), thepresents (""), thesharings(agraph.SharingTable()) 
 {
-  thesharings = agraph.SharingTable();
+  
   Standard_Integer nb = agraph.NbStatuses();
   if(!nb)
     return;
@@ -145,7 +145,7 @@ void Interface_Graph::Evaluate()
     return;
   
 
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 1; i <= n; i ++) {
      //    ATTENTION : Si Entite non chargee donc illisible, basculer sur son
     //    "Contenu" equivalent
@@ -158,7 +158,7 @@ void Interface_Graph::Evaluate()
     //    Mise en forme : liste d entiers
     for (iter.Start(); iter.More(); iter.Next()) {
       //    num = 0 -> on sort du Model de depart, le noter "Error" et passer
-      Handle(Standard_Transient) entshare = iter.Value();
+      const Handle(Standard_Transient)& entshare = iter.Value();
       if(entshare == ent)
         continue;
 
@@ -349,7 +349,7 @@ void  Interface_Graph::GetFromIter
    if(thestats.IsNull())
     return;
   for (iter.Start(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     Standard_Integer num = EntityNumber(ent);
     if (!num) 
       continue;
@@ -368,7 +368,7 @@ void  Interface_Graph::GetFromIter
   if(thestats.IsNull())
     return;
   for (iter.Start(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     Standard_Integer num   = EntityNumber(ent);
     if (!num) 
       continue;
@@ -428,7 +428,7 @@ Interface_EntityIterator Interface_Graph::Shareds
 
   //if (num == 0)  throw Standard_DomainError("Interface : Shareds");
   Handle(Interface_GeneralModule) module;
-  Standard_Integer CN;
+  Standard_Integer CN = 0;
   if (themodel->GTool()->Select(aCurEnt,module,CN))  
     module->FillShared(themodel,CN,aCurEnt,iter);
   return iter;
@@ -516,7 +516,7 @@ Handle(TCollection_HAsciiString)  Interface_Graph::Name(const Handle(Standard_Tr
   if (gtool.IsNull()) return str;
 
   Handle(Interface_GeneralModule) module;
-  Standard_Integer CN;
+  Standard_Integer CN = 0;
   if (!gtool->Select(ent,module,CN)) return str;
 
   Interface_ShareTool sht (*this);
index c0a16a91b045077258c03a33dd480193956bde43..e7fa227ea0a7d5da7697f0213c819caf3ee85398 100644 (file)
@@ -34,7 +34,7 @@ Interface_GraphContent::Interface_GraphContent ()    {  }
   Standard_Integer nb = list.NbEntities();
   if (nb == 0) return;                             // Liste redefinie a VIDE
   for( ; list.More(); list.Next()) {
-    Handle(Standard_Transient) curent = list.Value();
+    const Handle(Standard_Transient)& curent = list.Value();
     if (agraph.IsPresent(agraph.EntityNumber(curent))) 
       GetOneItem (curent);
   }
index 0b2510feadb5acfcba31e2acd7ca22bc14f9655b..6a3478dbbd7edb25260161be3a8df368fa525609 100644 (file)
@@ -38,13 +38,13 @@ Interface_IntList::Interface_IntList ()
   Initialize (nbe);
 }
 
-  Interface_IntList::Interface_IntList (const Interface_IntList& other, const Standard_Boolean copied)
+  Interface_IntList::Interface_IntList (const Interface_IntList& other, const Standard_Boolean copied) : thenbe(other.NbEntities())
 {
-  thenbe = other.NbEntities();
+  
   thenum = thecount = therank = 0; //szv#4:S4163:12Mar99 initialization needed
   other.Internals (thenbr, theents, therefs);
   if (copied) {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Handle(TColStd_HArray1OfInteger) ents = new TColStd_HArray1OfInteger (0,thenbe); ents->Init(0);
     for (i = 1; i <= thenbe; i ++)  ents->SetValue (i,theents->Value(i));
     Handle(TColStd_HArray1OfInteger) refs = new TColStd_HArray1OfInteger (0,thenbr); refs->Init(0);
@@ -75,7 +75,7 @@ Standard_Integer  Interface_IntList::NbEntities () const
 void  Interface_IntList::SetNbEntities (const Standard_Integer nbe)
 {
   if (nbe <= theents->Upper()) return;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Handle(TColStd_HArray1OfInteger) ents = new TColStd_HArray1OfInteger (0,nbe); ents->Init(0);
   for (i = 1; i <= thenbe; i ++)  ents->SetValue (i,theents->Value(i));
   theents = ents;
@@ -174,7 +174,7 @@ void  Interface_IntList::Reservate (const Standard_Integer count)
     thenbr -= count;
     return;
   }
-  Standard_Integer up, oldup = 0;
+  Standard_Integer up = 0, oldup = 0;
   if (thenbr == 0) {    //  c-a-d pas encore allouee ...
     up = thenbe/2+1;  if (up < 2) up = 2;
     if (up < count) up = count*3/2;
@@ -268,7 +268,7 @@ Standard_Boolean  Interface_IntList::Remove (const Standard_Integer)
 void  Interface_IntList::Clear ()
 {
   if (thenbr == 0) return;  // deja clear
-  Standard_Integer i,low,up;
+  Standard_Integer i = 0,low = 0,up = 0;
   low = theents->Lower();  up = theents->Upper();
   for (i = low; i <= up; i ++)  theents->SetValue (i,0);
   thenbr = 0;
@@ -279,7 +279,7 @@ void  Interface_IntList::Clear ()
 
 void  Interface_IntList::AdjustSize (const Standard_Integer margin)
 {
-  Standard_Integer i, up = theents->Upper();
+  Standard_Integer i = 0, up = theents->Upper();
   if (up > thenbe) {
     Handle(TColStd_HArray1OfInteger) ents = new TColStd_HArray1OfInteger (0,thenbe); ents->Init(0);
     for (i = 1; i <= thenbe; i ++)  ents->SetValue (i,theents->Value(i));
index 271c0baf41f9a0b0990c52ba315cff59814383d3..2e14333b7637002de55a6b117c1477c235856970 100644 (file)
@@ -132,11 +132,11 @@ public:
 
 private:
 
-  Standard_Integer thenbe;
-  Standard_Integer thenbr;
-  Standard_Integer thenum;
-  Standard_Integer thecount;
-  Standard_Integer therank;
+  Standard_Integer thenbe{};
+  Standard_Integer thenbr{};
+  Standard_Integer thenum{};
+  Standard_Integer thecount{};
+  Standard_Integer therank{};
   Handle(TColStd_HArray1OfInteger) theents;
   Handle(TColStd_HArray1OfInteger) therefs;
 
index 5a79c3cb840a26e695edd97edf2d582870df7816..627b93d4f5a66c8d43ddb3548f703b774e9c3880 100644 (file)
@@ -17,7 +17,7 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(Interface_IntVal,Standard_Transient)
 
-Interface_IntVal::Interface_IntVal  ()    {  theval = 0;  }
+Interface_IntVal::Interface_IntVal  () : theval(0)    {   }
 
 Standard_Integer  Interface_IntVal::Value () const  {  return theval;  }
 
index 184743ce32d025f45e74035e83d723e5068ecafd..35eda4f417a7189bcf35345c83284ee91d6e2bb5 100644 (file)
@@ -62,10 +62,10 @@ static const Handle(Interface_Check)& nulch()
 //=======================================================================
 
 Interface_InterfaceModel::Interface_InterfaceModel ()
-     : haschecksem (Standard_False), isdispatch (Standard_False)
+     : thecheckstx(new Interface_Check), thechecksem(new Interface_Check), haschecksem (Standard_False), isdispatch (Standard_False)
 {
-  thecheckstx = new Interface_Check;
-  thechecksem = new Interface_Check;
+  
+  
 }
 
 
@@ -498,7 +498,7 @@ void Interface_InterfaceModel::FillSemanticChecks
   for (checks.Start(); checks.More(); checks.Next())  nb ++;
   therepch.ReSize (therepch.Extent() + nb + 2);
   for (checks.Start(); checks.More(); checks.Next()) {
-    const Handle(Interface_Check) ach = checks.Value();
+    const Handle(Interface_Check)& ach = checks.Value();
     Standard_Integer num = checks.Number();
 //    global check : ok si MEME MODELE
     if (num == 0) thechecksem->GetMessages(ach);
@@ -638,7 +638,7 @@ void Interface_InterfaceModel::AddWithRefs(const Handle(Standard_Transient)& ane
   else AddEntity(anent);
 
   Interface_EntityIterator iter;
-  Handle(Interface_GeneralModule) module;  Standard_Integer CN;
+  Handle(Interface_GeneralModule) module;  Standard_Integer CN = 0;
   if (lib.Select (anent,module,CN)) {
     module->FillSharedCase  (CN,anent,iter);
 //    FillShared tout court : supposerait que le modele soit deja pret
@@ -678,7 +678,7 @@ void Interface_InterfaceModel::ReverseOrders (const Standard_Integer after)
   Standard_Integer nb = NbEntities();  //Standard_Integer num; svv #2
   if (nb < 2 || after >= nb) return;
   TColStd_Array1OfTransient ents(1,nb);
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for (i = 1; i <= nb; i ++)
     ents.SetValue (i, theentities.FindKey(i));
 //    On va vider la Map, puis la recharger : dans l ordre jusqua after
@@ -710,7 +710,7 @@ void Interface_InterfaceModel::ChangeOrder(const Standard_Integer oldnum,
                                            const Standard_Integer newnum,
                                            const Standard_Integer cnt) //szv#4:S4163:12Mar99 `count` hid one from this
 {
-  Standard_Integer nb = NbEntities();  Standard_Integer i; //, num; svv #2 
+  Standard_Integer nb = NbEntities();  Standard_Integer i = 0; //, num; svv #2 
   if (nb < 2 || newnum >= nb || cnt<= 0) return;
   TColStd_Array1OfTransient ents(1,nb);
   //  On va preparer le changement
@@ -756,7 +756,8 @@ void Interface_InterfaceModel::GetFromTransfer
 {
   theentities.Clear();  theentities.ReSize (aniter.NbEntities());
   for (aniter.Start(); aniter.More(); aniter.Next()) {
-    Handle(Standard_Transient) ent = aniter.Value();    AddEntity(ent);
+    const Handle(Standard_Transient)& ent = aniter.Value();
+    AddEntity(ent);
   }
 }
 
@@ -772,7 +773,7 @@ void Interface_InterfaceModel::GetFromTransfer
 Standard_Boolean Interface_InterfaceModel::SetCategoryNumber
   (const Standard_Integer num, const Standard_Integer val)
 {
-  Standard_Integer i,nb = NbEntities();
+  Standard_Integer i = 0,nb = NbEntities();
   if (num < 1 || num > nb) return Standard_False;
   if (thecategory.IsNull()) thecategory = new TCollection_HAsciiString(nb,' ');
   else if (thecategory->Length() < nb) {
@@ -956,7 +957,7 @@ Standard_Integer Interface_InterfaceModel::NextNumberForLabel
   Standard_Integer lnb = labs->Length();
   labs->LowerCase();
 
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for (i = fromnum+1; i <= n; i ++) {
     Handle(TCollection_HAsciiString) lab = StringLabel (Value(i));
     if (lab.IsNull()) continue;
index 629e591177d4716f3229e4f7062b1a6ba1759e9e..111e2e1b2f2eb15736ee821b029297c733dda67f 100644 (file)
 #include <TCollection_HAsciiString.hxx>
 
 Interface_LineBuffer::Interface_LineBuffer (const Standard_Integer size)
-: myLine (1, size+1)
+: myLine (1, size+1), myMax(size)
 {
   myLine.SetValue (1, '\0');
-  myMax = size;
+  
   myInit = myLen = myGet = myKeep = myFriz = 0;
 }
 
index 8cebf160cff75276e8bd9acfb834a4e1c9649396..907d1e0e0f857b1ffff6768945ca81ae8efe8957 100644 (file)
@@ -112,7 +112,7 @@ private:
   Standard_Integer myGet;
   Standard_Integer myLen;
   Standard_Integer myFriz;
-  Standard_Character myKept;
+  Standard_Character myKept{};
 
 };
 
index 55398cf2b178b3b5d3f1cd52136c4efcf01429b7..bb10881f14bee9894a6d900821455bfa50ac178f 100644 (file)
@@ -122,7 +122,7 @@ Interface_MSG::operator Standard_CString () const
 
 Standard_Integer  Interface_MSG::Read (Standard_IStream& S)
 {
-  Standard_Integer i,nb = 0;
+  Standard_Integer i = 0,nb = 0;
   char buf[200], key[200];
   buf[0] = '\0';
   while (S.getline (buf,200)) {
@@ -158,7 +158,7 @@ Standard_Integer  Interface_MSG::Read (Standard_IStream& S)
   for (; iter.More(); iter.Next()) {
     if (!iter.Key().StartsWith(rootkey)) continue;
     S<<"@"<<iter.Key()<<"\n";
-    const Handle(TCollection_HAsciiString) str = iter.Value();
+    const Handle(TCollection_HAsciiString)& str = iter.Value();
     if (str.IsNull()) continue;
     nb ++;
     S<<str->ToCString()<<"\n";
@@ -237,7 +237,7 @@ void  Interface_MSG::SetMode (const Standard_Boolean running,
 void  Interface_MSG::PrintTrace (Standard_OStream& S)
 {
   Handle(TCollection_HAsciiString) dup;
-  Standard_Integer i, nb = 0;
+  Standard_Integer i = 0, nb = 0;
   if (!thedup.IsNull()) nb = thedup->Length()/2;
   for (i = 1; i <= nb; i ++) {
     dup = thedup->Value(2*i-1);
@@ -370,7 +370,7 @@ Standard_Boolean  Interface_MSG::NDate (const Standard_CString text,
                                         Standard_Integer& mn,
                                         Standard_Integer& ss)
 {
-  Standard_Integer i ,num = 1;
+  Standard_Integer i = 0 ,num = 1;
   for (i = 0; text[i] != '\0'; i ++) {
     char val = text[i];
     if (val >= 48 && val <= 57) {
@@ -413,7 +413,7 @@ Standard_Integer  Interface_MSG::CDate (const Standard_CString text1,
 Standard_CString  Interface_MSG::Blanks (const Standard_Integer val,
                                          const Standard_Integer max)
 {
- Standard_Integer count;
+ Standard_Integer count = 0;
   if (val < 0)  return Interface_MSG::Blanks (-val,max-1);
   if      (val <         10) count = 9;
   else if (val <        100) count = 8;
index 20fc428713c53995cdecbf80169c59668b81fa4f..dd606d8f27819d60dc30704d42f8cad8844a3450 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Interface_ParamSet,Standard_Transient)
 
-Interface_ParamSet::Interface_ParamSet (const Standard_Integer nres, const Standard_Integer )//nst)
+Interface_ParamSet::Interface_ParamSet (const Standard_Integer nres, const Standard_Integer ) : thelist(new Interface_ParamList), themxpar(nres), thenbpar(0), thelnval(0), thelnres(100)//nst)
 {
-  thelist = new Interface_ParamList;// (nst,nst+nres+2);
-  themxpar = nres;
-  thenbpar = 0;
-  thelnval = 0;
-  thelnres = 100; // *20;  // 10 caracteres par Param (\0 inclus) : raisonnable
+  // (nst,nst+nres+2);
+  
+  
+  
+  // *20;  // 10 caracteres par Param (\0 inclus) : raisonnable
   theval   = new char[thelnres]; //szv#4:S4163:12Mar99 `thelnres+1` chars was wrong
 }
 
@@ -53,7 +53,7 @@ Standard_Integer  Interface_ParamSet::Append (const Standard_CString val, const
   }
   else {
     //    ..  Gestion locale des caracteres  ..
-    Standard_Integer i;
+    Standard_Integer i = 0;
     if (thelnval + lnval + 1 > thelnres) {
       //      Reservation de caracteres insuffisante : d abord augmenter
       Standard_Integer newres = (Standard_Integer)(thelnres*2 + lnval);
@@ -131,7 +131,7 @@ void Interface_ParamSet::SetParam (const Standard_Integer num, const Interface_F
 Handle(Interface_ParamList) Interface_ParamSet::Params (const Standard_Integer num,
                                                        const Standard_Integer nb) const 
 {
-  Standard_Integer i, n0 = num-1, nbp = nb;
+  Standard_Integer i = 0, n0 = num-1, nbp = nb;
   if (num > themxpar) 
     return thenext->Params (num-themxpar,nb);
   if (num == 0 && nb == 0) {
index 3623ce8a6cb42706484e6305537d955f227d5886..57005f2fde171b3bc50f08dba1bc9435b28c28bc 100644 (file)
@@ -24,10 +24,10 @@ IMPLEMENT_STANDARD_RTTIEXT(Interface_ReportEntity,Standard_Transient)
 //purpose  : 
 //=======================================================================
 Interface_ReportEntity::Interface_ReportEntity
-  (const Handle(Standard_Transient)& unknown)
+  (const Handle(Standard_Transient)& unknown) : theconcerned(unknown), thecontent(unknown)
 {
-  theconcerned = unknown;
-  thecontent = unknown;
+  
+  
 }
 
 
@@ -39,9 +39,9 @@ Interface_ReportEntity::Interface_ReportEntity
 Interface_ReportEntity::Interface_ReportEntity
   (const Handle(Interface_Check)& acheck,
    const Handle(Standard_Transient)& concerned)
-:  thecheck(acheck)
+:  thecheck(acheck), theconcerned(concerned)
 {
-  theconcerned = concerned;
+  
   thecheck->SetEntity(concerned);
 }
 
index 24ad2109bb79f77ee25541ae0865d0b471adf9e1..b0c22af3ec878a1a7a9c987b9587be901d333971 100644 (file)
@@ -20,10 +20,10 @@ static Interface_STAT statvoid("");
 static Interface_STAT statact ("");
 static Standard_CString voidname = "";
 
-    Interface_STAT::Interface_STAT (const Standard_CString title)
+    Interface_STAT::Interface_STAT (const Standard_CString title) : thetitle(new TCollection_HAsciiString(title)), thetotal(1.)
 {
-  thetitle = new TCollection_HAsciiString(title);
-  thetotal = 1.;
+  
+  
 }
 
     Interface_STAT::Interface_STAT (const Interface_STAT& other)
index ef406156f8ee2d311abf2a976b5121f5b9f8f296..01ecb2027e356aada74e6d33fb4ce7efcbeefd4a 100644 (file)
@@ -205,7 +205,7 @@ private:
 
 
   Handle(TCollection_HAsciiString) thetitle;
-  Standard_Real thetotal;
+  Standard_Real thetotal{};
   Handle(TColStd_HSequenceOfAsciiString) thephnam;
   Handle(TColStd_HSequenceOfReal) thephw;
   Handle(TColStd_HSequenceOfInteger) thephdeb;
index 56e33a3893d6906cc0c46180da5c2ab74dd3a687..dfa6450c6742694bd563b1f6be1ff4da1459f597 100644 (file)
 Interface_ShareFlags::Interface_ShareFlags
   (const Handle(Interface_InterfaceModel)& amodel,
    const Interface_GeneralLib& lib)
-   : theflags (amodel->NbEntities())
+   : themodel(amodel), theflags (amodel->NbEntities())
 {
   Handle(Interface_GTool) gtool;  // null
-  themodel = amodel;
+  
   Evaluate(lib,gtool);
 }
 
     Interface_ShareFlags::Interface_ShareFlags
   (const Handle(Interface_InterfaceModel)& amodel,
    const Handle(Interface_GTool)& gtool)
-   : theflags (amodel->NbEntities())
+   : themodel(amodel), theflags (amodel->NbEntities())
 {
-  themodel = amodel;
+  
   Evaluate(gtool->Lib(),gtool);
 }
 
     Interface_ShareFlags::Interface_ShareFlags
   (const Handle(Interface_InterfaceModel)& amodel,
    const Handle(Interface_Protocol)& protocol)
-   : theflags (amodel->NbEntities())
+   : themodel(amodel), theflags (amodel->NbEntities())
 {
   Handle(Interface_GTool) gtool;  // null
-  themodel = amodel;
+  
   Evaluate(Interface_GeneralLib(protocol),gtool);
 }
 
     Interface_ShareFlags::Interface_ShareFlags
   (const Handle(Interface_InterfaceModel)& amodel)
-   : theflags (amodel->NbEntities())
+   : themodel(amodel), theflags (amodel->NbEntities())
 {
   Handle(Interface_GTool) gtool = themodel->GTool();
   gtool->Reservate(amodel->NbEntities());
-  themodel = amodel;
+  
   Evaluate (gtool->Lib(),gtool);
 }
 
     Interface_ShareFlags::Interface_ShareFlags (const Interface_Graph& agraph)
-      : theflags (agraph.Model()->NbEntities())
+      : themodel(agraph.Model()), theflags (agraph.Model()->NbEntities())
     {
-      themodel = agraph.Model();
+      
       Standard_Integer nb = themodel->NbEntities();
       if (nb == 0) return;
       theroots = new TColStd_HSequenceOfTransient();
@@ -87,7 +87,7 @@ Interface_ShareFlags::Interface_ShareFlags
   Standard_Integer nb = themodel->NbEntities();
   if (nb == 0) return;
   theroots = new TColStd_HSequenceOfTransient();
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 1; i <= nb; i ++) {
 
 //    ATTENTION : Si Entite non chargee donc illisible, basculer sur son
@@ -98,7 +98,7 @@ Interface_ShareFlags::Interface_ShareFlags
 //    Resultat obtenu via GeneralLib
     Interface_EntityIterator iter;
     Handle(Interface_GeneralModule) module;
-    Standard_Integer CN;
+    Standard_Integer CN = 0;
     if (patool) {
       if (lib.Select(ent,module,CN))  module->FillShared(themodel,CN,ent,iter);
     } else {
index 730420954d572dc2e1daeae1299d21555bd38866..8a82fb11f4850a03526af41b07b63f48125f91a3 100644 (file)
 #include <TColStd_HSequenceOfTransient.hxx>
 
 Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel,
-                                          const Interface_GeneralLib& lib)
+                                          const Interface_GeneralLib& lib) : theHGraph(new Interface_HGraph(amodel,lib))
 {
-  theHGraph = new Interface_HGraph(amodel,lib);
+  
 }
 
 Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel,
-                                          const Handle(Interface_GTool)& gtool)
+                                          const Handle(Interface_GTool)& gtool) : theHGraph(new Interface_HGraph(amodel,gtool))
 {
-  theHGraph = new Interface_HGraph(amodel,gtool);
+  
 }
 
 Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel,
-                                          const Handle(Interface_Protocol)& protocol)
+                                          const Handle(Interface_Protocol)& protocol) : theHGraph(new Interface_HGraph(amodel,protocol))
 {
-  theHGraph = new Interface_HGraph(amodel,protocol);
+  
 }
 
-Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel)
+Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel) : theHGraph(new Interface_HGraph(amodel))
 {
-  theHGraph = new Interface_HGraph(amodel);
+  
 }
 
-Interface_ShareTool::Interface_ShareTool (const Interface_Graph& agraph)
+Interface_ShareTool::Interface_ShareTool (const Interface_Graph& agraph) : theHGraph(new Interface_HGraph(agraph.Model()))
 {
-  theHGraph = new Interface_HGraph(agraph.Model());
+  
 }
 
-Interface_ShareTool::Interface_ShareTool (const Handle(Interface_HGraph)& ahgraph)
+Interface_ShareTool::Interface_ShareTool (const Handle(Interface_HGraph)& ahgraph) : theHGraph(ahgraph)
 {
-  theHGraph = ahgraph;
+  
 }
 
 //    Ajout des "Implied" sur toutes les Entites du Graphe
@@ -156,7 +156,7 @@ Interface_ShareTool::Interface_ShareTool (const Handle(Interface_HGraph)& ahgrap
 {
   Handle(Interface_InterfaceModel) model = Model();
   Interface_EntityIterator list;
-  Standard_Integer i, n0 = 0, nb = model->NbEntities();
+  Standard_Integer i = 0, n0 = 0, nb = model->NbEntities();
   Handle(TColStd_HArray1OfInteger) fl = new TColStd_HArray1OfInteger (0,nb);
   fl->Init(0);
   if (ent == model) {
@@ -202,7 +202,7 @@ void  Interface_ShareTool::Print (const Interface_EntityIterator& iter, Standard
 {
   S << " Nb.Entities : " << iter.NbEntities() << " : ";
   for (iter.Start(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) ent = iter.Value();
+    const Handle(Standard_Transient)& ent = iter.Value();
     S << " n0/id:"; 
     Model()->Print (ent, S);
   }
index afa597d56e1277e9da4eeac006ef6031fc77e7af..c2f9697656ba5c3cc16a869fe10c273f0316d8d8 100644 (file)
@@ -18,6 +18,7 @@
 #include <Standard_Type.hxx>
 #include <TCollection_HAsciiString.hxx>
 
+#include <math.h>
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(Interface_Static,Interface_TypedValue)
 
@@ -49,20 +50,20 @@ static char defmess[31];
 {
   switch (Type()) {
     case Interface_ParamInteger : {
-      Standard_Integer lim;
+      Standard_Integer lim = 0;
       if (other->IntegerLimit (Standard_True ,lim)) SetIntegerLimit (Standard_True ,lim);
       if (other->IntegerLimit (Standard_False,lim)) SetIntegerLimit (Standard_False,lim);
     }
       break;
     case Interface_ParamReal : {
-      Standard_Real lim;
+      Standard_Real lim = NAN;
       if (other->RealLimit (Standard_True ,lim)) SetRealLimit (Standard_True ,lim);
       if (other->RealLimit (Standard_False,lim)) SetRealLimit (Standard_False,lim);
       SetUnitDef (other->UnitDef());
     }
       break;
     case Interface_ParamEnum : {
-      Standard_Boolean match;  Standard_Integer e0,e1,i;
+      Standard_Boolean match = 0;  Standard_Integer e0 = 0,e1 = 0,i = 0;
       other->EnumDef (e0,e1,match);
       StartEnum (e0,match);
 //      if (e1 >= e0) theenums = new TColStd_HArray1OfAsciiString(e0,e1);
@@ -171,7 +172,7 @@ Standard_Boolean  Interface_Static::Init
 //    Editions : init donne un petit texte d edition, en 2 termes "cmd var" :
 //  imin <ival>  imax <ival>  rmin <rval>  rmax <rval>  unit <def>
 //  enum <from>  ematch <from>  eval <cval>
-      Standard_Integer i,iblc = 0;
+      Standard_Integer i = 0,iblc = 0;
       for (i = 0; init[i] != '\0'; i ++) if (init[i] == ' ') iblc = i+1;
 //  Reconnaissance du sous-cas et aiguillage
       if      (init[0] == 'i' && init[2] == 'i')
@@ -242,12 +243,12 @@ Standard_CString  Interface_Static::CDef
     return stat->EnumVal(nume);
   }
   if (part[0] == 'i') {
-    Standard_Integer ilim;
+    Standard_Integer ilim = 0;
     if (!stat->IntegerLimit((part[2] == 'a'),ilim)) return "";
     Sprintf(defmess,"%d",ilim);  return defmess;
   }
   if (part[0] == 'r') {
-    Standard_Real rlim;
+    Standard_Real rlim = NAN;
     if (!stat->RealLimit((part[2] == 'a'),rlim)) return "";
     Sprintf(defmess,"%f",rlim);  return defmess;
   }
@@ -263,12 +264,12 @@ Standard_Integer  Interface_Static::IDef
   Handle(Interface_Static) stat = Interface_Static::Static(name);
   if (stat.IsNull()) return 0;
   if (part[0] == 'i') {
-    Standard_Integer ilim;
+    Standard_Integer ilim = 0;
     if (!stat->IntegerLimit((part[2] == 'a'),ilim)) return 0;
     return ilim;
   }
   if (part[0] == 'e') {
-    Standard_Integer startcase,endcase;  Standard_Boolean match;
+    Standard_Integer startcase = 0,endcase = 0;  Standard_Boolean match = 0;
     stat->EnumDef (startcase,endcase,match);
     if (part[1] == 's') return startcase;
     if (part[1] == 'c') return (endcase - startcase + 1);
index 7069c5f3615b123260f8b2a82463d124d37cf3b3..1a7dd158bf32480c04c5057d23afc88457bdcf4b 100644 (file)
@@ -264,18 +264,18 @@ private:
   Interface_ParamType thetype;
   Handle(Standard_Type) theotyp;
   Handle(Interface_Static) thewild;
-  Standard_Integer thelims;
-  Standard_Integer theintlow;
-  Standard_Integer theintup;
-  Standard_Real therealow;
-  Standard_Real therealup;
+  Standard_Integer thelims{};
+  Standard_Integer theintlow{};
+  Standard_Integer theintup{};
+  Standard_Real therealow{};
+  Standard_Real therealup{};
   TCollection_AsciiString theunidef;
   Handle(TColStd_HArray1OfAsciiString) theenums;
   NCollection_DataMap<TCollection_AsciiString, Standard_Integer> theeadds;
-  Interface_StaticSatisfies thesatisf;
+  Interface_StaticSatisfies thesatisf{};
   TCollection_AsciiString thesatisn;
   Standard_Boolean theupdate;
-  Standard_Integer theival;
+  Standard_Integer theival{};
   Handle(TCollection_HAsciiString) thehval;
   Handle(Standard_Transient) theoval;
 
index dd43ebf4282b850b487d6a463b2811736e208a2e..dab2693bad5916fc3a402d37ca618637b92cb38a 100644 (file)
@@ -32,8 +32,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Interface_UndefinedContent,Standard_Transient)
 // Unknown (ceci, a defaut d'un double heritage) : description litterale
 
 
-Interface_UndefinedContent::Interface_UndefinedContent () // Unknown
-{  thenbparams = 0;  thenbstr = 0;  }
+Interface_UndefinedContent::Interface_UndefinedContent () : thenbparams(0), thenbstr(0) // Unknown
+{    }
 
 // ....  Les Parametres ....
 
@@ -182,7 +182,7 @@ Interface_UndefinedContent::ParamValue
     thenbstr --;
   }
 //    Supprimer ce parametre de la liste (qui est un tableau)
-  Standard_Integer np; // svv Jan11 2000 : porting on DEC
+  Standard_Integer np = 0; // svv Jan11 2000 : porting on DEC
   for (np = num+1; np <= thenbparams; np ++)
     theparams->SetValue(np-1,theparams->Value(np));
   theparams->SetValue(thenbparams,0);
@@ -242,7 +242,7 @@ Interface_UndefinedContent::ParamValue
   if (!c1ent) {
 //  Literal : le supprimer et renumeroter les Parametres de type "Entity"
 //  (Remove Literal mais dans un tableau)
-    Standard_Integer i; // svv Jan11 2000 : porting on DEC
+    Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
     for (i = rang+1; i <= thenbstr; i ++)
       thevalues->SetValue(i-1,thevalues->Value(i));
     Handle(TCollection_HAsciiString) nulstr;
index 4d5cce8cbc040f8e513a012d45acdc471faeaefd..f39e28e8af8c4fa78d3e08124b6ef385b9499f4a 100644 (file)
@@ -68,7 +68,7 @@ Standard_Boolean Intf_Interference::Insert(const Intf_TangentZone& LaZone)
 
 // Loop on edges of the TangentZone :
     npcz=myTZones(Iz).NumberOfPoints();
-    Standard_Integer Ipz0, Ipz1, Ipz2;
+    Standard_Integer Ipz0 = 0, Ipz1 = 0, Ipz2 = 0;
     for (Ipz1=1; Ipz1<=npcz; Ipz1++) {
       Ipz0=Ipz1-1;
       if (Ipz0<=0) Ipz0=npcz;
@@ -76,7 +76,7 @@ Standard_Boolean Intf_Interference::Insert(const Intf_TangentZone& LaZone)
 
 // Loop on edges of the new TangentZone and search of the
 // corresponding point or edge:
-      Standard_Integer Ilz1, Ilz2;
+      Standard_Integer Ilz1 = 0, Ilz2 = 0;
       for (Ilz1=1; Ilz1<=nplz; Ilz1++) {
        Ilz2=(Ilz1%nplz)+1;
        
@@ -114,7 +114,7 @@ Standard_Boolean Intf_Interference::Insert(const Intf_TangentZone& LaZone)
     if (lotp!=0) break;
   }
 
-  Standard_Integer Ilc;
+  Standard_Integer Ilc = 0;
   if (lotp!=0) {
     for (Ilc=lotl+1; (((Ilc-1)%nplz)+1)!=lunl; Ilc++) {
       myTZones(lzin).InsertBefore
@@ -159,7 +159,7 @@ void Intf_Interference::Insert(const Intf_SectionPoint& pdeb,
   Standard_Integer TheLS=0;
   Standard_Boolean Begin=Standard_False;
   Intf_SectionPoint TheBout(pfin);
-  Standard_Integer ils, nd, nf;
+  Standard_Integer ils = 0, nd = 0, nf = 0;
   
   for (ils=1; ils<=mySLines.Length(); ils++) {
     Intf_SectionLine& SL=mySLines(ils);
index 8a51000ee90dca0376c13d407249783e540a88d8..abff41272550f7d10c57794e6ebc02ac9c15e80c 100644 (file)
@@ -16,6 +16,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Intf_InterferencePolygon2d.hxx>
 #include <Intf_Polygon2d.hxx>
 #include <Intf_SectionPoint.hxx>
@@ -155,7 +157,7 @@ void Intf_InterferencePolygon2d::Interference
   Bnd_Box2d bSO;
   Bnd_Box2d bST;
 
-  Standard_Integer iObje1, iObje2, n1 = nbso, n2 = Obje2.NbSegments();
+  Standard_Integer iObje1 = 0, iObje2 = 0, n1 = nbso, n2 = Obje2.NbSegments();
   Standard_Real d1 = Obje1.DeflectionOverEstimation(),
     d2 = Obje2.DeflectionOverEstimation();
 
@@ -192,7 +194,7 @@ void Intf_InterferencePolygon2d::Interference
   Bnd_Box2d bSO;
   Bnd_Box2d bST;
 
-  Standard_Integer iObje1, iObje2, n = Obje.NbSegments();
+  Standard_Integer iObje1 = 0, iObje2 = 0, n = Obje.NbSegments();
   Standard_Real d = Obje.DeflectionOverEstimation();
 
   gp_Pnt2d p1b, p1e, p2b, p2e;
@@ -230,11 +232,11 @@ void Intf_InterferencePolygon2d::Clean()
 // if there is no real point of intersection EDGE/EDGE:
   Standard_Integer nbIt=myTZones.Length();
   Standard_Integer decal=0;
-  Standard_Integer addr1, addr2;
+  Standard_Integer addr1 = 0, addr2 = 0;
   Intf_PIType      dim1, dim2;
-  Standard_Real    par;
-  Standard_Integer tsp, tsps;
-  Standard_Integer lpi, ltz;
+  Standard_Real    par = NAN;
+  Standard_Integer tsp = 0, tsps = 0;
+  Standard_Integer lpi = 0, ltz = 0;
   Standard_Boolean Only1Seg=Standard_False;
 
 #define PI1 (myTZones(ltz-decal).GetPoint(lpi))
@@ -242,7 +244,7 @@ void Intf_InterferencePolygon2d::Clean()
 
   for (ltz=1; ltz<=nbIt; ltz++) {
     tsp=tsps=0;
-    Standard_Real pr1mi,pr1ma,pr2mi,pr2ma,delta1,delta2;
+    Standard_Real pr1mi = NAN,pr1ma = NAN,pr2mi = NAN,pr2ma = NAN,delta1 = NAN,delta2 = NAN;
     myTZones(ltz-decal).ParamOnFirst(pr1mi,pr1ma);
     delta1=pr1ma-pr1mi;
     myTZones(ltz-decal).ParamOnSecond(pr2mi,pr2ma);
@@ -437,7 +439,7 @@ void Intf_InterferencePolygon2d::Intersect
     else if (rayIntf>=Tolerance) {
       Standard_Real deltaO=rayIntf/lgO;
       Standard_Real deltaT=rayIntf/lgT;
-      Standard_Real x, y;
+      Standard_Real x = NAN, y = NAN;
       Standard_Real parOdeb=parOSP-deltaO;
       Standard_Real parOfin=parOSP+deltaO;
       Standard_Real parTdeb=parTSP-sigPS*deltaT;
@@ -496,7 +498,7 @@ void Intf_InterferencePolygon2d::Intersect
            parTmax=Max(parTmax, parT[i]);
          }
 
-         Standard_Real    delta;
+         Standard_Real    delta = NAN;
          if (parOdeb<0.) {
            delta=-parOdeb;
            parOdeb=0.;
@@ -565,7 +567,7 @@ void Intf_InterferencePolygon2d::Intersect
   }
   
   //-- lbr : The points too close to each other are suspended
-  Standard_Boolean suppr;
+  Standard_Boolean suppr = 0;
   do { 
     suppr=Standard_False;
     for(Standard_Integer i=2; suppr==Standard_False && i<=nbpi; i++) { 
@@ -621,7 +623,7 @@ void Intf_InterferencePolygon2d::Intersect
       TheTZ.PolygonInsert(thePi(2));
     }
     else {
-      Standard_Integer lpj;
+      Standard_Integer lpj = 0;
       Standard_Integer lmin=1;
       Standard_Integer lmax=1;
       for (lpj=2; lpj<=nbpi; lpj++) {
index 1af8df48912dd8ca4b19ab7417b165a1735f1cb9..12113a8fdbaebf9840cfd17649486bc458f3987b 100644 (file)
@@ -32,9 +32,9 @@ Intf_SectionLine::Intf_SectionLine ()
 //=======================================================================
 
 Intf_SectionLine::Intf_SectionLine (const Intf_SectionLine& Other)
-     : closed(Standard_False)
+     : myPoints(Other.myPoints), closed(Standard_False)
 {
-  myPoints=Other.myPoints;
+  
 }
 
 
index 4d0caf51ea988c77e548b5772eac2d817dc850ee..ee7ff3a897460f13a854bbf9bd40f3aec546add2 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Intf_TangentZone.hxx>
 
 #define  DEBUG_TANGENTZONE 0 
@@ -211,7 +213,7 @@ Standard_Boolean Intf_TangentZone::IsEqual
 {
   if (Result.Length() != Other.Result.Length())
     return Standard_False;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= Result.Length(); i++) {
     if (!Result(i).IsEqual(Other.Result(i)))
       return Standard_False;
@@ -228,7 +230,7 @@ Standard_Boolean Intf_TangentZone::IsEqual
 Standard_Boolean Intf_TangentZone::Contains
  (const Intf_SectionPoint& ThePI) const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= Result.Length(); i++)
     if (ThePI.IsEqual(Result(i)))
       return Standard_True;
@@ -278,7 +280,7 @@ void Intf_TangentZone::InfoSecond(Standard_Integer& segMin,
 Standard_Boolean Intf_TangentZone::RangeContains
  (const Intf_SectionPoint& ThePI) const
 {
-  Standard_Real a, b, c, d;
+  Standard_Real a = NAN, b = NAN, c = NAN, d = NAN;
   ParamOnFirst(a, b);
   ParamOnSecond(c, d);
   if (a<=ThePI.ParamOnFirst() && ThePI.ParamOnFirst()<=b &&
@@ -296,8 +298,8 @@ Standard_Boolean Intf_TangentZone::RangeContains
 Standard_Boolean Intf_TangentZone::HasCommonRange
  (const Intf_TangentZone& Other) const
 {
-  Standard_Real a1,b1,c1,d1;
-  Standard_Real a2,b2,c2,d2;
+  Standard_Real a1 = NAN,b1 = NAN,c1 = NAN,d1 = NAN;
+  Standard_Real a2 = NAN,b2 = NAN,c2 = NAN,d2 = NAN;
   ParamOnFirst(a1, b1);
   ParamOnSecond(a2, b2);
   Other.ParamOnFirst(c1, d1);
index bc78341dbca6fc8589a8fb6a1b07b0b51fef8a03..39f4d9f8542f90d54f8b8638ca8ff349c1a96b09 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <Bnd_Box2d.hxx>
 #include <ElCLib.hxx>
@@ -70,12 +72,12 @@ void  Intf_Tool::Lin2dBox(const gp_Lin2d& L2d,
   }
   else if   (domain.IsVoid())  return;
 
-  Standard_Real xmin, xmax, ymin, ymax;
+  Standard_Real xmin = NAN, xmax = NAN, ymin = NAN, ymax = NAN;
   Standard_Real Xmin=0, Xmax=0, Ymin=0, Ymax=0;
   Standard_Real parmin=-Precision::Infinite();
   Standard_Real parmax=Precision::Infinite();
-  Standard_Real parcur, par1,par2;
-  Standard_Boolean xToSet, yToSet;
+  Standard_Real parcur = NAN, par1 = NAN,par2 = NAN;
+  Standard_Boolean xToSet = 0, yToSet = 0;
 
   domain.Get(xmin,ymin,xmax,ymax);
 
@@ -172,11 +174,11 @@ void  Intf_Tool::Hypr2dBox(const gp_Hypr2d& theHypr2d,
   Standard_Integer nbPi=Inters2d(theHypr2d, domain);
 
   if (nbPi>0) {
-    Standard_Real Xmin, Xmax, Ymin, Ymax;
+    Standard_Real Xmin = NAN, Xmax = NAN, Ymin = NAN, Ymax = NAN;
 
     domain.Get(Xmax, Ymax, Xmin, Ymin);
 
-    Standard_Integer npi;
+    Standard_Integer npi = 0;
     for (npi=0; npi<nbPi; npi++) {
       Xmin=Min(Xmin, xint[npi]);
       Xmax=Max(Xmax, xint[npi]);
@@ -185,8 +187,8 @@ void  Intf_Tool::Hypr2dBox(const gp_Hypr2d& theHypr2d,
     }
     boxHypr2d.Update(Xmin, Ymin, Xmax, Ymax);
 
-    Standard_Integer npj, npk;
-    Standard_Real parmin;
+    Standard_Integer npj = 0, npk = 0;
+    Standard_Real parmin = NAN;
     for (npi=0; npi<nbPi; npi++) {
       npk=npi;
       for (npj=npi+1; npj<nbPi; npj++) 
@@ -236,11 +238,11 @@ void  Intf_Tool::Hypr2dBox(const gp_Hypr2d& theHypr2d,
          endOnCurve[nbSeg-1]=parint[npi];
          out=Standard_True;
 
-         Standard_Integer ipmin;
+         Standard_Integer ipmin = 0;
          if(beginOnCurve[nbSeg-1] < -10.) ipmin = -10;
          else ipmin =  (Standard_Integer)(beginOnCurve[nbSeg-1]);
 
-         Standard_Integer ipmax;
+         Standard_Integer ipmax = 0;
          if(endOnCurve[nbSeg-1] > 10.) ipmax = 10;
          else ipmax =  (Standard_Integer)(endOnCurve[nbSeg-1]);
 
@@ -250,7 +252,7 @@ void  Intf_Tool::Hypr2dBox(const gp_Hypr2d& theHypr2d,
                //                   10);
          ipmin=ipmin*10+1;
          ipmax=ipmax*10-1;
-         Standard_Integer ip, pas=1;
+         Standard_Integer ip = 0, pas=1;
          for (ip=ipmin; ip<=ipmax; ip+=pas) {
            boxHypr2d.Add(ElCLib::Value(Standard_Real(ip)/10., theHypr2d));
            if (Abs(ip)<=10) pas=1;
@@ -277,8 +279,8 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Hypr2d& theCurv,
                                    const Bnd_Box2d& Domain)
 {
   Standard_Integer nbpi=0;
-  Standard_Integer npi;
-  Standard_Real xmin, xmax, ymin, ymax;
+  Standard_Integer npi = 0;
+  Standard_Real xmin = NAN, xmax = NAN, ymin = NAN, ymax = NAN;
 
   Domain.Get(xmin,ymin,xmax,ymax);
 
@@ -379,11 +381,11 @@ void  Intf_Tool::Parab2dBox(const gp_Parab2d& theParab2d,
   Standard_Integer nbPi=Inters2d(theParab2d, domain);
 
   if (nbPi>0) {
-    Standard_Real Xmin, Xmax, Ymin, Ymax;
+    Standard_Real Xmin = NAN, Xmax = NAN, Ymin = NAN, Ymax = NAN;
 
     domain.Get(Xmax, Ymax, Xmin, Ymin);
 
-    Standard_Integer npi;
+    Standard_Integer npi = 0;
     for (npi=0; npi<nbPi; npi++) {
       Xmin=Min(Xmin, xint[npi]);
       Xmax=Max(Xmax, xint[npi]);
@@ -392,8 +394,8 @@ void  Intf_Tool::Parab2dBox(const gp_Parab2d& theParab2d,
     }
     boxParab2d.Update(Xmin, Ymin, Xmax, Ymax);
 
-    Standard_Integer npj, npk;
-    Standard_Real parmin;
+    Standard_Integer npj = 0, npk = 0;
+    Standard_Real parmin = NAN;
     for (npi=0; npi<nbPi; npi++) {
       npk=npi;
       for (npj=npi+1; npj<nbPi; npj++) 
@@ -443,11 +445,11 @@ void  Intf_Tool::Parab2dBox(const gp_Parab2d& theParab2d,
          endOnCurve[nbSeg-1]=parint[npi];
          out=Standard_True;
 
-         Standard_Integer ipmin;
+         Standard_Integer ipmin = 0;
          if(beginOnCurve[nbSeg-1] < -10.) ipmin = -10;
          else ipmin =  (Standard_Integer)(beginOnCurve[nbSeg-1]);
 
-         Standard_Integer ipmax;
+         Standard_Integer ipmax = 0;
          if(endOnCurve[nbSeg-1] > 10.) ipmax = 10;
          else ipmax =  (Standard_Integer)(endOnCurve[nbSeg-1]);
 
@@ -457,7 +459,7 @@ void  Intf_Tool::Parab2dBox(const gp_Parab2d& theParab2d,
                //                   10);
          ipmin=ipmin*10+1;
          ipmax=ipmax*10-1;
-         Standard_Integer ip, pas=1;
+         Standard_Integer ip = 0, pas=1;
          for (ip=ipmin; ip<=ipmax; ip+=pas) {
            boxParab2d.Add(ElCLib::Value(Standard_Real(ip)/10., theParab2d));
            if (Abs(ip)<=10) pas=1;
@@ -484,8 +486,8 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Parab2d& theCurv,
                                    const Bnd_Box2d& Domain)
 {
   Standard_Integer nbpi=0;
-  Standard_Integer npi;
-  Standard_Real xmin, xmax, ymin, ymax;
+  Standard_Integer npi = 0;
+  Standard_Real xmin = NAN, xmax = NAN, ymin = NAN, ymax = NAN;
 
   Domain.Get(xmin,ymin,xmax,ymax);
 
@@ -587,12 +589,12 @@ void  Intf_Tool::LinBox(const gp_Lin& L,
   }
   else if   (domain.IsVoid())  return;
 
-  Standard_Real xmin, xmax, ymin, ymax, zmin, zmax;
+  Standard_Real xmin = NAN, xmax = NAN, ymin = NAN, ymax = NAN, zmin = NAN, zmax = NAN;
   Standard_Real Xmin=0, Xmax=0, Ymin=0, Ymax=0, Zmin=0, Zmax=0;
   Standard_Real parmin=-Precision::Infinite();
   Standard_Real parmax=Precision::Infinite();
-  Standard_Real parcur, par1,par2;
-  Standard_Boolean xToSet, yToSet, zToSet;
+  Standard_Real parcur = NAN, par1 = NAN,par2 = NAN;
+  Standard_Boolean xToSet = 0, yToSet = 0, zToSet = 0;
 
   domain.Get(xmin,ymin,zmin,xmax,ymax,zmax);
 
@@ -723,12 +725,12 @@ void Intf_Tool::HyprBox(const gp_Hypr& theHypr,
     return;
   }
   //
-  Standard_Integer nbPi;
+  Standard_Integer nbPi = 0;
   //
   nbPi=Inters3d(theHypr, domain);
   if (nbPi>0) {
-    Standard_Integer npi;
-    Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
+    Standard_Integer npi = 0;
+    Standard_Real Xmin = NAN, Ymin = NAN, Zmin = NAN, Xmax = NAN, Ymax = NAN, Zmax = NAN;
     //
     domain.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
     //
@@ -778,7 +780,7 @@ void Intf_Tool::HyprBox(const gp_Hypr& theHypr,
          out=Standard_True;
          //
          //modified by NIZNHY-PKV Fri Jul 11 13:54:54 2008f
-         Standard_Real ipmin, ipmax, ip, pas;
+         Standard_Real ipmin = NAN, ipmax = NAN, ip = NAN, pas = NAN;
          //
          ipmin=-10.;
          if (beginOnCurve[nbSeg-1]>ipmin) {
@@ -841,8 +843,8 @@ Standard_Integer Intf_Tool::Inters3d(const gp_Hypr& theCurv,
                                    const Bnd_Box& Domain)
 {
   Standard_Integer nbpi=0;
-  Standard_Integer npi;
-  Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+  Standard_Integer npi = 0;
+  Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
 
   Domain.Get(xmin, ymin, zmin, xmax, ymax, zmax);
 
@@ -1016,8 +1018,8 @@ Standard_Integer Intf_Tool::Inters3d(const gp_Parab& theCurv,
                     const Bnd_Box& Domain)
 {
   Standard_Integer nbpi=0;
-  Standard_Integer npi;
-  Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+  Standard_Integer npi = 0;
+  Standard_Real xmin = NAN, ymin = NAN, zmin = NAN, xmax = NAN, ymax = NAN, zmax = NAN;
 
   Domain.Get(xmin, ymin, zmin, xmax, ymax, zmax);
 
@@ -1200,8 +1202,8 @@ void  Intf_Tool::ParabBox(const gp_Parab& theParab,
   Standard_Integer nbPi = Inters3d(theParab, domain);
 
   if (nbPi > 0) {
-    Standard_Integer npi;
-    Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
+    Standard_Integer npi = 0;
+    Standard_Real Xmin = NAN, Ymin = NAN, Zmin = NAN, Xmax = NAN, Ymax = NAN, Zmax = NAN;
 
     domain.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
 
@@ -1245,17 +1247,17 @@ void  Intf_Tool::ParabBox(const gp_Parab& theParab,
           endOnCurve[nbSeg - 1] = parint[npi];
           out = Standard_True;
 
-          Standard_Integer ipmin;
+          Standard_Integer ipmin = 0;
           if (beginOnCurve[nbSeg - 1] < -10.) ipmin = -10;
           else ipmin = (Standard_Integer)(beginOnCurve[nbSeg - 1]);
 
-          Standard_Integer ipmax;
+          Standard_Integer ipmax = 0;
           if (endOnCurve[nbSeg - 1] > 10.) ipmax = 10;
           else ipmax = (Standard_Integer)(endOnCurve[nbSeg - 1]);
           
           ipmin = ipmin * 10 + 1;
           ipmax = ipmax * 10 - 1;
-          Standard_Integer ip, pas = 1;
+          Standard_Integer ip = 0, pas = 1;
           for (ip = ipmin; ip <= ipmax; ip += pas) {
             boxParab.Add(ElCLib::Value(Standard_Real(ip) / 10., theParab));
             if (Abs(ip) <= 10) pas = 1;
index 7d520eb0629c90350e78abcd7bdeef0745c2d7c7..0c6c58598542feb408d660f5de7c46286d1303ee 100644 (file)
@@ -82,13 +82,13 @@ private:
 
 
   Standard_Integer nbSeg;
-  Standard_Real beginOnCurve[6];
-  Standard_Real endOnCurve[6];
-  Standard_Integer bord[12];
-  Standard_Real xint[12];
-  Standard_Real yint[12];
-  Standard_Real zint[12];
-  Standard_Real parint[12];
+  Standard_Real beginOnCurve[6]{};
+  Standard_Real endOnCurve[6]{};
+  Standard_Integer bord[12]{};
+  Standard_Real xint[12]{};
+  Standard_Real yint[12]{};
+  Standard_Real zint[12]{};
+  Standard_Real parint[12]{};
 
 
 };
index a2108f7f205247d57db599673bab78c498cde567..e38ac585108e0246b2a0cea7f9e0c3753bbfffef 100644 (file)
 //purpose  : 
 //=======================================================================
 Intrv_Interval::Intrv_Interval 
-  () : myStart(RealFirst()), myEnd  (RealLast ())
+  () : myStart(RealFirst()), myEnd  (RealLast ()), myTolStart((Standard_ShortReal)Epsilon(RealFirst())), myTolEnd((Standard_ShortReal)Epsilon(RealLast ()))
 {
-  myTolStart = (Standard_ShortReal)Epsilon(RealFirst());
-  myTolEnd   = (Standard_ShortReal)Epsilon(RealLast ());
+  
+  
 }
 
 //=======================================================================
@@ -49,10 +49,10 @@ Intrv_Interval::Intrv_Interval
 
 Intrv_Interval::Intrv_Interval 
   (const Standard_Real Start, const Standard_Real End) :
-  myStart(Start), myEnd  (End)
+  myStart(Start), myEnd  (End), myTolStart((Standard_ShortReal)Epsilon(myStart)), myTolEnd((Standard_ShortReal)Epsilon(myEnd))
 {
-  myTolStart = (Standard_ShortReal)Epsilon(myStart);
-  myTolEnd   = (Standard_ShortReal)Epsilon(myEnd);
+  
+  
 }
 
 //=======================================================================
index 9e4468e3b06878bff503be6c93d44ce0420a17c6..432a19148b50435a62496658e26f7af85ffae751 100644 (file)
@@ -147,7 +147,7 @@ void Intrv_Intervals::Subtract (const Intrv_Interval& Tool)
 
 void Intrv_Intervals::Subtract (const Intrv_Intervals& Tool)
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   for (index = 1; index <= Tool.myInter.Length(); index++)
     Subtract (Tool.myInter(index));
 }
@@ -246,7 +246,7 @@ void Intrv_Intervals::Unite (const Intrv_Interval& Tool)
 
 void Intrv_Intervals::Unite (const Intrv_Intervals& Tool)
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   for (index = 1; index<=Tool.myInter.Length(); index++)
     Unite (Tool.myInter(index));
 }
index 7fa4fec88ff227e5753a409fee4338e0ec88d271..e42eec6ff6fbea08962b7fba38995e2a30bd847b 100644 (file)
@@ -308,7 +308,7 @@ Standard_Boolean LDOMBasicString::GetInteger (Standard_Integer& aResult) const
   case LDOM_AsciiDocClear:
   case LDOM_AsciiHashed:
     {
-      char * ptr;
+      char * ptr = nullptr;
       errno = 0;
       long aValue = strtol ((const char *)myVal.ptr, &ptr, 10);
       if (ptr == myVal.ptr || errno == ERANGE || errno == EINVAL)
index 9137f8f832df798e31ab6ec451a6451f5d929d40..b635e956ab47f332ec5102be763ed340cb3438e1 100644 (file)
@@ -276,7 +276,7 @@ Standard_Boolean LDOMParser::ParseElement (Standard_IStream& theIStream, Standar
   for(;;) {
     LDOM_Node::NodeType aLocType;
     LDOMBasicString     aTextValue;
-    char *aTextStr;
+    char *aTextStr = nullptr;
     LDOM_XmlReader::RecordType aType = ReadRecord (* myReader, theIStream, myCurrentData, theDocStart);
     switch (aType) {
     case LDOM_XmlReader::XML_UNKNOWN:
@@ -324,7 +324,7 @@ Standard_Boolean LDOMParser::ParseElement (Standard_IStream& theIStream, Standar
     case LDOM_XmlReader::XML_TEXT:
       aLocType = LDOM_Node::TEXT_NODE;
       {
-        Standard_Integer aTextLen;
+        Standard_Integer aTextLen = 0;
         aTextStr = LDOM_CharReference::Decode ((char *)myCurrentData.str(), aTextLen);
         // try to convert to integer
         if (IsDigit(aTextStr[0])) {
@@ -338,7 +338,7 @@ Standard_Boolean LDOMParser::ParseElement (Standard_IStream& theIStream, Standar
     case LDOM_XmlReader::XML_COMMENT:
       aLocType = LDOM_Node::COMMENT_NODE;
       {
-        Standard_Integer aTextLen;
+        Standard_Integer aTextLen = 0;
         aTextStr = LDOM_CharReference::Decode ((char *)myCurrentData.str(), aTextLen);
         aTextValue = LDOMBasicString (aTextStr, aTextLen, myDocument);
       }
index b6334dbe57512b7fd1c097d70a9a821d7487e003..0fd63cb42073a5495401f9fbaeabd6aa79101203 100644 (file)
@@ -39,7 +39,7 @@ LDOM_BasicElement& LDOM_BasicElement::Create
   void * aMem = aDoc -> Allocate (sizeof(LDOM_BasicElement));
   LDOM_BasicElement * aNewElem = new (aMem) LDOM_BasicElement;
 
-  Standard_Integer aHash;
+  Standard_Integer aHash = 0;
 //  aDoc -> HashedAllocate (aString, strlen(aString), aNewElem -> myTagName);
   aNewElem -> myTagName =  aDoc -> HashedAllocate (aName, aLen, aHash);
 
@@ -156,7 +156,7 @@ const LDOM_BasicAttribute& LDOM_BasicElement::GetAttribute
                                      (const LDOMBasicString& aName,
                                       const LDOM_BasicNode   * aLastCh) const
 {
-  const LDOM_BasicNode * aNode;
+  const LDOM_BasicNode * aNode = nullptr;
   if (aLastCh)
     aNode = aLastCh -> GetSibling (); 
   else
@@ -184,8 +184,8 @@ const LDOM_BasicAttribute * LDOM_BasicElement::GetFirstAttribute
                                      const LDOM_BasicNode **& thePrevNode) const
 {
   //  Find the First Attribute as well as the Last Child among siblings
-  const LDOM_BasicNode * aFirstAttr;
-  const LDOM_BasicNode ** aPrevNode;
+  const LDOM_BasicNode * aFirstAttr = nullptr;
+  const LDOM_BasicNode ** aPrevNode = nullptr;
   if (theLastCh) {
     aFirstAttr = theLastCh -> mySibling; 
     aPrevNode  = (const LDOM_BasicNode **) &(theLastCh -> mySibling);
@@ -220,13 +220,13 @@ const LDOM_BasicNode * LDOM_BasicElement::AddAttribute
                                    const LDOM_BasicNode           * aLastCh)
 {
   //  Create attribute
-  Standard_Integer aHash;
+  Standard_Integer aHash = 0;
   LDOM_BasicAttribute& anAttr =
     LDOM_BasicAttribute::Create (anAttrName, aDocument, aHash);
   anAttr.myValue = anAttrValue;
 
   //  Initialize the loop of attribute name search
-  const LDOM_BasicNode ** aPrNode;
+  const LDOM_BasicNode ** aPrNode = nullptr;
   const LDOM_BasicAttribute * aFirstAttr = GetFirstAttribute (aLastCh, aPrNode);
   const char * aNameStr = anAttrName.GetString();
 
@@ -283,7 +283,7 @@ const LDOM_BasicNode * LDOM_BasicElement::RemoveAttribute
   if ((myAttributeMask & anAttributeMask) == 0) {
     ; // maybe cause for exception
   } else {
-    const LDOM_BasicNode ** aPrevNode;  // dummy
+    const LDOM_BasicNode ** aPrevNode = nullptr;  // dummy
     const LDOM_BasicAttribute * anAttr = GetFirstAttribute (aLastCh, aPrevNode);
     while (anAttr) {
       if (anAttr -> getNodeType () == LDOM_Node::ATTRIBUTE_NODE)
@@ -379,7 +379,7 @@ void LDOM_BasicElement::AddElementsByTagName
 void LDOM_BasicElement::AddAttributes (LDOM_NodeList&       aList,
                                        const LDOM_BasicNode * aLastChild) const
 {
-  const LDOM_BasicNode * aBNode;
+  const LDOM_BasicNode * aBNode = nullptr;
   if (aLastChild)
     aBNode = aLastChild -> GetSibling();
   else
@@ -411,7 +411,7 @@ void LDOM_BasicElement::ReplaceElement
   for (; aBNode != NULL; aBNode = aBNode -> GetSibling()) {
     if (aBNode -> isNull())
       continue;
-    LDOM_BasicNode * aNewBNode;
+    LDOM_BasicNode * aNewBNode = nullptr;
     const LDOM_Node::NodeType aNewNodeType = aBNode -> getNodeType();
     switch (aNewNodeType) {
     case LDOM_Node::ELEMENT_NODE:
@@ -450,7 +450,7 @@ void LDOM_BasicElement::ReplaceElement
 loop_attr:
   LDOM_BasicNode * aLastAttr = (LDOM_BasicNode *) aLastChild;
   for (; aBNode != NULL; aBNode = aBNode -> GetSibling()) {
-    Standard_Integer aHash;
+    Standard_Integer aHash = 0;
     if (aBNode -> isNull()) continue;
     const LDOM_BasicAttribute * aBNodeAtt= (const LDOM_BasicAttribute *) aBNode;
     LDOM_BasicAttribute * aNewAtt =
index a6917beb68409d814ca58d38a8151d727a5f7def..8077e024e5d57f8864345a807ead1227a1ff7ded 100644 (file)
@@ -72,8 +72,8 @@ char * LDOM_CharReference::Decode (char * theSrc, Standard_Integer& theLen)
       memmove (aDstPtr, aSrcPtr, aByteCount);
     aSrcPtr = aPtr;
     if (aSrcPtr[1] == '#') {
-      unsigned long aChar;
-      char *        aNewPtr;
+      unsigned long aChar = 0;
+      char *        aNewPtr = nullptr;
       aDstPtr = aSrcPtr - anIncrCount + 1;
       if (aSrcPtr[2] == 'x')
         aChar = strtoul (&aSrcPtr[3], &aNewPtr, 16);         // hex encoding
@@ -147,7 +147,7 @@ char * LDOM_CharReference::Encode (const char* theSrc, Standard_Integer& theLen,
     entityRef("&apos;", 6)
   };
 
-  const char * endSrc, * ptrSrc = theSrc;
+  const char * endSrc = nullptr, * ptrSrc = theSrc;
   char       * aDest = (char *) theSrc;
   Standard_Integer aCount = 0;
   //    Analyse if there is a non-standard character in the string
index 132f5bc588fb086f2604c4d308c56de6576d4ad2..f8547d5cffff85248170790aa285615754515256 100644 (file)
@@ -25,9 +25,9 @@
 //purpose  : Constructor
 //=======================================================================
 
-LDOM_Document::LDOM_Document ()
+LDOM_Document::LDOM_Document () : myMemManager(new LDOM_MemManager (MEMORY_GRANULE))
 {
-  myMemManager = new LDOM_MemManager (MEMORY_GRANULE);
+  
 }
 
 //=======================================================================
@@ -35,9 +35,9 @@ LDOM_Document::LDOM_Document ()
 //purpose  : Constructor to be used in LDOM_MemManager::Doc()
 //=======================================================================
 
-LDOM_Document::LDOM_Document (const LDOM_MemManager& aMemManager)
+LDOM_Document::LDOM_Document (const LDOM_MemManager& aMemManager) : myMemManager(&aMemManager)
 {
-  myMemManager = &aMemManager;
+  
 }
 
 //=======================================================================
index b65287bd2965650bfeb3e0f1625ba50a0d548318..47ca3e624953dacb3e33017a45561786aab0f035 100644 (file)
@@ -48,10 +48,10 @@ inline Standard_Boolean compareStrings (char * const           str,
 
 inline LDOM_MemManager::MemBlock::MemBlock (const Standard_Integer aSize,
                                             LDOM_MemManager::MemBlock * aFirst)
-     : mySize (aSize), myNext (aFirst)
+     : mySize (aSize), myFreeSpace(myBlock = new Standard_Integer [aSize]), myEndBlock(myBlock + aSize), myNext (aFirst)
 {
-  myFreeSpace = myBlock = new Standard_Integer [aSize];
-  myEndBlock = myBlock + aSize;
+  
+  
 }
 
 //=======================================================================
@@ -118,7 +118,7 @@ LDOM_MemManager::HashTable::HashTable (/* const Standard_Integer   aMask, */
                                        LDOM_MemManager&         aMemManager)
      : myManager        (aMemManager)
 {
-  Standard_Integer m, nKeys = HASH_MASK + 1;
+  Standard_Integer m = 0, nKeys = HASH_MASK + 1;
 /*
   Standard_Integer m     = aMask;
   Standard_Integer nKeys = 1;
@@ -330,7 +330,7 @@ void LDOM_MemManager::HashedAllocate         (const char             * aString,
                                               LDOMBasicString&       theResult)
 {
   theResult.myType = LDOMBasicString::LDOM_AsciiHashed;
-  Standard_Integer aDummy;
+  Standard_Integer aDummy = 0;
   const char * aHashedString = HashedAllocate (aString, theLen, aDummy);
   if (aHashedString != NULL)
     theResult.myVal.ptr = (void *) aHashedString;
index a5ea3dfbe1df95ee15fce22691f4a0dfa0744a72..7adcb949fa99f5f547482b9ac2179f22f6b9b7f5 100644 (file)
@@ -27,9 +27,9 @@ IMPLEMENT_SEQUENCE (LDOM_BasicNodeSequence, LDOM_BasicNodePtr)
 //purpose  : Constructor
 //=======================================================================
 
-LDOM_NodeList::LDOM_NodeList (  )
+LDOM_NodeList::LDOM_NodeList (  ) : mySeq(new LDOM_BasicNodeSequence)
 {
-  mySeq = new LDOM_BasicNodeSequence;
+  
 }
 
 //=======================================================================
@@ -38,9 +38,9 @@ LDOM_NodeList::LDOM_NodeList (  )
 //=======================================================================
 
 LDOM_NodeList::LDOM_NodeList (const Handle(LDOM_MemManager)& aDoc)
-     : myDoc (aDoc)
+     : myDoc (aDoc), mySeq(new LDOM_BasicNodeSequence)
 {
-  mySeq = new LDOM_BasicNodeSequence;
+  
 }
 
 //=======================================================================
@@ -58,11 +58,11 @@ void LDOM_NodeList::Append (const LDOM_BasicNode& aNode) const
 //purpose  : Copy constructor
 //=======================================================================
 
-LDOM_NodeList::LDOM_NodeList (const LDOM_NodeList& theOther)
+LDOM_NodeList::LDOM_NodeList (const LDOM_NodeList& theOther) : mySeq(new LDOM_BasicNodeSequence), myDoc(theOther.myDoc)
 {
-  mySeq = new LDOM_BasicNodeSequence;
+  
   * mySeq = * theOther.mySeq;
-  myDoc = theOther.myDoc;
+  
 }
 
 //=======================================================================
index 47347213463f3f508b176b0439e39e52c57c26d3..2bebdfe097bba0d10751bf9c7987b2bd96b5ffe9 100644 (file)
@@ -37,10 +37,10 @@ LDOM_SBuffer::LDOM_StringElem::LDOM_StringElem
 //=======================================================================
 LDOM_SBuffer::LDOM_SBuffer (const Standard_Integer theMaxBuf)
      : myMaxBuf (theMaxBuf), myLength(0),
-       myAlloc (new NCollection_IncAllocator)
+       myCurString(myFirstString), myAlloc (new NCollection_IncAllocator)
 {
   myFirstString = new (myAlloc) LDOM_StringElem (theMaxBuf, myAlloc);
-  myCurString   = myFirstString;
+  
 }
 
 //=======================================================================
index 17c15c90a32e0c0b412523d1ea7e21d72a6f34a5..88e84ec8b254e7d62d99bf6cb7b3ed43bfba6dc3 100644 (file)
@@ -90,7 +90,7 @@ LDOM_XmlReader::RecordType LDOM_XmlReader::ReadRecord (Standard_IStream& theIStr
   theData.Clear();
   myError.Clear();
   ParserState aState = STATE_WAITING;
-  const char * aStartData = NULL, * aNameEnd = NULL, * aPtr;
+  const char * aStartData = NULL, * aNameEnd = NULL, * aPtr = nullptr;
   LDOMBasicString anAttrName, anAttrValue;
   char anAttDelimiter = '\0';
   Standard_Boolean aHasRead = Standard_False;
@@ -129,7 +129,7 @@ LDOM_XmlReader::RecordType LDOM_XmlReader::ReadRecord (Standard_IStream& theIStr
 
         // Read the full buffer and reset start and end buffer pointers
         myPtr    = &myBuffer[0];
-        Standard_Size aNBytes;
+        Standard_Size aNBytes = 0;
 
         if (myTagPerStep)
         {
@@ -578,7 +578,7 @@ attr_name:
             ePtr = strchr (aDataString, '\0');
           }
 
-          Standard_Integer aDataLen;
+          Standard_Integer aDataLen = 0;
           aDataString = LDOM_CharReference::Decode (aDataString, aDataLen);
           if (IsDigit(aDataString[0])) {
             if (getInteger (anAttrValue, aDataString, ePtr))
@@ -635,7 +635,7 @@ static Standard_Boolean isName (const char  * aString,
                                 const char  * aStringEnd,
                                 const char  *& aNameEnd)
 {
-  Standard_Boolean aResult;
+  Standard_Boolean aResult = 0;
   char aCh = aString[0];
   if (IsAlphabetic(aCh) || aCh == '_' || aCh == ':') {
     const char * aPtr = &aString[1];
@@ -692,7 +692,7 @@ Standard_Boolean LDOM_XmlReader::getInteger (LDOMBasicString&    theValue,
                                              const char          * theStart,
                                              const char          * theEnd)
 {
-  char * ptr;
+  char * ptr = nullptr;
   errno = 0;
   if (theEnd - theStart == 1 || theStart[0] != '0')
   {
index 9703f025fa8a612a1789afe68c5396da1df1235d..11e5c33a6a2bf7f9dbd2d7555975c2543d979563 100644 (file)
@@ -89,7 +89,7 @@ class LDOM_XmlReader
   const LDOM_BasicNode          * myLastChild;  // optim. reading attributes
   const char                    * myPtr;
   const char                    * myEndPtr;
-  char                          myBuffer [XML_BUFFER_SIZE+4];
+  char                          myBuffer [XML_BUFFER_SIZE+4]{};
   Standard_Boolean              myTagPerStep;
   LDOM_OSStream::BOMType        myBOM;
 };
index 950d5692bec2c8b372f96eebf83d1e173c890506..0a2c07923802c164be3037263d98f1be9b10a227 100644 (file)
@@ -327,7 +327,7 @@ void LDOM_XmlWriter::Write (Standard_OStream& theOStream, const LDOMBasicString&
   {
     case LDOMBasicString::LDOM_Integer:
     {
-      Standard_Integer aValue;
+      Standard_Integer aValue = 0;
       theString.GetInteger (aValue);
 
       TCollection_AsciiString aStrValue (aValue);
@@ -355,7 +355,7 @@ void LDOM_XmlWriter::Write (Standard_OStream& theOStream, const LDOMBasicString&
       const char* aStr = theString.GetString();
       if (aStr)
       {
-        Standard_Integer aLen;
+        Standard_Integer aLen = 0;
         char* encStr = LDOM_CharReference::Encode (aStr, aLen, Standard_False);
         if (aLen > 0)
         {
@@ -408,7 +408,7 @@ void LDOM_XmlWriter::WriteAttribute (Standard_OStream& theOStream, const LDOM_No
   // Integer attribute value
   if (aValueStr.Type() == LDOMBasicString::LDOM_Integer)
   {
-    Standard_Integer anIntValue;
+    Standard_Integer anIntValue = 0;
     aValueStr.GetInteger (anIntValue);
 
     aLength = (Standard_Integer)(20 + strlen (aName));
@@ -429,7 +429,7 @@ void LDOM_XmlWriter::WriteAttribute (Standard_OStream& theOStream, const LDOM_No
   }
   else // String attribute value
   {
-    char* encStr;
+    char* encStr = nullptr;
     const char* aValue = aValueStr.GetString();
     if (aValueStr.Type() == LDOMBasicString::LDOM_AsciiDocClear)
     {
index 2678b6263fe01b52d8f28fc3c0863db85b388e79..020798b306145338170379056cc21ecb34bc4f40 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <LProp_AnalyticCurInf.hxx>
 #include <LProp_CurAndInf.hxx>
@@ -45,7 +47,7 @@ void LProp_AnalyticCurInf::Perform (const GeomAbs_CurveType  CType,
   
   case GeomAbs_Ellipse: 
     {
-      Standard_Real U1,U2,U3,U4;
+      Standard_Real U1 = NAN,U2 = NAN,U3 = NAN,U4 = NAN;
       Standard_Real UFPlus2PI = UFirst + 2*M_PI;
       
       U1 = ElCLib::InPeriod(0.0     ,UFirst,UFPlus2PI);
index 0623d1792c5ae8c43f352b2f6c41a362ba1c5588..99b5d42fe7d1ba9d3c698355c1a69819ebda784d 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Law.hxx>
 
 #include <Adaptor3d_Curve.hxx>
@@ -29,7 +31,7 @@
 
 Handle(Law_BSpFunc) Law::MixBnd(const Handle(Law_Linear)& Lin)
 {
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   Lin->Bounds(f,l);
   TColStd_Array1OfReal Knots(1,4);
   TColStd_Array1OfInteger Mults(1,4);
@@ -50,7 +52,7 @@ Handle(TColStd_HArray1OfReal) Law::MixBnd
  const TColStd_Array1OfInteger& Mults,
  const Handle(Law_Linear)&      Lin)
 {
-  Standard_Integer nbpol = 0, nbfk = 0, i, j, k = 0;
+  Standard_Integer nbpol = 0, nbfk = 0, i = 0, j = 0, k = 0;
   for(i = Mults.Lower(); i <= Mults.Upper(); i++){
     nbfk += Mults(i);
   }
@@ -119,7 +121,7 @@ Handle(TColStd_HArray1OfReal) Law::MixTgt
   Standard_Real first = Knots(Knots.Lower());
   Standard_Real last = Knots(Knots.Upper());
   Standard_Real piv = Knots(Index);
-  Standard_Integer nbpol = 0, nbfk = 0, i, j, k = 0;
+  Standard_Integer nbpol = 0, nbfk = 0, i = 0, j = 0, k = 0;
   for(i = Mults.Lower(); i <= Mults.Upper(); i++){
     nbfk += Mults(i);
   }
@@ -155,7 +157,7 @@ Handle(Law_BSpline) Law::Reparametrize(const Adaptor3d_Curve&   Curve,
 {
   // On evalue la longeur approximative de la courbe.
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real DDFirst = DFirst, DDLast = DLast;
   if(HasDF && Rev) DDFirst = -DFirst;
   if(HasDL && Rev) DDLast = -DLast;
@@ -164,7 +166,7 @@ Handle(Law_BSpline) Law::Reparametrize(const Adaptor3d_Curve&   Curve,
   gp_Pnt P1,P2;
   Standard_Real U1 = Curve.FirstParameter();
   Standard_Real U2 = Curve.LastParameter();
-  Standard_Real U, DU, Length = 0.;
+  Standard_Real U = NAN, DU = NAN, Length = 0.;
   if(!Rev){
     P1 = Curve.Value(U1);
     U = U1;
@@ -192,7 +194,7 @@ Handle(Law_BSpline) Law::Reparametrize(const Adaptor3d_Curve&   Curve,
   Standard_Real DCorde = Length / ( NbPoints - 1); 
   Standard_Real Corde  = DCorde;
   Standard_Integer Index = 1;
-  Standard_Real Alpha;
+  Standard_Real Alpha = NAN;
   Standard_Real fac = 1./(NbPoints-1);
   
   point->SetValue(1,ucourbe(1));
@@ -249,7 +251,7 @@ Handle(Law_BSpline) Law::Scale(const Standard_Real    First,
                               const Standard_Real    VFirst,
                               const Standard_Real    VLast)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real Milieu = 0.5*(First+Last);
   TColStd_Array1OfReal   knot(1,3);
   TColStd_Array1OfReal   fknot(1,10);
index 883f09cf95d2d216483f15f54e33e58217f48a96..cc1cc075bd74475b650e116afd9f3ed174b71158 100644 (file)
@@ -16,6 +16,8 @@
 
 // pmn -> 17/01/1996 added : Continuity, (Nb)Intervals, D2, Trim
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <Law_BSpFunc.hxx>
 #include <Law_BSpline.hxx>
@@ -68,7 +70,7 @@ Standard_Integer Law_BSpFunc::NbIntervals(const GeomAbs_Shape S) const
 {
   Standard_Integer myNbIntervals = 1;
   if ( S > Continuity()) {
-    Standard_Integer Cont;
+    Standard_Integer Cont = 0;
     switch ( S) {
     case GeomAbs_G1:
     case GeomAbs_G2:
@@ -94,7 +96,7 @@ Standard_Integer Law_BSpFunc::NbIntervals(const GeomAbs_Shape S) const
        Standard_Integer Nb = curv->NbKnots();
        Standard_Integer Index1 = 0;
        Standard_Integer Index2 = 0;
-       Standard_Real newFirst, newLast;
+       Standard_Real newFirst = NAN, newLast = NAN;
        TColStd_Array1OfReal    TK(1,Nb);
        TColStd_Array1OfInteger TM(1,Nb);
        curv->Knots(TK);
@@ -131,7 +133,7 @@ void Law_BSpFunc::Intervals(TColStd_Array1OfReal& T,
 {
   Standard_Integer myNbIntervals = 1;
   if ( S > Continuity()) {
-    Standard_Integer Cont;
+    Standard_Integer Cont = 0;
     switch ( S) {
     case GeomAbs_G1:
     case GeomAbs_G2:
@@ -157,7 +159,7 @@ void Law_BSpFunc::Intervals(TColStd_Array1OfReal& T,
        Standard_Integer Nb = curv->NbKnots();
        Standard_Integer Index1 = 0;
        Standard_Integer Index2 = 0;
-       Standard_Real newFirst, newLast;
+       Standard_Real newFirst = NAN, newLast = NAN;
        TColStd_Array1OfReal    TK(1,Nb);
        TColStd_Array1OfInteger TM(1,Nb);
        curv->Knots(TK);
index 0f245a42b0e323dd4e5b77d7ad278fd8341bf554..b9ad712ff7c15444eb01df4e1debc632c90363aa 100644 (file)
@@ -20,6 +20,8 @@
 //            bon appel a LocateParameter (PRO6973) et mise en conformite avec
 //            le cdl de LocateU, lorsque U est un noeud (PRO6988)
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <BSplCLib_KnotDistribution.hxx>
 #include <BSplCLib_MultDistribution.hxx>
@@ -50,7 +52,7 @@ static void SetPoles(const TColStd_Array1OfReal& Poles,
                     const TColStd_Array1OfReal& Weights,
                     TColStd_Array1OfReal&       FP)
 {
-  Standard_Integer i,j = FP.Lower();
+  Standard_Integer i = 0,j = FP.Lower();
   for (i = Poles.Lower(); i <= Poles.Upper(); i++) {
     Standard_Real w = Weights(i);
     FP(j) = Poles(i) * w;
@@ -71,7 +73,7 @@ static void GetPoles(const TColStd_Array1OfReal& FP,
                     TColStd_Array1OfReal&       Weights)
      
 {
-  Standard_Integer i,j = FP.Lower();
+  Standard_Integer i = 0,j = FP.Lower();
   for (i = Poles.Lower(); i <= Poles.Upper(); i++) {
     Standard_Real w = FP(j+1);
     Weights(i) = w;
@@ -160,7 +162,7 @@ static void KnotAnalysis
     Periodic ? CKnots.Upper() :  BSplCLib::LastUKnotIndex (Degree,CMults);
   MaxKnotMult = 0;
   if (LastKM - FirstKM != 1) {
-    Standard_Integer Multi;
+    Standard_Integer Multi = 0;
     for (Standard_Integer i = FirstKM + 1; i < LastKM; i++) {
       Multi = CMults (i);
       MaxKnotMult = Max (MaxKnotMult, Multi);
@@ -176,7 +178,7 @@ static void KnotAnalysis
 
 static Standard_Boolean Rational(const TColStd_Array1OfReal& W)
 {
-  Standard_Integer i, n = W.Length();
+  Standard_Integer i = 0, n = W.Length();
   Standard_Boolean rat = Standard_False;
   for (i = 1; i < n; i++) {
     rat =  Abs(W(i) - W(i+1)) > gp::Resolution();
@@ -220,7 +222,7 @@ Law_BSpline::Law_BSpline
  const TColStd_Array1OfInteger&  Mults,
  const Standard_Integer          Degree,
  const Standard_Boolean          Periodic) :
- rational(Standard_False),periodic(Periodic), deg(Degree)  
+ rational(Standard_False),periodic(Periodic), deg(Degree), poles(new TColStd_HArray1OfReal(1,Poles.Length())), knots(new TColStd_HArray1OfReal(1,Knots.Length())), mults(new TColStd_HArray1OfInteger(1,Mults.Length()))  
 {
   // check
   
@@ -233,14 +235,14 @@ Law_BSpline::Law_BSpline
   
   // copy arrays
   
-  poles =  new TColStd_HArray1OfReal(1,Poles.Length());
+  
   poles->ChangeArray1() = Poles;
   
   
-  knots = new TColStd_HArray1OfReal(1,Knots.Length());
+  
   knots->ChangeArray1() = Knots;
   
-  mults = new TColStd_HArray1OfInteger(1,Mults.Length());
+  
   mults->ChangeArray1() = Mults;
   
   UpdateKnots();
@@ -275,7 +277,7 @@ Law_BSpline::Law_BSpline
   if (Weights.Length() != Poles.Length())
     throw Standard_ConstructionError("Law_BSpline");
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = Weights.Lower(); i <= Weights.Upper(); i++) {
     if (Weights(i) <= gp::Resolution())  
       throw Standard_ConstructionError("Law_BSpline");
@@ -402,7 +404,7 @@ void Law_BSpline::IncreaseMultiplicity  (const Standard_Integer I1,
   Handle(TColStd_HArray1OfReal)  tk = knots;
   TColStd_Array1OfReal k((knots->Array1())(I1),I1,I2);
   TColStd_Array1OfInteger m(I1,I2);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = I1; i <= I2; i++)
     m(i) = M - mults->Value(i);
   InsertKnots(k,m,Epsilon(1.));
@@ -455,7 +457,7 @@ void  Law_BSpline::InsertKnots(const TColStd_Array1OfReal& Knots,
                               const Standard_Boolean Add)
 {
   // Check and compute new sizes
-  Standard_Integer nbpoles,nbknots;
+  Standard_Integer nbpoles = 0,nbknots = 0;
   
   if (!BSplCLib::PrepareInsertKnots(deg,periodic,
                                    knots->Array1(),mults->Array1(),
@@ -810,7 +812,7 @@ void Law_BSpline::Reverse ()
 { 
   BSplCLib::Reverse(knots->ChangeArray1());
   BSplCLib::Reverse(mults->ChangeArray1());
-  Standard_Integer last;
+  Standard_Integer last = 0;
   if (periodic)
     last = flatknots->Upper() - deg - 1;
   else
@@ -847,9 +849,9 @@ void Law_BSpline::Segment(const Standard_Real U1,
   Standard_Real Eps = Epsilon(Max(Abs(U1),Abs(U2)));
   Standard_Real delta = U2 - U1;
   
-  Standard_Real NewU1, NewU2;
-  Standard_Real U;
-  Standard_Integer index;
+  Standard_Real NewU1 = NAN, NewU2 = NAN;
+  Standard_Real U = NAN;
+  Standard_Integer index = 0;
   
   TColStd_Array1OfReal    Knots(1,2);
   TColStd_Array1OfInteger Mults(1,2);
@@ -896,7 +898,7 @@ void Law_BSpline::Segment(const Standard_Real U1,
   Handle(TColStd_HArray1OfInteger) 
     nmults = new TColStd_HArray1OfInteger(1,nbknots);
   
-  Standard_Integer i , k = 1;
+  Standard_Integer i = 0 , k = 1;
   for ( i = index1; i<= index2; i++) {
     nknots->SetValue(k, knots->Value(i));
     nmults->SetValue(k, mults->Value(i));
@@ -1060,7 +1062,7 @@ void Law_BSpline::SetOrigin(const Standard_Integer Index)
 {
   Standard_NoSuchObject_Raise_if( !periodic,
                                 "Law_BSpline::SetOrigin");
-  Standard_Integer i,k;
+  Standard_Integer i = 0,k = 0;
   Standard_Integer first = FirstUKnotIndex();
   Standard_Integer last  = LastUKnotIndex();
   
@@ -1148,7 +1150,7 @@ void Law_BSpline::SetOrigin(const Standard_Integer Index)
 void Law_BSpline::SetNotPeriodic () 
 { 
   if ( periodic) {
-    Standard_Integer NbKnots, NbPoles;
+    Standard_Integer NbKnots = 0, NbPoles = 0;
     BSplCLib::PrepareUnperiodize( deg, mults->Array1(),NbKnots,NbPoles);
     
     Handle(TColStd_HArray1OfReal) npoles 
@@ -1304,7 +1306,7 @@ void Law_BSpline::UpdateKnots()
 
 void Law_BSpline::PeriodicNormalization(Standard_Real&  Parameter) const 
 {
-  Standard_Real Period ;
+  Standard_Real Period = NAN ;
   
   if (periodic){
     Period = flatknots->Value(flatknots->Upper() - deg) - 
@@ -1388,7 +1390,7 @@ Standard_Integer Law_BSpline::Degree () const
 
 Standard_Real Law_BSpline::Value(const Standard_Real U)const 
 {
-  Standard_Real  P;
+  Standard_Real  P = NAN;
   D0(U,P);
   return P;
 }
@@ -1495,7 +1497,7 @@ void Law_BSpline::D3(const Standard_Real U ,
 Standard_Real Law_BSpline::DN(const Standard_Real    U,
                              const Standard_Integer N ) const
 {
-  Standard_Real V;
+  Standard_Real V = NAN;
   if (rational) {
     BSplCLib::DN(U,N,0,deg,periodic,POLES,&weights->Array1(),FKNOTS,FMULTS,V);
   }
@@ -1629,7 +1631,7 @@ Standard_Real Law_BSpline::LocalValue
  const Standard_Integer FromK1,
  const Standard_Integer ToK2)   const
 {
-  Standard_Real P;
+  Standard_Real P = NAN;
   LocalD0(U,FromK1,ToK2,P);
   return P;
 }
@@ -1761,7 +1763,7 @@ Standard_Real Law_BSpline::LocalDN
   BSplCLib::LocateParameter(deg, FKNOTS, U, periodic, FromK1,ToK2, index, u);
   index = BSplCLib::FlatIndex(deg,index,mults->Array1(),periodic);
   
-  Standard_Real V;
+  Standard_Real V = NAN;
   if (rational) {
     BSplCLib::DN(u,N,index,deg,periodic,POLES,&weights->Array1(),FKNOTS,FMULTS,V);
   }
@@ -1887,7 +1889,7 @@ void Law_BSpline::Weights
   if (IsRational())
     W = weights->Array1();
   else {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = W.Lower(); i <= W.Upper(); i++)
       W(i) = 1.;
   }
@@ -1972,10 +1974,10 @@ void Law_BSpline::
                      Standard_Integer&      ErrorStatus) 
 {
   TColStd_Array1OfReal new_poles(1, poles->Length());
-  Standard_Real delta,
-  *poles_array,
-  *new_poles_array,
-  delta_derivative;
+  Standard_Real delta = NAN,
+  *poles_array = nullptr,
+  *new_poles_array = nullptr,
+  delta_derivative = NAN;
   const Standard_Integer dimension = 1 ;
   D1(U, 
      delta,
index a02a415af26a51409c81120fb572e6c2f041c697..06d4051bdf783b8d3c062c0c906f654b1aeec73d 100644 (file)
@@ -16,6 +16,8 @@
 
 // pmn -> 17/01/1996 added : Continuity, (Nb)Intervals, D2, Trim
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <Law_Composite.hxx>
 #include <Law_Function.hxx>
@@ -87,7 +89,7 @@ void Law_Composite::Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) co
   Law_ListIteratorOfLaws It(funclist);
   Handle(Law_Function) func;
   Handle(TColStd_HArray1OfReal) LocT;
-  Standard_Integer nb_index, Iloc, IGlob=2;
+  Standard_Integer nb_index = 0, Iloc = 0, IGlob=2;
 
   func = funclist.First();
   func->Bounds(T(1),T(2));
@@ -179,7 +181,7 @@ void Law_Composite::Bounds(Standard_Real& PFirst, Standard_Real& PLast)
 
 void Law_Composite::Prepare(Standard_Real& W)
 {
-  Standard_Real f,l, Wtest, Eps;
+  Standard_Real f = NAN,l = NAN, Wtest = NAN, Eps = NAN;
   if (W-TFirst < TLast-W) { Eps = PTol; }
   else                    { Eps = -PTol;}
 
index 486d16edfe14117a630a9531b12237d1b1d02f89..3a025c1b2fc14af9b280999260fd7d66accf476a 100644 (file)
@@ -14,6 +14,8 @@
 
 // pmn -> modified 17/01/1996 : utilisation de Curve() et SetCurve()
 
+#include <math.h>
+
 #include <gp_Pnt2d.hxx>
 #include <Law_Interpol.hxx>
 #include <Law_Interpolate.hxx>
@@ -113,8 +115,8 @@ void Law_Interpol::Set(const TColgp_Array1OfPnt2d& ParAndRad,
   Handle(TColStd_HArray1OfReal) rad;
   if(Periodic) rad = new TColStd_HArray1OfReal(1,nbp - 1);
   else rad = new TColStd_HArray1OfReal(1,nbp);
-  Standard_Real x,y;
-  Standard_Integer i;
+  Standard_Real x = NAN,y = NAN;
+  Standard_Integer i = 0;
   for(i = 1; i <= nbp; i++){
     ParAndRad(l + i - 1).Coord(x,y);
     par->SetValue(i,x);
@@ -150,8 +152,8 @@ void Law_Interpol::SetInRelative(const TColgp_Array1OfPnt2d& ParAndRad,
   Handle(TColStd_HArray1OfReal) rad;
   if(Periodic) rad = new TColStd_HArray1OfReal(1,nbp - 1);
   else rad = new TColStd_HArray1OfReal(1,nbp);
-  Standard_Real x,y;
-  Standard_Integer i;
+  Standard_Real x = NAN,y = NAN;
+  Standard_Integer i = 0;
   for(i = 1; i <= nbp; i++){
     ParAndRad(l + i - 1).Coord(x,y);
     par->SetValue(i,(Uf*(x-wd)+Ud*(wf-x))/(wf-wd));
@@ -187,8 +189,8 @@ void Law_Interpol::Set(const TColgp_Array1OfPnt2d& ParAndRad,
   Handle(TColStd_HArray1OfReal) rad;
   if(Periodic) rad = new TColStd_HArray1OfReal(1,nbp - 1);
   else rad = new TColStd_HArray1OfReal(1,nbp);
-  Standard_Real x,y;
-  Standard_Integer i;
+  Standard_Real x = NAN,y = NAN;
+  Standard_Integer i = 0;
   for(i = 1; i <= nbp; i++){
     ParAndRad(l + i - 1).Coord(x,y);
     par->SetValue(i,x);
@@ -219,8 +221,8 @@ void Law_Interpol::SetInRelative(const TColgp_Array1OfPnt2d& ParAndRad,
   Handle(TColStd_HArray1OfReal) rad;
   if(Periodic) rad = new TColStd_HArray1OfReal(1,nbp - 1);
   else rad = new TColStd_HArray1OfReal(1,nbp);
-  Standard_Real x,y;
-  Standard_Integer i;
+  Standard_Real x = NAN,y = NAN;
+  Standard_Integer i = 0;
   for(i = 1; i <= nbp; i++){
     ParAndRad(l + i - 1).Coord(x,y);
     par->SetValue(i,(Uf*(x-wd)+Ud*(wf-x))/(wf-wd));
index 9c3b06fa5a245bbfa53117684e0bf587f4501a1d..11acfa9830d84e6e7a12f66e393bc0ae5041c9e3 100644 (file)
@@ -16,6 +16,8 @@
 
 // Programme cree 
 
+#include <math.h>
+
 #include <BSplCLib.hxx>
 #include <Law_BSpline.hxx>
 #include <Law_Interpolate.hxx>
@@ -32,8 +34,8 @@
 static Standard_Boolean CheckParameters
 (const TColStd_Array1OfReal&  Parameters) 
 {
-  Standard_Integer ii;
-  Standard_Real distance;
+  Standard_Integer ii = 0;
+  Standard_Real distance = NAN;
   Standard_Boolean result = Standard_True;
   for (ii = Parameters.Lower() ; result && ii < Parameters.Upper() ; ii++) {
     distance = Parameters.Value(ii+1) - Parameters.Value(ii);
@@ -50,8 +52,8 @@ static void  BuildParameters(const Standard_Boolean         PeriodicFlag,
                             const TColStd_Array1OfReal&    PointsArray,
                             Handle(TColStd_HArray1OfReal)& ParametersPtr)
 {
-  Standard_Integer ii, index = 2;
-  Standard_Real distance;
+  Standard_Integer ii = 0, index = 2;
+  Standard_Real distance = NAN;
   Standard_Integer num_parameters = PointsArray.Length();
   if (PeriodicFlag) {
     num_parameters += 1;
@@ -123,7 +125,7 @@ static void BuildTangents(const TColStd_Array1OfReal&  PointsArray,
                          const TColStd_Array1OfReal&  ParametersArray)
 {
   Standard_Integer  degree = 3;//,ii;
-  Standard_Real *point_array, *parameter_array, eval_result[2];
+  Standard_Real *point_array = nullptr, *parameter_array = nullptr, eval_result[2];
   
   if ( PointsArray.Length() < 3) {
     throw Standard_ConstructionError();
@@ -173,15 +175,15 @@ Law_Interpolate::Law_Interpolate
  myTolerance(Tolerance),
  myPoints(PointsPtr),
  myIsDone(Standard_False),
- myPeriodic(PeriodicFlag),
+ myTangents(new TColStd_HArray1OfReal (myPoints->Lower(),
+                                         myPoints->Upper())), myTangentFlags(new TColStd_HArray1OfBoolean(myPoints->Lower(),
+                                               myPoints->Upper())), myPeriodic(PeriodicFlag),
  myTangentRequest(Standard_False) 
      
 {
 //Standard_Integer ii;
-  myTangents = new TColStd_HArray1OfReal (myPoints->Lower(),
-                                         myPoints->Upper());
-  myTangentFlags = new TColStd_HArray1OfBoolean(myPoints->Lower(),
-                                               myPoints->Upper());
+  
+  
 
   BuildParameters(PeriodicFlag,
                  PointsPtr->Array1(),
@@ -233,7 +235,7 @@ void Law_Interpolate::Load
  const Handle(TColStd_HArray1OfBoolean)& TangentFlagsPtr) 
 {
 //Standard_Boolean result;
-  Standard_Integer ii;
+  Standard_Integer ii = 0;
   myTangentRequest = Standard_True;
   myTangentFlags = TangentFlagsPtr;
   if (Tangents.Length() != myPoints->Length() ||
@@ -284,20 +286,20 @@ void Law_Interpolate::Perform()
 
 void Law_Interpolate::PerformPeriodic()
 { 
-  Standard_Integer degree,
-  ii,
+  Standard_Integer degree = 0,
+  ii = 0,
 //jj,
-  index,
-  index1,
+  index = 0,
+  index1 = 0,
 //index2,
-  mult_index,
-  half_order,
-  inversion_problem,
-  num_points,
-  num_distinct_knots,
-  num_poles;
+  mult_index = 0,
+  half_order = 0,
+  inversion_problem = 0,
+  num_points = 0,
+  num_distinct_knots = 0,
+  num_poles = 0;
   
-  Standard_Real period;
+  Standard_Real period = NAN;
   
 //gp_Pnt a_point;
   
@@ -438,18 +440,18 @@ void Law_Interpolate::PerformPeriodic()
 
 void Law_Interpolate::PerformNonPeriodic() 
 {
-  Standard_Integer degree,
-  ii,
+  Standard_Integer degree = 0,
+  ii = 0,
 //jj,
-  index,
-  index1,
-  index2,
-  index3,
-  mult_index,
-  inversion_problem,
-  num_points,
-  num_distinct_knots,
-  num_poles;
+  index = 0,
+  index1 = 0,
+  index2 = 0,
+  index3 = 0,
+  mult_index = 0,
+  inversion_problem = 0,
+  num_points = 0,
+  num_distinct_knots = 0,
+  num_poles = 0;
   
   num_points =
     num_distinct_knots =
index 42e5f982567d65ed8a23994d27433cb7e1220ce7..efc799a10978424db8ce20da235fbcefbf1eff5f 100644 (file)
@@ -16,6 +16,8 @@
 
 // pmn -> 17/01/1996 added : Continuity, (Nb)Interals, D2, Trim
 
+#include <math.h>
+
 #include <Law_Function.hxx>
 #include <Law_Linear.hxx>
 #include <Standard_Type.hxx>
@@ -106,7 +108,7 @@ Handle(Law_Function) Law_Linear::Trim(const Standard_Real PFirst,
                                      const Standard_Real ) const 
 {
   Handle(Law_Linear) l = new (Law_Linear)();
-  Standard_Real Vdeb, Vfin;
+  Standard_Real Vdeb = NAN, Vfin = NAN;
   Vdeb = (( PFirst-pdeb)*valfin + (pfin-PFirst)*valdeb)/(pfin-pdeb);
   Vfin = (( PLast-pdeb)*valfin + (pfin-PLast)*valdeb)/(pfin-pdeb);
   l->Set(PFirst, Vdeb, PLast, Vfin);
index b548cd196a52e622d2918a60eba3f9e6d62ffaa2..18c93d28ac402fb9779bc3213987bfbea9c63d9b 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_Curve.hxx>
 #include <GeomLProp_CLProps.hxx>
 #include <gp_Dir.hxx>
@@ -32,10 +34,10 @@ void LocalAnalysis_CurveContinuity::CurvC0( GeomLProp_CLProps& Curv1,
 void LocalAnalysis_CurveContinuity::CurvC1(  GeomLProp_CLProps& Curv1, 
                                                GeomLProp_CLProps& Curv2)
 { gp_Vec V1, V2;
-  Standard_Real ang; 
+  Standard_Real ang = NAN
   V1 = Curv1.D1();
   V2 = Curv2.D1();
-  Standard_Real norm1,norm2
+  Standard_Real norm1 = NAN,norm2 = NAN
   norm1 = V1.Magnitude();
   norm2 = V2.Magnitude();
  
@@ -57,7 +59,7 @@ void LocalAnalysis_CurveContinuity::CurvC2(GeomLProp_CLProps& Curv1,
                                     GeomLProp_CLProps& Curv2)
 { gp_Vec V1, V2, V12, V22;
 //  gp_Dir D1, D2;
-  Standard_Real norm1, norm2, norm12, norm22,ang;
+  Standard_Real norm1 = NAN, norm2 = NAN, norm12 = NAN, norm22 = NAN,ang = NAN;
   V1 = Curv1.D1();
   V2 = Curv2.D1();
   V12 = Curv1.D2();
@@ -91,7 +93,7 @@ void LocalAnalysis_CurveContinuity::CurvC2(GeomLProp_CLProps& Curv1,
 void LocalAnalysis_CurveContinuity::CurvG1 (   GeomLProp_CLProps& Curv1, 
                                        GeomLProp_CLProps & Curv2) 
 { gp_Dir Tang1,Tang2;
-  Standard_Real ang;
+  Standard_Real ang = NAN;
    if (Curv1.IsTangentDefined() && Curv2.IsTangentDefined ()) 
      {   Curv1.Tangent(Tang1);
          Curv2.Tangent(Tang2);
@@ -109,7 +111,7 @@ void LocalAnalysis_CurveContinuity::CurvG2( GeomLProp_CLProps& Curv1,
                                      GeomLProp_CLProps & Curv2 ) 
 { gp_Vec V1, V2;
   gp_Dir D1, D2;
-  Standard_Real ang;
+  Standard_Real ang = NAN;
   Standard_Real epscrb= 8*myepsC0/(myMaxLon*myMaxLon); 
  
   if (Curv1.IsTangentDefined() && Curv2.IsTangentDefined())
@@ -155,18 +157,18 @@ LocalAnalysis_CurveContinuity::LocalAnalysis_CurveContinuity(const Handle(Geom_C
   myCourbC2(0.0),
   myG2Variation(0.0),
   myLambda1(0.0),
-  myLambda2(0.0)
-{ myTypeCont = Order;
-  myepsnul= Epsnul; 
-  myMaxLon=Maxlen;
-  myepsC0= EpsC0;
-  myepsC1= EpsC1;
-  myepsC2= EpsC2;
-  myepsG1= EpsG1;
-  myepsG2= EpsG2;
-  myperce=Percent;
-
-  myIsDone = Standard_True;
+  myLambda2(0.0), myTypeCont(Order), myepsnul(Epsnul), myMaxLon(Maxlen), myepsC0(EpsC0), myepsC1(EpsC1), myepsC2(EpsC2), myepsG1(EpsG1), myepsG2(EpsG2), myperce(Percent), myIsDone(Standard_True)
+{ 
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
  
   switch ( Order)
        { case GeomAbs_C0 : { //TypeCont=GeomAbs_C0;
@@ -229,7 +231,7 @@ Standard_Boolean LocalAnalysis_CurveContinuity::IsC1() const
 /*********************************************************************************/
 
 Standard_Boolean LocalAnalysis_CurveContinuity::IsC2() const  
-{ Standard_Real epsil1, epsil2;
+{ Standard_Real epsil1 = NAN, epsil2 = NAN;
 
   if (!myIsDone) { throw StdFail_NotDone();}
   if ( IsC1())
@@ -258,8 +260,8 @@ Standard_Boolean LocalAnalysis_CurveContinuity::IsG1() const
 /*********************************************************************************/
 
 Standard_Boolean LocalAnalysis_CurveContinuity::IsG2()const 
-{ Standard_Real CRBINF, CRBNUL;
-  Standard_Integer IETA1, IETA2;
+{ Standard_Real CRBINF = NAN, CRBNUL = NAN;
+  Standard_Integer IETA1 = 0, IETA2 = 0;
         // etat des coubures IETA. -> 0 Crbure nulle 
        //                         -> 1 Crbure finie
        //                         -> 2 Crbure infinie
index 550d56e3d2b983c54e4000fe22a33f63670310a5..34f62cfaddc077a9f4b0afccbd80520bff78b183 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Curve.hxx>
 #include <Geom_Surface.hxx>
 #include <GeomLProp_SLProps.hxx>
@@ -38,7 +40,7 @@ void LocalAnalysis_SurfaceContinuity::SurfC0 (const GeomLProp_SLProps& Surf1,
 void LocalAnalysis_SurfaceContinuity::SurfC1(  GeomLProp_SLProps& Surf1, 
                                        GeomLProp_SLProps & Surf2) 
 { gp_Vec V1u, V2u, V1v, V2v;
-  Standard_Real norm1u, norm2u, norm1v, norm2v,angu,angv
+  Standard_Real norm1u = NAN, norm2u = NAN, norm1v = NAN, norm2v = NAN,angu = NAN,angv = NAN
   
   V1u = Surf1.D1U();
   V2u = Surf2.D1U();
@@ -75,8 +77,8 @@ void LocalAnalysis_SurfaceContinuity::SurfC2(  GeomLProp_SLProps& Surf1,
                                                GeomLProp_SLProps& Surf2)
 
 { gp_Vec V11u, V12u, V21u, V22u, V11v, V12v, V21v, V22v;
-  Standard_Real norm11u, norm12u, norm21u, norm22u, norm11v, norm12v, norm21v, norm22v;
-  Standard_Real ang;
+  Standard_Real norm11u = NAN, norm12u = NAN, norm21u = NAN, norm22u = NAN, norm11v = NAN, norm12v = NAN, norm21v = NAN, norm22v = NAN;
+  Standard_Real ang = NAN;
   V11u = Surf1.D1U();
   V12u = Surf2.D1U();
   V21u = Surf1.D2U();
@@ -150,8 +152,8 @@ void LocalAnalysis_SurfaceContinuity::SurfG1(  GeomLProp_SLProps& Surf1,
 void   LocalAnalysis_SurfaceContinuity::SurfG2 ( GeomLProp_SLProps& Surf1, 
                                           GeomLProp_SLProps & Surf2)
 { gp_Dir DMIN1, DMIN2, DMAX1, DMAX2;
-  Standard_Real RMIN1,RMIN2,RMAX1,RMAX2;
-  Standard_Real  x1, x2, y1, y2, z1, z2;
+  Standard_Real RMIN1 = NAN,RMIN2 = NAN,RMAX1 = NAN,RMAX2 = NAN;
+  Standard_Real  x1 = NAN, x2 = NAN, y1 = NAN, y2 = NAN, z1 = NAN, z2 = NAN;
  
   if ( Surf1.IsCurvatureDefined() && Surf2.IsCurvatureDefined())
     { 
@@ -175,7 +177,7 @@ void   LocalAnalysis_SurfaceContinuity::SurfG2 ( GeomLProp_SLProps& Surf1,
       myZETA1 = (RMAX1-RMIN1)/2;
       myZETA2 = (RMAX2-RMIN2)/2;
       myZETA = (myZETA1+myZETA2)/2;
-      Standard_Real DETA,DZETA
+      Standard_Real DETA = NAN,DZETA = NAN
       DETA = ( myETA1- myETA2)/2;
       DZETA =( myZETA1- myZETA2)/2;
        myGap= Abs(DETA) + sqrt( DZETA*DZETA*Cos(myAlpha)*Cos(myAlpha)
@@ -209,15 +211,15 @@ LocalAnalysis_SurfaceContinuity::LocalAnalysis_SurfaceContinuity(const Standard_
   myZETA2(0.0),
   myZETA(0.0),
   myAlpha(0.0),
-  myGap(0.0)
-{ myepsnul=EpsNul;
-  myepsC0= EpsC0;
-  myepsC1= EpsC1;
-  myepsC2= EpsC2;
-  myepsG1= EpsG1;
-  myperce= Percent;
-  mymaxlen= Maxlen;
-  myIsDone = Standard_True;
+  myepsnul(EpsNul), myepsC0(EpsC0), myepsC1(EpsC1), myepsC2(EpsC2), myepsG1(EpsG1), myperce(Percent), mymaxlen(Maxlen), myGap(0.0), myIsDone(Standard_True)
+{ 
+  
+  
+  
+  
+  
+  
+  
 }
  void LocalAnalysis_SurfaceContinuity::ComputeAnalysis(GeomLProp_SLProps& Surf1,
                                                       GeomLProp_SLProps& Surf2,
@@ -281,16 +283,16 @@ LocalAnalysis_SurfaceContinuity::LocalAnalysis_SurfaceContinuity( const Handle(G
   myZETA2(0.0),
   myZETA(0.0),
   myAlpha(0.0),
-  myGap(0.0)
-{ myTypeCont = Ordre;
-  myepsnul=EpsNul;
-  myepsC0= EpsC0;
-  myepsC1= EpsC1;
-  myepsC2= EpsC2;
-  myepsG1= EpsG1;
-  myperce= Percent;
-  mymaxlen= Maxlen;
-  myIsDone = Standard_True;
+  myTypeCont(Ordre), myepsnul(EpsNul), myepsC0(EpsC0), myepsC1(EpsC1), myepsC2(EpsC2), myepsG1(EpsG1), myperce(Percent), mymaxlen(Maxlen), myGap(0.0), myIsDone(Standard_True)
+{ 
+  
+  
+  
+  
+  
+  
+  
+  
   switch ( Ordre )
        { case GeomAbs_C0 : {
                               GeomLProp_SLProps Surfa1 ( Surf1, u1, v1, 0, myepsnul);
@@ -359,18 +361,18 @@ LocalAnalysis_SurfaceContinuity::LocalAnalysis_SurfaceContinuity(const Handle(Ge
   myZETA2(0.0),
   myZETA(0.0),
   myAlpha(0.0),
-  myGap(0.0)
-{ Standard_Real pard1, parf1, pard2, parf2, u1, v1, u2, v2;
+  myTypeCont(Ordre), myepsnul(EpsNul), myepsC0(EpsC0), myepsC1(EpsC1), myepsC2(EpsC2), myepsG1(EpsG1), myperce(Percent), mymaxlen(Maxlen), myGap(0.0), myIsDone(Standard_True)
+{ Standard_Real pard1 = NAN, parf1 = NAN, pard2 = NAN, parf2 = NAN, u1 = NAN, v1 = NAN, u2 = NAN, v2 = NAN;
+  
+  
+  
+  
+  
+  
+  
+  
+  
   
-  myTypeCont = Ordre;
-  myepsnul=EpsNul;
-  myepsC0= EpsC0;
-  myepsC1= EpsC1;
-  myepsC2= EpsC2;
-  myepsG1= EpsG1;
-  myperce= Percent;
-  mymaxlen= Maxlen;
-  myIsDone = Standard_True;
 
   pard1 = curv1->FirstParameter();
   pard2 = curv2->FirstParameter();
@@ -444,7 +446,7 @@ Standard_Boolean LocalAnalysis_SurfaceContinuity::IsC1() const
 /*********************************************************************************/
 
 Standard_Boolean LocalAnalysis_SurfaceContinuity::IsC2() const 
-{ Standard_Real eps1u, eps1v, eps2u, eps2v;
+{ Standard_Real eps1u = NAN, eps1v = NAN, eps2u = NAN, eps2v = NAN;
 
   if (!myIsDone) { throw StdFail_NotDone();}
   if ( IsC1())
@@ -478,8 +480,8 @@ Standard_Boolean LocalAnalysis_SurfaceContinuity::IsG1() const
 /*********************************************************************************/
 
 Standard_Boolean LocalAnalysis_SurfaceContinuity::IsG2()const 
-{ Standard_Real EPSNL;
-  Standard_Integer itype;
+{ Standard_Real EPSNL = NAN;
+  Standard_Integer itype = 0;
  
   if (!myIsDone) { throw StdFail_NotDone();} 
   itype =0;
index 000233e384ad1c66a603b4ad87b90b85aa5a2bf9..3311f2de0eb653e719440a0b4ad3ed8c5a64e42f 100644 (file)
@@ -32,13 +32,13 @@ MAT_Arc::MAT_Arc (const Standard_Integer      ArcIndex,
                  const Handle(MAT_BasicElt)& SecondElement)
  : arcIndex(ArcIndex),
    geomIndex(GeomIndex),
-   firstArcLeft  (0),
+   firstElement(FirstElement), secondElement(SecondElement), firstArcLeft  (0),
    firstArcRight (0),
    secondArcRight (0),
    secondArcLeft (0)   
 {
-  firstElement  = FirstElement;
-  secondElement = SecondElement;
+  
+  
 }
 
 //========================================================================
index efb415598c15ad624984ce17e6b051d79f854322..7ae618fd272d16f5964c995e92750f453274ee8a 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(MAT_Bisector,Standard_Transient)
 
-MAT_Bisector::MAT_Bisector()
+MAT_Bisector::MAT_Bisector() : thebisectornumber(-1), thefirstparameter(Precision::Infinite()), thesecondparameter(Precision::Infinite()), thelistofbisectors(new MAT_ListOfBisector())
 {
-  thebisectornumber = -1;
-  thefirstparameter  = Precision::Infinite();
-  thesecondparameter = Precision::Infinite();
-  thelistofbisectors = new MAT_ListOfBisector();
+  
+  
+  
+  
 }
 
 void MAT_Bisector::AddBisector(const Handle(MAT_Bisector)& abisector) const
@@ -173,7 +173,7 @@ Standard_Real MAT_Bisector::SecondParameter() const
 void MAT_Bisector::Dump(const Standard_Integer ashift,
                         const Standard_Integer alevel) const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   for(i=0; i<ashift; i++)std::cout<<"  ";
   std::cout<<" BISECTOR : "<<thebisectornumber<<std::endl;
index 8b064b90d661ca8de87d1fe748fac2473d246f17..ac436a01cd4ba6ae1131abd1e71c7cc774e65e9d 100644 (file)
@@ -111,18 +111,18 @@ private:
 
 
   Standard_Integer thebisectornumber;
-  Standard_Integer theindexnumber;
+  Standard_Integer theindexnumber{};
   Handle(MAT_Edge) thefirstedge;
   Handle(MAT_Edge) thesecondedge;
   Handle(MAT_ListOfBisector) thelistofbisectors;
-  Standard_Integer theissuepoint;
-  Standard_Integer theendpoint;
-  Standard_Integer thefirstvector;
-  Standard_Integer thesecondvector;
-  Standard_Real thesense;
+  Standard_Integer theissuepoint{};
+  Standard_Integer theendpoint{};
+  Standard_Integer thefirstvector{};
+  Standard_Integer thesecondvector{};
+  Standard_Real thesense{};
   Standard_Real thefirstparameter;
   Standard_Real thesecondparameter;
-  Standard_Real distissuepoint;
+  Standard_Real distissuepoint{};
 
 
 };
index bbfdbfba448adf46d4d1ef44ce44fd2f5b67cfba..8309fa7d73b9f2d26d8acf53e9f2d19f9ce4f640 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <MAT_Arc.hxx>
 #include <MAT_Bisector.hxx>
 #include <MAT_DataMapIteratorOfDataMapOfIntegerBasicElt.hxx>
@@ -57,15 +59,15 @@ void MAT_Graph::Perform(const Standard_Boolean             SemiInfinite,
                        const Standard_Integer             NbBasicElts,
                        const Standard_Integer             NbArcs)
 {
-  Standard_Integer        NbRoots;
+  Standard_Integer        NbRoots = 0;
   Handle(MAT_Arc)         FirstArc;
   Handle(MAT_Arc)         CurrentArc;
   Handle(MAT_Node)        Extremite;
   Standard_Integer        IndTabArcs = 1;
-  Standard_Integer        IndTabNodes;
-  Standard_Integer        i;
-  Standard_Real           DistExt;
-  Standard_Integer        IndExt;
+  Standard_Integer        IndTabNodes = 0;
+  Standard_Integer        i = 0;
+  Standard_Real           DistExt = NAN;
+  Standard_Integer        IndExt = 0;
   Handle(MAT_Arc)         PreviousArc = CurrentArc;
 
   //------------------------
@@ -251,7 +253,7 @@ void MAT_Graph::FusionOfBasicElts(const Standard_Integer  IndexElt1,
   
   if (Elt1 == Elt2) return;
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Handle(MAT_Zone) Zone2   = new MAT_Zone(Elt2);
 
   //--------------------------------------------------------------------
@@ -386,7 +388,7 @@ void MAT_Graph::FusionOfArcs(const Handle(MAT_Arc)& Arc1,
   // Note: the Arc2 is actually a reference to a handle contained in theArcs map;
   // it is necessary to create copy of that handle and use only it to access
   // that object, since the handle contained in the map is destroyed by UnBind()
-  Handle(MAT_Arc) anArc2 = Arc2;
+  const Handle(MAT_Arc)& anArc2 = Arc2;
   theArcs .UnBind(Arc2->Index());
   numberOfArcs--;
   
@@ -484,7 +486,7 @@ Handle(MAT_BasicElt)  MAT_Graph::ChangeBasicElt(const Standard_Integer Index)
 //=============================================================================
 void MAT_Graph::UpDateNodes (Standard_Integer&  IndTabNodes)
 {  
-  Standard_Integer    i;
+  Standard_Integer    i = 0;
   Handle(MAT_Node)    Bout;
   Handle(MAT_Arc)     CurrentArc;
   
@@ -512,7 +514,7 @@ static Handle(MAT_Arc) MakeArc(const Handle(MAT_Bisector)&     aBisector,
   Handle(MAT_Arc)              NextArc;
   Handle(MAT_Node)             Extremite;
   Handle(MAT_ListOfBisector)   BisectorList;
-  Standard_Real                DistExt;
+  Standard_Real                DistExt = NAN;
   
 #ifdef OCCT_DEBUG_Graph
   std::cout<<"Construction Arc : Index"<<aBisector->IndexNumber()<<std::endl;
index 1d26dd5eaa8aa4d603d861d6f21dd83acc10a0b4..af1e61f85a28efc8e7c73f92b6174b5848aaa82f 100644 (file)
@@ -30,9 +30,9 @@ MAT_Node::MAT_Node(const Standard_Integer     GeomIndex,
                   const Standard_Real        Distance)
      : nodeIndex(0),
        geomIndex(GeomIndex),
-       distance(Distance)
+       aLinkedArc(LinkedArc.get()), distance(Distance)
 {
-  aLinkedArc = LinkedArc.get();
+  
 }
 
 //=============================================================================
index 05b80abc630d356962f71790c9c6a9be153e8d70..0ed804070aaf4d7dc715084df5eee2d408e60a6a 100644 (file)
@@ -80,7 +80,7 @@ private:
   Standard_EXPORT Handle(MAT_Node) NodeForTurn (const Handle(MAT_Arc)& anArc, const Handle(MAT_BasicElt)& aBasicElt, const MAT_Side aSide) const;
 
   MAT_SequenceOfArc frontier;
-  Standard_Boolean limited;
+  Standard_Boolean limited{};
 
 
 };
index 8434853f67ee8d6e1b50f588d7eca2ebfa2639cd..b00572d9533ccdde1f2baa9bfd6a0496e87008a3 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Adaptor2d_OffsetCurve.hxx>
 #include <Geom2d_CartesianPoint.hxx>
 #include <Geom2d_Geometry.hxx>
@@ -71,10 +73,10 @@ static Standard_Real CrossProd(const Handle(Geom2d_Geometry)& Geom1,
 //=============================================================================
 MAT2d_Circuit::MAT2d_Circuit(const GeomAbs_JoinType aJoinType,
                              const Standard_Boolean IsOpenResult)
-: direction(0.0)
+: direction(0.0), myJoinType(aJoinType), myIsOpenResult(IsOpenResult)
 {
-  myJoinType = aJoinType;
-  myIsOpenResult = IsOpenResult;
+  
+  
 }
 
 //=============================================================================
@@ -88,7 +90,7 @@ void  MAT2d_Circuit::Perform
    const Standard_Boolean                     Trigo)
 {
   Standard_Integer          NbLines = FigItem.Length();
-  Standard_Integer          i;
+  Standard_Integer          i = 0;
   TColStd_Array1OfBoolean   Open(1,NbLines);
   MAT2d_SequenceOfConnexion SVide;
   Handle(MAT2d_Connexion)   ConnexionNul;
@@ -211,7 +213,7 @@ Standard_Boolean MAT2d_Circuit::IsSharpCorner(const Handle(Geom2d_Geometry)& Geo
                                               const Handle(Geom2d_Geometry)& Geom2,
                                               const Standard_Real Direction) const
 {
-  Standard_Real    DotProd;
+  Standard_Real    DotProd = NAN;
   Standard_Real    ProVec = CrossProd (Geom1,Geom2,DotProd);
   Standard_Integer NbTest = 1;
   Standard_Real    DU = Precision::Confusion();
@@ -254,7 +256,7 @@ Standard_Boolean MAT2d_Circuit::IsSharpCorner(const Handle(Geom2d_Geometry)& Geo
     // de calcul
     // Si pas dintersection => saillant.
     // Sinon                => rentrant.
-    Standard_Real D ;
+    Standard_Real D = NAN ;
     Standard_Real Tol   = Precision::Confusion();
     Standard_Real MilC1 = (C1->LastParameter() + C1->FirstParameter())*0.5;
     Standard_Real MilC2 = (C2->LastParameter() + C2->FirstParameter())*0.5;
@@ -355,10 +357,10 @@ void  MAT2d_Circuit::ConstructCircuit
 {
   Handle(MAT2d_Connexion)            PrevC,CurC;
   TColGeom2d_SequenceOfGeometry      SetOfItem;
-  Standard_Integer                   NbConnexions;
-  Standard_Integer                   ILastItem;
-  Standard_Integer                   IndLast;
-  Standard_Integer                   i;
+  Standard_Integer                   NbConnexions = 0;
+  Standard_Integer                   ILastItem = 0;
+  Standard_Integer                   IndLast = 0;
+  Standard_Integer                   i = 0;
   
   NbConnexions = Road.Path().Length();
   //-----------------------------------------------------
@@ -476,7 +478,7 @@ void  MAT2d_Circuit::ConstructCircuit
 void MAT2d_Circuit::InitOpen (TColGeom2d_SequenceOfGeometry& Line) const 
 { 
   Handle(Geom2d_TrimmedCurve) Curve;
-  Standard_Real               DotProd;
+  Standard_Real               DotProd = NAN;
 
   Curve = Handle(Geom2d_TrimmedCurve)::DownCast(Line.First());
   Line.InsertBefore(1,new Geom2d_CartesianPoint(Curve->StartPoint()));
@@ -507,8 +509,8 @@ const
   Handle(Standard_Type)          Type;
   Handle(Geom2d_TrimmedCurve)    Curve;
   Standard_Integer               NbItems = Line.Length();
-  Standard_Integer               i;
-  Standard_Real                  ProVec,DotProd;
+  Standard_Integer               i = 0;
+  Standard_Real                  ProVec = NAN,DotProd = NAN;
   Handle(MAT2d_Connexion)        CC;
 
   //--------------------------
@@ -534,7 +536,7 @@ const
   //------------------------------------------
   Standard_Integer IAfter       = ConnexionFrom.Length();
   Standard_Integer NbConnexions = IAfter;
-  Standard_Integer IndCOF;
+  Standard_Integer IndCOF = 0;
 
   for (i = 1; i <= IAfter; i++) {
     CC     = ConnexionFrom.Value(i);
@@ -651,9 +653,9 @@ const
 //=============================================================================
 void  MAT2d_Circuit::InsertCorner (TColGeom2d_SequenceOfGeometry& Line) const
 {
-  Standard_Integer              i,isuiv;
+  Standard_Integer              i = 0,isuiv = 0;
   Handle(Geom2d_TrimmedCurve)   Curve;
-  Standard_Boolean              Insert;
+  Standard_Boolean              Insert = 0;
 
   for ( i = 1; i <= Line.Length(); i++) {
     isuiv  = (i == Line.Length()) ? 1 : i + 1;
@@ -727,7 +729,7 @@ const TColStd_SequenceOfInteger&  MAT2d_Circuit::RefToEqui
 //=============================================================================
 void MAT2d_Circuit::SortRefToEqui (const MAT2d_BiInt& BiRef)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   TColStd_SequenceOfInteger&  S = linkRefEqui.ChangeFind(BiRef);
   TColStd_SequenceOfInteger   SFin;
 
@@ -819,7 +821,7 @@ void MAT2d_Circuit::UpDateLink(const Standard_Integer IFirst,
                               const Standard_Integer ICurveLast)
 {
   Standard_Integer IEqui = IFirst;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   for (i = ICurveFirst; i <= ICurveLast; i++) {
     MAT2d_BiInt Key(ILine,i);
index 2838d2f755f2b2224d173c91b36b3b4d60ac182a..3dca9f6fe680193307e5e6c22198958c2e1c254b 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_Curve.hxx>
 #include <Geom2d_TrimmedCurve.hxx>
 #include <Geom2dLProp_CurAndInf2d.hxx>
@@ -55,7 +57,7 @@ void MAT2d_CutCurve::Perform(const Handle(Geom2d_Curve)& C)
 
   Geom2dLProp_CurAndInf2d     Sommets;
   Handle(Geom2d_TrimmedCurve) TrimC;
-  Standard_Real               UF,UL,UC;
+  Standard_Real               UF = NAN,UL = NAN,UC = NAN;
   gp_Pnt2d                    PF,PL,PC;
   Standard_Real               PTol  = Precision::PConfusion()*10;
   Standard_Real               Tol   = Precision::Confusion()*10;
index 4e3d54c176016e7d8976ccd89d793fe6a451da75..e30781871b93cc1f4640c52f0092118bc15bffff 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <MAT2d_Mat2d.hxx>
 #include <MAT2d_Tool2d.hxx>
 #include <MAT_Bisector.hxx>
 //  purpose  :
 //========================================================================
 MAT2d_Mat2d::MAT2d_Mat2d(const Standard_Boolean IsOpenResult)
-: semiInfinite(Standard_False),
+: myIsOpenResult(IsOpenResult), thenumberofbisectors(0), thenumberofedges(0), semiInfinite(Standard_False),
   isDone(Standard_False)
 {
-  myIsOpenResult = IsOpenResult;
-  thenumberofbisectors = 0;
-  thenumberofedges     = 0;
+  
+  
+  
 }
 
 
@@ -133,12 +135,12 @@ void MAT2d_Mat2d::CreateMatOpen(MAT2d_Tool2d& atool)
   Handle(MAT_Edge) edgetoremove;
   Handle(MAT_Edge) previousedge,currentedge;
 
-  Standard_Integer      noofbisectorstoremove;
+  Standard_Integer      noofbisectorstoremove = 0;
   Handle(MAT_Bisector)  firstbisector,secondbisector;
   Handle(MAT_Edge)      edge;
-  Standard_Integer      intersectionpoint;
-  Standard_Integer      beginbisector;
-  Standard_Integer      noofbisectors;
+  Standard_Integer      intersectionpoint = 0;
+  Standard_Integer      beginbisector = 0;
+  Standard_Integer      noofbisectors = 0;
 
   Standard_Integer     NbIterBis = 0;
   Standard_Integer     EvenNbIterBis = 10;
@@ -151,10 +153,10 @@ void MAT2d_Mat2d::CreateMatOpen(MAT2d_Tool2d& atool)
   Handle(MAT_Bisector) bisectortoremove,lastbisector,currentbisector;
   Handle(MAT_Bisector) previousbisector;
 
-  Standard_Integer     i,j,k,narea,shift,compact,all;
-  Standard_Integer     noofedges;
-  Standard_Integer     NumberMaxOfIte;
-  Standard_Real        toleranceofconfusion;
+  Standard_Integer     i = 0,j = 0,k = 0,narea = 0,shift = 0,compact = 0,all = 0;
+  Standard_Integer     noofedges = 0;
+  Standard_Integer     NumberMaxOfIte = 0;
+  Standard_Real        toleranceofconfusion = NAN;
 
   noofedges            = atool.NumberOfItems();
   toleranceofconfusion = atool.ToleranceOfConfusion();
@@ -198,7 +200,7 @@ void MAT2d_Mat2d::CreateMatOpen(MAT2d_Tool2d& atool)
 //---------------------------------------------------
 // Initialisation des bissectrices issues du contour.
 //---------------------------------------------------
-  Standard_Real Dist;
+  Standard_Real Dist = NAN;
   theedgelist->First();
 
   for(i=0; i<theedgelist->Number()-1; i++) {
@@ -800,12 +802,12 @@ void MAT2d_Mat2d::CreateMat(MAT2d_Tool2d& atool)
   Handle(MAT_Edge) edgetoremove;
   Handle(MAT_Edge) previousedge,currentedge;
 
-  Standard_Integer      noofbisectorstoremove;
+  Standard_Integer      noofbisectorstoremove = 0;
   Handle(MAT_Bisector)  firstbisector,secondbisector;
   Handle(MAT_Edge)      edge;
-  Standard_Integer      intersectionpoint;
-  Standard_Integer      beginbisector;
-  Standard_Integer      noofbisectors;
+  Standard_Integer      intersectionpoint = 0;
+  Standard_Integer      beginbisector = 0;
+  Standard_Integer      noofbisectors = 0;
 
   Standard_Integer     NbIterBis = 0;
   Standard_Integer     EvenNbIterBis = 10;
@@ -818,10 +820,10 @@ void MAT2d_Mat2d::CreateMat(MAT2d_Tool2d& atool)
   Handle(MAT_Bisector) bisectortoremove,lastbisector,currentbisector;
   Handle(MAT_Bisector) previousbisector;
 
-  Standard_Integer     i,j,k,narea,shift,compact,all;
-  Standard_Integer     noofedges;
-  Standard_Integer     NumberMaxOfIte;
-  Standard_Real        toleranceofconfusion;
+  Standard_Integer     i = 0,j = 0,k = 0,narea = 0,shift = 0,compact = 0,all = 0;
+  Standard_Integer     noofedges = 0;
+  Standard_Integer     NumberMaxOfIte = 0;
+  Standard_Real        toleranceofconfusion = NAN;
 
   noofedges            = atool.NumberOfItems();
   toleranceofconfusion = atool.ToleranceOfConfusion();
@@ -869,7 +871,7 @@ void MAT2d_Mat2d::CreateMat(MAT2d_Tool2d& atool)
   //---------------------------------------------------
   // Initialisation des bissectrices issues du contour.
   //---------------------------------------------------
-  Standard_Real Dist;
+  Standard_Real Dist = NAN;
   theedgelist->First();
 
   for(i=0; i<theedgelist->Number(); i++) {
@@ -1510,7 +1512,7 @@ void MAT2d_Mat2d::LoadBisectorsToRemove
   const Handle(MAT_Bisector)& lastbisectortoremove2  )
 {
 
-  Standard_Integer found,index;
+  Standard_Integer found = 0,index = 0;
   Handle(MAT_Bisector) firstbisectortoremove[2];
   Handle(MAT_Bisector) lastbisectortoremove[2];
 
@@ -1573,10 +1575,10 @@ void MAT2d_Mat2d::Intersect(      MAT2d_Tool2d&                 atool,
   const Handle(MAT_Bisector)& firstbisector,
   const Handle(MAT_Bisector)& secondbisector)
 {
-  Standard_Integer      bisectornumber;
-  Standard_Real         distant,saveparameter;
+  Standard_Integer      bisectornumber = 0;
+  Standard_Real         distant = NAN,saveparameter = NAN;
   Standard_Real         distance[2];
-  Standard_Integer      intersectionpoint;
+  Standard_Integer      intersectionpoint = 0;
   Handle(MAT_Bisector)  lastbisector,previousbisector;
   Handle(MAT_Bisector)  firstbisectortoremove[2];
   Handle(MAT_Bisector)  lastbisectortoremove[2];
@@ -1727,7 +1729,7 @@ MAT2d_Mat2d::~MAT2d_Mat2d()
   MAT_DataMapIteratorOfDataMapOfIntegerBisector itmap(bisectormap);
   for (; itmap.More(); itmap.Next())
   {
-    Handle(MAT_Bisector) aBisector = itmap.Value();
+    const Handle(MAT_Bisector)& aBisector = itmap.Value();
     aBisector->FirstEdge(NULL);
     aBisector->SecondEdge(NULL);
   }
index 7015f32860c79f68d973473fc62d5c431599b124..b299f1bf2d99ddccd2b12317409a71aa1d6f03d7 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtCC2d.hxx>
 #include <Extrema_ExtPC2d.hxx>
 #include <Extrema_POnCurv2d.hxx>
@@ -50,7 +52,7 @@ void MAT2d_MiniPath::Perform
    const Standard_Boolean                    Sense)
 {
 
-  Standard_Integer         i,j;
+  Standard_Integer         i = 0,j = 0;
   Standard_Integer         NbLines   = Figure.Length();
   MAT2d_Array2OfConnexion  Connexion (1,NbLines,1,NbLines);
   
@@ -71,8 +73,8 @@ void MAT2d_MiniPath::Perform
  
   TColStd_SequenceOfInteger Set1;
   TColStd_SequenceOfInteger Set2;
-  Standard_Real             DistS1S2;
-  Standard_Integer          IndiceLine1,IndiceLine2;
+  Standard_Real             DistS1S2 = NAN;
+  Standard_Integer          IndiceLine1 = 0,IndiceLine2 = 0;
   Standard_Integer          ISuiv =0,MinOnSet1 =0,MinOnSet2 =0;
   //---------------------------------------------------------------------------
   // - 0 Set1 est initialise avec la ligne de depart.
@@ -222,7 +224,7 @@ Handle(MAT2d_Connexion) MAT2d_MiniPath::Father(const Standard_Integer ILine)
 //============================================================================
 void MAT2d_MiniPath::RunOnConnexions() 
 {
-  Standard_Integer                  i;
+  Standard_Integer                  i = 0;
   Handle(MAT2d_Connexion)           C;
   const MAT2d_SequenceOfConnexion&  SC = theConnexions(indStart);
 
@@ -243,7 +245,7 @@ void MAT2d_MiniPath::RunOnConnexions()
 void MAT2d_MiniPath::ExploSons(      MAT2d_SequenceOfConnexion& CResult,
                               const Handle(MAT2d_Connexion)&   CRef   ) 
 {
-  Standard_Integer                 i;  
+  Standard_Integer                 i = 0;  
   Standard_Integer                 Index = CRef->IndexSecondLine();
 
   if (!theConnexions.IsBound(Index)) return;
@@ -286,8 +288,8 @@ Handle(MAT2d_Connexion) MAT2d_MiniPath::MinimumL1L2
    const Standard_Integer                    IL2) const
 {
   Extrema_POnCurv2d              PointOnCurv1,PointOnCurv2;
-  Standard_Integer               IC1,IC2,IMinC1 =0,IMinC2 =0,i;
-  Standard_Real                  DistL1L2_2,DistP1P2_2;
+  Standard_Integer               IC1 = 0,IC2 = 0,IMinC1 =0,IMinC2 =0,i = 0;
+  Standard_Real                  DistL1L2_2 = NAN,DistP1P2_2 = NAN;
   Standard_Real                  ParameterOnC1 =0.,ParameterOnC2 =0.;
   TColGeom2d_SequenceOfGeometry  L1,L2;
   gp_Pnt2d                       Point1,Point2,P1,P2;
index 9c772597590e4cd436dfa7061d233a7ce16851b6..b2823a5a1f47fff70a48388eced43ad164577fa7 100644 (file)
@@ -29,6 +29,8 @@
 #include <GCE2d_MakeSegment.hxx>
 #endif
 
+#include <math.h>
+
 #include <Bisector_Bisec.hxx>
 #include <Bisector_BisecAna.hxx>
 #include <Bisector_BisecCC.hxx>
@@ -102,13 +104,13 @@ static Standard_Real MAT2d_TOLCONF = 1.e-7;
 //function : 
 //purpose  :
 //============================================================================
-MAT2d_Tool2d::MAT2d_Tool2d()
+MAT2d_Tool2d::MAT2d_Tool2d() : theDirection(1.), theJoinType(GeomAbs_Arc), theNumberOfBisectors(0), theNumberOfPnts(0), theNumberOfVecs(0)
 {
-  theDirection         = 1.;
-  theJoinType = GeomAbs_Arc; //default
-  theNumberOfBisectors = 0;
-  theNumberOfVecs      = 0;
-  theNumberOfPnts      = 0;
+  
+  //default
+  
+  
+  
 }
 
 //=============================================================================
@@ -207,7 +209,7 @@ Standard_Integer MAT2d_Tool2d::FirstPoint(const Standard_Integer anitem,
 Standard_Integer MAT2d_Tool2d::TangentBefore(const Standard_Integer anitem,
                                              const Standard_Boolean IsOpenResult)
 {
-  Standard_Integer     item;
+  Standard_Integer     item = 0;
   Handle(Geom2d_Curve) curve;
   theNumberOfVecs++;
 
@@ -216,7 +218,7 @@ Standard_Integer MAT2d_Tool2d::TangentBefore(const Standard_Integer anitem,
   else
     item = (anitem == theCircuit->NumberOfItems()) ? (anitem - 1) : (anitem + 1);
   if (theCircuit->ConnexionOn(item)){
-    Standard_Real x1,y1,x2,y2;
+    Standard_Real x1 = NAN,y1 = NAN,x2 = NAN,y2 = NAN;
     theCircuit->Connexion(item)->PointOnFirst().Coord(x1,y1);
     theCircuit->Connexion(item)->PointOnSecond().Coord(x2,y2);
     theGeomVecs.Bind(theNumberOfVecs,gp_Vec2d((x2-x1),(y2-y1)));
@@ -258,13 +260,13 @@ Standard_Integer MAT2d_Tool2d::TangentBefore(const Standard_Integer anitem,
 Standard_Integer MAT2d_Tool2d::TangentAfter(const Standard_Integer anitem,
                                             const Standard_Boolean IsOpenResult)
 {
-  Standard_Integer     item;
+  Standard_Integer     item = 0;
   Handle(Geom2d_Curve) curve;
   gp_Vec2d             thevector;
   theNumberOfVecs++;
 
   if (theCircuit->ConnexionOn(anitem)){
-    Standard_Real x1,y1,x2,y2;
+    Standard_Real x1 = NAN,y1 = NAN,x2 = NAN,y2 = NAN;
     theCircuit->Connexion(anitem)->PointOnFirst().Coord(x1,y1);
     theCircuit->Connexion(anitem)->PointOnSecond().Coord(x2,y2);
     theGeomVecs.Bind(theNumberOfVecs,gp_Vec2d((x1-x2),(y1-y2)));
@@ -466,7 +468,7 @@ void MAT2d_Tool2d::TrimBisec (      Bisector_Bisec&  B1,
 
   //gp_Vec2d             Tan1,Tan2;
   gp_Pnt2d             Ori; //PEdge;
-  Standard_Integer     INext;
+  Standard_Integer     INext = 0;
   INext = (IndexEdge == theCircuit->NumberOfItems()) ? 1  : (IndexEdge + 1);
 
   Handle(Standard_Type) EdgeType = theCircuit->Value(IndexEdge)->DynamicType();
@@ -553,7 +555,7 @@ Standard_Boolean MAT2d_Tool2d::TrimBisector
   (const Handle(MAT_Bisector)& abisector,
   const Standard_Integer      apoint)
 {
-  Standard_Real Param;
+  Standard_Real Param = NAN;
   Handle(Geom2d_TrimmedCurve) Bisector =
     ChangeGeomBis(abisector->BisectorNumber()).ChangeValue();
 
@@ -591,7 +593,7 @@ Standard_Boolean MAT2d_Tool2d::Projection (const Standard_Integer IEdge   ,
   Handle(Geom2d_Geometry)     Elt    = theCircuit->Value(IEdge);
   Handle(Standard_Type)       Type   = Elt->DynamicType();     
   Handle(Geom2d_TrimmedCurve) Curve; 
-  Standard_Integer            INext;   
+  Standard_Integer            INext = 0;   
   Standard_Real               Eps = MAT2d_TOLCONF;//*10.;
 
   if (Type == STANDARD_TYPE(Geom2d_CartesianPoint)) {  
@@ -672,7 +674,7 @@ Standard_Boolean MAT2d_Tool2d::IsSameDistance (
 {
   TColStd_Array1OfReal Dist(1,4);
   const Standard_Real eps = 1.e-7;
-  Standard_Integer     IEdge1,IEdge2,IEdge3,IEdge4;
+  Standard_Integer     IEdge1 = 0,IEdge2 = 0,IEdge3 = 0,IEdge4 = 0;
 
   IEdge1 = BisectorOne->FirstEdge() ->EdgeNumber();
   IEdge2 = BisectorOne->SecondEdge()->EdgeNumber();
@@ -782,10 +784,10 @@ Standard_Real MAT2d_Tool2d::IntersectBisector (
   Standard_Integer&           IntPnt)
 {
   Standard_Real    Tolerance     = MAT2d_TOLCONF;
-  Standard_Real    Param1,Param2;
-  Standard_Real    Parama,Paramb;
-  Standard_Real    Distance = 0.,DistanceMini;
-  Standard_Boolean SolutionValide;
+  Standard_Real    Param1 = NAN,Param2 = NAN;
+  Standard_Real    Parama = NAN,Paramb = NAN;
+  Standard_Real    Distance = 0.,DistanceMini = NAN;
+  Standard_Boolean SolutionValide = 0;
   gp_Pnt2d         PointSolution;
 
   Handle(Geom2d_TrimmedCurve) Bisector1 =
@@ -890,7 +892,7 @@ Standard_Real MAT2d_Tool2d::IntersectBisector (
       // ----------------------------------------------------------------
       if ((Segment.HasFirstPoint() && Segment.HasLastPoint())) { 
         gp_Pnt2d      P1,P2;
-        Standard_Real SegmentLength;
+        Standard_Real SegmentLength = NAN;
         P1 = Segment.FirstPoint().Value();
         P2 = Segment.LastPoint().Value();
         SegmentLength = P1.Distance(P2);
@@ -980,7 +982,7 @@ Standard_Real MAT2d_Tool2d::IntersectBisector (
   // et un cote).
   //-----------------------------------------------------------------------
 
-  Standard_Integer IndexEdge1,IndexEdge2,IndexEdge3,IndexEdge4;
+  Standard_Integer IndexEdge1 = 0,IndexEdge2 = 0,IndexEdge3 = 0,IndexEdge4 = 0;
   Standard_Boolean ExtremiteControle = Standard_True;
 
   IndexEdge1 = BisectorOne->FirstEdge() ->EdgeNumber();
@@ -1178,7 +1180,7 @@ Handle(MAT2d_Circuit) MAT2d_Tool2d::Circuit()const
 void MAT2d_Tool2d::BisecFusion(const Standard_Integer I1,
   const Standard_Integer I2) 
 {
-  Standard_Real               DU,UL1,UF1;
+  Standard_Real               DU = NAN,UL1 = NAN,UF1 = NAN;
   Handle(Geom2d_TrimmedCurve) Bisector1;
   Handle(Geom2d_TrimmedCurve) Bisector2;
 
@@ -1267,7 +1269,7 @@ Standard_Boolean AreNeighbours(const Standard_Integer IEdge1,
 static void SetTrim(Bisector_Bisec& Bis, const Handle(Geom2d_Curve)& Line1)
 {  
   Geom2dInt_GInter Intersect; 
-  Standard_Real    Distance;  
+  Standard_Real    Distance = NAN;  
   Standard_Real    Tolerance = MAT2d_TOLCONF;  
   Handle(Geom2d_TrimmedCurve) Bisector = Bis.ChangeValue();
 
@@ -1320,7 +1322,7 @@ IntRes2d_Domain  Domain(const Handle(Geom2d_TrimmedCurve)& Bisector1,
     }
     gp_Parab2d gpParabola;
     gp_Hypr2d  gpHyperbola;
-    Standard_Real Focus;
+    Standard_Real Focus = NAN;
     Standard_Real Limit = 50000.;
     if (Type1 == STANDARD_TYPE(Geom2d_Parabola)) {
       gpParabola = Handle(Geom2d_Parabola)::DownCast(BasisCurve)->Parab2d();
index 60bd3f04060b1788ac23e53c2a4c9bcdc0a39b5c..a7a8193dea893d52d90c092652ee01f54b3bb968 100644 (file)
@@ -77,7 +77,7 @@ public:
 protected:
 
   AVPacket* myPacket;      //!< packet
-  double    myDurationSec; //!< packet duration in seconds
+  double    myDurationSec{}; //!< packet duration in seconds
 
 };
 
index 8a04ef27cced168f08c00b3c66b3aa6e51a40f42..67c8f8eaec2895f43ef004de3a04ff8bcbad3110 100644 (file)
@@ -35,9 +35,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Message_Algorithm,Standard_Transient)
 //function : Message_Algorithm
 //purpose  :
 //=======================================================================
-Message_Algorithm::Message_Algorithm ()
+Message_Algorithm::Message_Algorithm () : myMessenger(Message::DefaultMessenger())
 {
-  myMessenger = Message::DefaultMessenger();
+  
 }
 
 //=======================================================================
index e50976c91043c81bd548dca804df5d6ba8117ef3..07dc53c9b1f28c2501fd4b06bab0401f20713479 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Message_AttributeMeter.hxx>
 
 #include <Message_Report.hxx>
@@ -144,7 +146,7 @@ void Message_AttributeMeter::SetAlertMetrics (const Handle(Message_AlertExtended
     if (anActiveMetrics.Contains (Message_MetricType_ProcessCPUUserTime) ||
         anActiveMetrics.Contains (Message_MetricType_ProcessCPUSystemTime))
     {
-      Standard_Real aProcessUserTime, aProcessSystemTime;
+      Standard_Real aProcessUserTime = NAN, aProcessSystemTime = NAN;
       OSD_Chronometer::GetProcessCPU (aProcessUserTime, aProcessSystemTime);
       if (anActiveMetrics.Contains (Message_MetricType_ProcessCPUUserTime))
       {
@@ -172,7 +174,7 @@ void Message_AttributeMeter::SetAlertMetrics (const Handle(Message_AlertExtended
     if (anActiveMetrics.Contains (Message_MetricType_ThreadCPUUserTime) ||
         anActiveMetrics.Contains (Message_MetricType_ThreadCPUSystemTime))
     {
-      Standard_Real aThreadUserTime, aThreadSystemTime;
+      Standard_Real aThreadUserTime = NAN, aThreadSystemTime = NAN;
       OSD_Chronometer::GetThreadCPU (aThreadUserTime, aThreadSystemTime);
       if (anActiveMetrics.Contains (Message_MetricType_ThreadCPUUserTime))
       {
index db16d967bf02068758a91cfd6387da8a351490e3..f71ca44cc69234dd2d90c3f1b4fb61814ad41ea9 100644 (file)
@@ -22,9 +22,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Message_AttributeObject, Message_Attribute)
 //=======================================================================
 Message_AttributeObject::Message_AttributeObject (const Handle(Standard_Transient)& theObject,
                                                   const TCollection_AsciiString& theName)
-: Message_Attribute(theName)
+: Message_Attribute(theName), myObject(theObject)
 {
-  myObject = theObject;
+  
 }
 
 //=======================================================================
index ade83fe1ff3dea6dfb18efadb2ada857d32d702a..4b3b33bf1b94f290c0c6685cca0bac7ae9a4be20 100644 (file)
@@ -39,10 +39,10 @@ Message_Msg::Message_Msg ()
 //purpose  : Constructor
 //=======================================================================
 
-Message_Msg::Message_Msg (const Message_Msg& theMsg)
+Message_Msg::Message_Msg (const Message_Msg& theMsg) : myMessageBody(theMsg.myMessageBody), myOriginal(theMsg.myOriginal)
 {
-  myMessageBody = theMsg.myMessageBody;
-  myOriginal = theMsg.myOriginal;
+  
+  
   for ( Standard_Integer i = 1, n = theMsg.mySeqOfFormats.Length(); i <=n; i++ )
     mySeqOfFormats.Append ( theMsg.mySeqOfFormats.Value(i) );
 }
@@ -251,7 +251,7 @@ Message_Msg& Message_Msg::Arg (const Standard_Real theValue)
 const TCollection_ExtendedString& Message_Msg::Get ()
 {
   // remove all non-initialised format specifications
-  Standard_Integer i, anIncrement = 0;
+  Standard_Integer i = 0, anIncrement = 0;
   static const TCollection_ExtendedString anUnknown ("UNKNOWN");
   for (i = 1; i < mySeqOfFormats.Length(); i += 3)
   {
index 34abfe57f3d2e09d530cb1c486f0f2215675e9eb..fb232c1622a2d8a9e7426b278dcea58c4d7e0597 100644 (file)
@@ -95,8 +95,8 @@ getString (CharType *&                  thePtr,
            Standard_Integer&            theLeftSpaces)
 {
   CharType * anEndPtr = thePtr;
-  CharType * aPtr;
-  Standard_Integer aLeftSpaces;
+  CharType * aPtr = nullptr;
+  Standard_Integer aLeftSpaces = 0;
 
   do 
   {
index ee53f8187ac6c0cc02793a7ca1a117876c575543..3e487036af703b7148eb843d0bfba62ad70ed33d 100644 (file)
@@ -102,7 +102,7 @@ void Message_PrinterOStream::Close ()
   ostr->flush();
   if ( myIsFile )
   {
-    std::ofstream* ofile = (std::ofstream* )ostr;
+    std::ofstream* ofile = dynamic_cast<std::ofstream*>(ostr);
     ofile->close();
     delete ofile;
     myIsFile = Standard_False;
index 0bbd84062ffdcb5e6e4a69244cb4e7a0ea00d7e0..2888a55bd9fc472b08e4e45fcfe8a8942813a831 100644 (file)
@@ -112,7 +112,7 @@ void Message_PrinterToReport::send (const TCollection_AsciiString& theString,
 //function : sendMetricAlert
 //purpose  :
 //=======================================================================
-void Message_PrinterToReport::sendMetricAlert (const TCollection_AsciiString theValue,
+void Message_PrinterToReport::sendMetricAlert (const TCollection_AsciiString& theValue,
                                                const Message_Gravity theGravity) const
 {
   Message_AlertExtended::AddAlert (Report(), new Message_AttributeMeter (theValue), theGravity);
index e82cfe156584e3a447da25c3cd477a4db3916c8d..eb05a606380e81b0d21d077ff73d373fede73eae 100644 (file)
@@ -61,7 +61,7 @@ protected:
                                      const Message_Gravity theGravity) const Standard_OVERRIDE;
 
   //! Send an alert with metrics active in the current report
-  Standard_EXPORT void sendMetricAlert (const TCollection_AsciiString theValue,
+  Standard_EXPORT void sendMetricAlert (const TCollection_AsciiString& theValue,
                                         const Message_Gravity theGravity) const;
 
 private:
index 6abf893f9cb7c5c523d76d734d5c4e4d389dffc2..ac893cf934d6fb4f6bdd2b981a035d345a5c8daa 100644 (file)
@@ -21,9 +21,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Message_ProgressIndicator,Standard_Transient)
 //=======================================================================
 Message_ProgressIndicator::Message_ProgressIndicator()
 : myPosition(0.),
-  myRootScope (NULL)
+  myRootScope(new Message_ProgressScope (this))
 {
-  myRootScope = new Message_ProgressScope (this);
+  
 }
 
 //=======================================================================
index b63bd7137fb38b5ebca4beb45a37f59fc762f865..9f606f7448bfda6d643d7682bcb6d11d9b8fec3f 100644 (file)
@@ -148,7 +148,7 @@ void Message_Report::ActivateInMessenger (const Standard_Boolean toActivate,
     Message_SequenceOfPrinters aPrintersToRemove;
     for (Message_SequenceOfPrinters::Iterator anIterator (aMessenger->Printers()); anIterator.More(); anIterator.Next())
     {
-      const Handle(Message_Printer) aPrinter = anIterator.Value();
+      const Handle(Message_Printer)& aPrinter = anIterator.Value();
       if (aPrinter->IsKind(STANDARD_TYPE (Message_PrinterToReport)) &&
           Handle(Message_PrinterToReport)::DownCast (aPrinter)->Report() == this)
         aPrintersToRemove.Append (aPrinter);
index e5deb74a74849f67a3a3a6d7b736b9a38c2c97d5..b7533c8f8b05fa82da235d6dd287962d4ede57b1 100644 (file)
@@ -169,10 +169,10 @@ MoniTool_AttrList::MoniTool_AttrList ()    {  }
 
   NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator iter(list);
   for (; iter.More(); iter.Next()) {
-    TCollection_AsciiString name = iter.Key();
+    const TCollection_AsciiString& name = iter.Key();
     if (!name.StartsWith(fromname))
       continue;
-    Handle(Standard_Transient) atr = iter.Value();
+    const Handle(Standard_Transient)& atr = iter.Value();
     Handle(Standard_Transient) newatr = atr;
 
 //    Copy ? according type
index 9df9eea736811c99bb98cd20eabb04491528f0e6..a9fd1323cfd98ed42b986eb8c009930061f0d771 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_CartesianPoint.hxx>
 #include <Geom2d_Curve.hxx>
 #include <Geom_CartesianPoint.hxx>
@@ -45,8 +47,8 @@ static OSD_Timer& chrono() {
 
     MoniTool_CaseData::MoniTool_CaseData
   (const Standard_CString caseid, const Standard_CString name)
-    : thesubst (0) , thecase (caseid) , thename (name)  
-      {  thecheck = DefCheck(caseid);  }
+    : thecheck(DefCheck(caseid)), thesubst (0) , thecase (caseid) , thename (name)  
+      {   }
 
     void  MoniTool_CaseData::SetCaseId (const Standard_CString caseid)
       {  thecase.Clear();  thecase.AssignCat (caseid);  thecheck = DefCheck(caseid);  thesubst = 0;  }
@@ -141,7 +143,7 @@ static OSD_Timer& chrono() {
 {
   Standard_Real cpu = curCPU;
   if (cpu == 0.) {
-    Standard_Real sec;  Standard_Integer i1,i2;
+    Standard_Real sec = NAN;  Standard_Integer i1 = 0,i2 = 0;
     chrono().Show (sec,i1,i2,cpu);
   }
   cpu = cpu - lastCPU;
@@ -151,7 +153,7 @@ static OSD_Timer& chrono() {
     Standard_Real  MoniTool_CaseData::GetCPU () const
 {
   if (!stachr) { chrono().Start(); stachr = Standard_True; }
-  Standard_Real sec,cpu;  Standard_Integer i1,i2;
+  Standard_Real sec = NAN,cpu = NAN;  Standard_Integer i1 = 0,i2 = 0;
   chrono().Show (sec,i1,i2,cpu);
   return cpu;
 }
@@ -162,7 +164,7 @@ static OSD_Timer& chrono() {
 {
   Standard_Real cpu = curCPU;
   if (cpu == 0.) {
-    Standard_Real sec;  Standard_Integer i1,i2;
+    Standard_Real sec = NAN;  Standard_Integer i1 = 0,i2 = 0;
     chrono().Show (sec,i1,i2,cpu);
   }
   cpu = cpu - lastCPU;
@@ -285,7 +287,7 @@ static Standard_Integer NameRank (const Standard_CString name)
   (const Standard_CString name) const
 {
   if (!name || name[0] == '\0') return 0;
-  Standard_Integer nd, nn = 0, nb = NbData();
+  Standard_Integer nd = 0, nn = 0, nb = NbData();
   for (nd = 1; nd <= nb; nd ++) {
     if (thednam(nd).IsEqual(name)) return nd;
   }
@@ -399,7 +401,7 @@ Message_Msg  MoniTool_CaseData::Msg () const
 
     Standard_Integer  MoniTool_CaseData::DefCheck (const Standard_CString acode)
 {
-  Standard_Integer val;
+  Standard_Integer val = 0;
   if (!defch.Find(acode, val))
     val = 0;
   return val;
index f98c8e5104d16fd3335d55aa40fafa173c3b5b20..774fd84c0453743c4b28709007113b1ef30e6000 100644 (file)
@@ -17,7 +17,7 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(MoniTool_IntVal,Standard_Transient)
 
-MoniTool_IntVal::MoniTool_IntVal  (const Standard_Integer val)    {  theval = val;  }
+MoniTool_IntVal::MoniTool_IntVal  (const Standard_Integer val) : theval(val)    {   }
 
 Standard_Integer  MoniTool_IntVal::Value () const  {  return theval;  }
 
index 54014306eb9e9dc75faa807994992298bf3a2893..506433266589c6ce84ebd76c65b045176b8eb1d8 100644 (file)
@@ -17,7 +17,7 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(MoniTool_RealVal,Standard_Transient)
 
-MoniTool_RealVal::MoniTool_RealVal  (const Standard_Real val)    {  theval = val;  }
+MoniTool_RealVal::MoniTool_RealVal  (const Standard_Real val) : theval(val)    {   }
 
 Standard_Real  MoniTool_RealVal::Value () const  {  return theval;  }
 
index 7f656fe77afb9711cc8d555b51698482e713cf65..3e8462e5ed1ceab88721eb013657faede633ef99 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <MoniTool_Stat.hxx>
 #include <TCollection_HAsciiString.hxx>
 
 //static MoniTool_Stat Statact ("");
 //not Used
 //static Standard_CString voidname = "";
-MoniTool_Stat::MoniTool_Stat (const Standard_CString title)
+MoniTool_Stat::MoniTool_Stat (const Standard_CString title) : thetit(new TCollection_HAsciiString(title)), thelev(0), thetot(new TColStd_HArray1OfInteger (1,20)), thedone(new TColStd_HArray1OfInteger (1,20)), thecurr(new TColStd_HArray1OfInteger (1,20))
 {
-  thetit  = new TCollection_HAsciiString(title);
-  thelev  = 0;
-  thetot  = new TColStd_HArray1OfInteger (1,20);  thetot->Init(0);
-  thedone = new TColStd_HArray1OfInteger (1,20);  thetot->Init(0);
-  thecurr = new TColStd_HArray1OfInteger (1,20);  thetot->Init(0);
+  
+  
+   thetot->Init(0);
+   thetot->Init(0);
+   thetot->Init(0);
 }
 
     MoniTool_Stat::MoniTool_Stat (const MoniTool_Stat& )
@@ -84,7 +86,7 @@ Standard_Integer  MoniTool_Stat::Level () const
 Standard_Real  MoniTool_Stat::Percent (const Standard_Integer fromlev) const
 {
   if (fromlev > thelev) return 0;
-  Standard_Real r1,r2,r3;
+  Standard_Real r1 = NAN,r2 = NAN,r3 = NAN;
   Standard_Integer tot  = thetot->Value(fromlev);
   Standard_Integer done = thedone->Value(fromlev);
   if (done >= tot) return 100.;
index fb7021f9350ca4483d09df1ebdefe076cfd83c0c..f95f843f8fcc433a4467976ed7bacae65d433527 100644 (file)
@@ -19,6 +19,7 @@
 #include <OSD_Timer.hxx>
 #include <Standard_Type.hxx>
 
+#include <math.h>
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(MoniTool_Timer,Standard_Transient)
 
@@ -28,8 +29,8 @@ IMPLEMENT_STANDARD_RTTIEXT(MoniTool_Timer,Standard_Transient)
 //=======================================================================
 void MoniTool_Timer::Dump(Standard_OStream &ostr)
 {
-  Standard_Integer hours, minutes;
-  Standard_Real seconds, CPUtime, user, system;
+  Standard_Integer hours = 0, minutes = 0;
+  Standard_Real seconds = NAN, CPUtime = NAN, user = NAN, system = NAN;
     
   myTimer.Show(seconds,minutes,hours,CPUtime);
   myTimer.OSD_Chronometer::Show(user,system);
@@ -131,7 +132,7 @@ void MoniTool_Timer::ComputeAmendments ()
 {
   const Standard_Integer NBTESTS = 100000;
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   Handle(MoniTool_Timer) MT0 = MoniTool_Timer::Timer("_mt_amend_0_");
   Handle(MoniTool_Timer) MT1 = MoniTool_Timer::Timer("_mt_amend_1_");
@@ -180,7 +181,7 @@ void MoniTool_Timer::ComputeAmendments ()
   MT3->Stop();
   
   // analyze results
-  Standard_Real cpu0, cpu1, cpu2, cpu3, cput1, cput2, cput3;
+  Standard_Real cpu0 = NAN, cpu1 = NAN, cpu2 = NAN, cpu3 = NAN, cput1 = NAN, cput2 = NAN, cput3 = NAN;
   cpu0 = MoniTool_Timer::Timer("_mt_amend_0_")->CPU();
   cpu1 = MoniTool_Timer::Timer("_mt_amend_1_")->CPU();
   cput1 = MT->CPU();
index 244f821d83f8138005cafa4271be5872ad55e2f9..386f2f860e5b376141fcfb8b56dd85d882a9ab59 100644 (file)
@@ -21,6 +21,7 @@
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_HAsciiString.hxx>
 
+#include <math.h>
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(MoniTool_TypedValue,Standard_Transient)
 
@@ -99,7 +100,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
       theoval  (other->ObjectValue())
 {
   NCollection_DataMap<TCollection_AsciiString, Standard_Integer> eadds;
-  Standard_CString satisname;
+  Standard_CString satisname = nullptr;
   other->Internals (theinterp,thesatisf,satisname, eadds);
   thesatisn.AssignCat (satisname);
 
@@ -108,7 +109,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
   if (other->RealLimit    (Standard_False,therealow)) thelims |= 1;
   if (other->RealLimit    (Standard_True ,therealup)) thelims |= 2;
 
-  Standard_Integer startcase, endcase; Standard_Boolean match;
+  Standard_Integer startcase = 0, endcase = 0; Standard_Boolean match = 0;
   if (other->EnumDef (startcase,endcase,match)) {
     theintlow = startcase;  theintup = endcase;
     if (match) thelims |= 4;
@@ -149,7 +150,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
   switch (thetype) {
     case MoniTool_ValueInteger : {
       def.AssignCat("Integer");
-      Standard_Integer ilim;
+      Standard_Integer ilim = 0;
       if (IntegerLimit(Standard_False, ilim)) {
        Sprintf(mess,"  >= %d",ilim);
        def.AssignCat(mess);
@@ -162,7 +163,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
       break;
     case MoniTool_ValueReal    : {
       def.AssignCat("Real");
-      Standard_Real rlim;
+      Standard_Real rlim = NAN;
       if (RealLimit(Standard_False, rlim)) {
        Sprintf(mess,"  >= %f",rlim);
        def.AssignCat(mess);
@@ -192,7 +193,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
         def.AssignCat(" , alpha: ");
         NCollection_DataMap<TCollection_AsciiString, Standard_Integer>::Iterator listadd(theeadds);
         for (; listadd.More(); listadd.Next()) {
-          TCollection_AsciiString aName = listadd.Key();
+          const TCollection_AsciiString& aName = listadd.Key();
           Standard_CString enva = aName.ToCString();
           if (enva[0] == '?') continue;
           Sprintf(mess,":%d ",listadd.Value());
@@ -268,7 +269,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
   (const Standard_CString init)
 {
 //    Editions : init donne un petit texte d edition, en 2 termes "cmd var" :
-  Standard_Integer i,iblc = 0;
+  Standard_Integer i = 0,iblc = 0;
   for (i = 0; init[i] != '\0'; i ++) if (init[i] == ' ') iblc = i+1;
   if (iblc == 0) return Standard_False;
 //  Reconnaissance du sous-cas et aiguillage
@@ -475,7 +476,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
   (const Standard_CString val) const
 {
   if (thetype != MoniTool_ValueEnum) return (theintlow - 1);
-  Standard_Integer i; // svv Jan 10 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan 10 2000 : porting on DEC
   for (i = theintlow; i <= theintup; i ++)
     if (theenums->Value(i).IsEqual(val)) return i;
 //  cas additionnel ?
@@ -553,7 +554,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
   if (theinterp) return theinterp (this,hval,native);
   if (thetype == MoniTool_ValueEnum) {
 //  On admet les deux formes : Enum de preference, sinon Integer
-    Standard_Integer startcase, endcase; Standard_Boolean match;
+    Standard_Integer startcase = 0, endcase = 0; Standard_Boolean match = 0;
     EnumDef (startcase,endcase,match);
     Standard_Integer encas = EnumCase (hval->ToCString());
     if (encas < startcase) return hval;    // loupe
@@ -573,7 +574,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
   switch (thetype) {
     case MoniTool_ValueInteger : {
       if (!val->IsIntegerValue()) return Standard_False;
-      Standard_Integer ival, ilim;  ival = atoi(val->ToCString());
+      Standard_Integer ival = 0, ilim = 0;  ival = atoi(val->ToCString());
       if (IntegerLimit(Standard_False, ilim))
        if (ilim > ival) return Standard_False;
       if (IntegerLimit(Standard_True,  ilim))
@@ -582,7 +583,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
     }
     case MoniTool_ValueReal    : {
       if (!val->IsRealValue()) return Standard_False;
-      Standard_Real rval, rlim;  rval = val->RealValue();
+      Standard_Real rval = NAN, rlim = NAN;  rval = val->RealValue();
       if (RealLimit(Standard_False, rlim))
        if (rlim > rval) return Standard_False;
       if (RealLimit(Standard_True,  rlim))
@@ -591,8 +592,8 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
     }
     case MoniTool_ValueEnum    : {
 //  On admet les deux formes : Enum de preference, sinon Integer
-      Standard_Integer startcase, endcase;// unused ival;
-      Standard_Boolean match;
+      Standard_Integer startcase = 0, endcase = 0;// unused ival;
+      Standard_Boolean match = 0;
       EnumDef (startcase,endcase,match);
       if (!match) return Standard_True;
       if (EnumCase (val->ToCString()) >= startcase) return Standard_True;
index f5180b114c995fae4cd493293ccd232f93f23239..19c2d4fe8e1ecdea4f6e75c83c184152db4bc87a 100644 (file)
@@ -337,8 +337,8 @@ private:
   TCollection_AsciiString theunidef;
   Handle(TColStd_HArray1OfAsciiString) theenums;
   NCollection_DataMap<TCollection_AsciiString, Standard_Integer> theeadds;
-  MoniTool_ValueInterpret theinterp;
-  MoniTool_ValueSatisfies thesatisf;
+  MoniTool_ValueInterpret theinterp{};
+  MoniTool_ValueSatisfies thesatisf{};
   TCollection_AsciiString thesatisn;
   Standard_Integer theival;
   Handle(TCollection_HAsciiString) thehval;
index e7172ccff735c5a9ab01c7be367de60956841308..00ccd68a9f05c8af23653be9c361fb604180672f 100644 (file)
@@ -48,7 +48,7 @@ NCollection_AccAllocator::~NCollection_AccAllocator()
 void* NCollection_AccAllocator::Allocate(const size_t theSize)
 {
   const AlignedSize aSize(theSize);
-  Block* aBlock;
+  Block* aBlock = nullptr;
 
   if (aSize <= mypLastBlock->FreeSize())
   {
@@ -91,7 +91,7 @@ void* NCollection_AccAllocator::Allocate(const size_t theSize)
 //=======================================================================
 void NCollection_AccAllocator::Free(void* theAddress)
 {
-  Key aKey;
+  Key aKey{};
   Block* aBlock = findBlock(theAddress, aKey);
 
 #if !defined No_Exception && !defined No_Standard_ProgramError
@@ -111,7 +111,7 @@ void NCollection_AccAllocator::Free(void* theAddress)
     if (myBlocks.Size() > 1)
     {
       Standard::Free(anAddress);
-      Block** appBlock;
+      Block** appBlock = nullptr;
       for (appBlock = &mypLastBlock;
           *appBlock != 0L;
            appBlock = &(*appBlock)->prevBlock)
index c18c219fcbe3720f2f06759ae1f910b88e4863ae..399ab28a8a0f516738d4fbd7b9b54b6942e7d993 100644 (file)
@@ -84,9 +84,9 @@ void  NCollection_BaseMap::Destroy (NCollection_DelMapNode fDel,
 {
   if (!IsEmpty()) 
   {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     NCollection_ListNode** data = (NCollection_ListNode**) myData1;
-    NCollection_ListNode *p,*q;
+    NCollection_ListNode *p = nullptr,*q = nullptr;
     for (i = 0; i <= NbBuckets(); i++) 
     {
       if (data[i]) 
@@ -129,9 +129,9 @@ void NCollection_BaseMap::Statistics(Standard_OStream& S) const
 
   // compute statistics on 1
   Standard_Integer * sizes = new Standard_Integer [mySize+1];
-  Standard_Integer i,l,nb;
-  NCollection_ListNode* p;
-  NCollection_ListNode** data;
+  Standard_Integer i = 0,l = 0,nb = 0;
+  NCollection_ListNode* p = nullptr;
+  NCollection_ListNode** data = nullptr;
   
   S << "\nStatistics for the first Key\n";
   for (i = 0; i <= mySize; i++) sizes[i] = 0;
index 08a0a45934a1e043cc92f5f29c52d7f5f3f963b7..847ca5ce151965231cf751ee54ef047298941658 100644 (file)
@@ -436,8 +436,8 @@ void NCollection_BaseSequence::RemoveSeq (const Standard_Integer From,
 
 NCollection_SeqNode * NCollection_BaseSequence::Find (const Standard_Integer theIndex) const 
 {
-  Standard_Integer i;
-  NCollection_SeqNode * p;
+  Standard_Integer i = 0;
+  NCollection_SeqNode * p = nullptr;
   if (theIndex <= myCurrentIndex) {
     if (theIndex < myCurrentIndex / 2) {
       p = myFirstItem;
index 4f9503c5d1be45325f0bc568348a3e93119f07ea..c7690070d7c58b6a3d47a92323438a1a2915b2e7 100644 (file)
 IMPLEMENT_STANDARD_RTTIEXT(NLPlate_HPG0Constraint,NLPlate_HGPPConstraint)
 
 NLPlate_HPG0Constraint::NLPlate_HPG0Constraint(const gp_XY& UV,const gp_XYZ& Value)
-:myXYZTarget(Value)
+:myXYZTarget(Value), UVIsFree(Standard_False), IncrementalLoadingAllowed(Standard_False)
 {
   SetUV(UV);
   SetActiveOrder(0);
-  UVIsFree = Standard_False;
-  IncrementalLoadingAllowed = Standard_False;
+  
+  
 }
 void NLPlate_HPG0Constraint::SetUVFreeSliding(const Standard_Boolean UVFree) 
 {
index 6deefe1b5d79d8862bca04977a05d95097095cc5..865e88a524640ad9c47da9ac2bce170156f8874f 100644 (file)
 IMPLEMENT_STANDARD_RTTIEXT(NLPlate_HPG0G1Constraint,NLPlate_HPG0Constraint)
 
 NLPlate_HPG0G1Constraint::NLPlate_HPG0G1Constraint(const gp_XY& UV,const gp_XYZ& Value,const Plate_D1& D1T)
-: NLPlate_HPG0Constraint(UV,Value),myG1Target(D1T)
+: NLPlate_HPG0Constraint(UV,Value),myG1Target(D1T), myOrientation(0)
 {
   SetActiveOrder(1);
-  myOrientation = 0;
+  
 }
 
 void NLPlate_HPG0G1Constraint::SetOrientation(const Standard_Integer Orient) 
index 416f1d83e3210c22775a5ec60a36974fcb554f5f..412071c6aff991c5fe4aa6ab55685b4e015112c7 100644 (file)
 IMPLEMENT_STANDARD_RTTIEXT(NLPlate_HPG1Constraint,NLPlate_HGPPConstraint)
 
 NLPlate_HPG1Constraint::NLPlate_HPG1Constraint(const gp_XY& UV,const Plate_D1& D1T)
-:myG1Target(D1T)
+:IncrementalLoadingAllowed(Standard_False), myG1Target(D1T), myOrientation(0)
 {
   SetUV(UV);
   SetActiveOrder(1);
-  IncrementalLoadingAllowed = Standard_False;
-  myOrientation = 0;
+  
+  
 }
 void NLPlate_HPG1Constraint::SetIncrementalLoadAllowed(const Standard_Boolean ILA) 
 {
index c3aa031dcf19c7ffea000ee94f7de2f97f18e75d..fa7e6dcc9689f5ae0f6d185d6a9c191c0b3447ea 100644 (file)
@@ -162,7 +162,7 @@ NLPlate_NLPlate::NLPlate_NLPlate(const Handle(Geom_Surface)& InitialSurface) :
 
  Standard_Integer NLPlate_NLPlate::Continuity() const
 {
-  Standard_Integer cont ;
+  Standard_Integer cont = 0 ;
   for( cont=-1; cont<10;cont++)
     {
       if(!(myInitialSurface->IsCNu(cont+1)&&myInitialSurface->IsCNv(cont+1)))break;
index c150fe7e87aae79476d32897d47b53ee86281057..97163ccd468070f994c6e0639201eff8a3d64e0c 100644 (file)
@@ -21,7 +21,7 @@
 Standard_Boolean OSD::RealToCString(const Standard_Real aReal,
                                    Standard_PCharacter& aString)
 {
-  char *p, *q ;
+  char *p = nullptr, *q = nullptr ;
   
   if (Sprintf(aString,"%.17e",aReal)  <= 0) //BUC60808
     return Standard_False ;
@@ -48,7 +48,7 @@ Standard_Boolean OSD::RealToCString(const Standard_Real aReal,
 Standard_Boolean OSD::CStringToReal(const Standard_CString aString,
                                    Standard_Real& aReal)
 {
-  char *endptr ;
+  char *endptr = nullptr ;
   aReal = Strtod(aString, &endptr);
   if (*endptr)
     return Standard_False ;
index 9a95197797f94cd25678ebb941270b524820e06f..8cab812c0f8ac7ba42f067c87d06af62f6c0fee6 100644 (file)
@@ -21,6 +21,7 @@
 
 #ifndef _WIN32
 
+#include <math.h>
 #include <sys/times.h>
 #include <unistd.h>
 
@@ -58,7 +59,7 @@ void OSD_Chronometer::GetProcessCPU (Standard_Real& theUserSeconds,
   static const long aCLK_TCK = CLK_TCK;
 #endif
 
-  tms aCurrentTMS;
+  tms aCurrentTMS{};
   times (&aCurrentTMS);
 
   theUserSeconds   = (Standard_Real)aCurrentTMS.tms_utime / aCLK_TCK;
@@ -84,7 +85,7 @@ void OSD_Chronometer::GetThreadCPU (Standard_Real& theUserSeconds,
   }
 #elif (defined(_POSIX_TIMERS) && defined(_POSIX_THREAD_CPUTIME)) || defined(__ANDROID__) || defined(__QNX__)
   // on Linux, only user times are available for threads via clock_gettime()
-  struct timespec t;
+  struct timespec t{};
   if (!clock_gettime (CLOCK_THREAD_CPUTIME_ID, &t))
   {
     theUserSeconds = t.tv_sec + 0.000000001 * t.tv_nsec;
@@ -226,7 +227,7 @@ void OSD_Chronometer::Stop()
 {
   if (!myIsStopped)
   {
-    Standard_Real Curr_user, Curr_sys;
+    Standard_Real Curr_user = NAN, Curr_sys = NAN;
     if (myIsThreadOnly)
       GetThreadCPU (Curr_user, Curr_sys);
     else
@@ -292,7 +293,7 @@ void OSD_Chronometer::Show (Standard_Real& theUserSec, Standard_Real& theSystemS
     return;
   }
 
-  Standard_Real aCurrUser, aCurrSys;
+  Standard_Real aCurrUser = NAN, aCurrSys = NAN;
   if (myIsThreadOnly)
     GetThreadCPU  (aCurrUser, aCurrSys);
   else
index 51060492f93e8a944d6d11d1d4a9110b3e0c0fa1..c1fdf9090bf328b92456327923b17c5e1fbe2b64 100644 (file)
@@ -83,7 +83,7 @@ Standard_Boolean OSD_DirectoryIterator::More(){
 
 static int strcmp_joker(const char *Mask,const char *Name)
 {
-  const char *p, *s ;
+  const char *p = nullptr, *s = nullptr ;
 
   for(p = Mask,s = Name ; *p && *p != '*' ; p++,s++)
     if (*p != *s) return 0 ;
@@ -99,7 +99,7 @@ static int strcmp_joker(const char *Mask,const char *Name)
 
 void OSD_DirectoryIterator::Next(){
 int again = 1;
-struct stat stat_buf;
+struct stat stat_buf{};
  myFlag = false;   // Initialize to nothing found
 
  do{
@@ -138,7 +138,7 @@ OSD_Directory OSD_DirectoryIterator::Values(){
 OSD_Path thisvalue;
 TCollection_AsciiString Name;
 TCollection_AsciiString Ext;
-Standard_Integer position;
+Standard_Integer position = 0;
 
  if (myEntry) Name = ((struct dirent *)myEntry)->d_name ;
 
index 1900bf327d61931899d11255c6cde698673a0c0c..45a65ea1a2b35651bf9ffa132a2a335d17660289 100644 (file)
@@ -184,7 +184,7 @@ Standard_Integer OSD_Disk::DiskSize()
   ULONGLONG aSize = aNbTotalBytes.QuadPart / 512;
   return (Standard_Integer )aSize; // may be an overflow
 #else
-  struct statvfs aBuffer;
+  struct statvfs aBuffer{};
   if (statvfs (myDiskName.ToCString(), &aBuffer) == 0)
   {
     unsigned long aBSize512 = aBuffer.f_frsize / 512;
@@ -216,7 +216,7 @@ Standard_Integer OSD_Disk::DiskFree()
   ULONGLONG aSize = aNbFreeAvailableBytes.QuadPart / 512;
   return (Standard_Integer )aSize; // may be an overflow
 #else
-  struct statvfs aBuffer;
+  struct statvfs aBuffer{};
   if (statvfs (myDiskName.ToCString(), &aBuffer) == 0)
   {
     unsigned long aBSize512 = aBuffer.f_frsize / 512;
index 55259fe2e7bc7b279124d8fd12412b343c2ebea5..a00503c7e3c95c7d5128b1b1684b14f8160f03e3 100644 (file)
@@ -157,7 +157,7 @@ void OSD_Environment::Build ()
   else {
     // Allocation memoire. Surtout tout la heap!
     index = Ibuffer++;
-    char **aTmp;
+    char **aTmp = nullptr;
     aTmp = (char **) realloc ( buffer, Ibuffer * sizeof(char*) );
     if (aTmp)
     {
old mode 100755 (executable)
new mode 100644 (file)
index 89c1b35..801d0fe
@@ -22,8 +22,8 @@
 
 #include <stdio.h>
 /* Created by Stephan GARNAUD (ARM) 1992 for Matra Datavision */
-OSD_Error::OSD_Error(){
- myErrno = 0;
+OSD_Error::OSD_Error() : myErrno(0){
 }
 
 
index 8e0ea5c5b7266ee5c159277cacba567cc6b3805c..441f43fb2ce5ab74b9d6aecd7f109992a793e586 100644 (file)
@@ -73,7 +73,7 @@ private:
   TCollection_AsciiString myMessage;
   Standard_Integer myErrno;
   OSD_WhoAmI myCode;
-  Standard_Integer extCode;
+  Standard_Integer extCode{};
 
 
 };
index db63054d1d0cc48b68296bd10a99f8014089761c..fcdb3491f48b3d353e2c3daebb0e7efef49019ec 100644 (file)
@@ -1006,7 +1006,7 @@ OSD_KindFile OSD_File::KindOfFile() const
   }
   return OSD_UNKNOWN;
 #else
-  struct stat aStatBuffer;
+  struct stat aStatBuffer{};
   if (stat (aFullName.ToCString(), &aStatBuffer) == 0)
   {
     if      (S_ISDIR (aStatBuffer.st_mode)) { return OSD_DIRECTORY; }
@@ -1345,7 +1345,7 @@ void OSD_File::SetLock (const OSD_LockType theLock)
     myLock = theLock;
   }
 #elif defined(SYSV)
-  struct flock aLockKey;
+  struct flock aLockKey{};
   aLockKey.l_whence = 0;
   aLockKey.l_start = 0;
   aLockKey.l_len = 0;
@@ -1375,7 +1375,7 @@ void OSD_File::SetLock (const OSD_LockType theLock)
 
   if (theLock == OSD_ExclusiveLock)
   {
-    struct stat aStatBuf;
+    struct stat aStatBuf{};
     fstat (myFileChannel, &aStatBuf);
     TCollection_AsciiString aFilePath;
     myPath.SystemName (aFilePath);
@@ -1461,7 +1461,7 @@ void OSD_File::UnLock()
 #elif defined(SYSV)
   if (ImperativeFlag)
   {
-    struct stat aStatBuf;
+    struct stat aStatBuf{};
     fstat (myFileChannel, &aStatBuf);
     TCollection_AsciiString aBuffer;
     myPath.SystemName (aBuffer);
@@ -1469,7 +1469,7 @@ void OSD_File::UnLock()
     ImperativeFlag = Standard_False;
   }
 
-  struct flock aLockKey;
+  struct flock aLockKey{};
   aLockKey.l_type = F_UNLCK;
   const int aStatus = fcntl (myFileChannel, F_SETLK, &aLockKey);
   if (aStatus == -1)
@@ -1529,7 +1529,7 @@ Standard_Size OSD_File::Size()
   TCollection_AsciiString aFilePath;
   myPath.SystemName (aFilePath);
 
-  struct stat aStatBuf;
+  struct stat aStatBuf{};
   const int aStatus = stat (aFilePath.ToCString(), &aStatBuf);
   if (aStatus == -1)
   {
index 5893545994def6263b9b0983b56a7ee5c84ef940..4a5d6795ee026f79fe0b50f5a66069b8dbc35622 100644 (file)
@@ -103,7 +103,7 @@ Standard_Boolean OSD_FileIterator::More(){
 
 static int strcmp_joker(const char *Mask,const char *Name)
 {
-  const char *p, *s ;
+  const char *p = nullptr, *s = nullptr ;
 
   for(p = Mask,s = Name ; *p && *p != '*' ; p++,s++)
     if (*p != *s) return 0 ;
@@ -175,7 +175,7 @@ static int strcmp_joker(char *fileMask,char *fileName)
 
 void OSD_FileIterator::Next(){
 int again = 1;
-struct stat stat_buf;
+struct stat stat_buf{};
  myFlag = false;   // Initialize to nothing found
 
  do {
@@ -213,7 +213,7 @@ OSD_File OSD_FileIterator::Values(){
 OSD_Path thisvalue;
 TCollection_AsciiString Name;
 TCollection_AsciiString Ext;
-Standard_Integer position;
+Standard_Integer position = 0;
 
  if (myEntry) Name = ((struct dirent *)myEntry)->d_name ;
 
index 66ff85a1ac21c38882b8cc2c568194c074f21fde..7dacb35e62a0ef1db8980627ce20cb1cc579218e 100644 (file)
@@ -74,7 +74,7 @@ void OSD_FileNode::SetPath (const OSD_Path& Name){
 // Test if specified file/directory exists
  
 Standard_Boolean  OSD_FileNode::Exists(){
-int status;
+int status = 0;
 
 
 // if (myPath.Name().Length()==0)  A directory can have a null name field (ex: root)
@@ -111,7 +111,7 @@ void  OSD_FileNode::Remove(){
      return;
    }
 
- struct stat  stat_buf;
+ struct stat  stat_buf{};
 
  if(stat(aBuffer.ToCString(), &stat_buf))
    {
@@ -147,7 +147,7 @@ void  OSD_FileNode::Remove(){
 // Move a file/directory to another path
 
 void  OSD_FileNode::Move(const OSD_Path& NewPath){
-int status;
+int status = 0;
 TCollection_AsciiString thisPath;
 
 // if (myPath.Name().Length()==0)
@@ -206,7 +206,7 @@ int static copy_file( const char* src, const char* trg )
 
 void  OSD_FileNode::Copy(const OSD_Path& ToPath)
 {
-int status;
+int status = 0;
 TCollection_AsciiString second_name;
 
 // if (myPath.Name().Length()==0)   Copy .login would raise !!
@@ -232,9 +232,9 @@ TCollection_AsciiString second_name;
 
 OSD_Protection  OSD_FileNode::Protection(){
 OSD_Protection thisProt;
-struct stat myStat;
-int status;
-int s,u,g,w;
+struct stat myStat{};
+int status = 0;
+int s = 0,u = 0,g = 0,w = 0;
 
 // if (myPath.Name().Length()==0)
 //  throw OSD_OSDError("OSD_FileNode::Protection : no name was given");
@@ -273,7 +273,7 @@ int s,u,g,w;
 // Set protections of a file/directory
 
 void  OSD_FileNode::SetProtection(const OSD_Protection& Prot){
-int status;
+int status = 0;
 
 //  if (myPath.Name().Length()==0)
 //  throw OSD_OSDError("OSD_FileNode::SetProtection : no name was given");
@@ -291,8 +291,8 @@ int status;
 Quantity_Date  OSD_FileNode::CreationMoment(){
 
  Quantity_Date result;
- struct tm *decode;
- struct stat buffer;
+ struct tm *decode = nullptr;
+ struct stat buffer{};
 
 // if (myPath.Name().Length()==0)
 //  throw OSD_OSDError("OSD_FileNode::CreationMoment : no name was given");
@@ -319,8 +319,8 @@ Quantity_Date  OSD_FileNode::CreationMoment(){
 Quantity_Date  OSD_FileNode::AccessMoment(){
 
  Quantity_Date result;
- struct tm *decode;
- struct stat buffer;
+ struct tm *decode = nullptr;
+ struct stat buffer{};
 
 // if (myPath.Name().Length()==0)
 //  throw OSD_OSDError("OSD_FileNode::AccessMoment : no name was given");
index 1547be3fbd3cc725bf6a2ef818560e3b53da9dd9..0c1358c7fda5a86713f536b021dd8ba05260baa8 100644 (file)
@@ -51,7 +51,7 @@ OSD_Host::OSD_Host(){}
 // =========================================================================
 
 TCollection_AsciiString OSD_Host::SystemVersion(){
-struct utsname info;
+struct utsname info{};
 TCollection_AsciiString result;
 
  uname (&info);
@@ -64,7 +64,7 @@ TCollection_AsciiString result;
 // =========================================================================
 
 OSD_SysType OSD_Host::SystemId()const{
-struct utsname info; 
+struct utsname info{}
  
  uname (&info);
 
@@ -86,7 +86,7 @@ struct utsname info;
 TCollection_AsciiString OSD_Host::HostName(){
 TCollection_AsciiString result;
 char value[65];
-int status;
+int status = 0;
 
 status = gethostname(value, 64);
 if (status == -1) myError.SetValue(errno, Iam, "Host Name");
@@ -100,7 +100,7 @@ if (status == -1) myError.SetValue(errno, Iam, "Host Name");
 
 
 Standard_Integer OSD_Host::AvailableMemory(){
- Standard_Integer result;
+ Standard_Integer result = 0;
 
 #if defined(__osf__) || defined(DECOSF1)
  char buffer[16];
@@ -117,8 +117,8 @@ Standard_Integer OSD_Host::AvailableMemory(){
 // =========================================================================
 
 TCollection_AsciiString OSD_Host::InternetAddress(){
- struct hostent internet_address;
- int a,b,c,d;
+ struct hostent internet_address{};
+ int a = 0,b = 0,c = 0,d = 0;
  char buffer[16];
  TCollection_AsciiString result,host;
 
@@ -139,7 +139,7 @@ TCollection_AsciiString OSD_Host::InternetAddress(){
 
 // =========================================================================
 OSD_OEMType OSD_Host::MachineType(){
-struct utsname info; 
+struct utsname info{}
  
  uname (&info);
 
index f1f61e8bcc57b817aa3c39703776dfdfa366f98c..8102b804945133d68e0b7ea460e2ca162c4b52fa 100644 (file)
@@ -302,7 +302,7 @@ Standard_Boolean OSD_MAllocHook::LogFileHandler::MakeReport
   while (fgets(aStr, MAX_STR-1, aLogFile) != NULL)
   {
     // detect operation type, request number and block size
-    unsigned long aReqNum, aSize;
+    unsigned long aReqNum = 0, aSize = 0;
     char* aType = aStr;
     char* pStr = aStr;
     //sscanf(aStr, "%5s %lu %lu", aType, &aReqNum, &aSize);
index 6545ade300e25caa3d1ce7134ce5c7cef4c8f3d7..9e53f982959b7af3483193ac717c8902931005aa 100644 (file)
@@ -118,8 +118,8 @@ protected:
 
 private:
 
-  Standard_Size myCounters[MemCounter_NB]; //!< Counters' values, in bytes
-  Standard_Boolean myActiveCounters[MemCounter_NB]; //!< container of active state for a counter
+  Standard_Size myCounters[MemCounter_NB]{}; //!< Counters' values, in bytes
+  Standard_Boolean myActiveCounters[MemCounter_NB]{}; //!< container of active state for a counter
 
 };
 
index 72b54b08ea5b924972a9ea58a6e959e0f732c2e5..60539d1e6f9c00a7055512cf3def1be2ed762c31 100644 (file)
@@ -132,7 +132,7 @@ Standard_Time OSD_FileStatCTime (const char* theName)
     aTime = (Standard_Time )aStat.st_ctime;
   }
 #else
-  struct stat aStat;
+  struct stat aStat{};
   if (stat (theName, &aStat) == 0)
   {
     aTime = (Standard_Time )aStat.st_ctime;
index c36753ea9ac7505d88d5a27fb13e84f1dc17749d..cc627dec6521c3a3775150d73c4f044ee75040d3 100644 (file)
@@ -96,7 +96,7 @@ namespace
 
       //! Method is executed in the context of thread,
       //! so this method defines the main calculations.
-      virtual void Perform (int ) Standard_OVERRIDE
+      void Perform (int ) Standard_OVERRIDE
       {
         for (OSD_Parallel::UniversalIterator anIter = myRange.It(); anIter != myRange.End(); anIter = myRange.It())
         {
index e034e9e91dab0f1b5b7603cf6ab0f73f11d1be21..95dd05c039a250d03660a5a83893e74abce66d5f 100644 (file)
@@ -59,8 +59,8 @@ static OSD_SysType whereAmI()
 #include <Standard_ConstructionError.hxx>
 #include <OSD_WhoAmI.hxx>
 
-OSD_Path::OSD_Path(){
- mySysDep = whereAmI();
+OSD_Path::OSD_Path() : mySysDep(whereAmI()){
 }
 
 static void VmsExtract(const TCollection_AsciiString& what,
@@ -73,7 +73,7 @@ static void VmsExtract(const TCollection_AsciiString& what,
                 TCollection_AsciiString& ext){
 
  TCollection_AsciiString buffer;
- Standard_Integer pos;
+ Standard_Integer pos = 0;
 
  buffer = what;
 
@@ -152,10 +152,10 @@ static void UnixExtract(const TCollection_AsciiString& what,
                        TCollection_AsciiString& name,
                        TCollection_AsciiString& ext){
 
- Standard_Integer pos;
+ Standard_Integer pos = 0;
  TCollection_AsciiString buffer;   // To manipulate 'what' without modifying it
 
- Standard_PCharacter p;
+ Standard_PCharacter p = nullptr;
  buffer = what;
 
 #ifdef TOTO  // Username, password and node are no longer given in the string (LD)
@@ -242,8 +242,8 @@ static void DosExtract(const TCollection_AsciiString& what,
                 TCollection_AsciiString& ext){
 
  TCollection_AsciiString buffer;
- Standard_Integer pos;
- Standard_PCharacter p;
+ Standard_Integer pos = 0;
+ Standard_PCharacter p = nullptr;
 
  buffer = what;
 
@@ -291,8 +291,8 @@ static void MacExtract(const TCollection_AsciiString& what,
                 TCollection_AsciiString& name,
                 TCollection_AsciiString& ){
 
-  Standard_Integer pos;
-  Standard_PCharacter p;
+  Standard_Integer pos = 0;
+  Standard_PCharacter p = nullptr;
   
   // I don't know how to distinguish a disk from a trek !
   
@@ -321,9 +321,9 @@ static void MacExtract(const TCollection_AsciiString& what,
 
 
 OSD_Path::OSD_Path(const TCollection_AsciiString& aDependentName,
-                  const OSD_SysType aSysType){
+                  const OSD_SysType aSysType) : mySysDep(whereAmI()){
 
- mySysDep = whereAmI();
 
  OSD_SysType todo;
 //  Standard_Integer i,l;
@@ -368,9 +368,9 @@ OSD_Path::OSD_Path(const TCollection_AsciiString& Nod,
                    const TCollection_AsciiString& Dsk,
                    const TCollection_AsciiString& Trk,
                    const TCollection_AsciiString& Nam,
-                  const TCollection_AsciiString& ext){
+                  const TCollection_AsciiString& ext) : mySysDep(whereAmI()){
 
- mySysDep = whereAmI();
 
  SetValues ( Nod, UsrNm, Passwd, Dsk, Trk, Nam, ext);
 
@@ -418,7 +418,7 @@ void OSD_Path::UpTrek(){
 
  if (length == 0) return;
 
- Standard_Integer awhere,aHowmany;
+ Standard_Integer awhere = 0,aHowmany = 0;
  TCollection_AsciiString tok;
 
  tok = myTrek.Token("|",length);
@@ -456,7 +456,7 @@ void OSD_Path::RemoveATrek(const Standard_Integer thewhere){
  if (length <= 0 || thewhere > length)
   throw Standard_NumericError("OSD_Path::RemoveATrek : where has an invalid value");
 
- Standard_Integer posit,aHowmany;
+ Standard_Integer posit = 0,aHowmany = 0;
  TCollection_AsciiString tok;
 
  tok = myTrek.Token("|",thewhere);
@@ -475,7 +475,7 @@ void OSD_Path::RemoveATrek(const TCollection_AsciiString& aName){
 
  if (length == 0) return;
 
- Standard_Integer awhere;
+ Standard_Integer awhere = 0;
 
  awhere = myTrek.Search(aName);
  if (awhere != -1){
@@ -545,7 +545,7 @@ static void P2VMS (TCollection_AsciiString & Way){
 // Convert a Trek to MAC syntax
 
 static void P2MAC (TCollection_AsciiString & Way){
- int i,l;
+ int i = 0,l = 0;
  Way.ChangeAll('|',':');
 
  l = (int)Way.Length();
@@ -561,7 +561,7 @@ static void P2MAC (TCollection_AsciiString & Way){
 // Convert a Trek to UNIX syntax
 
 static void P2UNIX (TCollection_AsciiString & Way){
- int i,l;
+ int i = 0,l = 0;
  Standard_Integer length = Way.Length();
 
  if (length == 0) return;
@@ -585,7 +585,7 @@ static void P2UNIX (TCollection_AsciiString & Way){
 // Convert a Trek to DOS like syntax
 
 static void P2DOS (TCollection_AsciiString & Way){
- int i,l;
+ int i = 0,l = 0;
  Standard_Integer len = Way.Length();
 
  if (len == 0) return;
@@ -1493,7 +1493,7 @@ Standard_Boolean OSD_Path::IsValid (const TCollection_AsciiString& theDependentN
 
 static Standard_Integer RemoveExtraSeparator(TCollection_AsciiString& aString) {
 
-  Standard_Integer i, j, len,start = 1 ;
+  Standard_Integer i = 0, j = 0, len = 0,start = 1 ;
 
   len = aString.Length() ;
 #ifdef _WIN32
@@ -1520,8 +1520,8 @@ TCollection_AsciiString OSD_Path::RelativePath(
 {
   TCollection_AsciiString EmptyString = "" ;
   TCollection_AsciiString FilePath ;
-  Standard_Integer len ;
-  Standard_Integer i, n ;
+  Standard_Integer len = 0 ;
+  Standard_Integer i = 0, n = 0 ;
   Standard_Boolean Wnt = 0 ;
 
   FilePath = aAbsFilePath ;
@@ -1596,7 +1596,7 @@ TCollection_AsciiString OSD_Path::AbsolutePath(
   if (aRelFilePath.Search("/") == 1 || aRelFilePath.Search(":") == 2)
       return aRelFilePath ;
   TCollection_AsciiString DirPath = aDirPath, RelFilePath = aRelFilePath  ;
-  Standard_Integer i,len ;
+  Standard_Integer i = 0,len = 0 ;
 
   if (DirPath.Search("/") != 1 && DirPath.Search(":") != 2)
       return EmptyString ;
index 13804571ec450b8ae64734ad0ae75b7925143946..f0c5d4031af45901bce5eb59ba778d4da8cae771 100644 (file)
@@ -338,7 +338,7 @@ private:
   TCollection_AsciiString myTrek;
   TCollection_AsciiString myName;
   TCollection_AsciiString myExtension;
-  Standard_Boolean myUNCFlag;
+  Standard_Boolean myUNCFlag{};
   OSD_SysType mySysDep;
 
 };
index f20fed96ca73bfa420eb97ed73581e84236f9e34..a9dd132155a9140eb2bd87b148c633c0bde516c7 100644 (file)
@@ -28,6 +28,7 @@
 /*14/05/2002 : AGV : Portability UNIX/Windows
 */ 
 /*======================================================================*/ 
+#include <math.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -160,7 +161,7 @@ int perf_stop_meter (const char * const MeterName)
 
   if (ic >= 0 && MeterTable[ic].start_time) {
     t_TimeCounter * const ptc = &MeterTable[ic];
-    PERF_TIME utime;
+    PERF_TIME utime = NAN;
     PICK_TIME (utime)
     ptc->cumul_time += utime - ptc->start_time;
     ptc->start_time = 0;
@@ -181,7 +182,7 @@ int perf_stop_imeter (const int iMeter)
   if (iMeter >= 0 && iMeter < nb_meters) {
     t_TimeCounter * const ptc = &MeterTable[iMeter];
     if (ptc->start_time) {
-      PERF_TIME utime;
+      PERF_TIME utime = NAN;
       PICK_TIME (utime)
       ptc->cumul_time += utime - ptc->start_time;
       ptc->start_time = 0;
@@ -235,7 +236,7 @@ void perf_sprint_all_meters (char *buffer, int length, int reset)
 {
   char string[256];
 
-  int i;
+  int i = 0;
   for (i=0; i<nb_meters; i++) {
     const t_TimeCounter * const ptc = &MeterTable[i];
     if (ptc && ptc->nb_enter) {
@@ -317,7 +318,7 @@ Returns  :      none
 ======================================================================*/
 void perf_destroy_all_meters (void)
 {
-  int i;
+  int i = 0;
   for (i=0; i<nb_meters; i++)
     free (MeterTable[i].name);
   nb_meters = 0;
@@ -376,7 +377,7 @@ Remarks  :      For internal use in this module
 ======================================================================*/
 static int find_meter (const char * const MeterName)
 {
-  int i;
+  int i = 0;
   for (i=0; i<nb_meters; i++)
     if (!strcmp (MeterTable[i].name, MeterName)) return i;
   return -1;
index 3037e152d4f7923a26c2fd08a8dc9e70f4555da4..ec9c77c399a342a11da205f912b718c483bb11df 100644 (file)
@@ -71,10 +71,10 @@ OSD_Environment term (which,"");
 Quantity_Date  OSD_Process::SystemDate(){
 Quantity_Date result;
 Standard_Integer month=0,day=0,year=0,hh=0,mn=0,ss=0;
-struct tm transfert;
-struct timeval tval;
-struct timezone tzone;
-int status;
+struct tm transfert{};
+struct timeval tval{};
+struct timezone tzone{};
+int status = 0;
 
  status = gettimeofday( &tval, &tzone );
  if (status == -1) myError.SetValue (errno, Iam, "GetSystem");
@@ -161,7 +161,7 @@ return (result);
 
 void OSD_Process::SetCurrentDirectory(const OSD_Path& where){
 TCollection_AsciiString Name;
-int status;
+int status = 0;
 
  where.SystemName(Name);
 
index 69816a4c7d65912b90b0659d7ed141d374babb66..f98065548351e75772aa1bb4b043491d9eae4f8e 100644 (file)
@@ -104,22 +104,22 @@ static OSD_SingleProtection TabProtSub [16][16] =
 
 // Initialize System, Group, World for read only and User for read & write
 
-OSD_Protection::OSD_Protection(){
- s = OSD_R;
- u = OSD_RWD;
- g = OSD_R;
- w = OSD_R;
+OSD_Protection::OSD_Protection() : s(OSD_R), u(OSD_RWD), g(OSD_R), w(OSD_R){
 }
 
 OSD_Protection::OSD_Protection(const OSD_SingleProtection System, 
                                      const OSD_SingleProtection User,
                                      const OSD_SingleProtection Group,
-                                     const OSD_SingleProtection World){
+                                     const OSD_SingleProtection World) : s(System), u(User), g(Group), w(World){
 
- s = System;
- u = User;
- g = Group;
- w = World;
 }
 
 void  OSD_Protection::Values(OSD_SingleProtection& System, 
index b4adda843d97f2092451e7714e8aeecabfcfed74..ae026ea53d61a713753bdaf18af9e39d4b635be5 100644 (file)
@@ -131,8 +131,7 @@ else {
 //
 // ----------------------------------------------------------------
 OSD_Function  OSD_SharedLibrary::DlSymb(const Standard_CString aName )const{
-void (*fp)();
-fp =  (void (*)()) dlsym (myHandle,aName);
+auto fp =  (void (*)()) dlsym (myHandle,aName);
 if (!BAD(fp)){
   return (OSD_Function)fp;
  }
index 0e609005e06f0250cc3e23b626d73a91302ebff1..eb9c685740138de4e7e15b51e3ee390dc91ab566 100644 (file)
@@ -281,7 +281,7 @@ Standard_Boolean OSD_Thread::Wait (const Standard_Integer theTimeMs,
   #endif
 
   #ifdef HAS_TIMED_NP
-    struct timespec aTimeout;
+    struct timespec aTimeout{};
     if (clock_gettime (CLOCK_REALTIME, &aTimeout) == -1)
     {
       return Standard_False;
index f77a99d5212d2bf35d8a82be51428641d8dbfa05..846058acdae5303d657a8f4a8f7c76a1acc17513 100644 (file)
@@ -117,7 +117,7 @@ private:
   OSD_ThreadFunction myFunc;
   OSD_PThread myThread;
   Standard_ThreadId myThreadId;
-  Standard_Integer myPriority;
+  Standard_Integer myPriority{};
 
 };
 
index 04a65bba563e0cf36866bad34c4ec221f00c39f1..13070e0376ba61b7a82664fec85fc54353ad64f2 100644 (file)
@@ -92,11 +92,10 @@ const Handle(OSD_ThreadPool)& OSD_ThreadPool::DefaultPool (int theNbThreads)
 // purpose  :
 // =======================================================================
 OSD_ThreadPool::OSD_ThreadPool (int theNbThreads)
-: myNbDefThreads (0),
-  myShutDown (false)
+: myShutDown (false)
 {
   Init (theNbThreads);
-  myNbDefThreads = NbThreads();
+  
 }
 
 // =======================================================================
index 0cef1510dcf013ec7b9b677f5f318e6d5dff81f3..7036f4bb885797f00ff57968751dfda0290a45e8 100644 (file)
@@ -83,11 +83,11 @@ public:
 
   //! Return maximum number of threads to be locked by a single Launcher object by default;
   //! the entire thread pool size is returned by default.
-  int NbDefaultThreadsToLaunch() const { return myNbDefThreads; }
+  int NbDefaultThreadsToLaunch() const { return NbThreads(); }
 
   //! Set maximum number of threads to be locked by a single Launcher object by default.
   //! Should be set BEFORE first usage.
-  void SetNbDefaultThreadsToLaunch (int theNbThreads) { myNbDefThreads = theNbThreads; }
+  void SetNbDefaultThreadsToLaunch (int) {}
 
   //! Checks if thread pools has active consumers.
   Standard_EXPORT bool IsInUse();
@@ -326,7 +326,6 @@ private:
 private:
 
   NCollection_Array1<EnumeratedThread> myThreads; //!< array of defined threads (excluding self-thread)
-  int  myNbDefThreads; //!< maximum number of threads to be locked by a single Launcher by default
   bool myShutDown;     //!< flag to shut down (destroy) the thread pool
 
 };
index 5a0a176bf426f93083e426cda7551432c63decb8..b097d169d15857c174c36c7443ca183c0947eaf7 100644 (file)
@@ -19,7 +19,8 @@
 #ifdef _WIN32
   #include <windows.h>
 #else
-  #include <sys/time.h>
+  #include <math.h>
+#include <sys/time.h>
 #endif
 
 namespace
@@ -74,7 +75,7 @@ Standard_Real OSD_Timer::GetWallClockTime()
        : 0.001 * GetTickCount();
        #endif
 #else
-  struct timeval aTime;
+  struct timeval aTime{};
   // use time of first call as base for computing total time,
   // to avoid loss of precision due to big values of tv_sec (counted since 1970)
   static const time_t aStartSec = (gettimeofday (&aTime, NULL) == 0 ? aTime.tv_sec : 0);
@@ -183,8 +184,8 @@ void OSD_Timer::Show (Standard_OStream& theOStream) const
 {
   const Standard_Real aTimeCumul = ElapsedTime();
 
-  Standard_Integer anHours, aMinutes;
-  Standard_Real    aSeconds;
+  Standard_Integer anHours = 0, aMinutes = 0;
+  Standard_Real    aSeconds = NAN;
   timeToHoursMinutesSeconds (aTimeCumul, anHours, aMinutes, aSeconds);
 
   std::streamsize prec = theOStream.precision (12);
index 7da3f19004c1886e44590905327f2c79d5ee2e77..7a415bdd9c0c63c2c41078e084ca00e747c069d5 100644 (file)
@@ -789,7 +789,7 @@ static void Handler (const int theSignal, siginfo_t */*theSigInfo*/, const Stand
 static void Handler (const int theSignal)
 #endif
 {
-  struct sigaction oldact, act;
+  struct sigaction oldact{}, act{};
   // re-install the signal
   if ( ! sigaction (theSignal, NULL, &oldact) ) {
     // std::cout << " signal is " << theSignal << " handler is " <<  oldact.sa_handler << std::endl;
@@ -1041,7 +1041,7 @@ void OSD::SetSignal (OSD_SignalMode theSignalMode,
   }
 
   // Prepare signal descriptors
-  struct sigaction anActSet, anActDfl, anActOld;
+  struct sigaction anActSet{}, anActDfl{}, anActOld{};
   sigemptyset(&anActSet.sa_mask);
   sigemptyset(&anActDfl.sa_mask);
   sigemptyset(&anActOld.sa_mask);
@@ -1085,7 +1085,7 @@ void OSD::SetSignal (OSD_SignalMode theSignalMode,
     }
     if (theSignalMode == OSD_SignalMode_SetUnhandled && retcode == 0 && anActOld.sa_handler != SIG_DFL)
     {
-      struct sigaction anActOld2;
+      struct sigaction anActOld2{};
       sigemptyset(&anActOld2.sa_mask);
       retcode = sigaction (aSignalTypes[i], &anActOld, &anActOld2);
     }
index a0a7b44e22278c0557cdbf9faf62c619fc8cef5e..436185e37b2ccd3da0e7b34ae0a60e7bc65e6cce 100644 (file)
@@ -201,7 +201,7 @@ static TCollection_ExtendedString TryXmlDriverType
   // of the DocumentElement, the XML format cannot be defined
   if (aParser.parse (theFileName.ToCString()))
   {
-    LDOM_Element anElement = aParser.GetElement();
+    const LDOM_Element& anElement = aParser.GetElement();
     if (anElement.getTagName().equals (LDOMString(aDocumentElementName)))
       theFormat = anElement.getAttribute ("format");
   }
@@ -226,7 +226,7 @@ static TCollection_ExtendedString TryXmlDriverType (Standard_IStream& theIStream
     // of the DocumentElement, the XML format cannot be defined
     if (aParser.parse (theIStream, Standard_True))
     {
-      LDOM_Element anElement = aParser.GetElement();
+      const LDOM_Element& anElement = aParser.GetElement();
       if (anElement.getTagName().equals (LDOMString(aDocumentElementName)))
         theFormat = anElement.getAttribute ("format");
     }
index 812766ded559090a3fb3c33484b33aeb064d3239..dbd22d0984ba4492b4633e4fbf82801463f60104 100644 (file)
@@ -52,7 +52,7 @@ IMPLEMENT_STANDARD_RTTIEXT(PCDM_ReadWriter_1,PCDM_ReadWriter)
 PCDM_ReadWriter_1::PCDM_ReadWriter_1() {}
 static Standard_Integer RemoveExtraSeparator(TCollection_AsciiString& aString) {
 
-  Standard_Integer i, j, len ;
+  Standard_Integer i = 0, j = 0, len = 0 ;
 
   len = aString.Length() ;
 #ifdef _WIN32
@@ -85,7 +85,7 @@ static TCollection_AsciiString AbsolutePath(
     return aRelFilePath ;
   
   TCollection_AsciiString DirPath = aDirPath, RelFilePath = aRelFilePath  ;
-  Standard_Integer i,len ;
+  Standard_Integer i = 0,len = 0 ;
   
 #ifdef _WIN32
   if(DirPath.Search(":") != 2 &&
@@ -226,7 +226,7 @@ void PCDM_ReadWriter_1::WriteVersion(const Handle(Storage_Data)& aData, const Ha
 Standard_Integer PCDM_ReadWriter_1::ReadReferenceCounter(const TCollection_ExtendedString& aFileName, const Handle(Message_Messenger)& theMsgDriver) const {
 
   Standard_Integer theReferencesCounter(0) ;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   Handle(Storage_BaseDriver) theFileDriver;
   TCollection_AsciiString aFileNameU(aFileName);
   if(PCDM::FileDriverType(aFileNameU, theFileDriver) == PCDM_TOFD_Unknown)
@@ -278,9 +278,9 @@ void PCDM_ReadWriter_1::ReadReferences(const TCollection_ExtendedString& aFileNa
   
   ReadUserInfo(aFileName,START_REF,END_REF,ReadReferences, theMsgDriver);
 
-  Standard_Integer theReferenceIdentifier;
+  Standard_Integer theReferenceIdentifier = 0;
   TCollection_ExtendedString theFileName;
-  Standard_Integer theDocumentVersion;
+  Standard_Integer theDocumentVersion = 0;
 
   TCollection_AsciiString theAbsoluteDirectory=GetDirFromFile(aFileName);
 
@@ -337,7 +337,7 @@ void PCDM_ReadWriter_1::ReadUserInfo(const TCollection_ExtendedString& aFileName
                                      TColStd_SequenceOfExtendedString& theUserInfo,
                                      const Handle(Message_Messenger)&)
 {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   Handle(Storage_BaseDriver) theFileDriver;
   TCollection_AsciiString aFileNameU(aFileName);
   if(PCDM::FileDriverType(aFileNameU, theFileDriver) == PCDM_TOFD_Unknown)
@@ -389,7 +389,7 @@ Standard_Integer PCDM_ReadWriter_1::ReadDocumentVersion(const TCollection_Extend
     hd.Read (theFileDriver);
     const TColStd_SequenceOfAsciiString &refUserInfo = hd.UserInfo();
 
-    Standard_Integer i ;
+    Standard_Integer i = 0 ;
     for ( i =1; i<=  refUserInfo.Length() ; i++) {
       if(refUserInfo(i).Search(MODIFICATION_COUNTER) != -1) {
        try { OCC_CATCH_SIGNALS theVersion=refUserInfo(i).Token(" ",2).IntegerValue();}
index 5cc2ddb5455f1b0429a49de1c9cb48d71bd2792e..2f528946ae648dcb05a6b5a0b15dad16a8469952 100644 (file)
@@ -35,9 +35,9 @@ IMPLEMENT_STANDARD_RTTIEXT(PCDM_ReferenceIterator,Standard_Transient)
 //=======================================================================
 
 PCDM_ReferenceIterator::PCDM_ReferenceIterator (const Handle(Message_Messenger)& theMsgDriver) :
-      myIterator(0)
+      myIterator(0), myMessageDriver(theMsgDriver)
 {
-  myMessageDriver = theMsgDriver;
+  
 }
 
 //=======================================================================
index 521a339a2a3371d3df9bf01680f4e92f26a1afe0..08aaec2b1e6160b6a2cf8d2bbbdb04a0dbe71a05 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PLib.hxx>
 
 #include <GeomAbs_Shape.hxx>
@@ -207,7 +209,7 @@ public:
   : myBinom (NULL),
     myMaxBinom (theMaxBinom)
   {
-    Standard_Integer i, im1, ip1, id2, md2, md3, j, k;
+    Standard_Integer i = 0, im1 = 0, ip1 = 0, id2 = 0, md2 = 0, md3 = 0, j = 0, k = 0;
     Standard_Integer np1 = myMaxBinom + 1;
     myBinom = new Standard_Integer*[np1];
     myBinom[0] = new Standard_Integer[1];
@@ -332,11 +334,11 @@ void  PLib::RationalDerivative(const Standard_Integer Degree,
   //  u (1)     u (2) ....   u  (Dimension)     v (1) 
   //
   //
-  Standard_Real Inverse;
+  Standard_Real Inverse = NAN;
   Standard_Real *PolesArray = &Ders;
   Standard_Real *RationalArray = &RDers;
-  Standard_Real Factor ;
-  Standard_Integer ii, Index, OtherIndex, Index1, Index2, jj;
+  Standard_Real Factor = NAN ;
+  Standard_Integer ii = 0, Index = 0, OtherIndex = 0, Index1 = 0, Index2 = 0, jj = 0;
   NCollection_LocalArray<Standard_Real> binomial_array;
   NCollection_LocalArray<Standard_Real> derivative_storage;
   if (Dimension == 3) {
@@ -419,7 +421,7 @@ void  PLib::RationalDerivative(const Standard_Integer Degree,
     }
   }
   else {
-    Standard_Integer kk;
+    Standard_Integer kk = 0;
     Standard_Integer Dimension1 = Dimension + 1;
     Standard_Integer Dimension2 = Dimension << 1;
     Standard_Integer DeRequest1 = DerivativeRequest + 1;
@@ -548,13 +550,13 @@ void  PLib::RationalDerivatives(const Standard_Integer DerivativeRequest,
   // make arrays for the binomial since computing it each time could 
   // raize a performance issue
   // 
-  Standard_Real Inverse;
+  Standard_Real Inverse = NAN;
   Standard_Real *PolesArray = &PolesDerivates;
   Standard_Real *WeightsArray = &WeightsDerivates;
   Standard_Real *RationalArray = &RationalDerivates;
-  Standard_Real Factor ;
+  Standard_Real Factor = NAN ;
   
-  Standard_Integer ii, Index, Index1, Index2, jj;
+  Standard_Integer ii = 0, Index = 0, Index1 = 0, Index2 = 0, jj = 0;
   Standard_Integer DeRequest1 = DerivativeRequest + 1;
   
   NCollection_LocalArray<Standard_Real> binomial_array (DeRequest1);
@@ -594,7 +596,7 @@ void  PLib::RationalDerivatives(const Standard_Integer DerivativeRequest,
     }
   }
   else {
-    Standard_Integer kk;
+    Standard_Integer kk = 0;
     Standard_Integer Dimension2 = Dimension << 1;
     Index  = 0 ;
     Index2 = - Dimension2;
@@ -754,7 +756,7 @@ void  PLib::EvalPolynomial(const Standard_Real    Par,
 {
   Standard_Real* aCoeffs = &PolynomialCoeff + Degree * Dimension;
   Standard_Real* aRes = &Results;
-  Standard_Real* anOriginal;
+  Standard_Real* anOriginal = nullptr;
   Standard_Integer ind = 0;
   switch (DerivativeRequest)
   {
@@ -969,7 +971,7 @@ void  PLib::EvalPoly2Var(const Standard_Real    UParameter,
   TColStd_Array1OfReal Point(1, Dimension*(VDerivativeRequest+1)); 
   Standard_Real * Result =  (Standard_Real *) &Curve.ChangeValue(1);
   Standard_Real * Digit  =  (Standard_Real *) &Point.ChangeValue(1);
-  Standard_Real * ResultArray ;
+  Standard_Real * ResultArray = nullptr ;
   ResultArray = &Results ;
   
   PLib::EvalPolynomial(UParameter,
@@ -1032,12 +1034,12 @@ PLib::EvalLagrange(const Standard_Real                   Parameter,
   //  [0]   is assign to first  point
   //  [1]   is assign to second point
   //
-  Standard_Integer ii, jj, kk, Index, Index1, ReturnCode=0;
+  Standard_Integer ii = 0, jj = 0, kk = 0, Index = 0, Index1 = 0, ReturnCode=0;
   Standard_Integer local_request = DerivativeRequest;
-  Standard_Real  *ParameterArray;
-  Standard_Real  difference;
-  Standard_Real  *PointsArray;
-  Standard_Real  *ResultArray ;
+  Standard_Real  *ParameterArray = nullptr;
+  Standard_Real  difference = NAN;
+  Standard_Real  *PointsArray = nullptr;
+  Standard_Real  *ResultArray = nullptr ;
   
   PointsArray    = &Values ;
   ParameterArray = &Parameters ;
@@ -1155,18 +1157,18 @@ Standard_Integer PLib::EvalCubicHermite
   //  [0]   is assign to first  point
   //  [1]   is assign to last   point
   //
-  Standard_Integer ii, jj, kk, pp, Index, Index1, Degree, ReturnCode;
+  Standard_Integer ii = 0, jj = 0, kk = 0, pp = 0, Index = 0, Index1 = 0, Degree = 0, ReturnCode = 0;
   Standard_Integer local_request = DerivativeRequest ;
   
   ReturnCode = 0 ;
   Degree = 3 ;
   Standard_Real  ParametersArray[4];
-  Standard_Real  difference;
-  Standard_Real  inverse;
-  Standard_Real  *FirstLast;
-  Standard_Real  *PointsArray;
-  Standard_Real  *DerivativesArray;
-  Standard_Real  *ResultArray ;
+  Standard_Real  difference = NAN;
+  Standard_Real  inverse = NAN;
+  Standard_Real  *FirstLast = nullptr;
+  Standard_Real  *PointsArray = nullptr;
+  Standard_Real  *DerivativesArray = nullptr;
+  Standard_Real  *ResultArray = nullptr ;
 
   DerivativesArray = &Derivatives ;
   PointsArray    = &Values ;
@@ -1272,8 +1274,8 @@ Standard_Boolean PLib::HermiteCoefficients(const Standard_Real FirstParameter,
                                           math_Matrix& MatrixCoefs)
 {
   Standard_Integer NbCoeff =  FirstOrder +  LastOrder + 2, Ordre[2];
-  Standard_Integer ii, jj, pp, cote, iof=0;
-  Standard_Real Prod, TBorne = FirstParameter;
+  Standard_Integer ii = 0, jj = 0, pp = 0, cote = 0, iof=0;
+  Standard_Real Prod = NAN, TBorne = FirstParameter;
   math_Vector Coeff(1,NbCoeff), B(1, NbCoeff, 0.0);
   math_Matrix MAT(1,NbCoeff, 1,NbCoeff, 0.0);
 
@@ -1392,7 +1394,7 @@ void PLib::CoefficientsPoles (const Standard_Integer      dim,
   Standard_Integer upwc=0;
   Standard_Integer upwp=0;
   Standard_Integer reflen = Coefs.Length()/dim;
-  Standard_Integer i,j,k
+  Standard_Integer i = 0,j = 0,k = 0
   //Les Extremites.
   if (rat) { 
     lowc = WCoefs->Lower(); lowp = Weights->Lower();
@@ -1408,7 +1410,7 @@ void PLib::CoefficientsPoles (const Standard_Integer      dim,
     (*Weights) (upwp) = (*WCoefs) (upwc);
   }
   
-  Standard_Real Cnp;
+  Standard_Real Cnp = NAN;
   for (i = 2; i < reflen; i++ ) {
     Cnp = PLib::Bin(reflen - 1, i - 1);
     if (rat) (*Weights)(lowp + i - 1) = (*WCoefs)(lowc + i - 1) / Cnp;
@@ -1502,7 +1504,7 @@ void PLib::Trimming(const Standard_Real U1,
   // decomposee sous la forme du schema iteratif de horner.
 
   Standard_Real lsp = U2 - U1;
-  Standard_Integer indc, indw=0;
+  Standard_Integer indc = 0, indw=0;
   Standard_Integer upc = Coefs.Upper() - dim + 1, upw=0;
   Standard_Integer len = Coefs.Length()/dim;
   Standard_Boolean rat = WCoefs != NULL;
@@ -1515,7 +1517,7 @@ void PLib::Trimming(const Standard_Real U1,
   len --;
 
   for (Standard_Integer i = 1; i <= len; i++) {
-    Standard_Integer j ;
+    Standard_Integer j = 0 ;
     indc = upc - dim*(i-1);
     if (rat) indw = upw - i + 1;
     //calcul du coefficient de degre le plus faible a l'iteration i
@@ -1574,11 +1576,11 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt&   Coefs,
   // par buildcache
 //  Standard_Boolean inv = Standard_False; //ColLength != Coefs.ColLength();
 
-  Standard_Integer Row, Col;
-  Standard_Real W, Cnp;
+  Standard_Integer Row = 0, Col = 0;
+  Standard_Real W = NAN, Cnp = NAN;
 
-  Standard_Integer I1, I2;
-  Standard_Integer NPoleu , NPolev;
+  Standard_Integer I1 = 0, I2 = 0;
+  Standard_Integer NPoleu = 0 , NPolev = 0;
   gp_XYZ Temp;
 
   for (NPoleu = LowerRow; NPoleu <= UpperRow; NPoleu++){
@@ -1665,7 +1667,7 @@ void PLib::UTrimming(const Standard_Real U1,
   TColStd_Array1OfReal Temw (lr,ur);
 
   for (Standard_Integer icol = lc; icol <= uc; icol++) {
-    Standard_Integer irow ;
+    Standard_Integer irow = 0 ;
     for ( irow = lr; irow <= ur; irow++) {
       Temp (irow) = Coeffs  (irow, icol);
       if (rat) Temw (irow) = (*WCoeffs) (irow, icol);
@@ -1699,7 +1701,7 @@ void PLib::VTrimming(const Standard_Real V1,
   TColStd_Array1OfReal Temw (lc,uc);
 
   for (Standard_Integer irow = lr; irow <= ur; irow++) {
-    Standard_Integer icol ;
+    Standard_Integer icol = 0 ;
     for ( icol = lc; icol <= uc; icol++) {
       Temp (icol) = Coeffs  (irow, icol);
       if (rat) Temw (icol) = (*WCoeffs) (irow, icol);
@@ -1754,7 +1756,7 @@ Standard_Boolean PLib::HermiteInterpolate
 
   math_Matrix A(0,FirstOrder+LastOrder+1, 0,FirstOrder+LastOrder+1);
   //  The initialisation of the matrix A
-  Standard_Integer irow ;
+  Standard_Integer irow = 0 ;
   for ( irow=0; irow<=FirstOrder; irow++) {
     Standard_Real FirstVal = 1.;
 
@@ -1794,7 +1796,7 @@ Standard_Boolean PLib::HermiteInterpolate
     //  std::cout << "idim=" << idim << std::endl;
 
     math_Vector B(0,FirstOrder+LastOrder+1);
-    Standard_Integer icol ;
+    Standard_Integer icol = 0 ;
     for ( icol=0; icol<=FirstOrder; icol++) 
       B(icol) = FirstConstr(idim,icol);
 
@@ -1958,8 +1960,8 @@ void PLib::JacobiParameters(const GeomAbs_Shape ConstraintOrder,
                      const Standard_Real U1, const Standard_Real U2,
                      Standard_Real& Length)
 {
-  Standard_Integer i,j,idim, degdim;
-  Standard_Real C1,C2,Sum,Tran,X1,X2,Der1,Der2,D1,D2,DD;
+  Standard_Integer i = 0,j = 0,idim = 0, degdim = 0;
+  Standard_Real C1 = NAN,C2 = NAN,Sum = NAN,Tran = NAN,X1 = NAN,X2 = NAN,Der1 = NAN,Der2 = NAN,D1 = NAN,D2 = NAN,DD = NAN;
 
   Standard_Real *PolynomialArray = &PolynomialCoeff ;
 
@@ -2022,11 +2024,11 @@ void PLib::JacobiParameters(const GeomAbs_Shape ConstraintOrder,
                      const Standard_Real Tol, 
                      Standard_Real& Length, Standard_Real& Error)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer NbSubInt = 1,    // Current number of subintervals
                    MaxNbIter = 13,  // Max number of iterations
                    NbIter    = 1;   // Current number of iterations
-  Standard_Real    dU,OldLen,LenI;
+  Standard_Real    dU = NAN,OldLen = NAN,LenI = NAN;
 
   PLib::EvalLength(Degree,Dimension, PolynomialCoeff, U1,U2, Length);
 
index 7021f2f6122fb214c3d6c3b39fb62f8ec77c4104..74ff14b30e870e541868019369a92dd13804a54a 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math_Vector.hxx>
 #include <PLib_DoubleJacobiPolynomial.hxx>
 #include <PLib_JacobiPolynomial.hxx>
@@ -61,8 +63,8 @@ PLib_DoubleJacobiPolynomial::MaxErrorU(const Standard_Integer Dimension,
                                       const Standard_Integer dJacCoeff, 
                                       const TColStd_Array1OfReal& JacCoeff) const 
 {
-  Standard_Integer ii,idim,dJac,MinU,MinV,WorkDegreeU,WorkDegreeV;
-  Standard_Real Bid0;
+  Standard_Integer ii = 0,idim = 0,dJac = 0,MinU = 0,MinV = 0,WorkDegreeU = 0,WorkDegreeV = 0;
+  Standard_Real Bid0 = NAN;
 
   math_Vector MaxErrDim(1,Dimension,0.);
 
@@ -94,8 +96,8 @@ PLib_DoubleJacobiPolynomial::MaxErrorV(const Standard_Integer Dimension,
                                       const Standard_Integer dJacCoeff, 
                                       const TColStd_Array1OfReal& JacCoeff) const 
 {
-  Standard_Integer jj,idim,dJac,MinU,MinV,WorkDegreeU,WorkDegreeV;
-  Standard_Real Bid0;
+  Standard_Integer jj = 0,idim = 0,dJac = 0,MinU = 0,MinV = 0,WorkDegreeU = 0,WorkDegreeV = 0;
+  Standard_Real Bid0 = NAN;
 
   math_Vector MaxErrDim(1,Dimension,0.);
 
@@ -130,8 +132,8 @@ PLib_DoubleJacobiPolynomial::MaxError(const Standard_Integer Dimension,
                                      const TColStd_Array1OfReal& JacCoeff,
                                      const Standard_Real Error) const 
 {
-  Standard_Integer ii,jj,idim,dJac,MinU,MinV,WorkDegreeU,WorkDegreeV;
-  Standard_Real Bid0,Bid1;
+  Standard_Integer ii = 0,jj = 0,idim = 0,dJac = 0,MinU = 0,MinV = 0,WorkDegreeU = 0,WorkDegreeV = 0;
+  Standard_Real Bid0 = NAN,Bid1 = NAN;
 
   math_Vector MaxErrDim(1,Dimension,0.);
 
@@ -182,8 +184,8 @@ void PLib_DoubleJacobiPolynomial::ReduceDegree(const Standard_Integer Dimension,
                                               Standard_Integer& NewDegreeU, 
                                               Standard_Integer& NewDegreeV) const
 {
-  Standard_Integer NewU,NewV;
-  Standard_Real ErrU,ErrV;
+  Standard_Integer NewU = 0,NewV = 0;
+  Standard_Real ErrU = NAN,ErrV = NAN;
 
   NewU = MaxDegreeU;
   NewV = MaxDegreeV;
@@ -253,8 +255,8 @@ PLib_DoubleJacobiPolynomial::AverageError(const Standard_Integer Dimension,
                                              const Standard_Integer dJacCoeff, 
                                              const TColStd_Array1OfReal& JacCoeff) const 
 {
-  Standard_Integer ii,jj,idim,dJac,IDebU,IDebV,MinU,MinV,WorkDegreeU,WorkDegreeV;
-  Standard_Real Bid0,Bid1,AverageErr;
+  Standard_Integer ii = 0,jj = 0,idim = 0,dJac = 0,IDebU = 0,IDebV = 0,MinU = 0,MinV = 0,WorkDegreeU = 0,WorkDegreeV = 0;
+  Standard_Real Bid0 = NAN,Bid1 = NAN,AverageErr = NAN;
 
 //----------------------------- Initialisations ------------------------
 
@@ -300,7 +302,7 @@ void PLib_DoubleJacobiPolynomial::WDoubleJacobiToCoefficients(const Standard_Int
                                                              const TColStd_Array1OfReal& JacCoeff, 
                                                              TColStd_Array1OfReal& Coefficients) const 
 {
-  Standard_Integer iu,iv,idim,WorkDegreeU,WorkDegreeV;
+  Standard_Integer iu = 0,iv = 0,idim = 0,WorkDegreeU = 0,WorkDegreeV = 0;
 
   Coefficients.Init(0.);
 
index 83681829b7ab45c3f01be493ea0b72d35f5732b6..fba21f609d14e4c1c271046d542493784de267a8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <NCollection_LocalArray.hxx>
 #include <PLib.hxx>
 #include <PLib_HermitJacobi.hxx>
@@ -31,12 +33,12 @@ PLib_HermitJacobi::PLib_HermitJacobi(const Standard_Integer WorkDegree,
                                     const GeomAbs_Shape ConstraintOrder) :
                                      myH(1,2*(PLib::NivConstr(ConstraintOrder)+1),
                                         1,2*(PLib::NivConstr(ConstraintOrder)+1)),
-                                    myWCoeff(1,2*(PLib::NivConstr(ConstraintOrder)+1)+1)
+                                    myJacobi(new PLib_JacobiPolynomial (WorkDegree,ConstraintOrder)), myWCoeff(1,2*(PLib::NivConstr(ConstraintOrder)+1)+1)
 {
   Standard_Integer NivConstr = PLib::NivConstr(ConstraintOrder);
   PLib::HermiteCoefficients(-1.,1.,NivConstr,NivConstr,myH);
 
-  myJacobi = new PLib_JacobiPolynomial (WorkDegree,ConstraintOrder);
+  
   
   myWCoeff.Init(0.);
   myWCoeff(1) = 1.;
@@ -97,11 +99,11 @@ void PLib_HermitJacobi::ToCoefficients(const Standard_Integer Dimension,
                                       const TColStd_Array1OfReal& HermJacCoeff,
                                       TColStd_Array1OfReal& Coefficients) const
 {
-  Standard_Integer i,k,idim,i1,i2;
-  Standard_Real h1, h2;
+  Standard_Integer i = 0,k = 0,idim = 0,i1 = 0,i2 = 0;
+  Standard_Real h1 = NAN, h2 = NAN;
   Standard_Integer NivConstr  = this->NivConstr(),
                    DegreeH    = 2*NivConstr+1;
-  Standard_Integer ibegHJC = HermJacCoeff.Lower(), kdim;
+  Standard_Integer ibegHJC = HermJacCoeff.Lower(), kdim = 0;
 
   TColStd_Array1OfReal AuxCoeff(0,(Degree+1)*Dimension-1);
   AuxCoeff.Init(0.);
@@ -153,7 +155,7 @@ void PLib_HermitJacobi::D0123(const Standard_Integer NDeriv,
   NCollection_LocalArray<Standard_Real> jac3 (4 * 20);
   NCollection_LocalArray<Standard_Real> wvalues (4);
 
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   Standard_Integer NivConstr  = this->NivConstr(),
                    WorkDegree = this->WorkDegree(),
                    DegreeH    = 2*NivConstr+1;
@@ -162,7 +164,7 @@ void PLib_HermitJacobi::D0123(const Standard_Integer NDeriv,
                    ibeg2 = BasisD2.Lower(),
                    ibeg3 = BasisD3.Lower();
   Standard_Integer JacDegree = WorkDegree-DegreeH-1;
-  Standard_Real W0;
+  Standard_Real W0 = NAN;
 
   TColStd_Array1OfReal JacValue0(jac0[0], 0, Max(0,JacDegree)); 
   TColStd_Array1OfReal WValues(wvalues[0],0,NDeriv); 
index 6db277c6b723d15fda02c5b003377cba5abf5969..79d4ec2384bbb862ca9ff46145bbb8f361b2e633 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math.hxx>
 #include <math_Vector.hxx>
 #include <PLib.hxx>
@@ -37,9 +39,9 @@ const Standard_Integer UNDEFINED=-999;
 //=======================================================================
 
  PLib_JacobiPolynomial::PLib_JacobiPolynomial (const Standard_Integer WorkDegree, 
-                                               const GeomAbs_Shape ConstraintOrder)
+                                               const GeomAbs_Shape ConstraintOrder) : myWorkDegree(WorkDegree)
 {
-  myWorkDegree = WorkDegree;
+  
     
   switch (ConstraintOrder) {
     case GeomAbs_C0: myNivConstr = 0; break;
@@ -91,7 +93,7 @@ void PLib_JacobiPolynomial::Weights(const Standard_Integer NbGaussPoints,
                                        TColStd_Array2OfReal& TabWeights) const 
 {
 
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   Standard_Real const *pdb=NULL;     // the current pointer to WeightsDB
   switch (myNivConstr) {
     case 0: pdb = WeightsDB_C0; break;
@@ -167,7 +169,7 @@ Standard_Real PLib_JacobiPolynomial::MaxError(const Standard_Integer Dimension,
                                                  Standard_Real& JacCoeff, 
                                                  const Standard_Integer NewDegree) const 
 {
-  Standard_Integer i,idim,ibeg,icut;
+  Standard_Integer i = 0,idim = 0,ibeg = 0,icut = 0;
 
   math_Vector MaxErrDim(1,Dimension,0.);
 
@@ -198,8 +200,8 @@ void PLib_JacobiPolynomial::ReduceDegree(const Standard_Integer Dimension,
                                             Standard_Integer& NewDegree,
                                             Standard_Real& MaxError) const
 {
-  Standard_Integer i,idim,icut, ia = 2*(myNivConstr+1)-1;
-  Standard_Real Bid,Eps1,Error;
+  Standard_Integer i = 0,idim = 0,icut = 0, ia = 2*(myNivConstr+1)-1;
+  Standard_Real Bid = NAN,Eps1 = NAN,Error = NAN;
 
   math_Vector MaxErrDim(1,Dimension,0.);
 
@@ -249,8 +251,8 @@ Standard_Real PLib_JacobiPolynomial::AverageError(const Standard_Integer Dimensi
                                                      const Standard_Integer NewDegree) 
                                                      const
 {
-  Standard_Integer i,idim, icut = Max (2*(myNivConstr+1)+1, NewDegree+1);
-  Standard_Real BidJ, AverageErr = 0.;
+  Standard_Integer i = 0,idim = 0, icut = Max (2*(myNivConstr+1)+1, NewDegree+1);
+  Standard_Real BidJ = NAN, AverageErr = 0.;
   Standard_Real * JacArray = &JacCoeff;
   for (idim=1; idim<=Dimension; idim++) {
     for (i=icut; i<=myDegree; i++) {
@@ -273,9 +275,9 @@ void PLib_JacobiPolynomial::ToCoefficients(const Standard_Integer Dimension,
                                           TColStd_Array1OfReal& Coefficients) const
 {
   const Standard_Integer MAXM=31;
-  Standard_Integer i,iptt,j,idim, ii, jj;
+  Standard_Integer i = 0,iptt = 0,j = 0,idim = 0, ii = 0, jj = 0;
   Standard_Real const *pTr=NULL;  // the pointer to TransMatrix
-  Standard_Real Bid;
+  Standard_Real Bid = NAN;
   Standard_Integer ibegJC=JacCoeff.Lower(), ibegC=Coefficients.Lower();
 
   switch (myNivConstr) {
@@ -325,8 +327,8 @@ void PLib_JacobiPolynomial::D0123(const Standard_Integer NDeriv,
                                  TColStd_Array1OfReal& BasisD2,
                                  TColStd_Array1OfReal& BasisD3)
 {
-  Standard_Integer i,j, HermitNivConstr = 2*(myNivConstr+1);
-  Standard_Real Aux1,Aux2;
+  Standard_Integer i = 0,j = 0, HermitNivConstr = 2*(myNivConstr+1);
+  Standard_Real Aux1 = NAN,Aux2 = NAN;
 
   if (myTNorm.IsNull()) {
 
@@ -361,7 +363,7 @@ void PLib_JacobiPolynomial::D0123(const Standard_Integer NDeriv,
   Standard_Integer ibeg1 = BasisD1.Lower();
   Standard_Integer ibeg2 = BasisD2.Lower();
   Standard_Integer ibeg3 = BasisD3.Lower();
-  Standard_Integer i0, i1, i2, i3;
+  Standard_Integer i0 = 0, i1 = 0, i2 = 0, i3 = 0;
 
 
   if (myDegree == 0) {
@@ -407,7 +409,7 @@ void PLib_JacobiPolynomial::D0123(const Standard_Integer NDeriv,
     }
 
     else {
-      Standard_Real CofA, CofB, Denom;
+      Standard_Real CofA = NAN, CofB = NAN, Denom = NAN;
       for (i=2; i<=myDegree; i++) {
        i0=i+ibeg0; 
        i1=i+ibeg1;
@@ -441,7 +443,7 @@ void PLib_JacobiPolynomial::D0123(const Standard_Integer NDeriv,
       BV[i] *= TNorm[i];
   }
   else {
-    Standard_Real TNorm;
+    Standard_Real TNorm = NAN;
     for (i=0; i<=myDegree; i++) {
       TNorm = myTNorm->Value(i);
       BasisValue(i+ibeg0) *= TNorm;
index 8c07ff86712be80bb4f2ddc9bdec39b838e058d5..aa4ac1e1321988d5fba9ea81fadd8f4d941f61eb 100644 (file)
@@ -37,11 +37,11 @@ static const Standard_Real COSMIN = 1.e-2;
 // G1 Constraints  
 
 Plate_FreeGtoCConstraint::Plate_FreeGtoCConstraint(const gp_XY& point2d,const Plate_D1& D1S,const Plate_D1& D1T,
-                                                  const Standard_Real IncrementalLoad, const Standard_Integer orientation)
+                                                  const Standard_Real IncrementalLoad, const Standard_Integer orientation) : pnt2d(point2d), nb_PPConstraints(0), nb_LSConstraints(0)
 {
-  pnt2d = point2d;
-  nb_PPConstraints = 0;
-  nb_LSConstraints = 0;
+  
+  
+  
 
   gp_XYZ normale = D1T.Du^D1T.Dv;
   if(normale.Modulus() < NORMIN) return;
@@ -92,11 +92,11 @@ Plate_FreeGtoCConstraint::Plate_FreeGtoCConstraint(const gp_XY& point2d,const Pl
 
 Plate_FreeGtoCConstraint::Plate_FreeGtoCConstraint(const gp_XY& point2d,const Plate_D1& D1S,const Plate_D1& D1T0,
                                                   const Plate_D2& D2S,const Plate_D2& D2T0,
-                                                  const Standard_Real IncrementalLoad, const Standard_Integer orientation)
+                                                  const Standard_Real IncrementalLoad, const Standard_Integer orientation) : pnt2d(point2d), nb_PPConstraints(0), nb_LSConstraints(0)
 {
-  pnt2d = point2d;
-  nb_PPConstraints = 0;
-  nb_LSConstraints = 0;
+  
+  
+  
   Plate_D1 D1T = D1T0;
   Plate_D2 D2T = D2T0;
 
@@ -227,11 +227,11 @@ Plate_FreeGtoCConstraint::Plate_FreeGtoCConstraint(const gp_XY& point2d,const Pl
 Plate_FreeGtoCConstraint::Plate_FreeGtoCConstraint(const gp_XY& point2d,const Plate_D1& D1S,const Plate_D1& D1T0,
                                                   const Plate_D2& D2S,const Plate_D2& D2T0,
                                                   const Plate_D3& D3S,const Plate_D3& D3T0,
-                                                  const Standard_Real IncrementalLoad, const Standard_Integer orientation)
+                                                  const Standard_Real IncrementalLoad, const Standard_Integer orientation) : pnt2d(point2d), nb_PPConstraints(0), nb_LSConstraints(0)
 {
-  pnt2d = point2d;
-  nb_PPConstraints = 0;
-  nb_LSConstraints = 0;
+  
+  
+  
   Plate_D1 D1T = D1T0;
   Plate_D2 D2T = D2T0;
   Plate_D3 D3T = D3T0;
index 5fa72d2af12727eaae3eb45c264f042087fea9e7..41135d44e9f56e8206ffdea2b710e15ebcee0da4 100644 (file)
@@ -21,7 +21,7 @@
 Plate_GlobalTranslationConstraint::Plate_GlobalTranslationConstraint(const TColgp_SequenceOfXY& SOfXY)
 :myLXYZC(SOfXY.Length()-1,SOfXY.Length() )
 {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for( i=1;i<=SOfXY.Length();i++)
     {
       myLXYZC.SetPPC(i,Plate_PinpointConstraint (SOfXY(i),gp_XYZ(0.,0.,0.),0,0));
index f1bc9351e44413a4c6a0a5e62849e275f6c97a25..5dac44df2f9de5487783ada6821192f7e7ade1ba 100644 (file)
@@ -28,19 +28,19 @@ static const Standard_Real NORMIN = 1.e-10;
 static const Standard_Real COSMIN = 1.e-2;
 
 Plate_GtoCConstraint::Plate_GtoCConstraint(const Plate_GtoCConstraint& ref)
-:myD1SurfInit(ref.myD1SurfInit)
+:myD1SurfInit(ref.myD1SurfInit), pnt2d(ref.pnt2d), nb_PPConstraints(ref.nb_PPConstraints)
 {
-  pnt2d = ref.pnt2d;  
-  nb_PPConstraints = ref.nb_PPConstraints;
+   
+  
   for(Standard_Integer i = 0; i<nb_PPConstraints; i++)
     myPPC[i] = ref.myPPC[i];
 }
 
 Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d, const Plate_D1& D1S, const Plate_D1& D1T)
-:myD1SurfInit(D1S)
+:myD1SurfInit(D1S), pnt2d(point2d), nb_PPConstraints(0)
 {
-  pnt2d = point2d;
-  nb_PPConstraints = 0;
+  
+  
 
   gp_XYZ normale = D1T.Du^D1T.Dv;
 //alr le 12/11/96
@@ -69,10 +69,10 @@ Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d, const Plate_D1&
 
 Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d, 
   const Plate_D1& D1S, const Plate_D1& D1T, const gp_XYZ& nP)
-:myD1SurfInit(D1S)
+:myD1SurfInit(D1S), pnt2d(point2d), nb_PPConstraints(0)
 {
-  pnt2d = point2d;
-  nb_PPConstraints = 0;
+  
+  
 
   gp_XYZ normale = D1T.Du^D1T.Dv;
   if(normale.Modulus() < NORMIN) return;
@@ -104,11 +104,11 @@ Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d,
 
 Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d, const Plate_D1& D1S, const Plate_D1& D1T, 
                                           const Plate_D2& D2S, const Plate_D2& D2T)
-:myD1SurfInit(D1S)
+:myD1SurfInit(D1S), pnt2d(point2d), nb_PPConstraints(0)
 {
 
-  pnt2d = point2d;
-  nb_PPConstraints = 0;
+  
+  
 
   gp_XYZ normale = D1T.Du^D1T.Dv;
 //alr le 12/11/96
@@ -179,11 +179,11 @@ Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d, const Plate_D1&
 
 Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d, const Plate_D1& D1S, const Plate_D1& D1T, 
                                           const Plate_D2& D2S, const Plate_D2& D2T, const gp_XYZ& nP)
-:myD1SurfInit(D1S)
+:myD1SurfInit(D1S), pnt2d(point2d), nb_PPConstraints(0)
 {
 
-  pnt2d = point2d;
-  nb_PPConstraints = 0;
+  
+  
 
   gp_XYZ normale = D1T.Du^D1T.Dv;
 //alr le 12/11/96
@@ -258,10 +258,10 @@ Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d, const Plate_D1&
 Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d, const Plate_D1& D1S, const Plate_D1& D1T, 
                                           const Plate_D2& D2S, const Plate_D2& D2T,
                                           const Plate_D3& D3S, const Plate_D3& D3T)
-:myD1SurfInit(D1S)
+:myD1SurfInit(D1S), pnt2d(point2d), nb_PPConstraints(0)
 {
-  pnt2d = point2d;
-  nb_PPConstraints = 0;
+  
+  
 
   gp_XYZ normale = D1T.Du^D1T.Dv;
   if(normale.Modulus() < NORMIN) return;
@@ -377,11 +377,11 @@ Plate_GtoCConstraint::Plate_GtoCConstraint(const gp_XY& point2d, const Plate_D1&
                                           const Plate_D3& D3S, const Plate_D3& D3T,
 //                                           const gp_XYZ& nP)
                                            const gp_XYZ& )
-:myD1SurfInit(D1S)
+:myD1SurfInit(D1S), pnt2d(point2d), nb_PPConstraints(0)
 {
 
-  pnt2d = point2d;
-  nb_PPConstraints = 0;
+  
+  
 
   gp_XYZ normale = D1T.Du^D1T.Dv;
   if(normale.Modulus() < NORMIN) return;
index 239e12ee39fab2efa651a19b289411049398fa5f..669547d85470b97fcd8a28ea182574eae3035f28 100644 (file)
 Plate_LinearScalarConstraint::Plate_LinearScalarConstraint() {}
 
 Plate_LinearScalarConstraint::Plate_LinearScalarConstraint
-   (const Plate_PinpointConstraint& PPC1,const gp_XYZ& coeff)
+   (const Plate_PinpointConstraint& PPC1,const gp_XYZ& coeff) : myPPC(new Plate_HArray1OfPinpointConstraint(1,1)), myCoef(new TColgp_HArray2OfXYZ(1,1,1,1))
 
 {
-  myPPC = new Plate_HArray1OfPinpointConstraint(1,1);
-  myCoef = new TColgp_HArray2OfXYZ(1,1,1,1);
+  
+  
 
   myPPC->ChangeValue(1) = PPC1;
   myCoef->ChangeValue(1,1) = coeff;
@@ -57,10 +57,10 @@ Plate_LinearScalarConstraint::Plate_LinearScalarConstraint
 }
 
 
-Plate_LinearScalarConstraint::Plate_LinearScalarConstraint(const Standard_Integer ColLen,const Standard_Integer RowLen)
+Plate_LinearScalarConstraint::Plate_LinearScalarConstraint(const Standard_Integer ColLen,const Standard_Integer RowLen) : myPPC(new Plate_HArray1OfPinpointConstraint(1,RowLen)), myCoef(new TColgp_HArray2OfXYZ(1,ColLen,1,RowLen))
 {
-  myPPC = new Plate_HArray1OfPinpointConstraint(1,RowLen);
-  myCoef = new TColgp_HArray2OfXYZ(1,ColLen,1,RowLen);
+  
+  
   myCoef->Init(gp_XYZ(0.,0.,0.));
 }
 
index 89d093d7195c7b66d397daecdda2a75b3a139cdc..b5fc861cfc2028f43c4fd4dfe3be56c6ce537191 100644 (file)
@@ -43,10 +43,10 @@ Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Plate_Array1OfPinpoin
 }
 
 
-Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Standard_Integer ColLen,const Standard_Integer RowLen)
+Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Standard_Integer ColLen,const Standard_Integer RowLen) : myPPC(new Plate_HArray1OfPinpointConstraint(1,RowLen)), myCoef(new TColStd_HArray2OfReal(1,ColLen,1,RowLen))
 {
-  myPPC = new Plate_HArray1OfPinpointConstraint(1,RowLen);
-  myCoef = new TColStd_HArray2OfReal(1,ColLen,1,RowLen);
+  
+  
   myCoef->Init(0.0);
 }
 
index b07cd3034bed1ba65278c2fb46a46a7f35e3667c..9c2781ad9e238fad790fc7ce123c3babf161e9fb 100644 (file)
 
 #include <Plate_PinpointConstraint.hxx>
 
-Plate_PinpointConstraint::Plate_PinpointConstraint()
+Plate_PinpointConstraint::Plate_PinpointConstraint() : idu(0), idv(0)
 {
   pnt2d = gp_XY(0,0);
   value = gp_XYZ(0,0,0);
-  idu = 0;
-  idv = 0;
+  
+  
 }
 
 
 Plate_PinpointConstraint::Plate_PinpointConstraint(const gp_XY& point2d, const gp_XYZ& ImposedValue,
-                                                  const Standard_Integer iu, const Standard_Integer iv)
+                                                  const Standard_Integer iu, const Standard_Integer iv) : pnt2d(point2d), value(ImposedValue), idu(iu), idv(iv)
 {
-  pnt2d = point2d;
-  value = ImposedValue;
-  idu = iu;
-  idv = iv;
+  
+  
+  
+  
 }
index 6047b82b4331a778376a70a423337e8f5a2f163c..3004a431dabd7b7f80923bcece94a8155c82aa91 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <gp_XY.hxx>
 #include <math_Gauss.hxx>
 #include <math_Matrix.hxx>
@@ -37,13 +39,13 @@ Plate_Plate::Plate_Plate()
 : order(0), n_el(0), n_dim(0),
   solution(0),points(0),deru(0),derv(0),
   OK(Standard_False),maxConstraintOrder(0),
-  Uold (1.e20),
+  PolynomialPartOnly(Standard_False), Uold (1.e20),
   Vold (1.e20),
   U2 (0.0),
   R (0.0),
   L (0.0)
 {
-  PolynomialPartOnly = Standard_False;
+  
   memset (ddu, 0, sizeof (ddu));
   memset (ddv, 0, sizeof (ddv));
 }
@@ -63,7 +65,7 @@ Plate_Plate::Plate_Plate(const Plate_Plate& Ref)
   R (0.0),
   L (0.0)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   if (Ref.OK) {
     if (n_dim >0 && Ref.solution != 0) {
       solution = new gp_XYZ[n_dim];
@@ -117,7 +119,7 @@ Plate_Plate::Plate_Plate(const Plate_Plate& Ref)
    n_el = Ref.n_el;
    n_dim = Ref.n_dim;
    OK = Ref.OK;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   if (Ref.OK) {
     if (n_dim >0 && Ref.solution != 0) {
       solution = new gp_XYZ[n_dim];
@@ -224,7 +226,7 @@ void Plate_Plate::Load(const Plate_GtoCConstraint& GtoCConst)
 
 void Plate_Plate::Load(const Plate_FreeGtoCConstraint& FGtoCConst) 
 {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for( i=0;i< FGtoCConst.nb_PPC();i++) 
     Load(FGtoCConst.GetPPC(i));
   for(i=0;i< FGtoCConst.nb_LSC();i++) 
@@ -255,14 +257,14 @@ void Plate_Plate::SolveTI(const Standard_Integer ord,
   if(anisotropie > 1.e+6) return;
 
 // computation of the bounding box of the 2d PPconstraints
-  Standard_Real xmin,xmax,ymin,ymax;
+  Standard_Real xmin = NAN,xmax = NAN,ymin = NAN,ymax = NAN;
   UVBox(xmin,xmax,ymin,ymax);
 
   Standard_Real du = 0.5*(xmax - xmin);
   if(anisotropie >1.) du *= anisotropie;
   if(du < 1.e-10) return;
   ddu[0] = 1;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for( i=1;i<=9;i++) ddu[i] = ddu[i-1] / du;
 
   Standard_Real dv = 0.5*(ymax - ymin);
@@ -300,7 +302,7 @@ void Plate_Plate::SolveTI1(const Standard_Integer IterationNumber,
   
   delete [] (gp_XY*)points;
   points = new gp_XY[n_el];
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for( i=0; i<n_el;i++)  Points(i) = myConstraints(i+1).Pnt2d();
 
   delete [] (Standard_Integer*)deru;
@@ -416,7 +418,7 @@ void Plate_Plate::SolveTI2(const Standard_Integer IterationNumber,
 
   Standard_Integer nCC1 = myConstraints.Length();
   Standard_Integer nCC2 = 0;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for( i = 1; i<= myLXYZConstraints.Length(); i++)
     nCC2 += myLXYZConstraints(i).Coeff().ColLength();
 
@@ -557,7 +559,7 @@ void Plate_Plate::SolveTI3(const Standard_Integer IterationNumber,
   Standard_Integer nCC1 = myConstraints.Length();
 
   Standard_Integer nCC2 = 0;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for( i = 1; i<= myLXYZConstraints.Length(); i++)
     nCC2 += myLXYZConstraints(i).Coeff().ColLength();
 
@@ -612,7 +614,7 @@ void Plate_Plate::SolveTI3(const Standard_Integer IterationNumber,
 
   k = 3*n_dimsousmat;
   Standard_Integer kppc = nPPC2;
-  Standard_Integer j ;
+  Standard_Integer j = 0 ;
   for(i = 1; i<= myLScalarConstraints.Length(); i++) {
     for( j=0;j<nCC1;j++){
 
@@ -636,7 +638,7 @@ void Plate_Plate::SolveTI3(const Standard_Integer IterationNumber,
 
     Standard_Integer k2 = nCC1;
     Standard_Integer kppc2 = nCC1;
-    Standard_Integer i2 ;
+    Standard_Integer i2 = 0 ;
     for( i2 = 1; i2<=myLXYZConstraints.Length() ; i2++){
 
       math_Matrix tmpmat(1,myLScalarConstraints(i).GetPPC().Length(),1,myLXYZConstraints(i2).GetPPC().Length() );
@@ -768,7 +770,7 @@ void Plate_Plate::SolveTI3(const Standard_Integer IterationNumber,
     n_dim = n_el+order*(order+1)/2;
     solution = new gp_XYZ[n_dim];
     
-    Standard_Integer icoor ;
+    Standard_Integer icoor = 0 ;
     for( icoor=1; icoor<=3;icoor++){
       for(i=0;i<nCC1;i++)
        sec_member((icoor-1)*n_dimsousmat+i) = myConstraints(i+1).Value().Coord(icoor);
@@ -853,7 +855,7 @@ void Plate_Plate::fillXYZmatrix(math_Matrix &mat,
                                const Standard_Integer ncc1,
                                const Standard_Integer ncc2) const
 {
-  Standard_Integer i,j ;
+  Standard_Integer i = 0,j = 0 ;
   for( i=0; i<ncc1;i++) {
     for( j=0;j<i;j++) {
       Standard_Real signe = 1;
@@ -1111,8 +1113,8 @@ gp_XYZ Plate_Plate::EvaluateDerivative(const gp_XY& point2d, const Standard_Inte
 Standard_Real Plate_Plate::SolEm(const gp_XY& point2d, const Standard_Integer iu, const Standard_Integer iv) const 
 {
   Plate_Plate* aThis = const_cast<Plate_Plate*>(this);
-  Standard_Real U,V;
-  Standard_Integer IU,IV;
+  Standard_Real U = NAN,V = NAN;
+  Standard_Integer IU = 0,IV = 0;
 
   if(iv>iu)
   {
@@ -1157,7 +1159,7 @@ Standard_Real Plate_Plate::SolEm(const gp_XY& point2d, const Standard_Integer iu
   //
 
   Standard_Integer expo =  mm1 - IU - IV;
-  Standard_Real pr;
+  Standard_Real pr = NAN;
   if(expo<0)
        {
         pr = R;
@@ -1581,7 +1583,7 @@ Standard_Real Plate_Plate::SolEm(const gp_XY& point2d, const Standard_Integer iu
 void Plate_Plate::UVBox(Standard_Real& UMin, Standard_Real& UMax,
                        Standard_Real& VMin, Standard_Real& VMax) const 
 {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   const Standard_Real Bmin = 1.e-3;
   UMin =  myConstraints(1).Pnt2d().X();
   UMax =  UMin;
index 0a0594836cc0c4c16c03c16356f5a7c90563aa61..2c89dfeb3847d2fd09cdd0cc855a9be7c9914344 100644 (file)
@@ -160,8 +160,8 @@ private:
   Plate_SequenceOfPinpointConstraint myConstraints;
   Plate_SequenceOfLinearXYZConstraint myLXYZConstraints;
   Plate_SequenceOfLinearScalarConstraint myLScalarConstraints;
-  Standard_Real ddu[10];
-  Standard_Real ddv[10];
+  Standard_Real ddu[10]{};
+  Standard_Real ddv[10]{};
   Standard_Integer maxConstraintOrder;
   Standard_Boolean PolynomialPartOnly;
   Standard_Real Uold;
index 6ad8b2345116f4785be62135874b384c68db6fdc..0e2d6b6bfd7fec8d69470ee5f2c5ad404b193f9f 100644 (file)
@@ -41,7 +41,7 @@ Handle(Standard_Transient) Plugin::Load (const Standard_GUID& aGUID,
   aGUID.ToCString(thePluginId);
   TCollection_AsciiString pid(thePluginId);
   static Plugin_MapOfFunctions theMapOfFunctions;
-  OSD_Function f;
+  OSD_Function f = nullptr;
 
   if(!theMapOfFunctions.IsBound(pid)) {
    
index dff7e3abaf6b90ac3e012385087f8e2370b0ab64..35779418db40641c6ab0681a88ef57e61ff18fae 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Poly.hxx>
 
 #include <gp_Ax1.hxx>
@@ -117,7 +119,7 @@ void Poly::Write(const Handle(Poly_Triangulation)& T,
 
   if (!Compact) OS << "\n3D Nodes :\n";
 
-  Standard_Integer i, nbNodes = T->NbNodes();
+  Standard_Integer i = 0, nbNodes = T->NbNodes();
   for (i = 1; i <= nbNodes; i++)
   {
     const gp_Pnt aNode = T->Node (i);
@@ -146,7 +148,7 @@ void Poly::Write(const Handle(Poly_Triangulation)& T,
 
   if (!Compact) OS << "\nTriangles :\n";
   Standard_Integer nbTriangles = T->NbTriangles();
-  Standard_Integer n1, n2, n3;
+  Standard_Integer n1 = 0, n2 = 0, n3 = 0;
   for (i = 1; i <= nbTriangles; i++)
   {
     if (!Compact) OS << std::setw(10) << i << " : ";
@@ -189,7 +191,7 @@ void Poly::Write(const Handle(Poly_Polygon3D)& P,
 
   if (!Compact) OS << "\nNodes :\n";
 
-  Standard_Integer i, nbNodes = P->NbNodes();
+  Standard_Integer i = 0, nbNodes = P->NbNodes();
   const TColgp_Array1OfPnt& Nodes = P->Nodes();
   for (i = 1; i <= nbNodes; i++) {
     if (!Compact) OS << std::setw(10) << i << " : ";
@@ -240,7 +242,7 @@ void Poly::Write(const Handle(Poly_Polygon2D)& P,
 
   if (!Compact) OS << "\nNodes :\n";
 
-  Standard_Integer i, nbNodes = P->NbNodes();
+  Standard_Integer i = 0, nbNodes = P->NbNodes();
   const TColgp_Array1OfPnt2d& Nodes = P->Nodes();
   for (i = 1; i <= nbNodes; i++) {
     if (!Compact) OS << std::setw(10) << i << " : ";
@@ -304,16 +306,16 @@ Handle(Poly_Triangulation) Poly::ReadTriangulation(Standard_IStream& IS)
     return Handle(Poly_Triangulation)();
   }
 
-  Standard_Integer nbNodes, nbTriangles;
-  Standard_Boolean hasUV;
+  Standard_Integer nbNodes = 0, nbTriangles = 0;
+  Standard_Boolean hasUV = 0;
   IS >> nbNodes >> nbTriangles >> hasUV;
 
-  Standard_Real d;
+  Standard_Real d = NAN;
   IS >> d;
 
   // read the 3d nodes
-  Standard_Real x,y,z;
-  Standard_Integer i;
+  Standard_Real x = NAN,y = NAN,z = NAN;
+  Standard_Integer i = 0;
   TColgp_Array1OfPnt Nodes(1, nbNodes);
   TColgp_Array1OfPnt2d UVNodes(1, nbNodes);
 
@@ -333,7 +335,7 @@ Handle(Poly_Triangulation) Poly::ReadTriangulation(Standard_IStream& IS)
 
 
   // read the triangles
-  Standard_Integer n1,n2,n3;
+  Standard_Integer n1 = 0,n2 = 0,n3 = 0;
   Poly_Array1OfTriangle Triangles(1, nbTriangles);
   for (i = 1; i <= nbTriangles; i++) {
     IS >> n1 >> n2 >> n3;
@@ -370,18 +372,18 @@ Handle(Poly_Polygon3D) Poly::ReadPolygon3D(Standard_IStream& IS)
     return Handle(Poly_Polygon3D)();
   }
 
-  Standard_Integer nbNodes;
+  Standard_Integer nbNodes = 0;
   IS >> nbNodes;
 
-  Standard_Boolean hasparameters;
+  Standard_Boolean hasparameters = 0;
   IS >> hasparameters;
 
-  Standard_Real d;
+  Standard_Real d = NAN;
   IS >> d;
 
   // read the nodes
-  Standard_Real x,y,z;
-  Standard_Integer i;
+  Standard_Real x = NAN,y = NAN,z = NAN;
+  Standard_Integer i = 0;
   TColgp_Array1OfPnt Nodes(1, nbNodes);
 
   for (i = 1; i <= nbNodes; i++) {
@@ -425,15 +427,15 @@ Handle(Poly_Polygon2D) Poly::ReadPolygon2D(Standard_IStream& IS)
     return Handle(Poly_Polygon2D)();
   }
 
-  Standard_Integer nbNodes;
+  Standard_Integer nbNodes = 0;
   IS >> nbNodes;
 
-  Standard_Real d;
+  Standard_Real d = NAN;
   IS >> d;
 
   // read the nodes
-  Standard_Real x,y;
-  Standard_Integer i;
+  Standard_Real x = NAN,y = NAN;
+  Standard_Integer i = 0;
   TColgp_Array1OfPnt2d Nodes(1, nbNodes);
 
   for (i = 1; i <= nbNodes; i++) {
index 6de2f892491a6fba6afda488313d585d09550bf6..651ae56e9aa504944d6055245c30fd239bc6ff05 100644 (file)
@@ -276,7 +276,7 @@ Standard_Boolean Poly_CoherentTriangle::RemoveConnection
 Standard_Integer Poly_CoherentTriangle::FindConnection
                                 (const Poly_CoherentTriangle& theTri) const
 {
-  Standard_Integer aResult;
+  Standard_Integer aResult = 0;
   if (mypConnected[0] == &theTri)
     aResult = 0;
   else if (mypConnected[1] == &theTri)
index bb973544d9d40bfb7432a9a8208c904d608eadc6..41d7a514b33465bfeed7e972fbdcb71f6e442567 100644 (file)
@@ -152,10 +152,10 @@ class Poly_CoherentTriangle
   // ---------- PRIVATE FIELDS ----------
 
   Standard_Integer              myNConnections;
-  Standard_Integer              myNodes[3];
-  Standard_Integer              myNodesOnConnected[3];
-  const Poly_CoherentTriangle * mypConnected[3];
-  const Poly_CoherentLink     * mypLink[3];
+  Standard_Integer              myNodes[3]{};
+  Standard_Integer              myNodesOnConnected[3]{};
+  const Poly_CoherentTriangle * mypConnected[3]{};
+  const Poly_CoherentLink     * mypLink[3]{};
 
   friend class Poly_CoherentTriangulation;
 };
index f98af07866e508b522ec8bdaa4552b509f7d481a..dbfa7303bf293305fbdfef0e951e18b730ec1489 100644 (file)
@@ -49,7 +49,7 @@ Poly_CoherentTriangulation::Poly_CoherentTriangulation
 {
   if (theTriangulation.IsNull() == Standard_False) {
     const Standard_Integer nNodes = theTriangulation->NbNodes();
-    Standard_Integer i;
+    Standard_Integer i = 0;
 
     // Copy the nodes
     for (i = 0; i < nNodes; i++) {
@@ -174,7 +174,7 @@ Standard_Boolean Poly_CoherentTriangulation::GetFreeNodes
                         (NCollection_List<Standard_Integer>& lstNodes) const
 {
   lstNodes.Clear();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 0; i < myNodes.Length(); i++) {
     const Poly_CoherentNode& aNode = myNodes(i);
     if (aNode.IsFreeNode())
@@ -687,7 +687,7 @@ Standard_Integer Poly_CoherentTriangulation::ComputeLinks ()
   // Above algorithm does not create all boundary links, so
   // it is necessary to check triangles and add absentee links
   anIter.Init(myTriangles);
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (; anIter.More(); anIter.Next()) {
     Poly_CoherentTriangle& aTriangle = anIter.ChangeValue();
 
index 226b552e5b53abdf1a5e729815a3182b056bcf86..d3e0ae38e830d882a6fceefbb162375279f04331 100644 (file)
@@ -226,7 +226,7 @@ void Poly_Connect::Initialize(const Standard_Integer N)
   myPassedTr.Add (mytr);
   if (mymore)
   {
-    Standard_Integer i, no[3];
+    Standard_Integer i = 0, no[3];
     myTriangulation->Triangle (myfirst).Get (no[0], no[1], no[2]);
     for (i = 0; i < 3; i++)
       if (no[i] == mynode) break;
@@ -241,7 +241,7 @@ void Poly_Connect::Initialize(const Standard_Integer N)
 
 void Poly_Connect::Next()
 {
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   Standard_Integer n[3];
   Standard_Integer t[3];
   Triangles(mytr, t[0], t[1], t[2]);
index 8ba09e83a7631d3d466b7345498f66a2916d8398..4730a63f1f954589b1dee63bb48e362687b8c8b0 100644 (file)
@@ -141,7 +141,7 @@ Standard_Integer Poly_MakeLoops::Perform()
 {
   // prepare the set of start indices
   myStartIndices.Clear();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= myMapLink.Extent(); i++)
   {
     const Link& aLink = myMapLink(i);
@@ -162,7 +162,7 @@ Standard_Integer Poly_MakeLoops::Perform()
   Handle(NCollection_IncAllocator) aTempAlloc1 = new NCollection_IncAllocator(4000);
 
   // two pass loop
-  Standard_Integer aPassNum, nbLoopsOnPass2 = 0;
+  Standard_Integer aPassNum = 0, nbLoopsOnPass2 = 0;
   for (aPassNum=0; aPassNum < 2; aPassNum++)
   {
     myHangIndices.Clear();
@@ -199,7 +199,7 @@ Standard_Integer Poly_MakeLoops::Perform()
       if (aStartNumber > 1)
       {
         // it is required to mark hanging edges
-        Standard_Integer aNode;
+        Standard_Integer aNode = 0;
         if (aStartNumber <= aContour.Extent())
           // mark hanging edges starting from the first one till a bifurcation
           aNode = getFirstNode(aIndexS);
@@ -347,7 +347,7 @@ void Poly_MakeLoops::acceptContour
 
   // build a loop, mark links as taken,
   // remove them from the set of start indices
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = theStartNumber; i <= theContour.Extent(); i++)
   {
     Standard_Integer aIndexS = theContour(i);   // index with sign
index 9d7af7bbeacecda82137ecf5ac21cef34808f8d8..65937c6490fda0f1fce52bf14aa0429752616d7d 100644 (file)
@@ -37,7 +37,7 @@ Poly_Polygon2D::Poly_Polygon2D(const TColgp_Array1OfPnt2d& Nodes):
     myDeflection(0.),
     myNodes(1, Nodes.Length())
 {
-  Standard_Integer i, j= 1;
+  Standard_Integer i = 0, j= 1;
   for (i = Nodes.Lower(); i <= Nodes.Upper(); i++)
     myNodes(j++) = Nodes(i);
 }
index c7a2c99f4ed0ef9edaf1c16a59b7368047246054..29e129d899609948c266813fd7caa04216ef0931 100644 (file)
@@ -41,7 +41,7 @@ Poly_Polygon3D::Poly_Polygon3D(const TColgp_Array1OfPnt& Nodes):
     myDeflection(0.),
     myNodes(1, Nodes.Length())
 {
-  Standard_Integer i, j= 1;
+  Standard_Integer i = 0, j= 1;
   for (i = Nodes.Lower(); i <= Nodes.Upper(); i++)
     myNodes(j++) = Nodes(i);
 }
@@ -54,11 +54,11 @@ Poly_Polygon3D::Poly_Polygon3D(const TColgp_Array1OfPnt& Nodes):
 Poly_Polygon3D::Poly_Polygon3D(const TColgp_Array1OfPnt&   Nodes,
                               const TColStd_Array1OfReal& P): 
     myDeflection(0.),
-    myNodes(1, Nodes.Length())
+    myNodes(1, Nodes.Length()), myParameters(new TColStd_HArray1OfReal(1, P.Length()))
     
 {
-  myParameters = new TColStd_HArray1OfReal(1, P.Length());
-  Standard_Integer i, j= 1;
+  
+  Standard_Integer i = 0, j= 1;
   for (i = Nodes.Lower(); i <= Nodes.Upper(); i++) {
     myNodes(j) = Nodes(i);
     myParameters->SetValue(j, P(i));
index 19a0052372c1beb00ff07a1b2d7a9c52b8298314..ea8185b8c92017094651823b47a7367ccf73173a 100644 (file)
@@ -41,9 +41,9 @@ Poly_PolygonOnTriangulation::Poly_PolygonOnTriangulation (const Standard_Integer
 Poly_PolygonOnTriangulation::Poly_PolygonOnTriangulation
 (const TColStd_Array1OfInteger&    Nodes) :
     myDeflection(0.0),
-    myNodes(1, Nodes.Length())
+    myNodes(Nodes)
 {
-  myNodes = Nodes;
+  
 }
 
 //=======================================================================
@@ -55,10 +55,8 @@ Poly_PolygonOnTriangulation::Poly_PolygonOnTriangulation
    (const TColStd_Array1OfInteger&    Nodes, 
     const TColStd_Array1OfReal&       Parameters):
     myDeflection(0.0),
-    myNodes(1, Nodes.Length())
+    myNodes(Nodes), myParameters(new TColStd_HArray1OfReal())
 {
-  myNodes = Nodes;
-  myParameters = new TColStd_HArray1OfReal(1, Parameters.Length());
   myParameters->ChangeArray1() = Parameters;
 }
 
index 62e3aef70b10ec7ddae1c6a3c51b07481fd27bc6..256b6004530f5a5ce4a982d7de58b7ae0327078a 100644 (file)
@@ -69,12 +69,12 @@ Poly_Triangulation::Poly_Triangulation (const TColgp_Array1OfPnt&    theNodes,
 : myCachedMinMax (NULL),
   myDeflection   (0),
   myNodes        (theNodes.Length()),
-  myTriangles    (1, theTriangles.Length()),
+  myTriangles    (theTriangles),
   myPurpose      (Poly_MeshPurpose_NONE)
 {
   const Poly_ArrayOfNodes aNodeWrapper (theNodes.First(), theNodes.Length());
   myNodes = aNodeWrapper;
-  myTriangles = theTriangles;
+  
 }
 
 //=======================================================================
@@ -88,13 +88,13 @@ Poly_Triangulation::Poly_Triangulation (const TColgp_Array1OfPnt&    theNodes,
 : myCachedMinMax (NULL),
   myDeflection   (0),
   myNodes        (theNodes.Length()),
-  myTriangles    (1, theTriangles.Length()),
+  myTriangles(theTriangles),
   myUVNodes      (theNodes.Length()),
   myPurpose      (Poly_MeshPurpose_NONE)
 {
   const Poly_ArrayOfNodes aNodeWrapper (theNodes.First(), theNodes.Length());
   myNodes = aNodeWrapper;
-  myTriangles = theTriangles;
+  
   const Poly_ArrayOfUVNodes aUVNodeWrapper (theUVNodes.First(), theUVNodes.Length());
   myUVNodes = aUVNodeWrapper;
 }
index 995ad1333ad1b0639aba22979ba978c174a1df46..75b719556010d4309313960243df17831aaec8f4 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <ProjLib.hxx>
 
 #include <Adaptor3d_Surface.hxx>
@@ -51,7 +53,7 @@
 //=======================================================================
 gp_Pnt2d  ProjLib::Project(const gp_Pln& Pl, const gp_Pnt& P)
 {
-  Standard_Real U, V;
+  Standard_Real U = NAN, V = NAN;
   ElSLib::Parameters(Pl, P, U, V);
   return gp_Pnt2d(U,V);
 }
@@ -124,7 +126,7 @@ gp_Hypr2d  ProjLib::Project(const gp_Pln& Pl, const gp_Hypr& H)
 
 gp_Pnt2d  ProjLib::Project(const gp_Cylinder& Cy, const gp_Pnt& P)
 {
-  Standard_Real U, V;
+  Standard_Real U = NAN, V = NAN;
   ElSLib::Parameters(Cy, P, U, V);
   return gp_Pnt2d(U,V);
 }
@@ -161,7 +163,7 @@ gp_Lin2d  ProjLib::Project(const gp_Cylinder& Cy, const gp_Circ& Ci)
 
 gp_Pnt2d  ProjLib::Project(const gp_Cone& Co, const gp_Pnt& P)
 {
-  Standard_Real U, V;
+  Standard_Real U = NAN, V = NAN;
   ElSLib::Parameters(Co, P, U, V);
   return gp_Pnt2d(U,V);
 }
@@ -198,7 +200,7 @@ gp_Lin2d  ProjLib::Project(const gp_Cone& Co, const gp_Circ& Ci)
 
 gp_Pnt2d  ProjLib::Project(const gp_Sphere& Sp, const gp_Pnt& P)
 {
-  Standard_Real U, V;
+  Standard_Real U = NAN, V = NAN;
   ElSLib::Parameters(Sp, P, U, V);
   return gp_Pnt2d(U,V);
 }
@@ -223,7 +225,7 @@ gp_Lin2d  ProjLib::Project(const gp_Sphere& Sp, const gp_Circ& Ci)
 
 gp_Pnt2d  ProjLib::Project(const gp_Torus& To, const gp_Pnt& P)
 {
-  Standard_Real U, V;
+  Standard_Real U = NAN, V = NAN;
   ElSLib::Parameters(To, P, U, V);
   return gp_Pnt2d(U,V);
 }
index af709f85e304d735d04fec8a64891262d4ceac0e..a7d9d68631fd7b701861b5531a98b1038a6461e1 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <algorithm>
 
 #include <Approx_CurveOnSurface.hxx>
@@ -224,7 +226,7 @@ static void d2(const Standard_Real t,
   // Computation of (d2E/dX2)*(dX/dt)2 = S3
 
   // Row11 = (d2E1/du2, d2E1/dudv)
-  Standard_Real tmp;
+  Standard_Real tmp = NAN;
   gp_Vec2d Row11(3*DS1_u*DS2_u + Ort*DS3_u,
     tmp = 2*DS1_u*DS2_uv + 
     DS1_v*DS2_u + Ort*DS3_uuv);  
@@ -338,7 +340,7 @@ static void d2CurvOnSurf(const Standard_Real t,
   // Computation of (d2E/dX2)*(dX/dt)2 = S3
 
   // Row11 = (d2E1/du2, d2E1/dudv)
-  Standard_Real tmp;
+  Standard_Real tmp = NAN;
   gp_Vec2d Row11(3*DS1_u*DS2_u + Ort*DS3_u,
     tmp = 2*DS1_u*DS2_uv + 
     DS1_v*DS2_u + Ort*DS3_uuv);  
@@ -382,7 +384,7 @@ static Standard_Boolean ExactBound(gp_Pnt& Sol,
   const Handle(Adaptor3d_Curve)& Curve, 
   const Handle(Adaptor3d_Surface)& Surface)
 {
-  Standard_Real U0, V0, t, t1, t2, FirstU, LastU, FirstV, LastV;
+  Standard_Real U0 = NAN, V0 = NAN, t = NAN, t1 = NAN, t2 = NAN, FirstU = NAN, LastU = NAN, FirstV = NAN, LastV = NAN;
   gp_Pnt2d POnS;
   U0 = Sol.Y();
   V0 = Sol.Z();
@@ -394,7 +396,7 @@ static Standard_Boolean ExactBound(gp_Pnt& Sol,
   gp_Vec2d D2d;
   //these variables are to estimate which boundary has more apportunity 
   //to be intersected
-  Standard_Real RU1, RU2, RV1, RV2
+  Standard_Real RU1 = NAN, RU2 = NAN, RV1 = NAN, RV2 = NAN
   d1(Sol.X(), U0, V0, D2d, Curve, Surface);
   // Here we assume that D2d != (0, 0)
   if(Abs(D2d.X()) < gp::Resolution()) 
@@ -427,7 +429,7 @@ static Standard_Boolean ExactBound(gp_Pnt& Sol,
   Seq.Append(gp_Pnt(LastU, RU2, 2));
   Seq.Append(gp_Pnt(FirstV, RV1, 3));
   Seq.Append(gp_Pnt(LastV, RV2, 3));
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   for(i = 1; i <= 3; i++)
   {
     for(j = 1; j <= 4-i; j++)
@@ -497,7 +499,7 @@ static void DichExactBound(gp_Pnt& Sol,
   InitChron(chr_dicho_bound);
 #endif
 
-  Standard_Real U0, V0, t;
+  Standard_Real U0 = NAN, V0 = NAN, t = NAN;
   gp_Pnt2d POnS;
   U0 = Sol.Y();
   V0 = Sol.Z();
@@ -544,7 +546,7 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point,
 {
 
   ProjLib_PrjResolve aPrjPS (*C, *S, 1);
-  Standard_Real ParU,ParV;
+  Standard_Real ParU = NAN,ParV = NAN;
   Extrema_ExtPS aExtPS;
   aExtPS.Initialize (*S, S->FirstUParameter(), 
     S->LastUParameter(), S->FirstVParameter(), 
@@ -559,7 +561,7 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point,
   }
   if (aExtPS.IsDone() && aExtPS.NbExt()) 
   {
-    Standard_Integer i, Nend;
+    Standard_Integer i = 0, Nend = 0;
     // Search for the nearest solution which is also a normal projection
     Nend = aExtPS.NbExt();
     for(i = 1; i <= Nend; i++)
@@ -675,10 +677,10 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve
   myMaxSeg    (16),
   myProj2d    (Standard_True),
   myProj3d    (Standard_False),
-  myMaxDist   (theMaxDist)
+  myMaxDist   (theMaxDist), myTolU(Max(Precision::PConfusion(), mySurface->UResolution(theTol3d))), myTolV(Max(Precision::PConfusion(), mySurface->VResolution(theTol3d)))
 {
-  myTolU = Max(Precision::PConfusion(), mySurface->UResolution(theTol3d));
-  myTolV = Max(Precision::PConfusion(), mySurface->VResolution(theTol3d));
+  
+  
 
   Init();
 }
@@ -724,8 +726,8 @@ void ProjLib_CompProjectedCurve::Init()
   NCollection_Vector<Standard_Real> aSplits;
   aSplits.Clear();
 
-  Standard_Real Tol;// Tolerance for ExactBound
-  Standard_Integer i, Nend = 0, aSplitIdx = 0;
+  Standard_Real Tol = NAN;// Tolerance for ExactBound
+  Standard_Integer i = 0, Nend = 0, aSplitIdx = 0;
   Standard_Boolean FromLastU = Standard_False,
                    isSplitsComputed = Standard_False;
 
@@ -739,7 +741,7 @@ void ProjLib_CompProjectedCurve::Init()
 
        mySurface->GetType() != GeomAbs_SurfaceOfExtrusion)
     {
-      Standard_Real min_val2;
+      Standard_Real min_val2 = NAN;
       min_val2 = CExt.SquareDistance(1);
 
       Nend = CExt.NbExt();
@@ -753,7 +755,7 @@ void ProjLib_CompProjectedCurve::Init()
     }
   }
 
-  Standard_Real FirstU, LastU, Step, SearchStep, WalkStep, t;
+  Standard_Real FirstU = NAN, LastU = NAN, Step = NAN, SearchStep = NAN, WalkStep = NAN, t = NAN;
 
   FirstU = myCurve->FirstParameter();
   LastU  = myCurve->LastParameter();
@@ -771,7 +773,7 @@ void ProjLib_CompProjectedCurve::Init()
   ProjLib_PrjResolve aPrjPS (*myCurve, *mySurface, 1);
 
   t = FirstU;
-  Standard_Boolean new_part; 
+  Standard_Boolean new_part = 0
   Standard_Real prevDeb=0.;
   Standard_Boolean SameDeb=Standard_False;
 
@@ -792,7 +794,7 @@ void ProjLib_CompProjectedCurve::Init()
       Standard_Boolean initpoint=Standard_False;
       Standard_Real U = 0., V = 0.;
       gp_Pnt CPoint;
-      Standard_Real ParT,ParU,ParV
+      Standard_Real ParT = NAN,ParU = NAN,ParV = NAN
 
       // Search an initial point in the list of Extrema Curve-Surface
       if(Nend != 0 && !CExt.IsParallel()) 
@@ -875,7 +877,7 @@ void ProjLib_CompProjectedCurve::Init()
           // Here we are going to stop if the distance between projection and 
           // corresponding curve point is greater than myMaxDist
           gp_Pnt POnS;
-          Standard_Real d;
+          Standard_Real d = NAN;
           mySurface->D0(U, V, POnS);
           d = CPoint.Distance(POnS);
           if (d > myMaxDist) 
@@ -930,7 +932,7 @@ void ProjLib_CompProjectedCurve::Init()
 
     //Computation of WalkStep
     gp_Vec D1, D2;
-    Standard_Real MagnD1, MagnD2;
+    Standard_Real MagnD1 = NAN, MagnD2 = NAN;
     d2CurvOnSurf(Triple.X(), Triple.Y(), Triple.Z(), D1, D2, myCurve, mySurface);
     MagnD1 = D1.Magnitude();
     MagnD2 = D2.Magnitude();
@@ -942,7 +944,7 @@ void ProjLib_CompProjectedCurve::Init()
     t = Triple.X() + Step;
     if (t > LastU) t = LastU;
     Standard_Real prevStep = Step;
-    Standard_Real U0, V0;
+    Standard_Real U0 = NAN, V0 = NAN;
 
     //Here we are trying to prolong continuous part
     while (t <= LastU && new_part) 
@@ -1087,7 +1089,7 @@ void ProjLib_CompProjectedCurve::Init()
   }
 
   // Sequence post-proceeding.
-  Standard_Integer j;
+  Standard_Integer j = 0;
 
   // 1. Removing poor parts
   Standard_Integer NbPart=myNbCurves;
@@ -1122,7 +1124,7 @@ void ProjLib_CompProjectedCurve::Init()
     for(j = 1; j <= mySequence->Value(i)->Length(); j++)
     {
       gp_Pnt POnC, POnS, aTriple;
-      Standard_Real Distance;
+      Standard_Real Distance = NAN;
       aTriple = mySequence->Value(i)->Value(j);
       myCurve->D0(aTriple.X(), POnC);
       mySurface->D0(aTriple.Y(), aTriple.Z(), POnS);
@@ -1137,7 +1139,7 @@ void ProjLib_CompProjectedCurve::Init()
   // 4. Check the projection to be a single point
 
   gp_Pnt2d Pmoy, Pcurr, P;
-  Standard_Real AveU, AveV;
+  Standard_Real AveU = NAN, AveV = NAN;
   mySnglPnts = new TColStd_HArray1OfBoolean(1, myNbCurves);
   mySnglPnts->Init (Standard_True);
 
@@ -1228,7 +1230,7 @@ void ProjLib_CompProjectedCurve::Perform()
 
   Standard_Boolean approx2d = myProj2d;
   Standard_Boolean approx3d = myProj3d;
-  Standard_Real Udeb, Ufin, UIso, VIso;
+  Standard_Real Udeb = NAN, Ufin = NAN, UIso = NAN, VIso = NAN;
   gp_Pnt2d P2d, Pdeb, Pfin;
   gp_Pnt P;
   Handle(Adaptor2d_Curve2d) HPCur;
@@ -1320,7 +1322,7 @@ void ProjLib_CompProjectedCurve::Perform()
       {
         if (!mySurface->IsUPeriodic())
         {
-          Standard_Real U1, U2;
+          Standard_Real U1 = NAN, U2 = NAN;
           Standard_Real dU = 10. * myTolU;
 
           U1 = mySurface->FirstUParameter();
@@ -1333,7 +1335,7 @@ void ProjLib_CompProjectedCurve::Perform()
 
         if (!mySurface->IsVPeriodic())
         {
-          Standard_Real V1, V2;
+          Standard_Real V1 = NAN, V2 = NAN;
           Standard_Real dV = 10. * myTolV;
 
           V1 = mySurface->FirstVParameter();
@@ -1351,7 +1353,7 @@ void ProjLib_CompProjectedCurve::Perform()
 
       if (approx2d || approx3d)
       {
-        Standard_Boolean only2d, only3d;
+        Standard_Boolean only2d = 0, only3d = 0;
         if (approx2d && approx3d)
         {
           only2d = !approx2d;
@@ -1576,8 +1578,8 @@ gp_Pnt2d ProjLib_CompProjectedCurve::Value(const Standard_Real t) const
 
 void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const
 {
-  Standard_Integer i, j;
-  Standard_Real Udeb, Ufin;
+  Standard_Integer i = 0, j = 0;
+  Standard_Real Udeb = NAN, Ufin = NAN;
   Standard_Boolean found = Standard_False;
 
   for(i = 1; i <= myNbCurves; i++) 
@@ -1594,7 +1596,7 @@ void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const
     throw Standard_DomainError("ProjLib_CompProjectedCurve::D0");
   }
 
-  Standard_Real U0, V0;
+  Standard_Real U0 = NAN, V0 = NAN;
 
   Standard_Integer End = mySequence->Value(i)->Length();
   for(j = 1; j < End; j++)
@@ -1623,7 +1625,7 @@ void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const
       j = mySequence->Value(i)->Length() - 2;
 
     gp_Vec2d I1, I2, I3, I21, I22, I31, Y1, Y2, Y3, Y4, Res;
-    Standard_Real X1, X2, X3, X4;
+    Standard_Real X1 = NAN, X2 = NAN, X3 = NAN, X4 = NAN;
 
     X1 = mySequence->Value(i)->Value(j - 1).X();
     X2 = mySequence->Value(i)->Value(j).X();
@@ -1673,14 +1675,14 @@ void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const
     Extrema_ExtPS aExtPS(thePoint, *mySurface, myTolU, myTolV);
     if (aExtPS.IsDone() && aExtPS.NbExt()) 
     {
-      Standard_Integer k, Nend, imin = 1;
+      Standard_Integer k = 0, Nend = 0, imin = 1;
       // Search for the nearest solution which is also a normal projection
       Nend = aExtPS.NbExt();
       for(k = 2; k <= Nend; k++)
         if (aExtPS.SquareDistance(k) < aExtPS.SquareDistance(imin))
           imin = k;
       const Extrema_POnSurf& POnS = aExtPS.Point(imin);
-      Standard_Real ParU,ParV;
+      Standard_Real ParU = NAN,ParV = NAN;
       POnS.Parameter(ParU, ParV);
       P.SetCoord(ParU, ParV);
     }
@@ -1697,7 +1699,7 @@ void ProjLib_CompProjectedCurve::D1(const Standard_Real t,
   gp_Pnt2d& P,
   gp_Vec2d& V) const
 {
-  Standard_Real u, v;
+  Standard_Real u = NAN, v = NAN;
   D0(t, P);
   u = P.X();
   v = P.Y();
@@ -1713,7 +1715,7 @@ void ProjLib_CompProjectedCurve::D2(const Standard_Real t,
   gp_Vec2d& V1,
   gp_Vec2d& V2) const
 {
-  Standard_Real u, v;
+  Standard_Real u = NAN, v = NAN;
   D0(t, P);
   u = P.X();
   v = P.Y();
@@ -1853,7 +1855,7 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
   default: 
     throw Standard_OutOfRange();
   }
-  Standard_Integer i, j, k;
+  Standard_Integer i = 0, j = 0, k = 0;
   Standard_Integer NbIntCur = myCurve->NbIntervals(S);
   Standard_Integer NbIntSurU = mySurface->NbUIntervals(SforS);
   Standard_Integer NbIntSurV = mySurface->NbVIntervals(SforS);
@@ -1866,7 +1868,7 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
   mySurface->UIntervals(CutPntsU, SforS);
   mySurface->VIntervals(CutPntsV, SforS);
 
-  Standard_Real Tl, Tr, Ul, Ur, Vl, Vr, Tol;
+  Standard_Real Tl = NAN, Tr = NAN, Ul = NAN, Ur = NAN, Vl = NAN, Vr = NAN, Tol = NAN;
 
   Handle(TColStd_HArray1OfReal) BArr = NULL, 
     CArr = NULL, 
@@ -1908,7 +1910,7 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
         else if((Ul < CutPntsU(k) && CutPntsU(k) < Ur) ||
           (Ur < CutPntsU(k) && CutPntsU(k) < Ul)) 
         {
-          Standard_Real V;
+          Standard_Real V = NAN;
           V = (mySequence->Value(i)->Value(j).Z() 
             + mySequence->Value(i)->Value(j +1).Z())/2;
           ProjLib_PrjResolve Solver (*myCurve, *mySurface, 2);
@@ -1974,7 +1976,7 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
         else if((Vl < CutPntsV(k) && CutPntsV(k) < Vr) ||
           (Vr < CutPntsV(k) && CutPntsV(k) < Vl)) 
         {
-          Standard_Real U;
+          Standard_Real U = NAN;
           U = (mySequence->Value(i)->Value(j).Y() 
             + mySequence->Value(i)->Value(j +1).Y())/2;
           ProjLib_PrjResolve Solver (*myCurve, *mySurface, 3);
@@ -2217,7 +2219,7 @@ void ProjLib_CompProjectedCurve::UpdateTripleByTrapCriteria(gp_Pnt &thePoint) co
   if (!isProblemsPossible)
     return;
 
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
   Standard_Boolean isDone = 
     InitialPoint(myCurve->Value(thePoint.X()), thePoint.X(), myCurve, mySurface, 
                  Precision::PConfusion(), Precision::PConfusion(), U, V, myMaxDist);
@@ -2357,7 +2359,7 @@ void FindSplitPoint(SplitDS &theSplitDS,
 
       // Check that is point will be projected to the periodic border.
       const Extrema_POnSurf &aPOnS = theSplitDS.myExtPS->Point(aMinIdx);
-      Standard_Real U, V, aProjParam;
+      Standard_Real U = NAN, V = NAN, aProjParam = NAN;
       aPOnS.Parameter(U, V);
       aProjParam = theSplitDS.myPeriodicDir ? V : U;
 
index 6b93a8d5f0b77c0aa40a17eebd2c51fbf5eda0c1..39c4a67534eef2cbacf7bd7d693d5f1b22e4a1a5 100644 (file)
@@ -246,12 +246,12 @@ private:
   Handle(TColStd_HArray1OfBoolean) mySnglPnts;
   Handle(TColStd_HArray1OfReal) myMaxDistance;
   Handle(TColStd_HArray1OfReal) myTabInt;
-  Standard_Real    myTol3d;
+  Standard_Real    myTol3d{};
   GeomAbs_Shape    myContinuity;
-  Standard_Integer myMaxDegree;
-  Standard_Integer myMaxSeg;
-  Standard_Boolean myProj2d;
-  Standard_Boolean myProj3d;
+  Standard_Integer myMaxDegree{};
+  Standard_Integer myMaxSeg{};
+  Standard_Boolean myProj2d{};
+  Standard_Boolean myProj3d{};
   Standard_Real myMaxDist;
   Standard_Real myTolU;
   Standard_Real myTolV;
index 74cf49ea38320d59c647cb3f5d3611f9b3c5124a..e59e8ff398c7c6758874f68ce115213c7fe34876 100644 (file)
@@ -16,6 +16,8 @@
 
 // modified by NIZHNY-OFV  Thu Jan 20 11:04:19 2005
 
+#include <math.h>
+
 #include <ProjLib_ComputeApprox.hxx>
 #include <ProjLib.hxx>
 
@@ -157,7 +159,7 @@ static Standard_Boolean Function_D1( const Standard_Real U,
                                    const Standard_Boolean VCouture )
 {
   gp_Pnt P3d;
-  Standard_Real dU, dV;
+  Standard_Real dU = NAN, dV = NAN;
   
   P = Function_Value(U,myCurve,mySurface,U1,U2,V1,V2,UCouture,VCouture);
 
@@ -204,7 +206,7 @@ static Standard_Real Function_ComputeStep(
   const Standard_Real R)
 {
   Standard_Real Step0 = .1;
-  Standard_Real W1, W2;
+  Standard_Real W1 = NAN, W2 = NAN;
   W1 = myCurve->FirstParameter();
   W2 = myCurve->LastParameter();
   Standard_Real L = GCPnts_AbscissaPoint::Length (*myCurve);
@@ -235,7 +237,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
                                 const Handle(Adaptor3d_Curve)&   myCurve,
                                 const Handle(Adaptor3d_Surface)& mySurface) 
 {
-  Standard_Real W1, W2, W;
+  Standard_Real W1 = NAN, W2 = NAN, W = NAN;
   gp_Pnt P1, P2, P;
   //
   W1 = myCurve->FirstParameter();
@@ -278,7 +280,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       case GeomAbs_Parabola:
       case GeomAbs_Hyperbola:
       case GeomAbs_Ellipse:{
-        Standard_Real U1, U2, V1, V2, U , V;
+        Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN, U = NAN , V = NAN;
         ElSLib::Parameters( Cone, P1, U1, V1);
         ElSLib::Parameters( Cone, P2, U2, V2);
         ElSLib::Parameters( Cone, P , U , V );
@@ -295,13 +297,13 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       }
       break;
       default:   { 
-        Standard_Real U1, V1, U , V, Delta = 0., d = 0., pmin = W1, pmax = W1, dmax = 0., Uf, Ul;
+        Standard_Real U1 = NAN, V1 = NAN, U = NAN , V = NAN, Delta = 0., d = 0., pmin = W1, pmax = W1, dmax = 0., Uf = NAN, Ul = NAN;
         ElSLib::Parameters( Cone, P1, U1, V1);
         ElSLib::Parameters( Cone, P2, Ul, V1);
         const gp_Ax1& anAx1 = Cone.Axis();
         gp_Lin aLin(anAx1);
         Standard_Real R = (aLin.Distance(P1) + aLin.Distance(P2) + aLin.Distance(P)) / 3.;
-        Standard_Real Step;
+        Standard_Real Step = NAN;
         myU1 = U1; myU2 = U1; Uf = U1;
         if (myCurve->GetType() == GeomAbs_Line)
         {
@@ -387,7 +389,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
 
     if (myCurve->GetType() == GeomAbs_Ellipse) {
 
-      Standard_Real U1, U2, V1, V2, U , V;
+      Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN, U = NAN , V = NAN;
       ElSLib::Parameters( Cylinder, P1, U1, V1);
       ElSLib::Parameters( Cylinder, P2, U2, V2);
       ElSLib::Parameters( Cylinder, P , U , V );
@@ -432,10 +434,10 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       }
     }
     else {
-      Standard_Real U1, V1, U , V;
+      Standard_Real U1 = NAN, V1 = NAN, U = NAN , V = NAN;
       ElSLib::Parameters( Cylinder, P1, U1, V1);
       Standard_Real R = Cylinder.Radius();
-      Standard_Real Delta = 0., Step;
+      Standard_Real Delta = 0., Step = NAN;
       Standard_Real eps = M_PI, dmax = 0., d = 0.;
       Step = Function_ComputeStep(myCurve, R);
       myU1 = U1; myU2 = U1;
@@ -503,8 +505,8 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       // REM : (1) (2)     : equation du cercle
       //       (1) (3) (4) : equation de la couture.
       Standard_Integer NbSolutions = 0;
-      Standard_Real A, B, C, D, R, Tol = 1.e-10;
-      Standard_Real U1, U2, V1, V2;
+      Standard_Real A = NAN, B = NAN, C = NAN, D = NAN, R = NAN, Tol = 1.e-10;
+      Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
       gp_Trsf Trsf;
       //
       gp_Circ Circle = myCurve->Circle();
@@ -531,7 +533,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
           if ( A*D > 0.) NbSolutions = 1;
         }
         else if ( delta > 0) {
-          Standard_Real xx;
+          Standard_Real xx = NAN;
           delta = Sqrt(delta);
           xx = -A*D+delta;
           //     
@@ -552,7 +554,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       {
         //May be U1 must be equal 2*PI?
         gp_Pnt Pd  = myCurve->Value(W1+dt);
-        Standard_Real ud, vd;
+        Standard_Real ud = NAN, vd = NAN;
         ElSLib::Parameters(SP, Pd, ud, vd);
         if(Abs(U1 - ud) > M_PI)
         {
@@ -563,7 +565,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       {
         //maybe U1 = 0.?
         gp_Pnt Pd  = myCurve->Value(W1+dt);
-        Standard_Real ud, vd;
+        Standard_Real ud = NAN, vd = NAN;
         ElSLib::Parameters(SP, Pd, ud, vd);
         if(Abs(U1 - ud) > M_PI)
         {
@@ -576,7 +578,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       {
         //May be U2 must be equal 2*PI?
         gp_Pnt Pd  = myCurve->Value(W2-dt);
-        Standard_Real ud, vd;
+        Standard_Real ud = NAN, vd = NAN;
         ElSLib::Parameters(SP, Pd, ud, vd);
         if(Abs(U2 - ud) > M_PI)
         {
@@ -587,7 +589,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       {
         //maybe U2 = 0.?
         gp_Pnt Pd  = myCurve->Value(W2-dt);
-        Standard_Real ud, vd;
+        Standard_Real ud = NAN, vd = NAN;
         ElSLib::Parameters(SP, Pd, ud, vd);
         if(Abs(U2 - ud) > M_PI)
         {
@@ -629,7 +631,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       }
       else { // 0 ou 2 solutions
         gp_Pnt Center = Circle.Location();
-        Standard_Real U,V;
+        Standard_Real U = NAN,V = NAN;
         ElSLib::SphereParameters(gp_Ax3(gp::XOY()),1,Center, U, V);
         myU1 = U-M_PI;
         myU2 = U+M_PI;
@@ -657,7 +659,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
 
         if ( Abs( Abs(pp.Z()) - R) < Tol) {
           gp_Pnt Center = Circle.Location();
-          Standard_Real U,V;
+          Standard_Real U = NAN,V = NAN;
           ElSLib::SphereParameters(gp_Ax3(gp::XOY()),1,Center, U, V);
           myU1 = U-M_PI;
           myU2 = U+M_PI;
@@ -684,10 +686,10 @@ static void Function_SetUVBounds(Standard_Real& myU1,
     }//if ( myCurve->GetType() == GeomAbs_Circle)
 
     else {
-      Standard_Real U1, V1, U , V;
+      Standard_Real U1 = NAN, V1 = NAN, U = NAN , V = NAN;
       ElSLib::Parameters( SP, P1, U1, V1);
       Standard_Real R = SP.Radius();
-      Standard_Real Delta = 0., Step;
+      Standard_Real Delta = 0., Step = NAN;
       Standard_Real eps = M_PI, dmax = 0., d = 0.;
       Step = Function_ComputeStep(myCurve, R);
       myU1 = U1; myU2 = U1;
@@ -740,10 +742,10 @@ static void Function_SetUVBounds(Standard_Real& myU1,
   //     
   case GeomAbs_Torus:{
     gp_Torus TR = mySurface->Torus();
-    Standard_Real U1, V1, U , V, dU, dV;
+    Standard_Real U1 = NAN, V1 = NAN, U = NAN , V = NAN, dU = NAN, dV = NAN;
     ElSLib::Parameters( TR, P1, U1, V1);
     Standard_Real R = TR.MinorRadius();
-    Standard_Real DeltaU = 0., DeltaV = 0., Step;
+    Standard_Real DeltaU = 0., DeltaV = 0., Step = NAN;
     Standard_Real eps = M_PI, dmaxU = 0., dmaxV = 0.;
     Step = Function_ComputeStep(myCurve, R);
     myU1 = U1; myU2 = U1;
@@ -844,8 +846,8 @@ class ProjLib_Function : public AppCont_Function
 {
   Handle(Adaptor3d_Curve)   myCurve;
   Handle(Adaptor3d_Surface) mySurface;
-  Standard_Boolean myIsPeriodic[2];
-  Standard_Real myPeriod[2];
+  Standard_Boolean myIsPeriodic[2]{};
+  Standard_Real myPeriod[2]{};
   public :
 
   Standard_Real    myU1,myU2,myV1,myV2;
@@ -881,25 +883,25 @@ class ProjLib_Function : public AppCont_Function
 
   void PeriodInformation(const Standard_Integer theDimIdx,
                          Standard_Boolean& IsPeriodic,
-                         Standard_Real& thePeriod) const
+                         Standard_Real& thePeriod) const override
   {
     IsPeriodic = myIsPeriodic[theDimIdx - 1];
     thePeriod = myPeriod[theDimIdx - 1];
   }
 
-  Standard_Real FirstParameter() const
+  Standard_Real FirstParameter() const override
   {
     return (myCurve->FirstParameter());
   }
 
-  Standard_Real LastParameter() const
+  Standard_Real LastParameter() const override
   {
     return (myCurve->LastParameter());
   }
 
   Standard_Boolean Value(const Standard_Real   theT,
                          NCollection_Array1<gp_Pnt2d>& thePnt2d,
-                         NCollection_Array1<gp_Pnt>&   /*thePnt*/) const
+                         NCollection_Array1<gp_Pnt>&   /*thePnt*/) const override
   {
     thePnt2d(1) = Function_Value(theT, myCurve, mySurface, myU1, myU2, myV1, myV2, UCouture, VCouture);
     return Standard_True;
@@ -912,7 +914,7 @@ class ProjLib_Function : public AppCont_Function
 
   Standard_Boolean D1(const Standard_Real   theT,
                       NCollection_Array1<gp_Vec2d>& theVec2d,
-                      NCollection_Array1<gp_Vec>&   /*theVec*/) const
+                      NCollection_Array1<gp_Vec>&   /*theVec*/) const override
   {
     gp_Pnt2d aPnt2d;
     gp_Vec2d aVec2d;
@@ -997,7 +999,7 @@ void ProjLib_ComputeApprox::Perform
   // if the surface is a plane and the curve a BSpline or a BezierCurve,
   // don`t make an Approx but only the projection of the poles.
 
-  Standard_Integer NbKnots, NbPoles ;
+  Standard_Integer NbKnots = 0, NbPoles = 0 ;
   GeomAbs_CurveType   CType = C->GetType();
   GeomAbs_SurfaceType SType = S->GetType();
 
@@ -1031,7 +1033,7 @@ void ProjLib_ComputeApprox::Perform
     if ( BS->IsRational()) BS->Weights(Weights);
     BS->Poles( P3d);
     gp_Pln Plane = S->Plane();
-    Standard_Real U,V;
+    Standard_Real U = NAN,V = NAN;
     for ( Standard_Integer i = 1; i <= NbPoles; i++) {
       ElSLib::Parameters( Plane, P3d(i), U, V);
       Poles.SetValue(i,gp_Pnt2d(U,V));
@@ -1075,7 +1077,7 @@ void ProjLib_ComputeApprox::Perform
     // project the 3D-Poles on the plane
     
     gp_Pln Plane = S->Plane();
-    Standard_Real U,V;
+    Standard_Real U = NAN,V = NAN;
     for ( Standard_Integer i = 1; i <= NbPoles; i++) {
       ElSLib::Parameters( Plane, P3d(i), U, V);
       Poles.SetValue(i,gp_Pnt2d(U,V));
@@ -1118,7 +1120,7 @@ void ProjLib_ComputeApprox::Perform
 #endif    
 
 //-----------
-    Standard_Integer Deg1 = 5, Deg2;
+    Standard_Integer Deg1 = 5, Deg2 = 0;
     if (simplecase) {
       Deg2 = 8;
     }
@@ -1162,13 +1164,13 @@ void ProjLib_ComputeApprox::Perform
 
     Standard_Real aNewTol2d = 0;
     if(Fit.IsAllApproximated()) {
-      Standard_Integer i;
+      Standard_Integer i = 0;
       Standard_Integer NbCurves = Fit.NbMultiCurves();
     
     // on essaie de rendre la courbe au moins C1
       Convert_CompBezierCurves2dToBSplineCurve2d Conv;
 
-      Standard_Real Tol3d,Tol2d;
+      Standard_Real Tol3d = NAN,Tol2d = NAN;
       for (i = 1; i <= NbCurves; i++) {
              Fit.Error(i,Tol3d, Tol2d);
               aNewTol2d = Max(aNewTol2d, Tol2d);
@@ -1227,7 +1229,7 @@ void ProjLib_ComputeApprox::Perform
     else {
       Standard_Integer NbCurves = Fit.NbMultiCurves();
       if(NbCurves != 0) {
-             Standard_Real Tol3d,Tol2d;
+             Standard_Real Tol3d = NAN,Tol2d = NAN;
              Fit.Error(NbCurves,Tol3d, Tol2d);
               aNewTol2d = Tol2d;
       }
@@ -1285,7 +1287,7 @@ void ProjLib_ComputeApprox::Perform
     }
     Standard_Boolean ToMirror = Standard_False;
     Standard_Real du = 0., dv = 0.;
-    Standard_Integer number;
+    Standard_Integer number = 0;
     if (F.VCouture)
     { 
       if (SType == GeomAbs_Sphere && Abs(u-F.myU1) > M_PI)
@@ -1300,7 +1302,7 @@ void ProjLib_ComputeApprox::Perform
     }
     if (F.UCouture || (F.VCouture && SType == GeomAbs_Sphere))
     {
-      Standard_Real aNbPer;
+      Standard_Real aNbPer = NAN;
       gp_Pnt2d P2d = F.Value (Umid);
       du = u - P2d.X();
       du = (du < 0) ? (du - Precision::PConfusion()) : 
index 3fe5728fcca1fb4ced87943f34fd03f0413efa86..f4e3f23496b70454933b3ae5c59571c08a579c3c 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <ProjLib_ComputeApproxOnPolarSurface.hxx>
 #include <ElSLib.hxx>
 #include <ElCLib.hxx>
@@ -86,7 +88,7 @@ struct aFuncStruct
   Standard_Real mySqProjOrtTol; // Used to filter non-orthogonal projected point.
   Standard_Real myTolU;
   Standard_Real myTolV;
-  Standard_Real myPeriod[2]; // U and V period correspondingly.
+  Standard_Real myPeriod[2]{}; // U and V period correspondingly.
 };
 
 //=======================================================================
@@ -103,7 +105,7 @@ static void computePeriodicity(const Handle(Adaptor3d_Surface)& theSurf,
   // Compute once information about periodicity.
   // Param space may be reduced in case of rectangular trimmed surface,
   // in this case really trimmed bounds should be set as unperiodic.
-  Standard_Real aTrimF, aTrimL, aBaseF, aBaseL, aDummyF, aDummyL;
+  Standard_Real aTrimF = NAN, aTrimL = NAN, aBaseF = NAN, aBaseL = NAN, aDummyF = NAN, aDummyL = NAN;
   Handle(Geom_Surface) aS = GeomAdaptor::MakeSurface (*theSurf, Standard_False); // Not trim.
   // U param space.
   if (theSurf->IsUPeriodic())
@@ -191,7 +193,7 @@ static gp_Pnt2d Function_Value(const Standard_Real theU,
   gp_Pnt aSurfPnt = theData.mySurf->Value(p2d.X(), p2d.Y());
   Standard_Real aSurfPntDist = aSurfPnt.SquareDistance(p);
 
-  Standard_Real Uinf, Usup, Vinf, Vsup;
+  Standard_Real Uinf = NAN, Usup = NAN, Vinf = NAN, Vsup = NAN;
   Uinf = theData.mySurf->FirstUParameter();
   Usup = theData.mySurf->LastUParameter();
   Vinf = theData.mySurf->FirstVParameter();
@@ -289,7 +291,7 @@ static gp_Pnt2d Function_Value(const Standard_Real theU,
   Standard_Real Dist2Min = RealLast();
   Standard_Real uperiod = theData.myPeriod[0],
                 vperiod = theData.myPeriod[1],
-                u, v;
+                u = NAN, v = NAN;
 
   // U0 and V0 are the points within the initialized period.
   if(U0 < Uinf)
@@ -435,14 +437,14 @@ class ProjLib_PolarFunction : public AppCont_Function
     myStruct.myTolV = Surf->VResolution(Tol3d);
   }
 
-  ~ProjLib_PolarFunction() {}
+  ~ProjLib_PolarFunction() override {}
 
-  Standard_Real FirstParameter() const
+  Standard_Real FirstParameter() const override
   {
     return myStruct.myCurve->FirstParameter();
   }
 
-  Standard_Real LastParameter() const
+  Standard_Real LastParameter() const override
   {
     return myStruct.myCurve->LastParameter();
   }
@@ -454,7 +456,7 @@ class ProjLib_PolarFunction : public AppCont_Function
 
   Standard_Boolean Value(const Standard_Real   theT,
                          NCollection_Array1<gp_Pnt2d>& thePnt2d,
-                         NCollection_Array1<gp_Pnt>&   /*thePnt*/) const
+                         NCollection_Array1<gp_Pnt>&   /*thePnt*/) const override
   {
     thePnt2d(1) = Function_Value(theT, myStruct);
     return Standard_True;
@@ -462,7 +464,7 @@ class ProjLib_PolarFunction : public AppCont_Function
 
   Standard_Boolean D1(const Standard_Real   /*theT*/,
                       NCollection_Array1<gp_Vec2d>& /*theVec2d*/,
-                      NCollection_Array1<gp_Vec>&   /*theVec*/) const
+                      NCollection_Array1<gp_Vec>&   /*theVec*/) const override
     {return Standard_False;}
 };
 
@@ -557,7 +559,7 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
     P2d    = theInitialCurve2d->Value(theInitialCurve2d->FirstParameter());
     P2dBis = theInitialCurve2dBis->Value(theInitialCurve2dBis->FirstParameter());
 
-    Standard_Real Dist, DistBis;
+    Standard_Real Dist = NAN, DistBis = NAN;
     Dist    = P2dproj.Distance(P2d);
     DistBis = P2dproj.Distance(P2dBis);
     if( Dist < DistBis)  {
@@ -585,7 +587,7 @@ static Handle(Geom2d_BSplineCurve) Concat(Handle(Geom2d_BSplineCurve) C1,
                                           Standard_Real theUJump,
                                           Standard_Real theVJump)
 {
-  Standard_Integer deg, deg1, deg2;
+  Standard_Integer deg = 0, deg1 = 0, deg2 = 0;
   deg1 = C1->Degree();
   deg2 = C2->Degree();
   
@@ -599,7 +601,7 @@ static Handle(Geom2d_BSplineCurve) Concat(Handle(Geom2d_BSplineCurve) C1,
   }
   else deg = deg1;
 
-  Standard_Integer np1,np2,nk1,nk2,np,nk;
+  Standard_Integer np1 = 0,np2 = 0,nk1 = 0,nk2 = 0,np = 0,nk = 0;
   np1 = C1->NbPoles();
   nk1 = C1->NbKnots();
   np2 = C2->NbPoles();
@@ -619,7 +621,7 @@ static Handle(Geom2d_BSplineCurve) Concat(Handle(Geom2d_BSplineCurve) C1,
   TColStd_Array1OfInteger M(1,nk);
   TColgp_Array1OfPnt2d    P(1,np);
 
-  Standard_Integer i, count = 0;
+  Standard_Integer i = 0, count = 0;
   // Set Knots and Mults
   for ( i = 1; i <= nk1; i++) {
     count++;
@@ -686,7 +688,7 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform
     Handle(Geom_BSplineCurve) BSC = Curve->BSpline();
     Standard_Integer nbInter = Curve->NbIntervals(GeomAbs_C1);
     if(nbInter > 1) {
-      Standard_Integer i, j;
+      Standard_Integer i = 0, j = 0;
       Handle(Geom_TrimmedCurve) GTC;
       Handle(Geom2d_TrimmedCurve) G2dTC;
       TColStd_Array1OfReal Inter(1,nbInter+1);
@@ -702,8 +704,8 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform
       // - or this is a curve C1 and the sections of interest are taken otherwise the curve is created.
       
       // initialization 2d
-      Standard_Integer nbInter2d;
-      Standard_Boolean C2dIsToCompute;
+      Standard_Integer nbInter2d = 0;
+      Standard_Boolean C2dIsToCompute = 0;
       C2dIsToCompute = InitialCurve2d.IsNull();
       Handle(Geom2d_BSplineCurve) BSC2d;
       Handle(Geom2d_Curve) G2dC;
@@ -847,7 +849,7 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform
        }
       }
 
-      Standard_Real anUPeriod, anVPeriod;
+      Standard_Real anUPeriod = NAN, anVPeriod = NAN;
       computePeriodicity(S, anUPeriod, anVPeriod);
       Standard_Integer NbC = LOfBSpline2d.Extent();
       Handle(Geom2d_BSplineCurve) CurBS;
@@ -928,7 +930,7 @@ Handle(Adaptor2d_Curve2d)
   NbOfPnts = QUA.NbPoints();
   TColgp_Array1OfPnt Pts(1,NbOfPnts);
   TColStd_Array1OfReal Param(1,NbOfPnts);
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   for( i = 1; i <= NbOfPnts ; i++ ) { 
     Param(i) = QUA.Parameter(i);
     Pts(i) = Curve->Value(Param(i));
@@ -939,7 +941,7 @@ Handle(Adaptor2d_Curve2d)
   Mult.Init(1);
   Mult(1) = Mult(NbOfPnts) = 2;
   
-  Standard_Real Uinf, Usup, Vinf, Vsup;
+  Standard_Real Uinf = NAN, Usup = NAN, Vinf = NAN, Vsup = NAN;
   Uinf = Surf->FirstUParameter();
   Usup = Surf->LastUParameter();
   Vinf = Surf->FirstVParameter();
@@ -947,7 +949,7 @@ Handle(Adaptor2d_Curve2d)
   GeomAbs_SurfaceType Type = Surf->GetType();
   if((Type != GeomAbs_BSplineSurface) && (Type != GeomAbs_BezierSurface) &&
      (Type != GeomAbs_OffsetSurface)) {
-    Standard_Real S, T;
+    Standard_Real S = NAN, T = NAN;
 //    Standard_Integer usens = 0, vsens = 0; 
     // to know the position relatively to the period
     switch (Type) {
@@ -964,7 +966,7 @@ Handle(Adaptor2d_Curve2d)
     case GeomAbs_Cylinder:
       {
 //     Standard_Real Sloc, Tloc;
-        Standard_Real Sloc;
+        Standard_Real Sloc = NAN;
         Standard_Integer usens = 0;
         gp_Cylinder Cylinder = Surf->Cylinder();
         ElSLib::Parameters( Cylinder, Pts(1), S, T);
@@ -986,7 +988,7 @@ Handle(Adaptor2d_Curve2d)
     case GeomAbs_Cone:
       {
 //     Standard_Real Sloc, Tloc;
-        Standard_Real Sloc;
+        Standard_Real Sloc = NAN;
         Standard_Integer usens = 0;
         gp_Cone Cone = Surf->Cone();
         ElSLib::Parameters( Cone, Pts(1), S, T);
@@ -1007,7 +1009,7 @@ Handle(Adaptor2d_Curve2d)
       }
     case GeomAbs_Sphere:
       {
-       Standard_Real Sloc, Tloc;
+       Standard_Real Sloc = NAN, Tloc = NAN;
        Standard_Integer usens = 0, vsens = 0; //usens steps by half-period
        Standard_Boolean vparit = Standard_False;
        gp_Sphere Sphere = Surf->Sphere();
@@ -1046,7 +1048,7 @@ Handle(Adaptor2d_Curve2d)
       }
     case GeomAbs_Torus:
       {
-       Standard_Real Sloc, Tloc;
+       Standard_Real Sloc = NAN, Tloc = NAN;
        Standard_Integer usens = 0, vsens = 0;
        gp_Torus Torus = Surf->Torus();
        ElSLib::Parameters( Torus, Pts(1), S, T);
@@ -1301,7 +1303,7 @@ Handle(Adaptor2d_Curve2d)
                   {
                     myDist = LocalMinSqDist;
                   }
-                  Standard_Real LocalU, LocalV;
+                  Standard_Real LocalU = NAN, LocalV = NAN;
                   aGlobalExtr.Point(imin).Parameter(LocalU, LocalV);
                   if (uperiod > 0. && Abs(U0 - LocalU) >= uperiod/2.)
                   {
@@ -1359,7 +1361,7 @@ Handle(Adaptor2d_Curve2d)
             }
           }
          if(!myProjIsDone && uperiod) {
-           Standard_Real aUinf, aUsup, Uaux;
+           Standard_Real aUinf = NAN, aUsup = NAN, Uaux = NAN;
            aUinf = Surf->FirstUParameter();
            aUsup = Surf->LastUParameter();
            if((aUsup - U0) > (U0 - aUinf)) 
@@ -1390,7 +1392,7 @@ Handle(Adaptor2d_Curve2d)
              }
          }
          if(!myProjIsDone && vperiod) {
-           Standard_Real aVinf, aVsup, Vaux;
+           Standard_Real aVinf = NAN, aVsup = NAN, Vaux = NAN;
            aVinf = Surf->FirstVParameter();
            aVsup = Surf->LastVParameter();
            if((aVsup - V0) > (V0 - aVinf)) 
@@ -1421,7 +1423,7 @@ Handle(Adaptor2d_Curve2d)
              }
          }     
          if(!myProjIsDone && uperiod && vperiod) {
-           Standard_Real Uaux, Vaux;
+           Standard_Real Uaux = NAN, Vaux = NAN;
            if((Usup - U0) > (U0 - Uinf)) 
              Uaux = 2*Uinf - U0 + uperiod;
            else 
@@ -1577,11 +1579,11 @@ Handle(Geom2d_BSplineCurve)
   Standard_Real TolU = Surf->UResolution(Tol3d), TolV = Surf->VResolution(Tol3d);
   Standard_Real Tol2d = Max(Sqrt(TolU*TolU + TolV*TolV), Precision::PConfusion());
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   GeomAbs_SurfaceType TheTypeS = Surf->GetType();
   GeomAbs_CurveType TheTypeC = Curve->GetType();
   if(TheTypeS == GeomAbs_Plane) {
-    Standard_Real S, T;
+    Standard_Real S = NAN, T = NAN;
     gp_Pln Plane = Surf->Plane();
     if(TheTypeC == GeomAbs_BSplineCurve) {
       myTolReached = Precision::Confusion();
@@ -1641,7 +1643,7 @@ Handle(Geom2d_BSplineCurve)
       gp_Vec V2(p21,p22);
       if(V1.IsEqual(V2,Tol3d,Tol3d/(p11.Distance(p12)*180/M_PI))){  
        Standard_Integer Dist2Min = IntegerLast();
-       Standard_Real u,v;
+       Standard_Real u = NAN,v = NAN;
        if(TheTypeC == GeomAbs_BSplineCurve) {
           myTolReached = Tol3d;
          Handle(Geom_BSplineCurve) BSC = Curve->BSpline();
@@ -1739,7 +1741,7 @@ Handle(Geom2d_BSplineCurve)
       gp_Vec V2(p21,p22);
       if(V1.IsEqual(V2,Tol3d,Tol3d/(p11.Distance(p12)*180/M_PI))){ 
        Standard_Integer Dist2Min = IntegerLast();
-       Standard_Real u,v;
+       Standard_Real u = NAN,v = NAN;
  
 //     gp_Pnt pntproj;
        if(TheTypeC == GeomAbs_BSplineCurve) {
@@ -1865,7 +1867,7 @@ Handle(Geom2d_BSplineCurve)
 //  DrawTrSurf::Set((Standard_CString ) "initc2d",DDD->ChangeCurve2d().Curve());
 #endif
 
-  Standard_Integer Deg1,Deg2;
+  Standard_Integer Deg1 = 0,Deg2 = 0;
   Deg1 = 2; 
   Deg2 = 8;  
   if(myDegMin > 0)
@@ -1905,7 +1907,7 @@ Handle(Geom2d_BSplineCurve)
   Standard_Real anOldTol2d = Tol2d;
   Standard_Real aNewTol2d = 0;
   if(Fit.IsAllApproximated()) {
-    Standard_Integer j;
+    Standard_Integer j = 0;
     Standard_Integer NbCurves = Fit.NbMultiCurves();
     Standard_Integer MaxDeg = 0;
     // To transform the MultiCurve into BSpline, it is required that all  
index 1c84d1a81817e58aae3db144bcedef23395a1548..c63590d23247eb14ed2439ba8dcdaafe6b152c57 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElSLib.hxx>
 #include <gp_Circ.hxx>
 #include <gp_Cone.hxx>
@@ -94,7 +96,7 @@ void  ProjLib_Cone::Project(const gp_Lin& L)
 
   Standard_Real aDeltaV = 0.0;
 
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
   if (aPnt.IsEqual(anApex, Precision::Confusion()))
   {
     //Take another point in the line L, which does not coincide with the cone apex.
@@ -148,7 +150,7 @@ void  ProjLib_Cone::Project(const gp_Circ& C)
   gp_Dir ZCone = ConePos.XDirection().Crossed(ConePos.YDirection());
   gp_Dir ZCir =  CircPos.XDirection().Crossed(CircPos.YDirection());
 
-  Standard_Real U, V;
+  Standard_Real U = NAN, V = NAN;
   Standard_Real x = ConePos.XDirection().Dot(CircPos.XDirection());
   Standard_Real y = ConePos.YDirection().Dot(CircPos.XDirection());
   Standard_Real z 
index efb9a3a69737de4d04599be15b1faf7668cabaae..9681cac004690ae3ad00e8e32b9911c213b4a47f 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp_Ax3.hxx>
 #include <gp_Circ.hxx>
 #include <gp_Elips.hxx>
@@ -107,7 +109,7 @@ static gp_Pnt2d EvalPnt2d( const gp_Pnt& P, const gp_Cylinder& Cy )
   Standard_Real X = OP.Dot(gp_Vec(Cy.Position().XDirection()));
   Standard_Real Y = OP.Dot(gp_Vec(Cy.Position().YDirection()));
   Standard_Real Z = OP.Dot(gp_Vec(Cy.Position().Direction()));
-  Standard_Real U ;
+  Standard_Real U = NAN ;
 
   if ( Abs(X) > Precision::PConfusion() ||
        Abs(Y) > Precision::PConfusion() ) {
index 7daac35f73ad99ecb2682bec0b628348e538e2b7..dd8114c67781b2532cc825da45f86e4b2a4ff460 100644 (file)
@@ -24,9 +24,9 @@
 #include <Standard_ConstructionError.hxx>
 
 ProjLib_PrjFunc::ProjLib_PrjFunc (const Adaptor3d_Curve* C, const Standard_Real FixVal, const Adaptor3d_Surface* S, const Standard_Integer Fix)
-: myCurve(C), mySurface(S), myt(0), myU(0), myV(0), myFix(Fix)
+: myCurve(C), mySurface(S), myt(0), myU(0), myV(0), myFix(Fix), myNorm(Min(1.,Min(mySurface->UResolution(1.),mySurface->VResolution(1.))))
 {
-  myNorm=Min(1.,Min(mySurface->UResolution(1.),mySurface->VResolution(1.)));
+  
 // myNorm=1.;
   switch(myFix) {
   case 1: myt = FixVal; break;
index 26e133be41ceb220ef344eca108cd161add22e6d..6499d93326abfff86ec524eab6af2297dad3997b 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <gp_Pnt2d.hxx>
 #include <math_FunctionSetRoot.hxx>
@@ -96,7 +98,7 @@ ProjLib_PrjResolve::ProjLib_PrjResolve(const Adaptor3d_Curve& C,const Adaptor3d_
 // computation of myDone
   myDone = Standard_True;
 
-  Standard_Real ExtraU , ExtraV;
+  Standard_Real ExtraU = NAN , ExtraV = NAN;
 //  if(!StrictInside) {
     ExtraU = 2. * Tol2d.X();
     ExtraV = 2. * Tol2d.Y();
index 036c1a9c5c439cbeb03407b2351cbc359090637b..96a7e65a8303ba08acc6fe97eed3088845609005 100644 (file)
@@ -16,6 +16,8 @@
 
 // 09-Aug-95 : xab : changed the ProjLib_ProjectOnPlane in the case
 //                   of the line and the parameteriation is kept
+#include <math.h>
+
 #include <ProjLib_ProjectOnPlane.hxx>
 #include <Approx_FitAndDivide.hxx>
 #include <AppParCurves_MultiCurve.hxx>
@@ -110,7 +112,7 @@ static Standard_Boolean OnPlane_D1(const Standard_Real U,
   const gp_Ax3& Pl,
   const gp_Dir& D)
 {
-  Standard_Real Alpha;
+  Standard_Real Alpha = NAN;
   gp_Pnt Point;
   gp_Vec Vector;
 
@@ -152,7 +154,7 @@ static Standard_Boolean OnPlane_D2(const Standard_Real U,
   const gp_Ax3& Pl,
   const gp_Dir& D)
 {
-  Standard_Real Alpha;
+  Standard_Real Alpha = NAN;
   gp_Pnt Point;
   gp_Vec Vector1,
     Vector2;
@@ -200,7 +202,7 @@ static Standard_Boolean OnPlane_D3(const Standard_Real U,
   const gp_Ax3& Pl,
   const gp_Dir& D)
 {
-  Standard_Real Alpha;
+  Standard_Real Alpha = NAN;
   gp_Pnt Point;
   gp_Vec Vector1,
     Vector2,
@@ -264,19 +266,19 @@ public:
     myNbPnt2d = 0;
   }
 
-  Standard_Real FirstParameter() const
+  Standard_Real FirstParameter() const override
   {
     return myCurve->FirstParameter();
   }
 
-  Standard_Real LastParameter() const
+  Standard_Real LastParameter() const override
   {
     return myCurve->LastParameter();
   }
 
   Standard_Boolean Value(const Standard_Real   theT,
     NCollection_Array1<gp_Pnt2d>& /*thePnt2d*/,
-    NCollection_Array1<gp_Pnt>&   thePnt) const
+    NCollection_Array1<gp_Pnt>&   thePnt) const override
   {
     thePnt(1) = OnPlane_Value(theT, myCurve, myPlane, myDirection);
     return Standard_True;
@@ -284,7 +286,7 @@ public:
 
   Standard_Boolean D1(const Standard_Real   theT,
     NCollection_Array1<gp_Vec2d>& /*theVec2d*/,
-    NCollection_Array1<gp_Vec>&   theVec) const
+    NCollection_Array1<gp_Vec>&   theVec) const override
   {
     gp_Pnt aDummyPnt;
     return OnPlane_D1(theT, aDummyPnt, theVec(1), myCurve, myPlane, myDirection);
@@ -309,7 +311,7 @@ public:
   {
   }
 
-  virtual Standard_Boolean Value(const Standard_Real X, Standard_Real& F)
+  Standard_Boolean Value(const Standard_Real X, Standard_Real& F) override
   {
     myProps->SetParameter(X);
     F = -myProps->Curvature();
@@ -346,7 +348,7 @@ static void  PerformApprox(const Handle(Adaptor3d_Curve)& C,
 {
   ProjLib_OnPlane F(C, Pl, D);
 
-  Standard_Integer Deg1, Deg2;
+  Standard_Integer Deg1 = 0, Deg2 = 0;
   Deg1 = 8; Deg2 = 8;
   if (C->GetType() == GeomAbs_Parabola)
   {
@@ -367,7 +369,7 @@ static void  PerformApprox(const Handle(Adaptor3d_Curve)& C,
   {
     return;
   }
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer NbCurves = Fit.NbMultiCurves();
   Standard_Integer MaxDeg = 0;
 
@@ -387,7 +389,7 @@ static void  PerformApprox(const Handle(Adaptor3d_Curve)& C,
   TColStd_Array1OfReal Knots(1, NbCurves + 1);  //Noeuds de la BSpline
 
   Standard_Integer Compt = 1;
-  Standard_Real anErrMax = 0., anErr3d, anErr2d;
+  Standard_Real anErrMax = 0., anErr3d = NAN, anErr2d = NAN;
   for (i = 1; i <= Fit.NbMultiCurves(); i++) {
     Fit.Parameters(i, Knots(i), Knots(i + 1));
     Fit.Error(i, anErr3d, anErr2d);
@@ -595,7 +597,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_Curve)&    C,
   gp_Elips Elips;
   //  gp_Hypr  Hypr ;
 
-  Standard_Integer num_knots;
+  Standard_Integer num_knots = 0;
   GeomAbs_CurveType Type = C->GetType();
 
   gp_Ax2 Axis;
@@ -648,7 +650,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_Curve)&    C,
       myType = GeomAbs_Line;
       gp_Pnt P = ProjectPnt(myPlane, myDirection, L.Location());
       aLine = gp_Lin(P, gp_Dir(Xc));
-      Standard_Real Udeb, Ufin;
+      Standard_Real Udeb = NAN, Ufin = NAN;
 
       // eval the first and last parameters of the projected curve
       Udeb = myCurve->FirstParameter();
@@ -1620,7 +1622,7 @@ Standard_Boolean ProjLib_ProjectOnPlane::BuildParabolaByApex(Handle(Geom_Curve)&
     return Standard_False;
   }
   
-  Standard_Real aT;
+  Standard_Real aT = NAN;
   aT = aSolver.Location();
   aProps.SetParameter(aT);
   gp_Pnt aP0 = aProps.Value();
@@ -1678,7 +1680,7 @@ Standard_Boolean ProjLib_ProjectOnPlane::BuildHyperbolaByApex(Handle(Geom_Curve)
 
   if (aSolver.IsDone())
   {
-    Standard_Real aT;
+    Standard_Real aT = NAN;
     aT = aSolver.Location();
     aProps.SetParameter(aT);
     Standard_Real aCurv = aProps.Curvature();
index de4cf1f20a4bb7e890dd222548ca2ac3227fb1a6..05e2432ea03eca7ae0665a4870f05944c83d9250 100644 (file)
@@ -95,17 +95,17 @@ public:
     myExtPS = new Extrema_ExtPS (P, *S, Tol, Tol);
   }
 
-  ~ProjLib_OnSurface() { delete myExtPS; }
+  ~ProjLib_OnSurface() override { delete myExtPS; }
 
-  Standard_Real FirstParameter() const
+  Standard_Real FirstParameter() const override
     {return myCurve->FirstParameter();}
 
-  Standard_Real LastParameter() const
+  Standard_Real LastParameter() const override
     {return myCurve->LastParameter();}
 
   Standard_Boolean Value(const Standard_Real   theT,
                          NCollection_Array1<gp_Pnt2d>& /*thePnt2d*/,
-                         NCollection_Array1<gp_Pnt>&   thePnt) const
+                         NCollection_Array1<gp_Pnt>&   thePnt) const override
   {
       thePnt(1) = OnSurface_Value(theT, myCurve, myExtPS);
       return Standard_True;
@@ -113,7 +113,7 @@ public:
 
   Standard_Boolean D1(const Standard_Real   theT,
                       NCollection_Array1<gp_Vec2d>& /*theVec2d*/,
-                      NCollection_Array1<gp_Vec>&   theVec) const
+                      NCollection_Array1<gp_Vec>&   theVec) const override
   {
     gp_Pnt aPnt;
     return OnSurface_D1(theT, aPnt, theVec(1), myCurve, myExtPS);
@@ -155,10 +155,10 @@ myIsDone(Standard_False)
 //=======================================================================
 ProjLib_ProjectOnSurface::ProjLib_ProjectOnSurface
 (const Handle(Adaptor3d_Surface)& S ) :
-myTolerance(0.0),
+mySurface(S), myTolerance(0.0),
 myIsDone(Standard_False)
 {
-  mySurface = S;
+  
 }
 
 //=======================================================================
@@ -185,12 +185,12 @@ void ProjLib_ProjectOnSurface::Load(const Handle(Adaptor3d_Curve)& C,
       
     ProjLib_OnSurface F(myCurve, mySurface);
 
-    Standard_Integer Deg1, Deg2;
+    Standard_Integer Deg1 = 0, Deg2 = 0;
     Deg1 = 8; Deg2 = 8;
     
     Approx_FitAndDivide Fit(F,Deg1,Deg2,Precision::Approximation(),
                            Precision::PApproximation(),Standard_True);
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Integer NbCurves = Fit.NbMultiCurves();
     Standard_Integer MaxDeg = 0;
     
index f31bc78d57fcfc0f33eb6f9f335c29578e49a9b9..6568b192064619c0f92e0ac00b97364523fab76a 100644 (file)
@@ -16,6 +16,8 @@
 
 //  Modified by skv - Wed Aug 11 15:45:58 2004 OCC6272
 
+#include <math.h>
+
 #include <Standard_NoSuchObject.hxx>
 #include <Standard_NotImplemented.hxx>
 #include <ProjLib_ProjectedCurve.hxx>
@@ -94,7 +96,7 @@ static Standard_Boolean IsoIsDeg  (const Adaptor3d_Surface& S,
                                   const Standard_Real      TolMin,
                                   const Standard_Real      TolMax) 
 {
-    Standard_Real U1=0.,U2=0.,V1=0.,V2=0.,T;
+    Standard_Real U1=0.,U2=0.,V1=0.,V2=0.,T = NAN;
     Standard_Boolean Along = Standard_True;
     U1 = S.FirstUParameter();
     U2 = S.LastUParameter();
@@ -102,7 +104,7 @@ static Standard_Boolean IsoIsDeg  (const Adaptor3d_Surface& S,
     V2 = S.LastVParameter();
     gp_Vec D1U,D1V;
     gp_Pnt P;
-    Standard_Real Step,D1NormMax;
+    Standard_Real Step = NAN,D1NormMax = NAN;
     if (IT == GeomAbs_IsoV) 
     {
       Step = (U2 - U1)/10;
@@ -507,7 +509,7 @@ void ProjLib_ProjectedCurve::Perform(const Handle(Adaptor3d_Curve)& C)
     case GeomAbs_BSplineSurface:
       {
         isAnalyticalSurf = Standard_False;
-        Standard_Real f, l;
+        Standard_Real f = NAN, l = NAN;
         f = myCurve->FirstParameter();
         l = myCurve->LastParameter();
         dt = (l - f) * eps;
@@ -716,7 +718,7 @@ void ProjLib_ProjectedCurve::Perform(const Handle(Adaptor3d_Curve)& C)
           if(IsTrimmed[0] || IsTrimmed[1])
           {
             // Treatment only for surface of revolution
-            Standard_Real u1, u2, v1, v2;
+            Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
             u1 = mySurface->FirstUParameter();
             u2 = mySurface->LastUParameter();
             v1 = mySurface->FirstVParameter();
index 943b271e95f7d8cc89dd0a87aac620f247839e73..18f919ad4adb888f17bba138f4c2fb1e67c1cbde 100644 (file)
 //purpose  : 
 //=======================================================================
 ProjLib_Projector::ProjLib_Projector()
-: myIsPeriodic(Standard_False)
+: myType(GeomAbs_BSplineCurve), myIsPeriodic(Standard_False), isDone(Standard_False)
 {
-  isDone = Standard_False;
-  myType = GeomAbs_BSplineCurve;
+  
+  
 }
 
 
index ba04e89af53e4ea24614ec3ea17a939f3a1e1b28..75ac58d6f2201d81e3bae8362a1001997a60e30b 100644 (file)
@@ -16,6 +16,8 @@
 
 //  Modified by skv - Tue Aug  1 16:29:59 2006 OCC13116
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <gp.hxx>
 #include <gp_Circ.hxx>
@@ -95,7 +97,7 @@ static gp_Pnt2d EvalPnt2d(const gp_Vec&    P,
   Standard_Real X = P.Dot(gp_Vec(Sp.Position().XDirection()));
   Standard_Real Y = P.Dot(gp_Vec(Sp.Position().YDirection()));
   Standard_Real Z = P.Dot(gp_Vec(Sp.Position().Direction()));
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
 
   if ( Abs(X) > Precision::PConfusion() ||
        Abs(Y) > Precision::PConfusion() ) {
@@ -139,7 +141,7 @@ void  ProjLib_Sphere::Project(const gp_Circ& C)
   Ys = mySphere.Position().YDirection();
   Zs = mySphere.Position().Direction();
   
-  Standard_Boolean isIsoU, isIsoV;
+  Standard_Boolean isIsoU = 0, isIsoV = 0;
   Standard_Real Tol = Precision::Confusion();
 
   isIsoU = Zc.IsNormal(Zs,Tol) && O.IsEqual(C.Location(),Tol);
@@ -225,7 +227,7 @@ void ProjLib_Sphere::SetInBounds(const Standard_Real U)
   StdFail_NotDone_Raise_if( !isDone, "ProjLib_Sphere:SetInBounds");
   
   // first set the y of the first point in -pi/2 pi/2
-  Standard_Real newY, Y = ElCLib::Value(U,myLin).Y();
+  Standard_Real newY = NAN, Y = ElCLib::Value(U,myLin).Y();
   newY = ElCLib::InPeriod( Y, -M_PI, M_PI);
   
   myLin.Translate(gp_Vec2d(0.,newY-Y));
@@ -258,7 +260,7 @@ void ProjLib_Sphere::SetInBounds(const Standard_Real U)
   myLin.Translate(gp_Vec2d(M_PI,0.));
 
   // il faut maintenant recadrer en U
-  Standard_Real newX, X = ElCLib::Value(U,myLin).X();
+  Standard_Real newX = NAN, X = ElCLib::Value(U,myLin).X();
   newX = ElCLib::InPeriod( X, 0., 2.*M_PI);
   myLin.Translate(gp_Vec2d(newX-X,0.));
 }
index 85e5be3fbcdb90fa5c5882f1677b4610a830b9f9..94f46677bda985c0d3a34172e398f64982572d75 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <gp.hxx>
 #include <gp_Circ.hxx>
 #include <gp_Dir2d.hxx>
@@ -88,7 +90,7 @@ static gp_Pnt2d EvalPnt2d( const gp_Vec& Ve, const gp_Torus& To)
 {
   Standard_Real X = Ve.Dot(gp_Vec(To.Position().XDirection()));
   Standard_Real Y = Ve.Dot(gp_Vec(To.Position().YDirection()));
-  Standard_Real U,V;
+  Standard_Real U = NAN,V = NAN;
 
   if ( Abs(X) > Precision::PConfusion() ||
        Abs(Y) > Precision::PConfusion() ) {
@@ -133,7 +135,7 @@ void  ProjLib_Torus::Project(const gp_Circ& C)
     Standard_Real Z = OC.Dot(myTorus.Position().Direction());
     Z /= myTorus.MinorRadius();
     
-    Standard_Real V;
+    Standard_Real V = NAN;
 
     if ( Z > 1.) {         
       V = M_PI/2.;          // protection stupide 
index d282190260489ca28f9134e2e008c14af314ca9e..6b63a8eb8cb3e7d6e8725cdab6daad6f6ddc22a0 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Prs3d.hxx>
 
 #include <gp_Pnt.hxx>
@@ -103,7 +105,7 @@ Standard_Boolean Prs3d::MatchSegment
                   const gp_Pnt& P2,
                   Standard_Real& dist)
 {
-  Standard_Real X1,Y1,Z1,X2,Y2,Z2;
+  Standard_Real X1 = NAN,Y1 = NAN,Z1 = NAN,X2 = NAN,Y2 = NAN,Z2 = NAN;
   P1.Coord(X1,Y1,Z1); P2.Coord(X2,Y2,Z2);
   Standard_Real DX = X2-X1; 
   Standard_Real DY = Y2-Y1; 
index e652596b0dadc3ba26591d327170030fd6c9b93c..bf03f219ab38037a98dac34a834cd424692f0378 100644 (file)
@@ -71,7 +71,7 @@ protected:
   Handle(Graphic3d_AspectLine3d) myArrowAspect;
   Standard_Real myAngle;
   Standard_Real myLength;
-  Standard_Boolean myIsZoomable;
+  Standard_Boolean myIsZoomable{};
 
 };
 
index 01c9f5e90a0976a665b9cc749539c0a3ab6752ac..99c28d6cf0c1995a8c73b05935f1559fcfc6c07b 100644 (file)
@@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_DatumAspect, Prs3d_BasicAspect)
 // purpose  :
 // =======================================================================
 Prs3d_DatumAspect::Prs3d_DatumAspect()
-: myAxes (Prs3d_DatumAxes_XYZAxes),
+: myArrowAspect(new Prs3d_ArrowAspect()), myAxes (Prs3d_DatumAxes_XYZAxes),
   myToDrawLabels (Standard_True),
   myToDrawArrows (Standard_True)
 {
@@ -40,7 +40,7 @@ Prs3d_DatumAspect::Prs3d_DatumAspect()
   myAttributes[Prs3d_DatumAttribute_ShadingNumberOfFacettes]    = 12.0;
 
   myPointAspect = new Prs3d_PointAspect (Aspect_TOM_EMPTY, aDefaultColor, 1.0);
-  myArrowAspect = new Prs3d_ArrowAspect();
+  
   for (int aPartIter = Prs3d_DatumParts_Origin; aPartIter <= Prs3d_DatumParts_XOZAxis; ++aPartIter)
   {
     const Prs3d_DatumParts aPart = (Prs3d_DatumParts )aPartIter;
index 9ef2af7dceee1d4d3f57ded250977d5563f041e7..4a7cedeb667a1687443415eedd18852b32eb5e8d 100644 (file)
@@ -127,7 +127,7 @@ protected:
   Handle(Prs3d_TextAspect)    myTextAspects[Prs3d_DatumParts_NB];
   Handle(Prs3d_PointAspect)   myPointAspect;
   Handle(Prs3d_ArrowAspect)   myArrowAspect;
-  Standard_Real               myAttributes[Prs3d_DatumAttribute_NB];
+  Standard_Real               myAttributes[Prs3d_DatumAttribute_NB]{};
   Prs3d_DatumAxes             myAxes;
   Standard_Boolean            myToDrawLabels;
   Standard_Boolean            myToDrawArrows;
index 38c85647b93807c4247f1b3fa2febb14d8edee02..14a4bc7d099654daed88f8c7675d91fce73dbe57 100644 (file)
@@ -966,9 +966,9 @@ protected:
   Standard_Boolean              myHasOwnTypeOfDeflection;
   Prs3d_TypeOfHLR               myTypeOfHLR;
   Standard_Real                 myDeviationCoefficient;
-  Standard_Real                 myPreviousDeviationCoefficient;
+  Standard_Real                 myPreviousDeviationCoefficient{};
   Standard_Real                 myDeviationAngle;
-  Standard_Real                 myPreviousDeviationAngle;
+  Standard_Real                 myPreviousDeviationAngle{};
   Standard_Boolean              myIsoOnPlane;
   Standard_Boolean              myHasOwnIsoOnPlane;
   Standard_Boolean              myIsoOnTriangulation;
index b103684ade0dac1dc7c140ef17467767aa201790..93e745b1c6f499ebf9910a3115f574bd2e9de2f3 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim.hxx>
 
 #include <Bnd_Box.hxx>
@@ -82,7 +84,7 @@ const Standard_Real SquareTolerance = Precision::SquareConfusion();
 gp_Pnt PrsDim::Nearest(const TopoDS_Shape& ashape, const gp_Pnt& apoint)
 {
   Standard_Real dist2 = RealLast();
-  Standard_Real curdist2;
+  Standard_Real curdist2 = NAN;
   gp_Pnt result(0.0,0.0,0.0);
   gp_Pnt curpnt(0.0,0.0,0.0);
   TopExp_Explorer explo(ashape,TopAbs_VERTEX);
@@ -143,7 +145,7 @@ Standard_Boolean PrsDim::Nearest (const Handle(Geom_Curve)& theCurve,
 //=======================================================================
 gp_Pnt PrsDim::Farest( const TopoDS_Shape& aShape, const gp_Pnt& aPoint )
 {
-  Standard_Real MaxDist2 = 0.0e0, curdist2;
+  Standard_Real MaxDist2 = 0.0e0, curdist2 = NAN;
   gp_Pnt Result(0.0,0.0,0.0);
   gp_Pnt curpnt(0.0,0.0,0.0);
   TopExp_Explorer Explo( aShape, TopAbs_VERTEX );
@@ -171,7 +173,7 @@ Standard_Boolean PrsDim::ComputeGeometry (const TopoDS_Edge&  theEdge,
                                           gp_Pnt&             theLastPnt)
 {
   TopLoc_Location anEdgeLoc;
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   theCurve = BRep_Tool::Curve (theEdge, anEdgeLoc, aFirst, aLast);
   if (theCurve.IsNull())
   {
@@ -363,7 +365,7 @@ Standard_Boolean PrsDim::ComputeGeometry (const TopoDS_Edge& theFirstEdge,
   }
 
   TopLoc_Location aFirstEdgeLoc, aSecondEdgeLoc;
-  Standard_Real aFirst1, aLast1, aFirst2, aLast2;
+  Standard_Real aFirst1 = NAN, aLast1 = NAN, aFirst2 = NAN, aLast2 = NAN;
   
   theFirstCurve = BRep_Tool::Curve (theFirstEdge, aFirstEdgeLoc, aFirst1, aLast1);
   theSecondCurve = BRep_Tool::Curve (theSecondEdge, aSecondEdgeLoc, aFirst2, aLast2);
@@ -542,7 +544,7 @@ Standard_Boolean PrsDim::ComputeGeometry (const TopoDS_Edge& theFirstEdge,
   theExtCurve.Nullify();
   theExtIndex = 0;
 
-  Standard_Real aFirst1, aLast1, aFirst2, aLast2;
+  Standard_Real aFirst1 = NAN, aLast1 = NAN, aFirst2 = NAN, aLast2 = NAN;
   theIsInfinite1 = theIsInfinite2 = Standard_False;
 
   BRepAdaptor_Curve aFirstAdaptor (theFirstEdge);
@@ -577,7 +579,7 @@ Standard_Boolean PrsDim::ComputeGeometry (const TopoDS_Edge& theFirstEdge,
   Handle(Geom_Curve) aSecondSaved = theSecondCurve;
 
   // Checks that the projected curve is not in the plane
-  Standard_Boolean isFirstOnPlane, isSecondOnPlane;
+  Standard_Boolean isFirstOnPlane = 0, isSecondOnPlane = 0;
 
   if ((!ComputeGeomCurve (theFirstCurve, aFirst1, aLast1, theFirstPnt1, theLastPnt1, thePlane, isFirstOnPlane))
       || (!ComputeGeomCurve( theSecondCurve, aFirst2, aLast2, theFirstPnt2, theLastPnt2, thePlane,isSecondOnPlane)))
@@ -895,7 +897,7 @@ Standard_Boolean PrsDim::InitAngleBetweenPlanarFaces (const TopoDS_Face& theFirs
   }
 
   // Get intersect line.
-  Handle(Geom_Curve) anIntersectCurve = aPlaneIntersector.Line (1);
+  const Handle(Geom_Curve)& anIntersectCurve = aPlaneIntersector.Line (1);
 
   Handle(Geom_Line) anIntersectLine = Handle(Geom_Line)::DownCast (anIntersectCurve);
 
@@ -907,8 +909,8 @@ Standard_Boolean PrsDim::InitAngleBetweenPlanarFaces (const TopoDS_Face& theFirs
   gp_Lin anIntersectLin = anIntersectLine->Lin();
 
   gp_Pnt aFirstCenter, aSecondCenter;
-  Standard_Real anU1Min, anU1Max, aV1Min, aV1Max;
-  Standard_Real anU2Min, anU2Max, aV2Min, aV2Max;
+  Standard_Real anU1Min = NAN, anU1Max = NAN, aV1Min = NAN, aV1Max = NAN;
+  Standard_Real anU2Min = NAN, anU2Max = NAN, aV2Min = NAN, aV2Max = NAN;
 
   BRepTools::UVBounds (theFirstFace, anU1Min, anU1Max, aV1Min, aV1Max);
   BRepTools::UVBounds (theSecondFace, anU2Min, anU2Max, aV2Min, aV2Max);
@@ -982,8 +984,7 @@ Standard_Boolean PrsDim::InitAngleBetweenCurvilinearFaces (const TopoDS_Face& th
   }
 
   // Get intersect line.
-  Handle(Geom_Curve) anIntersectCurve = aSurfaceIntersector.Line (1);
-
+  
   Handle(Geom_Line) aFirstLine, aSecondLine;
   Standard_Real aFirstU = 0.0;
   Standard_Real aFirstV = 0.0;
@@ -1056,7 +1057,7 @@ Standard_Boolean PrsDim::InitAngleBetweenCurvilinearFaces (const TopoDS_Face& th
       theFirstAttach = theCenter.Translated (aDir);
 
       // theFirstAttach should be on theFirstSurf.
-      Standard_Real anU, aV;
+      Standard_Real anU = NAN, aV = NAN;
       if (theFirstSurfType == PrsDim_KOS_Cylinder)
       {
         ElSLib::Parameters ((Handle(Geom_CylindricalSurface)::DownCast (aFirstSurf))->Cylinder(),
@@ -1084,7 +1085,7 @@ Standard_Boolean PrsDim::InitAngleBetweenCurvilinearFaces (const TopoDS_Face& th
     {
       return Standard_False;
     }
-    Standard_Real anU, aV;
+    Standard_Real anU = NAN, aV = NAN;
     aProjector.LowerDistanceParameters (anU, aV);
     theSecondAttach = aSecondSurf->Value (anU, aV);
   }
@@ -1110,7 +1111,7 @@ void PrsDim::InitLengthBetweenCurvilinearFaces (const TopoDS_Face&    theFirstFa
                                                 gp_Dir&               theDirOnPlane)
 {
   GeomAPI_ProjectPointOnSurf aProjector;
-  Standard_Real aPU, aPV;
+  Standard_Real aPU = NAN, aPV = NAN;
 
   TopExp_Explorer anExplorer (theFirstFace, TopAbs_VERTEX);
 
@@ -1193,7 +1194,7 @@ gp_Pnt PrsDim::TranslatePointToBound( const gp_Pnt & aPoint, const gp_Dir & aDir
       TColStd_Array2OfReal Bound( 1, 3, 1, 2 );
       TColStd_Array1OfReal Origin( 1, 3 );
       TColStd_Array1OfReal Dir( 1, 3 );
-      Standard_Real t;
+      Standard_Real t = NAN;
       
       aBndBox.Get( Bound(1,1), Bound(2,1), Bound(3,1), Bound(1,2),  Bound(2,2), Bound(3,2) );
       aPoint.Coord( Origin(1), Origin(2), Origin(3) );
@@ -1240,7 +1241,7 @@ Standard_Boolean PrsDim::InDomain(const Standard_Real fpar,
       return ((para >= fpar) && (para <= lpar));
     else { // fpar > lpar
       Standard_Real delta = 2*M_PI-fpar;
-      Standard_Real lp, par, fp;
+      Standard_Real lp = NAN, par = NAN, fp = NAN;
       lp = lpar + delta;
       par = para + delta;
       while(lp > 2*M_PI) lp-=2*M_PI;
@@ -1264,7 +1265,7 @@ Standard_Real PrsDim::DistanceFromApex(const gp_Elips & elips,
                                    const gp_Pnt   & Apex,
                                    const Standard_Real par)
 {
-  Standard_Real dist;
+  Standard_Real dist = NAN;
   Standard_Real parApex = ElCLib::Parameter ( elips, Apex );
   if(parApex == 0.0 || parApex == M_PI) 
     {//Major case
@@ -1315,7 +1316,7 @@ gp_Pnt PrsDim::NearestApex(const gp_Elips & elips,
                        const Standard_Real lpara,
                              Standard_Boolean & IsInDomain)
 {
-  Standard_Real parP, parN;
+  Standard_Real parP = NAN, parN = NAN;
   gp_Pnt EndOfArrow(0.0,0.0,0.0);
   IsInDomain = Standard_True;
   parP = ElCLib::Parameter ( elips, pApex );
@@ -1367,10 +1368,10 @@ void PrsDim::ComputeProjEdgePresentation (const Handle(Prs3d_Presentation)& aPre
     li->SetWidth(aWidth);
   }
 
-  Standard_Real pf, pl;
+  Standard_Real pf = NAN, pl = NAN;
   TopLoc_Location loc;
   Handle(Geom_Curve) curve;
-  Standard_Boolean isInfinite;
+  Standard_Boolean isInfinite = 0;
   curve = BRep_Tool::Curve(anEdge,loc,pf,pl);
   isInfinite = (Precision::IsInfinite(pf) || Precision::IsInfinite(pl));
 
index 8d480a96869666049f42d94fc6b4852df25dfb14..b828beda2f23859ac33a872120f89e4d93e16493 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_AngleDimension.hxx>
 
 #include <PrsDim.hxx>
@@ -641,7 +643,7 @@ void PrsDim_AngleDimension::Compute (const Handle(PrsMgr_PresentationManager)& ,
   Standard_Real anArrowLength = aDimensionAspect->ArrowAspect()->Length();
 
   // prepare label string and compute its geometrical width
-  Standard_Real aLabelWidth;
+  Standard_Real aLabelWidth = NAN;
   TCollection_ExtendedString aLabelString = GetValueString (aLabelWidth);
 
   // add margins to label width
@@ -897,7 +899,7 @@ Standard_Boolean PrsDim_AngleDimension::InitTwoEdgesAngle (gp_Pln& theComputedPl
                                      : gp_Pln (aSecondLin.Location(), gp_Vec (aFirstLin.Direction()) ^ gp_Vec (aSecondLin.Direction()));
 
   // Compute geometry for this plane and edges
-  Standard_Boolean isInfinite1,isInfinite2;
+  Standard_Boolean isInfinite1 = 0,isInfinite2 = 0;
   gp_Pnt aFirstPoint1, aLastPoint1, aFirstPoint2, aLastPoint2;
   Handle(Geom_Curve) aFirstCurve = aFirstLine, aSecondCurve = aSecondLine;
   if (!PrsDim::ComputeGeometry (aFirstEdge, aSecondEdge,
@@ -988,7 +990,7 @@ Standard_Boolean PrsDim_AngleDimension::InitTwoFacesAngle()
   gp_Pln aFirstPln, aSecondPln;
   Handle(Geom_Surface) aFirstBasisSurf, aSecondBasisSurf;
   PrsDim_KindOfSurface aFirstSurfType, aSecondSurfType;
-  Standard_Real aFirstOffset, aSecondOffset;
+  Standard_Real aFirstOffset = NAN, aSecondOffset = NAN;
 
   PrsDim::GetPlaneFromFace (aFirstFace, aFirstPln,
                             aFirstBasisSurf,aFirstSurfType,aFirstOffset);
@@ -1028,7 +1030,7 @@ Standard_Boolean PrsDim_AngleDimension::InitTwoFacesAngle (const gp_Pnt& thePoin
   gp_Pln aFirstPln, aSecondPln;
   Handle(Geom_Surface) aFirstBasisSurf, aSecondBasisSurf;
   PrsDim_KindOfSurface aFirstSurfType, aSecondSurfType;
-  Standard_Real aFirstOffset, aSecondOffset;
+  Standard_Real aFirstOffset = NAN, aSecondOffset = NAN;
 
   PrsDim::GetPlaneFromFace (aFirstFace, aFirstPln,
                             aFirstBasisSurf,aFirstSurfType,aFirstOffset);
@@ -1216,7 +1218,7 @@ gp_Pnt PrsDim_AngleDimension::GetTextPosition() const
   Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect();
 
   // Prepare label string and compute its geometrical width
-  Standard_Real aLabelWidth;
+  Standard_Real aLabelWidth = NAN;
   TCollection_ExtendedString aLabelString = GetValueString (aLabelWidth);
 
   gp_Pnt aFirstAttach = myCenterPoint.Translated (gp_Vec(myCenterPoint, myFirstPoint).Normalized() * GetFlyout());
@@ -1396,7 +1398,7 @@ void PrsDim_AngleDimension::FitTextAlignment (const Prs3d_DimensionTextHorizonta
   Standard_Real anArrowLength = aDimensionAspect->ArrowAspect()->Length();
 
   // Prepare label string and compute its geometrical width
-  Standard_Real aLabelWidth;
+  Standard_Real aLabelWidth = NAN;
   TCollection_ExtendedString aLabelString = GetValueString (aLabelWidth);
 
   // add margins to label width
index b829c42dcee1ae097609ffd334584e55f5ada4ba..701e047260b9efd848bf62b11b86a158773e434f 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_Chamf3dDimension.hxx>
 
 #include <PrsDim.hxx>
@@ -89,7 +91,7 @@ void PrsDim_Chamf3dDimension::Compute (const Handle(PrsMgr_PresentationManager)&
   // Calcul du centre de la face
   //----------------------------
   BRepAdaptor_Surface surfAlgo (TopoDS::Face(myFShape));
-  Standard_Real uFirst, uLast, vFirst, vLast;
+  Standard_Real uFirst = NAN, uLast = NAN, vFirst = NAN, vLast = NAN;
   uFirst = surfAlgo.FirstUParameter();
   uLast = surfAlgo.LastUParameter();
   vFirst = surfAlgo.FirstVParameter();
index 6f283e13e167b60fddf1fa7253d6bd16c9de649d..3b3b0e96a7fa5ed223bc9c5ad41d701afb2ccb19 100644 (file)
@@ -100,8 +100,8 @@ void PrsDim_ConcentricRelation::ComputeEdgeVertexConcentric(const Handle(Prs3d_P
   gp_Pnt p1,p2;
   Handle(Geom_Curve) C;
   Handle(Geom_Curve) extCurv;
-  Standard_Boolean isInfinite;
-  Standard_Boolean isOnPlanEdge, isOnPlanVertex;
+  Standard_Boolean isInfinite = 0;
+  Standard_Boolean isOnPlanEdge = 0, isOnPlanVertex = 0;
   if (!PrsDim::ComputeGeometry(E,C,p1,p2,extCurv,isInfinite,isOnPlanEdge,myPlane)) return;
   gp_Pnt P;
   PrsDim::ComputeGeometry(V,P, myPlane, isOnPlanVertex);
@@ -151,7 +151,7 @@ void PrsDim_ConcentricRelation::ComputeTwoEdgesConcentric(const Handle(Prs3d_Pre
   
   gp_Pnt ptat11,ptat12,ptat21,ptat22;
   Handle(Geom_Curve) geom1,geom2;
-  Standard_Boolean isInfinite1,isInfinite2;
+  Standard_Boolean isInfinite1 = 0,isInfinite2 = 0;
   Handle(Geom_Curve) extCurv;
   if (!PrsDim::ComputeGeometry(TopoDS::Edge(myFShape), TopoDS::Edge(mySShape),
                            myExtShape,
index 3cb179a847c0db19ad00329388075e8a997b2fc8..1301fbf70e0297e2df5f8ebd1eb2d694ab6c6caa 100644 (file)
@@ -60,7 +60,7 @@ private:
 private:
 
   gp_Pnt myCenter;
-  Standard_Real myRad;
+  Standard_Real myRad{};
   gp_Dir myDir;
   gp_Pnt myPnt;
 
index ca11eccfaaad0646175be7dbebaacd7a6f1a5197..61318423ce591fc58ceb37cdd3cfa92de2ee0044 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_Dimension.hxx>
 
 #include <PrsDim.hxx>
@@ -471,7 +473,7 @@ void PrsDim_Dimension::drawText (const Handle(Prs3d_Presentation)& thePresentati
     Bnd_Box aShapeBnd;
     BRepBndLib::AddClose (aTextShape, aShapeBnd);
 
-    Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+    Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN;
     aShapeBnd.Get (aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
 
     Standard_Real aXalign = aTextWidth  * 0.5 - (aXmax + aXmin) * 0.5;
@@ -652,7 +654,7 @@ void PrsDim_Dimension::DrawLinearDimension (const Handle(Prs3d_Presentation)& th
   Standard_Real anArrowLength   = aDimensionAspect->ArrowAspect()->Length();
   Standard_Real anExtensionSize = aDimensionAspect->ExtensionSize();
   // prepare label string and compute its geometrical width
-  Standard_Real aLabelWidth;
+  Standard_Real aLabelWidth = NAN;
   TCollection_ExtendedString aLabelString = GetValueString (aLabelWidth);
 
   // add margins to cut dimension lines for 3d text
@@ -1619,7 +1621,7 @@ void PrsDim_Dimension::FitTextAlignmentForLinear (const gp_Pnt& theFirstPoint,
   Standard_Real anArrowLength = aDimensionAspect->ArrowAspect()->Length();
 
   // prepare label string and compute its geometrical width
-  Standard_Real aLabelWidth;
+  Standard_Real aLabelWidth = NAN;
   TCollection_ExtendedString aLabelString = GetValueString (aLabelWidth);
 
   // Add margins to cut dimension lines for 3d text
index 1072eaaf75b2acde9b68c1712e8051790189b699..ba932428057f14b5c22bf9424deeca5259730519 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_EllipseRadiusDimension.hxx>
 
 #include <PrsDim.hxx>
@@ -97,7 +99,7 @@ void PrsDim_EllipseRadiusDimension::ComputeFaceGeometry()
   gp_Pln aPln;
   Handle( Geom_Surface ) aBasisSurf;
   PrsDim_KindOfSurface aSurfType;
-  Standard_Real Offset;
+  Standard_Real Offset = NAN;
   PrsDim::GetPlaneFromFace( TopoDS::Face(  myFShape),
                                        aPln,
                                        aBasisSurf,
@@ -122,7 +124,7 @@ void PrsDim_EllipseRadiusDimension::ComputeCylFaceGeometry(const PrsDim_KindOfSu
 {
 
   BRepAdaptor_Surface surf1(TopoDS::Face(myFShape));
-  Standard_Real vFirst, vLast;
+  Standard_Real vFirst = NAN, vLast = NAN;
   vFirst = surf1.FirstVParameter();
   vLast  = surf1.LastVParameter();
   Standard_Real vMid = (vFirst + vLast)*0.5;
index d7f0eee586916c4e35b2dc5a59a9a19da60537b1..dc621122f652329c255b04a2149ab93020d4258b 100644 (file)
@@ -49,12 +49,12 @@ protected:
 protected:
 
   gp_Elips myEllipse;
-  Standard_Real myFirstPar;
-  Standard_Real myLastPar;
-  Standard_Boolean myIsAnArc;
+  Standard_Real myFirstPar{};
+  Standard_Real myLastPar{};
+  Standard_Boolean myIsAnArc{};
   Handle(Geom_OffsetCurve) myOffsetCurve;
-  Standard_Real myOffset;
-  Standard_Boolean myIsOffset;
+  Standard_Real myOffset{};
+  Standard_Boolean myIsOffset{};
 
 private:
 
index cea28b70a9ddf5fce1625d55964aee6915ad746f..530a14b6859217fbb04982b63382655ad2f8740b 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_EqualDistanceRelation.hxx>
 
 #include <PrsDim.hxx>
@@ -54,12 +56,12 @@ PrsDim_EqualDistanceRelation::PrsDim_EqualDistanceRelation( const TopoDS_Shape&
                                                      const TopoDS_Shape& aShape3,
                                                      const TopoDS_Shape& aShape4,
                                                      const Handle( Geom_Plane )& aPlane )
-: PrsDim_Relation()
+: PrsDim_Relation(), myShape3(aShape3), myShape4(aShape4)
 {
   myFShape = aShape1;
   mySShape = aShape2;
-  myShape3 = aShape3;
-  myShape4 = aShape4;
+  
+  
   myPlane  = aPlane;
 
   //Temporary
@@ -372,7 +374,7 @@ void PrsDim_EqualDistanceRelation::ComputeTwoEdgesLength( const Handle( Prs3d_Pr
   Handle(Geom_Curve) extCurv;
   Standard_Real arrsize = ArrowSize;// size
   Standard_Real Val=0.;
-  Standard_Boolean isInPlane1, isInPlane2;
+  Standard_Boolean isInPlane1 = 0, isInPlane2 = 0;
 
   if(!PrsDim::ComputeGeometry(FirstEdge,geom1, ptat11, ptat12,extCurv,isInfinite1,isInPlane1, Plane ))
     return;
@@ -589,7 +591,7 @@ void PrsDim_EqualDistanceRelation::ComputeTwoVerticesLength( const Handle( Prs3d
                                                         gp_Pnt& SecondExtreme, 
                                                         DsgPrs_ArrowSide& SymbolPrs )
 {
-  Standard_Boolean isOnPlane1, isOnPlane2;
+  Standard_Boolean isOnPlane1 = 0, isOnPlane2 = 0;
   gp_Dir DirAttach;
   PrsDim::ComputeGeometry( FirstVertex, FirstAttach, Plane, isOnPlane1);
   PrsDim::ComputeGeometry( SecondVertex, SecondAttach, Plane, isOnPlane2);
@@ -685,10 +687,10 @@ void PrsDim_EqualDistanceRelation::ComputeOneEdgeOneVertexLength( const Handle(
   gp_Pnt ptonedge1,ptonedge2;
   Handle(Geom_Curve) aCurve;
   Handle(Geom_Curve) extCurv;
-  Standard_Boolean isInfinite;
-  Standard_Real Val;
-  Standard_Boolean isOnPlanEdge, isOnPlanVertex;
-  Standard_Integer edgenum ;
+  Standard_Boolean isInfinite = 0;
+  Standard_Real Val = NAN;
+  Standard_Boolean isOnPlanEdge = 0, isOnPlanVertex = 0;
+  Standard_Integer edgenum = 0 ;
 
   if (FirstShape.ShapeType() == TopAbs_VERTEX) {  
     thevertex = TopoDS::Vertex(FirstShape);
index cd3d32c0eb43808ca44a6098b35f6c058d869f27..c8e3d3dbddc123dc0d40e39c83c81a7cd523e91d 100644 (file)
@@ -68,7 +68,7 @@ void PrsDim_EqualRadiusRelation::Compute (const Handle(PrsMgr_PresentationManage
   Handle( Geom_Curve ) FirstProjCurve = FirstCurve.Curve().Curve(),
                        SecondProjCurve = SecondCurve.Curve().Curve();
   gp_Pnt FirstPoint1, LastPoint1, FirstPoint2, LastPoint2;
-  Standard_Boolean isFirstOnPlane, isSecondOnPlane;
+  Standard_Boolean isFirstOnPlane = 0, isSecondOnPlane = 0;
 
   PrsDim::ComputeGeomCurve (FirstProjCurve,  FirstPar1, LastPar1, FirstPoint1, LastPoint1, myPlane, isFirstOnPlane);
   PrsDim::ComputeGeomCurve (SecondProjCurve, FirstPar2, LastPar2, FirstPoint2, LastPoint2, myPlane, isSecondOnPlane);
index b75a001d002945dc67f59a51ea0f3d4637e9f977..bb34bb8f25ee1aa2b11f29b0c4b06b827be3f8f3 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_FixRelation.hxx>
 
 #include <PrsDim.hxx>
@@ -367,7 +369,7 @@ void PrsDim_FixRelation::ComputeEdge(const TopoDS_Edge& FixEdge, gp_Pnt& curpos)
         //--> In case of a circle
   else if (curEdge->IsKind(STANDARD_TYPE(Geom_Circle))) {
     gp_Circ  gcirc = Handle(Geom_Circle)::DownCast(curEdge)->Circ();
-    Standard_Real pfirst, plast;
+    Standard_Real pfirst = NAN, plast = NAN;
     BRepAdaptor_Curve cu(FixEdge);
     pfirst = cu.FirstParameter();
     plast = cu.LastParameter();
@@ -415,7 +417,7 @@ void PrsDim_FixRelation::ComputeLinePosition(const gp_Lin& glin,
     // of the edge : the point closest to the projection is chosen 
     // as the attach point
     else {
-      Standard_Real pOnLin;
+      Standard_Real pOnLin = NAN;
       if (linparam > plast)
        pOnLin = plast;
       else
index abdd768f77939b305946ed359e1c045853596e72..9db36e0742491650dcc736adfc7cd4a77ea9b9d9 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_IdenticRelation.hxx>
 
 #include <PrsDim.hxx>
@@ -78,7 +80,7 @@ static void PrsDim_Sort(Standard_Real tab1[4],
                     Standard_Integer tab3[4])
 {
   Standard_Boolean found = Standard_True;
-  Standard_Real cur; gp_Pnt cur1; Standard_Integer cur2;
+  Standard_Real cur = NAN; gp_Pnt cur1; Standard_Integer cur2 = 0;
   
   while (found) {
     found = Standard_False;
@@ -377,7 +379,7 @@ void PrsDim_IdenticRelation::ComputeSelection(const Handle(SelectMgr_Selection)&
        {
          Handle(Geom_Curve) curv1,curv2;
          gp_Pnt firstp1,lastp1,firstp2,lastp2;
-         Standard_Boolean isInfinite1,isInfinite2;
+         Standard_Boolean isInfinite1 = 0,isInfinite2 = 0;
          Handle(Geom_Curve) extCurv;
          if ( !PrsDim::ComputeGeometry(TopoDS::Edge(myFShape),TopoDS::Edge(mySShape),
                                     myExtShape,curv1,curv2,
@@ -454,7 +456,7 @@ void PrsDim_IdenticRelation::ComputeTwoEdgesPresentation(const Handle(Prs3d_Pres
 {
   Handle(Geom_Curve) curv1,curv2;
   gp_Pnt firstp1,lastp1,firstp2,lastp2;
-  Standard_Boolean isInfinite1,isInfinite2;
+  Standard_Boolean isInfinite1 = 0,isInfinite2 = 0;
 
   Handle(Geom_Curve) extCurv;
   if (!PrsDim::ComputeGeometry(TopoDS::Edge(myFShape),
@@ -552,7 +554,7 @@ void PrsDim_IdenticRelation::ComputeTwoLinesPresentation(const Handle(Prs3d_Pres
   }
   else {
     // Computation of the parameters of the 4 points on the line <thelin>
-    Standard_Real pf1, pf2, pl1, pl2;    
+    Standard_Real pf1 = NAN, pf2 = NAN, pl1 = NAN, pl2 = NAN;    
 
     pf1 = ElCLib::Parameter(thelin->Lin(), firstp1);
     pl1 = ElCLib::Parameter(thelin->Lin(), lastp1);
@@ -760,7 +762,7 @@ void PrsDim_IdenticRelation::ComputeTwoCirclesPresentation(const Handle(Prs3d_Pr
   else if ( !circ1complete && !circ2complete )
     {
       // We project all the points on the circle
-      Standard_Real pf1, pf2, pl1, pl2;
+      Standard_Real pf1 = NAN, pf2 = NAN, pl1 = NAN, pl2 = NAN;
       pf1 = ElCLib::Parameter(thecirc->Circ(), firstp1);
       pf2 = ElCLib::Parameter(thecirc->Circ(), firstp2);
       pl1 = ElCLib::Parameter(thecirc->Circ(), lastp1);
@@ -1115,7 +1117,7 @@ void PrsDim_IdenticRelation::ComputeTwoEllipsesPresentation(const Handle(Prs3d_P
   else if ( !circ1complete && !circ2complete )
     {
       // We project all the points on the circle
-      Standard_Real pf1, pf2, pl1, pl2;
+      Standard_Real pf1 = NAN, pf2 = NAN, pl1 = NAN, pl2 = NAN;
       pf1 = ElCLib::Parameter(theEll->Elips(), firstp1);
       pf2 = ElCLib::Parameter(theEll->Elips(), firstp2);
       pl1 = ElCLib::Parameter(theEll->Elips(), lastp1);
@@ -1407,7 +1409,7 @@ void PrsDim_IdenticRelation::ComputeNotAutoArcPresentation(const Handle(Geom_Ell
 //=======================================================================
 void PrsDim_IdenticRelation::ComputeTwoVerticesPresentation(const Handle(Prs3d_Presentation)& aPrs)
 {
-  Standard_Boolean isOnPlane1, isOnPlane2;
+  Standard_Boolean isOnPlane1 = 0, isOnPlane2 = 0;
   const TopoDS_Vertex& FVertex = TopoDS::Vertex(myFShape);
   const TopoDS_Vertex& SVertex = TopoDS::Vertex(mySShape);
   
@@ -1624,7 +1626,7 @@ void PrsDim_IdenticRelation::ComputeOneEdgeOVertexPresentation(const Handle(Prs3
 {
   TopoDS_Vertex V;
   TopoDS_Edge E;
-  Standard_Integer numedge;
+  Standard_Integer numedge = 0;
   
   if (myFShape.ShapeType() == TopAbs_VERTEX) {
     V = TopoDS::Vertex(myFShape);
@@ -1639,8 +1641,8 @@ void PrsDim_IdenticRelation::ComputeOneEdgeOVertexPresentation(const Handle(Prs3
   gp_Pnt ptonedge1,ptonedge2;
   Handle(Geom_Curve) aCurve;
   Handle(Geom_Curve) extCurv;
-  Standard_Boolean isInfinite;
-  Standard_Boolean isOnPlanEdge, isOnPlanVertex;
+  Standard_Boolean isInfinite = 0;
+  Standard_Boolean isOnPlanEdge = 0, isOnPlanVertex = 0;
   if (!PrsDim::ComputeGeometry(E,aCurve,ptonedge1,ptonedge2,extCurv,isInfinite,isOnPlanEdge,myPlane))
     return;
   aPrs->SetInfiniteState(isInfinite);
index e0bb95b055b391d4297a8df71791b64c2ecd1092..c3193ffa31eddfb77430f7d33192da0dd6d3ce6f 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_LengthDimension.hxx>
 
 #include <PrsDim.hxx>
@@ -531,7 +533,7 @@ Standard_Boolean PrsDim_LengthDimension::InitEdgeFaceLength (const TopoDS_Edge&
 
   // Take direction for dimension line (will be orthogonalized later) parallel to edge
   BRepAdaptor_Curve aCurveAdaptor (theEdge);
-  Standard_Real aParam;
+  Standard_Real aParam = NAN;
   if (aDistAdaptor.SupportOnShape1 (1).ShapeType() == TopAbs_EDGE)
   {
     aDistAdaptor.ParOnEdgeS1 (1, aParam);
@@ -582,7 +584,7 @@ Standard_Boolean PrsDim_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape
       gp_Pln aFirstPlane;
       Handle(Geom_Surface) aFirstSurface;
       PrsDim_KindOfSurface aFirstSurfKind;
-      Standard_Real aFirstOffset;
+      Standard_Real aFirstOffset = NAN;
 
       TopoDS_Face aFirstFace = TopoDS::Face (theFirstShape);
 
@@ -599,7 +601,7 @@ Standard_Boolean PrsDim_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape
         gp_Pln aSecondPlane;
         Handle(Geom_Surface) aSecondSurface;
         PrsDim_KindOfSurface aSecondSurfKind;
-        Standard_Real aSecondOffset;
+        Standard_Real aSecondOffset = NAN;
 
         TopoDS_Face aSecondFace = TopoDS::Face (theSecondShape);
 
@@ -630,7 +632,7 @@ Standard_Boolean PrsDim_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape
 
           mySecondPoint = PrsDim::ProjectPointOnPlane (myFirstPoint, aSecondPlane);
 
-          Standard_Real anU, aV;
+          Standard_Real anU = NAN, aV = NAN;
           ElSLib::Parameters (aSecondPlane, mySecondPoint, anU, aV);
 
           BRepTopAdaptor_FClass2d aClassifier (aSecondFace, Precision::Confusion());
@@ -650,8 +652,8 @@ Standard_Boolean PrsDim_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape
         }
         else // curvilinear faces
         {
-          Standard_Real aU1Min, aV1Min, aU1Max, aV1Max;
-          Standard_Real aU2Min, aV2Min, aU2Max, aV2Max;
+          Standard_Real aU1Min = NAN, aV1Min = NAN, aU1Max = NAN, aV1Max = NAN;
+          Standard_Real aU2Min = NAN, aV2Min = NAN, aU2Max = NAN, aV2Max = NAN;
           BRepTools::UVBounds (aFirstFace, aU1Min, aU1Max, aV1Min,  aV1Max);
           BRepTools::UVBounds (aSecondFace, aU2Min, aU2Max, aV2Min, aV2Max);
 
@@ -659,7 +661,7 @@ Standard_Boolean PrsDim_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape
                                                    aU1Min, aU1Max, aV1Min, aV1Max,
                                                    aU2Min, aU2Max, aV2Min, aV2Max);
 
-          Standard_Real aU1, aV1, aU2, aV2;
+          Standard_Real aU1 = NAN, aV1 = NAN, aU2 = NAN, aV2 = NAN;
           anExtrema.LowerDistanceParameters (aU1, aV1, aU2, aV2);
           myFirstPoint = BRep_Tool::Surface (aFirstFace)->Value (aU1, aV1);
           mySecondPoint = BRep_Tool::Surface (aSecondFace)->Value (aU2, aV2);
index dd4a46c334d24fe2471d837d63a6503223f69717..8537c0806fb51b54e2db45b62906fd8f28359fd4 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim.hxx>
 #include <PrsDim_MaxRadiusDimension.hxx>
 #include <BRepAdaptor_Curve.hxx>
@@ -116,7 +118,7 @@ void PrsDim_MaxRadiusDimension::ComputeEllipse(const Handle(Prs3d_Presentation)&
   }
   arr->SetLength(myArrowSize);
 
-  Standard_Real U;//,V;
+  Standard_Real U = NAN;//,V;
   gp_Pnt curPos, Center;
   Center = myEllipse.Location();
   if( myAutomaticPosition )
@@ -165,7 +167,7 @@ void PrsDim_MaxRadiusDimension::ComputeArcOfEllipse(const Handle(Prs3d_Presentat
   }
   arr->SetLength(myArrowSize);
   
-  Standard_Real par;
+  Standard_Real par = NAN;
   gp_Pnt curPos, Center;
   Center = myEllipse.Location();
   Standard_Boolean IsInDomain = Standard_True;
@@ -258,7 +260,7 @@ void PrsDim_MaxRadiusDimension::ComputeSelection(const Handle(SelectMgr_Selectio
        Standard_Real parEnd = ElCLib::Parameter ( myEllipse, myEndOfArrow );
        if(!PrsDim::InDomain(myFirstPar, myLastPar, parEnd))
          {
-           Standard_Real parStart, par;
+           Standard_Real parStart = NAN, par = NAN;
            if(PrsDim::DistanceFromApex (myEllipse, myEndOfArrow, myFirstPar) <
               PrsDim::DistanceFromApex (myEllipse, myEndOfArrow, myLastPar))
              par = myFirstPar;
index 74cec7d3bbc5091980a427cf741365b12dbc0783..dd53b798042e18f3c4a4b3f8c051073229ccc595 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_MidPointRelation.hxx>
 
 #include <PrsDim.hxx>
@@ -72,7 +74,7 @@ void PrsDim_MidPointRelation::Compute (const Handle(PrsMgr_PresentationManager)&
   if (myTool.ShapeType() == TopAbs_VERTEX)
     {
       gp_Pnt pp;
-      Standard_Boolean isonplane;
+      Standard_Boolean isonplane = 0;
       if ( PrsDim::ComputeGeometry(TopoDS::Vertex(myTool),pp,myPlane,isonplane) )
        {
          if ( !isonplane ) ComputeProjVertexPresentation(aprs,TopoDS::Vertex(myTool),pp);
@@ -163,7 +165,7 @@ void PrsDim_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)
 
   Handle(Geom_Curve) curv;
   gp_Pnt firstp,lastp;
-  Standard_Boolean isInfinite,isOnPlane;
+  Standard_Boolean isInfinite = 0,isOnPlane = 0;
   Handle(Geom_Curve) extCurv;
 
   // segment on first curve
@@ -260,7 +262,7 @@ void PrsDim_MidPointRelation::ComputeEdgeFromPnt(const Handle(Prs3d_Presentation
   Handle(Geom_Curve) geom;
   gp_Pnt ptat1,ptat2;
   Handle(Geom_Curve) extCurv;
-  Standard_Boolean isInfinite,isOnPlane;
+  Standard_Boolean isInfinite = 0,isOnPlane = 0;
   if ( !PrsDim::ComputeGeometry(E, geom, ptat1, ptat2, extCurv, isInfinite, isOnPlane, myPlane) ) return;
 
   gp_Ax2 ax = myPlane->Pln().Position().Ax2();
@@ -314,7 +316,7 @@ void PrsDim_MidPointRelation::ComputeVertexFromPnt(const Handle(Prs3d_Presentati
   gp_Ax2 ax = myPlane->Pln().Position().Ax2();
   if ( first )
     {
-      Standard_Boolean isOnPlane;
+      Standard_Boolean isOnPlane = 0;
       TopoDS_Vertex V = TopoDS::Vertex(myFShape);
       PrsDim::ComputeGeometry(V, myFAttach, myPlane, isOnPlane);
       DsgPrs_MidPointPresentation::Add(aprs,myDrawer,ax,myMidPoint,myPosition,myFAttach,first);
@@ -322,7 +324,7 @@ void PrsDim_MidPointRelation::ComputeVertexFromPnt(const Handle(Prs3d_Presentati
     }
   else
     {
-      Standard_Boolean isOnPlane;
+      Standard_Boolean isOnPlane = 0;
       TopoDS_Vertex V = TopoDS::Vertex(mySShape);
       PrsDim::ComputeGeometry(V, mySAttach, myPlane, isOnPlane);
       DsgPrs_MidPointPresentation::Add(aprs,myDrawer,ax,myMidPoint,myPosition,mySAttach,first);
@@ -454,10 +456,10 @@ void PrsDim_MidPointRelation::ComputePointsOnCirc(const gp_Circ& aCirc,
   Standard_Real pcurpos = ElCLib::Parameter(aCirc,curpos);
 
   Standard_Real rad = M_PI / 5.0;
-  Standard_Real segm;
+  Standard_Real segm = NAN;
 
-  Standard_Real pFPnt;
-  Standard_Real pSPnt;
+  Standard_Real pFPnt = NAN;
+  Standard_Real pSPnt = NAN;
 
   if ( pnt1.IsEqual(pnt2,confusion) ) // full circle
     {
@@ -581,10 +583,10 @@ void PrsDim_MidPointRelation::ComputePointsOnElips(const gp_Elips& anEll,
   Standard_Real pcurpos = ElCLib::Parameter(anEll,curpos);
 
   Standard_Real rad = M_PI / 5.0;
-  Standard_Real segm;
+  Standard_Real segm = NAN;
 
-  Standard_Real pFPnt;
-  Standard_Real pSPnt;
+  Standard_Real pFPnt = NAN;
+  Standard_Real pSPnt = NAN;
 
   if ( pnt1.IsEqual(pnt2,confusion) ) // full circle
     {
index 85a0398439b0f259eea45820695a5c6cbd29a6bf..c5b6fc3f0fcd386314452034568c85b5cc9fba8f 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_MinRadiusDimension.hxx>
 
 #include <PrsDim.hxx>
@@ -119,7 +121,7 @@ void PrsDim_MinRadiusDimension::ComputeEllipse(const Handle(Prs3d_Presentation)&
   }
   arr->SetLength(myArrowSize);
 
-  Standard_Real U;//,V;
+  Standard_Real U = NAN;//,V;
   gp_Pnt curPos, Center;
   Center = myEllipse.Location();
   if( myAutomaticPosition )
@@ -169,7 +171,7 @@ void PrsDim_MinRadiusDimension::ComputeArcOfEllipse(const Handle(Prs3d_Presentat
   }
   arr->SetLength(myArrowSize);
   
-  Standard_Real par;
+  Standard_Real par = NAN;
   gp_Pnt curPos, Center;
   Center = myEllipse.Location();
   Standard_Boolean IsInDomain = Standard_True;
@@ -263,7 +265,7 @@ void PrsDim_MinRadiusDimension::ComputeSelection(const Handle(SelectMgr_Selectio
        Standard_Real parEnd = ElCLib::Parameter ( myEllipse, myEndOfArrow );
        if(!PrsDim::InDomain(myFirstPar, myLastPar, parEnd))
          {
-           Standard_Real parStart, par;
+           Standard_Real parStart = NAN, par = NAN;
            if(PrsDim::DistanceFromApex (myEllipse, myEndOfArrow, myFirstPar) <
               PrsDim::DistanceFromApex (myEllipse, myEndOfArrow, myLastPar))
              par = myFirstPar;
index 3a4ba3ad98ea39d070c2db5fee26a5dfa8aae542..98fba09271f4340a2a68bc4ca7f111c0d7ff63ee 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_OffsetDimension.hxx>
 
 #include <PrsDim.hxx>
@@ -111,7 +113,7 @@ void PrsDim_OffsetDimension::Compute (const Handle(PrsMgr_PresentationManager)&
     
     gp_Pln bPln = surf2.Plane();
     
-    Standard_Real uPnt, vPnt;
+    Standard_Real uPnt = NAN, vPnt = NAN;
     ElSLib::Parameters (bPln , aPnt , uPnt, vPnt);
     gp_Pnt bPnt = ElSLib::Value (uPnt, vPnt, bPln);
     if (aPnt.IsEqual(bPnt,Precision::Confusion())) {
@@ -175,7 +177,7 @@ void PrsDim_OffsetDimension::ComputeSelection(const Handle(SelectMgr_Selection)&
     aSel->Add(box);
   }
 
-  Standard_Real parmin,parmax,parcur;
+  Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
   parmin = ElCLib::Parameter(L3,Proj1);
   parmax = parmin;
 
@@ -360,7 +362,7 @@ void PrsDim_OffsetDimension::ComputeTwoFacesOffset(const Handle(Prs3d_Presentati
   else {
     if (myAutomaticPosition && myIsSetBndBox)
       {
-       Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+       Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN;
        myBndBox.Get( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );
        myPosition.SetCoord( aXmax, aYmax, aZmax );
       }
@@ -391,7 +393,7 @@ void PrsDim_OffsetDimension::ComputeTwoFacesOffset(const Handle(Prs3d_Presentati
   gp_Pln apln (anax3);
   
   //gp_Pnt proj2;
-  Standard_Real u2,v2, uatt, vatt;
+  Standard_Real u2 = NAN,v2 = NAN, uatt = NAN, vatt = NAN;
   ElSLib::Parameters (apln , mySAttach, uatt,vatt);
   ElSLib::Parameters (apln , curpos   , u2,v2);
   
index e5aa1e995fa8051b83f56d33274b76eab21a3cf1..d4e4f4da746668800e50bace0fa4de978d820d3b 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_ParallelRelation.hxx>
 
 #include <PrsDim.hxx>
@@ -140,7 +142,7 @@ void PrsDim_ParallelRelation::ComputeSelection(const Handle(SelectMgr_Selection)
                                  myPosition.Z()+size);
       aSelection->Add(box);
     }
-  Standard_Real parmin,parmax,parcur;
+  Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
   parmin = ElCLib::Parameter(L3,Proj1);
   parmax = parmin;
   
@@ -196,7 +198,7 @@ void PrsDim_ParallelRelation::ComputeTwoEdgesParallel(const Handle(Prs3d_Present
 
   gp_Pnt ptat11,ptat12,ptat21,ptat22;//,pint3d;
   Handle(Geom_Curve) geom1,geom2;
-  Standard_Boolean isInfinite1,isInfinite2;
+  Standard_Boolean isInfinite1 = 0,isInfinite2 = 0;
   Handle(Geom_Curve) extCurv;
   if (!PrsDim::ComputeGeometry(E1,E2,myExtShape,
                            geom1,geom2,
index 0161b5d4e972e4d71475aff63dd5be9f50c20276..1ae039613340dc6dd179b9ffab32dd924df04fe9 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_PerpendicularRelation.hxx>
 
 #include <PrsDim.hxx>
@@ -164,7 +166,7 @@ void PrsDim_PerpendicularRelation::ComputeTwoEdgesPerpendicular(const Handle(Prs
   // 3d lines
   Handle(Geom_Curve) geom1,geom2;
   gp_Pnt pint3d,p1,p2,pAx1,pAx2,ptat11,ptat12,ptat21,ptat22;
-  Standard_Boolean isInfinite1,isInfinite2;
+  Standard_Boolean isInfinite1 = 0,isInfinite2 = 0;
   Handle(Geom_Curve) extCurv;
   if ( !PrsDim::ComputeGeometry(TopoDS::Edge(myFShape),TopoDS::Edge(mySShape),
                            myExtShape,
@@ -218,8 +220,7 @@ void PrsDim_PerpendicularRelation::ComputeTwoEdgesPerpendicular(const Handle(Prs
 
   // current face
   BRepBuilderAPI_MakeFace makeface (myPlane->Pln());
-  TopoDS_Face face (makeface.Face());  
-  BRepAdaptor_Surface adp (makeface.Face());
+   BRepAdaptor_Surface adp (makeface.Face());
   
   // 2d lines => projection of 3d on current plane
   Handle(Geom2d_Curve) aGeom2dCurve = GeomAPI::To2d(geom_lin1,myPlane->Pln());
@@ -235,7 +236,7 @@ void PrsDim_PerpendicularRelation::ComputeTwoEdgesPerpendicular(const Handle(Prs
 
   myPosition = pint3d;
   // recherche points attache
-  Standard_Real par1,par2,curpar,pmin,pmax;//,dist,sign;
+  Standard_Real par1 = NAN,par2 = NAN,curpar = NAN,pmin = NAN,pmax = NAN;//,dist,sign;
   Standard_Real length(0.);
   
   if ( isInfinite1 && isInfinite2 )
index d2726741f572f0a776eee21f30150e8e8704e9d9..f01d44977705f6620f230c9e2bcd4a4d32c01dbc 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_Relation.hxx>
 
 #include <PrsDim.hxx>
@@ -86,10 +88,10 @@ void PrsDim_Relation::ComputeProjEdgePresentation(const Handle(Prs3d_Presentatio
     li->SetWidth(width);
   }
 
-  Standard_Real pf, pl;
+  Standard_Real pf = NAN, pl = NAN;
   TopLoc_Location loc;
   Handle(Geom_Curve) curve;
-  Standard_Boolean isInfinite;
+  Standard_Boolean isInfinite = 0;
   curve = BRep_Tool::Curve(anEdge,loc,pf,pl);
   isInfinite = (Precision::IsInfinite(pf) || Precision::IsInfinite(pl));
 
index 252d3df14495134dc5cbab0f4feccbdb0e7f5bdb..b28dac66b81305286ba708de7a392d2978f0aede 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <PrsDim_SymmetricRelation.hxx>
 
 #include <PrsDim.hxx>
@@ -93,7 +95,7 @@ void PrsDim_SymmetricRelation::Compute (const Handle(PrsMgr_PresentationManager)
   if (myTool.ShapeType() == TopAbs_EDGE) {
     Handle(Geom_Curve) aCurve,extcurve;
     gp_Pnt p1,p2;
-    Standard_Boolean isinfinite,isonplane;
+    Standard_Boolean isinfinite = 0,isonplane = 0;
     if (PrsDim::ComputeGeometry(TopoDS::Edge(myTool),
                             aCurve,p1,p2,
                             extcurve,
@@ -122,11 +124,11 @@ void PrsDim_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection
 {
   Handle(Select3D_SensitiveSegment) seg;
   Handle(SelectMgr_EntityOwner) own = new SelectMgr_EntityOwner(this,7);
-  Standard_Real F,L;
+  Standard_Real F = NAN,L = NAN;
 
   Handle(Geom_Curve) geom_axis, extcurve;
   gp_Pnt p1,p2;
-  Standard_Boolean isinfinite,isonplane;
+  Standard_Boolean isinfinite = 0,isonplane = 0;
   if (!PrsDim::ComputeGeometry(TopoDS::Edge(myTool),
                            geom_axis,p1,p2,
                            extcurve,
@@ -173,7 +175,7 @@ void PrsDim_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection
                                    myPosition.Z()+size);
        aSel->Add(box);
       }
-      Standard_Real parmin,parmax,parcur;
+      Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
       parmin = ElCLib::Parameter(L3,P1);
       parmax = parmin;
       
@@ -220,7 +222,7 @@ void PrsDim_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection
     gp_Pnt ProjCenter1     = ElCLib::Value(ElCLib::Parameter(laxis,Center1),laxis);
     gp_Vec Vp(ProjCenter1,Center1);
     if (Vp.Magnitude() <= Precision::Confusion()) Vp = gp_Vec(laxis.Direction())^myPlane->Pln().Position().Direction();
-    Standard_Real Dt,R,h;
+    Standard_Real Dt = NAN,R = NAN,h = NAN;
     Dt = ProjCenter1.Distance(ProjOffsetPoint);
     R  = circ1.Radius();
     if (Dt > .999*R) {
@@ -251,7 +253,7 @@ void PrsDim_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection
                                  myPosition.Z()+size);
       aSel->Add(box);
     }
-    Standard_Real parmin,parmax,parcur;
+    Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
     parmin = ElCLib::Parameter(L3,P1);
     parmax = parmin;
     
@@ -304,7 +306,7 @@ void PrsDim_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection
                                    myPosition.Z()+size);
        aSel->Add(box);
       }
-      Standard_Real parmin,parmax,parcur;
+      Standard_Real parmin = NAN,parmax = NAN,parcur = NAN;
       parmin = ElCLib::Parameter(L3,P1);
       parmax = parmin;
       
@@ -356,7 +358,7 @@ void PrsDim_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Prese
 //  gp_Pnt pint3d,ptat11,ptat12,ptat21,ptat22;
   gp_Pnt ptat11,ptat12,ptat21,ptat22;
   Handle(Geom_Curve) geom1,geom2;
-  Standard_Boolean isInfinite1,isInfinite2;
+  Standard_Boolean isInfinite1 = 0,isInfinite2 = 0;
   Handle(Geom_Curve) extCurv;
   if (!PrsDim::ComputeGeometry(TopoDS::Edge(myFShape),
                            TopoDS::Edge(mySShape),
@@ -375,7 +377,7 @@ void PrsDim_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Prese
   aprs->SetInfiniteState((isInfinite1 || isInfinite2) && (myExtShape !=0));
   Handle(Geom_Curve) geom_axis,extcurve;
   gp_Pnt p1,p2;
-  Standard_Boolean isinfinite,isonplane;
+  Standard_Boolean isinfinite = 0,isonplane = 0;
   if (!PrsDim::ComputeGeometry(TopoDS::Edge(myTool),
                            geom_axis,p1,p2,
                            extcurve,
@@ -552,7 +554,7 @@ void PrsDim_SymmetricRelation::ComputeTwoVerticesSymmetric(const Handle(Prs3d_Pr
   if(myFShape.ShapeType() != TopAbs_VERTEX || mySShape.ShapeType() != TopAbs_VERTEX) return;
   Handle(Geom_Curve) geom_axis,extcurve;
   gp_Pnt p1,p2;
-  Standard_Boolean isinfinite,isonplane;
+  Standard_Boolean isinfinite = 0,isonplane = 0;
   if (!PrsDim::ComputeGeometry(TopoDS::Edge(myTool),
                            geom_axis,p1,p2,
                            extcurve,
@@ -560,7 +562,7 @@ void PrsDim_SymmetricRelation::ComputeTwoVerticesSymmetric(const Handle(Prs3d_Pr
                            isonplane,
                            myPlane)) return;
 
-  Standard_Boolean isOnPlane1, isOnPlane2;
+  Standard_Boolean isOnPlane1 = 0, isOnPlane2 = 0;
 
   PrsDim::ComputeGeometry(TopoDS::Vertex(myFShape), myFAttach, myPlane, isOnPlane1);
   PrsDim::ComputeGeometry(TopoDS::Vertex(mySShape), mySAttach, myPlane, isOnPlane2);
index 756ee39b45c77d742ee80ff2e8f703ccf77bc464..d7ebaf1ab7a21d6b92484cf5d876f0d781eedc0b 100644 (file)
@@ -196,7 +196,7 @@ void PrsDim_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentat
 {
   Handle(Geom_Curve) copy1,copy2;
   gp_Pnt ptat11,ptat12,ptat21,ptat22;
-  Standard_Boolean isInfinite1,isInfinite2;
+  Standard_Boolean isInfinite1 = 0,isInfinite2 = 0;
   Handle(Geom_Curve) extCurv;
   if (!PrsDim::ComputeGeometry(TopoDS::Edge(myFShape),
                            TopoDS::Edge(mySShape),
@@ -217,8 +217,7 @@ void PrsDim_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentat
   aPresentation->SetInfiniteState(isInfinite1 || isInfinite2);
   // current face  
   BRepBuilderAPI_MakeFace makeface(myPlane->Pln());
-  TopoDS_Face face(makeface.Face());  
-  BRepAdaptor_Surface adp(makeface.Face());
+   BRepAdaptor_Surface adp(makeface.Face());
     
   Standard_Integer typArg(0);
   
@@ -255,7 +254,7 @@ void PrsDim_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentat
   TopExp_Explorer expF(TopoDS::Edge(myFShape),TopAbs_VERTEX);
   TopExp_Explorer expS(TopoDS::Edge(mySShape),TopAbs_VERTEX);
   TopoDS_Shape tab[2];
-  Standard_Integer p ;
+  Standard_Integer p = 0 ;
   for (p = 0; expF.More(); expF.Next(),p++)
     {
       tab[p] = TopoDS::Vertex(expF.Current());
index b4eb92c4b29bea9b2b1e1d56a43790226ba51dd9..d86cd31fe01833667cf24b9d33d5a6341056d059 100644 (file)
@@ -70,7 +70,7 @@ private:
 
   gp_Pnt myAttach;
   gp_Dir myDir;
-  Standard_Real myLength;
+  Standard_Real myLength{};
   Standard_Integer myExternRef;
 
 };
index 3cb38867de921ec0dca51efbf21d21a51bb0918c..b723891b86eb805c4a092ef281cb6d1abba38d5d 100644 (file)
@@ -346,7 +346,7 @@ void PrsMgr_PresentableObject::SetTransformPersistence (const Handle(Graphic3d_T
 //=======================================================================
 void PrsMgr_PresentableObject::AddChild (const Handle(PrsMgr_PresentableObject)& theObject)
 {
-  Handle(PrsMgr_PresentableObject) aHandleGuard = theObject;
+  const Handle(PrsMgr_PresentableObject)& aHandleGuard = theObject;
   if (theObject->myParent != NULL)
   {
     theObject->myParent->RemoveChild (aHandleGuard);
index 114620bb4e5bd141e256d613eb6032f5d3618462..ad3b89f0e874fed27460b64590ffc2133a205648 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Quantity_Color.hxx>
 
 #include <Quantity_ColorRGBA.hxx>
@@ -309,7 +311,7 @@ void Quantity_Color::Delta (const Quantity_Color& theColor,
 Standard_Real Quantity_Color::DeltaE2000 (const Quantity_Color& theOther) const
 {
   // get color components in CIE Lch space
-  Standard_Real aL1, aL2, aa1, aa2, ab1, ab2;
+  Standard_Real aL1 = NAN, aL2 = NAN, aa1 = NAN, aa2 = NAN, ab1 = NAN, ab2 = NAN;
   this   ->Values (aL1, aa1, ab1, Quantity_TOC_CIELab);
   theOther.Values (aL2, aa2, ab2, Quantity_TOC_CIELab);
 
@@ -682,7 +684,7 @@ void Quantity_Color::DumpJson (Standard_OStream& theOStream, Standard_Integer) c
 Standard_Boolean Quantity_Color::InitFromJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
 {
   Standard_Integer aPos = theStreamPos;
-  Standard_Real  aRed, aGreen, aBlue;
+  Standard_Real  aRed = NAN, aGreen = NAN, aBlue = NAN;
   OCCT_INIT_VECTOR_CLASS (Standard_Dump::Text (theSStream), "RGB", aPos, 3, &aRed, &aGreen, &aBlue)
 
   SetValues ((Standard_ShortReal)aRed, (Standard_ShortReal)aGreen, (Standard_ShortReal)aBlue, Quantity_TOC_RGB);
index 908135c990c05262f424b9eb0bc8aa53b0a9efa9..82fd880746ab1e036d914ed70fb24701c8b93082 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Quantity_ColorRGBA.hxx>
 
 #include <NCollection_Vec4.hxx>
@@ -160,7 +162,7 @@ bool Quantity_ColorRGBA::ColorFromHex (const char* const   theHexColorString,
     return false;
   }
 
-  ColorInteger aHexColorInteger;
+  ColorInteger aHexColorInteger = 0;
   if (!convertStringToInteger (aHexColorString, aHexColorInteger, 16u))
   {
     return false;
@@ -217,7 +219,7 @@ Standard_Boolean Quantity_ColorRGBA::InitFromJson (const Standard_SStream& theSS
 {
   Standard_Integer aPos = theStreamPos;
 
-  Standard_Real aRed, aGreen, aBlue, anAlpha;
+  Standard_Real aRed = NAN, aGreen = NAN, aBlue = NAN, anAlpha = NAN;
   OCCT_INIT_VECTOR_CLASS (Standard_Dump::Text (theSStream), "RGBA", aPos, 4, &aRed, &aGreen, &aBlue, &anAlpha)
 
   SetValues ((Standard_ShortReal)aRed, (Standard_ShortReal)aGreen, (Standard_ShortReal)aBlue, (Standard_ShortReal)anAlpha);
index ab1f5addd3cb0659e9366f6c289236cb0456e4c0..7db075c6225f426a123716961005bb94f8cb9f10 100644 (file)
@@ -124,7 +124,7 @@ void Quantity_Date::SetValues(const Standard_Integer mm,
                            const Standard_Integer mis,
                            const Standard_Integer mics){
 
-Standard_Integer i;
+Standard_Integer i = 0;
 
 if ( ! Quantity_Date::IsValid (mm,dd,yy,hh,mn,ss,mis,mics))
    throw Quantity_DateDefinitionError("Quantity_Date::Quantity_Date invalid parameters");
@@ -174,7 +174,7 @@ void Quantity_Date::Values(Standard_Integer& mm,
                            Standard_Integer& mics)const{
 
 
-Standard_Integer i,carry;
+Standard_Integer i = 0,carry = 0;
 
 
 for(yy = 1979, carry = mySec ;; yy++) {
@@ -229,7 +229,7 @@ mics = myUSec - ( mis * 1000);
 
 Quantity_Period Quantity_Date::Difference(const Quantity_Date& OtherDate){
 
-Standard_Integer i1,i2;
+Standard_Integer i1 = 0,i2 = 0;
 
 if (mySec == 0 && myUSec == 0)
      {
@@ -270,7 +270,7 @@ return (result);
 
 Quantity_Date Quantity_Date::Subtract(const Quantity_Period& During){
 
-Standard_Integer ss,mics;
+Standard_Integer ss = 0,mics = 0;
 Quantity_Date result;
 result.mySec  = mySec;
 result.myUSec = myUSec;
@@ -317,7 +317,7 @@ return (result);
 // ~~~~
 // ----------------------------------------------------------------------
 Standard_Integer Quantity_Date::Year(){
-Standard_Integer dummy, year;
+Standard_Integer dummy = 0, year = 0;
  Values(dummy, dummy, year, dummy, dummy, dummy, dummy, dummy);
  return (year);
 }
@@ -328,7 +328,7 @@ Standard_Integer dummy, year;
 // ~~~~~
 // ----------------------------------------------------------------------
 Standard_Integer Quantity_Date::Month(){
-Standard_Integer dummy, month;
+Standard_Integer dummy = 0, month = 0;
  Values(month, dummy, dummy, dummy, dummy, dummy, dummy, dummy);
  return(month); 
 }
@@ -339,7 +339,7 @@ Standard_Integer dummy, month;
 // ----------------------------------------------------------------------
 
 Standard_Integer Quantity_Date::Day(){
-Standard_Integer dummy, day;
+Standard_Integer dummy = 0, day = 0;
  Values(dummy, day, dummy, dummy, dummy, dummy, dummy, dummy);
  return(day);
 }
@@ -350,7 +350,7 @@ Standard_Integer dummy, day;
 // ----------------------------------------------------------------------
 
 Standard_Integer Quantity_Date::Hour(){
-Standard_Integer dummy, hour;
+Standard_Integer dummy = 0, hour = 0;
  Values(dummy, dummy, dummy, hour, dummy, dummy, dummy, dummy);
  return(hour);
 }
@@ -361,7 +361,7 @@ Standard_Integer dummy, hour;
 // ----------------------------------------------------------------------
 
 Standard_Integer Quantity_Date::Minute(){
-Standard_Integer dummy, min;
+Standard_Integer dummy = 0, min = 0;
  Values(dummy, dummy, dummy, dummy, min, dummy, dummy, dummy);
  return(min);
 }
@@ -372,7 +372,7 @@ Standard_Integer dummy, min;
 // ----------------------------------------------------------------------
 
 Standard_Integer Quantity_Date::Second(){
-Standard_Integer dummy, sec;
+Standard_Integer dummy = 0, sec = 0;
  Values(dummy, dummy, dummy, dummy, dummy, sec , dummy, dummy);
  return(sec);
 }
@@ -383,7 +383,7 @@ Standard_Integer dummy, sec;
 // ----------------------------------------------------------------------
 
 Standard_Integer Quantity_Date::MilliSecond(){
-Standard_Integer dummy, msec;
+Standard_Integer dummy = 0, msec = 0;
  Values(dummy, dummy, dummy, dummy, dummy, dummy, msec, dummy);
 return(msec);
 }
@@ -394,7 +394,7 @@ return(msec);
 // ----------------------------------------------------------------------
 
 Standard_Integer Quantity_Date::MicroSecond(){
-Standard_Integer dummy, msec;
+Standard_Integer dummy = 0, msec = 0;
  Values(dummy, dummy, dummy, dummy, dummy, dummy, dummy, msec);
 return(msec);
 }
index 0e0ee524784567eaf01d5e0175c86be26a8d7cc1..d5bc7d36a9fa69603332045546bcb3a496791d86 100644 (file)
@@ -179,8 +179,8 @@ Standard_Boolean operator > (const Quantity_Date& anOther) const
 
 private:
 
-  Standard_Integer mySec;
-  Standard_Integer myUSec;
+  Standard_Integer mySec{};
+  Standard_Integer myUSec{};
 
 };
 
index 7a0f006d7167f04e62a5a2acdde79b1b7812c3df..45740c526ccd6b7dca9a491f7a55d1b626c3b1cb 100644 (file)
@@ -137,8 +137,8 @@ Standard_Boolean operator > (const Quantity_Period& anOther) const
 
 private:
 
-  Standard_Integer mySec;
-  Standard_Integer myUSec;
+  Standard_Integer mySec{};
+  Standard_Integer myUSec{};
 
 };
 
index e50e9426dcee29b22b7b6cce27f2df45ddc94239..758ab2942ee7a56ec0bb3fc0c8b1152a18963c23 100644 (file)
@@ -107,7 +107,7 @@ public:
 protected:
 
   //! Load primitive array.
-  virtual Handle(Poly_Triangulation) loadData (const Handle(RWGltf_GltfLatePrimitiveArray)& theLateData,
+  Handle(Poly_Triangulation) loadData (const Handle(RWGltf_GltfLatePrimitiveArray)& theLateData,
                                                int theThreadIndex) const Standard_OVERRIDE
   {
     GltfReaderTLS& aTlsData = myTlsData.ChangeValue (theThreadIndex);
@@ -152,7 +152,7 @@ public:
 protected:
 
   //! Load primitive array.
-  virtual Handle(Poly_Triangulation) loadData (const Handle(RWGltf_GltfLatePrimitiveArray)& theLateData,
+  Handle(Poly_Triangulation) loadData (const Handle(RWGltf_GltfLatePrimitiveArray)& theLateData,
                                                int theThreadIndex) const Standard_OVERRIDE
   {
     (void )theThreadIndex;
index 28ce153cbcdb3e67ba75c393263cee56a51dc3bb..e4a0296151bb084a6ce3e7f22cb92897c2325ee5 100644 (file)
@@ -40,9 +40,9 @@ RWGltf_ConfigurationNode::RWGltf_ConfigurationNode() :
 // purpose  :
 //=======================================================================
 RWGltf_ConfigurationNode::RWGltf_ConfigurationNode(const Handle(RWGltf_ConfigurationNode)& theNode)
-  :DE_ConfigurationNode(theNode)
+  :DE_ConfigurationNode(theNode), InternalParameters(theNode->InternalParameters)
 {
-  InternalParameters = theNode->InternalParameters;
+  
 }
 
 //=======================================================================
index f8a9436c7edacd4192859242534e23e68f1631ed..1331011aeb5ba336e82117c6d84275e23863dcf3 100644 (file)
@@ -26,7 +26,7 @@ namespace
   // function : SetReaderParameters
   // purpose  :
   //=======================================================================
-  static void SetReaderParameters(RWGltf_CafReader& theReader, const Handle(RWGltf_ConfigurationNode) theNode)
+  static void SetReaderParameters(RWGltf_CafReader& theReader, const Handle(RWGltf_ConfigurationNode)& theNode)
   {
     theReader.SetDoublePrecision(!theNode->InternalParameters.ReadSinglePrecision);
     theReader.SetSystemLengthUnit(theNode->GlobalParameters.LengthUnit / 1000);
index a49e6867c36da72137aea2b9c6162f3616042487..72464c7ea7610d77319f85d7d886c301f7046073 100644 (file)
@@ -61,7 +61,7 @@ void RWHeaderSection_GeneralModule::CopyCase(const Standard_Integer CN, const Ha
   switch (CN) {
 
     case 1 : {
-      Standard_Integer i;
+      Standard_Integer i = 0;
       DeclareAndCast(HeaderSection_FileName,enfr,entfrom);
       DeclareAndCast(HeaderSection_FileName,ento,entto);
       Handle(TCollection_HAsciiString) name =
@@ -89,7 +89,7 @@ void RWHeaderSection_GeneralModule::CopyCase(const Standard_Integer CN, const Ha
     break;
 
     case 2 : {
-      Standard_Integer i;
+      Standard_Integer i = 0;
       DeclareAndCast(HeaderSection_FileDescription,enfr,entfrom);
       DeclareAndCast(HeaderSection_FileDescription,ento,entto);
       Standard_Integer nbd = enfr->NbDescription();
@@ -104,7 +104,7 @@ void RWHeaderSection_GeneralModule::CopyCase(const Standard_Integer CN, const Ha
     break;
 
     case 3 : {
-      Standard_Integer i;
+      Standard_Integer i = 0;
       DeclareAndCast(HeaderSection_FileSchema,enfr,entfrom);
       DeclareAndCast(HeaderSection_FileSchema,ento,entto);
       Standard_Integer nbs = enfr->NbSchemaIdentifiers();
index ce21bc82dfdc382968f909f97e7baabd10bfef03..53b9daab7ba839b6f3d12eda13a4ed748ef4e641 100644 (file)
@@ -46,7 +46,7 @@ void RWHeaderSection_RWFileName::ReadStep
 
        Handle(Interface_HArray1OfHAsciiString) aAuthor;
        Handle(TCollection_HAsciiString) aAuthorItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        nsub3 = data->SubListNumber(num, 3, Standard_False);
        if (nsub3 !=0) {
          Standard_Integer nb3 = data->NbParams(nsub3);
@@ -65,7 +65,7 @@ void RWHeaderSection_RWFileName::ReadStep
 
        Handle(Interface_HArray1OfHAsciiString) aOrganization;
        Handle(TCollection_HAsciiString) aOrganizationItem;
-       Standard_Integer nsub4;
+       Standard_Integer nsub4 = 0;
        nsub4 = data->SubListNumber(num, 4, Standard_False);
        if (nsub4 !=0) {
          Standard_Integer nb4 = data->NbParams(nsub4);
index 4c2422a23bcc3023654ba85d1a49737642456d4b..58bdafaef53111e7993ae02f36c885b8c4a38e15 100644 (file)
@@ -36,7 +36,7 @@ void RWHeaderSection_RWFileSchema::ReadStep
 
        Handle(Interface_HArray1OfHAsciiString) aSchemaIdentifiers;
        Handle(TCollection_HAsciiString) aSchemaIdentifiersItem;
-       Standard_Integer nsub1;
+       Standard_Integer nsub1 = 0;
        nsub1 = data->SubListNumber(num, 1, Standard_False);
        if (nsub1 !=0) {
          Standard_Integer nb1 = data->NbParams(nsub1);
index 94b6b1d4d823798978b90e42ddf75c96bffc9946..8042a1ff234bbc369987606b96889893d9fe83c0 100644 (file)
@@ -40,9 +40,9 @@ RWObj_ConfigurationNode::RWObj_ConfigurationNode() :
 // purpose  :
 //=======================================================================
 RWObj_ConfigurationNode::RWObj_ConfigurationNode(const Handle(RWObj_ConfigurationNode)& theNode)
-  :DE_ConfigurationNode(theNode)
+  :DE_ConfigurationNode(theNode), InternalParameters(theNode->InternalParameters)
 {
-  InternalParameters = theNode->InternalParameters;
+  
 }
 
 //=======================================================================
index fb978975f6215b5fce7e79e834bb5f9be485ec1b..bc593b7810dd32b18231593d1aba44dfdee4bf94 100644 (file)
@@ -34,9 +34,9 @@ RWPly_ConfigurationNode::RWPly_ConfigurationNode() :
 // purpose  :
 //=======================================================================
 RWPly_ConfigurationNode::RWPly_ConfigurationNode(const Handle(RWPly_ConfigurationNode)& theNode)
-  :DE_ConfigurationNode(theNode)
+  :DE_ConfigurationNode(theNode), InternalParameters(theNode->InternalParameters)
 {
-  InternalParameters = theNode->InternalParameters;
+  
 }
 
 //=======================================================================
index 6f2b4326525a38caa34b5583644dfb5fbafbd3f3..2a035dae8406f5bcdde07acc32028bb7a2f39eaf 100644 (file)
@@ -45,7 +45,7 @@ void RWStepAP214_RWAppliedApprovalAssignment::ReadStep
   
   Handle(StepAP214_HArray1OfApprovalItem) aItems;
   StepAP214_ApprovalItem aItemsItem;
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,2,"items",ach,nsub2)) {
     Standard_Integer nb2 = data->NbParams(nsub2);
     aItems = new StepAP214_HArray1OfApprovalItem (1, nb2);
index d6bce424a04163a4a58e81eb275bcf5fc275986e..4231d32f36bb50cbb1abdd10a07da48cbb0cfd0a 100644 (file)
@@ -52,7 +52,7 @@ void RWStepAP214_RWAppliedDateAndTimeAssignment::ReadStep
   
   Handle(StepAP214_HArray1OfDateAndTimeItem) aItems;
   StepAP214_DateAndTimeItem aItemsItem;
-  Standard_Integer nsub3;
+  Standard_Integer nsub3 = 0;
   if (data->ReadSubList(num,3,"items",ach,nsub3)) {
     Standard_Integer nb3 = data->NbParams(nsub3);
     aItems = new StepAP214_HArray1OfDateAndTimeItem (1, nb3);
index 82c9de1e9dda899427c276472edcbc45d1761007..56f7c00688b978d621329e5422f0b9b9ae72dcd0 100644 (file)
@@ -51,7 +51,7 @@ void RWStepAP214_RWAppliedDateAssignment::ReadStep
 
   Handle(StepAP214_HArray1OfDateItem) aItems;
   StepAP214_DateItem aItemsItem;
-  Standard_Integer nsub3;
+  Standard_Integer nsub3 = 0;
   if (data->ReadSubList(num,3,"items",ach,nsub3)) {
     Standard_Integer nb3 = data->NbParams(nsub3);
     aItems = new StepAP214_HArray1OfDateItem (1, nb3);
index 216bd47e0822f0f78526604ed7f40efb3ae3b975..5fbec809fe59751b14de7380ce5a8339510bec93 100644 (file)
@@ -51,7 +51,7 @@ void  RWStepAP214_RWAppliedDocumentReference::ReadStep
   
   Handle(StepAP214_HArray1OfDocumentReferenceItem) aItems;
   StepAP214_DocumentReferenceItem anItem;
-  Standard_Integer nsub3;
+  Standard_Integer nsub3 = 0;
   if (data->ReadSubList (num,3,"items",ach,nsub3)) {
     Standard_Integer nb3 = data->NbParams(nsub3);
     aItems = new StepAP214_HArray1OfDocumentReferenceItem (1, nb3);
index 212a144c17e6a4005fe8083dd929003b401500fb..7f86732e77501a222463083ad7285088104676f8 100644 (file)
@@ -51,7 +51,7 @@ void RWStepAP214_RWAppliedOrganizationAssignment::ReadStep
 
   Handle(StepAP214_HArray1OfOrganizationItem) aItems;
   StepAP214_OrganizationItem aItemsItem;
-  Standard_Integer nsub3;
+  Standard_Integer nsub3 = 0;
   if (data->ReadSubList (num,3,"items",ach,nsub3)) {
     Standard_Integer nb3 = data->NbParams(nsub3);
     aItems = new StepAP214_HArray1OfOrganizationItem (1, nb3);
index 08641a3f064b858951aab9c51218f7b82145efb7..637e72b3b97a9550eddf114af19a67d00f15bfcd 100644 (file)
@@ -51,7 +51,7 @@ void RWStepAP214_RWAppliedPersonAndOrganizationAssignment::ReadStep
   
   Handle(StepAP214_HArray1OfPersonAndOrganizationItem) aItems;
   StepAP214_PersonAndOrganizationItem aItemsItem;
-  Standard_Integer nsub3;
+  Standard_Integer nsub3 = 0;
   if (data->ReadSubList (num,3,"items",ach,nsub3)) {
     Standard_Integer nb3 = data->NbParams(nsub3);
     aItems = new StepAP214_HArray1OfPersonAndOrganizationItem (1, nb3);
index a63da386f6336b865c52e605c3bad8c4ac724375..46d5498f1eeb88aa0c6b6ade7701a860ebb5abb6 100644 (file)
@@ -39,7 +39,7 @@ void RWStepAP214_RWAppliedPresentedItem::ReadStep
   
   Handle(StepAP214_HArray1OfPresentedItemSelect) aItems;
   StepAP214_PresentedItemSelect anent1;
-  Standard_Integer nsub1;
+  Standard_Integer nsub1 = 0;
   if (data->ReadSubList (num,1,"items",ach,nsub1)) {
     Standard_Integer nb1 = data->NbParams(nsub1);
     aItems = new StepAP214_HArray1OfPresentedItemSelect (1, nb1);
index abec76cb423c424e1e10fe250823217b2a4ff09e..5eb6585d3ef50cf6bb5630e8e7afb9585c39800f 100644 (file)
@@ -45,7 +45,7 @@ void RWStepAP214_RWAppliedSecurityClassificationAssignment::ReadStep
   
   Handle(StepAP214_HArray1OfSecurityClassificationItem) aItems;
   StepAP214_SecurityClassificationItem anent2;
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,2,"items",ach,nsub2)) {
     Standard_Integer nb2 = data->NbParams(nsub2);
     aItems = new StepAP214_HArray1OfSecurityClassificationItem (1, nb2);
index ad25f506b0920b7cb436b38b690a4a8cc0ca0f53..e5d30fc280f4ab9d59dfa89eb52b6f30277502b1 100644 (file)
@@ -51,7 +51,7 @@ void RWStepAP214_RWAutoDesignActualDateAndTimeAssignment::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignDateAndTimeItem) aItems;
        StepAP214_AutoDesignDateAndTimeItem aItemsItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList(num,3,"items",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aItems = new StepAP214_HArray1OfAutoDesignDateAndTimeItem (1, nb3);
index 11b9ac41826192f820c19b9354859189599062ec..507aa80442b36594b986560c54c4bd59ecadcc3c 100644 (file)
@@ -51,7 +51,7 @@ void RWStepAP214_RWAutoDesignActualDateAssignment::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignDatedItem) aItems;
        StepAP214_AutoDesignDatedItem aItemsItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList(num,3,"items",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aItems = new StepAP214_HArray1OfAutoDesignDatedItem (1, nb3);
index 507ae30fc1610b689da23e5e5dc3bdd3c3441634..01369e798102080eb3c019fb6347a27ea4bbc955 100644 (file)
@@ -45,7 +45,7 @@ void RWStepAP214_RWAutoDesignApprovalAssignment::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignGeneralOrgItem) aItems;
        StepAP214_AutoDesignGeneralOrgItem aItemsItem;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepAP214_HArray1OfAutoDesignGeneralOrgItem (1, nb2);
index dd69e73de1afa46f7135a0d490dfb64246f5fb73..70b2beffd9cbfcb4c1d599b7a369f14cb3f2e17a 100644 (file)
@@ -51,7 +51,7 @@ void RWStepAP214_RWAutoDesignDateAndPersonAssignment::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignDateAndPersonItem) aItems;
        StepAP214_AutoDesignDateAndPersonItem aItemsItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"items",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aItems = new StepAP214_HArray1OfAutoDesignDateAndPersonItem (1, nb3);
index 0c3203c71f022e6825a5408f1a33eb801155a42e..302cee29f48f321d65ce9daf5e9fd49b46974235 100644 (file)
@@ -51,7 +51,7 @@ void  RWStepAP214_RWAutoDesignDocumentReference::ReadStep
  
         Handle(StepAP214_HArray1OfAutoDesignReferencingItem) aItems;
        StepAP214_AutoDesignReferencingItem anItem;
-        Standard_Integer nsub3;
+        Standard_Integer nsub3 = 0;
         if (data->ReadSubList (num,3,"items",ach,nsub3)) {
           Standard_Integer nb3 = data->NbParams(nsub3);
           aItems = new StepAP214_HArray1OfAutoDesignReferencingItem (1, nb3);
index ffaa967262e98f9130e15df7fe482fbc67809264..983853c1acf0a4209662431a0a593d553424987a 100644 (file)
@@ -45,7 +45,7 @@ void RWStepAP214_RWAutoDesignGroupAssignment::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignGroupedItem) aItems;
        StepAP214_AutoDesignGroupedItem aItemsItem;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepAP214_HArray1OfAutoDesignGroupedItem (1, nb2);
index 0499f246a767c2df58c93e5c0941b2296d8ed093..965cdab4bd4661b45ad0bba15ab131a819094327 100644 (file)
@@ -50,7 +50,7 @@ void RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignDateAndTimeItem) aItems;
        StepAP214_AutoDesignDateAndTimeItem aItemsItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"items",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aItems = new StepAP214_HArray1OfAutoDesignDateAndTimeItem (1, nb3);
index 25d71d400bbf41a0503adcfcc1736ba6a8ec1c35..355c4c8e30b186cd62805f8fbc27c9d595f33116 100644 (file)
@@ -50,7 +50,7 @@ void RWStepAP214_RWAutoDesignNominalDateAssignment::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignDatedItem) aItems;
        StepAP214_AutoDesignDatedItem aItemsItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"items",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aItems = new StepAP214_HArray1OfAutoDesignDatedItem (1, nb3);
index bd6ce39a81983e762a3a21a0f021581234161457..261ea3626fd362901c7e6abd74c28af20d3b702b 100644 (file)
@@ -50,7 +50,7 @@ void RWStepAP214_RWAutoDesignOrganizationAssignment::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignGeneralOrgItem) aItems;
        StepAP214_AutoDesignGeneralOrgItem aItemsItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"items",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aItems = new StepAP214_HArray1OfAutoDesignGeneralOrgItem (1, nb3);
index 0ca49e6f374f76281704667bc7a5b81d601aac76..17d1f8baebf7b508fbbd82eee65fdb5d6391374d 100644 (file)
@@ -50,7 +50,7 @@ void RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignGeneralOrgItem) aItems;
        StepAP214_AutoDesignGeneralOrgItem aItemsItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"items",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aItems = new StepAP214_HArray1OfAutoDesignGeneralOrgItem (1, nb3);
index e522d32f7ffbaa4f1d304ead5fb3935f671bad6c..61eac842569160c290d2c9b5e9067a7386b74f75 100644 (file)
@@ -39,7 +39,7 @@ void RWStepAP214_RWAutoDesignPresentedItem::ReadStep
 
        Handle(StepAP214_HArray1OfAutoDesignPresentedItemSelect) aItems;
        StepAP214_AutoDesignPresentedItemSelect anent1;
-       Standard_Integer nsub1;
+       Standard_Integer nsub1 = 0;
        if (data->ReadSubList (num,1,"items",ach,nsub1)) {
          Standard_Integer nb1 = data->NbParams(nsub1);
          aItems = new StepAP214_HArray1OfAutoDesignPresentedItemSelect (1, nb1);
index 8ca4e6a8e5271b9de68c0be5d6e761512e7024f5..d3b6e361252f424a15e07dcb10dc24c1464d9994 100644 (file)
@@ -45,7 +45,7 @@ void RWStepAP214_RWAutoDesignSecurityClassificationAssignment::ReadStep
 
        Handle(StepBasic_HArray1OfApproval) aItems;
        Handle(StepBasic_Approval) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepBasic_HArray1OfApproval (1, nb2);
index a12fe181aee803c5a1e9a158cecc8c342ee0ad84..069ec5c33ed6f8dc238b50ce2a39e8026e970175 100644 (file)
@@ -3656,7 +3656,7 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep
 {
   // FMA - le 25-07-96 : Optimisation -> on teste en premier les types les plus
   //                     frequents dans le fichier cad geometry/topology
-  Standard_Integer num;
+  Standard_Integer num = 0;
   if (key.IsEqual(Reco_CartesianPoint)) return 59;  // car tres courant
   if (typenums.Find(key, num)) return num;
   if (typeshor.Find(key, num)) return num; // AJOUT DES TYPES COURTS
@@ -3688,7 +3688,7 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep
 // SHORT TYPES
 //  Pas tres elegant : on convertit d abord
 //  Sinon, il faudrait sortir des routines
-    Standard_Integer i,num = 0;
+    Standard_Integer i = 0,num = 0;
     for (i = 1; i <= NbComp; i ++) {
       if (typeshor.IsBound(theTypes(i)))  {  num = 1;  break;  }
     }
index a1600f3a583142caed1fac3f9d360fa37d605153..4ead229c9dc269dcfc48f3dd8135f7b2b7fe174d 100644 (file)
@@ -57,7 +57,7 @@ void RWStepAP242_RWDraughtingModelItemAssociation::ReadStep
 
   Handle(StepRepr_HArray1OfRepresentationItem) anItems;
   Handle(StepRepr_RepresentationItem) anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   Interface_ParamType aType = data->ParamType(num, 5);
   if (aType == Interface_ParamIdent) {
     data->ReadEntity(num, 5,"item_identified_representation_usage.identified_item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anEnt);
@@ -117,7 +117,7 @@ void RWStepAP242_RWDraughtingModelItemAssociation::Share(
   // Inherited fields of ItemIdentifiedRepresentationUsage
 
   iter.AddItem(ent->Definition().Value());
-  Standard_Integer i, nb = ent->NbIdentifiedItem();
+  Standard_Integer i = 0, nb = ent->NbIdentifiedItem();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->IdentifiedItemValue(i));
 }
index be4e8819abb045e082e2bc65f9a9f831af76c9d4..1f4484d1c1b19584132cd5a3a0befac4dbbd1624 100644 (file)
@@ -55,7 +55,7 @@ void RWStepAP242_RWGeometricItemSpecificUsage::ReadStep
 
   Handle(StepRepr_HArray1OfRepresentationItem) anItems;
   Handle(StepRepr_RepresentationItem) anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   Interface_ParamType aType = data->ParamType(num, 5);
   if (aType == Interface_ParamIdent) {
     data->ReadEntity(num, 5,"item_identified_representation_usage.identified_item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anEnt);
@@ -109,7 +109,7 @@ void RWStepAP242_RWGeometricItemSpecificUsage::Share(
   // Inherited fields of ItemIdentifiedRepresentationUsage
 
   iter.AddItem(ent->Definition().Value());
-  Standard_Integer i, nb = ent->NbIdentifiedItem();
+  Standard_Integer i = 0, nb = ent->NbIdentifiedItem();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->IdentifiedItemValue(i));
 }
index a4065e0f1f3aac984649a28e86754c02bc6b2cbb..14878070c8742deefbc971be630c9794310633b6 100644 (file)
@@ -60,7 +60,7 @@ void RWStepAP242_RWItemIdentifiedRepresentationUsage::ReadStep
 
   Handle(StepRepr_HArray1OfRepresentationItem) anItems;
   Handle(StepRepr_RepresentationItem) anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   Interface_ParamType aType = data->ParamType(num, 5);
   if (aType == Interface_ParamIdent) {
     data->ReadEntity(num, 5,"item_identified_representation_usage.identified_item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anEnt);
@@ -124,7 +124,7 @@ void RWStepAP242_RWItemIdentifiedRepresentationUsage::Share(
   Interface_EntityIterator& iter) const
 {
   iter.AddItem(ent->Definition().Value());
-  Standard_Integer i, nb = ent->NbIdentifiedItem();
+  Standard_Integer i = 0, nb = ent->NbIdentifiedItem();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->IdentifiedItemValue(i));
 }
index 839d09b920bd7d754adea1d1b6ad7965e7d30836..6dcd0fc70c02a89f5efdc86191752fed8803acb4 100644 (file)
@@ -47,7 +47,7 @@ void RWStepBasic_RWApplicationProtocolDefinition::ReadStep
 
        // --- own field : applicationProtocolYear ---
 
-       Standard_Integer aApplicationProtocolYear;
+       Standard_Integer aApplicationProtocolYear = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadInteger (num,3,"application_protocol_year",ach,aApplicationProtocolYear);
 
index 4434bba1892c9b535f3d2912e44d343abc0caef8..41da3f0f82ba63a9f05fb303614ffad749249cca 100644 (file)
@@ -33,19 +33,19 @@ void RWStepBasic_RWCalendarDate::ReadStep
 
        // --- inherited field : yearComponent ---
 
-       Standard_Integer aYearComponent;
+       Standard_Integer aYearComponent = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"year_component",ach,aYearComponent);
 
        // --- own field : dayComponent ---
 
-       Standard_Integer aDayComponent;
+       Standard_Integer aDayComponent = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"day_component",ach,aDayComponent);
 
        // --- own field : monthComponent ---
 
-       Standard_Integer aMonthComponent;
+       Standard_Integer aMonthComponent = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadInteger (num,3,"month_component",ach,aMonthComponent);
 
index 8c375e21584c83a14d4074c7d4d54b83f063291d..e162e212048219a506fba69bae879cca164e2ab4 100644 (file)
@@ -39,13 +39,13 @@ void RWStepBasic_RWCoordinatedUniversalTimeOffset::ReadStep
 
        // --- own field : hourOffset ---
 
-       Standard_Integer aHourOffset;
+       Standard_Integer aHourOffset = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"hour_offset",ach,aHourOffset);
 
        // --- own field : minuteOffset ---
 
-       Standard_Integer aMinuteOffset;
+       Standard_Integer aMinuteOffset = 0;
        Standard_Boolean hasAminuteOffset = Standard_True;
        if (data->IsParamDefined(num,2)) {
          //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
index 2d97d75776b52b9a97b63f38c7d9bc9a551295cc..023301cda8ed580a7f2c1e585db36163034f7f3b 100644 (file)
@@ -33,7 +33,7 @@ void RWStepBasic_RWDate::ReadStep
 
        // --- own field : yearComponent ---
 
-       Standard_Integer aYearComponent;
+       Standard_Integer aYearComponent = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"year_component",ach,aYearComponent);
 
index 5d864a2ed5a77b6a83846751e6d9083f47468dc7..3540367a2209005654392b750aa98eb991d53793 100644 (file)
@@ -39,7 +39,7 @@ void RWStepBasic_RWDerivedUnit::ReadStep
 
        Handle(StepBasic_HArray1OfDerivedUnitElement) elts;
        Handle(StepBasic_DerivedUnitElement) anelt;
-       Standard_Integer nsub1;
+       Standard_Integer nsub1 = 0;
        if (data->ReadSubList (num,1,"elements",ach,nsub1)) {
          Standard_Integer nb1 = data->NbParams(nsub1);
          elts = new StepBasic_HArray1OfDerivedUnitElement (1,nb1);
@@ -64,7 +64,7 @@ void RWStepBasic_RWDerivedUnit::WriteStep
 
        // --- own field : dimensions ---
 
-  Standard_Integer i, nb = ent->NbElements();
+  Standard_Integer i = 0, nb = ent->NbElements();
   SW.OpenSub();
   for (i = 1; i <= nb; i ++) {
     SW.Send (ent->ElementsValue(i));
@@ -76,7 +76,7 @@ void RWStepBasic_RWDerivedUnit::WriteStep
 void RWStepBasic_RWDerivedUnit::Share(const Handle(StepBasic_DerivedUnit)& ent, Interface_EntityIterator& iter) const
 {
 
-  Standard_Integer i, nb = ent->NbElements();
+  Standard_Integer i = 0, nb = ent->NbElements();
   for (i = 1; i <= nb; i ++) {
     iter.GetOneItem(ent->ElementsValue(i));
   }
index 8ab38093d2cf7872107be4be09984c633188ffd3..b306c9f62767b9b10c6cbfa186975d6b212b7010 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepBasic_RWDerivedUnitElement.hxx>
 #include <StepBasic_DerivedUnitElement.hxx>
@@ -38,7 +40,7 @@ void RWStepBasic_RWDerivedUnitElement::ReadStep
        Handle(StepBasic_NamedUnit) nu;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadEntity(num, 1,"unit", ach, STANDARD_TYPE(StepBasic_NamedUnit), nu);
-       Standard_Real expo;
+       Standard_Real expo = NAN;
        //szv#4:S4163:12Mar99 `stat1 =` not needed
        data->ReadReal (num,2,"exponent", ach, expo);
 
index b80ed6357446420ada6b35d7b298ba0ee6f9358b..554feb062c64745f8f5e175efc89c9909c3a275d 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <RWStepBasic_RWDimensionalExponents.hxx>
 #include <StepBasic_DimensionalExponents.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -33,43 +35,43 @@ void RWStepBasic_RWDimensionalExponents::ReadStep
 
        // --- own field : lengthExponent ---
 
-       Standard_Real aLengthExponent;
+       Standard_Real aLengthExponent = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadReal (num,1,"length_exponent",ach,aLengthExponent);
 
        // --- own field : massExponent ---
 
-       Standard_Real aMassExponent;
+       Standard_Real aMassExponent = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadReal (num,2,"mass_exponent",ach,aMassExponent);
 
        // --- own field : timeExponent ---
 
-       Standard_Real aTimeExponent;
+       Standard_Real aTimeExponent = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"time_exponent",ach,aTimeExponent);
 
        // --- own field : electricCurrentExponent ---
 
-       Standard_Real aElectricCurrentExponent;
+       Standard_Real aElectricCurrentExponent = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"electric_current_exponent",ach,aElectricCurrentExponent);
 
        // --- own field : thermodynamicTemperatureExponent ---
 
-       Standard_Real aThermodynamicTemperatureExponent;
+       Standard_Real aThermodynamicTemperatureExponent = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
        data->ReadReal (num,5,"thermodynamic_temperature_exponent",ach,aThermodynamicTemperatureExponent);
 
        // --- own field : amountOfSubstanceExponent ---
 
-       Standard_Real aAmountOfSubstanceExponent;
+       Standard_Real aAmountOfSubstanceExponent = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
        data->ReadReal (num,6,"amount_of_substance_exponent",ach,aAmountOfSubstanceExponent);
 
        // --- own field : luminousIntensityExponent ---
 
-       Standard_Real aLuminousIntensityExponent;
+       Standard_Real aLuminousIntensityExponent = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
        data->ReadReal (num,7,"luminous_intensity_exponent",ach,aLuminousIntensityExponent);
 
index ffe2935e89b30f010d93c113d4f271120a2bd9c8..ee1bca974d3ac22dc883965ff36e86f7dfc06bfe 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepBasic_RWEulerAngles.hxx>
@@ -54,7 +56,7 @@ void RWStepBasic_RWEulerAngles::ReadStep (const Handle(StepData_StepReaderData)&
     aAngles = new TColStd_HArray1OfReal (1, nb0);
     Standard_Integer num2 = sub1;
     for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
-      Standard_Real anIt0;
+      Standard_Real anIt0 = NAN;
       data->ReadReal (num2, i0, "real", ach, anIt0);
       aAngles->SetValue(i0, anIt0);
     }
index 3ac134951b47db8413e40ed2bff0c816957496f8..ac56fb45e854a88a3a93026b6ab9362cee9d4503 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepBasic_RWLocalTime.hxx>
 #include <StepBasic_CoordinatedUniversalTimeOffset.hxx>
@@ -35,13 +37,13 @@ void RWStepBasic_RWLocalTime::ReadStep
 
        // --- own field : hourComponent ---
 
-       Standard_Integer aHourComponent;
+       Standard_Integer aHourComponent = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"hour_component",ach,aHourComponent);
 
        // --- own field : minuteComponent ---
 
-       Standard_Integer aMinuteComponent;
+       Standard_Integer aMinuteComponent = 0;
        Standard_Boolean hasAminuteComponent = Standard_True;
        if (data->IsParamDefined(num,2)) {
          //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
@@ -54,7 +56,7 @@ void RWStepBasic_RWLocalTime::ReadStep
 
        // --- own field : secondComponent ---
 
-       Standard_Real aSecondComponent;
+       Standard_Real aSecondComponent = NAN;
        Standard_Boolean hasAsecondComponent = Standard_True;
        if (data->IsParamDefined(num,3)) {
          //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
index 5a6d7036859f98f14437b4bde0a6b56692ef41d0..3341cc090eb720cc5b8dcf4641b971810a981017 100644 (file)
@@ -33,13 +33,13 @@ void RWStepBasic_RWOrdinalDate::ReadStep
 
        // --- inherited field : yearComponent ---
 
-       Standard_Integer aYearComponent;
+       Standard_Integer aYearComponent = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"year_component",ach,aYearComponent);
 
        // --- own field : dayComponent ---
 
-       Standard_Integer aDayComponent;
+       Standard_Integer aDayComponent = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"day_component",ach,aDayComponent);
 
index 181f23882e69fd4b05105027110a0f00fa8ea5b0..cb2e3b570009e933de3cb41ee6ff3f4212f636d7 100644 (file)
@@ -195,7 +195,7 @@ void RWStepBasic_RWOrganizationalAddress::ReadStep
 
        Handle(StepBasic_HArray1OfOrganization) aOrganizations;
        Handle(StepBasic_Organization) anent13;
-       Standard_Integer nsub13;
+       Standard_Integer nsub13 = 0;
        if (data->ReadSubList (num,13,"organizations",ach,nsub13)) {
          Standard_Integer nb13 = data->NbParams(nsub13);
          aOrganizations = new StepBasic_HArray1OfOrganization (1, nb13);
index 345dd2a8c9e00f336d743787706fb353f00061cf..18d84dc2ddfe12b10e4a08bad048d54e95c11b9e 100644 (file)
@@ -70,7 +70,7 @@ void RWStepBasic_RWPerson::ReadStep
        Standard_Boolean hasAmiddleNames = Standard_True;
        if (data->IsParamDefined(num,4)) {
          Handle(TCollection_HAsciiString) aMiddleNamesItem;
-         Standard_Integer nsub4;
+         Standard_Integer nsub4 = 0;
          if (data->ReadSubList (num,4,"middle_names",ach,nsub4)) {
            Standard_Integer nb4 = data->NbParams(nsub4);
            aMiddleNames = new Interface_HArray1OfHAsciiString (1, nb4);
@@ -92,7 +92,7 @@ void RWStepBasic_RWPerson::ReadStep
        Standard_Boolean hasAprefixTitles = Standard_True;
        if (data->IsParamDefined(num,5)) {
          Handle(TCollection_HAsciiString) aPrefixTitlesItem;
-         Standard_Integer nsub5;
+         Standard_Integer nsub5 = 0;
          if (data->ReadSubList (num,5,"prefix_titles",ach,nsub5)) {
            Standard_Integer nb5 = data->NbParams(nsub5);
            aPrefixTitles = new Interface_HArray1OfHAsciiString (1, nb5);
@@ -114,7 +114,7 @@ void RWStepBasic_RWPerson::ReadStep
        Standard_Boolean hasAsuffixTitles = Standard_True;
        if (data->IsParamDefined(num,6)) {
          Handle(TCollection_HAsciiString) aSuffixTitlesItem;
-         Standard_Integer nsub6;
+         Standard_Integer nsub6 = 0;
          if (data->ReadSubList (num,6,"suffix_titles",ach,nsub6)) {
            Standard_Integer nb6 = data->NbParams(nsub6);
            aSuffixTitles = new Interface_HArray1OfHAsciiString (1, nb6);
index 560669934e2102795a04e4cc079239a1decd77e4..58463a0def6c4842f3907198cc16b929e25afb40 100644 (file)
@@ -195,7 +195,7 @@ void RWStepBasic_RWPersonalAddress::ReadStep
 
        Handle(StepBasic_HArray1OfPerson) aPeople;
        Handle(StepBasic_Person) anent13;
-       Standard_Integer nsub13;
+       Standard_Integer nsub13 = 0;
        if (data->ReadSubList (num,13,"people",ach,nsub13)) {
          Standard_Integer nb13 = data->NbParams(nsub13);
          aPeople = new StepBasic_HArray1OfPerson (1, nb13);
index 63a8754ec56b98e4b9ea513af6665c4edac8c370..047aca0c6f8e9289c711ec1a5c0748d2dea196b3 100644 (file)
@@ -58,7 +58,7 @@ void RWStepBasic_RWProduct::ReadStep
 
        Handle(StepBasic_HArray1OfProductContext) aFrameOfReference;
        Handle(StepBasic_ProductContext) anent4;
-       Standard_Integer nsub4;
+       Standard_Integer nsub4 = 0;
        if (data->ReadSubList (num,4,"frame_of_reference",ach,nsub4)) {
          Standard_Integer nb4 = data->NbParams(nsub4);
          aFrameOfReference = new StepBasic_HArray1OfProductContext (1, nb4);
index d93b3944e67522d44e23cbdcb462def38e330f28..a5374c3d26dc532bfe5cd1d11c9565b668b554fb 100644 (file)
@@ -63,7 +63,7 @@ void RWStepBasic_RWProductDefinitionWithAssociatedDocuments::ReadStep
  
         Handle(StepBasic_HArray1OfDocument) aDocIds;
         Handle(StepBasic_Document) anent5;
-        Standard_Integer nsub5;
+        Standard_Integer nsub5 = 0;
         if (data->ReadSubList (num,5,"frame_of_reference",ach,nsub5)) {
           Standard_Integer nb5 = data->NbParams(nsub5);
           if (nb5 > 0) aDocIds = new StepBasic_HArray1OfDocument (1, nb5);
@@ -104,7 +104,7 @@ void RWStepBasic_RWProductDefinitionWithAssociatedDocuments::WriteStep
        // -- own : list
 
        SW.OpenSub();
-       Standard_Integer i,nb = ent->NbDocIds();
+       Standard_Integer i = 0,nb = ent->NbDocIds();
        for (i = 1; i <= nb; i ++) SW.Send (ent->DocIdsValue(i));
        SW.CloseSub();
 
@@ -119,6 +119,6 @@ void RWStepBasic_RWProductDefinitionWithAssociatedDocuments::Share(const Handle(
 
        iter.GetOneItem(ent->FrameOfReference());
 
-       Standard_Integer i,nb = ent->NbDocIds();
+       Standard_Integer i = 0,nb = ent->NbDocIds();
        for (i = 1; i <= nb; i ++) iter.AddItem (ent->DocIdsValue(i));
 }
index 2f8e1907ba28698d0e7bcf51cc69c05a5ccf1a1d..3685da533ca59978d70e9d5b4305550e33c353e6 100644 (file)
@@ -57,7 +57,7 @@ void RWStepBasic_RWProductRelatedProductCategory::ReadStep
 
        Handle(StepBasic_HArray1OfProduct) aProducts;
        Handle(StepBasic_Product) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"products",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aProducts = new StepBasic_HArray1OfProduct (1, nb3);
index b073a4a56c7325f2a465574c9d5a7a2beefc6b73..51f55e47441daad3b70099001f230bfd5ef2bbbd 100644 (file)
@@ -57,7 +57,7 @@ void RWStepBasic_RWProductType::ReadStep
 
        Handle(StepBasic_HArray1OfProduct) aProducts;
        Handle(StepBasic_Product) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"products",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aProducts = new StepBasic_HArray1OfProduct (1, nb3);
index 46194f26ed016ca3bf85e8789d04aa5dea2961eb..3dee63057b2468f48573c1deb202e3c3eceaa90a 100644 (file)
@@ -33,19 +33,19 @@ void RWStepBasic_RWWeekOfYearAndDayDate::ReadStep
 
        // --- inherited field : yearComponent ---
 
-       Standard_Integer aYearComponent;
+       Standard_Integer aYearComponent = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"year_component",ach,aYearComponent);
 
        // --- own field : weekComponent ---
 
-       Standard_Integer aWeekComponent;
+       Standard_Integer aWeekComponent = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"week_component",ach,aWeekComponent);
 
        // --- own field : dayComponent ---
 
-       Standard_Integer aDayComponent;
+       Standard_Integer aDayComponent = 0;
        Standard_Boolean hasAdayComponent = Standard_True;
        if (data->IsParamDefined(num,3)) {
          //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
index 3cc2bbe946637b8ff08d43d1ecd1641aebe2a7f7..315def406f3191eb985409156d7d9d86f34d826b 100644 (file)
@@ -45,7 +45,7 @@ void RWStepDimTol_RWDatumReference::ReadStep (const Handle(StepData_StepReaderDa
 
   // Own fields of DatumReference
 
-  Standard_Integer aPrecedence;
+  Standard_Integer aPrecedence = 0;
   data->ReadInteger (num, 1, "precedence", ach, aPrecedence);
 
   Handle(StepDimTol_Datum) aReferencedDatum;
index 591e284c816980f6e5f98afda232fe88d34f94c1..8f0d62ad6b00dd98fa06cc86b7364e7be54380d3 100644 (file)
@@ -76,11 +76,11 @@ void RWStepDimTol_RWDatumReferenceCompartment::ReadStep (const Handle(StepData_S
   else {
     Handle(StepDimTol_HArray1OfDatumReferenceElement) anItems;
     Handle(StepDimTol_DatumReferenceElement) anEnt;
-    Standard_Integer nbSub;
+    Standard_Integer nbSub = 0;
     if (data->ReadSubList (num,5,"general_datum_reference.base",ach,nbSub)) {
       aType = data->ParamType(nbSub, 1);      
       if (aType == Interface_ParamSub) {
-        Standard_Integer aNewNbSub;
+        Standard_Integer aNewNbSub = 0;
         if (data->ReadSubList (nbSub,1,"general_datum_reference.base",ach,aNewNbSub)) {
           nbSub = aNewNbSub;
         }
@@ -95,7 +95,7 @@ void RWStepDimTol_RWDatumReferenceCompartment::ReadStep (const Handle(StepData_S
     aBase.SetValue(anItems);
   }
 
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   Standard_Boolean hasModifiers = data->ReadSubList(num, 6, "general_datum_reference.modifiers", ach, nbSub, Standard_True);
   Handle(StepDimTol_HArray1OfDatumReferenceModifier) aModifiers;
   if (hasModifiers) {
@@ -157,7 +157,7 @@ void RWStepDimTol_RWDatumReferenceCompartment::WriteStep (StepData_StepWriter& S
   }
   else if (aBaseType == 2) {
     Handle(StepDimTol_HArray1OfDatumReferenceElement) anArray = ent->Base().CommonDatumList();
-    Standard_Integer i, nb = (anArray.IsNull() ? 0 : anArray->Length());
+    Standard_Integer i = 0, nb = (anArray.IsNull() ? 0 : anArray->Length());
     SW.OpenTypedSub("COMMON_DATUM_LIST");
     for (i = 1; i <= nb; i++)  
       SW.Send (anArray->Value(i));
@@ -165,7 +165,7 @@ void RWStepDimTol_RWDatumReferenceCompartment::WriteStep (StepData_StepWriter& S
   }
 
   if (ent->HasModifiers()) {
-    Standard_Integer i, nb = ent->NbModifiers();
+    Standard_Integer i = 0, nb = ent->NbModifiers();
     SW.OpenSub();
     for (i = 1; i <= nb; i++) {
       StepDimTol_DatumReferenceModifier aModifier = ent->ModifiersValue(i);
@@ -202,7 +202,7 @@ void RWStepDimTol_RWDatumReferenceCompartment::Share (const Handle(StepDimTol_Da
   }
   else if (aBaseType == 2) {
     Handle(StepDimTol_HArray1OfDatumReferenceElement) anArray = ent->Base().CommonDatumList();
-    Standard_Integer i, nb = (anArray.IsNull() ? 0 : anArray->Length());
+    Standard_Integer i = 0, nb = (anArray.IsNull() ? 0 : anArray->Length());
     for (i = 1; i <= nb; i++)  
       iter.AddItem (anArray->Value(i));
   }
index 29a5d043e79c1eb1cfc3f548bea3c51f67798037..2312179d5cf254bdf96c0a255114479af625371b 100644 (file)
@@ -76,11 +76,11 @@ void RWStepDimTol_RWDatumReferenceElement::ReadStep (const Handle(StepData_StepR
   else {
     Handle(StepDimTol_HArray1OfDatumReferenceElement) anItems;
     Handle(StepDimTol_DatumReferenceElement) anEnt;
-    Standard_Integer nbSub;
+    Standard_Integer nbSub = 0;
     if (data->ReadSubList (num,5,"general_datum_reference.base",ach,nbSub)) {
       aType = data->ParamType(nbSub, 1);      
       if (aType == Interface_ParamSub) {
-        Standard_Integer aNewNbSub;
+        Standard_Integer aNewNbSub = 0;
         if (data->ReadSubList (nbSub,1,"general_datum_reference.base",ach,aNewNbSub)) {
           nbSub = aNewNbSub;
         }
@@ -95,7 +95,7 @@ void RWStepDimTol_RWDatumReferenceElement::ReadStep (const Handle(StepData_StepR
     aBase.SetValue(anItems);
   }
 
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   Standard_Boolean hasModifiers = data->ReadSubList(num, 6, "general_datum_reference.modifiers", ach, nbSub, Standard_True);
   Handle(StepDimTol_HArray1OfDatumReferenceModifier) aModifiers;
   if (hasModifiers) {
@@ -157,7 +157,7 @@ void RWStepDimTol_RWDatumReferenceElement::WriteStep (StepData_StepWriter& SW,
   }
   else if (aBaseType == 2) {
     Handle(StepDimTol_HArray1OfDatumReferenceElement) anArray = (ent->Base()).CommonDatumList();
-    Standard_Integer i, nb = (anArray.IsNull() ? 0 : anArray->Length());
+    Standard_Integer i = 0, nb = (anArray.IsNull() ? 0 : anArray->Length());
     SW.OpenTypedSub("COMMON_DATUM_LIST");
     for (i = 1; i <= nb; i++)  
       SW.Send (anArray->Value(i));
@@ -165,7 +165,7 @@ void RWStepDimTol_RWDatumReferenceElement::WriteStep (StepData_StepWriter& SW,
   }
 
   if (ent->HasModifiers()) {
-    Standard_Integer i, nb = ent->NbModifiers();
+    Standard_Integer i = 0, nb = ent->NbModifiers();
     SW.OpenSub();
     for (i = 1; i <= nb; i++) {
       StepDimTol_DatumReferenceModifier aModifier = ent->ModifiersValue(i);
@@ -202,7 +202,7 @@ void RWStepDimTol_RWDatumReferenceElement::Share (const Handle(StepDimTol_DatumR
   }
   else if (aBaseType == 2) {
     Handle(StepDimTol_HArray1OfDatumReferenceElement) anArray = ent->Base().CommonDatumList();
-    Standard_Integer i, nb = (anArray.IsNull() ? 0 : anArray->Length());
+    Standard_Integer i = 0, nb = (anArray.IsNull() ? 0 : anArray->Length());
     for (i = 1; i <= nb; i++)  
       iter.AddItem (anArray->Value(i));
   }
index 0399d21162922ea15d995cdf6a9f41dbf9c5e072..9afff4f847b120488cab1106776a89683c2b609e 100644 (file)
@@ -63,7 +63,7 @@ void RWStepDimTol_RWDatumSystem::ReadStep (const Handle(StepData_StepReaderData)
   
   Handle(StepDimTol_HArray1OfDatumReferenceCompartment) aConstituents;
   Handle(StepDimTol_DatumReferenceCompartment) anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList (num,5,"base",ach,nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     aConstituents = new StepDimTol_HArray1OfDatumReferenceCompartment (1, nbElements);
@@ -101,7 +101,7 @@ void RWStepDimTol_RWDatumSystem::WriteStep (StepData_StepWriter& SW,
   SW.SendLogical (ent->ProductDefinitional());
   
   // Own fields of DatumSystem
-  Standard_Integer i, nb = ent->NbConstituents();
+  Standard_Integer i = 0, nb = ent->NbConstituents();
   SW.OpenSub();
   for (i = 1; i <= nb; i++)  
     SW.Send (ent->ConstituentsValue(i));
@@ -122,7 +122,7 @@ void RWStepDimTol_RWDatumSystem::Share (const Handle(StepDimTol_DatumSystem) &en
   iter.AddItem (ent->OfShape());
   
   // Own fields of DatumSystem
-  Standard_Integer i, nb = ent->NbConstituents();
+  Standard_Integer i = 0, nb = ent->NbConstituents();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->ConstituentsValue(i));
 }
index e493785914c59ab4470d5b9a94fbe213f3db8960..fa904ba803ab5453fc295b50b0a6ee92052e11d7 100644 (file)
@@ -74,11 +74,11 @@ void RWStepDimTol_RWGeneralDatumReference::ReadStep (const Handle(StepData_StepR
   else {
     Handle(StepDimTol_HArray1OfDatumReferenceElement) anItems;
     Handle(StepDimTol_DatumReferenceElement) anEnt;
-    Standard_Integer nbSub;
+    Standard_Integer nbSub = 0;
     if (data->ReadSubList (num,5,"general_datum_reference.base",ach,nbSub)) {
       aType = data->ParamType(nbSub, 1);      
       if (aType == Interface_ParamSub) {
-        Standard_Integer aNewNbSub;
+        Standard_Integer aNewNbSub = 0;
         if (data->ReadSubList (nbSub,1,"general_datum_reference.base",ach,aNewNbSub)) {
           nbSub = aNewNbSub;
         }
@@ -93,7 +93,7 @@ void RWStepDimTol_RWGeneralDatumReference::ReadStep (const Handle(StepData_StepR
     aBase.SetValue(anItems);
   }
 
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   Standard_Boolean hasModifiers = data->ReadSubList(num, 6, "general_datum_reference.modifiers", ach, nbSub, Standard_True);
   Handle(StepDimTol_HArray1OfDatumReferenceModifier) aModifiers;
   if (hasModifiers) {
@@ -155,7 +155,7 @@ void RWStepDimTol_RWGeneralDatumReference::WriteStep (StepData_StepWriter& SW,
   }
   else if (aBaseType == 2) {
     Handle(StepDimTol_HArray1OfDatumReferenceElement) anArray = ent->Base().CommonDatumList();
-    Standard_Integer i, nb = (anArray.IsNull() ? 0 : anArray->Length());
+    Standard_Integer i = 0, nb = (anArray.IsNull() ? 0 : anArray->Length());
     SW.OpenTypedSub("COMMON_DATUM_LIST");
     for (i = 1; i <= nb; i++)  
       SW.Send (anArray->Value(i));
@@ -163,7 +163,7 @@ void RWStepDimTol_RWGeneralDatumReference::WriteStep (StepData_StepWriter& SW,
   }
 
   if (ent->HasModifiers()) {
-    Standard_Integer i, nb = ent->NbModifiers();
+    Standard_Integer i = 0, nb = ent->NbModifiers();
     SW.OpenSub();
     for (i = 1; i <= nb; i++) {
       StepDimTol_DatumReferenceModifier aModifier = ent->ModifiersValue(i);
@@ -201,7 +201,7 @@ void RWStepDimTol_RWGeneralDatumReference::Share (const Handle(StepDimTol_Genera
   }
   else if (aBaseType == 2) {
     Handle(StepDimTol_HArray1OfDatumReferenceElement) anArray = ent->Base().CommonDatumList();
-    Standard_Integer i, nb = (anArray.IsNull() ? 0 : anArray->Length());
+    Standard_Integer i = 0, nb = (anArray.IsNull() ? 0 : anArray->Length());
     for (i = 1; i <= nb; i++)  
       iter.AddItem (anArray->Value(i));
   }
index f38ce30f5865f2ef2f8830982b90eadbda279f5a..a7c2ca46a6fcd01547f1cd3ef1d6906a2f8af78f 100644 (file)
@@ -51,7 +51,7 @@ void RWStepDimTol_RWNonUniformZoneDefinition::ReadStep (const Handle(StepData_St
   
   Handle(StepRepr_HArray1OfShapeAspect) anItems;
   Handle(StepRepr_ShapeAspect) anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList (num,2,"tolerance_zone_definition.boundaries",ach,nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     anItems = new StepRepr_HArray1OfShapeAspect (1, nbElements);
@@ -98,7 +98,7 @@ void RWStepDimTol_RWNonUniformZoneDefinition::Share (const Handle(StepDimTol_Non
 
   iter.AddItem (ent->Zone());
   
-  Standard_Integer i, nb = ent->NbBoundaries();
+  Standard_Integer i = 0, nb = ent->NbBoundaries();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->BoundariesValue(i));
 }
index 0e8a57efd620a3e5d50e38c5ced5328591c1b868..b4cf27a27b70bc2907af05d915da069fea6608da 100644 (file)
@@ -51,7 +51,7 @@ void RWStepDimTol_RWProjectedZoneDefinition::ReadStep (const Handle(StepData_Ste
   
   Handle(StepRepr_HArray1OfShapeAspect) anItems;
   Handle(StepRepr_ShapeAspect) anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList (num,2,"tolerance_zone_definition.boundaries",ach,nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     anItems = new StepRepr_HArray1OfShapeAspect (1, nbElements);
@@ -112,7 +112,7 @@ void RWStepDimTol_RWProjectedZoneDefinition::Share (const Handle(StepDimTol_Proj
 
   iter.AddItem (ent->Zone());
   
-  Standard_Integer i, nb = ent->NbBoundaries();
+  Standard_Integer i = 0, nb = ent->NbBoundaries();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->BoundariesValue(i));
     
index d5c77b1fbff407ef439a061a8b971bd372d84bcc..8e7ec8e08ea4b96f4170b0093ac5874006966ce4 100644 (file)
@@ -52,7 +52,7 @@ void RWStepDimTol_RWRunoutZoneDefinition::ReadStep (const Handle(StepData_StepRe
   
   Handle(StepRepr_HArray1OfShapeAspect) anItems;
   Handle(StepRepr_ShapeAspect) anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList (num,2,"tolerance_zone_definition.boundaries",ach,nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     anItems = new StepRepr_HArray1OfShapeAspect (1, nbElements);
@@ -103,7 +103,7 @@ void RWStepDimTol_RWRunoutZoneDefinition::Share (const Handle(StepDimTol_RunoutZ
 
   iter.AddItem (ent->Zone());
   
-  Standard_Integer i, nb = ent->NbBoundaries();
+  Standard_Integer i = 0, nb = ent->NbBoundaries();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->BoundariesValue(i));
 }
index d2dde91867bd4eda253a5b981b32c0f573a707c8..8326952f4c09d7619aac9b165b9a77a5ea5c17b0 100644 (file)
@@ -65,7 +65,7 @@ void RWStepDimTol_RWToleranceZone::ReadStep (const Handle(StepData_StepReaderDat
 
   Handle(StepDimTol_HArray1OfToleranceZoneTarget) anItems;
   StepDimTol_ToleranceZoneTarget anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList (num,5,"defining_tolerance",ach,nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     anItems = new StepDimTol_HArray1OfToleranceZoneTarget (1, nbElements);
@@ -131,7 +131,7 @@ void RWStepDimTol_RWToleranceZone::Share (const Handle(StepDimTol_ToleranceZone)
   iter.AddItem (ent->OfShape());
   
   // Own fields of ToleranceZone
-  Standard_Integer i, nb = ent->NbDefiningTolerances();
+  Standard_Integer i = 0, nb = ent->NbDefiningTolerances();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->DefiningToleranceValue(i).Value());
 }
index 215c99e432bba2f2689f82dc4a077d0e84182e0e..69bcb471fda912592dbca1959c04f9d28d730086 100644 (file)
@@ -50,7 +50,7 @@ void RWStepDimTol_RWToleranceZoneDefinition::ReadStep (const Handle(StepData_Ste
   
   Handle(StepRepr_HArray1OfShapeAspect) anItems;
   Handle(StepRepr_ShapeAspect) anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList (num,2,"boundaries",ach,nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     anItems = new StepRepr_HArray1OfShapeAspect (1, nbElements);
@@ -97,7 +97,7 @@ void RWStepDimTol_RWToleranceZoneDefinition::Share (const Handle(StepDimTol_Tole
 
   iter.AddItem (ent->Zone());
   
-  Standard_Integer i, nb = ent->NbBoundaries();
+  Standard_Integer i = 0, nb = ent->NbBoundaries();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->BoundariesValue(i));
 }
index ab6988a06e6619bfb0d502fc34e18968309de627..84c01cd53ff80cfc4d94da904265540eae0a53f4 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepElement_RWCurveElementEndReleasePacket.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,7 +49,7 @@ void RWStepElement_RWCurveElementEndReleasePacket::ReadStep (const Handle(StepDa
   StepElement_CurveElementFreedom aReleaseFreedom;
   data->ReadEntity (num, 1, "release_freedom", ach, aReleaseFreedom);
 
-  Standard_Real aReleaseStiffness;
+  Standard_Real aReleaseStiffness = NAN;
   data->ReadReal (num, 2, "release_stiffness", ach, aReleaseStiffness);
 
   // Initialize entity
index 9f20aae0739d216e15617512e89167b48133a086..c6228e69f32a80b64f5651a1ffbd9555b4eb619b 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepElement_RWCurveElementSectionDefinition.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,7 +49,7 @@ void RWStepElement_RWCurveElementSectionDefinition::ReadStep (const Handle(StepD
   Handle(TCollection_HAsciiString) aDescription;
   data->ReadString (num, 1, "description", ach, aDescription);
 
-  Standard_Real aSectionAngle;
+  Standard_Real aSectionAngle = NAN;
   data->ReadReal (num, 2, "section_angle", ach, aSectionAngle);
 
   // Initialize entity
index d5b62ee529a922b6f37edcfc776d27bce56da560..c898d258c9eeda804594d4dfb761c33d42230685 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepElement_RWCurveElementSectionDerivedDefinitions.hxx>
@@ -52,12 +54,12 @@ void RWStepElement_RWCurveElementSectionDerivedDefinitions::ReadStep (const Hand
   Handle(TCollection_HAsciiString) aCurveElementSectionDefinition_Description;
   data->ReadString (num, 1, "curve_element_section_definition.description", ach, aCurveElementSectionDefinition_Description);
 
-  Standard_Real aCurveElementSectionDefinition_SectionAngle;
+  Standard_Real aCurveElementSectionDefinition_SectionAngle = NAN;
   data->ReadReal (num, 2, "curve_element_section_definition.section_angle", ach, aCurveElementSectionDefinition_SectionAngle);
 
   // Own fields of CurveElementSectionDerivedDefinitions
 
-  Standard_Real aCrossSectionalArea;
+  Standard_Real aCrossSectionalArea = NAN;
   data->ReadReal (num, 3, "cross_sectional_area", ach, aCrossSectionalArea);
 
   Handle(StepElement_HArray1OfMeasureOrUnspecifiedValue) aShearArea;
@@ -80,13 +82,13 @@ void RWStepElement_RWCurveElementSectionDerivedDefinitions::ReadStep (const Hand
     aSecondMomentOfArea = new TColStd_HArray1OfReal (1, nb0);
     Standard_Integer num2 = sub5;
     for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
-      Standard_Real anIt0;
+      Standard_Real anIt0 = NAN;
       data->ReadReal (num2, i0, "real", ach, anIt0);
       aSecondMomentOfArea->SetValue(i0, anIt0);
     }
   }
 
-  Standard_Real aTorsionalConstant;
+  Standard_Real aTorsionalConstant = NAN;
   data->ReadReal (num, 6, "torsional_constant", ach, aTorsionalConstant);
 
   StepElement_MeasureOrUnspecifiedValue aWarpingConstant;
index 37eca4fe3cd9af79c1b29b6ed87e87ff3e445119..71da4d90863a66fd74143d906aadb93c350a36fb 100644 (file)
@@ -59,7 +59,7 @@ void RWStepElement_RWSurfaceSectionFieldVarying::ReadStep (const Handle(StepData
     }
   }
 
-  Standard_Boolean aAdditionalNodeValues;
+  Standard_Boolean aAdditionalNodeValues = 0;
   data->ReadBoolean (num, 2, "additional_node_values", ach, aAdditionalNodeValues);
 
   // Initialize entity
index 0139f37efedb0774f1d57644d12c079c06180e89..d2bca2c689cf1ea8905a0e61c9874d5e00802e6d 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepElement_RWUniformSurfaceSection.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -55,7 +57,7 @@ void RWStepElement_RWUniformSurfaceSection::ReadStep (const Handle(StepData_Step
 
   // Own fields of UniformSurfaceSection
 
-  Standard_Real aThickness;
+  Standard_Real aThickness = NAN;
   data->ReadReal (num, 4, "thickness", ach, aThickness);
 
   StepElement_MeasureOrUnspecifiedValue aBendingThickness;
index 2314541eeb14ad1b4350fffd05531dddfed2929c..f61fcb416445b5504b072ec60a0b3167d4e20436 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepFEA_RWConstantSurface3dElementCoordinateSystem.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -49,10 +51,10 @@ void RWStepFEA_RWConstantSurface3dElementCoordinateSystem::ReadStep (const Handl
 
   // Own fields of ConstantSurface3dElementCoordinateSystem
 
-  Standard_Integer aAxis;
+  Standard_Integer aAxis = 0;
   data->ReadInteger (num, 2, "axis", ach, aAxis);
 
-  Standard_Real aAngle;
+  Standard_Real aAngle = NAN;
   data->ReadReal (num, 3, "angle", ach, aAngle);
 
   // Initialize entity
index cb8e953848f16cb89498cbbe980940c6c63a4496..00460554729d4225b8ecd3882ceb502a5053e24b 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepFEA_RWCurveElementEndOffset.hxx>
@@ -57,7 +59,7 @@ void RWStepFEA_RWCurveElementEndOffset::ReadStep (const Handle(StepData_StepRead
     aOffsetVector = new TColStd_HArray1OfReal (1, nb0);
     Standard_Integer num2 = sub2;
     for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
-      Standard_Real anIt0;
+      Standard_Real anIt0 = NAN;
       data->ReadReal (num2, i0, "real", ach, anIt0);
       aOffsetVector->SetValue(i0, anIt0);
     }
index 05d3ea4f8347c2c691a0b2779c1c3b802f5bc474..ad9c3e95d7069622a5de3a58c7563e04819a1b41 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepFEA_RWFeaAreaDensity.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -49,7 +51,7 @@ void RWStepFEA_RWFeaAreaDensity::ReadStep (const Handle(StepData_StepReaderData)
 
   // Own fields of FeaAreaDensity
 
-  Standard_Real aFeaConstant;
+  Standard_Real aFeaConstant = NAN;
   data->ReadReal (num, 2, "fea_constant", ach, aFeaConstant);
 
   // Initialize entity
index fd3920aff9ac83a963ce8dd8ab3e8b4661f5972b..39930b0fa12f1c5fd8b2b2d076f3e410d1af5419 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepFEA_RWFeaMassDensity.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -49,7 +51,7 @@ void RWStepFEA_RWFeaMassDensity::ReadStep (const Handle(StepData_StepReaderData)
 
   // Own fields of FeaMassDensity
 
-  Standard_Real aFeaConstant;
+  Standard_Real aFeaConstant = NAN;
   data->ReadReal (num, 2, "fea_constant", ach, aFeaConstant);
 
   // Initialize entity
index 1565eaf5cd8584e6af1e53ccdf65c71e5144cf11..4f4ea1e468319d0d8b188a3436c72458d9afb4f6 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepFEA_RWFeaParametricPoint.hxx>
@@ -59,7 +61,7 @@ void RWStepFEA_RWFeaParametricPoint::ReadStep (const Handle(StepData_StepReaderD
     aCoordinates = new TColStd_HArray1OfReal (1, nb0);
     Standard_Integer num2 = sub2;
     for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
-      Standard_Real anIt0;
+      Standard_Real anIt0 = NAN;
       data->ReadReal (num2, i0, "real", ach, anIt0);
       aCoordinates->SetValue(i0, anIt0);
     }
index 0b0eec712e0a09701faa1fad32104c5d2bec1ee6..8ce5e997bd70f1a092074b94358b9d64b842ab81 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -52,7 +54,7 @@ void RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion::ReadStep (const H
   StepFEA_SymmetricTensor23d aFeaConstants;
   data->ReadEntity (num, 2, "fea_constants", ach, aFeaConstants);
 
-  Standard_Real aReferenceTemperature;
+  Standard_Real aReferenceTemperature = NAN;
   data->ReadReal (num, 3, "reference_temperature", ach, aReferenceTemperature);
 
   // Initialize entity
index 376af8c8379de3d0dd0a2132e5f90f6b25dd5269..ac7978ddd1f9b996dbbdadc709b794eb36da59ee 100644 (file)
@@ -15,6 +15,8 @@
 
 // Generator:  ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepFEA_RWParametricSurface3dElementCoordinateSystem.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -49,10 +51,10 @@ void RWStepFEA_RWParametricSurface3dElementCoordinateSystem::ReadStep (const Han
 
   // Own fields of ParametricSurface3dElementCoordinateSystem
 
-  Standard_Integer aAxis;
+  Standard_Integer aAxis = 0;
   data->ReadInteger (num, 2, "axis", ach, aAxis);
 
-  Standard_Real aAngle;
+  Standard_Real aAngle = NAN;
   data->ReadReal (num, 3, "angle", ach, aAngle);
 
   // Initialize entity
index 5995c45398e9b7ca2676d883103ba1fe1a4d69e8..7bab9170f4bdbcaf1effb4fbc08b3e78efd4252e 100644 (file)
@@ -53,7 +53,7 @@ void RWStepGeom_RWBSplineCurve::ReadStep
 
        // --- own field : degree ---
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"degree",ach,aDegree);
 
@@ -61,7 +61,7 @@ void RWStepGeom_RWBSplineCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb3);
index 6faa4d6ce047d0bac3868cd00f59ad59b8b51c9c..c077285ba618c7e23d822a6b59bdba84802221d6 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <Interface_ShareTool.hxx>
@@ -63,7 +65,7 @@ void RWStepGeom_RWBSplineCurveWithKnots::ReadStep
 
        // --- inherited field : degree ---
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"degree",ach,aDegree);
 
@@ -71,7 +73,7 @@ void RWStepGeom_RWBSplineCurveWithKnots::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
     if(nb3 <1)
@@ -118,8 +120,8 @@ void RWStepGeom_RWBSplineCurveWithKnots::ReadStep
        // --- own field : knotMultiplicities ---
 
        Handle(TColStd_HArray1OfInteger) aKnotMultiplicities;
-       Standard_Integer aKnotMultiplicitiesItem;
-       Standard_Integer nsub7;
+       Standard_Integer aKnotMultiplicitiesItem = 0;
+       Standard_Integer nsub7 = 0;
        if (data->ReadSubList (num,7,"knot_multiplicities",ach,nsub7)) {
          Standard_Integer nb7 = data->NbParams(nsub7);
          aKnotMultiplicities = new TColStd_HArray1OfInteger (1, nb7);
@@ -133,8 +135,8 @@ void RWStepGeom_RWBSplineCurveWithKnots::ReadStep
        // --- own field : knots ---
 
        Handle(TColStd_HArray1OfReal) aKnots;
-       Standard_Real aKnotsItem;
-       Standard_Integer nsub8;
+       Standard_Real aKnotsItem = NAN;
+       Standard_Integer nsub8 = 0;
        if (data->ReadSubList (num,8,"knots",ach,nsub8)) {
          Standard_Integer nb8 = data->NbParams(nsub8);
          aKnots = new TColStd_HArray1OfReal (1, nb8);
@@ -257,7 +259,7 @@ void RWStepGeom_RWBSplineCurveWithKnots::Check
   if(nbMult != nbKno) {
     ach->AddFail("ERROR: No.of KnotMultiplicities not equal No.of Knots");
   }
-  Standard_Integer i;//svv Jan 10 2000: porting on DEC 
+  Standard_Integer i = 0;//svv Jan 10 2000: porting on DEC 
   for (i=1; i<=nbMult-1; i++) {
     sumMult = sumMult + ent->KnotMultiplicitiesValue(i);
   }
index 416b9c86a928b73605d40e42412bfca9dea8bb6a..4d14c4b48253045087d7699f8b7ad5af51e61cf3 100644 (file)
@@ -13,6 +13,8 @@
 
 // sln 04.10.2001. BUC61003. Correction of looking for items of complex entity
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <Interface_ShareTool.hxx>
@@ -68,7 +70,7 @@ void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::ReadStep
        // --- field : degree ---
 
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"degree",ach,aDegree);
        // --- field : controlPointsList ---
@@ -76,7 +78,7 @@ void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"control_points_list",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb2);
@@ -128,8 +130,8 @@ void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::ReadStep
        // --- field : knotMultiplicities ---
 
        Handle(TColStd_HArray1OfInteger) aKnotMultiplicities;
-       Standard_Integer aKnotMultiplicitiesItem;
-       Standard_Integer nsub6;
+       Standard_Integer aKnotMultiplicitiesItem = 0;
+       Standard_Integer nsub6 = 0;
        if (data->ReadSubList (num,1,"knot_multiplicities",ach,nsub6)) {
          Standard_Integer nb6 = data->NbParams(nsub6);
          aKnotMultiplicities = new TColStd_HArray1OfInteger (1, nb6);
@@ -143,8 +145,8 @@ void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::ReadStep
        // --- field : knots ---
 
        Handle(TColStd_HArray1OfReal) aKnots;
-       Standard_Real aKnotsItem;
-       Standard_Integer nsub7;
+       Standard_Real aKnotsItem = NAN;
+       Standard_Integer nsub7 = 0;
        if (data->ReadSubList (num,2,"knots",ach,nsub7)) {
          Standard_Integer nb7 = data->NbParams(nsub7);
          aKnots = new TColStd_HArray1OfReal (1, nb7);
@@ -190,8 +192,8 @@ void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::ReadStep
        // --- field : weightsData ---
 
        Handle(TColStd_HArray1OfReal) aWeightsData;
-       Standard_Real aWeightsDataItem;
-       Standard_Integer nsub9;
+       Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub9 = 0;
        if (data->ReadSubList (num,1,"weights_data",ach,nsub9)) {
          Standard_Integer nb9 = data->NbParams(nsub9);
          aWeightsData = new TColStd_HArray1OfReal (1, nb9);
@@ -333,7 +335,7 @@ void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::Check
    const Interface_ShareTool& aShto,
    Handle(Interface_Check)& ach) const
 {
-  Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) aRationalBSC = ent;
+  const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& aRationalBSC = ent;
   Handle(StepGeom_BSplineCurveWithKnots) aBSCWK =
     aRationalBSC->BSplineCurveWithKnots();
   RWStepGeom_RWBSplineCurveWithKnots t1;
index 51876da8fe7342b132593f211df6a506a69b5d41..04764f543e743b0bfa1c54304363bcfcb2904c99 100644 (file)
@@ -58,13 +58,13 @@ void RWStepGeom_RWBSplineSurface::ReadStep
 
        // --- own field : uDegree ---
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"u_degree",ach,aUDegree);
 
        // --- own field : vDegree ---
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadInteger (num,3,"v_degree",ach,aVDegree);
 
@@ -72,13 +72,13 @@ void RWStepGeom_RWBSplineSurface::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent4;
-       Standard_Integer nsub4;
+       Standard_Integer nsub4 = 0;
        if (data->ReadSubList (num,4,"control_points_list",ach,nsub4)) {
          Standard_Integer nbi4 = data->NbParams(nsub4);
          Standard_Integer nbj4 = data->NbParams(data->ParamNumber(nsub4,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi4, 1, nbj4);
          for (Standard_Integer i4 = 1; i4 <= nbi4; i4 ++) {
-           Standard_Integer nsi4;
+           Standard_Integer nsi4 = 0;
            if (data->ReadSubList (nsub4,i4,"sub-part(control_points_list)",ach,nsi4)) {
              for (Standard_Integer j4 =1; j4 <= nbj4; j4 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
index 77203c6dddb501ab93e19bd10b4d4bb66a9ee361..2d20d2d7b312a9e2551d715ef2133e1dc37b3036 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <Interface_ShareTool.hxx>
@@ -68,13 +70,13 @@ void RWStepGeom_RWBSplineSurfaceWithKnots::ReadStep
 
        // --- inherited field : uDegree ---
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"u_degree",ach,aUDegree);
 
        // --- inherited field : vDegree ---
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadInteger (num,3,"v_degree",ach,aVDegree);
 
@@ -82,13 +84,13 @@ void RWStepGeom_RWBSplineSurfaceWithKnots::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent4;
-       Standard_Integer nsub4;
+       Standard_Integer nsub4 = 0;
        if (data->ReadSubList (num,4,"control_points_list",ach,nsub4)) {
          Standard_Integer nbi4 = data->NbParams(nsub4);
          Standard_Integer nbj4 = data->NbParams(data->ParamNumber(nsub4,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi4, 1, nbj4);
          for (Standard_Integer i4 = 1; i4 <= nbi4; i4 ++) {
-           Standard_Integer nsi4;
+           Standard_Integer nsi4 = 0;
            if (data->ReadSubList (nsub4,i4,"sub-part(control_points_list)",ach,nsi4)) {
              for (Standard_Integer j4 =1; j4 <= nbj4; j4 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
@@ -141,8 +143,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnots::ReadStep
        // --- own field : uMultiplicities ---
 
        Handle(TColStd_HArray1OfInteger) aUMultiplicities;
-       Standard_Integer aUMultiplicitiesItem;
-       Standard_Integer nsub9;
+       Standard_Integer aUMultiplicitiesItem = 0;
+       Standard_Integer nsub9 = 0;
        if (data->ReadSubList (num,9,"u_multiplicities",ach,nsub9)) {
          Standard_Integer nb9 = data->NbParams(nsub9);
          aUMultiplicities = new TColStd_HArray1OfInteger (1, nb9);
@@ -156,8 +158,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnots::ReadStep
        // --- own field : vMultiplicities ---
 
        Handle(TColStd_HArray1OfInteger) aVMultiplicities;
-       Standard_Integer aVMultiplicitiesItem;
-       Standard_Integer nsub10;
+       Standard_Integer aVMultiplicitiesItem = 0;
+       Standard_Integer nsub10 = 0;
        if (data->ReadSubList (num,10,"v_multiplicities",ach,nsub10)) {
          Standard_Integer nb10 = data->NbParams(nsub10);
          aVMultiplicities = new TColStd_HArray1OfInteger (1, nb10);
@@ -171,8 +173,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnots::ReadStep
        // --- own field : uKnots ---
 
        Handle(TColStd_HArray1OfReal) aUKnots;
-       Standard_Real aUKnotsItem;
-       Standard_Integer nsub11;
+       Standard_Real aUKnotsItem = NAN;
+       Standard_Integer nsub11 = 0;
        if (data->ReadSubList (num,11,"u_knots",ach,nsub11)) {
          Standard_Integer nb11 = data->NbParams(nsub11);
          aUKnots = new TColStd_HArray1OfReal (1, nb11);
@@ -186,8 +188,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnots::ReadStep
        // --- own field : vKnots ---
 
        Handle(TColStd_HArray1OfReal) aVKnots;
-       Standard_Real aVKnotsItem;
-       Standard_Integer nsub12;
+       Standard_Real aVKnotsItem = NAN;
+       Standard_Integer nsub12 = 0;
        if (data->ReadSubList (num,12,"v_knots",ach,nsub12)) {
          Standard_Integer nb12 = data->NbParams(nsub12);
          aVKnots = new TColStd_HArray1OfReal (1, nb12);
@@ -350,7 +352,7 @@ void RWStepGeom_RWBSplineSurfaceWithKnots::Check
   Standard_Integer nbKnoV  = ent->NbVKnots();
   Standard_Integer sumMulU = 0;
   Standard_Integer sumMulV = 0;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 //  std::cout << "BSplineSurfaceWithKnots: nbMulU=" << nbMulU << " nbKnoU= " << 
 //    nbKnoU << " nbCPLU= " << nbCPLU << " degreeU= " << dgBSSU << std::endl;
 //  std::cout << "                         nbMulV=" << nbMulV << " nbKnoV= " << 
index 1e106df80a18b118e6792e9029f0e35033ed41fb..5351c1b0ab64dba0a93bc28de0cec34cf76e1f14 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <Interface_ShareTool.hxx>
@@ -70,13 +72,13 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
        // --- field : uDegree ---
 
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"u_degree",ach,aUDegree);
        // --- field : vDegree ---
 
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"v_degree",ach,aVDegree);
        // --- field : controlPointsList ---
@@ -84,13 +86,13 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nbi3 = data->NbParams(nsub3);
          Standard_Integer nbj3 = data->NbParams(data->ParamNumber(nsub3,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi3, 1, nbj3);
          for (Standard_Integer i3 = 1; i3 <= nbi3; i3 ++) {
-           Standard_Integer nsi3temp;
+           Standard_Integer nsi3temp = 0;
            if (data->ReadSubList (nsub3,i3,"sub-part(control_points_list)",ach,nsi3temp)) {
              Standard_Integer nsi3 = data->ParamNumber(nsub3,i3);
              for (Standard_Integer j3 =1; j3 <= nbj3; j3 ++) {
@@ -152,8 +154,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
        // --- field : uMultiplicities ---
 
        Handle(TColStd_HArray1OfInteger) aUMultiplicities;
-       Standard_Integer aUMultiplicitiesItem;
-       Standard_Integer nsub8;
+       Standard_Integer aUMultiplicitiesItem = 0;
+       Standard_Integer nsub8 = 0;
        if (data->ReadSubList (num,1,"u_multiplicities",ach,nsub8)) {
          Standard_Integer nb8 = data->NbParams(nsub8);
          aUMultiplicities = new TColStd_HArray1OfInteger (1, nb8);
@@ -167,8 +169,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
        // --- field : vMultiplicities ---
 
        Handle(TColStd_HArray1OfInteger) aVMultiplicities;
-       Standard_Integer aVMultiplicitiesItem;
-       Standard_Integer nsub9;
+       Standard_Integer aVMultiplicitiesItem = 0;
+       Standard_Integer nsub9 = 0;
        if (data->ReadSubList (num,2,"v_multiplicities",ach,nsub9)) {
          Standard_Integer nb9 = data->NbParams(nsub9);
          aVMultiplicities = new TColStd_HArray1OfInteger (1, nb9);
@@ -182,8 +184,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
        // --- field : uKnots ---
 
        Handle(TColStd_HArray1OfReal) aUKnots;
-       Standard_Real aUKnotsItem;
-       Standard_Integer nsub10;
+       Standard_Real aUKnotsItem = NAN;
+       Standard_Integer nsub10 = 0;
        if (data->ReadSubList (num,3,"u_knots",ach,nsub10)) {
          Standard_Integer nb10 = data->NbParams(nsub10);
          aUKnots = new TColStd_HArray1OfReal (1, nb10);
@@ -197,8 +199,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
        // --- field : vKnots ---
 
        Handle(TColStd_HArray1OfReal) aVKnots;
-       Standard_Real aVKnotsItem;
-       Standard_Integer nsub11;
+       Standard_Real aVKnotsItem = NAN;
+       Standard_Integer nsub11 = 0;
        if (data->ReadSubList (num,4,"v_knots",ach,nsub11)) {
          Standard_Integer nb11 = data->NbParams(nsub11);
          aVKnots = new TColStd_HArray1OfReal (1, nb11);
@@ -235,14 +237,14 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
        // --- field : weightsData ---
 
        Handle(TColStd_HArray2OfReal) aWeightsData;
-         Standard_Real aWeightsDataItem;
-       Standard_Integer nsub13;
+         Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub13 = 0;
        if (data->ReadSubList (num,1,"weights_data",ach,nsub13)) {
          Standard_Integer nbi13 = data->NbParams(nsub13);
          Standard_Integer nbj13 = data->NbParams(data->ParamNumber(nsub13,1));
          aWeightsData = new TColStd_HArray2OfReal (1,nbi13,1,nbj13);
          for (Standard_Integer i13 = 1; i13 <= nbi13; i13 ++) {
-           Standard_Integer nsi13temp;
+           Standard_Integer nsi13temp = 0;
            if (data->ReadSubList (nsub13,i13,"sub-part(weights_data)",ach,nsi13temp)) {
              Standard_Integer nsi13 = data->ParamNumber(nsub13,i13);
              for (Standard_Integer j13 =1; j13 <= nbj13; j13 ++) {
@@ -432,7 +434,7 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::Check
    const Interface_ShareTool& aShto,
    Handle(Interface_Check)& ach) const
 {
-  Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) aRationalBSS = ent;
+  const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& aRationalBSS = ent;
   Handle(StepGeom_BSplineSurfaceWithKnots) aBSSWK =
     aRationalBSS->BSplineSurfaceWithKnots();
   RWStepGeom_RWBSplineSurfaceWithKnots t1;
index 05b4e4afc0a49814ec95cd5f11a1ec96f21eefad..c78d9335529c3835f850eae0556ebdcb8688042e 100644 (file)
@@ -52,7 +52,7 @@ void RWStepGeom_RWBezierCurve::ReadStep
 
        // --- inherited field : degree ---
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"degree",ach,aDegree);
 
@@ -60,7 +60,7 @@ void RWStepGeom_RWBezierCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb3);
index 4e5c51589d4eb175fe63203b7e49953e7ccded8a..43a8c8a22ecc91579223dcf0e7be125e9357082b 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWBezierCurveAndRationalBSplineCurve.hxx>
@@ -61,7 +63,7 @@ void RWStepGeom_RWBezierCurveAndRationalBSplineCurve::ReadStep
        // --- field : degree ---
 
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"degree",ach,aDegree);
        // --- field : controlPointsList ---
@@ -69,7 +71,7 @@ void RWStepGeom_RWBezierCurveAndRationalBSplineCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"control_points_list",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb2);
@@ -130,8 +132,8 @@ void RWStepGeom_RWBezierCurveAndRationalBSplineCurve::ReadStep
        // --- field : weightsData ---
 
        Handle(TColStd_HArray1OfReal) aWeightsData;
-       Standard_Real aWeightsDataItem;
-       Standard_Integer nsub6;
+       Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub6 = 0;
        if (data->ReadSubList (num,1,"weights_data",ach,nsub6)) {
          Standard_Integer nb6 = data->NbParams(nsub6);
          aWeightsData = new TColStd_HArray1OfReal (1, nb6);
index 99ed6a5ed1ced8a003469b6a4c2606bf92675167..20dbeeb8bbb82cb5665a31e0dcad372e186c521a 100644 (file)
@@ -57,13 +57,13 @@ void RWStepGeom_RWBezierSurface::ReadStep
 
        // --- inherited field : uDegree ---
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"u_degree",ach,aUDegree);
 
        // --- inherited field : vDegree ---
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadInteger (num,3,"v_degree",ach,aVDegree);
 
@@ -71,13 +71,13 @@ void RWStepGeom_RWBezierSurface::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent4;
-       Standard_Integer nsub4;
+       Standard_Integer nsub4 = 0;
        if (data->ReadSubList (num,4,"control_points_list",ach,nsub4)) {
          Standard_Integer nbi4 = data->NbParams(nsub4);
          Standard_Integer nbj4 = data->NbParams(data->ParamNumber(nsub4,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi4, 1, nbj4);
          for (Standard_Integer i4 = 1; i4 <= nbi4; i4 ++) {
-           Standard_Integer nsi4;
+           Standard_Integer nsi4 = 0;
            if (data->ReadSubList (nsub4,i4,"sub-part(control_points_list)",ach,nsi4)) {
              for (Standard_Integer j4 =1; j4 <= nbj4; j4 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
index 6886954cb60370ce2d89778aff47e4ac6099e8fa..7ecafe3417596f4277eae15927c90de37b7f4b03 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.hxx>
@@ -66,13 +68,13 @@ void RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface::ReadStep
        // --- field : uDegree ---
 
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"u_degree",ach,aUDegree);
        // --- field : vDegree ---
 
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"v_degree",ach,aVDegree);
        // --- field : controlPointsList ---
@@ -80,13 +82,13 @@ void RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nbi3 = data->NbParams(nsub3);
          Standard_Integer nbj3 = data->NbParams(data->ParamNumber(nsub3,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi3, 1, nbj3);
          for (Standard_Integer i3 = 1; i3 <= nbi3; i3 ++) {
-           Standard_Integer nsi3;
+           Standard_Integer nsi3 = 0;
            if (data->ReadSubList (nsub3,i3,"sub-part(control_points_list)",ach,nsi3)) {
              for (Standard_Integer j3 =1; j3 <= nbj3; j3 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
@@ -152,14 +154,14 @@ void RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface::ReadStep
        // --- field : weightsData ---
 
        Handle(TColStd_HArray2OfReal) aWeightsData;
-         Standard_Real aWeightsDataItem;
-       Standard_Integer nsub8;
+         Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub8 = 0;
        if (data->ReadSubList (num,1,"items",ach,nsub8)) {
          Standard_Integer nbi8 = data->NbParams(nsub8);
          Standard_Integer nbj8 = data->NbParams(data->ParamNumber(nsub8,1));
          aWeightsData = new TColStd_HArray2OfReal (1,nbi8,1,nbj8);
          for (Standard_Integer i8 = 1; i8 <= nbi8; i8 ++) {
-           Standard_Integer nsi8;
+           Standard_Integer nsi8 = 0;
            if (data->ReadSubList(nsub8,i8,"sub-part(weights_data)",ach,nsi8)){
              for (Standard_Integer j8 =1; j8 <= nbj8; j8 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
index 26c7909c3cb4f0252c25ea1ee8c3eae361c91158..2f01f54e95a1cb0b2f042a34545e690ce6190488 100644 (file)
@@ -45,7 +45,7 @@ void RWStepGeom_RWBoundaryCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCompositeCurveSegment) aSegments;
        Handle(StepGeom_CompositeCurveSegment) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"segments",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aSegments = new StepGeom_HArray1OfCompositeCurveSegment (1, nb2);
index 580d39438cd8650cab5f4e49e2f3d498a43bb22c..67ad71d3d3f3b3575384414ff0ed9923c8cc7c86 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <RWStepGeom_RWCartesianPoint.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -48,8 +50,8 @@ void RWStepGeom_RWCartesianPoint::ReadStep
        //  OPTIMISED : X Y Z directly read and set
 
 //     Handle(TColStd_HArray1OfReal) aCoordinates;
-       Standard_Real aCoordinatesItem;
-       Standard_Integer nsub2, nbcoord=0;
+       Standard_Real aCoordinatesItem = NAN;
+       Standard_Integer nsub2 = 0, nbcoord=0;
        Standard_Real XYZ[3] = {0.,0.,0.};
        if (data->ReadSubList (num,2,"coordinates",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
index fb4e7d1dcbdefd095d17e72b431f3d3b652aa38d..5467b18695bc73cf13402e7e0ba9eba86423eb69 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWCartesianTransformationOperator.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -78,7 +80,7 @@ void RWStepGeom_RWCartesianTransformationOperator::ReadStep
 
        // --- own field : scale ---
 
-       Standard_Real aScale;
+       Standard_Real aScale = NAN;
        Standard_Boolean hasAscale = Standard_True;
        if (data->IsParamDefined(num,7)) {
          //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
index 0fff525e63bc31c71eff29a0218ebd1ec8279b6d..6059ada3f30fb7088e30ca1dd2c37dba0f6f82f5 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWCartesianTransformationOperator3d.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -78,7 +80,7 @@ void RWStepGeom_RWCartesianTransformationOperator3d::ReadStep
 
        // --- inherited field : scale ---
 
-       Standard_Real aScale;
+       Standard_Real aScale = NAN;
        Standard_Boolean hasAscale = Standard_True;
        if (data->IsParamDefined(num,7)) {
          //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
index 63ba5708e81853954a90140f50ae9e64f3317851..f49e76acbdef38e3ee35b6f2ff485f3df09cff2c 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWCircle.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -46,7 +48,7 @@ void RWStepGeom_RWCircle::ReadStep
 
        // --- own field : radius ---
 
-       Standard_Real aRadius;
+       Standard_Real aRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"radius",ach,aRadius);
 
index 49304aa7d62ff1766895e39d46bf996e237dda06..61b5756a7fe43cc36a119bac07ff8e1e8b8fc990 100644 (file)
@@ -45,7 +45,7 @@ void RWStepGeom_RWCompositeCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCompositeCurveSegment) aSegments;
        Handle(StepGeom_CompositeCurveSegment) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"segments",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aSegments = new StepGeom_HArray1OfCompositeCurveSegment (1, nb2);
index 304d83a6495b2865717b82695fac8a4c27c5f22d..8719de47c513c18489b884c99e804a0569f753e3 100644 (file)
@@ -45,7 +45,7 @@ void RWStepGeom_RWCompositeCurveOnSurface::ReadStep
 
        Handle(StepGeom_HArray1OfCompositeCurveSegment) aSegments;
        Handle(StepGeom_CompositeCurveSegment) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"segments",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aSegments = new StepGeom_HArray1OfCompositeCurveSegment (1, nb2);
index 70b22306cb6dfa35be4b822403abcd4e80dff0b9..3e39dee7493eac67e57c39e944a2bc728cb8f11e 100644 (file)
@@ -56,7 +56,7 @@ void RWStepGeom_RWCompositeCurveSegment::ReadStep
 
        // --- own field : sameSense ---
 
-       Standard_Boolean aSameSense;
+       Standard_Boolean aSameSense = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadBoolean (num,2,"same_sense",ach,aSameSense);
 
index 93d2f593a38bbfac00fe01f309a4dcc926884ea7..ffa64c0b5ae3445ed379c7a0e706826161b34d23 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWConicalSurface.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,13 +49,13 @@ void RWStepGeom_RWConicalSurface::ReadStep
 
        // --- own field : radius ---
 
-       Standard_Real aRadius;
+       Standard_Real aRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"radius",ach,aRadius);
 
        // --- own field : semiAngle ---
 
-       Standard_Real aSemiAngle;
+       Standard_Real aSemiAngle = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"semi_angle",ach,aSemiAngle);
 
index 34f9dba1520c59810936dcfe01cc7cebdd88d6b5..9f49e3736022d3abb2f66d072f4969fcfc782c5e 100644 (file)
@@ -70,7 +70,7 @@ void RWStepGeom_RWCurveBoundedSurface::ReadStep (const Handle(StepData_StepReade
     }
   }
 
-  Standard_Boolean aImplicitOuter;
+  Standard_Boolean aImplicitOuter = 0;
   data->ReadBoolean (num, 4, "implicit_outer", ach, aImplicitOuter);
 
   // Initialize entity
index 4f11e645c587c3aa191f82d0986f9d4bb33f19f9..e3a347e32ce9973cb94c58180d2eb766525abf04 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWCylindricalSurface.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,7 +49,7 @@ void RWStepGeom_RWCylindricalSurface::ReadStep
 
        // --- own field : radius ---
 
-       Standard_Real aRadius;
+       Standard_Real aRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"radius",ach,aRadius);
 
index 09883e1e14f817388506b174259c05e4d0c41e8a..3edb7bf9a68fa1d033c2ae6d85f7b9811987e683 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWDegenerateToroidalSurface.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,19 +49,19 @@ void RWStepGeom_RWDegenerateToroidalSurface::ReadStep
 
        // --- inherited field : majorRadius ---
 
-       Standard_Real aMajorRadius;
+       Standard_Real aMajorRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"major_radius",ach,aMajorRadius);
 
        // --- inherited field : minorRadius ---
 
-       Standard_Real aMinorRadius;
+       Standard_Real aMinorRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"minor_radius",ach,aMinorRadius);
 
        // --- own field : selectOuter ---
 
-       Standard_Boolean aSelectOuter;
+       Standard_Boolean aSelectOuter = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
        data->ReadBoolean (num,5,"select_outer",ach,aSelectOuter);
 
index 2e4fc49a3743a583f9f36faf4c82e6e0034cb2f0..380db3979be5757efc2b69a2dca2207707cbf7f4 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_ShareTool.hxx>
 #include <RWStepGeom_RWDirection.hxx>
@@ -43,8 +45,8 @@ void RWStepGeom_RWDirection::ReadStep
        // --- own field : directionRatios ---
 
        Handle(TColStd_HArray1OfReal) aDirectionRatios;
-       Standard_Real aDirectionRatiosItem;
-       Standard_Integer nsub2;
+       Standard_Real aDirectionRatiosItem = NAN;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"direction_ratios",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aDirectionRatios = new TColStd_HArray1OfReal (1, nb2);
@@ -87,7 +89,7 @@ void  RWStepGeom_RWDirection::Check
    Handle(Interface_Check)& ach) const
 {
   Standard_Integer nbVal = ent->NbDirectionRatios();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i=1; i<=nbVal; i++) {
     if(Abs(ent->DirectionRatiosValue(i)) >= RealEpsilon())  break;
   }
index 7831cd01c8802b6797fe88617cf5f660c574e707..c60dd5732c023feb9872ca0feeadacca966bef70 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <Interface_ShareTool.hxx>
 #include <RWStepGeom_RWEllipse.hxx>
@@ -47,13 +49,13 @@ void RWStepGeom_RWEllipse::ReadStep
 
        // --- own field : semiAxis1 ---
 
-       Standard_Real aSemiAxis1;
+       Standard_Real aSemiAxis1 = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"semi_axis_1",ach,aSemiAxis1);
 
        // --- own field : semiAxis2 ---
 
-       Standard_Real aSemiAxis2;
+       Standard_Real aSemiAxis2 = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"semi_axis_2",ach,aSemiAxis2);
 
index 08e5798e3f594d10f4d89278b9ec6b7ced24dfb2..83a229883d155d807aecc9ffc4634e60bab8384e 100644 (file)
@@ -38,7 +38,7 @@ void RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::ReadS
   
   // --- field : coordinateSpaceDimension ---
   
-  Standard_Integer aCoordinateSpaceDimension;
+  Standard_Integer aCoordinateSpaceDimension = 0;
   //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
   data->ReadInteger (num,1,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
 
@@ -54,7 +54,7 @@ void RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::ReadS
   
   Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit) aUncertainty;
   Handle(StepBasic_UncertaintyMeasureWithUnit) anent3;
-  Standard_Integer nsub3;
+  Standard_Integer nsub3 = 0;
   if (data->ReadSubList (num,1,"uncertainty",ach,nsub3)) {
     Standard_Integer nb3 = data->NbParams(nsub3);
     aUncertainty = new StepBasic_HArray1OfUncertaintyMeasureWithUnit (1, nb3);
@@ -78,7 +78,7 @@ void RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::ReadS
   
   Handle(StepBasic_HArray1OfNamedUnit) aUnits;
   Handle(StepBasic_NamedUnit) anent2;
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,1,"units",ach,nsub2)) {
     Standard_Integer nb2 = data->NbParams(nsub2);
     aUnits = new StepBasic_HArray1OfNamedUnit (1, nb2);
index b825e9367c39cc0f58a9801ad3f8e88aead38000..851ee0dc3bba1b52c8e0cb3c181752c8879dca14 100644 (file)
@@ -45,7 +45,7 @@ void RWStepGeom_RWGeometricRepresentationContext::ReadStep
 
        // --- own field : coordinateSpaceDimension ---
 
-       Standard_Integer aCoordinateSpaceDimension;
+       Standard_Integer aCoordinateSpaceDimension = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadInteger (num,3,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
 
index 75877c9fc779e65cee07bc336b1d9c85bb6d89a0..b51d6185f6c055ec279dd4a3954c6883f8cb40bd 100644 (file)
@@ -37,7 +37,7 @@ void RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext::Re
 
        // --- field : coordinateSpaceDimension ---
 
-       Standard_Integer aCoordinateSpaceDimension;
+       Standard_Integer aCoordinateSpaceDimension = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
 
@@ -51,7 +51,7 @@ void RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext::Re
 
        Handle(StepBasic_HArray1OfNamedUnit) aUnits;
        Handle(StepBasic_NamedUnit) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,1,"units",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aUnits = new StepBasic_HArray1OfNamedUnit (1, nb2);
index d6375e17e7367b4e05bb3949419bf4e2ef49e903..eb09118c8cce949d0bb48dbb40bff7f69d0b2032 100644 (file)
@@ -36,7 +36,7 @@ void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationConte
 
        // --- field : coordinateSpaceDimension ---
 
-       Standard_Integer aCoordinateSpaceDimension;
+       Standard_Integer aCoordinateSpaceDimension = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
 
index 545b525494237c04e34263d2a23d0f2f7f53774e..a8a7c1a9d8a3af534556a68b1310cf8cb6fd4cf2 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWHyperbola.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -46,13 +48,13 @@ void RWStepGeom_RWHyperbola::ReadStep
 
        // --- own field : semiAxis ---
 
-       Standard_Real aSemiAxis;
+       Standard_Real aSemiAxis = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"semi_axis",ach,aSemiAxis);
 
        // --- own field : semiImagAxis ---
 
-       Standard_Real aSemiImagAxis;
+       Standard_Real aSemiImagAxis = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"semi_imag_axis",ach,aSemiImagAxis);
 
index b3d8b4a5c76e1f47ed0c145fed3c18abfe775ef3..8611248a6e7e19313ce89f03f19956a4fe4319d2 100644 (file)
@@ -56,7 +56,7 @@ void RWStepGeom_RWIntersectionCurve::ReadStep
 
        Handle(StepGeom_HArray1OfPcurveOrSurface) aAssociatedGeometry;
        StepGeom_PcurveOrSurface aAssociatedGeometryItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"associated_geometry",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aAssociatedGeometry = new StepGeom_HArray1OfPcurveOrSurface (1, nb3);
index dc2c1273a9eba51ab6d6acd1f0c66b644c02cc23..4165d0643bf9da0458a14e718e739f9f000342bb 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWOffsetCurve3d.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,7 +49,7 @@ void RWStepGeom_RWOffsetCurve3d::ReadStep
 
        // --- own field : distance ---
 
-       Standard_Real aDistance;
+       Standard_Real aDistance = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"distance",ach,aDistance);
 
index 38d92087132704d01f5b7122ef766f29cdcbc3f4..3083aa321960d19ec25eec1585d2a9f9e134d26c 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWOffsetSurface.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,7 +49,7 @@ void RWStepGeom_RWOffsetSurface::ReadStep
 
        // --- own field : distance ---
 
-       Standard_Real aDistance;
+       Standard_Real aDistance = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"distance",ach,aDistance);
 
index e73a4e6f4ceeed27fc2112251d033fbab4c5fd42..71791e374591c8c3b1a9d56f32296a026702ebdc 100644 (file)
@@ -49,7 +49,7 @@ void RWStepGeom_RWOrientedSurface::ReadStep (const Handle(StepData_StepReaderDat
 
   // Own fields of OrientedSurface
 
-  Standard_Boolean aOrientation;
+  Standard_Boolean aOrientation = 0;
   data->ReadBoolean (num, 2, "orientation", ach, aOrientation);
 
   // Initialize entity
index 4a1be8785894b35f48ce13716d556d3cc57d0f40..a52a23f2a0a2d34346dcdd690f2ecedb40ba987d 100644 (file)
@@ -43,7 +43,7 @@ void RWStepGeom_RWOuterBoundaryCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCompositeCurveSegment) aSegments;
        Handle(StepGeom_CompositeCurveSegment) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"segments",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aSegments = new StepGeom_HArray1OfCompositeCurveSegment (1, nb2);
index 835bfc07424b849bd6e6f6f8f40b8800e8afe394..88529c4eae05d3d72ef5e87b0881f63561ef0ae6 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWParabola.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -46,7 +48,7 @@ void RWStepGeom_RWParabola::ReadStep
 
        // --- own field : focalDist ---
 
-       Standard_Real aFocalDist;
+       Standard_Real aFocalDist = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"focal_dist",ach,aFocalDist);
 
index 8b24e8713e53651cac014363fcb781e6922f8a2a..e7061b6d668c66fc16e423138e292bd1cc542dbb 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWPointOnCurve.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,7 +49,7 @@ void RWStepGeom_RWPointOnCurve::ReadStep
 
        // --- own field : pointParameter ---
 
-       Standard_Real aPointParameter;
+       Standard_Real aPointParameter = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"point_parameter",ach,aPointParameter);
 
index 39231261357974df9ffe706481be7d62e998ba6d..2662772cd8c97f1fb210a434b273712ab8fb3467 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWPointOnSurface.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,13 +49,13 @@ void RWStepGeom_RWPointOnSurface::ReadStep
 
        // --- own field : pointParameterU ---
 
-       Standard_Real aPointParameterU;
+       Standard_Real aPointParameterU = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"point_parameter_u",ach,aPointParameterU);
 
        // --- own field : pointParameterV ---
 
-       Standard_Real aPointParameterV;
+       Standard_Real aPointParameterV = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"point_parameter_v",ach,aPointParameterV);
 
index 2db0c34ba7e2d59130194beb97f6a576f0878d12..08d2413360dde05f3632b9885acae94c4c259d93 100644 (file)
@@ -43,7 +43,7 @@ void RWStepGeom_RWPolyline::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aPoints;
        Handle(StepGeom_CartesianPoint) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"points",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aPoints = new StepGeom_HArray1OfCartesianPoint (1, nb2);
index fc8b9dafd233d387e4c58e7755d83e67f953eb9e..819c0f59a8514284f758bbf98a246092b47ab62a 100644 (file)
@@ -49,7 +49,7 @@ void RWStepGeom_RWQuasiUniformCurve::ReadStep
 
        // --- inherited field : degree ---
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"degree",ach,aDegree);
 
@@ -57,7 +57,7 @@ void RWStepGeom_RWQuasiUniformCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb3);
index c0ad975c19b2660bcf14011ca6d4bbb0400353fe..a003729cac12a6dafd368208a812e9e651f4b936 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.hxx>
@@ -52,7 +54,7 @@ void RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve::ReadStep
        // --- field : degree ---
 
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"degree",ach,aDegree);
        // --- field : controlPointsList ---
@@ -60,7 +62,7 @@ void RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"control_points_list",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb2);
@@ -127,8 +129,8 @@ void RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve::ReadStep
        // --- field : weightsData ---
 
        Handle(TColStd_HArray1OfReal) aWeightsData;
-       Standard_Real aWeightsDataItem;
-       Standard_Integer nsub6;
+       Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub6 = 0;
        if (data->ReadSubList (num,1,"weights_data",ach,nsub6)) {
          Standard_Integer nb6 = data->NbParams(nsub6);
          aWeightsData = new TColStd_HArray1OfReal (1, nb6);
index 344e58c6e99d292be73d16214a0891506f2c405b..459f496a6897c6c76e8a930787a070c8932369a7 100644 (file)
@@ -54,13 +54,13 @@ void RWStepGeom_RWQuasiUniformSurface::ReadStep
 
        // --- inherited field : uDegree ---
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"u_degree",ach,aUDegree);
 
        // --- inherited field : vDegree ---
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadInteger (num,3,"v_degree",ach,aVDegree);
 
@@ -68,13 +68,13 @@ void RWStepGeom_RWQuasiUniformSurface::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent4;
-       Standard_Integer nsub4;
+       Standard_Integer nsub4 = 0;
        if (data->ReadSubList (num,4,"control_points_list",ach,nsub4)) {
          Standard_Integer nbi4 = data->NbParams(nsub4);
          Standard_Integer nbj4 = data->NbParams(data->ParamNumber(nsub4,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi4, 1, nbj4);
          for (Standard_Integer i4 = 1; i4 <= nbi4; i4 ++) {
-           Standard_Integer nsi4;
+           Standard_Integer nsi4 = 0;
            if (data->ReadSubList (nsub4,i4,"sub-part(control_points_list)",ach,nsi4)) {
              for (Standard_Integer j4 =1; j4 <= nbj4; j4 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
index 5adb28f313ebfdfc24bc5d86ad7ed79d28c97c95..6cd98788dd9cf5bfac977ca802c3f6cf46fe5817 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.hxx>
@@ -57,13 +59,13 @@ void RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface::ReadStep
        // --- field : uDegree ---
 
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"u_degree",ach,aUDegree);
        // --- field : vDegree ---
 
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"v_degree",ach,aVDegree);
        // --- field : controlPointsList ---
@@ -71,13 +73,13 @@ void RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nbi3 = data->NbParams(nsub3);
          Standard_Integer nbj3 = data->NbParams(data->ParamNumber(nsub3,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi3, 1, nbj3);
          for (Standard_Integer i3 = 1; i3 <= nbi3; i3 ++) {
-           Standard_Integer nsi3;
+           Standard_Integer nsi3 = 0;
            if (data->ReadSubList (nsub3,i3,"sub-part(control_points_list)",ach,nsi3)) {
              for (Standard_Integer j3 =1; j3 <= nbj3; j3 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
@@ -149,14 +151,14 @@ void RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface::ReadStep
        // --- field : weightsData ---
 
        Handle(TColStd_HArray2OfReal) aWeightsData;
-         Standard_Real aWeightsDataItem;
-       Standard_Integer nsub8;
+         Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub8 = 0;
        if (data->ReadSubList (num,1,"weights_data",ach,nsub8)) {
          Standard_Integer nbi8 = data->NbParams(nsub8);
          Standard_Integer nbj8 = data->NbParams(data->ParamNumber(nsub8,1));
          aWeightsData = new TColStd_HArray2OfReal (1,nbi8,1,nbj8);
          for (Standard_Integer i8 = 1; i8 <= nbi8; i8 ++) {
-           Standard_Integer nsi8;
+           Standard_Integer nsi8 = 0;
            if (data->ReadSubList (nsub8,i8,"sub-part(weights_data)",ach,nsi8)) {
              for (Standard_Integer j8 =1; j8 <= nbj8; j8 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
index bae56fa1ef863805ec242c84e24555e286a65469..e4f452ab8d620da92e9a55b88721f12c9a68e52b 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <Interface_ShareTool.hxx>
@@ -51,7 +53,7 @@ void RWStepGeom_RWRationalBSplineCurve::ReadStep
 
        // --- inherited field : degree ---
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"degree",ach,aDegree);
 
@@ -59,7 +61,7 @@ void RWStepGeom_RWRationalBSplineCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb3);
@@ -101,8 +103,8 @@ void RWStepGeom_RWRationalBSplineCurve::ReadStep
        // --- own field : weightsData ---
 
        Handle(TColStd_HArray1OfReal) aWeightsData;
-       Standard_Real aWeightsDataItem;
-       Standard_Integer nsub7;
+       Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub7 = 0;
        if (data->ReadSubList (num,7,"weights_data",ach,nsub7)) {
          Standard_Integer nb7 = data->NbParams(nsub7);
          aWeightsData = new TColStd_HArray1OfReal (1, nb7);
index b1d694e654f03c3987e1bc2fbfb7a78c6a108f7d..d2003b6c61076d6229cb66accb0cdd1ce95e6227 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <Interface_ShareTool.hxx>
@@ -56,13 +58,13 @@ void RWStepGeom_RWRationalBSplineSurface::ReadStep
 
        // --- inherited field : uDegree ---
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"u_degree",ach,aUDegree);
 
        // --- inherited field : vDegree ---
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadInteger (num,3,"v_degree",ach,aVDegree);
 
@@ -70,13 +72,13 @@ void RWStepGeom_RWRationalBSplineSurface::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent4;
-       Standard_Integer nsub4;
+       Standard_Integer nsub4 = 0;
        if (data->ReadSubList (num,4,"control_points_list",ach,nsub4)) {
          Standard_Integer nbi4 = data->NbParams(nsub4);
          Standard_Integer nbj4 = data->NbParams(data->ParamNumber(nsub4,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi4, 1, nbj4);
          for (Standard_Integer i4 = 1; i4 <= nbi4; i4 ++) {
-           Standard_Integer nsi4;
+           Standard_Integer nsi4 = 0;
            if (data->ReadSubList (nsub4,i4,"sub-part(control_points_list)",ach,nsi4)) {
              for (Standard_Integer j4 =1; j4 <= nbj4; j4 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
@@ -129,14 +131,14 @@ void RWStepGeom_RWRationalBSplineSurface::ReadStep
        // --- own field : weightsData ---
 
        Handle(TColStd_HArray2OfReal) aWeightsData;
-         Standard_Real aWeightsDataItem;
-       Standard_Integer nsub9;
+         Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub9 = 0;
        if (data->ReadSubList (num,9,"weights_data",ach,nsub9)) {
          Standard_Integer nbi9 = data->NbParams(nsub9);
          Standard_Integer nbj9 = data->NbParams(data->ParamNumber(nsub9,1));
          aWeightsData = new TColStd_HArray2OfReal (1,nbi9,1,nbj9);
          for (Standard_Integer i9 = 1; i9 <= nbi9; i9 ++) {
-           Standard_Integer nsi9;
+           Standard_Integer nsi9 = 0;
            if (data->ReadSubList (nsub9,i9,"sub-part(weights_data)",ach,nsi9)) {
              for (Standard_Integer j9 =1; j9 <= nbj9; j9 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat9 =` not needed
@@ -253,8 +255,8 @@ void RWStepGeom_RWRationalBSplineSurface::Check
   Standard_Integer nbWgtV = ent->NbWeightsDataJ();
   Standard_Integer nbCPLU = ent->NbControlPointsListI();
   Standard_Integer nbCPLV = ent->NbControlPointsListJ();
-  Standard_Integer i;
-  Standard_Integer j;
+  Standard_Integer i = 0;
+  Standard_Integer j = 0;
 //  std::cout << "RationalBSplineCurve: nbWgtU=" << nbWgtU << " nbCPLU: " << 
 //    nbCPLU << std::endl;
 //  std::cout << "                      nbWgtV=" << nbWgtV << " nbCPLV: " << 
index 21d425955ad6fe9bc128ee931b4521e37499f4ae..004a748ba0169b567e0a8bb95cbf9825ac54d4f8 100644 (file)
@@ -44,13 +44,13 @@ void RWStepGeom_RWRectangularCompositeSurface::ReadStep
 
        Handle(StepGeom_HArray2OfSurfacePatch) aSegments;
        Handle(StepGeom_SurfacePatch) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"segments",ach,nsub2)) {
          Standard_Integer nbi2 = data->NbParams(nsub2);
          Standard_Integer nbj2 = data->NbParams(data->ParamNumber(nsub2,1));
          aSegments = new StepGeom_HArray2OfSurfacePatch (1, nbi2, 1, nbj2);
          for (Standard_Integer i2 = 1; i2 <= nbi2; i2 ++) {
-           Standard_Integer nsi2;
+           Standard_Integer nsi2 = 0;
            if (data->ReadSubList (nsub2,i2,"sub-part(segments)",ach,nsi2)) {
              for (Standard_Integer j2 =1; j2 <= nbj2; j2 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
index 853ff256d30f6be56b07f20bd045e8345ce475e3..641f1b0d2885d5bd3c72d578fe1256ce3685a83a 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWRectangularTrimmedSurface.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,37 +49,37 @@ void RWStepGeom_RWRectangularTrimmedSurface::ReadStep
 
        // --- own field : u1 ---
 
-       Standard_Real aU1;
+       Standard_Real aU1 = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"u1",ach,aU1);
 
        // --- own field : u2 ---
 
-       Standard_Real aU2;
+       Standard_Real aU2 = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"u2",ach,aU2);
 
        // --- own field : v1 ---
 
-       Standard_Real aV1;
+       Standard_Real aV1 = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
        data->ReadReal (num,5,"v1",ach,aV1);
 
        // --- own field : v2 ---
 
-       Standard_Real aV2;
+       Standard_Real aV2 = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
        data->ReadReal (num,6,"v2",ach,aV2);
 
        // --- own field : usense ---
 
-       Standard_Boolean aUsense;
+       Standard_Boolean aUsense = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
        data->ReadBoolean (num,7,"usense",ach,aUsense);
 
        // --- own field : vsense ---
 
-       Standard_Boolean aVsense;
+       Standard_Boolean aVsense = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
        data->ReadBoolean (num,8,"vsense",ach,aVsense);
 
index 25983b0ace01f10c475bc80ebbbaf89c199d74ee..25dea2f2cf4652a620e160cf8f0c0f0da49038de 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWReparametrisedCompositeCurveSegment.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -55,7 +57,7 @@ void RWStepGeom_RWReparametrisedCompositeCurveSegment::ReadStep
 
        // --- inherited field : sameSense ---
 
-       Standard_Boolean aSameSense;
+       Standard_Boolean aSameSense = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadBoolean (num,2,"same_sense",ach,aSameSense);
 
@@ -67,7 +69,7 @@ void RWStepGeom_RWReparametrisedCompositeCurveSegment::ReadStep
 
        // --- own field : paramLength ---
 
-       Standard_Real aParamLength;
+       Standard_Real aParamLength = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"param_length",ach,aParamLength);
 
index 5d2b073df78a1fa8529e2ca5e35745b631f01698..a38439f0e6061aff96cfe92ee4cdd0c824be2542 100644 (file)
@@ -55,7 +55,7 @@ void RWStepGeom_RWSeamCurve::ReadStep
        Handle(StepGeom_HArray1OfPcurveOrSurface) aAssociatedGeometry;
        StepGeom_PcurveOrSurface aAssociatedGeometryItem;
        Handle(Standard_Transient) assgeomval;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"associated_geometry",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aAssociatedGeometry = new StepGeom_HArray1OfPcurveOrSurface (1, nb3);
index 2dc774ebf167ba28f6a14cfd9d15dcbfb5acbb0e..516248e5bf25f442fc3b15cd9fc5ca64a6aa2be6 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWSphericalSurface.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,7 +49,7 @@ void RWStepGeom_RWSphericalSurface::ReadStep
 
        // --- own field : radius ---
 
-       Standard_Real aRadius;
+       Standard_Real aRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"radius",ach,aRadius);
 
index b299060c49b57cd1533ea7eee28bb751dbbc46c3..5e7be95ffb5b5e9657590ce405901d4da2088593 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepGeom_RWSuParameters.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -51,22 +53,22 @@ void RWStepGeom_RWSuParameters::ReadStep (const Handle(StepData_StepReaderData)&
 
   // Own fields of SuParameters
 
-  Standard_Real aA;
+  Standard_Real aA = NAN;
   theData->ReadReal (theNum, 2, "a", theAch, aA);
 
-  Standard_Real aAlpha;
+  Standard_Real aAlpha = NAN;
   theData->ReadReal (theNum, 3, "alpha", theAch, aAlpha);
 
-  Standard_Real aB;
+  Standard_Real aB = NAN;
   theData->ReadReal (theNum, 4, "b", theAch, aB);
 
-  Standard_Real aBeta;
+  Standard_Real aBeta = NAN;
   theData->ReadReal (theNum, 5, "beta", theAch, aBeta);
 
-  Standard_Real aC;
+  Standard_Real aC = NAN;
   theData->ReadReal (theNum, 6, "c", theAch, aC);
 
-  Standard_Real aGamma;
+  Standard_Real aGamma = NAN;
   theData->ReadReal (theNum, 7, "gamma", theAch, aGamma);
 
   // Initialize entity
index 711996b17748f26bd9494b03fa56b0ed81415451..08452d8304a0c027debf96a5a71680468b255df0 100644 (file)
@@ -55,7 +55,7 @@ void RWStepGeom_RWSurfaceCurve::ReadStep
 
        Handle(StepGeom_HArray1OfPcurveOrSurface) aAssociatedGeometry;
        StepGeom_PcurveOrSurface aAssociatedGeometryItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"associated_geometry",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aAssociatedGeometry = new StepGeom_HArray1OfPcurveOrSurface (1, nb3);
index 186c6173e9dd0f157ddaa65f525b924510f5aff4..f2b5a8e1b433d318ff1edae98d769b70e8d686d7 100644 (file)
@@ -70,7 +70,7 @@ void RWStepGeom_RWSurfaceCurveAndBoundedCurve::ReadStep
   // --- own field : associatedGeometry ---
   Handle(StepGeom_HArray1OfPcurveOrSurface) aAssociatedGeometry;
   StepGeom_PcurveOrSurface aAssociatedGeometryItem;
-  Standard_Integer nsub3;
+  Standard_Integer nsub3 = 0;
   if ( data->ReadSubList ( num1, 2, "associated_geometry", ach, nsub3 ) ) {
     Standard_Integer nb3 = data->NbParams(nsub3);
     aAssociatedGeometry = new StepGeom_HArray1OfPcurveOrSurface (1, nb3);
index 847f04c877a482a985213e07d534e7aeb142f9b2..d2c4e5bda7b3e05f1c94888f96f823018182eaf0 100644 (file)
@@ -75,13 +75,13 @@ void RWStepGeom_RWSurfacePatch::ReadStep
   
   // --- own field : uSense ---
   
-  Standard_Boolean aUSense;
+  Standard_Boolean aUSense = 0;
   //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
   data->ReadBoolean (num,4,"u_sense",ach,aUSense);
   
   // --- own field : vSense ---
   
-  Standard_Boolean aVSense;
+  Standard_Boolean aVSense = 0;
   //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
   data->ReadBoolean (num,5,"v_sense",ach,aVSense);
   
index e3978da45d5fad0de62281f55ad9a6ca982b745a..f8e458b2c308d44da5b610c9552f782c2671dc1d 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <Interface_ShareTool.hxx>
 #include <RWStepGeom_RWToroidalSurface.hxx>
@@ -48,13 +50,13 @@ void RWStepGeom_RWToroidalSurface::ReadStep
 
        // --- own field : majorRadius ---
 
-       Standard_Real aMajorRadius;
+       Standard_Real aMajorRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"major_radius",ach,aMajorRadius);
 
        // --- own field : minorRadius ---
 
-       Standard_Real aMinorRadius;
+       Standard_Real aMinorRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"minor_radius",ach,aMinorRadius);
 
index 7b8cb727f336593cbcf648bb28e7069ede38bc20..b9bf8ea6e43502f46d33dbd6599896ffe88bbfb2 100644 (file)
@@ -60,7 +60,7 @@ void RWStepGeom_RWTrimmedCurve::ReadStep
   //Standard_Real aParameterValue; //szv#4:S4163:12Mar99 unused
   
   Handle(StepGeom_HArray1OfTrimmingSelect) aTrim1;
-  Standard_Integer nsub3;
+  Standard_Integer nsub3 = 0;
   if (data->ReadSubList (num,3,"trim_1",ach,nsub3)) {
     Standard_Integer nb3 = data->NbParams(nsub3);
     aTrim1 = new StepGeom_HArray1OfTrimmingSelect (1, nb3);
@@ -75,7 +75,7 @@ void RWStepGeom_RWTrimmedCurve::ReadStep
   // --- own field : trim2 ---
   
   Handle(StepGeom_HArray1OfTrimmingSelect) aTrim2;
-  Standard_Integer nsub4;
+  Standard_Integer nsub4 = 0;
   if (data->ReadSubList (num,4,"trim_2",ach,nsub4)) {
     Standard_Integer nb4 = data->NbParams(nsub4);
     aTrim2 = new StepGeom_HArray1OfTrimmingSelect (1, nb4);
@@ -90,7 +90,7 @@ void RWStepGeom_RWTrimmedCurve::ReadStep
   
   // --- own field : senseAgreement ---
   
-  Standard_Boolean aSenseAgreement;
+  Standard_Boolean aSenseAgreement = 0;
   //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
   data->ReadBoolean (num,5,"sense_agreement",ach,aSenseAgreement);
   
index f8c3cff983be5f127d406eceef27982323bd81a7..8dc63d442f3f8afb898b1a7effe21d20dd0c6e29 100644 (file)
@@ -49,7 +49,7 @@ void RWStepGeom_RWUniformCurve::ReadStep
 
        // --- inherited field : degree ---
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"degree",ach,aDegree);
 
@@ -57,7 +57,7 @@ void RWStepGeom_RWUniformCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb3);
index 55ea135840d648065b0a9f38d63023db9a663d53..710577a43dfb139091c6598fa8f2f531d070a2cc 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWUniformCurveAndRationalBSplineCurve.hxx>
@@ -54,7 +56,7 @@ void RWStepGeom_RWUniformCurveAndRationalBSplineCurve::ReadStep
        // --- field : degree ---
 
 
-       Standard_Integer aDegree;
+       Standard_Integer aDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"degree",ach,aDegree);
        // --- field : controlPointsList ---
@@ -62,7 +64,7 @@ void RWStepGeom_RWUniformCurveAndRationalBSplineCurve::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"control_points_list",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb2);
@@ -123,8 +125,8 @@ void RWStepGeom_RWUniformCurveAndRationalBSplineCurve::ReadStep
        // --- field : weightsData ---
 
        Handle(TColStd_HArray1OfReal) aWeightsData;
-       Standard_Real aWeightsDataItem;
-       Standard_Integer nsub6;
+       Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub6 = 0;
        if (data->ReadSubList (num,1,"weights_data",ach,nsub6)) {
          Standard_Integer nb6 = data->NbParams(nsub6);
          aWeightsData = new TColStd_HArray1OfReal (1, nb6);
index cdc9caea6eaab24f206e54bc19da682325f362e6..96e16d820349f5a9f9ef8e9d9162bdbea75620d9 100644 (file)
@@ -54,13 +54,13 @@ void RWStepGeom_RWUniformSurface::ReadStep
 
        // --- inherited field : uDegree ---
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"u_degree",ach,aUDegree);
 
        // --- inherited field : vDegree ---
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadInteger (num,3,"v_degree",ach,aVDegree);
 
@@ -68,13 +68,13 @@ void RWStepGeom_RWUniformSurface::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent4;
-       Standard_Integer nsub4;
+       Standard_Integer nsub4 = 0;
        if (data->ReadSubList (num,4,"control_points_list",ach,nsub4)) {
          Standard_Integer nbi4 = data->NbParams(nsub4);
          Standard_Integer nbj4 = data->NbParams(data->ParamNumber(nsub4,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi4, 1, nbj4);
          for (Standard_Integer i4 = 1; i4 <= nbi4; i4 ++) {
-           Standard_Integer nsi4;
+           Standard_Integer nsi4 = 0;
            if (data->ReadSubList (nsub4,i4,"sub-part(control_points_list)",ach,nsi4)) {
              for (Standard_Integer j4 =1; j4 <= nbj4; j4 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
index 5cef2b3806b828760cae91e77c742ccdc8580898..b82d37deb21bf0fcfbe80f8cfcc72ac7176d1451 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.hxx>
@@ -59,13 +61,13 @@ void RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface::ReadStep
        // --- field : uDegree ---
 
 
-       Standard_Integer aUDegree;
+       Standard_Integer aUDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadInteger (num,1,"u_degree",ach,aUDegree);
        // --- field : vDegree ---
 
 
-       Standard_Integer aVDegree;
+       Standard_Integer aVDegree = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadInteger (num,2,"v_degree",ach,aVDegree);
        // --- field : controlPointsList ---
@@ -73,13 +75,13 @@ void RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface::ReadStep
 
        Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
        Handle(StepGeom_CartesianPoint) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
          Standard_Integer nbi3 = data->NbParams(nsub3);
          Standard_Integer nbj3 = data->NbParams(data->ParamNumber(nsub3,1));
          aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi3, 1, nbj3);
          for (Standard_Integer i3 = 1; i3 <= nbi3; i3 ++) {
-           Standard_Integer nsi3;
+           Standard_Integer nsi3 = 0;
            if (data->ReadSubList (nsub3,i3,"sub-part(control_points_list)",ach,nsi3)) {
              for (Standard_Integer j3 =1; j3 <= nbj3; j3 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
@@ -145,14 +147,14 @@ void RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface::ReadStep
        // --- field : weightsData ---
 
        Handle(TColStd_HArray2OfReal) aWeightsData;
-         Standard_Real aWeightsDataItem;
-       Standard_Integer nsub8;
+         Standard_Real aWeightsDataItem = NAN;
+       Standard_Integer nsub8 = 0;
        if (data->ReadSubList (num,1,"weights_data",ach,nsub8)) {
          Standard_Integer nbi8 = data->NbParams(nsub8);
          Standard_Integer nbj8 = data->NbParams(data->ParamNumber(nsub8,1));
          aWeightsData = new TColStd_HArray2OfReal (1,nbi8,1,nbj8);
          for (Standard_Integer i8 = 1; i8 <= nbi8; i8 ++) {
-           Standard_Integer nsi8;
+           Standard_Integer nsi8 = 0;
            if (data->ReadSubList (nsub8,i8,"sub-part(weights_data)",ach,nsi8)) {
              for (Standard_Integer j8 =1; j8 <= nbj8; j8 ++) {
                //szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
index 1417a3ace60dc1c6e63ea43ad40c5727f1cd278e..b06aa0e4c41a4848ae3714dfeb59cf0798d50d07 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <Interface_ShareTool.hxx>
 #include <RWStepGeom_RWVector.hxx>
@@ -48,7 +50,7 @@ void RWStepGeom_RWVector::ReadStep
 
        // --- own field : magnitude ---
 
-       Standard_Real aMagnitude;
+       Standard_Real aMagnitude = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"magnitude",ach,aMagnitude);
 
index c56c22a4a01b8ee29c863d8e9be3e71fbc8ca5ba..f8686bcaf019de74c8c430ff9e5030f516f88716 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWActuatedKinPairAndOrderKinPair.hxx>
 
 #include <Interface_Check.hxx>
@@ -268,7 +270,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
         {
           // Own fields of revolute_pair_with_range
           aKinematicPair = new StepKinematics_RevolutePairWithRange;
-          Standard_Real aLowerLimitActualRotation;
+          Standard_Real aLowerLimitActualRotation = NAN;
           Standard_Boolean hasLowerLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -280,7 +282,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualRotation = 0;
           }
 
-          Standard_Real aUpperLimitActualRotation;
+          Standard_Real aUpperLimitActualRotation = NAN;
           Standard_Boolean hasUpperLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -343,7 +345,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           // Own fields of cylindrical_pair_with_range
           aKinematicPair = new StepKinematics_CylindricalPairWithRange;
 
-          Standard_Real aLowerLimitActualTranslation;
+          Standard_Real aLowerLimitActualTranslation = NAN;
           Standard_Boolean hasLowerLimitActualTranslation = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -355,7 +357,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualTranslation = 0;
           }
 
-          Standard_Real aUpperLimitActualTranslation;
+          Standard_Real aUpperLimitActualTranslation = NAN;
           Standard_Boolean hasUpperLimitActualTranslation = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -367,7 +369,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitActualTranslation = 0;
           }
 
-          Standard_Real aLowerLimitActualRotation;
+          Standard_Real aLowerLimitActualRotation = NAN;
           Standard_Boolean hasLowerLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 3))
           {
@@ -379,7 +381,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualRotation = 0;
           }
 
-          Standard_Real aUpperLimitActualRotation;
+          Standard_Real aUpperLimitActualRotation = NAN;
           Standard_Boolean hasUpperLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 4))
           {
@@ -446,7 +448,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           // Own fields of spherical_pair_with_range
           aKinematicPair = new StepKinematics_SphericalPairWithRange;
 
-          Standard_Real aLowerLimitYaw;
+          Standard_Real aLowerLimitYaw = NAN;
           Standard_Boolean hasLowerLimitYaw = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -458,7 +460,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitYaw = 0;
           }
 
-          Standard_Real aUpperLimitYaw;
+          Standard_Real aUpperLimitYaw = NAN;
           Standard_Boolean hasUpperLimitYaw = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -470,7 +472,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitYaw = 0;
           }
 
-          Standard_Real aLowerLimitPitch;
+          Standard_Real aLowerLimitPitch = NAN;
           Standard_Boolean hasLowerLimitPitch = Standard_True;
           if (theData->IsParamDefined(theNum, 3))
           {
@@ -482,7 +484,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitPitch = 0;
           }
 
-          Standard_Real aUpperLimitPitch;
+          Standard_Real aUpperLimitPitch = NAN;
           Standard_Boolean hasUpperLimitPitch = Standard_True;
           if (theData->IsParamDefined(theNum, 4))
           {
@@ -494,7 +496,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitPitch = 0;
           }
 
-          Standard_Real aLowerLimitRoll;
+          Standard_Real aLowerLimitRoll = NAN;
           Standard_Boolean hasLowerLimitRoll = Standard_True;
           if (theData->IsParamDefined(theNum, 5))
           {
@@ -506,7 +508,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitRoll = 0;
           }
 
-          Standard_Real aUpperLimitRoll;
+          Standard_Real aUpperLimitRoll = NAN;
           Standard_Boolean hasUpperLimitRoll = Standard_True;
           if (theData->IsParamDefined(theNum, 6))
           {
@@ -578,7 +580,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           aKinematicPair = new StepKinematics_SphericalPairWithPinAndRange;
 
 
-          Standard_Real aLowerLimitYaw;
+          Standard_Real aLowerLimitYaw = NAN;
           Standard_Boolean hasLowerLimitYaw = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -590,7 +592,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitYaw = 0;
           }
 
-          Standard_Real aUpperLimitYaw;
+          Standard_Real aUpperLimitYaw = NAN;
           Standard_Boolean hasUpperLimitYaw = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -602,7 +604,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitYaw = 0;
           }
 
-          Standard_Real aLowerLimitRoll;
+          Standard_Real aLowerLimitRoll = NAN;
           Standard_Boolean hasLowerLimitRoll = Standard_True;
           if (theData->IsParamDefined(theNum, 3))
           {
@@ -614,7 +616,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitRoll = 0;
           }
 
-          Standard_Real aUpperLimitRoll;
+          Standard_Real aUpperLimitRoll = NAN;
           Standard_Boolean hasUpperLimitRoll = Standard_True;
           if (theData->IsParamDefined(theNum, 4))
           {
@@ -682,7 +684,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           aKinematicPair = new StepKinematics_PrismaticPairWithRange;
           // Own fields of prismatic_pair_with_range
 
-          Standard_Real aLowerLimitActualTranslation;
+          Standard_Real aLowerLimitActualTranslation = NAN;
           Standard_Boolean hasLowerLimitActualTranslation = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -694,7 +696,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualTranslation = 0;
           }
 
-          Standard_Real aUpperLimitActualTranslation;
+          Standard_Real aUpperLimitActualTranslation = NAN;
           Standard_Boolean hasUpperLimitActualTranslation = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -751,7 +753,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
       // Own fields of universal_pair 
 
       aKinematicPair = new StepKinematics_UniversalPair;
-      Standard_Real aInputSkewAngle;
+      Standard_Real aInputSkewAngle = NAN;
       Standard_Boolean hasInputSkewAngle = Standard_True;
       if (theData->IsParamDefined(theNum, 1))
       {
@@ -769,7 +771,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
         {
           // Own fields of universal_pair_with_range
 
-          Standard_Real aLowerLimitFirstRotation;
+          Standard_Real aLowerLimitFirstRotation = NAN;
           Standard_Boolean hasLowerLimitFirstRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -781,7 +783,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitFirstRotation = 0;
           }
 
-          Standard_Real aUpperLimitFirstRotation;
+          Standard_Real aUpperLimitFirstRotation = NAN;
           Standard_Boolean hasUpperLimitFirstRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -793,7 +795,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitFirstRotation = 0;
           }
 
-          Standard_Real aLowerLimitSecondRotation;
+          Standard_Real aLowerLimitSecondRotation = NAN;
           Standard_Boolean hasLowerLimitSecondRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 3))
           {
@@ -805,7 +807,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitSecondRotation = 0;
           }
 
-          Standard_Real aUpperLimitSecondRotation;
+          Standard_Real aUpperLimitSecondRotation = NAN;
           Standard_Boolean hasUpperLimitSecondRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 4))
           {
@@ -877,7 +879,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           // Own fields of universal_pair_with_range
 
           aKinematicPair = new StepKinematics_PlanarPairWithRange;
-          Standard_Real aLowerLimitActualRotation;
+          Standard_Real aLowerLimitActualRotation = NAN;
           Standard_Boolean hasLowerLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -889,7 +891,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualRotation = 0;
           }
 
-          Standard_Real aUpperLimitActualRotation;
+          Standard_Real aUpperLimitActualRotation = NAN;
           Standard_Boolean hasUpperLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -901,7 +903,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitActualRotation = 0;
           }
 
-          Standard_Real aLowerLimitActualTranslationX;
+          Standard_Real aLowerLimitActualTranslationX = NAN;
           Standard_Boolean hasLowerLimitActualTranslationX = Standard_True;
           if (theData->IsParamDefined(theNum, 3))
           {
@@ -913,7 +915,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualTranslationX = 0;
           }
 
-          Standard_Real aUpperLimitActualTranslationX;
+          Standard_Real aUpperLimitActualTranslationX = NAN;
           Standard_Boolean hasUpperLimitActualTranslationX = Standard_True;
           if (theData->IsParamDefined(theNum, 4))
           {
@@ -925,7 +927,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitActualTranslationX = 0;
           }
 
-          Standard_Real aLowerLimitActualTranslationY;
+          Standard_Real aLowerLimitActualTranslationY = NAN;
           Standard_Boolean hasLowerLimitActualTranslationY = Standard_True;
           if (theData->IsParamDefined(theNum, 5))
           {
@@ -937,7 +939,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualTranslationY = 0;
           }
 
-          Standard_Real aUpperLimitActualTranslationY;
+          Standard_Real aUpperLimitActualTranslationY = NAN;
           Standard_Boolean hasUpperLimitActualTranslationY = Standard_True;
           if (theData->IsParamDefined(theNum, 6))
           {
@@ -1007,19 +1009,19 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
 
       // Inherited fields of GearPair
 
-      Standard_Real aGearPair_RadiusFirstLink;
+      Standard_Real aGearPair_RadiusFirstLink = NAN;
       theData->ReadReal(theNum, 1, "gear_pair.radius_first_link", theArch, aGearPair_RadiusFirstLink);
 
-      Standard_Real aGearPair_RadiusSecondLink;
+      Standard_Real aGearPair_RadiusSecondLink = NAN;
       theData->ReadReal(theNum, 2, "gear_pair.radius_second_link", theArch, aGearPair_RadiusSecondLink);
 
-      Standard_Real aGearPair_Bevel;
+      Standard_Real aGearPair_Bevel = NAN;
       theData->ReadReal(theNum, 3, "gear_pair.bevel", theArch, aGearPair_Bevel);
 
-      Standard_Real aGearPair_HelicalAngle;
+      Standard_Real aGearPair_HelicalAngle = NAN;
       theData->ReadReal(theNum, 4, "gear_pair.helical_angle", theArch, aGearPair_HelicalAngle);
 
-      Standard_Real aGearPair_GearRatio;
+      Standard_Real aGearPair_GearRatio = NAN;
       theData->ReadReal(theNum, 5, "gear_pair.gear_ratio", theArch, aGearPair_GearRatio);
 
       if (theData->NamedForComplex("GEAR_PAIR_WITH_RANGE", "GPWR", num0, theNum, theArch))
@@ -1030,7 +1032,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
 
           aKinematicPair = new StepKinematics_GearPairWithRange;
 
-          Standard_Real aLowerLimitActualRotation1;
+          Standard_Real aLowerLimitActualRotation1 = NAN;
           Standard_Boolean hasLowerLimitActualRotation1 = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -1042,7 +1044,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualRotation1 = 0;
           }
 
-          Standard_Real aUpperLimitActualRotation1;
+          Standard_Real aUpperLimitActualRotation1 = NAN;
           Standard_Boolean hasUpperLimitActualRotation1 = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -1097,7 +1099,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
     {
 
       // Inherited fields of RackAndPinionPair
-      Standard_Real aRackAndPinionPair_PinionRadius;
+      Standard_Real aRackAndPinionPair_PinionRadius = NAN;
       theData->ReadReal(theNum, 1, "rack_and_pinion_pair.pinion_radius", theArch, aRackAndPinionPair_PinionRadius);
 
       if (theData->NamedForComplex("RACK_AND_PINION_PAIR_WITH_RANGE", "RAPPWR", num0, theNum, theArch))
@@ -1109,7 +1111,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           aKinematicPair = new StepKinematics_RackAndPinionPairWithRange;
 
 
-          Standard_Real aLowerLimitRackDisplacement;
+          Standard_Real aLowerLimitRackDisplacement = NAN;
           Standard_Boolean hasLowerLimitRackDisplacement = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -1121,7 +1123,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitRackDisplacement = 0;
           }
 
-          Standard_Real aUpperLimitRackDisplacement;
+          Standard_Real aUpperLimitRackDisplacement = NAN;
           Standard_Boolean hasUpperLimitRackDisplacement = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -1168,7 +1170,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
     {
       // Inherited fields of ScrewPair
 
-      Standard_Real aScrewPair_Pitch;
+      Standard_Real aScrewPair_Pitch = NAN;
       theData->ReadReal(theNum, 1, "screw_pair.pitch", theArch, aScrewPair_Pitch);
 
       if (theData->NamedForComplex("SCREW_PAIR_WITH_RANGE", "SPWR", num0, theNum, theArch))
@@ -1178,7 +1180,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           // Own fields of ScrewPairWithRange
 
           aKinematicPair = new StepKinematics_ScrewPairWithRange;
-          Standard_Real aLowerLimitActualRotation;
+          Standard_Real aLowerLimitActualRotation = NAN;
           Standard_Boolean hasLowerLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 1))
           {
@@ -1190,7 +1192,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualRotation = 0;
           }
 
-          Standard_Real aUpperLimitActualRotation;
+          Standard_Real aUpperLimitActualRotation = NAN;
           Standard_Boolean hasUpperLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -1246,7 +1248,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
       Handle(StepGeom_Curve) aPointOnPlanarCurvePair_PairCurve;
       theData->ReadEntity(theNum, 1, "point_on_planar_curve_pair.pair_curve", theArch, STANDARD_TYPE(StepGeom_Curve), aPointOnPlanarCurvePair_PairCurve);
 
-      Standard_Boolean aPointOnPlanarCurvePair_Orientation;
+      Standard_Boolean aPointOnPlanarCurvePair_Orientation = 0;
       theData->ReadBoolean(theNum, 2, "point_on_planar_curve_pair.orientation", theArch, aPointOnPlanarCurvePair_Orientation);
 
 
@@ -1261,7 +1263,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           Handle(StepGeom_TrimmedCurve) aRangeOnPairCurve;
           theData->ReadEntity(theNum, 1, "range_on_pair_curve", theArch, STANDARD_TYPE(StepGeom_TrimmedCurve), aRangeOnPairCurve);
 
-          Standard_Real aLowerLimitYaw;
+          Standard_Real aLowerLimitYaw = NAN;
           Standard_Boolean hasLowerLimitYaw = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -1273,7 +1275,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitYaw = 0;
           }
 
-          Standard_Real aUpperLimitYaw;
+          Standard_Real aUpperLimitYaw = NAN;
           Standard_Boolean hasUpperLimitYaw = Standard_True;
           if (theData->IsParamDefined(theNum, 3))
           {
@@ -1285,7 +1287,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitYaw = 0;
           }
 
-          Standard_Real aLowerLimitPitch;
+          Standard_Real aLowerLimitPitch = NAN;
           Standard_Boolean hasLowerLimitPitch = Standard_True;
           if (theData->IsParamDefined(theNum, 4))
           {
@@ -1297,7 +1299,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitPitch = 0;
           }
 
-          Standard_Real aUpperLimitPitch;
+          Standard_Real aUpperLimitPitch = NAN;
           Standard_Boolean hasUpperLimitPitch = Standard_True;
           if (theData->IsParamDefined(theNum, 5))
           {
@@ -1309,7 +1311,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitPitch = 0;
           }
 
-          Standard_Real aLowerLimitRoll;
+          Standard_Real aLowerLimitRoll = NAN;
           Standard_Boolean hasLowerLimitRoll = Standard_True;
           if (theData->IsParamDefined(theNum, 6))
           {
@@ -1321,7 +1323,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitRoll = 0;
           }
 
-          Standard_Real aUpperLimitRoll;
+          Standard_Real aUpperLimitRoll = NAN;
           Standard_Boolean hasUpperLimitRoll = Standard_True;
           if (theData->IsParamDefined(theNum, 7))
           {
@@ -1394,7 +1396,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           Handle(StepGeom_RectangularTrimmedSurface) aRangeOnPairSurface;
           theData->ReadEntity(theNum, 1, "range_on_pair_surface", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnPairSurface);
 
-          Standard_Real aLowerLimitYaw;
+          Standard_Real aLowerLimitYaw = NAN;
           Standard_Boolean hasLowerLimitYaw = Standard_True;
           if (theData->IsParamDefined(theNum, 2))
           {
@@ -1406,7 +1408,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitYaw = 0;
           }
 
-          Standard_Real aUpperLimitYaw;
+          Standard_Real aUpperLimitYaw = NAN;
           Standard_Boolean hasUpperLimitYaw = Standard_True;
           if (theData->IsParamDefined(theNum, 3))
           {
@@ -1418,7 +1420,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitYaw = 0;
           }
 
-          Standard_Real aLowerLimitPitch;
+          Standard_Real aLowerLimitPitch = NAN;
           Standard_Boolean hasLowerLimitPitch = Standard_True;
           if (theData->IsParamDefined(theNum, 4))
           {
@@ -1430,7 +1432,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitPitch = 0;
           }
 
-          Standard_Real aUpperLimitPitch;
+          Standard_Real aUpperLimitPitch = NAN;
           Standard_Boolean hasUpperLimitPitch = Standard_True;
           if (theData->IsParamDefined(theNum, 5))
           {
@@ -1442,7 +1444,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aUpperLimitPitch = 0;
           }
 
-          Standard_Real aLowerLimitRoll;
+          Standard_Real aLowerLimitRoll = NAN;
           Standard_Boolean hasLowerLimitRoll = Standard_True;
           if (theData->IsParamDefined(theNum, 6))
           {
@@ -1454,7 +1456,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitRoll = 0;
           }
 
-          Standard_Real aUpperLimitRoll;
+          Standard_Real aUpperLimitRoll = NAN;
           Standard_Boolean hasUpperLimitRoll = Standard_True;
           if (theData->IsParamDefined(theNum, 7))
           {
@@ -1515,7 +1517,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
       Handle(StepGeom_Curve) aPlanarCurvePair_Curve2;
       theData->ReadEntity(theNum, 2, "planar_curve_pair.curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve2);
 
-      Standard_Boolean aPlanarCurvePair_Orientation;
+      Standard_Boolean aPlanarCurvePair_Orientation = 0;
       theData->ReadBoolean(theNum, 3, "planar_curve_pair.orientation", theArch, aPlanarCurvePair_Orientation);
 
       if (theData->NamedForComplex("PLANAR_CURVE_PAIR_RANGE", "PCPR", num0, theNum, theArch))
@@ -1575,7 +1577,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
       Handle(StepGeom_Surface) aSurfacePair_Surface2;
       theData->ReadEntity(theNum, 2, "surface_pair.surface2", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface2);
 
-      Standard_Boolean aSurfacePair_Orientation;
+      Standard_Boolean aSurfacePair_Orientation = 0;
       theData->ReadBoolean(theNum, 3, "surface_pair.orientation", theArch, aSurfacePair_Orientation);
 
       if (theData->NamedForComplex("SURFACE_PAIR_WITH_RANGE", "SPW1", num0, theNum, theArch))
@@ -1591,7 +1593,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
           Handle(StepGeom_RectangularTrimmedSurface) aRangeOnSurface2;
           theData->ReadEntity(theNum, 2, "range_on_surface2", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnSurface2);
 
-          Standard_Real aLowerLimitActualRotation;
+          Standard_Real aLowerLimitActualRotation = NAN;
           Standard_Boolean hasLowerLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 3))
           {
@@ -1603,7 +1605,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep
             aLowerLimitActualRotation = 0;
           }
 
-          Standard_Real aUpperLimitActualRotation;
+          Standard_Real aUpperLimitActualRotation = NAN;
           Standard_Boolean hasUpperLimitActualRotation = Standard_True;
           if (theData->IsParamDefined(theNum, 4))
           {
index f1ee0e99a4e7ddd7137ccc5f8d496f5569265e70..e10e93079ba3924bf63acb13100547c73fbe62c5 100644 (file)
@@ -77,22 +77,22 @@ void RWStepKinematics_RWCylindricalPair::ReadStep (const Handle(StepData_StepRea
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Initialize entity
index 3b7583aa2c2541e3283a04bb0fd40720317c47ba..317a5529aaca339f66fc53a4781c789243f8b26c 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWCylindricalPairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -55,10 +57,10 @@ void RWStepKinematics_RWCylindricalPairValue::ReadStep (const Handle(StepData_St
 
   // Own fields of CylindricalPairValue
 
-  Standard_Real aActualTranslation;
+  Standard_Real aActualTranslation = NAN;
   theData->ReadReal (theNum, 3, "actual_translation", theArch, aActualTranslation);
 
-  Standard_Real aActualRotation;
+  Standard_Real aActualRotation = NAN;
   theData->ReadReal (theNum, 4, "actual_rotation", theArch, aActualRotation);
 
   // Initialize entity
index 540e9f9e2c9cc8879a0eaf150937c5eeac8b89d2..633424849b1fe0a96b28911a5ab7e353ed6e6f04 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWCylindricalPairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWCylindricalPairWithRange::ReadStep (const Handle(StepDat
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Own fields of CylindricalPairWithRange
 
-  Standard_Real aLowerLimitActualTranslation;
+  Standard_Real aLowerLimitActualTranslation = NAN;
   Standard_Boolean hasLowerLimitActualTranslation = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "lower_limit_actual_translation", theArch, aLowerLimitActualTranslation);
@@ -108,7 +110,7 @@ void RWStepKinematics_RWCylindricalPairWithRange::ReadStep (const Handle(StepDat
     aLowerLimitActualTranslation = 0;
   }
 
-  Standard_Real aUpperLimitActualTranslation;
+  Standard_Real aUpperLimitActualTranslation = NAN;
   Standard_Boolean hasUpperLimitActualTranslation = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "upper_limit_actual_translation", theArch, aUpperLimitActualTranslation);
@@ -118,7 +120,7 @@ void RWStepKinematics_RWCylindricalPairWithRange::ReadStep (const Handle(StepDat
     aUpperLimitActualTranslation = 0;
   }
 
-  Standard_Real aLowerLimitActualRotation;
+  Standard_Real aLowerLimitActualRotation = NAN;
   Standard_Boolean hasLowerLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,15) ) {
     theData->ReadReal (theNum, 15, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation);
@@ -128,7 +130,7 @@ void RWStepKinematics_RWCylindricalPairWithRange::ReadStep (const Handle(StepDat
     aLowerLimitActualRotation = 0;
   }
 
-  Standard_Real aUpperLimitActualRotation;
+  Standard_Real aUpperLimitActualRotation = NAN;
   Standard_Boolean hasUpperLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,16) ) {
     theData->ReadReal (theNum, 16, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation);
index 674f0794fcd2f8ea186bbd05fac9a9cf0e6bca9a..5fdd45991096237cd8de75402ed1286cf05a4b2b 100644 (file)
@@ -77,22 +77,22 @@ void RWStepKinematics_RWFullyConstrainedPair::ReadStep (const Handle(StepData_St
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Initialize entity
index 3aa037d18b2147a725e473dcafb90d1d2478bfa1..23eb8e4526baca30550d11758bef326b00abc2e9 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWGearPair.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,19 +80,19 @@ void RWStepKinematics_RWGearPair::ReadStep (const Handle(StepData_StepReaderData
 
   // Own fields of GearPair
 
-  Standard_Real aRadiusFirstLink;
+  Standard_Real aRadiusFirstLink = NAN;
   theData->ReadReal (theNum, 7, "radius_first_link", theArch, aRadiusFirstLink);
 
-  Standard_Real aRadiusSecondLink;
+  Standard_Real aRadiusSecondLink = NAN;
   theData->ReadReal (theNum, 8, "radius_second_link", theArch, aRadiusSecondLink);
 
-  Standard_Real aBevel;
+  Standard_Real aBevel = NAN;
   theData->ReadReal (theNum, 9, "bevel", theArch, aBevel);
 
-  Standard_Real aHelicalAngle;
+  Standard_Real aHelicalAngle = NAN;
   theData->ReadReal (theNum, 10, "helical_angle", theArch, aHelicalAngle);
 
-  Standard_Real aGearRatio;
+  Standard_Real aGearRatio = NAN;
   theData->ReadReal (theNum, 11, "gear_ratio", theArch, aGearRatio);
 
   // Initialize entity
index 74715d5a7e3514f82ae54893070c18de41587885..cb5b64d21dd1c1fbb8349cdf2d8180e0cc689fa7 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWGearPairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -55,7 +57,7 @@ void RWStepKinematics_RWGearPairValue::ReadStep (const Handle(StepData_StepReade
 
   // Own fields of GearPairValue
 
-  Standard_Real aActualRotation1;
+  Standard_Real aActualRotation1 = NAN;
   theData->ReadReal (theNum, 3, "actual_rotation1", theArch, aActualRotation1);
 
   // Initialize entity
index 292f3aa3f6b72c7fb7a921bf1e0921631c4a874a..0af9d5e5f49380a7432d30537bbcb4c8d33850b9 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWGearPairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,24 +80,24 @@ void RWStepKinematics_RWGearPairWithRange::ReadStep (const Handle(StepData_StepR
 
   // Inherited fields of GearPair
 
-  Standard_Real aGearPair_RadiusFirstLink;
+  Standard_Real aGearPair_RadiusFirstLink = NAN;
   theData->ReadReal (theNum, 7, "gear_pair.radius_first_link", theArch, aGearPair_RadiusFirstLink);
 
-  Standard_Real aGearPair_RadiusSecondLink;
+  Standard_Real aGearPair_RadiusSecondLink = NAN;
   theData->ReadReal (theNum, 8, "gear_pair.radius_second_link", theArch, aGearPair_RadiusSecondLink);
 
-  Standard_Real aGearPair_Bevel;
+  Standard_Real aGearPair_Bevel = NAN;
   theData->ReadReal (theNum, 9, "gear_pair.bevel", theArch, aGearPair_Bevel);
 
-  Standard_Real aGearPair_HelicalAngle;
+  Standard_Real aGearPair_HelicalAngle = NAN;
   theData->ReadReal (theNum, 10, "gear_pair.helical_angle", theArch, aGearPair_HelicalAngle);
 
-  Standard_Real aGearPair_GearRatio;
+  Standard_Real aGearPair_GearRatio = NAN;
   theData->ReadReal (theNum, 11, "gear_pair.gear_ratio", theArch, aGearPair_GearRatio);
 
   // Own fields of GearPairWithRange
 
-  Standard_Real aLowerLimitActualRotation1;
+  Standard_Real aLowerLimitActualRotation1 = NAN;
   Standard_Boolean hasLowerLimitActualRotation1 = Standard_True;
   if ( theData->IsParamDefined (theNum,12) ) {
     theData->ReadReal (theNum, 12, "lower_limit_actual_rotation1", theArch, aLowerLimitActualRotation1);
@@ -105,7 +107,7 @@ void RWStepKinematics_RWGearPairWithRange::ReadStep (const Handle(StepData_StepR
     aLowerLimitActualRotation1 = 0;
   }
 
-  Standard_Real aUpperLimitActualRotation1;
+  Standard_Real aUpperLimitActualRotation1 = NAN;
   Standard_Boolean hasUpperLimitActualRotation1 = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "upper_limit_actual_rotation1", theArch, aUpperLimitActualRotation1);
index 5c59606fe0fc5caf13cd8dafb211589f0f7b5dd9..e70e48a3af31466997c0fbe8c14018d0a9b6f84f 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWHomokineticPair.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWHomokineticPair::ReadStep (const Handle(StepData_StepRea
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Inherited fields of UniversalPair
 
-  Standard_Real aUniversalPair_InputSkewAngle;
+  Standard_Real aUniversalPair_InputSkewAngle = NAN;
   Standard_Boolean hasUniversalPair_InputSkewAngle = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "universal_pair.input_skew_angle", theArch, aUniversalPair_InputSkewAngle);
index b6aca30c9cbf99756a331ddcfbab2f82a6214a68..4907105029dbd21f2f499df0621afc9fe80316be 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWLinearFlexibleAndPinionPair.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,7 +80,7 @@ void RWStepKinematics_RWLinearFlexibleAndPinionPair::ReadStep (const Handle(Step
 
   // Own fields of LinearFlexibleAndPinionPair
 
-  Standard_Real aPinionRadius;
+  Standard_Real aPinionRadius = NAN;
   theData->ReadReal (theNum, 7, "pinion_radius", theArch, aPinionRadius);
 
   // Initialize entity
index bb4fa46f46c4771ab26dfa109f412dbe2b20c2c5..928dd3e859289db81eb8999f1912d0e97c9d9219 100644 (file)
@@ -81,7 +81,7 @@ void RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair::ReadStep (const Handle
   Handle(StepGeom_Curve) aPairCurve;
   theData->ReadEntity (theNum, 7, "pair_curve", theArch, STANDARD_TYPE(StepGeom_Curve), aPairCurve);
 
-  Standard_Boolean aOrientation;
+  Standard_Boolean aOrientation = 0;
   theData->ReadBoolean (theNum, 8, "orientation", theArch, aOrientation);
 
   // Initialize entity
index 1f7da0c5b5a3636076532421caff61dbd40c5271..1b10d9fdb48f7ff1302268c3dae780da2efa29c5 100644 (file)
@@ -77,22 +77,22 @@ void RWStepKinematics_RWLowOrderKinematicPair::ReadStep (const Handle(StepData_S
 
   // Own fields of LowOrderKinematicPair
 
-  Standard_Boolean aTX;
+  Standard_Boolean aTX = 0;
   theData->ReadBoolean (theNum, 7, "t_x", theArch, aTX);
 
-  Standard_Boolean aTY;
+  Standard_Boolean aTY = 0;
   theData->ReadBoolean (theNum, 8, "t_y", theArch, aTY);
 
-  Standard_Boolean aTZ;
+  Standard_Boolean aTZ = 0;
   theData->ReadBoolean (theNum, 9, "t_z", theArch, aTZ);
 
-  Standard_Boolean aRX;
+  Standard_Boolean aRX = 0;
   theData->ReadBoolean (theNum, 10, "r_x", theArch, aRX);
 
-  Standard_Boolean aRY;
+  Standard_Boolean aRY = 0;
   theData->ReadBoolean (theNum, 11, "r_y", theArch, aRY);
 
-  Standard_Boolean aRZ;
+  Standard_Boolean aRZ = 0;
   theData->ReadBoolean (theNum, 12, "r_z", theArch, aRZ);
 
   // Initialize entity
index 41a432b814f67058258227909cde4619ba06cd39..89ad9d1b9a65547dc2dccfacf1d20f08a907076c 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWLowOrderKinematicPairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -55,22 +57,22 @@ void RWStepKinematics_RWLowOrderKinematicPairValue::ReadStep (const Handle(StepD
 
   // Own fields of LowOrderKinematicPairValue
 
-  Standard_Real aActualTranslationX;
+  Standard_Real aActualTranslationX = NAN;
   theData->ReadReal (theNum, 3, "actual_translation_x", theArch, aActualTranslationX);
 
-  Standard_Real aActualTranslationY;
+  Standard_Real aActualTranslationY = NAN;
   theData->ReadReal (theNum, 4, "actual_translation_y", theArch, aActualTranslationY);
 
-  Standard_Real aActualTranslationZ;
+  Standard_Real aActualTranslationZ = NAN;
   theData->ReadReal (theNum, 5, "actual_translation_z", theArch, aActualTranslationZ);
 
-  Standard_Real aActualRotationX;
+  Standard_Real aActualRotationX = NAN;
   theData->ReadReal (theNum, 6, "actual_rotation_x", theArch, aActualRotationX);
 
-  Standard_Real aActualRotationY;
+  Standard_Real aActualRotationY = NAN;
   theData->ReadReal (theNum, 7, "actual_rotation_y", theArch, aActualRotationY);
 
-  Standard_Real aActualRotationZ;
+  Standard_Real aActualRotationZ = NAN;
   theData->ReadReal (theNum, 8, "actual_rotation_z", theArch, aActualRotationZ);
 
   // Initialize entity
index 34572fcb3925fd1e84d403d7d3fc4084d5a15d16..4f3f74180344a87b8c414b01dbaf2323ab465418 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWLowOrderKinematicPairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Own fields of LowOrderKinematicPairWithRange
 
-  Standard_Real aLowerLimitActualRotationX;
+  Standard_Real aLowerLimitActualRotationX = NAN;
   Standard_Boolean hasLowerLimitActualRotationX = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "lower_limit_actual_rotation_x", theArch, aLowerLimitActualRotationX);
@@ -108,7 +110,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aLowerLimitActualRotationX = 0;
   }
 
-  Standard_Real aUpperLimitActualRotationX;
+  Standard_Real aUpperLimitActualRotationX = NAN;
   Standard_Boolean hasUpperLimitActualRotationX = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "upper_limit_actual_rotation_x", theArch, aUpperLimitActualRotationX);
@@ -118,7 +120,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aUpperLimitActualRotationX = 0;
   }
 
-  Standard_Real aLowerLimitActualRotationY;
+  Standard_Real aLowerLimitActualRotationY = NAN;
   Standard_Boolean hasLowerLimitActualRotationY = Standard_True;
   if ( theData->IsParamDefined (theNum,15) ) {
     theData->ReadReal (theNum, 15, "lower_limit_actual_rotation_y", theArch, aLowerLimitActualRotationY);
@@ -128,7 +130,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aLowerLimitActualRotationY = 0;
   }
 
-  Standard_Real aUpperLimitActualRotationY;
+  Standard_Real aUpperLimitActualRotationY = NAN;
   Standard_Boolean hasUpperLimitActualRotationY = Standard_True;
   if ( theData->IsParamDefined (theNum,16) ) {
     theData->ReadReal (theNum, 16, "upper_limit_actual_rotation_y", theArch, aUpperLimitActualRotationY);
@@ -138,7 +140,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aUpperLimitActualRotationY = 0;
   }
 
-  Standard_Real aLowerLimitActualRotationZ;
+  Standard_Real aLowerLimitActualRotationZ = NAN;
   Standard_Boolean hasLowerLimitActualRotationZ = Standard_True;
   if ( theData->IsParamDefined (theNum,17) ) {
     theData->ReadReal (theNum, 17, "lower_limit_actual_rotation_z", theArch, aLowerLimitActualRotationZ);
@@ -148,7 +150,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aLowerLimitActualRotationZ = 0;
   }
 
-  Standard_Real aUpperLimitActualRotationZ;
+  Standard_Real aUpperLimitActualRotationZ = NAN;
   Standard_Boolean hasUpperLimitActualRotationZ = Standard_True;
   if ( theData->IsParamDefined (theNum,18) ) {
     theData->ReadReal (theNum, 18, "upper_limit_actual_rotation_z", theArch, aUpperLimitActualRotationZ);
@@ -158,7 +160,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aUpperLimitActualRotationZ = 0;
   }
 
-  Standard_Real aLowerLimitActualTranslationX;
+  Standard_Real aLowerLimitActualTranslationX = NAN;
   Standard_Boolean hasLowerLimitActualTranslationX = Standard_True;
   if ( theData->IsParamDefined (theNum,19) ) {
     theData->ReadReal (theNum, 19, "lower_limit_actual_translation_x", theArch, aLowerLimitActualTranslationX);
@@ -168,7 +170,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aLowerLimitActualTranslationX = 0;
   }
 
-  Standard_Real aUpperLimitActualTranslationX;
+  Standard_Real aUpperLimitActualTranslationX = NAN;
   Standard_Boolean hasUpperLimitActualTranslationX = Standard_True;
   if ( theData->IsParamDefined (theNum,20) ) {
     theData->ReadReal (theNum, 20, "upper_limit_actual_translation_x", theArch, aUpperLimitActualTranslationX);
@@ -178,7 +180,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aUpperLimitActualTranslationX = 0;
   }
 
-  Standard_Real aLowerLimitActualTranslationY;
+  Standard_Real aLowerLimitActualTranslationY = NAN;
   Standard_Boolean hasLowerLimitActualTranslationY = Standard_True;
   if ( theData->IsParamDefined (theNum,21) ) {
     theData->ReadReal (theNum, 21, "lower_limit_actual_translation_y", theArch, aLowerLimitActualTranslationY);
@@ -188,7 +190,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aLowerLimitActualTranslationY = 0;
   }
 
-  Standard_Real aUpperLimitActualTranslationY;
+  Standard_Real aUpperLimitActualTranslationY = NAN;
   Standard_Boolean hasUpperLimitActualTranslationY = Standard_True;
   if ( theData->IsParamDefined (theNum,22) ) {
     theData->ReadReal (theNum, 22, "upper_limit_actual_translation_y", theArch, aUpperLimitActualTranslationY);
@@ -198,7 +200,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aUpperLimitActualTranslationY = 0;
   }
 
-  Standard_Real aLowerLimitActualTranslationZ;
+  Standard_Real aLowerLimitActualTranslationZ = NAN;
   Standard_Boolean hasLowerLimitActualTranslationZ = Standard_True;
   if ( theData->IsParamDefined (theNum,23) ) {
     theData->ReadReal (theNum, 23, "lower_limit_actual_translation_z", theArch, aLowerLimitActualTranslationZ);
@@ -208,7 +210,7 @@ void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(S
     aLowerLimitActualTranslationZ = 0;
   }
 
-  Standard_Real aUpperLimitActualTranslationZ;
+  Standard_Real aUpperLimitActualTranslationZ = NAN;
   Standard_Boolean hasUpperLimitActualTranslationZ = Standard_True;
   if ( theData->IsParamDefined (theNum,24) ) {
     theData->ReadReal (theNum, 24, "upper_limit_actual_translation_z", theArch, aUpperLimitActualTranslationZ);
index 5478b6874e2718d0f5c6b26686faf4955e8c2b0a..cfae1dfc9b01a1d47ef5bbebedf0c60981c1cb29 100644 (file)
@@ -49,7 +49,7 @@ void RWStepKinematics_RWMechanismStateRepresentation::ReadStep
   // Inherited field : items
   Handle(StepRepr_HArray1OfRepresentationItem) aItems;
   Handle(StepRepr_RepresentationItem) anEnt;
-  Standard_Integer nsub;
+  Standard_Integer nsub = 0;
   if (theData->ReadSubList (theNum, 2, "items", theArch, nsub)) {
     Standard_Integer nb = theData->NbParams(nsub);
     aItems = new StepRepr_HArray1OfRepresentationItem (1, nb);
index 029d6c40730db4bb9812f242ee150bf270d72237..e3cc89170547842c6fb96ae779b507883eb553a8 100644 (file)
@@ -61,7 +61,7 @@ void RWStepKinematics_RWOrientedJoint::ReadStep (const Handle(StepData_StepReade
   Handle(StepShape_Edge) aOrientedEdge_EdgeElement;
   theData->ReadEntity (theNum, 4, "oriented_edge.edge_element", theArch, STANDARD_TYPE(StepShape_Edge), aOrientedEdge_EdgeElement);
 
-  Standard_Boolean aOrientedEdge_Orientation;
+  Standard_Boolean aOrientedEdge_Orientation = 0;
   theData->ReadBoolean (theNum, 5, "oriented_edge.orientation", theArch, aOrientedEdge_Orientation);
 
   // Initialize entity
index 8ae05a8cff7c9d26e01a6e802309b2d408614a85..39e08bf284cc9aa17439dccfa0661eb13d5ecd23 100644 (file)
@@ -84,7 +84,7 @@ void RWStepKinematics_RWPlanarCurvePair::ReadStep (const Handle(StepData_StepRea
   Handle(StepGeom_Curve) aCurve2;
   theData->ReadEntity (theNum, 8, "curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aCurve2);
 
-  Standard_Boolean aOrientation;
+  Standard_Boolean aOrientation = 0;
   theData->ReadBoolean (theNum, 9, "orientation", theArch, aOrientation);
 
   // Initialize entity
index 746976d09dc9ddae0cfb58f1519d4bbda5097a83..e7a9540d3dd3a98854d1f2d67f3c61a08a441e2d 100644 (file)
@@ -85,7 +85,7 @@ void RWStepKinematics_RWPlanarCurvePairRange::ReadStep (const Handle(StepData_St
   Handle(StepGeom_Curve) aPlanarCurvePair_Curve2;
   theData->ReadEntity (theNum, 8, "planar_curve_pair.curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve2);
 
-  Standard_Boolean aPlanarCurvePair_Orientation;
+  Standard_Boolean aPlanarCurvePair_Orientation = 0;
   theData->ReadBoolean (theNum, 9, "planar_curve_pair.orientation", theArch, aPlanarCurvePair_Orientation);
 
   // Own fields of PlanarCurvePairRange
index 7097d7bd2a6bba3395e50c9eaed368b31b94404f..05d0914ea0962cb2a0a7386ca446bcc113fc00ca 100644 (file)
@@ -77,22 +77,22 @@ void RWStepKinematics_RWPlanarPair::ReadStep (const Handle(StepData_StepReaderDa
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Initialize entity
index f93b976eb3c3e981ec826f041fe371605ff9936f..8d0ef114cbe61bf642e903b49b7165b025352e11 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWPlanarPairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -55,13 +57,13 @@ void RWStepKinematics_RWPlanarPairValue::ReadStep (const Handle(StepData_StepRea
 
   // Own fields of PlanarPairValue
 
-  Standard_Real aActualRotation;
+  Standard_Real aActualRotation = NAN;
   theData->ReadReal (theNum, 3, "actual_rotation", theArch, aActualRotation);
 
-  Standard_Real aActualTranslationX;
+  Standard_Real aActualTranslationX = NAN;
   theData->ReadReal (theNum, 4, "actual_translation_x", theArch, aActualTranslationX);
 
-  Standard_Real aActualTranslationY;
+  Standard_Real aActualTranslationY = NAN;
   theData->ReadReal (theNum, 5, "actual_translation_y", theArch, aActualTranslationY);
 
   // Initialize entity
index 322a7b62dbdddce30b0cfe6fac2436cea3aa69f7..7bd945bdc576a6b762535df34502d330d6fde968 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWPlanarPairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWPlanarPairWithRange::ReadStep (const Handle(StepData_Ste
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Own fields of PlanarPairWithRange
 
-  Standard_Real aLowerLimitActualRotation;
+  Standard_Real aLowerLimitActualRotation = NAN;
   Standard_Boolean hasLowerLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation);
@@ -108,7 +110,7 @@ void RWStepKinematics_RWPlanarPairWithRange::ReadStep (const Handle(StepData_Ste
     aLowerLimitActualRotation = 0;
   }
 
-  Standard_Real aUpperLimitActualRotation;
+  Standard_Real aUpperLimitActualRotation = NAN;
   Standard_Boolean hasUpperLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation);
@@ -118,7 +120,7 @@ void RWStepKinematics_RWPlanarPairWithRange::ReadStep (const Handle(StepData_Ste
     aUpperLimitActualRotation = 0;
   }
 
-  Standard_Real aLowerLimitActualTranslationX;
+  Standard_Real aLowerLimitActualTranslationX = NAN;
   Standard_Boolean hasLowerLimitActualTranslationX = Standard_True;
   if ( theData->IsParamDefined (theNum,15) ) {
     theData->ReadReal (theNum, 15, "lower_limit_actual_translation_x", theArch, aLowerLimitActualTranslationX);
@@ -128,7 +130,7 @@ void RWStepKinematics_RWPlanarPairWithRange::ReadStep (const Handle(StepData_Ste
     aLowerLimitActualTranslationX = 0;
   }
 
-  Standard_Real aUpperLimitActualTranslationX;
+  Standard_Real aUpperLimitActualTranslationX = NAN;
   Standard_Boolean hasUpperLimitActualTranslationX = Standard_True;
   if ( theData->IsParamDefined (theNum,16) ) {
     theData->ReadReal (theNum, 16, "upper_limit_actual_translation_x", theArch, aUpperLimitActualTranslationX);
@@ -138,7 +140,7 @@ void RWStepKinematics_RWPlanarPairWithRange::ReadStep (const Handle(StepData_Ste
     aUpperLimitActualTranslationX = 0;
   }
 
-  Standard_Real aLowerLimitActualTranslationY;
+  Standard_Real aLowerLimitActualTranslationY = NAN;
   Standard_Boolean hasLowerLimitActualTranslationY = Standard_True;
   if ( theData->IsParamDefined (theNum,17) ) {
     theData->ReadReal (theNum, 17, "lower_limit_actual_translation_y", theArch, aLowerLimitActualTranslationY);
@@ -148,7 +150,7 @@ void RWStepKinematics_RWPlanarPairWithRange::ReadStep (const Handle(StepData_Ste
     aLowerLimitActualTranslationY = 0;
   }
 
-  Standard_Real aUpperLimitActualTranslationY;
+  Standard_Real aUpperLimitActualTranslationY = NAN;
   Standard_Boolean hasUpperLimitActualTranslationY = Standard_True;
   if ( theData->IsParamDefined (theNum,18) ) {
     theData->ReadReal (theNum, 18, "upper_limit_actual_translation_y", theArch, aUpperLimitActualTranslationY);
index d288a84d9e859b9e1043326a636e7016215446c5..c2453a407afb94dd24caecdb8aa2e759e5e68154 100644 (file)
@@ -81,7 +81,7 @@ void RWStepKinematics_RWPointOnPlanarCurvePair::ReadStep (const Handle(StepData_
   Handle(StepGeom_Curve) aPairCurve;
   theData->ReadEntity (theNum, 7, "pair_curve", theArch, STANDARD_TYPE(StepGeom_Curve), aPairCurve);
 
-  Standard_Boolean aOrientation;
+  Standard_Boolean aOrientation = 0;
   theData->ReadBoolean (theNum, 8, "orientation", theArch, aOrientation);
 
   // Initialize entity
index c05ef8f6e6a72fc23de57dd0916458d0f14bdba6..56bf8e179a6d70416c6dd2db9ad59ccb019fc167 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWPointOnPlanarCurvePairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -69,7 +71,7 @@ void RWStepKinematics_RWPointOnPlanarCurvePairValue::ReadStep (const Handle(Step
       aItems = new TColStd_HArray1OfReal(1, nb);
       Standard_Integer num2 = nsub;
       for (Standard_Integer i0 = 1; i0 <= nb; i0++) {
-        Standard_Real anIt0;
+        Standard_Real anIt0 = NAN;
         theData->ReadReal(num2, i0, "real", theArch, anIt0);
         aItems->SetValue(i0, anIt0);
       }
index 22f209ffa54f2b52c16a5d709573c2b626bc4e86..e705926b35682167bbee7f5f89177d367757d69d 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWPointOnPlanarCurvePairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -83,7 +85,7 @@ void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::ReadStep (const Handle(
   Handle(StepGeom_Curve) aPointOnPlanarCurvePair_PairCurve;
   theData->ReadEntity (theNum, 7, "point_on_planar_curve_pair.pair_curve", theArch, STANDARD_TYPE(StepGeom_Curve), aPointOnPlanarCurvePair_PairCurve);
 
-  Standard_Boolean aPointOnPlanarCurvePair_Orientation;
+  Standard_Boolean aPointOnPlanarCurvePair_Orientation = 0;
   theData->ReadBoolean (theNum, 8, "point_on_planar_curve_pair.orientation", theArch, aPointOnPlanarCurvePair_Orientation);
 
   // Own fields of PointOnPlanarCurvePairWithRange
@@ -91,7 +93,7 @@ void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::ReadStep (const Handle(
   Handle(StepGeom_TrimmedCurve) aRangeOnPairCurve;
   theData->ReadEntity (theNum, 9, "range_on_pair_curve", theArch, STANDARD_TYPE(StepGeom_TrimmedCurve), aRangeOnPairCurve);
 
-  Standard_Real aLowerLimitYaw;
+  Standard_Real aLowerLimitYaw = NAN;
   Standard_Boolean hasLowerLimitYaw = Standard_True;
   if ( theData->IsParamDefined (theNum,10) ) {
     theData->ReadReal (theNum, 10, "lower_limit_yaw", theArch, aLowerLimitYaw);
@@ -101,7 +103,7 @@ void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::ReadStep (const Handle(
     aLowerLimitYaw = 0;
   }
 
-  Standard_Real aUpperLimitYaw;
+  Standard_Real aUpperLimitYaw = NAN;
   Standard_Boolean hasUpperLimitYaw = Standard_True;
   if ( theData->IsParamDefined (theNum,11) ) {
     theData->ReadReal (theNum, 11, "upper_limit_yaw", theArch, aUpperLimitYaw);
@@ -111,7 +113,7 @@ void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::ReadStep (const Handle(
     aUpperLimitYaw = 0;
   }
 
-  Standard_Real aLowerLimitPitch;
+  Standard_Real aLowerLimitPitch = NAN;
   Standard_Boolean hasLowerLimitPitch = Standard_True;
   if ( theData->IsParamDefined (theNum,12) ) {
     theData->ReadReal (theNum, 12, "lower_limit_pitch", theArch, aLowerLimitPitch);
@@ -121,7 +123,7 @@ void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::ReadStep (const Handle(
     aLowerLimitPitch = 0;
   }
 
-  Standard_Real aUpperLimitPitch;
+  Standard_Real aUpperLimitPitch = NAN;
   Standard_Boolean hasUpperLimitPitch = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "upper_limit_pitch", theArch, aUpperLimitPitch);
@@ -131,7 +133,7 @@ void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::ReadStep (const Handle(
     aUpperLimitPitch = 0;
   }
 
-  Standard_Real aLowerLimitRoll;
+  Standard_Real aLowerLimitRoll = NAN;
   Standard_Boolean hasLowerLimitRoll = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "lower_limit_roll", theArch, aLowerLimitRoll);
@@ -141,7 +143,7 @@ void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::ReadStep (const Handle(
     aLowerLimitRoll = 0;
   }
 
-  Standard_Real aUpperLimitRoll;
+  Standard_Real aUpperLimitRoll = NAN;
   Standard_Boolean hasUpperLimitRoll = Standard_True;
   if ( theData->IsParamDefined (theNum,15) ) {
     theData->ReadReal (theNum, 15, "upper_limit_roll", theArch, aUpperLimitRoll);
index 94ae94355c1fea0c33ba02e82c412a1d0cd62d24..85ec91d30db453b3909030b2929d0ad067d985e7 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWPointOnSurfacePairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -69,7 +71,7 @@ void RWStepKinematics_RWPointOnSurfacePairValue::ReadStep (const Handle(StepData
       aItems = new TColStd_HArray1OfReal(1, nb);
       Standard_Integer num2 = nsub;
       for (Standard_Integer i0 = 1; i0 <= nb; i0++) {
-        Standard_Real anIt0;
+        Standard_Real anIt0 = NAN;
         theData->ReadReal(num2, i0, "real", theArch, anIt0);
         aItems->SetValue(i0, anIt0);
       }
index 91014584d9e74227edf387ad6367cdc63917077b..c794941219beec524121c37b6f697641c3a344bb 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWPointOnSurfacePairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -88,7 +90,7 @@ void RWStepKinematics_RWPointOnSurfacePairWithRange::ReadStep (const Handle(Step
   Handle(StepGeom_RectangularTrimmedSurface) aRangeOnPairSurface;
   theData->ReadEntity (theNum, 8, "range_on_pair_surface", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnPairSurface);
 
-  Standard_Real aLowerLimitYaw;
+  Standard_Real aLowerLimitYaw = NAN;
   Standard_Boolean hasLowerLimitYaw = Standard_True;
   if ( theData->IsParamDefined (theNum,9) ) {
     theData->ReadReal (theNum, 9, "lower_limit_yaw", theArch, aLowerLimitYaw);
@@ -98,7 +100,7 @@ void RWStepKinematics_RWPointOnSurfacePairWithRange::ReadStep (const Handle(Step
     aLowerLimitYaw = 0;
   }
 
-  Standard_Real aUpperLimitYaw;
+  Standard_Real aUpperLimitYaw = NAN;
   Standard_Boolean hasUpperLimitYaw = Standard_True;
   if ( theData->IsParamDefined (theNum,10) ) {
     theData->ReadReal (theNum, 10, "upper_limit_yaw", theArch, aUpperLimitYaw);
@@ -108,7 +110,7 @@ void RWStepKinematics_RWPointOnSurfacePairWithRange::ReadStep (const Handle(Step
     aUpperLimitYaw = 0;
   }
 
-  Standard_Real aLowerLimitPitch;
+  Standard_Real aLowerLimitPitch = NAN;
   Standard_Boolean hasLowerLimitPitch = Standard_True;
   if ( theData->IsParamDefined (theNum,11) ) {
     theData->ReadReal (theNum, 11, "lower_limit_pitch", theArch, aLowerLimitPitch);
@@ -118,7 +120,7 @@ void RWStepKinematics_RWPointOnSurfacePairWithRange::ReadStep (const Handle(Step
     aLowerLimitPitch = 0;
   }
 
-  Standard_Real aUpperLimitPitch;
+  Standard_Real aUpperLimitPitch = NAN;
   Standard_Boolean hasUpperLimitPitch = Standard_True;
   if ( theData->IsParamDefined (theNum,12) ) {
     theData->ReadReal (theNum, 12, "upper_limit_pitch", theArch, aUpperLimitPitch);
@@ -128,7 +130,7 @@ void RWStepKinematics_RWPointOnSurfacePairWithRange::ReadStep (const Handle(Step
     aUpperLimitPitch = 0;
   }
 
-  Standard_Real aLowerLimitRoll;
+  Standard_Real aLowerLimitRoll = NAN;
   Standard_Boolean hasLowerLimitRoll = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "lower_limit_roll", theArch, aLowerLimitRoll);
@@ -138,7 +140,7 @@ void RWStepKinematics_RWPointOnSurfacePairWithRange::ReadStep (const Handle(Step
     aLowerLimitRoll = 0;
   }
 
-  Standard_Real aUpperLimitRoll;
+  Standard_Real aUpperLimitRoll = NAN;
   Standard_Boolean hasUpperLimitRoll = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "upper_limit_roll", theArch, aUpperLimitRoll);
index 51e71ac1f7712b0b263349b1d87c2cae59ae9826..80a29445f1d82d02049c35658d0d63ebd3435221 100644 (file)
@@ -77,22 +77,22 @@ void RWStepKinematics_RWPrismaticPair::ReadStep (const Handle(StepData_StepReade
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Initialize entity
index 6c9d9052be68f15dd88b8602a6167886b9adefe9..67b9647391e9721526148c06668a43616ff29a86 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWPrismaticPairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -55,7 +57,7 @@ void RWStepKinematics_RWPrismaticPairValue::ReadStep (const Handle(StepData_Step
 
   // Own fields of PrismaticPairValue
 
-  Standard_Real aActualTranslation;
+  Standard_Real aActualTranslation = NAN;
   theData->ReadReal (theNum, 3, "actual_translation", theArch, aActualTranslation);
 
   // Initialize entity
index e7f21ebeb2b82bdabe0b2915e1a7655fda9bc56a..c5f97cf7ab256acb355a5feba56e9c6908b24f00 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWPrismaticPairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWPrismaticPairWithRange::ReadStep (const Handle(StepData_
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Own fields of PrismaticPairWithRange
 
-  Standard_Real aLowerLimitActualTranslation;
+  Standard_Real aLowerLimitActualTranslation = NAN;
   Standard_Boolean hasLowerLimitActualTranslation = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "lower_limit_actual_translation", theArch, aLowerLimitActualTranslation);
@@ -108,7 +110,7 @@ void RWStepKinematics_RWPrismaticPairWithRange::ReadStep (const Handle(StepData_
     aLowerLimitActualTranslation = 0;
   }
 
-  Standard_Real aUpperLimitActualTranslation;
+  Standard_Real aUpperLimitActualTranslation = NAN;
   Standard_Boolean hasUpperLimitActualTranslation = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "upper_limit_actual_translation", theArch, aUpperLimitActualTranslation);
index ebbd68bbf9c059e95166c2ac64f56b6e53dcff27..ad931a6871cd5f3283bf6517ece28105ee96612a 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWRackAndPinionPair.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,7 +80,7 @@ void RWStepKinematics_RWRackAndPinionPair::ReadStep (const Handle(StepData_StepR
 
   // Own fields of RackAndPinionPair
 
-  Standard_Real aPinionRadius;
+  Standard_Real aPinionRadius = NAN;
   theData->ReadReal (theNum, 7, "pinion_radius", theArch, aPinionRadius);
 
   // Initialize entity
index 650d333c57869e8304713d369f35dda49bb32b2a..208470f901693abafdead8d04abdeda10b958b14 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWRackAndPinionPairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -55,7 +57,7 @@ void RWStepKinematics_RWRackAndPinionPairValue::ReadStep (const Handle(StepData_
 
   // Own fields of RackAndPinionPairValue
 
-  Standard_Real aActualDisplacement;
+  Standard_Real aActualDisplacement = NAN;
   theData->ReadReal (theNum, 3, "actual_displacement", theArch, aActualDisplacement);
 
   // Initialize entity
index b97d8ba6f6e5e1eaae3a764e135b6aaa08ca3728..201f3f3a647ac00d4a7ec07e7e7a5968ce63774b 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWRackAndPinionPairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,12 +80,12 @@ void RWStepKinematics_RWRackAndPinionPairWithRange::ReadStep (const Handle(StepD
 
   // Inherited fields of RackAndPinionPair
 
-  Standard_Real aRackAndPinionPair_PinionRadius;
+  Standard_Real aRackAndPinionPair_PinionRadius = NAN;
   theData->ReadReal (theNum, 7, "rack_and_pinion_pair.pinion_radius", theArch, aRackAndPinionPair_PinionRadius);
 
   // Own fields of RackAndPinionPairWithRange
 
-  Standard_Real aLowerLimitRackDisplacement;
+  Standard_Real aLowerLimitRackDisplacement = NAN;
   Standard_Boolean hasLowerLimitRackDisplacement = Standard_True;
   if ( theData->IsParamDefined (theNum,8) ) {
     theData->ReadReal (theNum, 8, "lower_limit_rack_displacement", theArch, aLowerLimitRackDisplacement);
@@ -93,7 +95,7 @@ void RWStepKinematics_RWRackAndPinionPairWithRange::ReadStep (const Handle(StepD
     aLowerLimitRackDisplacement = 0;
   }
 
-  Standard_Real aUpperLimitRackDisplacement;
+  Standard_Real aUpperLimitRackDisplacement = NAN;
   Standard_Boolean hasUpperLimitRackDisplacement = Standard_True;
   if ( theData->IsParamDefined (theNum,9) ) {
     theData->ReadReal (theNum, 9, "upper_limit_rack_displacement", theArch, aUpperLimitRackDisplacement);
index 5eea8712d837eae0877d4724ed598bc304670734..c9a1827ab149c79c5a58f45fd19d6eac1fcbcd08 100644 (file)
@@ -77,22 +77,22 @@ void RWStepKinematics_RWRevolutePair::ReadStep (const Handle(StepData_StepReader
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Initialize entity
index 98ae04859b73009fdcc82df548f692613e279d06..cb2561a14fb5b05e2091500b0ca367491138870e 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWRevolutePairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -55,7 +57,7 @@ void RWStepKinematics_RWRevolutePairValue::ReadStep (const Handle(StepData_StepR
 
   // Own fields of RevolutePairValue
 
-  Standard_Real aActualRotation;
+  Standard_Real aActualRotation = NAN;
   theData->ReadReal (theNum, 3, "actual_rotation", theArch, aActualRotation);
 
   // Initialize entity
index a2cf369909f1a1cec7ebf6803f1f1cc99962526f..8139bb8d44995d7419d358cc288f6540cda15ab0 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWRevolutePairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWRevolutePairWithRange::ReadStep (const Handle(StepData_S
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Own fields of RevolutePairWithRange
 
-  Standard_Real aLowerLimitActualRotation;
+  Standard_Real aLowerLimitActualRotation = NAN;
   Standard_Boolean hasLowerLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation);
@@ -108,7 +110,7 @@ void RWStepKinematics_RWRevolutePairWithRange::ReadStep (const Handle(StepData_S
     aLowerLimitActualRotation = 0;
   }
 
-  Standard_Real aUpperLimitActualRotation;
+  Standard_Real aUpperLimitActualRotation = NAN;
   Standard_Boolean hasUpperLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation);
index 5aa9b984d539cab716bc4631bc7a25b3bd752c70..120c16a57ec12dd205922a76586c3af43cbf9eff 100644 (file)
@@ -84,7 +84,7 @@ void RWStepKinematics_RWRollingCurvePair::ReadStep (const Handle(StepData_StepRe
   Handle(StepGeom_Curve) aPlanarCurvePair_Curve2;
   theData->ReadEntity (theNum, 8, "planar_curve_pair.curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve2);
 
-  Standard_Boolean aPlanarCurvePair_Orientation;
+  Standard_Boolean aPlanarCurvePair_Orientation = 0;
   theData->ReadBoolean (theNum, 9, "planar_curve_pair.orientation", theArch, aPlanarCurvePair_Orientation);
 
   // Initialize entity
index 68c6596e3645a07dc9386526a3a4be410f1f974a..6c250f3bdc25c03f87fd22ec0fb1c4f455b59dd9 100644 (file)
@@ -84,7 +84,7 @@ void RWStepKinematics_RWRollingSurfacePair::ReadStep (const Handle(StepData_Step
   Handle(StepGeom_Surface) aSurfacePair_Surface2;
   theData->ReadEntity (theNum, 8, "surface_pair.surface2", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface2);
 
-  Standard_Boolean aSurfacePair_Orientation;
+  Standard_Boolean aSurfacePair_Orientation = 0;
   theData->ReadBoolean (theNum, 9, "surface_pair.orientation", theArch, aSurfacePair_Orientation);
 
   // Initialize entity
index 78851c7ee8dede67c14100ff88d15112936e3296..88630cd4d2fe44114447f313ae6d4c4806c5ac4e 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWRollingSurfacePairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -59,7 +61,7 @@ void RWStepKinematics_RWRollingSurfacePairValue::ReadStep (const Handle(StepData
   Handle(StepGeom_PointOnSurface) aActualPointOnSurface;
   theData->ReadEntity (theNum, 3, "actual_point_on_surface", theArch, STANDARD_TYPE(StepGeom_PointOnSurface), aActualPointOnSurface);
 
-  Standard_Real aActualRotation;
+  Standard_Real aActualRotation = NAN;
   theData->ReadReal (theNum, 4, "actual_rotation", theArch, aActualRotation);
 
   // Initialize entity
index 65f3109391b312c0d74c379daf33c33a4f769b59..eab4893b2144cf4b2e783635b370cb049ce6b8e4 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWRotationAboutDirection.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -53,7 +55,7 @@ void RWStepKinematics_RWRotationAboutDirection::ReadStep (const Handle(StepData_
   Handle(StepGeom_Direction) aDirectionOfAxis;
   theData->ReadEntity (theNum, 2, "direction_of_axis", theArch, STANDARD_TYPE(StepGeom_Direction), aDirectionOfAxis);
 
-  Standard_Real aRotationAngle;
+  Standard_Real aRotationAngle = NAN;
   theData->ReadReal (theNum, 3, "rotation_angle", theArch, aRotationAngle);
 
   // Initialize entity
index 3bed0f9004b91ae596e2fb9f3b2170166878afd4..a7814e33dea52e68bf6b4460b129955ef73c3d5c 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWScrewPair.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,7 +80,7 @@ void RWStepKinematics_RWScrewPair::ReadStep (const Handle(StepData_StepReaderDat
 
   // Own fields of ScrewPair
 
-  Standard_Real aPitch;
+  Standard_Real aPitch = NAN;
   theData->ReadReal (theNum, 7, "pitch", theArch, aPitch);
 
   // Initialize entity
index 06343e4538d58f8bf5bbc8b5a8757a5014b3c37c..2515ad17728395884b6a02e2230e9a7100d192bb 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWScrewPairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -55,7 +57,7 @@ void RWStepKinematics_RWScrewPairValue::ReadStep (const Handle(StepData_StepRead
 
   // Own fields of ScrewPairValue
 
-  Standard_Real aActualRotation;
+  Standard_Real aActualRotation = NAN;
   theData->ReadReal (theNum, 3, "actual_rotation", theArch, aActualRotation);
 
   // Initialize entity
index 7fe42958a9167aceb3c43850ff08244a8779fbc6..41dd4a58a9dfcc71a62dec8838f769080d1c8758 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWScrewPairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,12 +80,12 @@ void RWStepKinematics_RWScrewPairWithRange::ReadStep (const Handle(StepData_Step
 
   // Inherited fields of ScrewPair
 
-  Standard_Real aScrewPair_Pitch;
+  Standard_Real aScrewPair_Pitch = NAN;
   theData->ReadReal (theNum, 7, "screw_pair.pitch", theArch, aScrewPair_Pitch);
 
   // Own fields of ScrewPairWithRange
 
-  Standard_Real aLowerLimitActualRotation;
+  Standard_Real aLowerLimitActualRotation = NAN;
   Standard_Boolean hasLowerLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,8) ) {
     theData->ReadReal (theNum, 8, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation);
@@ -93,7 +95,7 @@ void RWStepKinematics_RWScrewPairWithRange::ReadStep (const Handle(StepData_Step
     aLowerLimitActualRotation = 0;
   }
 
-  Standard_Real aUpperLimitActualRotation;
+  Standard_Real aUpperLimitActualRotation = NAN;
   Standard_Boolean hasUpperLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,9) ) {
     theData->ReadReal (theNum, 9, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation);
index aba9c3dd057105547bffa395d7484308efa5dbc6..40f5148f449dfc4c6a57c0a334781047d2290a92 100644 (file)
@@ -84,7 +84,7 @@ void RWStepKinematics_RWSlidingCurvePair::ReadStep (const Handle(StepData_StepRe
   Handle(StepGeom_Curve) aPlanarCurvePair_Curve2;
   theData->ReadEntity (theNum, 8, "planar_curve_pair.curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve2);
 
-  Standard_Boolean aPlanarCurvePair_Orientation;
+  Standard_Boolean aPlanarCurvePair_Orientation = 0;
   theData->ReadBoolean (theNum, 9, "planar_curve_pair.orientation", theArch, aPlanarCurvePair_Orientation);
 
   // Initialize entity
index 9e134b8e330babe41eeefce1bb0bfc07d69d56ae..ba58f4d9860df321995e1914defc86bf9dc2e685 100644 (file)
@@ -84,7 +84,7 @@ void RWStepKinematics_RWSlidingSurfacePair::ReadStep (const Handle(StepData_Step
   Handle(StepGeom_Surface) aSurfacePair_Surface2;
   theData->ReadEntity (theNum, 8, "surface_pair.surface2", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface2);
 
-  Standard_Boolean aSurfacePair_Orientation;
+  Standard_Boolean aSurfacePair_Orientation = 0;
   theData->ReadBoolean (theNum, 9, "surface_pair.orientation", theArch, aSurfacePair_Orientation);
 
   // Initialize entity
index fabe4bd53c36b17718493634e40dd5a8ea7c8a6b..71119fda08c3ca16ec481d977c3052fc1ce50aae 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWSlidingSurfacePairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -62,7 +64,7 @@ void RWStepKinematics_RWSlidingSurfacePairValue::ReadStep (const Handle(StepData
   Handle(StepGeom_PointOnSurface) aActualPointOnSurface2;
   theData->ReadEntity (theNum, 4, "actual_point_on_surface2", theArch, STANDARD_TYPE(StepGeom_PointOnSurface), aActualPointOnSurface2);
 
-  Standard_Real aActualRotation;
+  Standard_Real aActualRotation = NAN;
   theData->ReadReal (theNum, 5, "actual_rotation", theArch, aActualRotation);
 
   // Initialize entity
index 16f8ac8504d0843c1dce254081fad055676e8a72..dfa17f318e190199b634cc1f38710b69d4756dbd 100644 (file)
@@ -77,22 +77,22 @@ void RWStepKinematics_RWSphericalPair::ReadStep (const Handle(StepData_StepReade
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Initialize entity
index 5bf44d0d2f7bfe123fc5c2bc6044275f6913b891..966f776042e366c05aaed3ef4c5b5b14964db66b 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWSphericalPairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -65,7 +67,7 @@ void RWStepKinematics_RWSphericalPairValue::ReadStep (const Handle(StepData_Step
       aItems = new TColStd_HArray1OfReal(1, nb);
       Standard_Integer num2 = nsub;
       for (Standard_Integer i0 = 1; i0 <= nb; i0++) {
-        Standard_Real anIt0;
+        Standard_Real anIt0 = NAN;
         theData->ReadReal(num2, i0, "real", theArch, anIt0);
         aItems->SetValue(i0, anIt0);
       }
index 726c2ba0baaadad17b0d5c1ca1753b8e2d8bdfdd..febe7156f5891ffc41408e9675ba475b1d78ad16 100644 (file)
@@ -77,22 +77,22 @@ void RWStepKinematics_RWSphericalPairWithPin::ReadStep (const Handle(StepData_St
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Initialize entity
index 4e47edddffbef5758f247b0cfea373ae5632e2d3..860b28ec3a5de00400aabc573037d3de0e2f28ef 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWSphericalPairWithPinAndRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWSphericalPairWithPinAndRange::ReadStep (const Handle(Ste
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Own fields of SphericalPairWithPinAndRange
 
-  Standard_Real aLowerLimitYaw;
+  Standard_Real aLowerLimitYaw = NAN;
   Standard_Boolean hasLowerLimitYaw = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "lower_limit_yaw", theArch, aLowerLimitYaw);
@@ -108,7 +110,7 @@ void RWStepKinematics_RWSphericalPairWithPinAndRange::ReadStep (const Handle(Ste
     aLowerLimitYaw = 0;
   }
 
-  Standard_Real aUpperLimitYaw;
+  Standard_Real aUpperLimitYaw = NAN;
   Standard_Boolean hasUpperLimitYaw = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "upper_limit_yaw", theArch, aUpperLimitYaw);
@@ -118,7 +120,7 @@ void RWStepKinematics_RWSphericalPairWithPinAndRange::ReadStep (const Handle(Ste
     aUpperLimitYaw = 0;
   }
 
-  Standard_Real aLowerLimitRoll;
+  Standard_Real aLowerLimitRoll = NAN;
   Standard_Boolean hasLowerLimitRoll = Standard_True;
   if ( theData->IsParamDefined (theNum,15) ) {
     theData->ReadReal (theNum, 15, "lower_limit_roll", theArch, aLowerLimitRoll);
@@ -128,7 +130,7 @@ void RWStepKinematics_RWSphericalPairWithPinAndRange::ReadStep (const Handle(Ste
     aLowerLimitRoll = 0;
   }
 
-  Standard_Real aUpperLimitRoll;
+  Standard_Real aUpperLimitRoll = NAN;
   Standard_Boolean hasUpperLimitRoll = Standard_True;
   if ( theData->IsParamDefined (theNum,16) ) {
     theData->ReadReal (theNum, 16, "upper_limit_roll", theArch, aUpperLimitRoll);
index f089f9d7e0f4ec0b7a1944038a8af9ea20b72b5e..ee9852ec9736c7d06efcf7867c6b08c7792ccb65 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWSphericalPairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWSphericalPairWithRange::ReadStep (const Handle(StepData_
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Own fields of SphericalPairWithRange
 
-  Standard_Real aLowerLimitYaw;
+  Standard_Real aLowerLimitYaw = NAN;
   Standard_Boolean hasLowerLimitYaw = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "lower_limit_yaw", theArch, aLowerLimitYaw);
@@ -108,7 +110,7 @@ void RWStepKinematics_RWSphericalPairWithRange::ReadStep (const Handle(StepData_
     aLowerLimitYaw = 0;
   }
 
-  Standard_Real aUpperLimitYaw;
+  Standard_Real aUpperLimitYaw = NAN;
   Standard_Boolean hasUpperLimitYaw = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "upper_limit_yaw", theArch, aUpperLimitYaw);
@@ -118,7 +120,7 @@ void RWStepKinematics_RWSphericalPairWithRange::ReadStep (const Handle(StepData_
     aUpperLimitYaw = 0;
   }
 
-  Standard_Real aLowerLimitPitch;
+  Standard_Real aLowerLimitPitch = NAN;
   Standard_Boolean hasLowerLimitPitch = Standard_True;
   if ( theData->IsParamDefined (theNum,15) ) {
     theData->ReadReal (theNum, 15, "lower_limit_pitch", theArch, aLowerLimitPitch);
@@ -128,7 +130,7 @@ void RWStepKinematics_RWSphericalPairWithRange::ReadStep (const Handle(StepData_
     aLowerLimitPitch = 0;
   }
 
-  Standard_Real aUpperLimitPitch;
+  Standard_Real aUpperLimitPitch = NAN;
   Standard_Boolean hasUpperLimitPitch = Standard_True;
   if ( theData->IsParamDefined (theNum,16) ) {
     theData->ReadReal (theNum, 16, "upper_limit_pitch", theArch, aUpperLimitPitch);
@@ -138,7 +140,7 @@ void RWStepKinematics_RWSphericalPairWithRange::ReadStep (const Handle(StepData_
     aUpperLimitPitch = 0;
   }
 
-  Standard_Real aLowerLimitRoll;
+  Standard_Real aLowerLimitRoll = NAN;
   Standard_Boolean hasLowerLimitRoll = Standard_True;
   if ( theData->IsParamDefined (theNum,17) ) {
     theData->ReadReal (theNum, 17, "lower_limit_roll", theArch, aLowerLimitRoll);
@@ -148,7 +150,7 @@ void RWStepKinematics_RWSphericalPairWithRange::ReadStep (const Handle(StepData_
     aLowerLimitRoll = 0;
   }
 
-  Standard_Real aUpperLimitRoll;
+  Standard_Real aUpperLimitRoll = NAN;
   Standard_Boolean hasUpperLimitRoll = Standard_True;
   if ( theData->IsParamDefined (theNum,18) ) {
     theData->ReadReal (theNum, 18, "upper_limit_roll", theArch, aUpperLimitRoll);
index 81d8dfeb8848bb7b6b1ef80c308d6d0bd4ea6ced..294c5068e3a315afbf830d18eb32f001bd807c2d 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWSurfacePairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -86,7 +88,7 @@ void RWStepKinematics_RWSurfacePairWithRange::ReadStep (const Handle(StepData_St
   Handle(StepGeom_Surface) aSurfacePair_Surface2;
   theData->ReadEntity (theNum, 8, "surface_pair.surface2", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface2);
 
-  Standard_Boolean aSurfacePair_Orientation;
+  Standard_Boolean aSurfacePair_Orientation = 0;
   theData->ReadBoolean (theNum, 9, "surface_pair.orientation", theArch, aSurfacePair_Orientation);
 
   // Own fields of SurfacePairWithRange
@@ -97,7 +99,7 @@ void RWStepKinematics_RWSurfacePairWithRange::ReadStep (const Handle(StepData_St
   Handle(StepGeom_RectangularTrimmedSurface) aRangeOnSurface2;
   theData->ReadEntity (theNum, 11, "range_on_surface2", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnSurface2);
 
-  Standard_Real aLowerLimitActualRotation;
+  Standard_Real aLowerLimitActualRotation = NAN;
   Standard_Boolean hasLowerLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,12) ) {
     theData->ReadReal (theNum, 12, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation);
@@ -107,7 +109,7 @@ void RWStepKinematics_RWSurfacePairWithRange::ReadStep (const Handle(StepData_St
     aLowerLimitActualRotation = 0;
   }
 
-  Standard_Real aUpperLimitActualRotation;
+  Standard_Real aUpperLimitActualRotation = NAN;
   Standard_Boolean hasUpperLimitActualRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation);
index e8f4b3319f2be2ff69c5209d4a9bab49ccb25044..9f34780f3fa70208092216cac8e296a052462c86 100644 (file)
@@ -77,22 +77,22 @@ void RWStepKinematics_RWUnconstrainedPair::ReadStep (const Handle(StepData_StepR
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Initialize entity
index 3cffe5357e9682f9a6bdf824dec015f5f3287771..acb38a812cb1b30990ab38121ee2bba42cf23e08 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWUniversalPair.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWUniversalPair::ReadStep (const Handle(StepData_StepReade
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Own fields of UniversalPair
 
-  Standard_Real aInputSkewAngle;
+  Standard_Real aInputSkewAngle = NAN;
   Standard_Boolean hasInputSkewAngle = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "input_skew_angle", theArch, aInputSkewAngle);
index 45b86dbed655e5604ab5a1f7a315ede47205d065..ec4ce813f64acc6a649d63b71689faadf6879189 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWUniversalPairValue.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -55,10 +57,10 @@ void RWStepKinematics_RWUniversalPairValue::ReadStep (const Handle(StepData_Step
 
   // Own fields of UniversalPairValue
 
-  Standard_Real aFirstRotationAngle;
+  Standard_Real aFirstRotationAngle = NAN;
   theData->ReadReal (theNum, 3, "first_rotation_angle", theArch, aFirstRotationAngle);
 
-  Standard_Real aSecondRotationAngle;
+  Standard_Real aSecondRotationAngle = NAN;
   theData->ReadReal (theNum, 4, "second_rotation_angle", theArch, aSecondRotationAngle);
 
   // Initialize entity
index 496ee0bd01e998acfd281c9d13ac4bde843abcc5..9728b38967073aa74db6468e8c0d3aa25a49a664 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepKinematics_RWUniversalPairWithRange.hxx>
 
 #include <Interface_EntityIterator.hxx>
@@ -78,27 +80,27 @@ void RWStepKinematics_RWUniversalPairWithRange::ReadStep (const Handle(StepData_
 
   // Inherited fields of LowOrderKinematicPair
 
-  Standard_Boolean aLowOrderKinematicPair_TX;
+  Standard_Boolean aLowOrderKinematicPair_TX = 0;
   theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX);
 
-  Standard_Boolean aLowOrderKinematicPair_TY;
+  Standard_Boolean aLowOrderKinematicPair_TY = 0;
   theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY);
 
-  Standard_Boolean aLowOrderKinematicPair_TZ;
+  Standard_Boolean aLowOrderKinematicPair_TZ = 0;
   theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ);
 
-  Standard_Boolean aLowOrderKinematicPair_RX;
+  Standard_Boolean aLowOrderKinematicPair_RX = 0;
   theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX);
 
-  Standard_Boolean aLowOrderKinematicPair_RY;
+  Standard_Boolean aLowOrderKinematicPair_RY = 0;
   theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY);
 
-  Standard_Boolean aLowOrderKinematicPair_RZ;
+  Standard_Boolean aLowOrderKinematicPair_RZ = 0;
   theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ);
 
   // Inherited fields of UniversalPair
 
-  Standard_Real aUniversalPair_InputSkewAngle;
+  Standard_Real aUniversalPair_InputSkewAngle = NAN;
   Standard_Boolean hasUniversalPair_InputSkewAngle = Standard_True;
   if ( theData->IsParamDefined (theNum,13) ) {
     theData->ReadReal (theNum, 13, "universal_pair.input_skew_angle", theArch, aUniversalPair_InputSkewAngle);
@@ -110,7 +112,7 @@ void RWStepKinematics_RWUniversalPairWithRange::ReadStep (const Handle(StepData_
 
   // Own fields of UniversalPairWithRange
 
-  Standard_Real aLowerLimitFirstRotation;
+  Standard_Real aLowerLimitFirstRotation = NAN;
   Standard_Boolean hasLowerLimitFirstRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,14) ) {
     theData->ReadReal (theNum, 14, "lower_limit_first_rotation", theArch, aLowerLimitFirstRotation);
@@ -120,7 +122,7 @@ void RWStepKinematics_RWUniversalPairWithRange::ReadStep (const Handle(StepData_
     aLowerLimitFirstRotation = 0;
   }
 
-  Standard_Real aUpperLimitFirstRotation;
+  Standard_Real aUpperLimitFirstRotation = NAN;
   Standard_Boolean hasUpperLimitFirstRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,15) ) {
     theData->ReadReal (theNum, 15, "upper_limit_first_rotation", theArch, aUpperLimitFirstRotation);
@@ -130,7 +132,7 @@ void RWStepKinematics_RWUniversalPairWithRange::ReadStep (const Handle(StepData_
     aUpperLimitFirstRotation = 0;
   }
 
-  Standard_Real aLowerLimitSecondRotation;
+  Standard_Real aLowerLimitSecondRotation = NAN;
   Standard_Boolean hasLowerLimitSecondRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,16) ) {
     theData->ReadReal (theNum, 16, "lower_limit_second_rotation", theArch, aLowerLimitSecondRotation);
@@ -140,7 +142,7 @@ void RWStepKinematics_RWUniversalPairWithRange::ReadStep (const Handle(StepData_
     aLowerLimitSecondRotation = 0;
   }
 
-  Standard_Real aUpperLimitSecondRotation;
+  Standard_Real aUpperLimitSecondRotation = NAN;
   Standard_Boolean hasUpperLimitSecondRotation = Standard_True;
   if ( theData->IsParamDefined (theNum,17) ) {
     theData->ReadReal (theNum, 17, "upper_limit_second_rotation", theArch, aUpperLimitSecondRotation);
index 449a1d4bdf35f29a94096788f10437d75de9a180..2b1d9b43b62fda4ed070ff8552339371c9cccd13 100644 (file)
@@ -53,7 +53,7 @@ void RWStepRepr_RWCharacterizedRepresentation::ReadStep
   // items
   Handle(StepRepr_HArray1OfRepresentationItem) anItems;
   Handle(StepRepr_RepresentationItem) anItem;
-  Standard_Integer nsub;
+  Standard_Integer nsub = 0;
   if (data->ReadSubList (num, 3, "items", ach, nsub)) {
     Standard_Integer nb = data->NbParams(nsub);
     anItems = new StepRepr_HArray1OfRepresentationItem (1, nb);
index 1c8b6e2787c336c9b520dfc8874d86c74e6360ce..eaef8b44737c402d37dd75a337c8b0c4d459e8bb 100644 (file)
@@ -43,7 +43,7 @@ void  RWStepRepr_RWCompoundRepresentationItem::ReadStep
 
   Handle(StepRepr_HArray1OfRepresentationItem) aItems;
   Handle(StepRepr_RepresentationItem) anent2;
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,2,"item_element",ach,nsub2)) {
     Standard_Integer nb2 = data->NbParams(nsub2);
     aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
@@ -78,6 +78,6 @@ void  RWStepRepr_RWCompoundRepresentationItem::Share
   (const Handle(StepRepr_CompoundRepresentationItem)& ent,
    Interface_EntityIterator& iter) const
 {
-  Standard_Integer i, nb = ent->NbItemElement();
+  Standard_Integer i = 0, nb = ent->NbItemElement();
   for (i = 1; i <= nb; i ++)  iter.AddItem (ent->ItemElementValue(i));
 }
index 48dbebb91146ba429a9f54f7217c2e61c22923df..b1ce8df36a64880f4acadd33ca2caf49cc052e56 100644 (file)
@@ -49,7 +49,7 @@ void RWStepRepr_RWConstructiveGeometryRepresentation::ReadStep
   // Inherited field : items
   Handle(StepRepr_HArray1OfRepresentationItem) aItems;
   Handle(StepRepr_RepresentationItem) anEnt;
-  Standard_Integer nsub;
+  Standard_Integer nsub = 0;
   if (data->ReadSubList (num, 2, "items", ach, nsub)) {
     Standard_Integer nb = data->NbParams(nsub);
     aItems = new StepRepr_HArray1OfRepresentationItem (1, nb);
index 0dd96f40eb4467a396049645a03165cfc0519e77..54df1e98576e18bae4e77ca36d38ba09f3cccfdd 100644 (file)
@@ -46,7 +46,7 @@ void RWStepRepr_RWDefinitionalRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index c871260a75aede225da158500ab93565637f8a24..135a9390cf32ce5f7de10393c77eaa31dba49f58 100644 (file)
@@ -50,7 +50,7 @@ void RWStepRepr_RWGlobalUncertaintyAssignedContext::ReadStep
 
        Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit) aUncertainty;
        Handle(StepBasic_UncertaintyMeasureWithUnit) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"uncertainty",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aUncertainty = new StepBasic_HArray1OfUncertaintyMeasureWithUnit (1, nb3);
index b1a71745df5cd67a0d89ac192bc06a4d3583b672..305357e299b64e697cc41da9bc335ed76e8e3418 100644 (file)
@@ -50,7 +50,7 @@ void RWStepRepr_RWGlobalUnitAssignedContext::ReadStep
 
        Handle(StepBasic_HArray1OfNamedUnit) aUnits;
        Handle(StepBasic_NamedUnit) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"units",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aUnits = new StepBasic_HArray1OfNamedUnit (1, nb3);
index 0b74ed08c9311710128603437447771faa50e42e..d90ad2b029b29f190e665799c7c8508ae950d2dd 100644 (file)
@@ -36,7 +36,7 @@ void RWStepRepr_RWIntegerRepresentationItem::ReadStep
   data->ReadString (num,1,"name",ach,aName);
 
   // --- own field : value ---
-  Standard_Integer aValue;
+  Standard_Integer aValue = 0;
   data->ReadInteger (num,2,"value",ach,aValue);
 
   //--- Initialisation of the read entity ---
index 785528b6155d172b7f192fc9c613032d6478ed13..764c863b3446dd238f36d80f451284372380e464 100644 (file)
@@ -68,7 +68,7 @@ void RWStepRepr_RWMakeFromUsageOption::ReadStep (const Handle(StepData_StepReade
 
   // Own fields of MakeFromUsageOption
 
-  Standard_Integer aRanking;
+  Standard_Integer aRanking = 0;
   data->ReadInteger (num, 6, "ranking", ach, aRanking);
 
   Handle(TCollection_HAsciiString) aRankingRationale;
index 2cf1e84e94ea36c1dddb01c067ec3cdb548b771c..0b5d1b5dbf3bfa83cd9095dc8f464c32de24bd56 100644 (file)
@@ -58,7 +58,7 @@ void RWStepRepr_RWReprItemAndLengthMeasureWithUnitAndQRI::ReadStep
   if (!data->CheckNbParams(num,1,ach,"qualified_representation_item")) return;
   // --- own field : qualifiers ---
   Handle(StepShape_HArray1OfValueQualifier) quals;
-  Standard_Integer nsub;
+  Standard_Integer nsub = 0;
   if (data->ReadSubList (num, 1, "qualifiers", ach, nsub)) {
     Standard_Integer nb = data->NbParams(nsub);
     quals = new StepShape_HArray1OfValueQualifier (1, nb);
@@ -101,7 +101,7 @@ void RWStepRepr_RWReprItemAndLengthMeasureWithUnitAndQRI::WriteStep
   SW.Send(ent->GetMeasureWithUnit()->UnitComponent().Value());
   SW.StartEntity ("QUALIFIED_REPRESENTATION_ITEM");
   Handle(StepShape_QualifiedRepresentationItem) aQRI = ent->GetQualifiedRepresentationItem();
-  Standard_Integer i, nbq = aQRI->NbQualifiers();
+  Standard_Integer i = 0, nbq = aQRI->NbQualifiers();
   SW.OpenSub();
   for (i = 1; i <= nbq; i ++) 
     SW.Send (aQRI->QualifiersValue(i).Value());
index 5e87c616d1dd2c5852bb2e7aebe20671df877306..f3cf182866a4ba15f3ba50f7affdad2185f86286 100644 (file)
@@ -58,7 +58,7 @@ void RWStepRepr_RWReprItemAndPlaneAngleMeasureWithUnitAndQRI::ReadStep
   if (!data->CheckNbParams(num,1,ach,"qualified_representation_item")) return;
   // --- own field : qualifiers ---
   Handle(StepShape_HArray1OfValueQualifier) quals;
-  Standard_Integer nsub;
+  Standard_Integer nsub = 0;
   if (data->ReadSubList (num, 1, "qualifiers", ach, nsub)) {
     Standard_Integer nb = data->NbParams(nsub);
     quals = new StepShape_HArray1OfValueQualifier (1, nb);
@@ -100,7 +100,7 @@ void RWStepRepr_RWReprItemAndPlaneAngleMeasureWithUnitAndQRI::WriteStep
   SW.StartEntity("PLANE_ANGLE_MEASURE_WITH_UNIT");
   SW.StartEntity ("QUALIFIED_REPRESENTATION_ITEM");
   Handle(StepShape_QualifiedRepresentationItem) aQRI = ent->GetQualifiedRepresentationItem();
-  Standard_Integer i, nbq = aQRI->NbQualifiers();
+  Standard_Integer i = 0, nbq = aQRI->NbQualifiers();
   SW.OpenSub();
   for (i = 1; i <= nbq; i ++) 
     SW.Send (aQRI->QualifiersValue(i).Value());
index 2b2ce59a80b3b35c3ad8fc7eb845bd87103437c2..48ff4714b477c3947b8bce2e0a5fd2a2c313c477 100644 (file)
@@ -45,7 +45,7 @@ void RWStepRepr_RWRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 969bc1b6400f9b9d7ba13c9d17a04d545bccd7f9..b473626485a607d8ee450995720048afc6fbbd09 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWAdvancedBrepShapeRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 0eac3d648aeab5e4d6560eed9b1c85a8f8ba7286..fd22287a9cd851ec03d4f5d491fb46ea1d1a37e9 100644 (file)
@@ -46,7 +46,7 @@ void RWStepShape_RWAdvancedFace::ReadStep
 
        Handle(StepShape_HArray1OfFaceBound) aBounds;
        Handle(StepShape_FaceBound) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"bounds",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
     if( nb2)
index a90397a362174cef3eb861366008286a77854bd0..49a058822d717938b038b8cdd17904b2cd4955ae 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWBlock.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,19 +49,19 @@ void RWStepShape_RWBlock::ReadStep
 
        // --- own field : x ---
 
-       Standard_Real aX;
+       Standard_Real aX = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"x",ach,aX);
 
        // --- own field : y ---
 
-       Standard_Real aY;
+       Standard_Real aY = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"y",ach,aY);
 
        // --- own field : z ---
 
-       Standard_Real aZ;
+       Standard_Real aZ = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
        data->ReadReal (num,5,"z",ach,aZ);
 
index 0e8d7aa521b5d26993be1b66bc4f6dacf0e9e93a..2ba1bcbda0bd00417ef7dcb875cb07d7be6453c7 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWBoxDomain.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -41,19 +43,19 @@ void RWStepShape_RWBoxDomain::ReadStep
 
        // --- own field : xlength ---
 
-       Standard_Real aXlength;
+       Standard_Real aXlength = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadReal (num,2,"xlength",ach,aXlength);
 
        // --- own field : ylength ---
 
-       Standard_Real aYlength;
+       Standard_Real aYlength = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"ylength",ach,aYlength);
 
        // --- own field : zlength ---
 
-       Standard_Real aZlength;
+       Standard_Real aZlength = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"zlength",ach,aZlength);
 
index e855d6b082b87404f3065788faeb36c82aa5632c..0e78b1beb0ea7e56c64945e1b3f78b623c789675 100644 (file)
@@ -48,7 +48,7 @@ void RWStepShape_RWBoxedHalfSpace::ReadStep
 
        // --- inherited field : agreementFlag ---
 
-       Standard_Boolean aAgreementFlag;
+       Standard_Boolean aAgreementFlag = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadBoolean (num,3,"agreement_flag",ach,aAgreementFlag);
 
index 2dc7fd0dcd2135c802bea5ee2f48a48dd7721791..0b7877aef4320ca3491a66f7d23e066e10c8b9b0 100644 (file)
@@ -54,7 +54,7 @@ void RWStepShape_RWBrepWithVoids::ReadStep
 
        Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
        Handle(StepShape_OrientedClosedShell) anent3;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"voids",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
          aVoids = new StepShape_HArray1OfOrientedClosedShell (1, nb3);
index 11311f6ffac631b9ef6867606b09eb3d8c6d9519..1fa976c1811a3c00db39030fef330abf2c5c0905 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWClosedShell::ReadStep
 
        Handle(StepShape_HArray1OfFace) aCfsFaces;
        Handle(StepShape_Face) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"cfs_faces",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aCfsFaces = new StepShape_HArray1OfFace (1, nb2);
index 142105f2af2226da15b77a4031ebfc6fe81f3f66..d1fa29fa5d88bb734cc07598661643189c7c885c 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWConnectedFaceSet::ReadStep
 
        Handle(StepShape_HArray1OfFace) aCfsFaces;
        Handle(StepShape_Face) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"cfs_faces",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aCfsFaces = new StepShape_HArray1OfFace (1, nb2);
index b3bd8a11cfadefa4ae10829c9817971a79cd184c..8d7373ed5bd6c7b9e4c5d9d2671147f0ff480eaa 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWCsgShapeRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 5a80f4be980c410f993f5f9b207844ee524738c1..10b2257c396dc8882ec03b463537a3dbc1c7b550 100644 (file)
@@ -50,7 +50,7 @@ void RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index d6c8f9fd047d817141c546fe77b5344adbe7eab0..4bb2aec7865546f2894dc7102dc4065d3aa5757a 100644 (file)
@@ -63,7 +63,7 @@ void RWStepShape_RWEdgeCurve::ReadStep
 
        // --- own field : sameSense ---
 
-       Standard_Boolean aSameSense;
+       Standard_Boolean aSameSense = 0;
        data->ReadBoolean (num,5,"same_sense",ach,aSameSense);
 
        //--- Initialisation of the read entity ---
@@ -131,7 +131,7 @@ void RWStepShape_RWEdgeCurve::Check
   Standard_Boolean theFBOri2 = Standard_True;
   //Standard_Boolean theFSOri1 = Standard_True;
   //Standard_Boolean theFSOri2 = Standard_True;
-  Standard_Boolean Cumulated1, Cumulated2;
+  Standard_Boolean Cumulated1 = 0, Cumulated2 = 0;
 
   // 1- First Vertex != LastVertex but First VertexPoint == Last VertexPoint
   // Remark : time consuming process but useful !
@@ -169,7 +169,7 @@ void RWStepShape_RWEdgeCurve::Check
   // 2- Two-Manifold Topology
 
   Standard_Boolean sharEC = aShto.IsShared(ent);
-  Standard_Integer nbRef;
+  Standard_Integer nbRef = 0;
   if(!sharEC){
     ach->AddFail("ERROR: EdgeCurve not referenced");
   }
index f6cc79a34fb743e9fe7b2ce9920b4baeb439f447..db038e63bce969b210be891f98a6237f1280e433 100644 (file)
@@ -46,7 +46,7 @@ void RWStepShape_RWEdgeLoop::ReadStep
   
   Handle(StepShape_HArray1OfOrientedEdge) aEdgeList;
   Handle(StepShape_OrientedEdge) anent;
-  Standard_Integer nsub1;
+  Standard_Integer nsub1 = 0;
   if (data->ReadSubList (num,2,"edge_list",ach,nsub1)) {
     Standard_Integer nb1 = data->NbParams(nsub1);
     aEdgeList = new StepShape_HArray1OfOrientedEdge (1, nb1);
index cfbd4d6b0b361dcf0545f043443816e962b4abc5..4880311847e9c614268eee727ac55e97a5b36544 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWExtrudedAreaSolid.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -54,7 +56,7 @@ void RWStepShape_RWExtrudedAreaSolid::ReadStep
 
        // --- own field : depth ---
 
-       Standard_Real aDepth;
+       Standard_Real aDepth = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"depth",ach,aDepth);
 
index 39a56f257b90b4b837686b15cdc60dfde0bc4cf3..fa8a449060197bf64163a04e34f79d9c7218b482 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWExtrudedFaceSolid.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -54,7 +56,7 @@ void RWStepShape_RWExtrudedFaceSolid::ReadStep
 
   // --- own field : depth ---
 
-  Standard_Real aDepth;
+  Standard_Real aDepth = NAN;
   //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
   data->ReadReal (num,4,"depth",ach,aDepth);
 
index b12537fa1adee75767f3aedc307c683c606d5db2..8eac0591c6a23c115e6a2c2aa2f4edfdaeca9143 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWFace::ReadStep
 
        Handle(StepShape_HArray1OfFaceBound) aBounds;
        Handle(StepShape_FaceBound) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"bounds",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aBounds = new StepShape_HArray1OfFaceBound (1, nb2);
index 4eb51377dc07cbb13ee8440135161b75c4724eee..5fb5b4bad967b46e9adaeb82f284e70b5d11ae49 100644 (file)
@@ -50,7 +50,7 @@ void RWStepShape_RWFaceBound::ReadStep
 
        // --- own field : orientation ---
 
-       Standard_Boolean aOrientation;
+       Standard_Boolean aOrientation = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadBoolean (num,3,"orientation",ach,aOrientation);
 
index e7fbb2f1a5237f2d46a6fb21d809e5998280f3d7..3247462af1ce467903d6245f7f9edb83fb27aa36 100644 (file)
@@ -47,7 +47,7 @@ void RWStepShape_RWFaceOuterBound::ReadStep
 
        // --- inherited field : orientation ---
 
-       Standard_Boolean aOrientation;
+       Standard_Boolean aOrientation = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadBoolean (num,3,"orientation",ach,aOrientation);
 
index 7fc0e162d819f72d4c3a72f13ff833bdab85265c..a9d3f2a6de5b069a87b7f5d1eae8a9c5c32bcb21 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWFaceSurface::ReadStep
 
        Handle(StepShape_HArray1OfFaceBound) aBounds;
        Handle(StepShape_FaceBound) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"bounds",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aBounds = new StepShape_HArray1OfFaceBound (1, nb2);
@@ -64,7 +64,7 @@ void RWStepShape_RWFaceSurface::ReadStep
 
        // --- own field : sameSense ---
 
-       Standard_Boolean aSameSense;
+       Standard_Boolean aSameSense = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadBoolean (num,4,"same_sense",ach,aSameSense);
 
index 7afda07613879c04c09f857452e5aafc36b67f7b..5879528a6986e3c5ca93db3608c42ae99f5290c8 100644 (file)
@@ -43,7 +43,7 @@ void RWStepShape_RWFacetedBrepAndBrepWithVoids::ReadStep
 
        Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
        Handle(StepShape_OrientedClosedShell) anent;
-       Standard_Integer nsub1;
+       Standard_Integer nsub1 = 0;
        if (data->ReadSubList (num,1,"voids",ach,nsub1)) {
          Standard_Integer nb1 = data->NbParams(nsub1);
          aVoids = new StepShape_HArray1OfOrientedClosedShell (1, nb1);
index a3c2e5a92fd439c38353d3c23bdb595069188dd8..c1713cb917bb5b71e96a054ef736643a697f2e93 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWFacetedBrepShapeRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index e40678958671f53553fa2c8b15635d92a35c5530..6bf25f19a33ff7baaf143ba9ae3eefa44ee11b6b 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWGeometricCurveSet::ReadStep
 
        Handle(StepShape_HArray1OfGeometricSetSelect) aElements;
        StepShape_GeometricSetSelect aElementsItem;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"elements",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aElements = new StepShape_HArray1OfGeometricSetSelect (1, nb2);
index 2bca9aa09f8c28d387d9f68d51e5326b02ab95f2..d38377e7eb44065bb3b7cbb30feba1c947060263 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWGeometricSet::ReadStep
 
        Handle(StepShape_HArray1OfGeometricSetSelect) aElements;
        StepShape_GeometricSetSelect aElementsItem;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"elements",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aElements = new StepShape_HArray1OfGeometricSetSelect (1, nb2);
index b713e844cf58a11925b61654ad9a34bd2db4cf7e..24f188b91224e96f218a6bb2fe27867dd233bd9d 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index f1f0193755e049e6670cd6bd7d145e56f77b3c33..be1557f28c63b6486deeed16fc380af4f048292c 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index d272a98bd84d181d7003a50c816ba71def901379..61c30b542a26bfe3e9900b3c422136a8e7389f35 100644 (file)
@@ -47,7 +47,7 @@ void RWStepShape_RWHalfSpaceSolid::ReadStep
 
        // --- own field : agreementFlag ---
 
-       Standard_Boolean aAgreementFlag;
+       Standard_Boolean aAgreementFlag = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadBoolean (num,3,"agreement_flag",ach,aAgreementFlag);
 
index f7d36fdef8ba085eee60bd4e3229a7258ba9498a..24008d3bcb07a1730a9257c7872a38ce62b19f18 100644 (file)
@@ -46,7 +46,7 @@ void RWStepShape_RWLoopAndPath::ReadStep
 
        Handle(StepShape_HArray1OfOrientedEdge) aEdgeList;
        Handle(StepShape_OrientedEdge) anent1;
-       Standard_Integer nsub1;
+       Standard_Integer nsub1 = 0;
        if (data->ReadSubList (num,1,"edge_list",ach,nsub1)) {
          Standard_Integer nb1 = data->NbParams(nsub1);
          aEdgeList = new StepShape_HArray1OfOrientedEdge (1, nb1);
index 0d6dda1bad9c7c633f3af5b7254db44366922a46..ab89686000b3310570df636986614c3e4202f086 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWManifoldSurfaceShapeRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 63555f227569f903cb4483fd1f429b7e0448600a..f31596ba9eaaf421bb911cca22602b4c2fc808fc 100644 (file)
@@ -55,7 +55,7 @@ void RWStepShape_RWMeasureQualification::ReadStep
        // --- own field : qualifiers ---
 
        Handle(StepShape_HArray1OfValueQualifier) quals;
-       Standard_Integer nsub4;
+       Standard_Integer nsub4 = 0;
        if (data->ReadSubList (num,4,"qualifiers",ach,nsub4)) {
          Standard_Integer nb4 = data->NbParams(nsub4);
          quals = new StepShape_HArray1OfValueQualifier (1,nb4);
@@ -79,7 +79,7 @@ void RWStepShape_RWMeasureQualification::WriteStep
   SW.Send(ent->Name());
   SW.Send(ent->Description());
   SW.Send(ent->QualifiedMeasure());
-  Standard_Integer i, nbq = ent->NbQualifiers();
+  Standard_Integer i = 0, nbq = ent->NbQualifiers();
   SW.OpenSub();
   for (i = 1; i <= nbq; i ++) SW.Send (ent->QualifiersValue(i).Value());
   SW.CloseSub();
@@ -88,7 +88,7 @@ void RWStepShape_RWMeasureQualification::WriteStep
 
 void RWStepShape_RWMeasureQualification::Share(const Handle(StepShape_MeasureQualification)& ent, Interface_EntityIterator& iter) const
 {
-  Standard_Integer i, nbq = ent->NbQualifiers();
+  Standard_Integer i = 0, nbq = ent->NbQualifiers();
   for (i = 1; i <= nbq; i ++) iter.AddItem (ent->QualifiersValue(i).Value());
 }
 
index e5365ede657fa63bc992ed7a346f77985c01683c..e786b274491b497b356b3f4e9c3dfe70b00af7bc 100644 (file)
@@ -63,7 +63,7 @@ void RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem::Read
   // --- own field : qualifiers ---
 
   Handle(StepShape_HArray1OfValueQualifier) quals;
-  Standard_Integer nsub1;
+  Standard_Integer nsub1 = 0;
   if (data->ReadSubList (num,1,"qualifiers",ach,nsub1)) {
     Standard_Integer nb1 = data->NbParams(nsub1);
     quals = new StepShape_HArray1OfValueQualifier (1,nb1);
@@ -113,7 +113,7 @@ void RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem::Writ
   SW.StartEntity ("QUALIFIED_REPRESENTATION_ITEM");
 
   // --- own field : qualifiers ---
-  Standard_Integer i, nbq = ent->NbQualifiers();
+  Standard_Integer i = 0, nbq = ent->NbQualifiers();
   SW.OpenSub();
   for (i = 1; i <= nbq; i ++) SW.Send (ent->QualifiersValue(i).Value());
   SW.CloseSub();
@@ -132,7 +132,7 @@ void RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem::Shar
 {
   iter.AddItem(ent->Measure()->UnitComponent().Value());
 
-  Standard_Integer i, nbq = ent->NbQualifiers();
+  Standard_Integer i = 0, nbq = ent->NbQualifiers();
   for (i = 1; i <= nbq; i ++) iter.AddItem (ent->QualifiersValue(i).Value());
 }
 
index 0b68bc6106959fa13592643d707f4296d17b3196..87f09a2ca695c54265faa25d37932d5ee7635d9c 100644 (file)
@@ -43,7 +43,7 @@ void RWStepShape_RWOpenShell::ReadStep
 
        Handle(StepShape_HArray1OfFace) aCfsFaces;
        Handle(StepShape_Face) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"cfs_faces",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aCfsFaces = new StepShape_HArray1OfFace (1, nb2);
index 029d9a07c73e59ebb079281cfc621ed4a3a546cf..a9bd2a3740a7a1cdbd5f1a6cb7df1768d39193bb 100644 (file)
@@ -51,7 +51,7 @@ void RWStepShape_RWOrientedClosedShell::ReadStep
 
        // --- own field : orientation ---
 
-       Standard_Boolean aOrientation;
+       Standard_Boolean aOrientation = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadBoolean (num,4,"orientation",ach,aOrientation);
 
index c3624fad1778b22641096d26b6b0001edeef3607..14cacbc6c03201158e17cdb6b3ce8b7d6bc217b3 100644 (file)
@@ -57,7 +57,7 @@ void RWStepShape_RWOrientedEdge::ReadStep
 
        // --- own field : orientation ---
 
-       Standard_Boolean aOrientation;
+       Standard_Boolean aOrientation = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
        data->ReadBoolean (num,5,"orientation",ach,aOrientation);
 
index d601b084db932daa5d9431187a618e3612b5337e..a3b0eb73c0835d1bfe84ef4f5b37c2085082d6ad 100644 (file)
@@ -51,7 +51,7 @@ void RWStepShape_RWOrientedFace::ReadStep
 
        // --- own field : orientation ---
 
-       Standard_Boolean aOrientation;
+       Standard_Boolean aOrientation = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadBoolean (num,4,"orientation",ach,aOrientation);
 
index c4d41e3529b4fe020998afb064ef2a5048509887..604fd1c7a2e1ee1fa6a7f05876c3d6701417a50b 100644 (file)
@@ -51,7 +51,7 @@ void RWStepShape_RWOrientedOpenShell::ReadStep
 
        // --- own field : orientation ---
 
-       Standard_Boolean aOrientation;
+       Standard_Boolean aOrientation = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadBoolean (num,4,"orientation",ach,aOrientation);
 
index 0096f4aab0296474de0dcdb1d01e51d3a9ff39b7..f5e69a35a70b3c02d6aa9a19e6c4be4067c769fd 100644 (file)
@@ -52,7 +52,7 @@ void RWStepShape_RWOrientedPath::ReadStep
   
   // --- own field : orientation ---
   
-  Standard_Boolean aOrientation;
+  Standard_Boolean aOrientation = 0;
   //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
   data->ReadBoolean (num,4,"orientation",ach,aOrientation);
   
index c824f3a78b1978e3bf44b6105640b40d1e548415..51abaf644cc99f1e69260f88a3b58bc78cee17e1 100644 (file)
@@ -44,7 +44,7 @@ void RWStepShape_RWPath::ReadStep
 
        Handle(StepShape_HArray1OfOrientedEdge) aEdgeList;
        Handle(StepShape_OrientedEdge) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"edge_list",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aEdgeList = new StepShape_HArray1OfOrientedEdge (1, nb2);
index b04199ff28523c41cdab072ab4b4c45dd2f435c0..0e81d1ffa3b4abd6cac53cc3103975347fa783f2 100644 (file)
@@ -43,7 +43,7 @@ void RWStepShape_RWPolyLoop::ReadStep
 
        Handle(StepGeom_HArray1OfCartesianPoint) aPolygon;
        Handle(StepGeom_CartesianPoint) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"polygon",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aPolygon = new StepGeom_HArray1OfCartesianPoint (1, nb2);
index 88f821bd720a47b9f4b43a8e37ba9861d1a251e6..717e1c6f9dc7aea16da259394ccb3511552f7dfe 100644 (file)
@@ -31,7 +31,7 @@ void RWStepShape_RWPrecisionQualifier::ReadStep
 
        // --- own field : precision_value ---
 
-       Standard_Integer PV;
+       Standard_Integer PV = 0;
        data->ReadInteger (num,1,"precision_value",ach,PV);
 
        //--- Initialisation of the read entity ---
index c7ceec34a0ba8d557d14e99075912f0666440652..4201eccc6c59eec0d948b119bafb3c6b2fb98405 100644 (file)
@@ -43,7 +43,7 @@ void RWStepShape_RWQualifiedRepresentationItem::ReadStep
        // --- own field : qualifiers ---
 
        Handle(StepShape_HArray1OfValueQualifier) quals;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"qualifiers",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          quals = new StepShape_HArray1OfValueQualifier (1,nb2);
@@ -69,7 +69,7 @@ void RWStepShape_RWQualifiedRepresentationItem::WriteStep
   SW.Send(ent->Name());
 
   // --- own field : qualifiers ---
-  Standard_Integer i, nbq = ent->NbQualifiers();
+  Standard_Integer i = 0, nbq = ent->NbQualifiers();
   SW.OpenSub();
   for (i = 1; i <= nbq; i ++) SW.Send (ent->QualifiersValue(i).Value());
   SW.CloseSub();
@@ -78,7 +78,7 @@ void RWStepShape_RWQualifiedRepresentationItem::WriteStep
 
 void RWStepShape_RWQualifiedRepresentationItem::Share(const Handle(StepShape_QualifiedRepresentationItem)& ent, Interface_EntityIterator& iter) const
 {
-  Standard_Integer i, nbq = ent->NbQualifiers();
+  Standard_Integer i = 0, nbq = ent->NbQualifiers();
   for (i = 1; i <= nbq; i ++) iter.AddItem (ent->QualifiersValue(i).Value());
 }
 
index 81bd0f95f28f26c02c24dbb43936bdbe7bef9c4f..0ebad081be801ae58d6269a9b17d45b1ef6d4c66 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWRevolvedAreaSolid.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -54,7 +56,7 @@ void RWStepShape_RWRevolvedAreaSolid::ReadStep
 
        // --- own field : angle ---
 
-       Standard_Real aAngle;
+       Standard_Real aAngle = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"angle",ach,aAngle);
 
index 9cbde9edb6dd498377f33eee564708b52a0077e1..c76ca296480ba165278620b7932d2d67f1ed1a98 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWRevolvedFaceSolid.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -54,7 +56,7 @@ void RWStepShape_RWRevolvedFaceSolid::ReadStep
   
   // --- own field : angle ---
 
-  Standard_Real aAngle;
+  Standard_Real aAngle = NAN;
   //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
   data->ReadReal (num,4,"angle",ach,aAngle);
 
index 1547e3f209f2d982bd6a2924791177fe3fbc1424..69b5a3042e9cfe8a53ecabeba2f531a09ca55669 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWRightAngularWedge.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,25 +49,25 @@ void RWStepShape_RWRightAngularWedge::ReadStep
 
        // --- own field : x ---
 
-       Standard_Real aX;
+       Standard_Real aX = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"x",ach,aX);
 
        // --- own field : y ---
 
-       Standard_Real aY;
+       Standard_Real aY = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"y",ach,aY);
 
        // --- own field : z ---
 
-       Standard_Real aZ;
+       Standard_Real aZ = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
        data->ReadReal (num,5,"z",ach,aZ);
 
        // --- own field : ltx ---
 
-       Standard_Real aLtx;
+       Standard_Real aLtx = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
        data->ReadReal (num,6,"ltx",ach,aLtx);
 
index bbfb9d79b9bc8093b8027a25108ebcf3eed467c9..b99aa24f60c3f05963953db188c1c26df71d0bc4 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWRightCircularCone.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,19 +49,19 @@ void RWStepShape_RWRightCircularCone::ReadStep
 
        // --- own field : height ---
 
-       Standard_Real aHeight;
+       Standard_Real aHeight = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"height",ach,aHeight);
 
        // --- own field : radius ---
 
-       Standard_Real aRadius;
+       Standard_Real aRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"radius",ach,aRadius);
 
        // --- own field : semiAngle ---
 
-       Standard_Real aSemiAngle;
+       Standard_Real aSemiAngle = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
        data->ReadReal (num,5,"semi_angle",ach,aSemiAngle);
 
index 12e315ad00a5e78954c02348af6f5099ea071af1..0473a4b8cef597a4be67ddce6755d3204126c08b 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWRightCircularCylinder.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,13 +49,13 @@ void RWStepShape_RWRightCircularCylinder::ReadStep
 
        // --- own field : height ---
 
-       Standard_Real aHeight;
+       Standard_Real aHeight = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"height",ach,aHeight);
 
        // --- own field : radius ---
 
-       Standard_Real aRadius;
+       Standard_Real aRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"radius",ach,aRadius);
 
index 086dbc1c6d00ff96dac8a822abe414fd5067de2b..1a8a619ce4bf3e328725c33638687253419ad7f0 100644 (file)
@@ -62,7 +62,7 @@ void RWStepShape_RWSeamEdge::ReadStep (const Handle(StepData_StepReaderData)& da
   Handle(StepShape_Edge) aOrientedEdge_EdgeElement;
   data->ReadEntity (num, 4, "oriented_edge.edge_element", ach, STANDARD_TYPE(StepShape_Edge), aOrientedEdge_EdgeElement);
 
-  Standard_Boolean aOrientedEdge_Orientation;
+  Standard_Boolean aOrientedEdge_Orientation = 0;
   data->ReadBoolean (num, 5, "oriented_edge.orientation", ach, aOrientedEdge_Orientation);
 
   // Own fields of SeamEdge
index 496402c7842cba6106e96f585668ec43ec51d966..4225fbdd7f3ebb5ba50629ae00079cbbca9e52f4 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWShapeRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 2857e203a598567cb663822c5ee0046f2056e261..7840c3e50820bd9a60189d2ede7312a5a1869a02 100644 (file)
@@ -44,7 +44,7 @@ void RWStepShape_RWShellBasedSurfaceModel::ReadStep
 
        Handle(StepShape_HArray1OfShell) aSbsmBoundary;
        StepShape_Shell aSbsmBoundaryItem;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"sbsm_boundary",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aSbsmBoundary = new StepShape_HArray1OfShell (1, nb2);
index a2b6ea9646cedad1122ebc6cbd70e5ff4284a968..0ab9371abafc84f285c8b9eabb7ba5637da80f11 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWSphere.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -41,7 +43,7 @@ void RWStepShape_RWSphere::ReadStep
 
        // --- own field : radius ---
 
-       Standard_Real aRadius;
+       Standard_Real aRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadReal (num,2,"radius",ach,aRadius);
 
index 70192469d3941a84c1298a66dd6af010045863ce..7dcba59f576ba1f8ef203ef6d9db78be5c131585 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepShape_RWTorus.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -47,13 +49,13 @@ void RWStepShape_RWTorus::ReadStep
 
        // --- own field : majorRadius ---
 
-       Standard_Real aMajorRadius;
+       Standard_Real aMajorRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"major_radius",ach,aMajorRadius);
 
        // --- own field : minorRadius ---
 
-       Standard_Real aMinorRadius;
+       Standard_Real aMinorRadius = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"minor_radius",ach,aMinorRadius);
 
index 5467d28bfdbaa232bbf44fd8659e7f1b457c5377..2cc6f935e3bfbbe36c9f936e448afba841ffdd2a 100644 (file)
@@ -45,7 +45,7 @@ void RWStepShape_RWTransitionalShapeRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index b61aa4bcce4c76e9295e220af3bca05b8e9063be..991f98cc7b374285024049ff8967c1335a86e44b 100644 (file)
@@ -47,7 +47,7 @@ void RWStepVisual_RWAnnotationCurveOccurrence::ReadStep
   // Inherited field : styles
   Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
   Handle(StepVisual_PresentationStyleAssignment) anent2;
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,2,"styles",ach,nsub2)) {
     Standard_Integer nb2 = data->NbParams(nsub2);
     aStyles = new StepVisual_HArray1OfPresentationStyleAssignment (1, nb2);
index 4babfa7e98713d2427a0aba7723c47353d5fbdd9..ea3814e26e0a65f70db5edb841b0a47a2231fe4e 100644 (file)
@@ -47,7 +47,7 @@ const Handle(StepVisual_AnnotationCurveOccurrenceAndGeomReprItem)& ent) const
   // Inherited field : styles
   Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
   Handle(StepVisual_PresentationStyleAssignment) anEnt;
-  Standard_Integer nsub;
+  Standard_Integer nsub = 0;
   if (data->ReadSubList(num, 1, "styles", ach, nsub)) {
     Standard_Integer nb = data->NbParams(nsub);
     aStyles = new StepVisual_HArray1OfPresentationStyleAssignment(1, nb);
index fb85f8cf5a26a21b8eaefcd802f8a09c9ad0815f..a9f3bdd4df89ad3311f6cc986e4c6d7f3d8390bd 100644 (file)
@@ -51,7 +51,7 @@ const Handle(StepVisual_AnnotationFillArea)& ent) const
   // Own field : boundaries
   Handle(StepShape_HArray1OfGeometricSetSelect) aElements;
   StepShape_GeometricSetSelect aElementsItem;
-  Standard_Integer nsub;
+  Standard_Integer nsub = 0;
   if (data->ReadSubList(num, 2, "boundaries", ach, nsub)) {
     Standard_Integer nb = data->NbParams(nsub);
     aElements = new StepShape_HArray1OfGeometricSetSelect(1, nb);
index ea27e61076edbe0ea3776d81d6e816e2712d97bb..7a06d52a71f1e24beb4061124b2a2c562c84e016 100644 (file)
@@ -48,7 +48,7 @@ const Handle(StepVisual_AnnotationFillAreaOccurrence)& ent) const
   // Inherited field : styles
   Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
   Handle(StepVisual_PresentationStyleAssignment) anent;
-  Standard_Integer nsub;
+  Standard_Integer nsub = 0;
   if (data->ReadSubList(num, 2, "styles", ach, nsub)) {
     Standard_Integer nb = data->NbParams(nsub);
     aStyles = new StepVisual_HArray1OfPresentationStyleAssignment(1, nb);
index 43836de8b39e1ffc4c5c0f63e51605034ae1798e..d21144396b0e54309888617464a47d74e272d468 100644 (file)
@@ -47,7 +47,7 @@ void RWStepVisual_RWAnnotationOccurrence::ReadStep
   // Inherited field : styles
   Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
   Handle(StepVisual_PresentationStyleAssignment) anent2;
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,2,"styles",ach,nsub2)) {
     Standard_Integer nb2 = data->NbParams(nsub2);
     aStyles = new StepVisual_HArray1OfPresentationStyleAssignment (1, nb2);
index f1556bbf83aa563cda2a6a507a5d6033166e3d04..d44f40243774a8d8e61f28c12f10c91a2de5bc09 100644 (file)
@@ -47,7 +47,7 @@ void RWStepVisual_RWAnnotationPlane::ReadStep
   // Inherited field : styles
   Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
   Handle(StepVisual_PresentationStyleAssignment) anent2;
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,2,"styles",ach,nsub2)) {
     Standard_Integer nb2 = data->NbParams(nsub2);
     aStyles = new StepVisual_HArray1OfPresentationStyleAssignment (1, nb2);
@@ -65,7 +65,7 @@ void RWStepVisual_RWAnnotationPlane::ReadStep
   // Own field: elements
   Handle(StepVisual_HArray1OfAnnotationPlaneElement) anElements;
   StepVisual_AnnotationPlaneElement anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList (num, 4, "elements", ach, nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     anElements = new StepVisual_HArray1OfAnnotationPlaneElement (1, nbElements);
@@ -123,7 +123,7 @@ void RWStepVisual_RWAnnotationPlane::Share(const Handle(StepVisual_AnnotationPla
   iter.GetOneItem(ent->Item());
     
   // Own field: contents
-  Standard_Integer i, nb = ent->NbElements();
+  Standard_Integer i = 0, nb = ent->NbElements();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->ElementsValue(i).Value());
 }
index a60a16efd9e85c2bddd86f6a1f4f227414afbecf..3b8bf9fad19c2ced139cb6e87d0d24d8541a1a85 100644 (file)
@@ -47,7 +47,7 @@ void RWStepVisual_RWCameraModelD2::ReadStep
 
        // --- own field : viewWindowClipping ---
 
-       Standard_Boolean aViewWindowClipping;
+       Standard_Boolean aViewWindowClipping = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadBoolean (num,3,"view_window_clipping",ach,aViewWindowClipping);
 
index 697936572a4800b84c4a906b46ec1544a4bbea1d..c7da50571479d1e3712bcb84802bf95d1ce32105 100644 (file)
@@ -59,7 +59,7 @@ void RWStepVisual_RWCameraModelD3MultiClipping::ReadStep
   // Own field : shape_clipping
   Handle(StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect) aShapeClipping;
   StepVisual_CameraModelD3MultiClippingInterectionSelect anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList(num, 4, "shape_clipping", ach, nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     aShapeClipping = new StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect(1, nbElements);
@@ -111,7 +111,7 @@ void RWStepVisual_RWCameraModelD3MultiClipping::Share
   // Inherited field : perspective_of_volume
   iter.GetOneItem(ent->PerspectiveOfVolume());
   // Own field: shape_clipping
-  Standard_Integer i, nb = ent->ShapeClipping()->Length();
+  Standard_Integer i = 0, nb = ent->ShapeClipping()->Length();
   for (i = 1; i <= nb; i++)
     iter.AddItem(ent->ShapeClipping()->Value(i).Value());
 }
index 75cb3fe307a43810539b6126bde3a5d6c32b2e29..f5241abffcc86b8ce2698e27ffd9dbf6904037c7 100644 (file)
@@ -49,7 +49,7 @@ void RWStepVisual_RWCameraModelD3MultiClippingIntersection::ReadStep
   // Own field : shape_clipping
   Handle(StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect) aShapeClipping;
   StepVisual_CameraModelD3MultiClippingInterectionSelect anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList(num, 2, "shape_clipping", ach, nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     aShapeClipping = new StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect(1, nbElements);
@@ -91,7 +91,7 @@ void RWStepVisual_RWCameraModelD3MultiClippingIntersection::Share
    Interface_EntityIterator& iter) const
 {
   // Own field: shape_clipping
-  Standard_Integer i, nb = ent->ShapeClipping()->Length();
+  Standard_Integer i = 0, nb = ent->ShapeClipping()->Length();
   for (i = 1; i <= nb; i++)
     iter.AddItem(ent->ShapeClipping()->Value(i).Value());
 }
index c6e41e2eab147f0a83ec572a3c9d9a6b8607105a..c76a1f40e907c1ab907b7bd4ea1a197797553bd6 100644 (file)
@@ -49,7 +49,7 @@ void RWStepVisual_RWCameraModelD3MultiClippingUnion::ReadStep
   // Own field : shape_clipping
   Handle(StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect) aShapeClipping;
   StepVisual_CameraModelD3MultiClippingUnionSelect anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList(num, 2, "shape_clipping", ach, nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     aShapeClipping = new StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect(1, nbElements);
@@ -91,7 +91,7 @@ void RWStepVisual_RWCameraModelD3MultiClippingUnion::Share
    Interface_EntityIterator& iter) const
 {
   // Own field: shape_clipping
-  Standard_Integer i, nb = ent->ShapeClipping()->Length();
+  Standard_Integer i = 0, nb = ent->ShapeClipping()->Length();
   for (i = 1; i <= nb; i++)
     iter.AddItem(ent->ShapeClipping()->Value(i).Value());
 }
index c0b99640bed263af7e04860f5972b6e9d003c51c..6c92f365a0a02e0749b8b95da0ddb5c476acc667 100644 (file)
@@ -53,7 +53,7 @@ void RWStepVisual_RWCharacterizedObjAndRepresentationAndDraughtingModel::ReadSte
   // items
   Handle(StepRepr_HArray1OfRepresentationItem) anItems;
   Handle(StepRepr_RepresentationItem) anItem;
-  Standard_Integer nsub;
+  Standard_Integer nsub = 0;
   if (data->ReadSubList(num, 2, "items", ach, nsub)) {
     Standard_Integer nb = data->NbParams(nsub);
     anItems = new StepRepr_HArray1OfRepresentationItem(1, nb);
index 3e29593f93af19c41313ccb7d1b1893f8e6ab4d0..c2b9f462ab83fe305864afcc3b30d83d04a35c23 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <RWStepVisual_RWColourRgb.hxx>
 #include <StepData_StepReaderData.hxx>
 #include <StepData_StepWriter.hxx>
@@ -39,19 +41,19 @@ void RWStepVisual_RWColourRgb::ReadStep
 
        // --- own field : red ---
 
-       Standard_Real aRed;
+       Standard_Real aRed = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadReal (num,2,"red",ach,aRed);
 
        // --- own field : green ---
 
-       Standard_Real aGreen;
+       Standard_Real aGreen = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"green",ach,aGreen);
 
        // --- own field : blue ---
 
-       Standard_Real aBlue;
+       Standard_Real aBlue = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"blue",ach,aBlue);
 
index 266d02d91a54d0e7f42b965ed98170c2e3297a88..edefa36774d09758194037e80aea67bec1076a88 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepVisual_RWComplexTriangulatedFace.hxx>
 #include <StepVisual_ComplexTriangulatedFace.hxx>
 #include <Interface_EntityIterator.hxx>
@@ -64,7 +66,7 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste
   theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck,
     STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates);
 
-  Standard_Integer aTessellatedFace_Pnmax;
+  Standard_Integer aTessellatedFace_Pnmax = 0;
   theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax);
 
   Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals;
@@ -81,7 +83,7 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste
         Standard_Integer num4 = subj4;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Real anIt0;
+          Standard_Real anIt0 = NAN;
           theData->ReadReal(num4, j0, "real", theCheck, anIt0);
           aTessellatedFace_Normals->SetValue(i0,j0, anIt0);
         }
@@ -112,7 +114,7 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste
     Standard_Integer num2 = sub6;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Integer anIt0;
+      Standard_Integer anIt0 = 0;
       theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
       aPnindex->SetValue(i0, anIt0);
     }
@@ -132,7 +134,7 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste
         Standard_Integer num4 = subj7;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Integer anIt0;
+          Standard_Integer anIt0 = 0;
           theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
           aTriangleStrips->SetValue(i0,j0, anIt0);
         }
@@ -154,7 +156,7 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste
         Standard_Integer num4 = subj8;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Integer anIt0;
+          Standard_Integer anIt0 = 0;
           theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
           aTriangleFans->SetValue(i0,j0, anIt0);
         }
index e8a80734b9988e2250128a695e7a59a58fc1c8d9..d4f601cc52987d95bff59e7d1d5cbadb5021cbce 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx>
 #include <StepVisual_ComplexTriangulatedSurfaceSet.hxx>
 #include <Interface_EntityIterator.hxx>
@@ -64,7 +66,7 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep(
   theData->ReadEntity(theNum, 2, "tessellated_surface_set.coordinates", theCheck,
     STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedSurfaceSet_Coordinates);
 
-  Standard_Integer aTessellatedSurfaceSet_Pnmax;
+  Standard_Integer aTessellatedSurfaceSet_Pnmax = 0;
   theData->ReadInteger(theNum, 3, "tessellated_surface_set.pnmax", theCheck, aTessellatedSurfaceSet_Pnmax);
 
   Handle(TColStd_HArray2OfReal) aTessellatedSurfaceSet_Normals;
@@ -81,7 +83,7 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep(
         Standard_Integer num4 = subj4;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Real anIt0;
+          Standard_Real anIt0 = NAN;
           theData->ReadReal(num4, j0, "real", theCheck, anIt0);
           aTessellatedSurfaceSet_Normals->SetValue(i0,j0, anIt0);
         }
@@ -100,7 +102,7 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep(
     Standard_Integer num2 = sub5;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Integer anIt0;
+      Standard_Integer anIt0 = 0;
       theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
       aPnindex->SetValue(i0, anIt0);
     }
@@ -120,7 +122,7 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep(
         Standard_Integer num4 = subj6;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Integer anIt0;
+          Standard_Integer anIt0 = 0;
           theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
           aTriangleStrips->SetValue(i0,j0, anIt0);
         }
@@ -142,7 +144,7 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep(
         Standard_Integer num4 = subj7;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Integer anIt0;
+          Standard_Integer anIt0 = 0;
           theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
           aTriangleFans->SetValue(i0,j0, anIt0);
         }
index 7991ebd7fef46fed67d32d68aaad01a0efcdc4ec..9cf0b39fb78cffa18ba8b3ea0c9fdd5fde9d6f28 100644 (file)
@@ -45,7 +45,7 @@ void RWStepVisual_RWCompositeText::ReadStep
 
        Handle(StepVisual_HArray1OfTextOrCharacter) aCollectedText;
        StepVisual_TextOrCharacter aCollectedTextItem;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        nsub2 = data->SubListNumber(num, 2, Standard_False);
        if (nsub2 !=0) {
          Standard_Integer nb2 = data->NbParams(nsub2);
index d2711983dcdd5e7744faa4b1286e261c270c6ea8..4cb592d77cfcd25dbc52751c0705180e3f8fa633 100644 (file)
@@ -46,7 +46,7 @@ void RWStepVisual_RWCompositeTextWithExtent::ReadStep
 
        Handle(StepVisual_HArray1OfTextOrCharacter) aCollectedText;
        StepVisual_TextOrCharacter aCollectedTextItem;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        nsub2 = data->SubListNumber(num, 2, Standard_False);
        if (nsub2 !=0) {
          Standard_Integer nb2 = data->NbParams(nsub2);
index 1cfed084d1df1e17269d38f7c77feaad0b6f9786..d3fff8747bab452a86a314e6b11f6ddc9fa891db 100644 (file)
@@ -40,7 +40,7 @@ void RWStepVisual_RWContextDependentInvisibility::ReadStep
 
        Handle(StepVisual_HArray1OfInvisibleItem) aInvisibleItems;
        StepVisual_InvisibleItem aInvisibleItemsItem;
-       Standard_Integer nsub1;
+       Standard_Integer nsub1 = 0;
        if (data->ReadSubList (num,1,"invisible_items",ach,nsub1)) {
          Standard_Integer nb1 = data->NbParams(nsub1);
          aInvisibleItems = new StepVisual_HArray1OfInvisibleItem (1, nb1);
index 92dd7c1455bd386a8b260aa2b970ff272bece48e..4633fe042bec1aec1651209e96379c5152a30331 100644 (file)
@@ -48,7 +48,7 @@ void RWStepVisual_RWContextDependentOverRidingStyledItem::ReadStep
 
        Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
        Handle(StepVisual_PresentationStyleAssignment) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"styles",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aStyles = new StepVisual_HArray1OfPresentationStyleAssignment (1, nb2);
@@ -75,7 +75,7 @@ void RWStepVisual_RWContextDependentOverRidingStyledItem::ReadStep
 
        Handle(StepVisual_HArray1OfStyleContextSelect) aStyleContext;
        StepVisual_StyleContextSelect aStyleContextItem;
-       Standard_Integer nsub5;
+       Standard_Integer nsub5 = 0;
        if (data->ReadSubList (num,5,"style_context",ach,nsub5)) {
          Standard_Integer nb5 = data->NbParams(nsub5);
          aStyleContext = new StepVisual_HArray1OfStyleContextSelect (1, nb5);
index 206101e4ee47873e7f61baa7b73fb193a5ae5e6c..53c6c23a3ca6e38bdc31dbc54ca541e6f5239335 100644 (file)
@@ -49,7 +49,7 @@ void RWStepVisual_RWCoordinatesList::ReadStep
   data->ReadInteger(num, 2, "number_points", ach,nbP);
   
   Handle(TColgp_HArray1OfXYZ) aPoints;// = new TColgp_HArray1OfXYZ(1, nbP);
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,3,"items",ach,nsub2)) 
   {
     Standard_Integer nb2 = data->NbParams(nsub2);
@@ -59,7 +59,7 @@ void RWStepVisual_RWCoordinatesList::ReadStep
     for (Standard_Integer i = 1; i <= nb2; i++) 
     {
       gp_XYZ aXYZ(0.,0.,0.);
-      Standard_Integer nsub3;
+      Standard_Integer nsub3 = 0;
       if (data->ReadSubList (nsub2,i,"coordinates",ach,nsub3)) {
         Standard_Integer nb3 = data->NbParams(nsub3);
         if(nb3 > 3) {
index b7a18ac584dc7ea8c464e4820be5b33d9e55ca5b..bf138fc4e8c7162195c41e0bf92e5c71440f2363 100644 (file)
@@ -82,7 +82,7 @@ void RWStepVisual_RWCubicBezierTessellatedEdge::ReadStep(
     Standard_Integer num2 = sub4;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Integer anIt0;
+      Standard_Integer anIt0 = 0;
       theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
       aTessellatedEdge_LineStrip->SetValue(i0, anIt0);
     }
index 4cd7be5f9242810c60d41f01ea0a0da12b03bc1d..f9b9fc10710ec4c4c2195d0ace13ed12dae7854f 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepVisual_RWCubicBezierTriangulatedFace.hxx>
 #include <StepVisual_CubicBezierTriangulatedFace.hxx>
 #include <Interface_EntityIterator.hxx>
@@ -65,7 +67,7 @@ void RWStepVisual_RWCubicBezierTriangulatedFace::ReadStep(
   theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck,
     STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates);
 
-  Standard_Integer aTessellatedFace_Pnmax;
+  Standard_Integer aTessellatedFace_Pnmax = 0;
   theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax);
 
   Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals;
@@ -82,7 +84,7 @@ void RWStepVisual_RWCubicBezierTriangulatedFace::ReadStep(
         Standard_Integer num4 = subj4;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Real anIt0;
+          Standard_Real anIt0 = NAN;
           theData->ReadReal(num4, j0, "real", theCheck, anIt0);
           aTessellatedFace_Normals->SetValue(i0,j0, anIt0);
         }
@@ -118,7 +120,7 @@ void RWStepVisual_RWCubicBezierTriangulatedFace::ReadStep(
         Standard_Integer num4 = subj6;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Integer anIt0;
+          Standard_Integer anIt0 = 0;
           theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
           aCtriangles->SetValue(i0,j0, anIt0);
         }
index 65bb30dd3031adf197fba4b62862281cd8b1bfba..0a5f8bc602dccdaa15975642e65c7f3b27e1d984 100644 (file)
@@ -45,7 +45,7 @@ void RWStepVisual_RWCurveStyleFont::ReadStep
 
        Handle(StepVisual_HArray1OfCurveStyleFontPattern) aPatternList;
        Handle(StepVisual_CurveStyleFontPattern) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"pattern_list",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aPatternList = new StepVisual_HArray1OfCurveStyleFontPattern (1, nb2);
index f8a42c90499651b0bf2b94702a3e48d0543d4271..ed793abe7598d1d030e0d3d2a2e150f6878012ab 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <RWStepVisual_RWCurveStyleFontPattern.hxx>
 #include <StepData_StepReaderData.hxx>
 #include <StepData_StepWriter.hxx>
@@ -33,13 +35,13 @@ void RWStepVisual_RWCurveStyleFontPattern::ReadStep
 
        // --- own field : visibleSegmentLength ---
 
-       Standard_Real aVisibleSegmentLength;
+       Standard_Real aVisibleSegmentLength = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
        data->ReadReal (num,1,"visible_segment_length",ach,aVisibleSegmentLength);
 
        // --- own field : invisibleSegmentLength ---
 
-       Standard_Real aInvisibleSegmentLength;
+       Standard_Real aInvisibleSegmentLength = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadReal (num,2,"invisible_segment_length",ach,aInvisibleSegmentLength);
 
index a5ebadd6d3a1a96760da4f9a049fb60d9adc0ae3..e37fedf28c7d64b09ac4a84c515993ba2ddb5af1 100644 (file)
@@ -44,7 +44,7 @@ void RWStepVisual_RWDraughtingCallout::ReadStep(const Handle(StepData_StepReader
   // Own field: contents
   Handle(StepVisual_HArray1OfDraughtingCalloutElement) aContents;
   StepVisual_DraughtingCalloutElement anEnt;
-  Standard_Integer nbSub;
+  Standard_Integer nbSub = 0;
   if (data->ReadSubList (num, 2, "contents", ach, nbSub)) {
     Standard_Integer nbElements = data->NbParams(nbSub);
     aContents = new StepVisual_HArray1OfDraughtingCalloutElement (1, nbElements);
@@ -86,7 +86,7 @@ void RWStepVisual_RWDraughtingCallout::Share (const Handle(StepVisual_Draughting
                                               Interface_EntityIterator& iter) const
 {
   // Own field: contents
-  Standard_Integer i, nb = ent->NbContents();
+  Standard_Integer i = 0, nb = ent->NbContents();
   for (i = 1; i <= nb; i++)  
     iter.AddItem (ent->ContentsValue(i).Value());
 }
index d324b8387e2d4e0af4b6751b03400e4d1e6cd1e7..2d9532297910c617248028c6bba700e4ad2544b2 100644 (file)
@@ -45,7 +45,7 @@ void RWStepVisual_RWFillAreaStyle::ReadStep
 
        Handle(StepVisual_HArray1OfFillStyleSelect) aFillStyles;
        StepVisual_FillStyleSelect aFillStylesItem;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"fill_styles",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aFillStyles = new StepVisual_HArray1OfFillStyleSelect (1, nb2);
index 9fb550cc4d4438ab30df20aff40cab29f8a46728..4bcc95682d47584e374ba428a41468655d0b1663 100644 (file)
@@ -38,7 +38,7 @@ void RWStepVisual_RWInvisibility::ReadStep
 
        Handle(StepVisual_HArray1OfInvisibleItem) aInvisibleItems;
        StepVisual_InvisibleItem aInvisibleItemsItem;
-       Standard_Integer nsub1;
+       Standard_Integer nsub1 = 0;
        if (data->ReadSubList (num,1,"invisible_items",ach,nsub1)) {
          Standard_Integer nb1 = data->NbParams(nsub1);
          aInvisibleItems = new StepVisual_HArray1OfInvisibleItem (1, nb1);
index 149a819e9a1f01b0b1be4651eb10541a1eac6092..62dd5e9e5d6ffbeec3d083add3c373d7a14c3deb 100644 (file)
@@ -44,7 +44,7 @@ void RWStepVisual_RWMechanicalDesignGeometricPresentationArea::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 57c695f590e44af5d85bf8eda1d6159aa7ef74b8..9bf7715e3b37cb22081518823b0fdc2da43cd28f 100644 (file)
@@ -44,7 +44,7 @@ void RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation::ReadSte
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          if (nb2 > 0) aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 0d6419694334f5ade4dfcb9e6dcacf5ab63d4318..5ebc45b2cdda6f7f58113f4fe620e6cf4e5bf40f 100644 (file)
@@ -45,7 +45,7 @@ void RWStepVisual_RWOverRidingStyledItem::ReadStep
 
        Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
        Handle(StepVisual_PresentationStyleAssignment) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"styles",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aStyles = new StepVisual_HArray1OfPresentationStyleAssignment (1, nb2);
index 0893646eac1e816cb9a08ffc95f15dc707581268..edfbe79100bf476bfd6634f7f60b285ee0d05eb6 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepVisual_RWPlanarBox.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -40,13 +42,13 @@ void RWStepVisual_RWPlanarBox::ReadStep
 
        // --- inherited field : sizeInX ---
 
-       Standard_Real aSizeInX;
+       Standard_Real aSizeInX = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadReal (num,2,"size_in_x",ach,aSizeInX);
 
        // --- inherited field : sizeInY ---
 
-       Standard_Real aSizeInY;
+       Standard_Real aSizeInY = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"size_in_y",ach,aSizeInY);
 
index 4304d2feed6c7ae7a8b12c8cb383c8c4c78b56ef..2caacec2a1d2941120b6271fd3af9320796fae5c 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <RWStepVisual_RWPlanarExtent.hxx>
 #include <StepData_StepReaderData.hxx>
 #include <StepData_StepWriter.hxx>
@@ -39,13 +41,13 @@ void RWStepVisual_RWPlanarExtent::ReadStep
 
        // --- own field : sizeInX ---
 
-       Standard_Real aSizeInX;
+       Standard_Real aSizeInX = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
        data->ReadReal (num,2,"size_in_x",ach,aSizeInX);
 
        // --- own field : sizeInY ---
 
-       Standard_Real aSizeInY;
+       Standard_Real aSizeInY = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"size_in_y",ach,aSizeInY);
 
index 7b873799e7b269662d0c91ecda2049215404d9f0..078c6d96d667368f6ad67001cae545dc83b166d9 100644 (file)
@@ -44,7 +44,7 @@ void RWStepVisual_RWPresentationArea::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 9fa312bab10900f3dc750afc01f9596ee264a4ee..03b6846b67f1ab7b6d675f9f8832d5cb2726eebb 100644 (file)
@@ -49,7 +49,7 @@ void RWStepVisual_RWPresentationLayerAssignment::ReadStep
 
        Handle(StepVisual_HArray1OfLayeredItem) aAssignedItems;
        StepVisual_LayeredItem aAssignedItemsItem;
-       Standard_Integer nsub3;
+       Standard_Integer nsub3 = 0;
        if (data->ReadSubList (num,3,"assigned_items",ach,nsub3)) {
          Standard_Integer nb3 = data->NbParams(nsub3);
     if (nb3 > 0)
index 361bc6dd97785372a9a486249c98265afc5336c8..844a9a4bcb8ae07fe603e7b5fe891a44f3e3a23f 100644 (file)
@@ -44,7 +44,7 @@ void RWStepVisual_RWPresentationRepresentation::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 9f650ae649a8db33bfa692be3ab50e75d261f9c3..08805ba34a06dad145103378f67d1bdbfddad9f9 100644 (file)
@@ -39,7 +39,7 @@ void RWStepVisual_RWPresentationStyleAssignment::ReadStep
 
   Handle(StepVisual_HArray1OfPresentationStyleSelect) aStyles;
   StepVisual_PresentationStyleSelect aStylesItem;
-  Standard_Integer nsub1;
+  Standard_Integer nsub1 = 0;
   if (data->ReadSubList (num,1,"styles",ach,nsub1)) {
     Standard_Integer nb1 = data->NbParams(nsub1);
     aStyles = new StepVisual_HArray1OfPresentationStyleSelect (1, nb1);
index 5da048e6ccfa2b3e54fd7168a48e6c8e5bcca0df..d376f26e3d7fbc42e7bdbe3cb5603cd9859f9e94 100644 (file)
@@ -40,7 +40,7 @@ void RWStepVisual_RWPresentationStyleByContext::ReadStep
 
   Handle(StepVisual_HArray1OfPresentationStyleSelect) aStyles;
   StepVisual_PresentationStyleSelect aStylesItem;
-  Standard_Integer nsub1;
+  Standard_Integer nsub1 = 0;
   if (data->ReadSubList (num,1,"styles",ach,nsub1)) {
     Standard_Integer nb1 = data->NbParams(nsub1);
     aStyles = new StepVisual_HArray1OfPresentationStyleSelect (1, nb1);
index 1b94232775fa1f0ea24d09806c802dcf04a98c71..9082931f802ea267ef77f58ddb2014bfe696844d 100644 (file)
@@ -44,7 +44,7 @@ void RWStepVisual_RWPresentationView::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 6f173e8a196779754832dbacdab272e1f9ec17c8..ef9666819eb1e34984de918a3833a9754f457120 100644 (file)
@@ -48,7 +48,7 @@ void RWStepVisual_RWRepositionedTessellatedGeometricSet::ReadStep
   
   theData->NamedForComplex("TESSELLATED_GEOMETRIC_SET", theNum, aNum, theAch);
   NCollection_Handle<StepVisual_Array1OfTessellatedItem> anItems;
-  Standard_Integer aNSub2;
+  Standard_Integer aNSub2 = 0;
   if (theData->ReadSubList (aNum,1,"items",theAch,aNSub2)) {
     Standard_Integer aNb2 = theData->NbParams(aNSub2);
     anItems = new StepVisual_Array1OfTessellatedItem(1, aNb2);
index 8548408906a347ba39dfb8f38746e3cb2d198f81..2dee26d8b53adc0a28809ba42721966ea2f98af5 100644 (file)
@@ -43,7 +43,7 @@ void RWStepVisual_RWStyledItem::ReadStep
 
        Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
        Handle(StepVisual_PresentationStyleAssignment) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"styles",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aStyles = new StepVisual_HArray1OfPresentationStyleAssignment (1, nb2);
index 85853902c9b543d2775c84198d183ab41fdb8b67..8cad16f94213bee62004acfb6d8d0b8f5d6a4ad4 100644 (file)
@@ -44,7 +44,7 @@ void RWStepVisual_RWSurfaceSideStyle::ReadStep
 
        Handle(StepVisual_HArray1OfSurfaceStyleElementSelect) aStyles;
        StepVisual_SurfaceStyleElementSelect aStylesItem;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"styles",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aStyles = new StepVisual_HArray1OfSurfaceStyleElementSelect (1, nb2);
index 4c5c323ddbb6525c63983a1f1a4689d2cc7a05ba..e2c43b86e6f3574f881a7831d7915ee11da8658a 100644 (file)
@@ -47,16 +47,16 @@ void RWStepVisual_RWSurfaceStyleParameterLine::ReadStep
   // Par consequent, on doit trouver dans le fichier :
   //     ... , (U_DIRECTION_COUNT(10), V_DIRECTION_COUNT(1)) );
 
-  Standard_Integer numr, numpr;
+  Standard_Integer numr = 0, numpr = 0;
   TCollection_AsciiString UType("U_DIRECTION_COUNT");
   TCollection_AsciiString VType("V_DIRECTION_COUNT");
   TCollection_AsciiString TrueType;
 
   Handle(StepVisual_HArray1OfDirectionCountSelect) aDirectionCounts;
-  Standard_Integer aDirectionCountsItem;
+  Standard_Integer aDirectionCountsItem = 0;
   StepVisual_DirectionCountSelect aDirectionCountSelect;
 
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,2,"direction_counts",ach,nsub2)) {
     Standard_Integer nb2 = data->NbParams(nsub2);
     aDirectionCounts = new StepVisual_HArray1OfDirectionCountSelect(1, nb2);
index 94f5b75358d67faef311c3d5248612be43fb9bb7..77815d313c1521522235c950677c3b74bf888d04 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepVisual_RWSurfaceStyleReflectanceAmbient.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -44,7 +46,7 @@ void RWStepVisual_RWSurfaceStyleReflectanceAmbient::ReadStep (const Handle(StepD
 
   // Own fields of SurfaceStyleReflectanceAmbient
 
-  Standard_Real aAmbientReflectance;
+  Standard_Real aAmbientReflectance = NAN;
   data->ReadReal (num, 1, "ambient_reflectance", ach, aAmbientReflectance);
 
   // Initialize entity
index 30ca3fa32f5f417f71fdbdf0c4c8dd54d274052d..d9ccdc76ca9ace693e684e35112188dff027805b 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepVisual_RWSurfaceStyleTransparent.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -44,7 +46,7 @@ void RWStepVisual_RWSurfaceStyleTransparent::ReadStep (const Handle(StepData_Ste
 
   // Own fields of SurfaceStyleTransparent
 
-  Standard_Real aTransparency;
+  Standard_Real aTransparency = NAN;
   data->ReadReal (num, 1, "transparency", ach, aTransparency);
 
   // Initialize entity
index 0f86f7cd086868aa91eb9c2a5db8da115d646169..2c8805a0d9d5324a7a378d0e45ecaea933699513 100644 (file)
@@ -44,7 +44,7 @@ void RWStepVisual_RWTemplate::ReadStep
 
        Handle(StepRepr_HArray1OfRepresentationItem) aItems;
        Handle(StepRepr_RepresentationItem) anent2;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
index 662bde0ae4a8e3094cf19dcc1c4c4666dbe9fdf7..8f50cec49e5d9060f17453e01b46453e48a597b8 100644 (file)
@@ -47,7 +47,7 @@ void RWStepVisual_RWTessellatedAnnotationOccurrence::ReadStep
   // Inherited field : styles
   Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
   Handle(StepVisual_PresentationStyleAssignment) anent2;
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   if (data->ReadSubList (num,2,"styles",ach,nsub2)) {
     Standard_Integer nb2 = data->NbParams(nsub2);
     aStyles = new StepVisual_HArray1OfPresentationStyleAssignment (1, nb2);
index ccf65f39950c9aee478cbe1a7b0bf22ff3887606..390c66778fc9d787eb19eb006cc870cdd0d1dd96 100644 (file)
@@ -84,7 +84,7 @@ void RWStepVisual_RWTessellatedConnectingEdge::ReadStep(
     Standard_Integer num2 = sub4;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Integer anIt0;
+      Standard_Integer anIt0 = 0;
       theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
       aTessellatedEdge_LineStrip->SetValue(i0, anIt0);
     }
@@ -112,7 +112,7 @@ void RWStepVisual_RWTessellatedConnectingEdge::ReadStep(
     Standard_Integer num2 = sub8;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Integer anIt0;
+      Standard_Integer anIt0 = 0;
       theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
       aLineStripFace1->SetValue(i0, anIt0);
     }
@@ -127,7 +127,7 @@ void RWStepVisual_RWTessellatedConnectingEdge::ReadStep(
     Standard_Integer num2 = sub9;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Integer anIt0;
+      Standard_Integer anIt0 = 0;
       theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
       aLineStripFace2->SetValue(i0, anIt0);
     }
index 520dfcc72713ccd17049fa7fe5736a73472519e0..8b199724ea29226e9bdf862323c4bee25463b7ba 100644 (file)
@@ -49,7 +49,7 @@ void RWStepVisual_RWTessellatedCurveSet::ReadStep
   Handle(StepVisual_CoordinatesList) aCoordList;
   data->ReadEntity (num, 2,"coord_list",ach,STANDARD_TYPE(StepVisual_CoordinatesList), aCoordList);
   //--- Initialisation of the read entity ---
-  Standard_Integer nsub2;
+  Standard_Integer nsub2 = 0;
   NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> aCurves = new StepVisual_VectorOfHSequenceOfInteger;
   if (data->ReadSubList (num,3,"curves",ach,nsub2)) 
   {
@@ -60,7 +60,7 @@ void RWStepVisual_RWTessellatedCurveSet::ReadStep
     for (Standard_Integer i = 1; i <= nb2; i++) 
     {
       Handle(TColStd_HSequenceOfInteger) aCurve = new TColStd_HSequenceOfInteger;
-      Standard_Integer nsub3;
+      Standard_Integer nsub3 = 0;
       if (data->ReadSubList (nsub2,i,"number_coordinates",ach,nsub3)) {
         Standard_Integer nb3 = data->NbParams(nsub3);
         for (Standard_Integer j = 1; j <= nb3; j++) {
index 0723e7c99718f423907630d7a10a69dfd8fcf6b5..4f9b7d0f46d567c2d579cb11281ae131666ae2d6 100644 (file)
@@ -81,7 +81,7 @@ void RWStepVisual_RWTessellatedEdge::ReadStep (const Handle(StepData_StepReaderD
     Standard_Integer num2 = sub4;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Integer anIt0;
+      Standard_Integer anIt0 = 0;
       theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
       aLineStrip->SetValue(i0, anIt0);
     }
index dc17e2cd3779fa4124fb9e98e95c776775efb04b..9d4f4a91e02b33bbd59df357dd2565a095c547e5 100644 (file)
@@ -46,7 +46,7 @@ void RWStepVisual_RWTessellatedGeometricSet::ReadStep
   data->ReadString (num, 1, "name", ach, aName);
   
   NCollection_Handle<StepVisual_Array1OfTessellatedItem> anItems;
-       Standard_Integer nsub2;
+       Standard_Integer nsub2 = 0;
        if (data->ReadSubList (num,2,"items",ach,nsub2)) {
          Standard_Integer nb2 = data->NbParams(nsub2);
          anItems = new StepVisual_Array1OfTessellatedItem(1, nb2);
index 6070e25aacfd080a0214135d8184164e2ffcd149..3755bdee5fa5771f71f7463531057ced78cb957d 100644 (file)
@@ -68,7 +68,7 @@ void RWStepVisual_RWTessellatedPointSet::ReadStep (const Handle(StepData_StepRea
     Standard_Integer num2 = sub3;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Integer anIt0;
+      Standard_Integer anIt0 = 0;
       theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
       aPointList->SetValue(i0, anIt0);
     }
index e5f669c2e6c230855a87e93de980f6640e2995f7..3bdc14fcb0f0171cddff8b7c920848107b7b9514 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx>
 #include <StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx>
 #include <Interface_EntityIterator.hxx>
@@ -85,7 +87,7 @@ void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::ReadSt
     Standard_Integer num2 = sub4;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Real anIt0;
+      Standard_Real anIt0 = NAN;
       theData->ReadReal(num2, i0, "tessellation_accuracy_parameter_item", theCheck, anIt0);
       aTessellationAccuracyParameters->SetValue(i0, anIt0);
     }
index 6c651afd603d8f8642b34399e840d90ab2793b79..e957501c8299da8174e3737935cb1e6f65bd18f0 100644 (file)
@@ -72,7 +72,7 @@ void RWStepVisual_RWTessellatedVertex::ReadStep (const Handle(StepData_StepReade
     aTopologicalLink.Nullify();
   }
 
-  Standard_Integer aPointIndex;
+  Standard_Integer aPointIndex = 0;
   theData->ReadInteger(theNum, 4, "point_index", theCheck, aPointIndex);
 
   // Initialize entity
index da3039aa2be5c44c13b40ce3bd1dba7655ff0e55..890b2e5745370152523bb47c3435b4b0e9255f6c 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_Check.hxx>
 #include <Interface_EntityIterator.hxx>
 #include <RWStepVisual_RWTextStyleWithBoxCharacteristics.hxx>
@@ -50,7 +52,7 @@ void RWStepVisual_RWTextStyleWithBoxCharacteristics::ReadStep
   
   // --- own field : characteristics ---
 
-  Standard_Integer numr, numpr;
+  Standard_Integer numr = 0, numpr = 0;
   TCollection_AsciiString TypeHeigth("BOX_HEIGHT");
   TCollection_AsciiString TypeWidth("BOX_WIDTH");
   TCollection_AsciiString TypeSlant("BOX_SLANT_ANGLE");
@@ -58,10 +60,10 @@ void RWStepVisual_RWTextStyleWithBoxCharacteristics::ReadStep
   TCollection_AsciiString TrueType;
 
   Handle(StepVisual_HArray1OfBoxCharacteristicSelect) aCharacteristics;
-  Standard_Real aCharacteristicsItem;
+  Standard_Real aCharacteristicsItem = NAN;
   StepVisual_BoxCharacteristicSelect aBoxCharacteristicSelect;
 
-  Standard_Integer nsub3;
+  Standard_Integer nsub3 = 0;
   nsub3 = data->SubListNumber(num, 3, Standard_False);
   if (nsub3 !=0) {
     Standard_Integer nb3 = data->NbParams(nsub3);
index c8acb6a0648493ae1d0049ac9b27182122d27252..e2aa5febd6e84c31617a3d9f3666612b1a58f013 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <RWStepVisual_RWTriangulatedFace.hxx>
 #include <StepVisual_TriangulatedFace.hxx>
 #include <Interface_EntityIterator.hxx>
@@ -64,7 +66,7 @@ void RWStepVisual_RWTriangulatedFace::ReadStep (const Handle(StepData_StepReader
   theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck,
     STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates);
 
-  Standard_Integer aTessellatedFace_Pnmax;
+  Standard_Integer aTessellatedFace_Pnmax = 0;
   theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax);
 
   Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals;
@@ -81,7 +83,7 @@ void RWStepVisual_RWTriangulatedFace::ReadStep (const Handle(StepData_StepReader
         Standard_Integer num4 = subj4;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Real anIt0;
+          Standard_Real anIt0 = NAN;
           theData->ReadReal(num4, j0, "real", theCheck, anIt0);
           aTessellatedFace_Normals->SetValue(i0,j0, anIt0);
         }
@@ -112,7 +114,7 @@ void RWStepVisual_RWTriangulatedFace::ReadStep (const Handle(StepData_StepReader
     Standard_Integer num2 = sub6;
     for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
     {
-      Standard_Integer anIt0;
+      Standard_Integer anIt0 = 0;
       theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
       aPnindex->SetValue(i0, anIt0);
     }
@@ -132,7 +134,7 @@ void RWStepVisual_RWTriangulatedFace::ReadStep (const Handle(StepData_StepReader
         Standard_Integer num4 = subj7;
         for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
         {
-          Standard_Integer anIt0;
+          Standard_Integer anIt0 = 0;
           theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
           aTriangles->SetValue(i0,j0, anIt0);
         }
index 6dd227ef26692cf467762784ff82ba379b0e909a..092296659853393f069d8b55e010da85bce40270 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Interface_EntityIterator.hxx>
 #include <RWStepVisual_RWViewVolume.hxx>
 #include <StepData_StepReaderData.hxx>
@@ -58,37 +60,37 @@ void RWStepVisual_RWViewVolume::ReadStep
 
        // --- own field : viewPlaneDistance ---
 
-       Standard_Real aViewPlaneDistance;
+       Standard_Real aViewPlaneDistance = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
        data->ReadReal (num,3,"view_plane_distance",ach,aViewPlaneDistance);
 
        // --- own field : frontPlaneDistance ---
 
-       Standard_Real aFrontPlaneDistance;
+       Standard_Real aFrontPlaneDistance = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
        data->ReadReal (num,4,"front_plane_distance",ach,aFrontPlaneDistance);
 
        // --- own field : frontPlaneClipping ---
 
-       Standard_Boolean aFrontPlaneClipping;
+       Standard_Boolean aFrontPlaneClipping = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
        data->ReadBoolean (num,5,"front_plane_clipping",ach,aFrontPlaneClipping);
 
        // --- own field : backPlaneDistance ---
 
-       Standard_Real aBackPlaneDistance;
+       Standard_Real aBackPlaneDistance = NAN;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
        data->ReadReal (num,6,"back_plane_distance",ach,aBackPlaneDistance);
 
        // --- own field : backPlaneClipping ---
 
-       Standard_Boolean aBackPlaneClipping;
+       Standard_Boolean aBackPlaneClipping = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
        data->ReadBoolean (num,7,"back_plane_clipping",ach,aBackPlaneClipping);
 
        // --- own field : viewVolumeSidesClipping ---
 
-       Standard_Boolean aViewVolumeSidesClipping;
+       Standard_Boolean aViewVolumeSidesClipping = 0;
        //szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
        data->ReadBoolean (num,8,"view_volume_sides_clipping",ach,aViewVolumeSidesClipping);
 
index e773d624d6f9e0ec16f88e743c6744ab6ad14105..c842433359ad310df0244bd75a904328bb00b568 100644 (file)
@@ -187,7 +187,7 @@ static Resource_KindOfLine WhatKindOfLine(OSD_File& aFile,
                                       TCollection_AsciiString& aToken2)
 {
   TCollection_AsciiString WhiteSpace = " \t" ;
-  Standard_Integer Pos1,Pos2,Pos ;
+  Standard_Integer Pos1 = 0,Pos2 = 0,Pos = 0 ;
   TCollection_AsciiString Line ;
 
   if (!GetLine(aFile,Line))
@@ -247,7 +247,7 @@ static Standard_Integer GetLine(OSD_File& aFile,TCollection_AsciiString& aLine)
 {
   TCollection_AsciiString Buffer;
   Standard_Integer BufSize = 10;
-  Standard_Integer Len;
+  Standard_Integer Len = 0;
 
   aLine.Clear();
   do {
@@ -340,7 +340,7 @@ Standard_Boolean Resource_Manager::Save() const
     TColStd_Array1OfAsciiString KeyArray(1,NbKey);
     Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString Iter(myUserMap);
 
-    Standard_Integer Index;
+    Standard_Integer Index = 0;
     for ( Index = 1; Iter.More(); Iter.Next())
       KeyArray(Index++)= Iter.Key();
 
@@ -470,7 +470,7 @@ void Resource_Manager::SetResource(const Standard_CString aResourceName,
 void Resource_Manager::SetResource(const Standard_CString aResource,
                                   const Standard_ExtString aValue)
 {
-  Standard_PCharacter pStr;
+  Standard_PCharacter pStr = nullptr;
   TCollection_AsciiString Resource = aResource;
   TCollection_ExtendedString ExtValue = aValue;
   TCollection_AsciiString FormatStr(ExtValue.Length()*3+10, ' ');
index 827a32e9ac9694dd9377c2a1e09032fc0c6ac50a..b362541578ed0571b479ad19fced747a27da3c90 100644 (file)
@@ -42,7 +42,7 @@ void Resource_Unicode::ConvertSJISToUnicode(const Standard_CString fromstr,TColl
   tostr.Clear();
 
   unsigned char* currentstr = ((unsigned char*) fromstr);
-  unsigned int pl,ph;
+  unsigned int pl = 0,ph = 0;
   // BIG INDIAN USED HERE
   while(*currentstr != '\0') {
     if (issjis1(*currentstr)) {
@@ -74,7 +74,7 @@ void Resource_Unicode::ConvertEUCToUnicode(const Standard_CString fromstr,TColle
   tostr.Clear();
 
   unsigned char* currentstr = ((unsigned char*) fromstr);
-  unsigned int pl,ph;
+  unsigned int pl = 0,ph = 0;
   // BIG INDIAN USED HERE
   while(*currentstr != '\0') {
     if (iseuc(*currentstr)) {
@@ -105,7 +105,7 @@ void Resource_Unicode::ConvertGBToUnicode(const Standard_CString fromstr,TCollec
   tostr.Clear();
 
   unsigned char* currentstr = ((unsigned char*) fromstr);
-  unsigned int pl,ph;
+  unsigned int pl = 0,ph = 0;
   // BIG INDIAN USED HERE
   while(*currentstr != '\0') {
     if (isshift(*currentstr)) {
@@ -364,8 +364,8 @@ Standard_Boolean Resource_Unicode::ConvertUnicodeToSJIS(const TCollection_Extend
   Standard_Integer nbtrans = 0;
   Standard_Integer nbext = 1;
   Standard_Boolean finished = Standard_False;
-  Standard_ExtCharacter curcar;
-  unsigned int pl,ph;
+  Standard_ExtCharacter curcar = 0;
+  unsigned int pl = 0,ph = 0;
   // BIG INDIAN USED HERE
   
   while (!finished) {
@@ -413,8 +413,8 @@ Standard_Boolean Resource_Unicode::ConvertUnicodeToEUC(const TCollection_Extende
   Standard_Integer nbtrans = 0;
   Standard_Integer nbext = 1;
   Standard_Boolean finished = Standard_False;
-  Standard_ExtCharacter curcar;
-  unsigned int pl,ph;
+  Standard_ExtCharacter curcar = 0;
+  unsigned int pl = 0,ph = 0;
   // BIG INDIAN USED HERE
   
   while (!finished) {
@@ -462,8 +462,8 @@ Standard_Boolean Resource_Unicode::ConvertUnicodeToGB(const TCollection_Extended
   Standard_Integer nbtrans = 0;
   Standard_Integer nbext = 1;
   Standard_Boolean finished = Standard_False;
-  Standard_ExtCharacter curcar;
-  unsigned int pl,ph;
+  Standard_ExtCharacter curcar = 0;
+  unsigned int pl = 0,ph = 0;
   // BIG INDIAN USED HERE
   
   while (!finished) {
@@ -511,8 +511,8 @@ Standard_Boolean Resource_Unicode::ConvertUnicodeToANSI(const TCollection_Extend
   Standard_Integer nbtrans = 0;
   Standard_Integer nbext = 1;
   Standard_Boolean finished = Standard_False;
-  Standard_ExtCharacter curcar;
-  unsigned int pl,ph;
+  Standard_ExtCharacter curcar = 0;
+  unsigned int pl = 0,ph = 0;
   // BIG INDIAN USED HERE
   
   while (!finished) {
index 86da09c35ae548176cb166c5df22fc1f2c6271b8..26c4d7c38f552a19303d9e664ca92c400d4c6525 100644 (file)
@@ -192,7 +192,7 @@ void STEPCAFControl_GDTProperty::GetDimClassOfTolerance(const Handle(StepShape_L
   Handle(TCollection_HAsciiString) aFormV = theLAF->FormVariance();
   Handle(TCollection_HAsciiString) aGrade = theLAF->Grade();
   theFV = XCAFDimTolObjects_DimensionFormVariance_None;
-  Standard_Boolean aFound;
+  Standard_Boolean aFound = 0;
   theHolle = Standard_False;
   //it is not verified information
   for(Standard_Integer c = 0; c <= 1 && !aFormV.IsNull(); c++)
@@ -1166,7 +1166,7 @@ Handle(StepDimTol_HArray1OfDatumReferenceModifier) STEPCAFControl_GDTProperty::
   GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers,
                        const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal,
                        const Standard_Real theValue,
-                       const StepBasic_Unit theUnit)
+                       const StepBasic_Unit& theUnit)
 {
   if ((theModifiers.Length() == 0) && (theModifWithVal == XCAFDimTolObjects_DatumModifWithValue_None))
     return NULL;
@@ -1307,7 +1307,7 @@ Handle(TCollection_HAsciiString) STEPCAFControl_GDTProperty::GetTolValueType(con
 //function : GetTessellation
 //purpose  : 
 //=======================================================================
-Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape theShape)
+Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape& theShape)
 {
   // Build coordinate list and curves
   NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> aCurves = new StepVisual_VectorOfHSequenceOfInteger;
index 03631c61ca9c06acd3acbdf104a86d99b711e6e1..c685b39edc8af3637d5d1e0ba42708c0cb002da4 100644 (file)
@@ -99,9 +99,9 @@ public:
   Standard_EXPORT static Handle(StepDimTol_HArray1OfDatumReferenceModifier) GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers,
                                                                                                  const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal,
                                                                                                  const Standard_Real theValue,
-                                                                                                 const StepBasic_Unit theUnit);
+                                                                                                 const StepBasic_Unit& theUnit);
 
-  Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape theShape);
+  Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape& theShape);
 
 };
 
index c7078c397bf00a009d5981154388faa528e4f7b8..6eb2db9feb38994059ea713fc5f64425d94a226a 100644 (file)
@@ -99,7 +99,7 @@ void STEPCAFControl_Provider::initStatic(const Handle(DE_ConfigurationNode)& the
 // function : setStatic
 // purpose  :
 //=======================================================================
-void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter)
+void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter)
 {
   Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity);
   Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode);
index fb468efafa599b3eb3540dc9aa9c51043962b145..d7774028b1083a7e7c5e8af695ad45c7b98467a4 100644 (file)
@@ -139,7 +139,7 @@ public:
    void initStatic(const Handle(DE_ConfigurationNode)& theNode);
 
    //! Initialize static variables
-   void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter);
+   void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter);
 
    //! Reset used interface static variables
    void resetStatic();
index cae2a1bf282f85bb73eab28f298f8a09c3b1587f..3b5e43eaa73f5e9356249f80f1ba6573afa81799 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <STEPCAFControl_Reader.hxx>
 
 #include <BRep_Builder.hxx>
@@ -527,7 +529,7 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader,
   reader.ClearShapes();
   Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(reader.Model());
   prepareUnits(aModel, doc);
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   // Read all shapes
   Standard_Integer num = reader.NbRootsForTransfer();
@@ -781,7 +783,7 @@ TDF_Label STEPCAFControl_Reader::AddShape(const TopoDS_Shape &S,
     // check whether it has associated external ref
   TColStd_SequenceOfHAsciiString SHAS;
   if (ShapePDMap.IsBound(S) && PDFileMap.IsBound(ShapePDMap.Find(S))) {
-    Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(ShapePDMap.Find(S));
+    const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(ShapePDMap.Find(S));
     if (!EF.IsNull()) {
       // (store information on extern refs in the document)
       SHAS.Append(EF->GetName());
@@ -955,7 +957,7 @@ static void SetAssemblyComponentStyle(const Handle(Transfer_TransientProcess) &t
   if (theStyle.IsNull()) return;
 
   Handle(StepVisual_Colour) aSurfCol, aBoundCol, aCurveCol, aRenderCol;
-  Standard_Real aRenderTransp;
+  Standard_Real aRenderTransp = NAN;
   // check if it is component style
   Standard_Boolean anIsComponent = Standard_False;
   if (!theStyles.GetColors(theStyle, aSurfCol, aBoundCol, aCurveCol, aRenderCol, aRenderTransp, anIsComponent))
@@ -977,7 +979,7 @@ static void SetAssemblyComponentStyle(const Handle(Transfer_TransientProcess) &t
     {
       // NB: C cast is used instead of DownCast() to improve performance on some cases.
       // This saves ~10% of elapsed time on "testgrid perf de bug29* -parallel 0".
-      aSRR = (StepRepr_ShapeRepresentationRelationship*)(aSubsVal.get());
+      aSRR = dynamic_cast<StepRepr_ShapeRepresentationRelationship*>(aSubsVal.get());
     }
   }
 
@@ -1081,7 +1083,7 @@ static void SetStyle(const Handle(XSControl_WorkSession) &theWS,
     break;
   }
   Handle(StepVisual_Colour) aSurfCol, aBoundCol, aCurveCol, aRenderCol;
-  Standard_Real aRenderTransp;
+  Standard_Real aRenderTransp = NAN;
   // check if it is component style
   Standard_Boolean anIsComponent = Standard_False;
   if (!theStyles.GetColors(theStyle, aSurfCol, aBoundCol, aCurveCol, aRenderCol, aRenderTransp, anIsComponent) && anIsVisible)
@@ -1315,7 +1317,7 @@ static TDF_Label GetLabelFromPD(const Handle(StepBasic_ProductDefinition) &PD,
 {
   TDF_Label L;
   if (PDFileMap.IsBound(PD)) {
-    Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(PD);
+    const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(PD);
     if (!EF.IsNull()) {
       L = EF->GetLabel();
       if (!L.IsNull()) return L;
@@ -1348,7 +1350,7 @@ TDF_Label STEPCAFControl_Reader::FindInstance(const Handle(StepRepr_NextAssembly
   TDF_Label L;
 
   // get shape resulting from CDSR (in fact, only location is interesting)
-  Handle(Transfer_TransientProcess) TP = Tool.TransientProcess();
+  const Handle(Transfer_TransientProcess)& TP = Tool.TransientProcess();
   Handle(Transfer_Binder) binder = TP->Find(NAUO);
   if (binder.IsNull() || !binder->HasResult()) {
 #ifdef OCCT_DEBUG
@@ -1468,7 +1470,7 @@ static TDF_Label GetLabelFromPD(const Handle(StepBasic_ProductDefinition) &PD,
 {
   TDF_Label L;
   if (PDFileMap.IsBound(PD)) {
-    Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(PD);
+    const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(PD);
     if (!EF.IsNull()) {
       L = EF->GetLabel();
       if (!L.IsNull()) return L;
@@ -1600,8 +1602,8 @@ Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_Work
     Handle(StepRepr_Representation) rep = PDR->UsedRepresentation();
     for (Standard_Integer j = 1; j <= rep->NbItems(); j++) {
       Handle(StepRepr_RepresentationItem) ent = rep->ItemsValue(j);
-      Standard_Boolean isArea;
-      Standard_Real val;
+      Standard_Boolean isArea = 0;
+      Standard_Real val = NAN;
       gp_Pnt pos;
       if (Props.GetPropReal(ent, val, isArea)) {
         if (isArea) XCAFDoc_Area::Set(L, val);
@@ -1830,7 +1832,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSes
     }
 
     Handle(StepVisual_Colour) SurfCol, BoundCol, CurveCol, RenderCol;
-    Standard_Real RenderTransp;
+    Standard_Real RenderTransp = NAN;
     // check if it is component style
     Standard_Boolean IsComponent = Standard_False;
     if (!Styles.GetColors(style, SurfCol, BoundCol, CurveCol, RenderCol, RenderTransp, IsComponent) && IsVisible)
@@ -2093,7 +2095,7 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen
 //function : readAnnotationPlane
 //purpose  : read annotation plane
 //=======================================================================
-Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane) theAnnotationPlane,
+Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane)& theAnnotationPlane,
   gp_Ax2& thePlane)
 {
   if (theAnnotationPlane.IsNull())
@@ -2199,7 +2201,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR,
   // else set the center of bounding box to text position 0027372
   if (!aBox.IsVoid())
   {
-    Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+    Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN;
     aBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
     if (isHasPlane && !aBox.IsOut(aPlaneAxes.Location())) {
       aPtext = aPlaneAxes.Location();
@@ -2239,7 +2241,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR,
 //purpose  : read connection points for given dimension
 //=======================================================================
 void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR,
-  const Handle(Standard_Transient) theGDT,
+  const Handle(Standard_Transient)& theGDT,
   const Handle(XCAFDimTolObjects_DimensionObject)& theDimObject)
 {
   if (theGDT.IsNull() || theDimObject.IsNull())
@@ -2252,7 +2254,7 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR,
 
   Handle(StepShape_ShapeDimensionRepresentation) aSDR = NULL;
   for (Interface_EntityIterator anIt = aGraph.Sharings(theGDT); aSDR.IsNull() && anIt.More(); anIt.Next()) {
-    Handle(Standard_Transient) anEnt = anIt.Value();
+    const Handle(Standard_Transient)& anEnt = anIt.Value();
     Handle(StepShape_DimensionalCharacteristicRepresentation) aDCR =
       Handle(StepShape_DimensionalCharacteristicRepresentation)::DownCast(anEnt);
     if (!aDCR.IsNull())
@@ -2355,7 +2357,7 @@ static Standard_Boolean ReadDatums(const Handle(XCAFDoc_ShapeTool) &STool,
   const Interface_Graph &graph,
   const Handle(Transfer_TransientProcess) &TP,
   const TDF_Label TolerL,
-  const Handle(StepDimTol_GeometricToleranceWithDatumReference) GTWDR)
+  const Handle(StepDimTol_GeometricToleranceWithDatumReference)& GTWDR)
 {
   if (GTWDR.IsNull()) return Standard_False;
   Handle(StepDimTol_HArray1OfDatumReference) HADR = GTWDR->DatumSystem();
@@ -2772,14 +2774,14 @@ Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Tr
 
   Interface_EntityIterator anIter = aGraph.Shareds(theEnt);
   for (anIter.Start(); anIter.More(); anIter.Next()) {
-    Handle(Standard_Transient) anAtr = anIter.Value();
+    const Handle(Standard_Transient)& anAtr = anIter.Value();
     if (anAtr->IsKind(STANDARD_TYPE(StepDimTol_DatumSystem)))
     {
       Standard_Integer aPositionCounter = 0;//position on frame 
       Handle(StepDimTol_DatumSystem) aDS = Handle(StepDimTol_DatumSystem)::DownCast(anAtr);
       Interface_EntityIterator anIterDS = aGraph.Sharings(aDS);
       for (anIterDS.Start(); anIterDS.More(); anIterDS.Next()) {
-        Handle(Standard_Transient) anAtrDS = anIterDS.Value();
+        const Handle(Standard_Transient)& anAtrDS = anIterDS.Value();
         if (anAtrDS->IsKind(STANDARD_TYPE(StepAP242_GeometricItemSpecificUsage)))
         {
           //get axis
@@ -2957,7 +2959,7 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra
   // Collect all Shape_Aspect entities
   Interface_EntityIterator anIter = aGraph.Shareds(theEnt);
   for (anIter.Start(); anIter.More(); anIter.Next()) {
-    Handle(Standard_Transient) anAtr = anIter.Value();
+    const Handle(Standard_Transient)& anAtr = anIter.Value();
     NCollection_Sequence<Handle(StepRepr_ShapeAspect)> aSAs;
     if (anAtr->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionShape)))
     {
@@ -2965,14 +2967,14 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra
       Interface_EntityIterator anIterSDR = aGraph.Sharings(anAtr);
       for (anIterSDR.Start(); anIterSDR.More(); anIterSDR.Next())
       {
-        Handle(Standard_Transient) anAtrSDR = anIterSDR.Value();
+        const Handle(Standard_Transient)& anAtrSDR = anIterSDR.Value();
         if (anAtrSDR->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation)))
         {
           isAllOver = Standard_True;
           Interface_EntityIterator anIterABSR = aGraph.Shareds(anAtrSDR);
           for (anIterABSR.Start(); anIterABSR.More(); anIterABSR.Next())
           {
-            Handle(Standard_Transient) anAtrABSR = anIterABSR.Value();
+            const Handle(Standard_Transient)& anAtrABSR = anIterABSR.Value();
             if (anAtrABSR->IsKind(STANDARD_TYPE(StepShape_AdvancedBrepShapeRepresentation)))
             {
               aSeqRI1.Append(anAtrABSR);
@@ -4332,7 +4334,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_Wor
         if (PDR.IsNull()) continue;
         Handle(StepRepr_Representation) Repr = PDR->UsedRepresentation();
         if (Repr.IsNull()) continue;
-        Standard_Integer ir;
+        Standard_Integer ir = 0;
         for (ir = 1; ir <= Repr->NbItems(); ir++) {
           Handle(StepRepr_RepresentationItem) RI = Repr->ItemsValue(ir);
           if (RI.IsNull()) continue;
@@ -4416,7 +4418,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_Wor
 
 void collectViewShapes(const Handle(XSControl_WorkSession)& theWS,
   const Handle(TDocStd_Document)& theDoc,
-  const Handle(StepRepr_Representation) theRepr,
+  const Handle(StepRepr_Representation)& theRepr,
   TDF_LabelSequence& theShapes)
 {
   Handle(XSControl_TransferReader) aTR = theWS->TransferReader();
@@ -4451,7 +4453,7 @@ void collectViewShapes(const Handle(XSControl_WorkSession)& theWS,
 //=======================================================================
 Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_GeometricRepresentationItem)& theClippingCameraModel,
   TDF_LabelSequence& theClippingPlanes,
-  const Handle(XCAFDoc_ClippingPlaneTool) theTool)
+  const Handle(XCAFDoc_ClippingPlaneTool)& theTool)
 {
   Handle(TCollection_HAsciiString) anExpression = new TCollection_HAsciiString();
   NCollection_Sequence<Handle(StepGeom_GeometricRepresentationItem)> aPlanes;
@@ -4788,7 +4790,7 @@ void STEPCAFControl_Reader::ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& Sha
     // topological containers to expand
     for (Standard_Integer i = 1; i <= aReprItems.Length(); ++i)
     {
-      Handle(StepRepr_RepresentationItem) aTRepr = aReprItems.Value(i);
+      const Handle(StepRepr_RepresentationItem)& aTRepr = aReprItems.Value(i);
       if (aTRepr->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep)))
         aMSBSeq.Append(aTRepr);
       else if (aTRepr->IsKind(STANDARD_TYPE(StepShape_ShellBasedSurfaceModel)))
index b9c9a2bee7c0ea1e8c578526e077a7b496bfe286..9dd9b59ab5812f7a393aa816f80253af9856075f 100644 (file)
@@ -20,6 +20,8 @@
 // (analysis of SDRs which the CDSR links should be done)
 // Names and validation props are supported for top-level shapes only
 
+#include <math.h>
+
 #include <STEPCAFControl_Writer.hxx>
 
 #include <BRep_Builder.hxx>
@@ -318,7 +320,7 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::Write(const Standard_CString theFil
   for (NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)>::Iterator anExtFileIter(myFiles);
        anExtFileIter.More(); anExtFileIter.Next())
   {
-    Handle(STEPCAFControl_ExternFile) anExtFile = anExtFileIter.Value();
+    const Handle(STEPCAFControl_ExternFile)& anExtFile = anExtFileIter.Value();
     if (anExtFile->GetWriteStatus() != IFSelect_RetVoid)
     {
       continue;
@@ -1040,7 +1042,7 @@ static Standard_Boolean setDefaultInstanceColor(const Handle(StepVisual_StyledIt
            aFatherStyleIter.More(); aFatherStyleIter.Next())
       {
         StepVisual_PresentationStyleSelect aPSS;
-        StepVisual_PresentationStyleSelect anOlDPSS = aFatherStyleIter.Value();
+        const StepVisual_PresentationStyleSelect& anOlDPSS = aFatherStyleIter.Value();
         if (!anOlDPSS.PointStyle().IsNull())
           aPSS.SetValue(anOlDPSS.PointStyle());
         else if (!anOlDPSS.CurveStyle().IsNull())
@@ -1090,7 +1092,7 @@ static void MakeSTEPStyles(STEPConstruct_Styles& theStyles,
   if (theInherit) aStyle = *theInherit;
   if (theSettings.Contains(theShape))
   {
-    XCAFPrs_Style anOwnStyle = theSettings.FindFromKey(theShape);
+    const XCAFPrs_Style& anOwnStyle = theSettings.FindFromKey(theShape);
     if (!anOwnStyle.IsVisible())
       aStyle.SetVisibility(Standard_False);
     if (anOwnStyle.IsSetColorCurv())
@@ -2315,7 +2317,7 @@ static StepBasic_Unit GetUnit(const Handle(StepRepr_RepresentationContext)& theR
 //purpose  : auxiliary
 //======================================================================
 static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard_Real theValue,
-                                                                  const StepBasic_Unit theUnit,
+                                                                  const StepBasic_Unit& theUnit,
                                                                   const Handle(TCollection_HAsciiString)& theName,
                                                                   const Standard_CString theMeasureName,
                                                                   const Standard_Boolean theIsAngle,
@@ -2375,7 +2377,7 @@ static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard
 //=======================================================================
 Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::writeShapeAspect(const Handle(XSControl_WorkSession)& theWS,
                                                                      const TDF_Label theLabel,
-                                                                     const TopoDS_Shape theShape,
+                                                                     const TopoDS_Shape& theShape,
                                                                      Handle(StepRepr_RepresentationContext)& theRC,
                                                                      Handle(StepAP242_GeometricItemSpecificUsage)& theGISU)
 {
@@ -2432,7 +2434,7 @@ Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::writeShapeAspect(const Handl
   for (Interface_EntityIterator aSharingIter = aGraph.Sharings(aPDS);
        aSharingIter.More() && aSDR.IsNull(); aSharingIter.Next())
   {
-    Handle(Standard_Transient) anEntity = aSharingIter.Value();
+    const Handle(Standard_Transient)& anEntity = aSharingIter.Value();
     aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(anEntity);
   }
   if (aSDR.IsNull())
@@ -2457,7 +2459,7 @@ void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession
                                               const Standard_Boolean theHasPlane,
                                               const gp_Ax2& theAnnotationPlane,
                                               const gp_Pnt& theTextPosition,
-                                              const Handle(Standard_Transient) theDimension)
+                                              const Handle(Standard_Transient)& theDimension)
 {
   if (thePresentation.IsNull())
     return;
@@ -2509,7 +2511,7 @@ void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession
   // Plane
   Handle(StepGeom_Plane) aPlane = new StepGeom_Plane();
   GeomToStep_MakeAxis2Placement3d anAxisMaker(theAnnotationPlane);
-  Handle(StepGeom_Axis2Placement3d) anAxis = anAxisMaker.Value();
+  const Handle(StepGeom_Axis2Placement3d)& anAxis = anAxisMaker.Value();
   // Set text position to plane origin
   Handle(StepGeom_CartesianPoint) aTextPos = new StepGeom_CartesianPoint();
   Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3);
@@ -2540,7 +2542,7 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC
                                                                 const TDF_LabelSequence& theShapeL,
                                                                 const TDF_Label& theDatumL,
                                                                 const Standard_Boolean theIsFirstDTarget,
-                                                                const Handle(StepDimTol_Datum) theWrittenDatum)
+                                                                const Handle(StepDimTol_Datum)& theWrittenDatum)
 {
   // Get working data
   const Handle(Interface_InterfaceModel)& aModel = theWS->Model();
@@ -2799,20 +2801,20 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC
 //           qualifiers, modifiers, orientation and tolerance class)
 //======================================================================
 static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS,
-                           const Handle(XCAFDimTolObjects_DimensionObject) theObject,
-                           const Handle(StepRepr_RepresentationContext) theRC,
-                           const StepShape_DimensionalCharacteristic theDimension)
+                           const Handle(XCAFDimTolObjects_DimensionObject)& theObject,
+                           const Handle(StepRepr_RepresentationContext)& theRC,
+                           const StepShape_DimensionalCharacteristic& theDimension)
 {
   // Get working data
   const Handle(Interface_InterfaceModel)& aModel = theWS->Model();
   XCAFDimTolObjects_DimensionModifiersSequence aModifiers = theObject->GetModifiers();
-  Handle(Standard_Transient) aDim = theDimension.Value();
+  const Handle(Standard_Transient)& aDim = theDimension.Value();
   Standard_Boolean isAngle = aDim->IsKind(STANDARD_TYPE(StepShape_AngularLocation)) ||
     aDim->IsKind(STANDARD_TYPE(StepShape_AngularSize));
 
   // Unit
   StepBasic_Unit aUnit = GetUnit(theRC, isAngle);
-  Standard_CString aMeasureName;
+  Standard_CString aMeasureName = nullptr;
   if (isAngle)
     aMeasureName = "POSITIVE_PLANE_ANGLE_MEASURE";
   else
@@ -2832,7 +2834,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS,
 
   // Nominal value
   Standard_Real aNominal = theObject->GetValue();
-  Standard_Integer aLeftNbDigits, aRightNbDigits;
+  Standard_Integer aLeftNbDigits = 0, aRightNbDigits = 0;
   theObject->GetNbOfDecimalPlaces(aLeftNbDigits, aRightNbDigits);
   Standard_Integer aNbQualifiers = 0;
   if (theObject->HasQualifier() && !isAngle)
@@ -2929,7 +2931,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS,
     gp_Dir aDir;
     theObject->GetDirection(aDir);
     GeomToStep_MakeCartesianPoint MkPoint(gp_Pnt(0, 0, 0));
-    Handle(StepGeom_CartesianPoint) aLoc = MkPoint.Value();
+    const Handle(StepGeom_CartesianPoint)& aLoc = MkPoint.Value();
     Handle(StepGeom_Direction) anAxis = new StepGeom_Direction();
     Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3);
     aCoords->SetValue(1, aDir.X());
@@ -3001,7 +3003,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS,
   // Tolerance class
   if (theObject->IsDimWithClassOfTolerance())
   {
-    Standard_Boolean isHole;
+    Standard_Boolean isHole = 0;
     XCAFDimTolObjects_DimensionFormVariance aFormVariance;
     XCAFDimTolObjects_DimensionGrade aGrade;
     if (!theObject->GetClassOfTolerance(isHole, aFormVariance, aGrade))
@@ -3022,7 +3024,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS,
 //======================================================================
 static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS,
                                  const Handle(XCAFDimTolObjects_DimensionObject)& theObject,
-                                 const Handle(StepRepr_ConstructiveGeometryRepresentation) theRepr,
+                                 const Handle(StepRepr_ConstructiveGeometryRepresentation)& theRepr,
                                  Handle(StepRepr_ShapeAspect)& theFirstSA,
                                  Handle(StepRepr_ShapeAspect)& theSecondSA,
                                  NCollection_Vector<Handle(StepGeom_CartesianPoint)>& thePnts)
@@ -3078,8 +3080,8 @@ static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS,
 //======================================================================
 static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const Handle(XSControl_WorkSession)& theWS,
                                                                            const TDF_Label theGeomTolL,
-                                                                           const TDF_LabelSequence theDatumSeq,
-                                                                           const STEPConstruct_DataMapOfAsciiStringTransient theDatumMap,
+                                                                           const TDF_LabelSequence& theDatumSeq,
+                                                                           const STEPConstruct_DataMapOfAsciiStringTransient& theDatumMap,
                                                                            const Handle(StepRepr_RepresentationContext)& theRC)
 {
   // Get working data
@@ -4321,7 +4323,7 @@ Standard_Boolean STEPCAFControl_Writer::writeMaterials(const Handle(XSControl_Wo
     TDF_Label aMatL = aNode->Father()->Label();
     Handle(TCollection_HAsciiString) aName;
     Handle(TCollection_HAsciiString) aDescription;
-    Standard_Real aDensity;
+    Standard_Real aDensity = NAN;
     Handle(TCollection_HAsciiString) aDensName;
     Handle(TCollection_HAsciiString) aDensValType;
     Handle(StepRepr_Representation) aRepDRI;
index 0a6438de7a5172d6b51e21075e7e059a259a5440..f35dafd28bb5237abe431139dc545431da742546 100644 (file)
@@ -237,7 +237,7 @@ protected:
 
   Handle(StepRepr_ShapeAspect) writeShapeAspect(const Handle(XSControl_WorkSession)& theWS,
                                                 const TDF_Label theLabel,
-                                                const TopoDS_Shape theShape,
+                                                const TopoDS_Shape& theShape,
                                                 Handle(StepRepr_RepresentationContext)& theRC,
                                                 Handle(StepAP242_GeometricItemSpecificUsage)& theGISU);
 
@@ -248,13 +248,13 @@ protected:
                          const Standard_Boolean theHasPlane,
                          const gp_Ax2& theAnnotationPlane,
                          const gp_Pnt& theTextPosition,
-                         const Handle(Standard_Transient) theDimension);
+                         const Handle(Standard_Transient)& theDimension);
 
   Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS,
                                            const TDF_LabelSequence& theShapeL,
                                            const TDF_Label& theDatumL,
                                            const Standard_Boolean isFirstDTarget,
-                                           const Handle(StepDimTol_Datum) theWrittenDatum);
+                                           const Handle(StepDimTol_Datum)& theWrittenDatum);
 
   void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS,
                           const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject,
index 47f470b90a69005e8c25d5b7a45761a7fa053a74..130fe0890a72fa081737d9ff1cf78d9100a18965 100644 (file)
@@ -196,7 +196,7 @@ Handle(StepBasic_PersonAndOrganization) STEPConstruct_AP203Context::DefaultPerso
     Handle(TCollection_HAsciiString) lname = new TCollection_HAsciiString ("");
     Handle(Interface_HArray1OfHAsciiString) mname;
     TColStd_SequenceOfAsciiString names;
-    Standard_Integer i; // svv Jan11 2000 : porting on DEC
+    Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
     for ( i=1; ; i++ ) {
       TCollection_AsciiString token = user.Token ( " \t", i );
       if ( ! token.Length() ) break;
index b6e180155ecd8fa032445a146eceffc58e42edde..3fe626dabca9ee186e3a2a50b31b07bbd8cece57 100644 (file)
@@ -195,7 +195,7 @@ Standard_Boolean STEPConstruct_Assembly::CheckSRRReversesNAUO(const Interface_Gr
   Handle(Standard_Type) tSDR = STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation);
   Interface_EntityIterator anIter = theGraph.Sharings(rep1);
   for (; anIter.More() && pd1.IsNull(); anIter.Next()) {
-      Handle(Standard_Transient) enti = anIter.Value();
+      const Handle(Standard_Transient)& enti = anIter.Value();
     if (enti->DynamicType() == tSDR) {
       Handle(StepShape_ShapeDefinitionRepresentation) SDR =
         Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(enti);
@@ -206,7 +206,7 @@ Standard_Boolean STEPConstruct_Assembly::CheckSRRReversesNAUO(const Interface_Gr
   
   anIter = theGraph.Sharings(rep2);
   for (; anIter.More() && pd2.IsNull(); anIter.Next()) {
-      Handle(Standard_Transient) enti = anIter.Value();
+      const Handle(Standard_Transient)& enti = anIter.Value();
     if (enti->DynamicType() == tSDR) {
       Handle(StepShape_ShapeDefinitionRepresentation) SDR =
         Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(enti);
index 873e91cf956251907e6fec650b165443b42ff0e4..142940f8844663bad128f38a0700dd983f8caa1d 100644 (file)
@@ -70,7 +70,7 @@ void STEPConstruct_ContextTool::SetModel (const Handle(StepData_StepModel)& aSte
 {
   theAPD.Nullify();  //thePRPC.Nullify();
 
-  Standard_Integer i, nb = aStepModel->NbEntities();
+  Standard_Integer i = 0, nb = aStepModel->NbEntities();
   for(i = 1; i<=nb && theAPD.IsNull(); i ++) {
     Handle(Standard_Transient) ent = aStepModel->Value(i);
     if (ent->IsKind(STANDARD_TYPE(StepBasic_ApplicationProtocolDefinition))) {
index c8624171d49d350197198d5efd0b9651e84a3d6d..4629cd4b0d00055df061a5550d1eed184460571f 100644 (file)
@@ -229,7 +229,7 @@ Standard_Boolean STEPConstruct_ExternRefs::LoadExternRefs ()
       // for each DocumentFile, find associated with it data:
       Interface_EntityIterator subs = Graph().Sharings(DocFile);
       for (subs.Start(); subs.More(); subs.Next()) {
-        Handle(Standard_Transient) sub = subs.Value();
+        const Handle(Standard_Transient)& sub = subs.Value();
         
         // FORMAT - ???????
         //
@@ -343,7 +343,7 @@ Standard_CString STEPConstruct_ExternRefs::FileName (const Standard_Integer num)
       Handle(StepBasic_ProductDefinitionWithAssociatedDocuments)::DownCast(myShapes(num));
     if ( aPDWAD.IsNull() || aPDWAD->DocIds().IsNull() )
       return "";
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for ( i=1; i <= aPDWAD->NbDocIds(); i++ ) {
       Handle(StepBasic_Document) Doc = aPDWAD->DocIdsValue(i);
       Handle(TCollection_HAsciiString) aFilename = Doc->Name();
@@ -659,7 +659,7 @@ Standard_Integer STEPConstruct_ExternRefs::AddExternRef (const Standard_CString
 //      Handle(Standard_Transient) sub = subs.Value();
     Interface_EntityIterator subs = Graph().Sharings(PD);
     for (subs.Start(); subs.More(); subs.Next()) {
-      Handle(Standard_Transient) sub = subs.Value();
+      const Handle(Standard_Transient)& sub = subs.Value();
       if (!sub->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionShape))) continue;
       Handle(StepRepr_ProductDefinitionShape) ProdDefSh = 
         Handle(StepRepr_ProductDefinitionShape)::DownCast ( sub );
@@ -682,7 +682,7 @@ Standard_Integer STEPConstruct_ExternRefs::AddExternRef (const Standard_CString
 //        Interface_EntityIterator subs2 = Graph().Sharings(ProdDef);
     Interface_EntityIterator subs2 = Graph().Sharings(PD);
     for (subs2.Start(); subs2.More(); subs2.Next()) {
-      Handle(Standard_Transient) sub2 = subs2.Value();
+      const Handle(Standard_Transient)& sub2 = subs2.Value();
 
       if (sub2->IsKind(STANDARD_TYPE(StepRepr_NextAssemblyUsageOccurrence))) {
         Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO = 
index 73156f80575149a568134d33b4e70d478a5880d9..5323812ad966a2ea2400387d4969104712da0109 100644 (file)
@@ -44,9 +44,9 @@
 //function : STEPConstruct_Part
 //purpose  : 
 //=======================================================================
-STEPConstruct_Part::STEPConstruct_Part() 
+STEPConstruct_Part::STEPConstruct_Part() : myDone(Standard_False) 
 {
-  myDone = Standard_False;
+  
 }
 
 //=======================================================================
index 665e80292ae9e3bc7915c48c50031ca75c331e91..3225d0c4ec001195090c2f8f9d2318f7adb9e307 100644 (file)
@@ -17,6 +17,8 @@
 //abv 17.11.99: renamed from StepPDR_MakeUnitAndToleranceContext and merged with STEPControl_Unit
 //abv 30.02.00: ability to write file in units other than MM
 
+#include <math.h>
+
 #include <Interface_Static.hxx>
 #include <StepBasic_ConversionBasedUnitAndAreaUnit.hxx>
 #include <StepBasic_ConversionBasedUnitAndLengthUnit.hxx>
@@ -49,13 +51,13 @@ STEPConstruct_UnitContext::STEPConstruct_UnitContext()
   lengthFactor(0.0),
   planeAngleFactor(0.0),
   solidAngleFactor(0.0),
-  areaFactor(0.0),
+  theUncertainty(RealLast()), areaFactor(0.0),
   volumeFactor(0.0)
 {
   lengthDone = planeAngleDone = solidAngleDone = hasUncertainty = 
     areaDone = volumeDone = Standard_False;
   //pdn file r_47-sd.stp initialize field.
-  theUncertainty = RealLast();
+  
 }
 
 //=======================================================================
@@ -408,7 +410,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi
   }  // end of SolidAngleUnit 
   else if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndAreaUnit)) ||
           aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndAreaUnit))) {
-    Standard_Real af;
+    Standard_Real af = NAN;
 #ifdef METER   
     af = parameter;
 #else
@@ -419,7 +421,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi
   }
   else if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndVolumeUnit)) ||
           aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndVolumeUnit))) {
-    Standard_Real af;
+    Standard_Real af = NAN;
 #ifdef METER   
     af = parameter;
 #else
index 2abe2e3a73a4d7e5edad453f5add314657cc3b13..752e358014717b1c353ed3bdd4e485627962fbcf 100644 (file)
@@ -236,7 +236,7 @@ Standard_Boolean  STEPControl_ActorRead::Recognize
 
   DeclareAndCast(StepShape_ShapeRepresentation,sr,start);
   if (!sr.IsNull()) {
-    Standard_Integer i,nb = sr->NbItems();
+    Standard_Integer i = 0,nb = sr->NbItems();
     for (i = 1; i <= nb; i ++) {
       if (Recognize (sr->ItemsValue(i)) ) return Standard_True;
     }
@@ -589,7 +589,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
         TopoDS_Iterator it(Result1);
         for ( ; it.More(); it.Next() ) 
         {
-          TopoDS_Shape aSubShape = it.Value();
+          const TopoDS_Shape& aSubShape = it.Value();
           B.Add(Cund, aSubShape);
         }
       }
@@ -639,7 +639,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
           TopoDS_Iterator it(Result1);
           for ( ; it.More(); it.Next() ) 
           {
-            TopoDS_Shape aSubShape = it.Value();
+            const TopoDS_Shape& aSubShape = it.Value();
             B.Add(Cund, aSubShape);
           }
         }
@@ -657,7 +657,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
       Interface_EntityIterator subs1 = graph.Sharings(rep);
       Handle(Standard_Type) tSRR = STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship);
       for (subs1.Start(); subs1.More(); subs1.Next()) {
-        Handle(Standard_Transient) anitem = subs1.Value();
+        const Handle(Standard_Transient)& anitem = subs1.Value();
         if( !anitem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship)))
           continue;
         if (anitem->DynamicType() == tSRR)
@@ -761,7 +761,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
         {
           // NB: C cast is used instead of DownCast() to improve performance on some cases.
           // This saves ~10% of elapsed time on "testgrid perf de bug29* -parallel 0".
-          SRR = (StepRepr_ShapeRepresentationRelationship*)(aSubs3Val.get());
+          SRR = dynamic_cast<StepRepr_ShapeRepresentationRelationship*>(aSubs3Val.get());
         }
       }
     }
@@ -991,7 +991,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
       // Put not suspected open Shells as they are (updated 23.11.2010)
       TopExp_Explorer allShellsExp(comp, TopAbs_SHELL);
       for ( ; allShellsExp.More(); allShellsExp.Next() ) {
-        TopoDS_Shape aCurrentShell = allShellsExp.Current();
+        const TopoDS_Shape& aCurrentShell = allShellsExp.Current();
         if ( !myNMTool.IsPureNMShell(aCurrentShell) && !shellClosingsMap.Contains(aCurrentShell) )
           brepBuilder.Add(compWithClosings, aCurrentShell);
       }
@@ -1005,7 +1005,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
     TopExp_Explorer exp(comp, TopAbs_SHELL);
     for (; exp.More(); exp.Next())
     {
-        TopoDS_Shape aSubShape = exp.Current();
+        const TopoDS_Shape& aSubShape = exp.Current();
         if (aSubShape.ShapeType() == TopAbs_SHELL && aSubShape.Closed()) {
             TopoDS_Solid nextSolid;
             brepBuilder.MakeSolid(nextSolid);
@@ -1259,7 +1259,7 @@ static Standard_Boolean IsNeedRepresentation(const Handle(StepRepr_ShapeAspect)&
         if ( SRR.IsNull() ) continue;
         rep2 = ( sdrA->UsedRepresentation() == SRR->Rep1() ? SRR->Rep2() : SRR->Rep1() );
       }
-      Standard_Integer i, j; // svv Jan 11 2000 : porting on DEC
+      Standard_Integer i = 0, j = 0; // svv Jan 11 2000 : porting on DEC
       for ( i=1; i <= repA->NbItems(); i++ ) {
         Handle(StepRepr_RepresentationItem) it = repA->ItemsValue(i);
         for ( j=1; j <= rep2->NbItems(); j++ )
@@ -1348,7 +1348,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::OldWay
   for (subs.Start(); subs.More() && PS.More(); subs.Next())
   {
     Message_ProgressRange aRange = PS.Next();
-    Handle(Standard_Transient) anitem = subs.Value();
+    const Handle(Standard_Transient)& anitem = subs.Value();
     if ( anitem->DynamicType() != tCDSR && anitem->DynamicType() != tSRR ) continue;
 //      DeclareAndCast(StepShape_ContextDependentShapeRepresentation,anitem,subs.Value());
 //      if (anitem.IsNull()) continue;
@@ -1749,7 +1749,7 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)&
 {
   mySRContext = rep;
   
-  Standard_Integer stat1, stat2 = 0;  // sera alimente par STEPControl_Unit
+  Standard_Integer stat1 = 0, stat2 = 0;  // sera alimente par STEPControl_Unit
   if (rep.IsNull()) {
     ResetUnits();
     return;
@@ -2026,12 +2026,12 @@ void STEPControl_ActorRead::computeIDEASClosings(const TopoDS_Compound& comp,
   TopExp_Explorer shellExpA(comp, TopAbs_SHELL);
 
   for ( ; shellExpA.More(); shellExpA.Next() ) {
-    TopoDS_Shape shellA = shellExpA.Current();
+    const TopoDS_Shape& shellA = shellExpA.Current();
     TopExp_Explorer shellExpB(comp, TopAbs_SHELL);
     TopTools_ListOfShape closingShells;
 
     for ( ; shellExpB.More(); shellExpB.Next() ) {
-      TopoDS_Shape shellB = shellExpB.Current();
+      const TopoDS_Shape& shellB = shellExpB.Current();
       if ( shellA.IsSame(shellB) )
         continue;
       // Check whether ShellB is non-manifold and adjacent to ShellA.
index 3caee3694141075a008f9b10e623c45ad8b30df2..06944d9a3c48be0d17746ceabb62e840828845a4 100644 (file)
@@ -17,6 +17,8 @@
 // PTV    22.08.2002 OCC609 transfer solo vertices into step file.
 // PTV    16.09.2002 OCC725 transfer compound of vertices into one geometrical curve set.
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRep_TEdge.hxx>
@@ -228,7 +230,7 @@ static Standard_Boolean IsManifoldShape(const TopoDS_Shape& theShape) {
 
   TopoDS_Iterator anIt(theShape);
   for ( ; anIt.More(); anIt.Next() ) {
-    TopoDS_Shape aDirectChild = anIt.Value();
+    const TopoDS_Shape& aDirectChild = anIt.Value();
     if (aDirectChild.ShapeType() != TopAbs_COMPOUND)
       aBrepBuilder.Add(aDirectShapes, aDirectChild);
   }  
@@ -498,7 +500,7 @@ Standard_Boolean  STEPControl_ActorWrite::Recognize (const Handle(Transfer_Finde
     }
     for (TopExp_Explorer fedg(theShape,TopAbs_EDGE); fedg.More(); fedg.Next()) {
       const TopoDS_Edge& E = TopoDS::Edge (fedg.Current());
-      TopLoc_Location locbid;  Standard_Real first,last;
+      TopLoc_Location locbid;  Standard_Real first = NAN,last = NAN;
       Handle(Geom_Curve) curv = BRep_Tool::Curve (E,locbid,first,last);
       if (curv.IsNull() || !curv->IsKind(STANDARD_TYPE(Geom_Line)) ) return Standard_False;
     }
@@ -791,7 +793,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
 
     // Transfer Solids to closed Shells. Prepare RepItemSeq & NonManifoldGroup
     for ( TopoDS_Iterator iter(aNMCompound); iter.More(); iter.Next() ) {
-      TopoDS_Shape aSubShape = iter.Value();
+      const TopoDS_Shape& aSubShape = iter.Value();
       if (aSubShape.ShapeType() == TopAbs_SOLID) {
         for ( TopoDS_Iterator aSubIter(aSubShape); aSubIter.More(); aSubIter.Next() ) {
           TopoDS_Shell aSubShell = TopoDS::Shell( aSubIter.Value() );
@@ -1191,7 +1193,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
               aGCSet->SetName(empty);
               // iterates on compound with vertices and traces each vertex
               for ( anExp.ReInit() ; anExp.More(); anExp.Next() ) {
-                TopoDS_Shape aVertex = anExp.Current();
+                const TopoDS_Shape& aVertex = anExp.Current();
                 if ( aVertex.ShapeType() != TopAbs_VERTEX )
                   continue;
                 curNb++;
@@ -1276,7 +1278,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
       if (isManifold)
         shapeRep = new StepShape_ManifoldSurfaceShapeRepresentation;
       else {
-        Standard_Boolean isNewNMSSRCreated;
+        Standard_Boolean isNewNMSSRCreated = 0;
         shapeRep = this->getNMSSRForGroup(shapeGroup, FP, isNewNMSSRCreated);
         useExistingNMSSR = !isNewNMSSRCreated;
       }
@@ -1294,7 +1296,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
           if (isManifold)
             shapeRep = new StepShape_ManifoldSurfaceShapeRepresentation;
           else {
-            Standard_Boolean isNewNMSSRCreated;
+            Standard_Boolean isNewNMSSRCreated = 0;
             shapeRep = this->getNMSSRForGroup(shapeGroup, FP, isNewNMSSRCreated);
             useExistingNMSSR = !isNewNMSSRCreated;
           }
@@ -1459,7 +1461,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound
 
   // Inspect non-manifold topology case (ssv; 10.11.2010)
   Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
-  Standard_Boolean isManifold;
+  Standard_Boolean isManifold = 0;
   if (isNMMode)
     isManifold = IsManifoldShape(theShape);
   else
@@ -1483,7 +1485,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound
   #endif
 
   for (TopoDS_Iterator iter(theShape); iter.More(); iter.Next()) {
-    TopoDS_Shape aSubShape = iter.Value();
+    const TopoDS_Shape& aSubShape = iter.Value();
     if (aSubShape.ShapeType() != TopAbs_VERTEX || !isSeparateVertices) {
 
       // Store non-manifold topology as shells (ssv; 10.11.2010)
@@ -1526,7 +1528,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound
   binder->AddResult ( TransientResult(shapeRep) );
 
   // translate components
-  Standard_Integer i, nbs = RepItemSeq->Length();
+  Standard_Integer i = 0, nbs = RepItemSeq->Length();
   Handle(TColStd_HSequenceOfTransient) ItemSeq = new TColStd_HSequenceOfTransient();
   ItemSeq->Append (myContext.GetDefaultAxis());
   myContext.NextLevel();
@@ -1597,7 +1599,7 @@ Handle(Transfer_Binder)  STEPControl_ActorWrite::TransferSubShape
   gp_Trsf aLoc;
   Standard_Boolean isShapeLocated = Standard_False;
   if ( GroupMode() >0) {
-    TopLoc_Location shloc = shape.Location();
+    const TopLoc_Location& shloc = shape.Location();
     isShapeLocated = !shloc.IsIdentity();
     aLoc = shloc.Transformation();
     TopLoc_Location shident;
@@ -1643,7 +1645,7 @@ Handle(Transfer_Binder)  STEPControl_ActorWrite::TransferSubShape
 
   // make location for assembly placement
   GeomToStep_MakeAxis2Placement3d mkax (aLoc);
-  Handle(StepGeom_Axis2Placement3d) AxLoc = mkax.Value();
+  const Handle(StepGeom_Axis2Placement3d)& AxLoc = mkax.Value();
   AX1 = AxLoc;
 
   // create assembly structures (CDSR, NAUO etc.)
index 6bb365da7dfe65541fd7bcccfdccbdf0a7bae86b..0af6206d48cce6a3dbd05b8a2f85b83315721f5e 100644 (file)
@@ -25,8 +25,8 @@ STEPSelections_AssemblyComponent::STEPSelections_AssemblyComponent()
 }
 
 STEPSelections_AssemblyComponent::STEPSelections_AssemblyComponent(const Handle(StepShape_ShapeDefinitionRepresentation)& sdr,
-                                                                const Handle(STEPSelections_HSequenceOfAssemblyLink)& list)
+                                                                const Handle(STEPSelections_HSequenceOfAssemblyLink)& list) : mySDR(sdr), myList(list)
 {
-  mySDR = sdr;
-  myList = list;
+  
+  
 }
index 7f0820854aef300ee3d840a5c812365bdf74c7eb..32aeca7124330204df485ccdaa685da7e27f9dc3 100644 (file)
@@ -28,9 +28,9 @@ STEPSelections_AssemblyLink::STEPSelections_AssemblyLink()
 
 STEPSelections_AssemblyLink::STEPSelections_AssemblyLink(const Handle(StepRepr_NextAssemblyUsageOccurrence)& nauo,
                                                       const Handle(Standard_Transient)& item,
-                                                      const Handle(STEPSelections_AssemblyComponent)& part)
+                                                      const Handle(STEPSelections_AssemblyComponent)& part) : myNAUO(nauo), myItem(item), myComponent(part)
 {
-  myNAUO = nauo;
-  myItem = item;
-  myComponent = part;
+  
+  
+  
 }
index 9fe036fb754299b7be374744c484a45e576d7204..7a3628e33a70dffb4c7b0d21991fa3fe9198757a 100644 (file)
 #include <StepShape_ShapeRepresentation.hxx>
 #include <StepShape_ShellBasedSurfaceModel.hxx>
 
-STEPSelections_Counter::STEPSelections_Counter()
+STEPSelections_Counter::STEPSelections_Counter() : myNbFaces(0), myNbShells(0), myNbSolids(0), myNbEdges(0), myNbWires(0)
 {
-  myNbFaces = 0;
-  myNbShells = 0;
-  myNbSolids = 0;
-  myNbWires = 0;
-  myNbEdges =0;
+  
+  
+  
+  
+  
 }
 
 void STEPSelections_Counter::Count(const Interface_Graph& graph,
@@ -137,7 +137,7 @@ void STEPSelections_Counter::Count(const Interface_Graph& graph,
     Standard_Integer nbElem = gs->NbElements();
     for (Standard_Integer i = 1; i <= nbElem ; i++) {
       StepShape_GeometricSetSelect aGSS = gs->ElementsValue(i);
-      Handle(Standard_Transient) ent = aGSS.Value();
+      const Handle(Standard_Transient)& ent = aGSS.Value();
       Handle(StepGeom_CompositeCurve) ccurve = Handle(StepGeom_CompositeCurve)::DownCast(ent);
       if(!ccurve.IsNull()) {
        myNbWires++;
index 6a39a1f97432d14ff11f7446dcad4e91caa3ac94..d52a02f68db86a4fb84acdc78502b3f9fae7cf5f 100644 (file)
@@ -51,7 +51,7 @@ Standard_Boolean STEPSelections_SelectDerived::Matches(const Handle(Standard_Tra
                                                      const TCollection_AsciiString& text,
                                                      const Standard_Boolean /*exact*/) const
 {
-  Standard_Integer CN;
+  Standard_Integer CN = 0;
   Handle(StepData_ReadWriteModule) module;
   Standard_Boolean ok = thelib.Select (ent,module,CN);
   if(!ok) return Standard_False;
index 82fce79bc1da431ee1fcb2b2500290cbdf82b8eb..66daf10ea64540a423c56e07c543ffd1046b0fd0 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Select3D_SensitiveBox.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveBox,Select3D_SensitiveEntity)
@@ -26,8 +28,8 @@ Select3D_SensitiveBox::Select3D_SensitiveBox (const Handle(SelectMgr_EntityOwner
                                               const Bnd_Box& theBox)
 : Select3D_SensitiveEntity (theOwnerId)
 {
-  Standard_Real aXMax, aYMax, aZMax;
-  Standard_Real aXMin, aYMin, aZMin;
+  Standard_Real aXMax = NAN, aYMax = NAN, aZMax = NAN;
+  Standard_Real aXMin = NAN, aYMin = NAN, aZMin = NAN;
   theBox.Get (aXMin, aYMin, aZMin, aXMax, aYMax, aZMax);
   myBox = Select3D_BndBox3d (SelectMgr_Vec3 (aXMin, aYMin, aZMin),
                              SelectMgr_Vec3 (aXMax, aYMax, aZMax));
index 1e24dd8ba77fbcfb52af1148f341507da9cfdbc7..65eb99ca329b0d44452e419e3ef35c23e2734ef2 100644 (file)
@@ -27,12 +27,12 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveCircle, Select3D_SensitiveEntity)
 Select3D_SensitiveCircle::Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                     const gp_Circ& theCircle,
                                                     const Standard_Boolean theIsFilled)
-: Select3D_SensitiveEntity (theOwnerId)
+: Select3D_SensitiveEntity (theOwnerId), mySensType(theIsFilled ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY), myRadius(theCircle.Radius())
 {
-  myRadius = theCircle.Radius();
+  
   myTrsf.SetTransformation (theCircle.Position(), gp::XOY());
 
-  mySensType = theIsFilled ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY;
+  
   if (mySensType == Select3D_TOS_BOUNDARY)
   {
     SetSensitivityFactor (6);
index b7fc5c9c1ffcf63b71272591d5cfa84ae1abfbce..be7d43678141be76dfe6af4de4ca7fb83d0806bf 100644 (file)
@@ -24,10 +24,10 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitivePoint,Select3D_SensitiveEntity)
 //==================================================
 Select3D_SensitivePoint::Select3D_SensitivePoint (const Handle(SelectMgr_EntityOwner)& theOwner,
                                                   const gp_Pnt& thePoint)
-: Select3D_SensitiveEntity (theOwner)
+: Select3D_SensitiveEntity (theOwner), myPoint(thePoint)
 {
   SetSensitivityFactor (12);
-  myPoint = thePoint;
+  
 }
 
 //==================================================
index 162af349ff8e6b32453cd10b95be0f8e0f7e0b74..c3804660065288c10ffd7ee18b2b88a12af04305 100644 (file)
@@ -197,8 +197,14 @@ Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwn
                                                 const Standard_Integer theNbPnts)
 : Select3D_SensitivePoly (theOwnerId, !theIsFilled, GetCircleNbPoints (theCircle, theNbPnts, theU1, theU2, theIsFilled))
 {
-  mySensType = theIsFilled ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY;
-
+  if (theIsFilled)
+  {
+    mySensType = Select3D_TOS_INTERIOR;
+  }
+  else
+  {
+    mySensType = Select3D_TOS_BOUNDARY;
+  }
   if (myPolyg.Size() != 1)
   {
     initCircle (myPolyg, theCircle, Min (theU1, theU2), Max (theU1, theU2), theIsFilled, theNbPnts);
index 84e3a6edcef773411c7c25c05bf52338ae2812cf..a8ef04906cba673059d036619ebec10a61839a4d 100644 (file)
@@ -28,11 +28,11 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveSegment,Select3D_SensitiveEntity)
 Select3D_SensitiveSegment::Select3D_SensitiveSegment (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                       const gp_Pnt& theFirstPnt,
                                                       const gp_Pnt& theLastPnt)
-: Select3D_SensitiveEntity (theOwnerId)
+: Select3D_SensitiveEntity (theOwnerId), myStart(theFirstPnt), myEnd(theLastPnt)
 {
   mySFactor = 3;
-  myStart = theFirstPnt;
-  myEnd = theLastPnt;
+  
+  
 }
 
 // =======================================================================
index a74516447b041946db281fa62311f78acc677b72..e8c3aacf925108671257a83786a2ee2f4ad78f2c 100644 (file)
@@ -59,10 +59,10 @@ Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation (const Handle(S
 : Select3D_SensitiveSet (theOwnerId),
   myTriangul (theTrg),
   myInitLocation (theInitLoc),
-  myPrimitivesNb (0)
+  mySensType(theIsInterior ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY), myPrimitivesNb (0)
 {
   myInvInitLocation = myInitLocation.Transformation().Inverted();
-  mySensType = theIsInterior ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY;
+  
   Standard_Integer aNbTriangles = 0;
   gp_XYZ aCenter (0.0, 0.0, 0.0);
   if (!theTrg->HasGeometry())
@@ -157,10 +157,10 @@ Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation (const Handle(S
   myInitLocation (theInitLoc),
   myCDG3D (theCOG),
   myFreeEdges (theFreeEdges),
-  myPrimitivesNb (0)
+  mySensType(theIsInterior ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY), myPrimitivesNb (0)
 {
   myInvInitLocation = myInitLocation.Transformation().Inverted();
-  mySensType = theIsInterior ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY;
+  
   if (theTrg->HasGeometry())
   {
     myPrimitivesNb = theIsInterior ? theTrg->NbTriangles() : theFreeEdges->Length() / 2;
@@ -205,7 +205,7 @@ Select3D_BndBox3d Select3D_SensitiveTriangulation::Box (const Standard_Integer t
 
   if (mySensType == Select3D_TOS_INTERIOR)
   {
-    Standard_Integer aNode1, aNode2, aNode3;
+    Standard_Integer aNode1 = 0, aNode2 = 0, aNode3 = 0;
     myTriangul->Triangle (aPrimIdx + 1).Get (aNode1, aNode2, aNode3);
 
     const gp_Pnt aPnt1 = myTriangul->Node (aNode1);
@@ -360,7 +360,7 @@ Standard_Boolean Select3D_SensitiveTriangulation::overlapsElement (SelectBasics_
   }
   else
   {
-    Standard_Integer aNode1, aNode2, aNode3;
+    Standard_Integer aNode1 = 0, aNode2 = 0, aNode3 = 0;
     myTriangul->Triangle (aPrimitiveIdx + 1).Get (aNode1, aNode2, aNode3);
     const gp_Pnt aPnt1 = myTriangul->Node (aNode1);
     const gp_Pnt aPnt2 = myTriangul->Node (aNode2);
@@ -396,7 +396,7 @@ Standard_Boolean Select3D_SensitiveTriangulation::elementIsInside (SelectBasics_
   }
   else
   {
-    Standard_Integer aNode1, aNode2, aNode3;
+    Standard_Integer aNode1 = 0, aNode2 = 0, aNode3 = 0;
     myTriangul->Triangle (aPrimitiveIdx + 1).Get (aNode1, aNode2, aNode3);
 
     const gp_Pnt aPnt1 = myTriangul->Node (aNode1);
index 44ff25b75231d91eae4e53f376a90ee3f74acbdb..9f4a19454e82d2cc47e3887abcadfeb6249b3efd 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <SelectMgr_AxisIntersector.hxx>
 
 #include <BVH_Tools.hxx>
@@ -230,7 +232,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox (const SelectMgr_Vec3& t
     "Error! SelectMgr_AxisIntersector::OverlapsBox() should be called after selection axis initialization");
 
   (void )theInside;
-  Standard_Real aTimeEnter, aTimeLeave;
+  Standard_Real aTimeEnter = NAN, aTimeLeave = NAN;
   if (!hasIntersection (theBoxMin, theBoxMax, aTimeEnter, aTimeLeave))
   {
     return Standard_False;
@@ -254,7 +256,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox (const SelectMgr_Vec3& t
   Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point,
     "Error! SelectMgr_AxisIntersector::OverlapsBox() should be called after selection axis initialization");
 
-  Standard_Real aTimeEnter, aTimeLeave;
+  Standard_Real aTimeEnter = NAN, aTimeLeave = NAN;
   if (!hasIntersection (theBoxMin, theBoxMax, aTimeEnter, aTimeLeave))
   {
     return Standard_False;
index f7cca23b144b033dd36a014436a629b479134f20..028d04be83a73787f70d825a72cad241ff9ff4da 100644 (file)
@@ -26,9 +26,9 @@ IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_BaseFrustum, SelectMgr_BaseIntersector)
 // purpose  :
 //=======================================================================
 SelectMgr_BaseFrustum::SelectMgr_BaseFrustum()
-: myPixelTolerance (2)
+: myPixelTolerance (2), myBuilder(new SelectMgr_FrustumBuilder())
 {
-  myBuilder = new SelectMgr_FrustumBuilder();
+  
 }
 
 //=======================================================================
index 0031c5f2756598ef82f52e123067468b503946bf..3d20100954a8e387a954069467a850b01567fdd4 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <SelectMgr_RectangularFrustum.hxx>
 
 #include <BVH_Tools.hxx>
@@ -50,7 +52,7 @@ void SelectMgr_RectangularFrustum::segmentSegmentDistance (const gp_Pnt& theSegP
   Standard_Real anE = aV.Dot (aW);
   Standard_Real aCoef = anA * aC - aB * aB;
   Standard_Real aSn = aCoef;
-  Standard_Real aTc, aTn, aTd = aCoef;
+  Standard_Real aTc = NAN, aTn = NAN, aTd = aCoef;
 
   if (aCoef < gp::Resolution())
   {
@@ -493,7 +495,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsBox (const SelectMgr_Vec3
   Standard_Real aDepth = 0.0;
   BVH_Ray<Standard_Real, 3> aRay(SelectMgr_Vec3(myNearPickedPnt.X(), myNearPickedPnt.Y(), myNearPickedPnt.Z()),
                                  SelectMgr_Vec3(myViewRayDir.X(), myViewRayDir.Y(), myViewRayDir.Z()));
-  Standard_Real aTimeEnter, aTimeLeave;
+  Standard_Real aTimeEnter = NAN, aTimeLeave = NAN;
   if (!BVH_Tools<Standard_Real, 3>::RayBoxIntersection (aRay, theBoxMin, theBoxMax, aTimeEnter, aTimeLeave))
   {
     gp_Pnt aNearestPnt (RealLast(), RealLast(), RealLast());
index 8739f8c289f025a4120a9894fb9d05ca06be562f..b3c49468be9093ddcb6b7fc708ee04d64c347434 100644 (file)
@@ -39,7 +39,7 @@ namespace
     BVHBuilderAdaptorRegular (ObjectsMap& theObjects) : myObjects (theObjects) {};
 
     //! Returns bounding box of object with index theIndex
-    virtual Select3D_BndBox3d Box (const Standard_Integer theIndex) const Standard_OVERRIDE
+    Select3D_BndBox3d Box (const Standard_Integer theIndex) const Standard_OVERRIDE
     {
       const Handle(SelectMgr_SelectableObject)& anObject = myObjects.FindKey (theIndex + 1);
       Bnd_Box aBox;
@@ -52,7 +52,7 @@ namespace
     }
 
     //! Returns bounding box of the whole subset.
-    virtual Select3D_BndBox3d Box() const Standard_OVERRIDE
+    Select3D_BndBox3d Box() const Standard_OVERRIDE
     {
       if (!myBox.IsValid())
       {
@@ -66,7 +66,7 @@ namespace
 
     //! Returns center of object with index theIndex in the set
     //! along the given axis theAxis
-    virtual Standard_Real Center (const Standard_Integer theIndex,
+    Standard_Real Center (const Standard_Integer theIndex,
                                   const Standard_Integer theAxis) const Standard_OVERRIDE
     {
       const Select3D_BndBox3d aBndBox = Box (theIndex);
@@ -76,19 +76,19 @@ namespace
     }
 
     //! Returns size of objects set.
-    virtual Standard_Integer Size() const Standard_OVERRIDE
+    Standard_Integer Size() const Standard_OVERRIDE
     {
       return myObjects.Size();
     }
 
     //! Swaps items with indexes theIndex1 and theIndex2 in the set
-    virtual void Swap (const Standard_Integer theIndex1, const Standard_Integer theIndex2) Standard_OVERRIDE
+    void Swap (const Standard_Integer theIndex1, const Standard_Integer theIndex2) Standard_OVERRIDE
     {
       myObjects.Swap (theIndex1 + 1, theIndex2 + 1);
     }
 
   private:
-    BVHBuilderAdaptorRegular& operator=(BVHBuilderAdaptorRegular) { return *this; }
+    BVHBuilderAdaptorRegular& operator=(const BVHBuilderAdaptorRegular&) { return *this; }
 
   private:
     ObjectsMap& myObjects;
@@ -178,13 +178,13 @@ namespace
     }
 
     //! Returns bounding box of object with index theIndex
-    virtual Select3D_BndBox3d Box (const Standard_Integer theIndex) const Standard_OVERRIDE
+    Select3D_BndBox3d Box (const Standard_Integer theIndex) const Standard_OVERRIDE
     {
       return *myBoundings (theIndex + 1);
     }
 
     //! Returns bounding box of the whole subset.
-    virtual Select3D_BndBox3d Box() const Standard_OVERRIDE
+    Select3D_BndBox3d Box() const Standard_OVERRIDE
     {
       if (!myBox.IsValid())
       {
@@ -198,7 +198,7 @@ namespace
 
     //! Returns center of object with index theIndex in the set
     //! along the given axis theAxis
-    virtual Standard_Real Center (const Standard_Integer theIndex,
+    Standard_Real Center (const Standard_Integer theIndex,
                                   const Standard_Integer theAxis) const Standard_OVERRIDE
     {
       const Select3D_BndBox3d& aBoundingBox = *myBoundings (theIndex + 1);
@@ -207,13 +207,13 @@ namespace
     }
 
     //! Returns size of objects set.
-    virtual Standard_Integer Size() const Standard_OVERRIDE
+    Standard_Integer Size() const Standard_OVERRIDE
     {
       return myObjects.Size();
     }
 
     //! Swaps items with indexes theIndex1 and theIndex2 in the set
-    virtual void Swap (const Standard_Integer theIndex1, const Standard_Integer theIndex2) Standard_OVERRIDE
+    void Swap (const Standard_Integer theIndex1, const Standard_Integer theIndex2) Standard_OVERRIDE
     {
       const Standard_Integer aStructIdx1 = theIndex1 + 1;
       const Standard_Integer aStructIdx2 = theIndex2 + 1;
@@ -223,7 +223,7 @@ namespace
     }
 
   private:
-    BVHBuilderAdaptorPersistent& operator=(BVHBuilderAdaptorPersistent) { return *this; }
+    BVHBuilderAdaptorPersistent& operator=(const BVHBuilderAdaptorPersistent&) { return *this; }
 
   private:
     ObjectsMap& myObjects;
index c8cb188fcf9a1fd03956499829e4a7ee2c776178..ccf117494549d11263d0d09407bcfbb6feb87683 100644 (file)
@@ -220,7 +220,7 @@ private:
   NCollection_IndexedMap<Handle(SelectMgr_SelectableObject)> myObjects[BVHSubsetNb]; //!< Map of objects for each subset
   opencascade::handle<BVH_Tree<Standard_Real, 3> >           myBVH[BVHSubsetNb];     //!< BVH tree computed for each subset
   Handle(Select3D_BVHBuilder3d)                              myBuilder[BVHSubsetNb]; //!< Builder allocated for each subset
-  Standard_Boolean                                           myIsDirty[BVHSubsetNb]; //!< Dirty flag for each subset
+  Standard_Boolean                                           myIsDirty[BVHSubsetNb]{}; //!< Dirty flag for each subset
   Graphic3d_WorldViewProjState                               myLastViewState;        //!< Last view-projection state used for construction of BVH
   Graphic3d_Vec2i                                            myLastWinSize;          //!< Last viewport's (window's) width used for construction of BVH
   friend class Iterator;
index df3159d98fddd4084d6528c433529ac87a6b8856..71298ce19eba424a2c0a7511001baf34beca5ff2 100644 (file)
@@ -98,7 +98,7 @@ const Handle(Graphic3d_Camera)& SelectMgr_SelectingVolumeManager::Camera() const
 // function : SetCamera
 // purpose  :
 //=======================================================================
-void SelectMgr_SelectingVolumeManager::SetCamera (const Handle(Graphic3d_Camera) theCamera)
+void SelectMgr_SelectingVolumeManager::SetCamera (const Handle(Graphic3d_Camera)& theCamera)
 {
   Standard_ASSERT_RAISE(!myActiveSelectingVolume.IsNull(),
     "SelectMgr_SelectingVolumeManager::SetCamera() should be called after initialization of selection volume ");
@@ -546,7 +546,7 @@ const gp_Pnt* SelectMgr_SelectingVolumeManager::GetVertices() const
     return NULL;
   }
   const SelectMgr_RectangularFrustum* aRectFrustum =
-    static_cast<const SelectMgr_RectangularFrustum*> (myActiveSelectingVolume.get());
+    dynamic_cast<const SelectMgr_RectangularFrustum*> (myActiveSelectingVolume.get());
   if (aRectFrustum == NULL)
   {
     return NULL;
index 708e7a885f234826e383add7cb96a4260d0123db..aed25cd94abbaf1cc390101e5f0bf49e007f0d2e 100644 (file)
@@ -89,7 +89,7 @@ public:
   //! Updates camera projection and orientation matrices in all selecting volumes
   //! Note: this method should be called after selection volume building
   //! else exception will be thrown
-  Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera) theCamera);
+  Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera)& theCamera);
 
   //! Updates viewport in all selecting volumes
   //! Note: this method should be called after selection volume building
index 5436525f6e01b23ac12c3c0bcfe92d6bacfcc6d2..b74738729088a7fcf4a1432c31d2aaff755466e2 100644 (file)
@@ -46,7 +46,7 @@ namespace
       }
     }
 
-    virtual void Fill (const Standard_Integer theCol,
+    void Fill (const Standard_Integer theCol,
                        const Standard_Integer theRow,
                        const Standard_Integer thePicked) Standard_OVERRIDE
     {
@@ -96,7 +96,7 @@ namespace
       }
     }
 
-    virtual void Fill (const Standard_Integer theCol,
+    void Fill (const Standard_Integer theCol,
                        const Standard_Integer theRow,
                        const Standard_Integer thePicked) Standard_OVERRIDE
     {
@@ -133,7 +133,7 @@ namespace
     }
 
     //! Accumulate the data.
-    virtual void Fill (const Standard_Integer theCol,
+    void Fill (const Standard_Integer theCol,
                        const Standard_Integer theRow,
                        const Standard_Integer thePicked) Standard_OVERRIDE
     {
@@ -156,7 +156,7 @@ namespace
     }
 
     //! Normalize the depth values.
-    virtual void Flush() Standard_OVERRIDE
+    void Flush() Standard_OVERRIDE
     {
       float aFrom  = 0.0f;
       float aDelta = 1.0f;
@@ -208,7 +208,7 @@ namespace
                              SelectMgr_ViewerSelector* theSelector)
     : SelectMgr_SelectionImageFiller (thePixMap, theSelector) {}
 
-    virtual void Fill (const Standard_Integer theCol,
+    void Fill (const Standard_Integer theCol,
                        const Standard_Integer theRow,
                        const Standard_Integer thePicked) Standard_OVERRIDE
     {
@@ -255,7 +255,7 @@ namespace
       }
     }
 
-    virtual void Fill (const Standard_Integer theCol,
+    void Fill (const Standard_Integer theCol,
                        const Standard_Integer theRow,
                        const Standard_Integer thePicked) Standard_OVERRIDE
     {
@@ -300,7 +300,7 @@ namespace
       myMapSelectionModeColors.Bind (0x0100, Quantity_NOC_GOLD);           // MeshVS_SMF_Group
     }
 
-    virtual void Fill (const Standard_Integer theCol,
+    void Fill (const Standard_Integer theCol,
                        const Standard_Integer theRow,
                        const Standard_Integer thePicked) Standard_OVERRIDE
     {
@@ -355,7 +355,7 @@ namespace
                                SelectMgr_ViewerSelector* theSelector)
     : SelectMgr_SelectionImageFiller (thePixMap, theSelector) {}
 
-    virtual void Fill (const Standard_Integer theCol,
+    void Fill (const Standard_Integer theCol,
                        const Standard_Integer theRow,
                        const Standard_Integer thePicked) Standard_OVERRIDE
     {
@@ -378,7 +378,7 @@ namespace
                          SelectMgr_ViewerSelector* theSelector)
     : SelectMgr_SelectionImageFiller (thePixMap, theSelector) {}
 
-    virtual void Fill (const Standard_Integer theCol,
+    void Fill (const Standard_Integer theCol,
                        const Standard_Integer theRow,
                        const Standard_Integer thePicked) Standard_OVERRIDE
     {
index 41cf73233336729c512e6872c38d65d9b871b820..fc24486a3f95ed2d036357699e4dc54c99f8e8f3 100644 (file)
@@ -91,7 +91,7 @@ private:
 
   SelectMgr_IndexedMapOfHSensitive mySensitives; //!< Map of entities and its corresponding index in BVH
   SelectMgr_MapOfOwners            myOwnersMap;  //!< Map of entity owners and its corresponding number of sensitives
-  Standard_Boolean  myHasEntityWithPersistence;  //!< flag if some of sensitive entity has own transform persistence
+  Standard_Boolean  myHasEntityWithPersistence{};  //!< flag if some of sensitive entity has own transform persistence
 };
 
 #endif // _SelectMgr_SensitiveEntitySet_HeaderFile
index 907a85406179dbcc2a15a8ed5d50069d63332653..e2a4699d750d4ef380e0e2fc970b5702261fc3e9 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <SelectMgr_TriangularFrustumSet.hxx>
 
 #include <BRepMesh_DataStructureOfDelaun.hxx>
@@ -549,7 +551,7 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCylinder (const Standar
   const Standard_Real anAngle = aCylNorm.Angle (aDirNorm);
   const Standard_Real aCosAngle = Cos (anAngle);
   const gp_Pln aPln (myFrustums.First()->myVertices[0], aDirNorm);
-  Standard_Real aCoefA, aCoefB, aCoefC, aCoefD;
+  Standard_Real aCoefA = NAN, aCoefB = NAN, aCoefC = NAN, aCoefD = NAN;
   aPln.Coefficients (aCoefA, aCoefB, aCoefC, aCoefD);
 
   const Standard_Real aTBottom = -(aBottomCenter.XYZ().Dot (aDirNorm.XYZ()) + aCoefD) / aDirNorm.Dot (aDirNorm);
@@ -659,7 +661,7 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCircle (const Standard_
 
   const gp_Dir aDirNorm (aVecPlane1.Crossed (aVecPlane2));
   const gp_Pln aPln (myFrustums.First()->myVertices[0], aDirNorm);
-  Standard_Real aCoefA, aCoefB, aCoefC, aCoefD;
+  Standard_Real aCoefA = NAN, aCoefB = NAN, aCoefC = NAN, aCoefD = NAN;
   aPln.Coefficients (aCoefA, aCoefB, aCoefC, aCoefD);
 
   const Standard_Real aT = -(aCenter.XYZ().Dot (aDirNorm.XYZ()) + aCoefD) / aDirNorm.Dot (aDirNorm);
@@ -903,7 +905,7 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::segmentTriangleIntersection (co
                                                                               const gp_Pnt& theV1, const gp_Pnt& theV2, const gp_Pnt& theV3)
 {
   gp_Vec        aPVec, aTVec, aQVec;
-  Standard_Real aD, aInvD, anU, aV, aT;
+  Standard_Real aD = NAN, aInvD = NAN, anU = NAN, aV = NAN, aT = NAN;
 
   gp_Vec anEdge1 = theV2.XYZ() - theV1.XYZ();
   gp_Vec anEdge2 = theV3.XYZ() - theV1.XYZ();
index 5f8607341021a8f98e2b690bc5409b4ae50003f8..cb9e25042df0f37e21ac137d6a12736dc0413ecb 100644 (file)
@@ -165,12 +165,12 @@ SelectMgr_ViewerSelector::SelectMgr_ViewerSelector()
 : myDepthTolerance (0.0),
   myDepthTolType (SelectMgr_TypeOfDepthTolerance_SensitivityFactor),
   myToPreferClosest (Standard_True),
-  myCameraScale (1.0),
+  myEntitySetBuilder(new BVH_BinnedBuilder<Standard_Real, 3, 4> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True)), myCameraScale (1.0),
   myToPrebuildBVH (Standard_False),
   myIsSorted (Standard_False),
   myIsLeftChildQueuedFirst (Standard_False)
 {
-  myEntitySetBuilder = new BVH_BinnedBuilder<Standard_Real, 3, 4> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True);
+  
 }
 
 //=======================================================================
@@ -1044,8 +1044,7 @@ void SelectMgr_ViewerSelector::MoveSelectableObject (const Handle(SelectMgr_Sele
 //=======================================================================
 void SelectMgr_ViewerSelector::RemoveSelectableObject (const Handle(SelectMgr_SelectableObject)& theObject)
 {
-  Handle(SelectMgr_SelectableObject) anObj = theObject;
-  if (myMapOfObjectSensitives.UnBind (theObject))
+   if (myMapOfObjectSensitives.UnBind (theObject))
   {
     RemovePicked (theObject);
     mySelectableObjects.Remove (theObject);
index 9b635a45fe59b08d69564fbee5f4b885e9bc23d0..7391963623a5edb587c4ba4e4261ec96a37f3dc3 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepBuilderAPI_MakeEdge.hxx>
@@ -55,9 +57,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeAlgo_AlgoContainer,Standard_Transient)
 //function : ShapeAlgo_AlgoContainer
 //purpose  : 
 //=======================================================================
-ShapeAlgo_AlgoContainer::ShapeAlgo_AlgoContainer()
+ShapeAlgo_AlgoContainer::ShapeAlgo_AlgoContainer() : myTC(new ShapeAlgo_ToolContainer)
 {
-  myTC = new ShapeAlgo_ToolContainer;
+  
 }
 
 //=======================================================================
@@ -83,7 +85,7 @@ Standard_Boolean ShapeAlgo_AlgoContainer::ConnectNextWire (const Handle(ShapeAna
     return Standard_True;
   }
   
-  Standard_Real tailhead, tailtail, headtail, headhead;
+  Standard_Real tailhead = NAN, tailtail = NAN, headtail = NAN, headhead = NAN;
   saw->CheckShapeConnect (tailhead, tailtail, headtail, headhead, nextsewd->Wire(), maxtol);
   distmin = tailhead;
   Standard_Real precision = saw->Precision();
@@ -149,7 +151,7 @@ void ShapeAlgo_AlgoContainer::ApproxBSplineCurve (const Handle(Geom_BSplineCurve
   Standard_Integer deg = bspline->Degree();
   
   Standard_Integer jpole = 1;
-  Standard_Integer j, PoleIndex, I1;
+  Standard_Integer j = 0, PoleIndex = 0, I1 = 0;
   PoleIndex = 1;
   I1 = 1;
   for ( Standard_Integer ipole = 1; ipole < NbPoles; ipole++) {
@@ -200,7 +202,7 @@ void ShapeAlgo_AlgoContainer::ApproxBSplineCurve (const Handle(Geom_BSplineCurve
       TColgp_Array1OfPnt newP(1,jpole);      
       mycurve->Poles(newP);
       Handle(IntSurf_LineOn2S) R = new IntSurf_LineOn2S();
-      Standard_Real u1,v1,u2,v2;
+      Standard_Real u1 = NAN,v1 = NAN,u2 = NAN,v2 = NAN;
       u1 = v1 = 0.;
       u2 = v2 = 1.;
       for( j=1; j<=jpole; j++) {
@@ -281,7 +283,7 @@ void ShapeAlgo_AlgoContainer::ApproxBSplineCurve (const Handle(Geom2d_BSplineCur
   Standard_Integer deg = bspline->Degree();
   
   Standard_Integer jpole = 1;
-  Standard_Integer j, PoleIndex, I1;
+  Standard_Integer j = 0, PoleIndex = 0, I1 = 0;
   PoleIndex = 1;
   I1 = 1;
   for ( Standard_Integer ipole = 1; ipole < NbPoles; ipole++) {
@@ -333,7 +335,7 @@ void ShapeAlgo_AlgoContainer::ApproxBSplineCurve (const Handle(Geom2d_BSplineCur
       TColgp_Array1OfPnt2d newP(1,jpole);      
       mycurve->Poles(newP);
       Handle(IntSurf_LineOn2S) R = new IntSurf_LineOn2S();
-      Standard_Real u2,v2;
+      Standard_Real u2 = NAN,v2 = NAN;
       u2 = v2 = 1.;
       for( j=1; j<=jpole; j++) {
        IntSurf_PntOn2S POn2S;
@@ -423,12 +425,12 @@ void ShapeAlgo_AlgoContainer::ApproxBSplineCurve (const Handle(Geom2d_BSplineCur
   TopLoc_Location  loc1,      loc2;
 //  BRepBuilderAPI_MakeWire makeWire1, makeWire2;
   ShapeExtend_WireData makeWire1, makeWire2;
-  Standard_Boolean iterCook,  iterPerry;
-  Standard_Integer nEdges1,   nEdges2;
-  Standard_Real    length1,   length2;
-  Standard_Real    first1,    first2;
-  Standard_Real    last1,     last2;
-  Standard_Real    delta1,    delta2;
+  Standard_Boolean iterCook = 0,  iterPerry = 0;
+  Standard_Integer nEdges1 = 0,   nEdges2 = 0;
+  Standard_Real    length1 = NAN,   length2 = NAN;
+  Standard_Real    first1 = NAN,    first2 = NAN;
+  Standard_Real    last1 = NAN,     last2 = NAN;
+  Standard_Real    delta1 = NAN,    delta2 = NAN;
 
   Handle (Geom_Curve) crv1;
   Handle (Geom_Curve) crv2;
index 5517a17b35236230569675b4a7ef7238761dff3f..9d664cbd95405c848a8731dc4af28c4ff675c0bc 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <ShapeAnalysis.hxx>
 
 #include <Bnd_Box2d.hxx>
@@ -126,12 +128,12 @@ static inline void ReverseSeq (HSequence& Seq)
 Standard_Real ShapeAnalysis::TotCross2D(const Handle(ShapeExtend_WireData)& sewd,
                                         const TopoDS_Face& aFace)
 {
-  Standard_Integer i, nbc = 0;
+  Standard_Integer i = 0, nbc = 0;
   gp_Pnt2d fuv,luv, uv0;
   Standard_Real totcross=0;
   for(i=1; i<=sewd->NbEdges(); i++) {
     TopoDS_Edge edge = sewd->Edge(i);
-    Standard_Real f2d, l2d;
+    Standard_Real f2d = NAN, l2d = NAN;
     Handle(Geom2d_Curve) c2d = BRep_Tool::CurveOnSurface(edge,aFace,f2d,l2d);
     if ( !c2d.IsNull() ) {
       nbc++;
@@ -172,7 +174,7 @@ Standard_Real ShapeAnalysis::ContourArea(const TopoDS_Wire& theWire)
   //for(i=1; i<=sewd->NbEdges(); i++) {
   for( ; aIte.More(); aIte.Next()) {
     TopoDS_Edge edge = TopoDS::Edge(aIte.Value()); //sewd->Edge(i);
-    Standard_Real first, last;
+    Standard_Real first = NAN, last = NAN;
     Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge,first, last);
     if ( !c3d.IsNull() ) {
       
@@ -282,7 +284,7 @@ void ShapeAnalysis::GetFaceUVBounds (const TopoDS_Face& F,
   for (;ex.More();ex.Next()) {
     TopoDS_Edge edge = TopoDS::Edge(ex.Current());
     Handle(Geom2d_Curve) c2d;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     if ( ! sae.PCurve ( edge, F, c2d, f, l, Standard_False ) ) continue;
     sac.FillBndBox ( c2d, f, l, 20, Standard_True, B );
   }
index 821fabc107b1e9558faf682c3225ecc997c150c0..6d0eb25e40661583e659d579934198a4ce2b2866 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <ShapeAnalysis_BoxBndTree.hxx>
 #include <Standard_NoSuchObject.hxx>
 #include <ShapeAnalysis_Edge.hxx>
@@ -104,7 +106,7 @@ Standard_Boolean ShapeAnalysis_BoxBndTreeSelector::
     gp_Pnt p1 = BRep_Tool::Pnt(V1);
     gp_Pnt p2 = BRep_Tool::Pnt(V2);
     
-    Standard_Real tailhead, tailtail, headhead, headtail;
+    Standard_Real tailhead = NAN, tailtail = NAN, headhead = NAN, headtail = NAN;
     tailhead = p1.Distance(myLPnt);
     tailtail = p2.Distance(myLPnt);
     headhead = p1.Distance(myFPnt);
@@ -114,7 +116,7 @@ Standard_Boolean ShapeAnalysis_BoxBndTreeSelector::
     if (tailhead > tailtail) {res1 = 1; dm1 = tailtail;}
     if (headtail > headhead) {res2 = 1; dm2 = headhead;}
     Standard_Integer result = res1;
-    Standard_Real min3d;
+    Standard_Real min3d = NAN;
     min3d = Min (dm1, dm2);
     if (min3d > myMin3d)
       return Standard_False;
index 9fa226eb378e77c8cd169d973f99c79fa1264133..3683aae3c24459daa716dd97f316ae40348f4f96 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <ShapeAnalysis_CanonicalRecognition.hxx>
 
 #include <BRep_Builder.hxx>
@@ -615,7 +617,7 @@ Handle(Geom_Surface) ShapeAnalysis_CanonicalRecognition::GetSurface(const TopoDS
   }
   gp_Ax3 aPos;
   TColStd_Array1OfReal aParams(1, Max(1, GetNbPars(theTarget)));
-  Standard_Boolean isOK;
+  Standard_Boolean isOK = 0;
   for (; anIter.More(); anIter.Next())
   {
     Handle(Geom_Surface) anElemSurf1 = GetSurface(TopoDS::Face(anIter.Value()), theTol,
@@ -656,7 +658,7 @@ Handle(Geom_Surface) ShapeAnalysis_CanonicalRecognition::GetSurface(const TopoDS
     Handle(Geom_Surface) aSurf;
     TopLoc_Location aLoc;
     Handle(Geom2d_Curve) aPCurve;
-    Standard_Real ff, ll;
+    Standard_Real ff = NAN, ll = NAN;
     BRep_Tool::CurveOnSurface(theEdge, aPCurve, aSurf, aLoc, ff, ll, j);
     if (aSurf.IsNull()) {
       break;
@@ -685,7 +687,7 @@ Handle(Geom_Surface) ShapeAnalysis_CanonicalRecognition::GetSurface(const TopoDS
   Standard_Integer aNbPars = Max(1, GetNbPars(theTarget));
   TColStd_Array1OfReal aParams(1, aNbPars);
 
-  Standard_Integer ifit = -1, i;
+  Standard_Integer ifit = -1, i = 0;
   Standard_Real aMinDev = RealLast();
   if (aSurfs.Size() == 1)
   {
@@ -744,8 +746,8 @@ Handle(Geom_Surface) ShapeAnalysis_CanonicalRecognition::GetSurface(const TopoDS
   gp_Ax3 aPos1 = thePos;
   Standard_Integer aNbPars = GetNbPars(theTarget);
   TColStd_Array1OfReal aParams1(1, Max(1, aNbPars));
-  Standard_Real aGap1;
-  Standard_Integer i;
+  Standard_Real aGap1 = NAN;
+  Standard_Integer i = 0;
   for (i = 1; i <= aNbPars; ++i)
   {
     aParams1(i) = theParams(i);
@@ -766,7 +768,7 @@ Handle(Geom_Surface) ShapeAnalysis_CanonicalRecognition::GetSurface(const TopoDS
     {
       aParams(i) = aParams1(i);
     }
-    Standard_Real aGap;
+    Standard_Real aGap = NAN;
     const TopoDS_Edge& anEdge = TopoDS::Edge(anIter.Value());
     Handle(Geom_Surface) anElemSurf = GetSurface(anEdge, theTol, 
       theType, theTarget, aPos, aParams, aGap, theStatus);
@@ -833,7 +835,7 @@ Standard_Boolean ShapeAnalysis_CanonicalRecognition::GetSurfaceByLS(const TopoDS
 
   //
   Standard_Real aTol = Precision::Confusion();
-  math_MultipleVarFunction* aPFunc; 
+  math_MultipleVarFunction* aPFunc = nullptr
   GeomConvert_FuncSphereLSDist aFuncSph(aPoints);
   GeomConvert_FuncCylinderLSDist aFuncCyl(aPoints, thePos.Direction());
   GeomConvert_FuncConeLSDist aFuncCon(aPoints, thePos.Direction());
@@ -854,13 +856,13 @@ Standard_Boolean ShapeAnalysis_CanonicalRecognition::GetSurfaceByLS(const TopoDS
   //
   math_Vector aSteps(1, aNbVar);
   Standard_Integer aNbInt = 10;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= aNbVar; ++i)
   {
     aSteps(i) = (aLBnd(i) - aFBnd(i)) / aNbInt;
   }
   math_PSO aGlobSolver(aPFunc, aFBnd, aLBnd, aSteps);
-  Standard_Real aLSDist;
+  Standard_Real aLSDist = NAN;
   aGlobSolver.Perform(aSteps, aLSDist, aStartPoint);
   SetCanonicParameters(theTarget, aStartPoint, thePos, theParams);
 
@@ -924,7 +926,7 @@ Handle(Geom_Curve) ShapeAnalysis_CanonicalRecognition::GetCurve(const TopoDS_Edg
 {
   theStatus = 0;
   TopLoc_Location aLoc;
-  Standard_Real f, l, nf, nl;
+  Standard_Real f = NAN, l = NAN, nf = NAN, nl = NAN;
   const Handle(Geom_Curve)& aCurv = BRep_Tool::Curve(theEdge, aLoc, f, l);
   if (aCurv.IsNull())
   {
@@ -1049,7 +1051,7 @@ Standard_Boolean CompareConicParams(const GeomAbs_CurveType theTarget, const Sta
   const gp_Ax2& theRefPos, const TColStd_Array1OfReal& theRefParams,
   const gp_Ax2& thePos, const TColStd_Array1OfReal& theParams)
 {
-  Standard_Integer i, aNbPars = GetNbPars(theTarget);
+  Standard_Integer i = 0, aNbPars = GetNbPars(theTarget);
 
   for (i = 1; i <= aNbPars; ++i)
   {
@@ -1243,7 +1245,7 @@ Standard_Boolean GetSamplePoints(const TopoDS_Wire& theWire,
   if(aTotalLength < theTol)
     return Standard_False;
 
-  Standard_Integer i, aNb = aLengths.Length();
+  Standard_Integer i = 0, aNb = aLengths.Length();
   for (i = 0; i < aNb; ++i)
   {
     const BRepAdaptor_Curve& aC = aCurves(i);
@@ -1254,7 +1256,7 @@ Standard_Boolean GetSamplePoints(const TopoDS_Wire& theWire,
     if (!aPointGen.IsDone())
       continue;
     aNbPoints = aPointGen.NbPoints();
-    Standard_Integer j;
+    Standard_Integer j = 0;
     for (j = 1; j <= aNbPoints; ++j)
     {
       Standard_Real t = aPointGen.Parameter(j);
@@ -1290,7 +1292,7 @@ static Standard_Real GetLSGap(const Handle(TColgp_HArray1OfXYZ)& thePoints, cons
   gp_Vec aDir(thePos.Direction());
 
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   if (theTarget == GeomAbs_Sphere)
   {
     Standard_Real anR = theParams(1);
@@ -1316,7 +1318,7 @@ static Standard_Real GetLSGap(const Handle(TColgp_HArray1OfXYZ)& thePoints, cons
     Standard_Real anR = theParams(2);
     for (i = thePoints->Lower(); i <= thePoints->Upper(); ++i)
     {
-      Standard_Real u, v;
+      Standard_Real u = NAN, v = NAN;
       gp_Pnt aPi(thePoints->Value(i));
       ElSLib::ConeParameters(thePos, anR, anAng, aPi, u, v);
       gp_Pnt aPp;
@@ -1347,7 +1349,7 @@ void FillSolverData(const GeomAbs_SurfaceType theTarget,
     theStartPoint(4) = theParams(1);
     Standard_Real aDR = theRelDev * theParams(1);
     Standard_Real aDXYZ = aDR;
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 1; i <= 3; ++i)
     {
       theFBnd(i) = theStartPoint(i) - aDXYZ;
@@ -1370,7 +1372,7 @@ void FillSolverData(const GeomAbs_SurfaceType theTarget,
     }
     Standard_Real aDXYZ = aDR;
     Standard_Real aDAng = theRelDev * Abs(theParams(1));
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 1; i <= 3; ++i)
     {
       theFBnd(i) = theStartPoint(i) - aDXYZ;
index 97528b8911007a67372f5a44e696d1dd39a5e432..f056e26f63629b3612fd21a2aa42e087332593d0 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepLib.hxx>
 //function : ShapeAnalysis_CheckSmallFace
 //purpose  : 
 //=======================================================================
-ShapeAnalysis_CheckSmallFace::ShapeAnalysis_CheckSmallFace()
+ShapeAnalysis_CheckSmallFace::ShapeAnalysis_CheckSmallFace() : myStatusSpot(ShapeExtend::EncodeStatus ( ShapeExtend_OK )), myStatusStrip(ShapeExtend::EncodeStatus ( ShapeExtend_OK )), myStatusPin(ShapeExtend::EncodeStatus ( ShapeExtend_OK )), myStatusTwisted(ShapeExtend::EncodeStatus ( ShapeExtend_OK )), myStatusSplitVert(ShapeExtend::EncodeStatus ( ShapeExtend_OK ))
 {
-  myStatusSpot = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
-  myStatusStrip = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
-  myStatusPin = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
-  myStatusTwisted = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
-  myStatusSplitVert = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
+  
+  
+  
+  
+  
   
 }
 static void MinMaxPnt
@@ -74,7 +76,7 @@ static void MinMaxPnt
    Standard_Real& minx, Standard_Real& miny, Standard_Real& minz,
    Standard_Real& maxx, Standard_Real& maxy, Standard_Real& maxz)
 {
-  Standard_Real x,y,z;
+  Standard_Real x = NAN,y = NAN,z = NAN;
   p.Coord (x,y,z);
   if (nb < 1)  {  minx = maxx = x; miny = maxy = y; minz = maxz = z;  }
   else
@@ -152,7 +154,7 @@ static Standard_Boolean MinMaxSmall
 //   By picking intermediate point on each one
   for (TopExp_Explorer ie(F,TopAbs_EDGE); ie.More(); ie.Next()) {
     TopoDS_Edge E = TopoDS::Edge (ie.Current());
-    Standard_Real cf,cl;
+    Standard_Real cf = NAN,cl = NAN;
     Handle(Geom_Curve) C3D = BRep_Tool::Curve (E,cf,cl);
     if (C3D.IsNull()) continue;
     gp_Pnt debut  = C3D->Value (cf);
@@ -177,7 +179,7 @@ static Standard_Boolean MinMaxSmall
  Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckSpotFace(const TopoDS_Face& F,const Standard_Real tol) 
 {
   gp_Pnt spot;
-  Standard_Real spotol;
+  Standard_Real spotol = NAN;
   Standard_Integer stat = IsSpotFace (F,spot,spotol,tol);
   if(!stat) return Standard_False; 
   switch(stat) {
@@ -213,7 +215,7 @@ static Standard_Boolean MinMaxSmall
   // Standard_Integer stat = 2;  // 2 : small in V direction
   if (!bs.IsNull() || !bz.IsNull()) {
     Standard_Boolean cbz = (!bz.IsNull());
-    Standard_Integer iu,iv, nbu, nbv;
+    Standard_Integer iu = 0,iv = 0, nbu = 0, nbv = 0;
     if (cbz) { nbu = bz->NbUPoles(), nbv = bz->NbVPoles(); }
     else     { nbu = bs->NbUPoles(), nbv = bs->NbVPoles(); }
     // Standard_Real dx = 0, dy = 0, dz = 0;
@@ -275,7 +277,7 @@ static Standard_Boolean MinMaxSmall
   Standard_Integer nbint = 10;
   
   ShapeAnalysis_Curve SAC;
-  Standard_Real cf1,cl1,cf2,cl2,u; dmax = 0;
+  Standard_Real cf1 = NAN,cl1 = NAN,cf2 = NAN,cl2 = NAN,u = NAN; dmax = 0;
   Handle(Geom_Curve) C1,C2;
   C1 = BRep_Tool::Curve (E1,cf1,cl1);
   C2 = BRep_Tool::Curve (E2,cf2,cl2);
@@ -295,7 +297,7 @@ static Standard_Boolean MinMaxSmall
   
   Standard_Real cd1 = (cl1 - cf1)/nbint;
   Standard_Real cd2 = (cl2 - cf2)/nbint;
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   f = cf2; l = cl2;
   for (int numcur = 0; numcur < 2; numcur ++) {
     u = cf1;
@@ -306,7 +308,7 @@ static Standard_Boolean MinMaxSmall
                  }
     for (int nump = 0; nump <= nbint; nump ++) {
       gp_Pnt p2, p1 = C1T->Value (u);
-      Standard_Real para;
+      Standard_Real para = NAN;
       //pdn Adaptor curve is used to avoid of enhancing of domain.
       GeomAdaptor_Curve GAC(C2T);
       Standard_Real dist = SAC.Project (GAC,p1,toler,p2,para);
@@ -344,7 +346,7 @@ static Standard_Boolean MinMaxSmall
 //    Extremities
     Standard_Real dist = p1.Distance(p2);
 //    Middle point
-    Standard_Real cf,cl;
+    Standard_Real cf = NAN,cl = NAN;
     Handle(Geom_Curve) CC;
     CC = BRep_Tool::Curve (E,cf,cl);
     Standard_Boolean isNullLength = Standard_True;
@@ -379,7 +381,7 @@ static Standard_Boolean MinMaxSmall
                                                                TopoDS_Edge& E1, TopoDS_Edge& E2,const Standard_Real tol) 
 {
  Standard_Real toler = tol;
-  Standard_Real minx,miny,minz,maxx,maxy,maxz;
+  Standard_Real minx = NAN,miny = NAN,minz = NAN,maxx = NAN,maxy = NAN,maxz = NAN;
 
 // In this case, we have 2 vertices and 2 great edges. Plus possibly 2 small
 //    edges, one on each vertex
@@ -404,7 +406,7 @@ static Standard_Boolean MinMaxSmall
     TopoDS_Vertex VA,VB;
     TopExp::Vertices (E,VA,VB);
     if (tol < 0) {
-      Standard_Real tolv;
+      Standard_Real tolv = NAN;
       tolv = BRep_Tool::Tolerance (VA);
       if (toler < tolv) toler = tolv;
       tolv = BRep_Tool::Tolerance (VB);
@@ -442,7 +444,7 @@ static Standard_Boolean MinMaxSmall
   if (nb < 2) return Standard_False;   // only one vertex : cannot be a strip ...
 
 //   Checking if E1 and E2 define a Strip
-  Standard_Real dmax;
+  Standard_Real dmax = NAN;
  if (!CheckStripEdges (E1,E2,tol,dmax)) return Standard_False;
  myStatusStrip = ShapeExtend::EncodeStatus (ShapeExtend_DONE3);
  return Standard_True;
@@ -468,7 +470,7 @@ Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckStripFace(const TopoDS_Face&
 //  ??  Record Diagnostic "StripFace", no data (should be "Edges1" "Edges2")
 //      but direction is known (1:U  2:V)
    // TopoDS_Edge E1,E2;
-    Standard_Real dmax;
+    Standard_Real dmax = NAN;
     if(FindStripEdges (F,E1,E2,tol,dmax)) return Standard_True;
 
 //  Now, trying edges : if there are 2 and only 2 edges greater than tolerance
@@ -527,20 +529,20 @@ Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckStripFace(const TopoDS_Face&
       TopoDS_Edge E = TopoDS::Edge (ite.Current());
       TopoDS_Vertex V1,V2;
       TopExp::Vertices (E,V1,V2);
-      Standard_Real cf,cl;
+      Standard_Real cf = NAN,cl = NAN;
       Handle(Geom_Curve) C3D = BRep_Tool::Curve (E,cf,cl);
       if (C3D.IsNull()) continue;
       if (V.IsSame(V1) || V.IsSame(V2)) continue;
       gp_Pnt unp = vtp.Value(iv);
       Standard_Real unt = vto.Value(iv);
       gp_Pnt proj;
-      Standard_Real param;
+      Standard_Real param = NAN;
       Standard_Real dist = SAC.Project (C3D,unp,unt*10.,proj,param,cf,cl);
       if (dist == 0.0) continue; //smh
 //  Splitting Vertex to record ?
       if (dist < unt) {
 //  If Split occurs at beginning or end, it is not a split ...
-       Standard_Real fpar, lpar, eps = 1.e-06;
+       Standard_Real fpar = NAN, lpar = NAN, eps = 1.e-06;
        if (param >=cl || param <= cf) continue; // Out of range
        fpar = param - cf; lpar = param - cl;
        if ((Abs(fpar) < eps) || (Abs(lpar) < eps)) continue; // Near end or start 
@@ -568,7 +570,7 @@ static Standard_Integer IsoStat
    const Standard_Integer uorv, const Standard_Integer rank,
    const Standard_Real tolpin, const Standard_Real toler)
 {
-  Standard_Integer i, np = 0;
+  Standard_Integer i = 0, np = 0;
   Standard_Integer i0 = (uorv == 1 ? poles.LowerCol() : poles.LowerRow());
   Standard_Integer i1 = (uorv == 1 ? poles.UpperCol() : poles.UpperRow());
   Standard_Real xmin = 0.,ymin = 0.,zmin = 0., xmax = 0.,ymax = 0.,zmax = 0.;
@@ -686,8 +688,8 @@ Standard_Boolean  ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
   TColStd_Array2OfReal nx (1,nbint+1,1,nbint+1);
   TColStd_Array2OfReal ny (1,nbint+1,1,nbint+1);
   TColStd_Array2OfReal nz (1,nbint+1,1,nbint+1);
-  Standard_Integer iu,iv;
-  Standard_Real umin,umax,vmin,vmax;
+  Standard_Integer iu = 0,iv = 0;
+  Standard_Real umin = NAN,umax = NAN,vmin = NAN,vmax = NAN;
   surf->Bounds (umin,umax,vmin,vmax);
   Standard_Real u = umin, du = (umax-umin)/nbint;
   Standard_Real v = vmin, dv = (umax-umin)/nbint;
@@ -745,7 +747,7 @@ Standard_Boolean  ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
   //ShapeFix_Wire sfw;
   TopExp_Explorer exp_w (F,TopAbs_WIRE); 
   exp_w.More();
-  Standard_Real coef1=0, coef2; // =0 for deleting warning (skl)
+  Standard_Real coef1=0, coef2 = NAN; // =0 for deleting warning (skl)
   TopoDS_Wire theCurWire = TopoDS::Wire (exp_w.Current());
   ShapeAnalysis_WireOrder wi;
   ShapeAnalysis_Wire sfw;
@@ -837,7 +839,7 @@ Standard_Boolean  ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
    const Standard_Real coef2,const Standard_Real toler) const
 {
 
- Standard_Real cf1,cl1,cf2,cl2;
+ Standard_Real cf1 = NAN,cl1 = NAN,cf2 = NAN,cl2 = NAN;
  Handle(Geom_Curve) C1,C2,C3;
  C1 = BRep_Tool::Curve (theFirstEdge,cf1,cl1);
  C2 = BRep_Tool::Curve (theSecondEdge,cf2,cl2);
@@ -850,7 +852,7 @@ Standard_Boolean  ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
   p2 = C1->Value(cl1);
   pp1 = C2->Value(cf2);
   pp2 = C2->Value(cl2);
-  Standard_Real tol;
+  Standard_Real tol = NAN;
   Standard_Real paramc1=0, paramc2=0; // =0 for deleting warning (skl)
   TopoDS_Vertex theSharedV = TopExp::LastVertex(theFirstEdge);
   if  (toler == -1)  tol = BRep_Tool::Tolerance(theSharedV); else tol = toler;
@@ -896,7 +898,7 @@ Standard_Boolean  ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
        //proj = C2->Value(paramc2 + 9*d2); 
       //else proj = C2->Value(paramc2 -d2); 
     }
-  Standard_Real param;
+  Standard_Real param = NAN;
   GeomAdaptor_Curve GAC(C3);
   Standard_Real f = C3->FirstParameter();
   Standard_Real l = C3->LastParameter();
index a6fe1506c6df7b2a04b9f58823aa1751a421f7b5..86e25a97896f0f9835a8c033430f8006552b2ea3 100644 (file)
@@ -188,15 +188,15 @@ private:
 
 
   TopoDS_Shape myComp;
-  Standard_Integer myStatus;
+  Standard_Integer myStatus{};
   Standard_Integer myStatusSpot;
   Standard_Integer myStatusStrip;
   Standard_Integer myStatusPin;
   Standard_Integer myStatusTwisted;
   Standard_Integer myStatusSplitVert;
-  Standard_Integer myStatusPinFace;
-  Standard_Integer myStatusPinEdges;
-  Standard_Real myPrecision;
+  Standard_Integer myStatusPinFace{};
+  Standard_Integer myStatusPinEdges{};
+  Standard_Real myPrecision{};
 
 
 };
index 26ae1e828662d6198e36c71af995864d47488736..0cb858aa29b0b65b4864d263b213de68afe5b046 100644 (file)
@@ -20,6 +20,8 @@
 //    gka 21.06.99 S4208: adding method NextProject(Adaptor_Curve)
 //    msv 30.05.00 correct IsPlanar for a conic curve
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <Bnd_Box2d.hxx>
 #include <ElCLib.hxx>
@@ -67,7 +69,7 @@ static void ProjectOnSegments (const Adaptor3d_Curve& AC, const gp_Pnt& P3D,
   //  On considere <nbseg> points sur [uMin,uMax]
   //  Quel est le plus proche. Et quel est le nouvel intervalle
   //  (il ne peut pas deborder l ancien)
-  Standard_Real u, dist2, delta = (nbseg == 0)? 0 : (uMax-uMin)/nbseg; //szv#4:S4163:12Mar99 anti-exception
+  Standard_Real u = NAN, dist2 = NAN, delta = (nbseg == 0)? 0 : (uMax-uMin)/nbseg; //szv#4:S4163:12Mar99 anti-exception
   Standard_Real  distmin2 = distmin * distmin;
   Standard_Boolean aHasChanged = Standard_False;
   for (Standard_Integer i = 0; i <= nbseg; i ++) {
@@ -119,7 +121,7 @@ Standard_Real ShapeAnalysis_Curve::Project(const Handle(Geom_Curve)& C3D,
                                           const Standard_Real cl,
                                           const Standard_Boolean AdjustToEnds) const
 {
-  Standard_Real distmin;
+  Standard_Real distmin = NAN;
   Standard_Real uMin = (cf < cl ? cf : cl);
   Standard_Real uMax = (cf < cl ? cl : cf);
   
@@ -232,7 +234,7 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
   try {
     OCC_CATCH_SIGNALS
     Extrema_ExtPC myExtPC(P3D,C3D);
-    Standard_Real dist2Min = RealLast() , dist2;
+    Standard_Real dist2Min = RealLast() , dist2 = NAN;
     Standard_Integer index = 0;
     if ( myExtPC.IsDone() && ( myExtPC.NbExt() > 0) )
     {
@@ -388,7 +390,7 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
   
   if (IsHaveOldSol) {
     // PTV 29.05.2002 Compare old solution and new;
-    Standard_Real adist1, adist2;
+    Standard_Real adist1 = NAN, adist2 = NAN;
     adist1 = anOldProj.SquareDistance(P3D);
     adist2 = proj.SquareDistance (P3D);
     if (adist1 < adist2) {
@@ -636,7 +638,7 @@ static Standard_Integer SearchForExtremum (const Handle(Geom2d_Curve)& C2d,
                                           Standard_Real &par,
                                           gp_Pnt2d &res)
 {
-  Standard_Real prevpar;
+  Standard_Real prevpar = NAN;
   Standard_Integer nbOut = 0;
   for (Standard_Integer i = 0; i <10; i++) {
     prevpar = par;
@@ -753,7 +755,7 @@ Standard_Integer ShapeAnalysis_Curve::SelectForwardSeam(const Handle(Geom2d_Curv
     L2 = new Geom2d_Line(StartBC2, VecBC2);
   }
 
-  Standard_Boolean UdirPos, UdirNeg, VdirPos, VdirNeg;
+  Standard_Boolean UdirPos = 0, UdirNeg = 0, VdirPos = 0, VdirNeg = 0;
   UdirPos = UdirNeg = VdirPos = VdirNeg = Standard_False;
 
   gp_Dir2d theDir  = L1->Direction();
@@ -939,7 +941,7 @@ Standard_Boolean ShapeAnalysis_Curve::IsPlanar (const TColgp_Array1OfPnt& pnts,
   }
   Normal = Normal / nrm;
 
-  Standard_Real mind = RealLast(), maxd = -RealLast(), dev;
+  Standard_Real mind = RealLast(), maxd = -RealLast(), dev = NAN;
   for (Standard_Integer i = 1; i <= pnts.Length(); i++) {
     dev = pnts(i).XYZ() * Normal;
     if (dev < mind) mind = dev;
@@ -1017,7 +1019,7 @@ Standard_Boolean ShapeAnalysis_Curve::IsPlanar (const TColgp_Array1OfPnt& pnts,
     //DeclareAndCast(ShapeExtend_ComplexCurve, Complex, curve);
     Handle(ShapeExtend_ComplexCurve) Complex = Handle(ShapeExtend_ComplexCurve)::DownCast (curve);
     TColgp_SequenceOfPnt sequence;
-    Standard_Integer i; // svv Jan11 2000 : porting on DEC
+    Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
     for (i = 1; i <= Complex->NbCurves(); i++)
       AppendControlPoles(sequence,Complex->Curve(i));
     TColgp_Array1OfPnt Poles(1,sequence.Length());
@@ -1193,7 +1195,7 @@ Standard_Boolean ShapeAnalysis_Curve::IsClosed(const Handle(Geom_Curve)& theCurv
   
   Standard_Real prec = Max (preci, Precision::Confusion());
 
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   f = theCurve->FirstParameter();
   l = theCurve->LastParameter();
   
index 3a77d8d02f54c530e29dd27218ac3d9c67ed403c..a3bdfea9ede29df82348f95c6b0198cb38db0a00 100644 (file)
@@ -18,6 +18,8 @@
 //:s4 abv 26.04.99: sim6049.igs 21677: copy of curve is necessary to get True SP
 //    abv 06.05.99: S4137: adding methods GetTangent2d()
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_GCurve.hxx>
@@ -53,9 +55,9 @@
 //function : ShapeAnalysis_Edge
 //purpose  : 
 //=======================================================================
-ShapeAnalysis_Edge::ShapeAnalysis_Edge()
+ShapeAnalysis_Edge::ShapeAnalysis_Edge() : myStatus(0)
 {
-  myStatus = 0;//ShapeExtend::EncodeStatus (ShapeExtend_OK);
+  //ShapeExtend::EncodeStatus (ShapeExtend_OK);
 }
 
 
@@ -85,7 +87,7 @@ Standard_Boolean ShapeAnalysis_Edge::BoundUV (const TopoDS_Edge& edge,
                                              gp_Pnt2d& first, gp_Pnt2d& last) const
 {
   Handle(Geom2d_Curve) c2d;
-  Standard_Real uf,ul;
+  Standard_Real uf = NAN,ul = NAN;
   if (!PCurve (edge, surface, location, c2d, uf, ul)) return Standard_False;
   first = c2d->Value (uf);
   last  = c2d->Value (ul);
@@ -100,7 +102,7 @@ Standard_Boolean ShapeAnalysis_Edge::BoundUV (const TopoDS_Edge& edge,
 
 Standard_Boolean ShapeAnalysis_Edge::HasCurve3d (const TopoDS_Edge& edge) const
 {
-  Standard_Real cf, cl;
+  Standard_Real cf = NAN, cl = NAN;
   Handle(Geom_Curve) c3d = BRep_Tool::Curve (edge, cf, cl);
   return !c3d.IsNull();
 }
@@ -138,7 +140,7 @@ Standard_Boolean ShapeAnalysis_Edge::Curve3d (const TopoDS_Edge& edge,
 
 Standard_Boolean ShapeAnalysis_Edge::IsClosed3d (const TopoDS_Edge& edge) const
 {
-  Standard_Real cf,cl;
+  Standard_Real cf = NAN,cl = NAN;
   Handle(Geom_Curve) c3d = BRep_Tool::Curve (edge,cf,cl);
   if (c3d.IsNull()) return Standard_False;
   if (!c3d->IsClosed()) return Standard_False;
@@ -170,7 +172,7 @@ Standard_Boolean ShapeAnalysis_Edge::HasPCurve (const TopoDS_Edge& edge,
                                                const TopLoc_Location& location) const
 {
   //try { //szv#4:S4163:12Mar99 waste try
-    Standard_Real cf, cl;
+    Standard_Real cf = NAN, cl = NAN;
     Handle(Geom2d_Curve) c2d = BRep_Tool::CurveOnSurface (edge, surface, location, cf, cl);
     return !c2d.IsNull();
   /* }
@@ -329,7 +331,7 @@ Standard_Boolean ShapeAnalysis_Edge::GetEndTangent2d (const TopoDS_Edge &edge,
                                                      gp_Vec2d &v,
                                                       const Standard_Real dparam) const
 {
-  Standard_Real cf, cl;
+  Standard_Real cf = NAN, cl = NAN;
   Handle(Geom2d_Curve) c2d;
   if ( ! PCurve ( edge, S, L, c2d, cf, cl ) ) {
     v = gp_Vec2d(0,0);
@@ -339,7 +341,7 @@ Standard_Boolean ShapeAnalysis_Edge::GetEndTangent2d (const TopoDS_Edge &edge,
 
   if(dpnew>Precision::Confusion()) {
     gp_Pnt2d ptmp;
-    Standard_Real par1,par2,delta=(cl-cf)*dpnew;
+    Standard_Real par1 = NAN,par2 = NAN,delta=(cl-cf)*dpnew;
     if(Abs(delta)<Precision::PConfusion()) {
       dpnew=0.0;
     }
@@ -420,14 +422,14 @@ Standard_Boolean ShapeAnalysis_Edge::CheckCurve3dWithPCurve (const TopoDS_Edge&
      return Standard_False;
   
   Handle (Geom2d_Curve) c2d;
-  Standard_Real f2d, l2d; //szv#4:S4163:12Mar99 moved down f3d, l3d
+  Standard_Real f2d = NAN, l2d = NAN; //szv#4:S4163:12Mar99 moved down f3d, l3d
   if (!PCurve (edge, surface, location, c2d, f2d ,l2d, Standard_False)) {
     myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL1);
     return Standard_False;
   }
 
   Handle (Geom_Curve) c3d; //szv#4:S4163:12Mar99 moved
-  Standard_Real f3d, l3d; //szv#4:S4163:12Mar99 moved
+  Standard_Real f3d = NAN, l3d = NAN; //szv#4:S4163:12Mar99 moved
   if (!Curve3d (edge, c3d, f3d, l3d, Standard_False)) {
     myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL2);
     return Standard_False;
@@ -493,7 +495,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckVerticesWithCurve3d (const TopoDS_Edge
   gp_Pnt p1v = BRep_Tool::Pnt (V1);
   gp_Pnt p2v = BRep_Tool::Pnt (V2);
 
-  Standard_Real cf,cl;
+  Standard_Real cf = NAN,cl = NAN;
   Handle(Geom_Curve) c3d;
   if ( ! Curve3d (edge,c3d,cf,cl) ) {
     myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL1);
@@ -555,7 +557,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckVerticesWithPCurve (const TopoDS_Edge&
   gp_Pnt p1v = BRep_Tool::Pnt (V1);
   gp_Pnt p2v = BRep_Tool::Pnt (V2);
 
-  Standard_Real cf, cl;
+  Standard_Real cf = NAN, cl = NAN;
   Handle(Geom2d_Curve) c2d;
   if ( ! PCurve ( edge, surf, loc, c2d, cf, cl ) ) {
     myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL1);
@@ -613,7 +615,7 @@ static Standard_Integer CheckVertexTolerance(const TopoDS_Edge& edge,
   gp_Pnt pnt1 = BRep_Tool::Pnt (V1);
   gp_Pnt pnt2 = BRep_Tool::Pnt (V2);
 
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   Handle(Geom_Curve) c3d;
   if ( ! sae.Curve3d(edge, c3d, a, b, Standard_True)) {
     if ( ! BRep_Tool::Degenerated ( edge ) ) 
@@ -737,7 +739,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckSameParameter (const TopoDS_Edge& edge
   Standard_Boolean SameParameter = TE->SameParameter();
 
   // Get 3D curve of the edge
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   TopLoc_Location aCurveLoc;
   Handle(Geom_Curve) aC3D = BRep_Tool::Curve(edge, aCurveLoc, aFirst, aLast);
   if (aC3D.IsNull()) {
@@ -770,7 +772,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckSameParameter (const TopoDS_Edge& edge
     Handle(Geom2d_Curve) aPC;
     Handle(Geom_Surface) aS;
     TopLoc_Location aLoc;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
 
     BRep_Tool::CurveOnSurface(edge, aPC, aS, aLoc, f, l, i);
 
@@ -815,7 +817,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckSameParameter (const TopoDS_Edge& edge
   // check the deviation for the projection of the 3d curve on plane
   if (!IsPCurveFound && !aFaceSurf.IsNull())
   {
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnPlane(edge, aFaceSurf, aFaceLoc, f, l);
     if (!aPC.IsNull())
     {
@@ -930,7 +932,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckOverlapping(const TopoDS_Edge& theEdge
     Standard_Integer NbSol = aMinDist.NbSolution();
     for(Standard_Integer i =1; i<= NbSol && !isOverlap; i++) {
       BRepExtrema_SupportType aType1 = aMinDist.SupportTypeShape1(i);
-      Standard_Real aEndLength, aStartLength, aLengthP
+      Standard_Real aEndLength = NAN, aStartLength = NAN, aLengthP = NAN
       if(aType1 == BRepExtrema_IsVertex) {
         TopoDS_Shape aSupportShape1 = aMinDist.SupportOnShape1(i);
         TopoDS_Vertex aV1,aV2;
@@ -941,7 +943,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckOverlapping(const TopoDS_Edge& theEdge
           aLengthP =aLength;
       }
       else if(aType1 == BRepExtrema_IsOnEdge) {
-        Standard_Real aParam1, aFirst, aLast;
+        Standard_Real aParam1 = NAN, aFirst = NAN, aLast = NAN;
         aMinDist.ParOnEdgeS1 ( i, aParam1 );
         BRep_Tool::Range(aFirstEdge,aFirst,aLast);
         BRepAdaptor_Curve anAdaptor(aFirstEdge);
index b1fb20db84ae65d1f55dc8f5a5d6cabd3357ec94..85b4805624871eeb69b22bfa54961af4bceace05 100644 (file)
@@ -27,9 +27,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeAnalysis_FreeBoundData,Standard_Transient)
 //function : ShapeAnalysis_FreeBoundData
 //purpose  : Empty constructor
 //=======================================================================
-ShapeAnalysis_FreeBoundData::ShapeAnalysis_FreeBoundData()
+ShapeAnalysis_FreeBoundData::ShapeAnalysis_FreeBoundData() : myNotches(new TopTools_HSequenceOfShape())
 {
-  myNotches = new TopTools_HSequenceOfShape();
+  
   Clear();
 }
 
@@ -38,9 +38,9 @@ ShapeAnalysis_FreeBoundData::ShapeAnalysis_FreeBoundData()
 //purpose  : Creates object with contour given in the form of TopoDS_Wire
 //=======================================================================
 
-ShapeAnalysis_FreeBoundData::ShapeAnalysis_FreeBoundData(const TopoDS_Wire& freebound)
+ShapeAnalysis_FreeBoundData::ShapeAnalysis_FreeBoundData(const TopoDS_Wire& freebound) : myNotches(new TopTools_HSequenceOfShape())
 {
-  myNotches = new TopTools_HSequenceOfShape();
+  
   Clear();
   SetFreeBound(freebound);
 }
index 98a28b67d9fcb3c2499b27d2a19714e151efec22..4207453dde8a132ba7b2cc48eb13fc29fcfa2a80 100644 (file)
@@ -126,10 +126,10 @@ private:
 
 
   TopoDS_Wire myBound;
-  Standard_Real myArea;
-  Standard_Real myPerimeter;
-  Standard_Real myRatio;
-  Standard_Real myWidth;
+  Standard_Real myArea{};
+  Standard_Real myPerimeter{};
+  Standard_Real myRatio{};
+  Standard_Real myWidth{};
   Handle(TopTools_HSequenceOfShape) myNotches;
   TopTools_DataMapOfShapeReal myNotchesParams;
 
index 5f885289421796405e95f62f003ef8833dd77554..0ea9300cdc55057498250f4ceda6e2f90231c9e0 100644 (file)
@@ -140,7 +140,7 @@ ShapeAnalysis_FreeBounds::ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
   Handle(TopTools_HSequenceOfShape) iwires = new TopTools_HSequenceOfShape;
   BRep_Builder B;
   
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for (i = 1; i <= edges->Length(); i++) {
     TopoDS_Wire wire;
     B.MakeWire (wire);
@@ -183,7 +183,7 @@ ShapeAnalysis_FreeBounds::ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
   if (iwires.IsNull() || !iwires->Length()) return;
   Handle(TopTools_HArray1OfShape) arrwires = new TopTools_HArray1OfShape(1, iwires->Length());
   //amv
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= arrwires->Length(); i++)
     arrwires->SetValue(i, iwires->Value(i));
   owires = new TopTools_HSequenceOfShape;
@@ -224,7 +224,7 @@ ShapeAnalysis_FreeBounds::ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
   }
 
   aTreeFiller.Fill();
-  Standard_Integer nsel;
+  Standard_Integer nsel = 0;
   
   ShapeAnalysis_Edge sae; //szv#4:S4163:12Mar99 moved
   Standard_Boolean done = Standard_False;
@@ -414,14 +414,14 @@ static void SplitWire(const TopoDS_Wire& wire,
   statuses.Init (0);
 
   //building closed wires
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for (i = 1; i <= nbedges; i++)
     if (statuses.Value (i) == 0) {
       ces.Append (i); statuses.SetValue (i, 1); //putting into CES
       Standard_Boolean SearchBackward = Standard_True;
 
       for(;;) {
-       Standard_Boolean found;
+       Standard_Boolean found = 0;
        TopoDS_Edge edge;
        TopoDS_Vertex lvertex;
        gp_Pnt lpoint;
@@ -433,7 +433,7 @@ static void SplitWire(const TopoDS_Wire& wire,
          edge = sewd->Edge (ces.Last());
          lvertex = sae.LastVertex (edge);
          lpoint = BRep_Tool::Pnt (lvertex);
-         Standard_Integer j; // svv #1
+         Standard_Integer j = 0; // svv #1
          for (j = ces.Length(); (j >= 1) && !found; j--) {
            TopoDS_Vertex fv = sae.FirstVertex (sewd->Edge (ces.Value (j)) );
            gp_Pnt fp = BRep_Tool::Pnt (fv);
@@ -463,7 +463,7 @@ static void SplitWire(const TopoDS_Wire& wire,
        edge = sewd->Edge (ces.Last());
        lvertex = sae.LastVertex (edge);
        lpoint = BRep_Tool::Pnt (lvertex);
-       Standard_Integer j; // svv #1
+       Standard_Integer j = 0; // svv #1
        for (j = 1; (j <= nbedges) && !found; j++)
          if (statuses.Value (j) == 0) {
            TopoDS_Vertex fv = sae.FirstVertex (sewd->Edge (j));
index 4d2ca9d4902605c60ba76d2391de44140399166c..f694c899cf2a761c88c41d8be71a3be3bdf25594 100644 (file)
@@ -158,10 +158,10 @@ private:
 
   TopoDS_Compound myWires;
   TopoDS_Compound myEdges;
-  Standard_Real myTolerance;
-  Standard_Boolean myShared;
-  Standard_Boolean mySplitClosed;
-  Standard_Boolean mySplitOpen;
+  Standard_Real myTolerance{};
+  Standard_Boolean myShared{};
+  Standard_Boolean mySplitClosed{};
+  Standard_Boolean mySplitOpen{};
 
 
 };
index c176ed0d1cb535844afae8b2a3213d043ac9ac02..a8c64551b056752464aa4c3f6bf757d9968c5fc3 100644 (file)
@@ -17,6 +17,8 @@
 // 25.12.98 pdn renaming of ShapeAnalysis_FreeBounds and ShapeAnalysis_Wire methods
 //szv#4 S4163
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRepTools_WireExplorer.hxx>
 #include <Geom_Curve.hxx>
@@ -39,7 +41,7 @@
 
 #define NbControl 23
 
-static void ContourProperties(TopoDS_Wire wire,
+static void ContourProperties(const TopoDS_Wire& wire,
                              Standard_Real& countourArea,
                              Standard_Real& countourLength)
 {
@@ -49,9 +51,9 @@ static void ContourProperties(TopoDS_Wire wire,
   gp_XYZ prev, cont;
   
   for (BRepTools_WireExplorer exp(wire); exp.More(); exp.Next()) {
-    TopoDS_Edge Edge = exp.Current();  nbe++;
+    const TopoDS_Edge& Edge = exp.Current();  nbe++;
       
-    Standard_Real First, Last;
+    Standard_Real First = NAN, Last = NAN;
     Handle(Geom_Curve) c3d;
     ShapeAnalysis_Edge sae;
     if (!sae.Curve3d(Edge,c3d,First,Last)) continue;
@@ -85,11 +87,11 @@ static void ContourProperties(TopoDS_Wire wire,
 //purpose  : Empty constructor
 //=======================================================================
 
-ShapeAnalysis_FreeBoundsProperties::ShapeAnalysis_FreeBoundsProperties()
+ShapeAnalysis_FreeBoundsProperties::ShapeAnalysis_FreeBoundsProperties() : myTolerance(0.), myClosedFreeBounds(new ShapeAnalysis_HSequenceOfFreeBounds()), myOpenFreeBounds(new ShapeAnalysis_HSequenceOfFreeBounds())
 {
-  myClosedFreeBounds = new ShapeAnalysis_HSequenceOfFreeBounds();
-  myOpenFreeBounds   = new ShapeAnalysis_HSequenceOfFreeBounds();
-  myTolerance = 0.;
+  
+  
+  
 }
 
 //=======================================================================
@@ -101,10 +103,10 @@ ShapeAnalysis_FreeBoundsProperties::ShapeAnalysis_FreeBoundsProperties()
 ShapeAnalysis_FreeBoundsProperties::ShapeAnalysis_FreeBoundsProperties(const TopoDS_Shape& shape,
                                                                       const Standard_Real tolerance,
                                                                       const Standard_Boolean splitclosed,
-                                                                      const Standard_Boolean splitopen)
+                                                                      const Standard_Boolean splitopen) : myClosedFreeBounds(new ShapeAnalysis_HSequenceOfFreeBounds()), myOpenFreeBounds(new ShapeAnalysis_HSequenceOfFreeBounds())
 {
-  myClosedFreeBounds = new ShapeAnalysis_HSequenceOfFreeBounds();
-  myOpenFreeBounds   = new ShapeAnalysis_HSequenceOfFreeBounds();
+  
+  
   Init(shape, tolerance, splitclosed, splitopen);
 }
 
@@ -116,11 +118,11 @@ ShapeAnalysis_FreeBoundsProperties::ShapeAnalysis_FreeBoundsProperties(const Top
 
 ShapeAnalysis_FreeBoundsProperties::ShapeAnalysis_FreeBoundsProperties(const TopoDS_Shape& shape,
                                                                       const Standard_Boolean splitclosed,
-                                                                      const Standard_Boolean splitopen)
+                                                                      const Standard_Boolean splitopen) : myTolerance(0.), myClosedFreeBounds(new ShapeAnalysis_HSequenceOfFreeBounds()), myOpenFreeBounds(new ShapeAnalysis_HSequenceOfFreeBounds())
 {
-  myClosedFreeBounds = new ShapeAnalysis_HSequenceOfFreeBounds();
-  myOpenFreeBounds   = new ShapeAnalysis_HSequenceOfFreeBounds();
-  myTolerance =0.;
+  
+  
+  
   Init(shape, splitclosed, splitopen);
 }
 
@@ -205,7 +207,7 @@ Standard_Boolean ShapeAnalysis_FreeBoundsProperties::DispatchBounds()
   
   ShapeExtend_Explorer shexpl;
   Handle(TopTools_HSequenceOfShape) tmpSeq = shexpl.SeqFromCompound(tmpClosedBounds,Standard_False);
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 1; i<=tmpSeq->Length(); i++) { 
     TopoDS_Wire wire = TopoDS::Wire(tmpSeq->Value(i));
     Handle(ShapeAnalysis_FreeBoundData) fbData= new ShapeAnalysis_FreeBoundData() ;
@@ -232,7 +234,7 @@ Standard_Boolean ShapeAnalysis_FreeBoundsProperties::DispatchBounds()
 
 Standard_Boolean ShapeAnalysis_FreeBoundsProperties::CheckNotches(const Standard_Real prec) 
 {
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for(i = 1; i <= myClosedFreeBounds->Length(); i++) {
     Handle(ShapeAnalysis_FreeBoundData) fbData = myClosedFreeBounds->Value(i);
     CheckNotches(fbData, prec);
@@ -257,7 +259,7 @@ Standard_Boolean ShapeAnalysis_FreeBoundsProperties::CheckNotches(Handle(ShapeAn
   if (swd.NbEdges() > 1)
     for (Standard_Integer j=1; j <= swd.NbEdges(); j++) {
       TopoDS_Wire notch;
-      Standard_Real dMax;
+      Standard_Real dMax = NAN;
       if (CheckNotches(fbData->FreeBound(), j, notch, dMax, prec))
        fbData->AddNotch(notch, dMax);
     }
@@ -273,7 +275,7 @@ Standard_Boolean ShapeAnalysis_FreeBoundsProperties::CheckNotches(Handle(ShapeAn
 Standard_Boolean ShapeAnalysis_FreeBoundsProperties::CheckContours(const Standard_Real prec) 
 {
   Standard_Boolean status = Standard_False;
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for( i = 1; i <= myClosedFreeBounds->Length(); i++) {
     Handle(ShapeAnalysis_FreeBoundData) fbData = myClosedFreeBounds->Value(i);
     status |= FillProperties(fbData,prec);
@@ -322,7 +324,7 @@ Standard_Boolean ShapeAnalysis_FreeBoundsProperties::CheckNotches(const TopoDS_W
   TopoDS_Edge E2 = wdt->Edge(n2);
   B.Add(notch,E2);
   
-  Standard_Real First1, Last1, First2, Last2;
+  Standard_Real First1 = NAN, Last1 = NAN, First2 = NAN, Last2 = NAN;
   Handle(Geom_Curve) c3d1, c3d2;
   ShapeAnalysis_Edge sae;
   //szv#4:S4163:12Mar99 optimized
@@ -343,7 +345,7 @@ Standard_Boolean ShapeAnalysis_FreeBoundsProperties::CheckNotches(const TopoDS_W
       Standard_Real prm = ((NbControl-1-i)*First1 + i*Last1)/(NbControl-1);
       gp_Pnt pntCurr = c3d1->Value(prm);
 
-      Standard_Real p1, p2;
+      Standard_Real p1 = NAN, p2 = NAN;
       if ( First2 < Last2 ) {
        p1 = First2;
        p2 = Last2;
@@ -374,7 +376,7 @@ Standard_Boolean ShapeAnalysis_FreeBoundsProperties::CheckNotches(const TopoDS_W
 Standard_Boolean ShapeAnalysis_FreeBoundsProperties::FillProperties(Handle(ShapeAnalysis_FreeBoundData)& fbData,
                                                                    const Standard_Real /*prec*/) 
 {  
-  Standard_Real area, length;
+  Standard_Real area = NAN, length = NAN;
   ContourProperties(fbData->FreeBound(), area, length);
 
   Standard_Real r = 0;
index c85ba5cfd9d81bcae16aaac3f4fd78b73614259b..2b62ace0f0d121047fc8eb508defb28609664761 100644 (file)
@@ -143,9 +143,9 @@ private:
 
 
   TopoDS_Shape myShape;
-  Standard_Real myTolerance;
-  Standard_Boolean mySplitClosed;
-  Standard_Boolean mySplitOpen;
+  Standard_Real myTolerance{};
+  Standard_Boolean mySplitClosed{};
+  Standard_Boolean mySplitOpen{};
   Handle(ShapeAnalysis_HSequenceOfFreeBounds) myClosedFreeBounds;
   Handle(ShapeAnalysis_HSequenceOfFreeBounds) myOpenFreeBounds;
 
index e87e2840e460edd8bb167ab2c3aa8a43c6acc66b..a36e2595e2f073ddb383492ff4a2735247d43e01 100644 (file)
@@ -13,6 +13,8 @@
 
 //szv#4 S4163
 
+#include <math.h>
+
 #include <gp_GTrsf.hxx>
 #include <gp_Pln.hxx>
 #include <gp_Pnt.hxx>
@@ -34,21 +36,21 @@ Standard_Boolean ShapeAnalysis_Geom::NearestPlane(const TColgp_Array1OfPnt& Pnts
   //szv#4:S4163:12Mar99 warning
   GProp_PGProps Pmat(Pnts);
   gp_Pnt g = Pmat.CentreOfMass();
-  Standard_Real Xg,Yg,Zg;
+  Standard_Real Xg = NAN,Yg = NAN,Zg = NAN;
   g.Coord(Xg,Yg,Zg);
 
   GProp_PrincipalProps Pp = Pmat.PrincipalProperties();
   gp_Vec V1 = Pp.FirstAxisOfInertia();
-  Standard_Real Xv1,Yv1,Zv1;
+  Standard_Real Xv1 = NAN,Yv1 = NAN,Zv1 = NAN;
   V1.Coord(Xv1,Yv1,Zv1); 
   gp_Vec V2 = Pp.SecondAxisOfInertia(); 
-  Standard_Real Xv2,Yv2,Zv2;
+  Standard_Real Xv2 = NAN,Yv2 = NAN,Zv2 = NAN;
   V2.Coord(Xv2,Yv2,Zv2);
   gp_Vec V3 = Pp.ThirdAxisOfInertia(); 
-  Standard_Real Xv3,Yv3,Zv3;
+  Standard_Real Xv3 = NAN,Yv3 = NAN,Zv3 = NAN;
   V3.Coord(Xv3,Yv3,Zv3);
 
-  Standard_Real D,X,Y,Z;
+  Standard_Real D = NAN,X = NAN,Y = NAN,Z = NAN;
   Standard_Real Dmx1 = RealFirst();
   Standard_Real Dmn1 = RealLast();
   Standard_Real Dmx2 = RealFirst();
@@ -57,7 +59,7 @@ Standard_Boolean ShapeAnalysis_Geom::NearestPlane(const TColgp_Array1OfPnt& Pnts
   Standard_Real Dmn3 = RealLast();
 
   Standard_Integer ilow = Pnts.Lower(), iup = Pnts.Upper();
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = ilow; i <= iup; i ++) {
     Pnts(i).Coord(X,Y,Z);
     D = (X-Xg)*Xv1 +(Y-Yg)*Yv1 + (Z-Zg)*Zv1;
index 44335d996fd7306ba37deb6589fecdf4b09dec7f..c0218c1e5c45bbf36a4fa5ffbc19082ccceefd3f 100644 (file)
@@ -16,6 +16,8 @@
 
 //szv#4 S4163
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <Geom2d_Curve.hxx>
 #include <Geom2d_OffsetCurve.hxx>
 #include <TopTools_HSequenceOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
 
-ShapeAnalysis_ShapeContents::ShapeAnalysis_ShapeContents()
+ShapeAnalysis_ShapeContents::ShapeAnalysis_ShapeContents() : myBigSplineSec(new TopTools_HSequenceOfShape), myIndirectSec(new TopTools_HSequenceOfShape), myOffsetSurfaceSec(new TopTools_HSequenceOfShape), myTrimmed3dSec(new TopTools_HSequenceOfShape), myOffsetCurveSec(new TopTools_HSequenceOfShape), myTrimmed2dSec(new TopTools_HSequenceOfShape)
 {
-  myBigSplineSec = new TopTools_HSequenceOfShape;
-  myIndirectSec = new TopTools_HSequenceOfShape;
-  myOffsetSurfaceSec = new TopTools_HSequenceOfShape;
-  myTrimmed3dSec = new TopTools_HSequenceOfShape;
-  myOffsetCurveSec = new TopTools_HSequenceOfShape;
-  myTrimmed2dSec = new TopTools_HSequenceOfShape;
+  
+  
+  
+  
+  
+  
   ClearFlags();
 }
 
@@ -200,7 +202,7 @@ void ShapeAnalysis_ShapeContents::Perform(const TopoDS_Shape& Shape)
       nbwires ++;
       for (TopExp_Explorer edg(wire,TopAbs_EDGE); edg.More(); edg.Next()) {
        TopoDS_Edge edge = TopoDS::Edge (edg.Current());
-       Standard_Real first,last;       
+       Standard_Real first = NAN,last = NAN;   
        if (BRep_Tool::IsClosed (edge,face)) nbseam ++;
        Handle(Geom_Curve) c3d = BRep_Tool::Curve (edge,first,last);
        if (!c3d.IsNull()) {
@@ -247,7 +249,7 @@ void ShapeAnalysis_ShapeContents::Perform(const TopoDS_Shape& Shape)
     edge.Location(TopLoc_Location());
     mapsh.Add (edge);
     TopLoc_Location loc;
-    Standard_Real first,last;
+    Standard_Real first = NAN,last = NAN;
     myNbEdges++;
     Handle(Geom_Curve) c3d = BRep_Tool::Curve (edge,loc,first,last);
     if (!c3d.IsNull() && c3d->IsKind(STANDARD_TYPE(Geom_OffsetCurve))) {
index d589d1a94b2718910aaace091d02619a51ccb083..a9c5c43d3b77eee98b67df97343fc9c02cf9f3c0 100644 (file)
@@ -154,45 +154,45 @@ public:
 
 private:
 
-  Standard_Integer myNbSolids;
-  Standard_Integer myNbShells;
-  Standard_Integer myNbFaces;
-  Standard_Integer myNbWires;
-  Standard_Integer myNbEdges;
-  Standard_Integer myNbVertices;
-  Standard_Integer myNbSolidsWithVoids;
-  Standard_Integer myNbBigSplines;
-  Standard_Integer myNbC0Surfaces;
-  Standard_Integer myNbC0Curves;
-  Standard_Integer myNbOffsetSurf;
-  Standard_Integer myNbIndirectSurf;
-  Standard_Integer myNbOffsetCurves;
-  Standard_Integer myNbTrimmedCurve2d;
-  Standard_Integer myNbTrimmedCurve3d;
-  Standard_Integer myNbBSplibeSurf;
-  Standard_Integer myNbBezierSurf;
-  Standard_Integer myNbTrimSurf;
-  Standard_Integer myNbWireWitnSeam;
-  Standard_Integer myNbWireWithSevSeams;
-  Standard_Integer myNbFaceWithSevWires;
-  Standard_Integer myNbNoPCurve;
-  Standard_Integer myNbFreeFaces;
-  Standard_Integer myNbFreeWires;
-  Standard_Integer myNbFreeEdges;
-  Standard_Integer myNbSharedSolids;
-  Standard_Integer myNbSharedShells;
-  Standard_Integer myNbSharedFaces;
-  Standard_Integer myNbSharedWires;
-  Standard_Integer myNbSharedFreeWires;
-  Standard_Integer myNbSharedFreeEdges;
-  Standard_Integer myNbSharedEdges;
-  Standard_Integer myNbSharedVertices;
-  Standard_Boolean myBigSplineMode;
-  Standard_Boolean myIndirectMode;
-  Standard_Boolean myOffsetSurfaceMode;
-  Standard_Boolean myTrimmed3dMode;
-  Standard_Boolean myOffsetCurveMode;
-  Standard_Boolean myTrimmed2dMode;
+  Standard_Integer myNbSolids{};
+  Standard_Integer myNbShells{};
+  Standard_Integer myNbFaces{};
+  Standard_Integer myNbWires{};
+  Standard_Integer myNbEdges{};
+  Standard_Integer myNbVertices{};
+  Standard_Integer myNbSolidsWithVoids{};
+  Standard_Integer myNbBigSplines{};
+  Standard_Integer myNbC0Surfaces{};
+  Standard_Integer myNbC0Curves{};
+  Standard_Integer myNbOffsetSurf{};
+  Standard_Integer myNbIndirectSurf{};
+  Standard_Integer myNbOffsetCurves{};
+  Standard_Integer myNbTrimmedCurve2d{};
+  Standard_Integer myNbTrimmedCurve3d{};
+  Standard_Integer myNbBSplibeSurf{};
+  Standard_Integer myNbBezierSurf{};
+  Standard_Integer myNbTrimSurf{};
+  Standard_Integer myNbWireWitnSeam{};
+  Standard_Integer myNbWireWithSevSeams{};
+  Standard_Integer myNbFaceWithSevWires{};
+  Standard_Integer myNbNoPCurve{};
+  Standard_Integer myNbFreeFaces{};
+  Standard_Integer myNbFreeWires{};
+  Standard_Integer myNbFreeEdges{};
+  Standard_Integer myNbSharedSolids{};
+  Standard_Integer myNbSharedShells{};
+  Standard_Integer myNbSharedFaces{};
+  Standard_Integer myNbSharedWires{};
+  Standard_Integer myNbSharedFreeWires{};
+  Standard_Integer myNbSharedFreeEdges{};
+  Standard_Integer myNbSharedEdges{};
+  Standard_Integer myNbSharedVertices{};
+  Standard_Boolean myBigSplineMode{};
+  Standard_Boolean myIndirectMode{};
+  Standard_Boolean myOffsetSurfaceMode{};
+  Standard_Boolean myTrimmed3dMode{};
+  Standard_Boolean myOffsetCurveMode{};
+  Standard_Boolean myTrimmed2dMode{};
   Handle(TopTools_HSequenceOfShape) myBigSplineSec;
   Handle(TopTools_HSequenceOfShape) myIndirectSec;
   Handle(TopTools_HSequenceOfShape) myOffsetSurfaceSec;
index 722bf7f38364e138f4def489be0c43acd8d9ada9..6c26fa386aea2a88954a50ede8206ef56d5c7f50 100644 (file)
@@ -14,6 +14,8 @@
 //#76 rln 11.03.99 S4135: compute average without weights according to tolerances
 //szv#4 S4163
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <ShapeAnalysis_ShapeTolerance.hxx>
 #include <TopExp_Explorer.hxx>
@@ -86,7 +88,7 @@ Standard_Real ShapeAnalysis_ShapeTolerance::Tolerance(const TopoDS_Shape& shape,
 
  Handle(TopTools_HSequenceOfShape) ShapeAnalysis_ShapeTolerance::InTolerance(const TopoDS_Shape& shape,const Standard_Real valmin,const Standard_Real valmax,const TopAbs_ShapeEnum type) const
 {
-  Standard_Real tol;
+  Standard_Real tol = NAN;
   Standard_Boolean over = (valmax < valmin);  // pas de liminite max
   Handle(TopTools_HSequenceOfShape) sl = new TopTools_HSequenceOfShape ();
 
@@ -191,7 +193,7 @@ Standard_Real ShapeAnalysis_ShapeTolerance::Tolerance(const TopoDS_Shape& shape,
  void ShapeAnalysis_ShapeTolerance::AddTolerance(const TopoDS_Shape& shape,const TopAbs_ShapeEnum type) 
 {
   Standard_Integer nbt   = 0;
-  Standard_Real tol, cmin = 0.,cmoy = 0.,cmax = 0.;
+  Standard_Real tol = NAN, cmin = 0.,cmoy = 0.,cmax = 0.;
 
   TopExp_Explorer myExp;
 
index 47dcd78de15dfe5a0181fa7c57dbb3734708bfb7..823d4c3160e970f625ae04a7142de4914e62a736 100644 (file)
@@ -89,7 +89,7 @@ private:
 
 
 
-  Standard_Real myTols[3];
+  Standard_Real myTols[3]{};
   Standard_Integer myNbTol;
 
 
index 344be5a6e134e3adc90c4c03c8ac2be6f75d183a..014bf580d15930e7a4887181526f7f9efa5e50eb 100644 (file)
@@ -56,7 +56,7 @@ void ShapeAnalysis_Shell::Clear()
   if (shape.ShapeType() == TopAbs_SHELL) myShells.Add (shape); //szv#4:S4163:12Mar99 i =
   else {
     for (TopExp_Explorer exs (shape,TopAbs_SHELL); exs.More(); exs.Next()) {
-      TopoDS_Shape sh = exs.Current();
+      const TopoDS_Shape& sh = exs.Current();
       myShells.Add (sh); //szv#4:S4163:12Mar99 i =
     }
   }
@@ -120,7 +120,7 @@ Standard_Boolean ShapeAnalysis_Shell::CheckOrientedShells(const TopoDS_Shape& sh
 
   TopTools_IndexedMapOfShape dirs, revs, ints;
   for (TopExp_Explorer exs(shape,TopAbs_SHELL); exs.More(); exs.Next()) {
-    TopoDS_Shape sh = exs.Current();
+    const TopoDS_Shape& sh = exs.Current();
     //szv#4:S4163:12Mar99 optimized
     if (CheckEdges (sh,myBad,dirs,revs,ints))
       if (myShells.Add (sh)) res = Standard_True;
@@ -132,9 +132,9 @@ Standard_Boolean ShapeAnalysis_Shell::CheckOrientedShells(const TopoDS_Shape& sh
   //  Free Edges . Ce sont les edges d une map pas dans l autre
   //  et lycee de Versailles  (les maps dirs et revs)
   Standard_Integer nb = dirs.Extent();
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 1; i <= nb; i ++) {
-    TopoDS_Shape sh = dirs.FindKey (i);
+    const TopoDS_Shape& sh = dirs.FindKey (i);
     if (!myBad.Contains(sh)) {
       if (!revs.Contains(sh)) {
         if(checkinternaledges) {
@@ -154,7 +154,7 @@ Standard_Boolean ShapeAnalysis_Shell::CheckOrientedShells(const TopoDS_Shape& sh
 
   nb = revs.Extent();
   for (i = 1; i <= nb; i ++) {
-    TopoDS_Shape sh = revs.FindKey (i);
+    const TopoDS_Shape& sh = revs.FindKey (i);
     if (!myBad.Contains(sh)) {
       if (!dirs.Contains(sh)) {
         if(checkinternaledges) {
index 63fbb24801800b56135fa4e6dfab3b1e935b41b5..c3bbef319dc8054ff52662f660b893614b161e8f 100644 (file)
@@ -27,6 +27,8 @@
 //:r9 abv 09.04.99: id_turbine-C.stp #3865: check degenerated 2d point by recomputing to 3d instead of Resolution
 //:s5 abv 22.04.99  Adding debug printouts in catch {} blocks
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <Adaptor3d_IsoCurve.hxx>
 #include <BndLib_Add3dCurve.hxx>
@@ -95,14 +97,14 @@ namespace
 //=======================================================================
 ShapeAnalysis_Surface::ShapeAnalysis_Surface(const Handle(Geom_Surface)& S) :
   mySurf(S),
-  myExtOK(Standard_False), //:30
+  myAdSur(new GeomAdaptor_Surface(mySurf)), myExtOK(Standard_False), //:30
   myNbDeg(-1),
   myIsos(Standard_False),
   myIsoBoxes(Standard_False),
   myGap(0.), myUDelt(0.01), myVDelt(0.01), myUCloseVal(-1), myVCloseVal(-1)
 {
   mySurf->Bounds(myUF, myUL, myVF, myVL);
-  myAdSur = new GeomAdaptor_Surface(mySurf);
+  
 }
 
 //=======================================================================
@@ -162,7 +164,7 @@ void ShapeAnalysis_Surface::ComputeSingularities()
   //CKY 27-FEV-98 : en appel direct on peut forcer. En appel interne on optimise
   if (mySurf.IsNull())  return;
 
-  Standard_Real   su1, sv1, su2, sv2;
+  Standard_Real   su1 = NAN, sv1 = NAN, su2 = NAN, sv2 = NAN;
   //  mySurf->Bounds(su1, su2, sv1, sv2);
   Bounds(su1, su2, sv1, sv2);//modified by rln on 12/11/97 mySurf-> is deleted
 
@@ -429,7 +431,7 @@ Standard_Boolean ShapeAnalysis_Surface::ProjectDegenerated(const Standard_Intege
   myGap = Sqrt(gapMin);
   gp_Pnt2d pk;
 
-  Standard_Integer k; // svv Jan11 2000 : porting on DEC
+  Standard_Integer k = 0; // svv Jan11 2000 : porting on DEC
   for (k = j + step; k <= nbrPnt && k >= 1; k += step) {
     pk = pnt2d(k);
     gp_Pnt P1 = points(k);
@@ -564,7 +566,7 @@ Standard_Boolean ShapeAnalysis_Surface::IsUClosed(const Standard_Real preci)
   if (myUCloseVal < 0)
   {
     //    Faut calculer : calculs minimaux
-    Standard_Real uf, ul, vf, vl;
+    Standard_Real uf = NAN, ul = NAN, vf = NAN, vl = NAN;
     Bounds(uf, ul, vf, vl);//modified by rln on 12/11/97 mySurf-> is deleted
     //mySurf->Bounds (uf,ul,vf,vl);
     RestrictBounds (uf, ul, vf, vl);
@@ -777,7 +779,7 @@ Standard_Boolean ShapeAnalysis_Surface::IsVClosed(const Standard_Real preci)
   if (myVCloseVal < 0)
   {
     //    Faut calculer : calculs minimaux
-    Standard_Real uf, ul, vf, vl;
+    Standard_Real uf = NAN, ul = NAN, vf = NAN, vl = NAN;
     Bounds(uf, ul, vf, vl);//modified by rln on 12/11/97 mySurf-> is deleted
                            //    mySurf->Bounds (uf,ul,vf,vl);
     RestrictBounds (uf, ul, vf, vl);
@@ -980,7 +982,7 @@ Standard_Integer ShapeAnalysis_Surface::SurfaceNewton(const gp_Pnt2d &p2dPrev,
   gp_Pnt2d &sol)
 {
   GeomAdaptor_Surface& SurfAdapt = *Adaptor3d();
-  Standard_Real uf, ul, vf, vl;
+  Standard_Real uf = NAN, ul = NAN, vf = NAN, vl = NAN;
   Bounds(uf, ul, vf, vl);
   Standard_Real du = SurfAdapt.UResolution(preci);
   Standard_Real dv = SurfAdapt.VResolution(preci);
@@ -1137,7 +1139,7 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D, const Standard_Real
   myGap = -1.;    // devra etre calcule
   Standard_Boolean computed = Standard_True;  // a priori
 
-  Standard_Real uf, ul, vf, vl;
+  Standard_Real uf = NAN, ul = NAN, vf = NAN, vl = NAN;
   Bounds(uf, ul, vf, vl);//modified by rln on 12/11/97 mySurf-> is deleted
 
   { //:c9 abv 3 Mar 98: UKI60107-1 #350: to prevent 'catch' from catching exception raising below it
@@ -1379,7 +1381,7 @@ Standard_Real ShapeAnalysis_Surface::UVFromIso(const gp_Pnt& P3d, const Standard
   Standard_Real theMin = RealLast();
 
   gp_Pnt pntres;
-  Standard_Real Cf, Cl, UU, VV;
+  Standard_Real Cf = NAN, Cl = NAN, UU = NAN, VV = NAN;
 
   //  Initialisation des recherches : point deja trouve (?)
   UU = U; VV = V;
index e14e17454fa532f2ae95d6de6ace9a43fae8b635..1c6a053510749fbda4ddcc2d52bbfafa9e90b0a8 100644 (file)
@@ -315,18 +315,18 @@ protected:
   Extrema_ExtPS myExtPS;
   Standard_Boolean myExtOK;
   Standard_Integer myNbDeg;
-  Standard_Real myPreci[4];
+  Standard_Real myPreci[4]{};
   gp_Pnt myP3d[4];
   gp_Pnt2d myFirstP2d[4];
   gp_Pnt2d myLastP2d[4];
-  Standard_Real myFirstPar[4];
-  Standard_Real myLastPar[4];
-  Standard_Boolean myUIsoDeg[4];
+  Standard_Real myFirstPar[4]{};
+  Standard_Real myLastPar[4]{};
+  Standard_Boolean myUIsoDeg[4]{};
   Standard_Boolean myIsos;
-  Standard_Real myUF;
-  Standard_Real myUL;
-  Standard_Real myVF;
-  Standard_Real myVL;
+  Standard_Real myUF{};
+  Standard_Real myUL{};
+  Standard_Real myVF{};
+  Standard_Real myVL{};
   Handle(Geom_Curve) myIsoUF;
   Handle(Geom_Curve) myIsoUL;
   Handle(Geom_Curve) myIsoVF;
index ada07d4c72e7f9f9824da80fa4b931f84fe5bc81..efb60155108d62626dd3976becc922ee69d43dc8 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <Geom2d_Curve.hxx>
 #include <Geom_Curve.hxx>
@@ -29,10 +31,10 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeAnalysis_TransferParameters,Standard_Transient)
 //function : ShapeAnalysis_TransferParameters
 //purpose  : 
 //=======================================================================
-ShapeAnalysis_TransferParameters::ShapeAnalysis_TransferParameters()
+ShapeAnalysis_TransferParameters::ShapeAnalysis_TransferParameters() : myShift(0.), myScale(1.)
 {
-  myScale = 1.;
-  myShift = 0.;
+  
+  
 }
 
 
@@ -56,7 +58,7 @@ void ShapeAnalysis_TransferParameters::Init(const TopoDS_Edge& E, const TopoDS_F
 {
   myScale = 1.;
   myShift = 0.;
-  Standard_Real l,f,l2d = 0.0,f2d = 0.0;
+  Standard_Real l = NAN,f = NAN,l2d = 0.0,f2d = 0.0;
   TopLoc_Location L;
   myEdge = E;
   ShapeAnalysis_Edge sae;
@@ -117,7 +119,7 @@ Handle(TColStd_HSequenceOfReal) ShapeAnalysis_TransferParameters::Perform
 Standard_Real ShapeAnalysis_TransferParameters::Perform(const Standard_Real Param,
                                                         const Standard_Boolean To2d) 
 {
-  Standard_Real NewParam;
+  Standard_Real NewParam = NAN;
   if(To2d) 
     NewParam = myShift + Param*myScale;
   else
@@ -139,7 +141,7 @@ void ShapeAnalysis_TransferParameters::TransferRange(TopoDS_Edge& newEdge,
   ShapeBuild_Edge sbe;
   if(Is2d) {
     Standard_Real span2d = myLast2d - myFirst2d;  
-    Standard_Real tmp1,tmp2;
+    Standard_Real tmp1 = NAN,tmp2 = NAN;
     if(prevPar > currPar) {
       tmp1 = currPar;
       tmp2 = prevPar;
index 477584834be5458121d079f71fd96e67dfc1d5e0..30be45b88e43a27b8570936d5d8e26910c8efcd3 100644 (file)
@@ -87,19 +87,19 @@ public:
 protected:
 
 
-  Standard_Real myFirst;
-  Standard_Real myLast;
+  Standard_Real myFirst{};
+  Standard_Real myLast{};
   TopoDS_Edge myEdge;
-  Standard_Real myMaxTolerance;
+  Standard_Real myMaxTolerance{};
 
 
 private:
 
 
-  Standard_Real myShift;
-  Standard_Real myScale;
-  Standard_Real myFirst2d;
-  Standard_Real myLast2d;
+  Standard_Real myShift{};
+  Standard_Real myScale{};
+  Standard_Real myFirst2d{};
+  Standard_Real myLast2d{};
   TopoDS_Face myFace;
 
 
index 326c062a1e16d3d5bcf74f74059391a3e4520303..b13bf323aa0028c925622a9f6f7f7a20648906d5 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_GCurve.hxx>
 #include <BRep_ListOfPointRepresentation.hxx>
@@ -50,11 +52,11 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeAnalysis_TransferParametersProj,ShapeAnalysis_Tr
 //purpose  : 
 //=======================================================================
 ShapeAnalysis_TransferParametersProj::ShapeAnalysis_TransferParametersProj()
-: myPrecision(0.0)
+: myPrecision(0.0), myForceProj(Standard_False), myInitOK(Standard_False)
 {
   myMaxTolerance = 1; //Precision::Infinite(); ?? pdn
-  myForceProj = Standard_False;
-  myInitOK = Standard_False;
+  
+  
 }
 
 
@@ -64,10 +66,10 @@ ShapeAnalysis_TransferParametersProj::ShapeAnalysis_TransferParametersProj()
 //=======================================================================
 
 ShapeAnalysis_TransferParametersProj::ShapeAnalysis_TransferParametersProj(const TopoDS_Edge& E,
-                                                                           const TopoDS_Face& F)
+                                                                           const TopoDS_Face& F) : myForceProj(Standard_False)
 {
   myMaxTolerance = 1; //Precision::Infinite(); ?? pdn
-  myForceProj = Standard_False;
+  
   Init(E,F);
 }
 
@@ -91,7 +93,7 @@ void ShapeAnalysis_TransferParametersProj::Init(const TopoDS_Edge& E,
     
   if ( F.IsNull() ) return;
     
-  Standard_Real f2d, l2d;
+  Standard_Real f2d = NAN, l2d = NAN;
   ShapeAnalysis_Edge sae;
   if(sae.PCurve (E, F, myCurve2d, f2d, l2d, Standard_False)) {
       
@@ -131,7 +133,7 @@ Handle(TColStd_HSequenceOfReal) ShapeAnalysis_TransferParametersProj::Perform
   Standard_Real lastPar = last;
   Standard_Real prevPar = maxPar;
 
-  Standard_Integer j; // svv Jan 10 2000 : porting on DEC
+  Standard_Integer j = 0; // svv Jan 10 2000 : porting on DEC
   for(j = 1; j <= len; j++) {
     Standard_Real par = PreformSegment(Knots->Value(j),To2d,prevPar,lastPar);
     prevPar = par;
@@ -175,11 +177,11 @@ Standard_Real ShapeAnalysis_TransferParametersProj::PreformSegment(const Standar
      (! myForceProj && myPrecision < myMaxTolerance && BRep_Tool::SameParameter(myEdge)))
     return linPar;
   
-  Standard_Real linDev, projDev;
+  Standard_Real linDev = NAN, projDev = NAN;
   
   ShapeAnalysis_Curve sac;
   gp_Pnt pproj;
-  Standard_Real ppar;
+  Standard_Real ppar = NAN;
   if(To2d) {
     gp_Pnt p1 = myCurve->Value(Param).Transformed(myLocation.Inverted());
     Handle(Adaptor3d_Surface) AdS = myAC3d.GetSurface();
@@ -212,7 +214,7 @@ Standard_Real ShapeAnalysis_TransferParametersProj::Perform(const Standard_Real
      (! myForceProj && myPrecision < myMaxTolerance && BRep_Tool::SameParameter(myEdge)))
     return ShapeAnalysis_TransferParameters::Perform(Knot, To2d);
   
-  Standard_Real res;
+  Standard_Real res = NAN;
   if(To2d) 
     res = PreformSegment(Knot,To2d,myAC3d.FirstParameter(),myAC3d.LastParameter());
   else 
@@ -231,7 +233,7 @@ Standard_Real ShapeAnalysis_TransferParametersProj::Perform(const Standard_Real
 //function : CorrectParameter
 //purpose  : auxiliary
 //=======================================================================
-static Standard_Real CorrectParameter(const Handle(Geom2d_Curve) crv,
+static Standard_Real CorrectParameter(const Handle(Geom2d_Curve)& crv,
                                      const Standard_Real param)
 {
   if(crv->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
@@ -278,7 +280,7 @@ void ShapeAnalysis_TransferParametersProj::TransferRange(TopoDS_Edge& newEdge,
   gp_Pnt p2;
   Standard_Real alpha = 0, beta = 1;
   Standard_Real preci = Precision::PConfusion();
-  Standard_Real firstPar, lastPar;
+  Standard_Real firstPar = NAN, lastPar = NAN;
   if(prevPar < currPar) {
     firstPar = prevPar;
     lastPar  = currPar;
@@ -334,7 +336,7 @@ void ShapeAnalysis_TransferParametersProj::TransferRange(TopoDS_Edge& newEdge,
   TopLoc_Location EdgeLoc = myEdge.Location();
   ShapeAnalysis_Curve sac;
   gp_Pnt pproj;
-  Standard_Real ppar1,ppar2;
+  Standard_Real ppar1 = NAN,ppar2 = NAN;
   BRep_ListOfCurveRepresentation& tolist = (*((Handle(BRep_TEdge)*)&newEdge.TShape()))->ChangeCurves();
   Handle(BRep_GCurve) toGC;
   for (BRep_ListIteratorOfListOfCurveRepresentation toitcr (tolist); toitcr.More(); toitcr.Next()) {
@@ -498,11 +500,11 @@ TopoDS_Vertex ShapeAnalysis_TransferParametersProj::CopyNMVertex (const TopoDS_V
     return anewV;
   
   TopLoc_Location fromLoc;
-  Standard_Real f1,l1;
+  Standard_Real f1 = NAN,l1 = NAN;
   const Handle(Geom_Curve)& C1 = BRep_Tool::Curve(fromedge,fromLoc,f1,l1);
   fromLoc = fromLoc.Predivided(theV.Location());
   
-  Standard_Real f2,l2;
+  Standard_Real f2 = NAN,l2 = NAN;
   Handle(Geom_Curve) C2 = BRep_Tool::Curve(toedge,f2,l2);
   
   anewV = TopoDS::Vertex(theV.EmptyCopied());
@@ -580,7 +582,7 @@ TopoDS_Vertex ShapeAnalysis_TransferParametersProj::CopyNMVertex (const TopoDS_V
   //update tolerance
   Standard_Boolean needUpdate = Standard_False;
   gp_Pnt aPV = (*((Handle(BRep_TVertex)*)&anewV.TShape()))->Pnt();
-  TopLoc_Location toLoc = toedge.Location();
+  const TopLoc_Location& toLoc = toedge.Location();
   BRep_ListIteratorOfListOfCurveRepresentation toitcr
        ((*((Handle(BRep_TEdge)*)&toedge.TShape()))->ChangeCurves());
       
index b62a1687ba52d5b2b13842c0c3f180af34b92f94..94352710f64b7c53a86f38e4ec942a7d2d417c71 100644 (file)
@@ -101,10 +101,10 @@ private:
   Handle(Geom_Curve) myCurve;
   Handle(Geom2d_Curve) myCurve2d;
   Adaptor3d_CurveOnSurface myAC3d;
-  Standard_Real myPrecision;
+  Standard_Real myPrecision{};
   TopLoc_Location myLocation;
   Standard_Boolean myForceProj;
-  Standard_Boolean myInitOK;
+  Standard_Boolean myInitOK{};
 
 
 };
index 633917eb4bf513307590719f2275b51879f0ef12..6ca3f54980d90ff07e3bdf75cd97f6419b2b8cb5 100644 (file)
@@ -32,6 +32,8 @@
 //:s1 abv 22.04.99: PRO7226 #489490: ensure fixing of degenerated edge
 //#9 smh 14.12.99 BUC60615 Using tolerance of verteces during checking degenerated edge.
 
+#include <math.h>
+
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <Bnd_Array1OfBox2d.hxx>
 #include <Bnd_Box2d.hxx>
@@ -89,10 +91,10 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeAnalysis_Wire,Standard_Transient)
 //function : ShapeAnalysis_Wire
 //purpose  : 
 //=======================================================================
-ShapeAnalysis_Wire::ShapeAnalysis_Wire()
+ShapeAnalysis_Wire::ShapeAnalysis_Wire() : myPrecision(::Precision::Confusion())
 {
   ClearStatuses();
-  myPrecision = ::Precision::Confusion();
+  
 }
 
 //=======================================================================
@@ -299,7 +301,7 @@ void ShapeAnalysis_Wire::SetSurface (const Handle(Geom_Surface)& surface,
   myStatusEdgeCurves = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
   if ( ! IsReady() ) return Standard_False;
   
-  Standard_Integer i, nb = myWire->NbEdges();
+  Standard_Integer i = 0, nb = myWire->NbEdges();
   ShapeAnalysis_Edge SAE;
   
   for (i = 1; i <= nb; i++) {
@@ -374,7 +376,7 @@ void ShapeAnalysis_Wire::SetSurface (const Handle(Geom_Surface)& surface,
 {
   myStatusSelfIntersection = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
   if (!IsReady()) return Standard_False;
-  Standard_Integer i, nb = myWire->NbEdges();
+  Standard_Integer i = 0, nb = myWire->NbEdges();
   for (i = 1; i <= nb; i++) {
     CheckSelfIntersectingEdge (i);
     if (LastCheckStatus (ShapeExtend_DONE))
@@ -393,7 +395,7 @@ void ShapeAnalysis_Wire::SetSurface (const Handle(Geom_Surface)& surface,
   TopLoc_Location L;
   const Handle(Geom_Surface)& S = BRep_Tool::Surface(Face(), L);
   Handle(Geom2d_Curve) c2d;
-  Standard_Real cf,cl;
+  Standard_Real cf = NAN,cl = NAN;
   ShapeAnalysis_Edge sae;
   Handle(ShapeExtend_WireData) sbwd = WireData();
   for(i = 1; i <= nb; i++){
@@ -476,7 +478,7 @@ void ShapeAnalysis_Wire::SetSurface (const Handle(Geom_Surface)& surface,
   myStatusGaps3d = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
   if (!IsLoaded() || NbEdges() < 1) return Standard_False; //gka IsLoaded
   
-  Standard_Real dist, maxdist = 0.;
+  Standard_Real dist = NAN, maxdist = 0.;
   
   for (Standard_Integer i = 1; i <= NbEdges(); i++) {
     CheckGap3d(i);
@@ -501,7 +503,7 @@ void ShapeAnalysis_Wire::SetSurface (const Handle(Geom_Surface)& surface,
   myStatusGaps2d = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
   if (!IsReady() || NbEdges() < 1) return Standard_False;
   
-  Standard_Real dist, maxdist = 0.;
+  Standard_Real dist = NAN, maxdist = 0.;
 
   for (Standard_Integer i = 1; i <= NbEdges(); i++) {
     CheckGap2d(i);
@@ -526,7 +528,7 @@ void ShapeAnalysis_Wire::SetSurface (const Handle(Geom_Surface)& surface,
   myStatusCurveGaps = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
   if (!IsReady() || NbEdges() < 1) return Standard_False;
   
-  Standard_Real dist, maxdist = 0.;
+  Standard_Real dist = NAN, maxdist = 0.;
 
   for (Standard_Integer i = 1; i <= NbEdges(); i++) {
     CheckCurveGap(i);
@@ -583,7 +585,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckOrder(ShapeAnalysis_WireOrder &sawo,
     }
     if (!theMode3D || theModeBoth)
     {
-      Standard_Real f, l;
+      Standard_Real f = NAN, l = NAN;
       Handle(Geom2d_Curve) c2d;
       TopoDS_Shape tmpF = myFace.Oriented (TopAbs_FORWARD);
       if (!EA.PCurve(E, TopoDS::Face (tmpF), c2d, f, l))
@@ -731,7 +733,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckSmall (const Standard_Integer num,
   // Si pas de C3D, on essaie la C2D ...
 
   gp_Pnt Pm;
-  Standard_Real cf,cl;
+  Standard_Real cf = NAN,cl = NAN;
   Handle(Geom_Curve) c3d;    
   if ( sae.Curve3d (E,c3d,cf,cl,Standard_False) ) Pm = c3d->Value ( (cf+cl)/2. );
   else {
@@ -794,7 +796,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckSmall (const Standard_Integer num,
   Standard_Boolean ShapeAnalysis_Wire::CheckSeam(const Standard_Integer num) 
 {
   Handle(Geom2d_Curve) C1, C2;
-  Standard_Real cf, cl;
+  Standard_Real cf = NAN, cl = NAN;
   return CheckSeam (num, C1, C2, cf, cl);
 }
 
@@ -823,7 +825,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu
     // skl 30.12.2004 for OCC7630 - we have to check pcurve
     if( sae.HasPCurve(E1,Face()) && sae.HasPCurve(E3,Face()) ) {
       Handle(Geom2d_Curve) c2d;
-      Standard_Real fp,lp;
+      Standard_Real fp = NAN,lp = NAN;
       sae.PCurve ( E2, myFace, c2d, fp, lp, Standard_True );
       gp_Pnt2d p21 = c2d->Value(fp);
       gp_Pnt2d p22 = c2d->Value(lp);
@@ -863,7 +865,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu
   gp_Pnt p0 = BRep_Tool::Pnt (V0);
   gp_Pnt p1 = BRep_Tool::Pnt (V1);
   gp_Pnt p2 = BRep_Tool::Pnt (V2);
-  Standard_Real par1, par2;
+  Standard_Real par1 = NAN, par2 = NAN;
   Standard_Boolean lack = Standard_False;
   Standard_Boolean dgnr = Standard_False;
   //pdn 12.03.99 minimal value processing first
@@ -877,7 +879,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu
   if (p1.Distance(p2) <= precFirst) { // edge DGNR
     dgnr = mySurf->DegeneratedValues ( p1, precVtx, p2d1, p2d2, par1, par2, forward ); //smh#9
     if ( dgnr ) { // abv 24 Feb 00: trj3_as1-ac-214.stp #6065: avoid making closed edge degenerated
-      Standard_Real a, b;
+      Standard_Real a = NAN, b = NAN;
       Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E2, a, b );
       if ( ! C3d.IsNull() ) {
        gp_Pnt p = C3d->Value ( 0.5 * ( a + b ) );
@@ -899,9 +901,9 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu
     if ( p0.Distance ( p1 ) <= precFin ) {// ou DGNR manquante ?
       //rln S4135 singularity with precision = 2 * prec, but distance <= prec
       //lack = mySurf->DegeneratedValues ( p1, prec, p2d1, p2d2, par1, par2, forward);
-      Standard_Real tmpPreci;
+      Standard_Real tmpPreci = NAN;
       gp_Pnt tmpP3d;
-      Standard_Boolean tmpUIsoDeg;
+      Standard_Boolean tmpUIsoDeg = 0;
       //#77 rln S4135: using singularity which has minimum gap between singular point and input 3D point
       Standard_Integer indMin = -1;
       Standard_Real gapMin2 = RealLast();
@@ -940,7 +942,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu
   // make degenerative pcurve parametrized exactly from end of pcurve of the 
   // previous edge to the start of the next one
   if ( lack || n1 != n2 ) { //:i8 abv 18 Sep 98: ProSTEP TR9 r0501-ug.stp #182180: single degedge is a wire at apex of a cone
-    Standard_Real a, b;
+    Standard_Real a = NAN, b = NAN;
     Handle(Geom2d_Curve) c2d;
     if ( sae.PCurve ( E1, myFace, c2d, a, b, Standard_True ) ) {
       p2d1 = c2d->Value ( b );
@@ -1012,7 +1014,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu
   Standard_Integer n1 = ( n2  >1 ? n2-1 : NbEdges() );
   TopoDS_Edge E1 = myWire->Edge(n1);
   TopoDS_Edge E2 = myWire->Edge(n2);
-  Standard_Real uf1,ul1,uf2,ul2;
+  Standard_Real uf1 = NAN,ul1 = NAN,uf2 = NAN,ul2 = NAN;
   Handle(Geom_Curve) C1,C2;
   ShapeAnalysis_Edge SAE;
   if (!SAE.Curve3d (E1,C1,uf1,ul1) || !SAE.Curve3d (E2,C2,uf2,ul2)) {
@@ -1041,7 +1043,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu
   Standard_Integer n1 = ( n2  >1 ? n2-1 : NbEdges() );
   TopoDS_Edge E1 = myWire->Edge(n1);
   TopoDS_Edge E2 = myWire->Edge(n2);
-  Standard_Real uf1,ul1,uf2,ul2;
+  Standard_Real uf1 = NAN,ul1 = NAN,uf2 = NAN,ul2 = NAN;
   Handle(Geom2d_Curve) C1,C2;
   ShapeAnalysis_Edge SAE;
   if (!SAE.PCurve (E1,myFace,C1,uf1,ul1) || !SAE.PCurve (E2,myFace,C2,uf2,ul2)) {
@@ -1068,7 +1070,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu
   if ( !IsLoaded() || NbEdges() < 1 ) return Standard_False;
   Standard_Integer n = ( num >0 ? num  : NbEdges() );
   TopoDS_Edge E = myWire->Edge(n);
-  Standard_Real cuf,cul,pcuf,pcul;
+  Standard_Real cuf = NAN,cul = NAN,pcuf = NAN,pcul = NAN;
   Handle(Geom_Curve) c;
   ShapeAnalysis_Edge SAE;
   if (!SAE.Curve3d (E,c,cuf,cul,Standard_False)) {
@@ -1085,7 +1087,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu
   Adaptor3d_CurveOnSurface ACS(AC,AS);
   gp_Pnt cpnt, pcpnt;
   Standard_Integer nbp = 45;
-  Standard_Real dist, maxdist=0.;
+  Standard_Real dist = NAN, maxdist=0.;
   for (Standard_Integer i=0; i<nbp; i++) {
     cpnt = c->Value(cuf + i*(cul-cuf)/(nbp-1));
     pcpnt = ACS.Value(pcuf + i*(pcul-pcuf)/(nbp-1));
@@ -1112,7 +1114,7 @@ static gp_Pnt GetPointOnEdge ( const TopoDS_Edge &edge,
                               const Standard_Real param )
 {
   if ( BRep_Tool::SameParameter ( edge ) ) {
-    Standard_Real f,l;
+    Standard_Real f = NAN,l = NAN;
     TopLoc_Location L;
     const Handle(Geom_Curve) ConS = BRep_Tool::Curve ( edge, L, f, l );
     if ( ! ConS.IsNull() )
@@ -1139,7 +1141,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckSelfIntersectingEdge (const Standard_I
   TopoDS_Edge edge = WireData()->Edge ( num >0 ? num : NbEdges() );
   ShapeAnalysis_Edge sae;
 
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   Handle(Geom2d_Curve) Crv;
   if ( ! sae.PCurve ( edge, myFace, Crv, a, b, Standard_False ) ) {
     myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL1);
@@ -1237,7 +1239,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckIntersectingEdges (const Standard_Inte
   TopoDS_Vertex Vp = sae.FirstVertex ( edge1 );
   TopoDS_Vertex Vn = sae.LastVertex ( edge2 );
 
-  Standard_Real a1, b1, a2, b2;
+  Standard_Real a1 = NAN, b1 = NAN, a2 = NAN, b2 = NAN;
   Handle(Geom2d_Curve) Crv1, Crv2;
   if ( ! sae.PCurve ( edge1, myFace, Crv1, a1, b1, Standard_False ) ) {
     myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL3);
@@ -1312,7 +1314,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckIntersectingEdges (const Standard_Inte
 
     if ( Tr1.PositionOnCurve() != IntRes2d_Middle &&
         Tr2.PositionOnCurve() != IntRes2d_Middle ) continue;
-    Standard_Real param1, param2;
+    Standard_Real param1 = NAN, param2 = NAN;
     param1 = ( num ==1 ? IP.ParamOnSecond() : IP.ParamOnFirst() ); 
     param2 = ( num ==1 ? IP.ParamOnFirst()  : IP.ParamOnSecond() );
     
@@ -1390,7 +1392,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckIntersectingEdges(const Standard_Integ
   TopoDS_Edge edge2 = sbwd->Edge ( n2 );
   
   ShapeAnalysis_Edge sae;
-  Standard_Real a1, b1, a2, b2;
+  Standard_Real a1 = NAN, b1 = NAN, a2 = NAN, b2 = NAN;
   Handle(Geom2d_Curve) Crv1, Crv2;
   if(!sae.PCurve ( edge1, myFace, Crv1, a1, b1, Standard_False )){
     myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL3);
@@ -1528,7 +1530,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckLacking (const Standard_Integer num,
     return Standard_False;
   }
 
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   gp_Vec2d v1, v2, v12;
   Handle(Geom2d_Curve) c2d;
   if ( ! sae.PCurve ( E1, myFace, c2d, a, b, Standard_True ) ) {
@@ -1662,7 +1664,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckNotchedEdges(const Standard_Integer nu
     return Standard_False;
   }
 
-  Standard_Real a1, b1, a2, b2;
+  Standard_Real a1 = NAN, b1 = NAN, a2 = NAN, b2 = NAN;
   gp_Pnt2d p2d1, p2d2;
   gp_Vec2d v1, v2;
   Handle(Geom2d_Curve) c2d1, c2d2;
@@ -1704,7 +1706,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckNotchedEdges(const Standard_Integer nu
   Adaptor3d_CurveOnSurface Ad2(AC2d2,AdS2);
   
   Adaptor3d_CurveOnSurface longAD, shortAD;
-  Standard_Real lenP, firstP;
+  Standard_Real lenP = NAN, firstP = NAN;
   
   ShapeAnalysis_Curve sac;
   
@@ -1760,7 +1762,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckSmallArea(const TopoDS_Wire& theWire)
     return Standard_False;
   myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
 
-  Standard_Real aF, aL, aLength(0.0);
+  Standard_Real aF = NAN, aL = NAN, aLength(0.0);
   const Standard_Real anInv = 1.0 / static_cast<Standard_Real>(aNbControl - 1);
   gp_XY aCenter2d(0., 0.);
 
@@ -1854,7 +1856,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckSmallArea(const TopoDS_Wire& theWire)
 
  Standard_Boolean ShapeAnalysis_Wire::CheckShapeConnect(const TopoDS_Shape& shape,const Standard_Real prec) 
 {
-  Standard_Real tailhead, tailtail, headhead, headtail;
+  Standard_Real tailhead = NAN, tailtail = NAN, headhead = NAN, headtail = NAN;
   return CheckShapeConnect (tailhead, tailtail, headtail, headhead, shape, prec);
 }
 
index edb403eca4ee9f12a9533a75d611a2aca8885098..bf5b38dab1f7ba2fe6392411b59947524530bdaa 100644 (file)
@@ -528,24 +528,24 @@ protected:
   Handle(ShapeExtend_WireData) myWire;
   TopoDS_Face myFace;
   Handle(ShapeAnalysis_Surface) mySurf;
-  Standard_Real myPrecision;
-  Standard_Real myMin3d;
-  Standard_Real myMin2d;
-  Standard_Real myMax3d;
-  Standard_Real myMax2d;
-  Standard_Integer myStatusOrder;
-  Standard_Integer myStatusConnected;
-  Standard_Integer myStatusEdgeCurves;
-  Standard_Integer myStatusDegenerated;
-  Standard_Integer myStatusClosed;
-  Standard_Integer myStatusSmall;
-  Standard_Integer myStatusSelfIntersection;
-  Standard_Integer myStatusLacking;
-  Standard_Integer myStatusGaps3d;
-  Standard_Integer myStatusGaps2d;
-  Standard_Integer myStatusCurveGaps;
-  Standard_Integer myStatusLoop;
-  Standard_Integer myStatus;
+  Standard_Real myPrecision{};
+  Standard_Real myMin3d{};
+  Standard_Real myMin2d{};
+  Standard_Real myMax3d{};
+  Standard_Real myMax2d{};
+  Standard_Integer myStatusOrder{};
+  Standard_Integer myStatusConnected{};
+  Standard_Integer myStatusEdgeCurves{};
+  Standard_Integer myStatusDegenerated{};
+  Standard_Integer myStatusClosed{};
+  Standard_Integer myStatusSmall{};
+  Standard_Integer myStatusSelfIntersection{};
+  Standard_Integer myStatusLacking{};
+  Standard_Integer myStatusGaps3d{};
+  Standard_Integer myStatusGaps2d{};
+  Standard_Integer myStatusCurveGaps{};
+  Standard_Integer myStatusLoop{};
+  Standard_Integer myStatus{};
 
 
 private:
index 0b8b34c4f0abd7914c550956105055e120702ded..c57ed5e48a71d20ffbab03b04150978e84694beb 100644 (file)
@@ -16,6 +16,8 @@
 //szv#4 S4163
 //    pdn 09.05.99: S4174: preserve order of edges for complete torus
 
+#include <math.h>
+
 #include <gp_Pnt.hxx>
 #include <gp_XY.hxx>
 #include <gp_XYZ.hxx>
@@ -33,9 +35,9 @@
 //purpose  : 
 //=======================================================================
 ShapeAnalysis_WireOrder::ShapeAnalysis_WireOrder()
-        : myGap (0.0), myStat (0), myKeepLoops (Standard_False), myMode (Mode3D)
+        : myTol(Precision::Confusion()), myGap (0.0), myStat (0), myKeepLoops (Standard_False), myMode (Mode3D)
 {
-  myTol = Precision::Confusion();
+  
   Clear();
 }
 
@@ -303,16 +305,16 @@ void ShapeAnalysis_WireOrder::Perform (const Standard_Boolean /*closed*/)
       }
 
       // find minimum distance and joint type for 3D and 2D (if necessary) modes
-      Standard_Integer aCurJointType;
-      Standard_Real aCurMin;
+      Standard_Integer aCurJointType = 0;
+      Standard_Real aCurMin = NAN;
       // distance for four possible cases
       Standard_Real aSeqTailEdgeHead = aLastPnt3D.SquareDistance (aBegins3D (i));
       Standard_Real aSeqTailEdgeTail = aLastPnt3D.SquareDistance (anEnds3D (i));
       Standard_Real aSeqHeadEdgeTail = aFirstPnt3D.SquareDistance (anEnds3D (i));
       Standard_Real aSeqHeadEdgeHead = aFirstPnt3D.SquareDistance (aBegins3D (i));
       // the best distances for joints with head and tail of sequence
-      Standard_Real aMinDistToTail, aMinDistToHead;
-      Standard_Integer aTailJoinType, aHeadJointType;
+      Standard_Real aMinDistToTail = NAN, aMinDistToHead = NAN;
+      Standard_Integer aTailJoinType = 0, aHeadJointType = 0;
       if (aSeqTailEdgeHead <= aSeqTailEdgeTail)
       {
         aTailJoinType = 0;
@@ -594,7 +596,7 @@ void ShapeAnalysis_WireOrder::Perform (const Standard_Boolean /*closed*/)
             Standard_Real aReverseDist =
                     aCurLoopFirst.SquareDistance (aMainLoopLast) + aCurLoopLast.SquareDistance (aMainLoopFirst);
             // take the best result
-            Standard_Real aJoinDist;
+            Standard_Real aJoinDist = NAN;
             if ((aDirectDist < aTol2) || (aDirectDist < 2.0 * aReverseDist))
             {
               aJoinDist = aDirectDist;
@@ -667,7 +669,7 @@ void ShapeAnalysis_WireOrder::Perform (const Standard_Boolean /*closed*/)
     // check if edges were only shifted in reverse or forward, not reordered
     Standard_Boolean isShiftReverse = Standard_True;
     Standard_Boolean isShiftForward = Standard_True;
-    Standard_Integer aFirstIdx, aSecondIdx;
+    Standard_Integer aFirstIdx = 0, aSecondIdx = 0;
     Standard_Integer aLength = aMainLoop->Length();
     for (Standard_Integer i = 1; i <= aLength - 1; i++)
     {
@@ -788,7 +790,7 @@ Standard_Real ShapeAnalysis_WireOrder::Gap (const Standard_Integer num) const
 
 void ShapeAnalysis_WireOrder::SetChains (const Standard_Real gap)
 {
-  Standard_Integer n0, n1, n2, nb = NbEdges(); //szv#4:S4163:12Mar99 o0,o1,o2 not needed
+  Standard_Integer n0 = 0, n1 = 0, n2 = 0, nb = NbEdges(); //szv#4:S4163:12Mar99 o0,o1,o2 not needed
   if (nb == 0) return;
   TColStd_SequenceOfInteger chain;
   n0 = 0;
index 9fde3b198faa61e4940c494a055cca3df5455873..c765b7146985bf9fe3377aeabf1603df72fd7cf4 100644 (file)
@@ -13,6 +13,8 @@
 
 //szv#4 S4163
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <Geom_Curve.hxx>
 #include <gp_Pnt.hxx>
 //function : ShapeAnalysis_WireVertex
 //purpose  : 
 //=======================================================================
-ShapeAnalysis_WireVertex::ShapeAnalysis_WireVertex()
+ShapeAnalysis_WireVertex::ShapeAnalysis_WireVertex() : myDone(Standard_False), myPreci(Precision::Confusion())
 {
-  myDone = Standard_False;
-  myPreci = Precision::Confusion();
+  
+  
 }
 
 //=======================================================================
@@ -106,8 +108,8 @@ ShapeAnalysis_WireVertex::ShapeAnalysis_WireVertex()
   myDone = Standard_True;
   //  Analyse des vertex qui se suivent
   Handle(Geom_Curve) c1, c2;
-  Standard_Real cf, cl, upre, ufol;
-  Standard_Integer i, j, nb = myStat->Length(), stat;
+  Standard_Real cf = NAN, cl = NAN, upre = NAN, ufol = NAN;
+  Standard_Integer i = 0, j = 0, nb = myStat->Length(), stat = 0;
   ShapeAnalysis_Edge EA;
   for (i = 1; i <= nb; i ++) {
     stat = -1;  // au depart
@@ -141,7 +143,7 @@ ShapeAnalysis_WireVertex::ShapeAnalysis_WireVertex()
     //    Une edge se termine sur l autre : il faudra simplement relimiter
     //    Projection calculee sur une demi-edge (pour eviter les pbs de couture)
     gp_Pnt PJ1,PJ2;
-    Standard_Real U1,U2;
+    Standard_Real U1 = NAN,U2 = NAN;
     Standard_Real dj1 = ShapeAnalysis_Curve().Project (c1,P2,myPreci,PJ1,U1,(cf+upre)/2,upre);
     Standard_Real dj2 = ShapeAnalysis_Curve().Project (c2,P1,myPreci,PJ2,U2,ufol,(ufol+cl)/2);
     if (dj1 <= myPreci)       {  SetStart (i,PJ1.XYZ(),U1);  continue;  }
@@ -335,7 +337,7 @@ const Handle(ShapeExtend_WireData)& ShapeAnalysis_WireVertex::WireData() const
 {
   //szv#4:S4163:12Mar99 optimized
   if (!myStat.IsNull()) {
-    Standard_Integer i,nb = myStat->Length();
+    Standard_Integer i = 0,nb = myStat->Length();
     for (i = num+1; i <= nb; i ++) if (myStat->Value(i) == stat) return i;
   }
   return 0;
@@ -351,7 +353,7 @@ const Handle(ShapeExtend_WireData)& ShapeAnalysis_WireVertex::WireData() const
 {
   //szv#4:S4163:12Mar99 optimized
   if (!myStat.IsNull()) {
-    Standard_Integer i,nb = myStat->Length();
+    Standard_Integer i = 0,nb = myStat->Length();
     for (i = num+1; i <= nb; i ++) {
       Standard_Integer stat = myStat->Value(i);
       if ((crit == -1 && stat < 0) ||
index 34b2d5ff520cbbca92a8dad41a2f4cee67564603..ba0513f95173d4e2457821ceae11ebe33397f9d8 100644 (file)
@@ -15,6 +15,8 @@
 //    pdn 20.04.99 S4181  Moving algorithm for transforming pcurves from IGES processor
 //    abv 05.05.99 S4137: adding methods for copying ranges, reassigning pcurves etc.
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Curve3D.hxx>
 #include <BRep_CurveOnSurface.hxx>
@@ -288,8 +290,8 @@ void ShapeBuild_Edge::SetRange3d (const TopoDS_Edge& edge,
 
 void ShapeBuild_Edge::CopyPCurves (const TopoDS_Edge& toedge, const TopoDS_Edge& fromedge) const
 {
-  TopLoc_Location fromLoc = fromedge.Location();
-  TopLoc_Location toLoc = toedge.Location();
+  const TopLoc_Location& fromLoc = fromedge.Location();
+  const TopLoc_Location& toLoc = toedge.Location();
   for (BRep_ListIteratorOfListOfCurveRepresentation fromitcr
     ((*((Handle(BRep_TEdge)*)&fromedge.TShape()))->ChangeCurves()); fromitcr.More(); fromitcr.Next()) {
       Handle(BRep_GCurve) fromGC = Handle(BRep_GCurve)::DownCast(fromitcr.Value());
@@ -392,7 +394,7 @@ void ShapeBuild_Edge::ReplacePCurve (const TopoDS_Edge& edge,
   const TopoDS_Face& face) const
 {
   BRep_Builder B;
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   TopoDS_Shape dummy = edge.Reversed();
   TopoDS_Edge edgerev = TopoDS::Edge(dummy);
   // reverse face to take second pcurve for seams like SA_Edge::PCurve() does
@@ -443,7 +445,7 @@ Standard_Boolean ShapeBuild_Edge::ReassignPCurve (const TopoDS_Edge& edge,
   Standard_Integer npcurves = CountPCurves ( edge, old );
   //if ( npcurves <1 ) return Standard_False; //gka
 
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   Handle(Geom2d_Curve) pc;
   pc = BRep_Tool::CurveOnSurface ( edge, old, f, l );
   if ( pc.IsNull() ) return Standard_False;
@@ -470,7 +472,7 @@ Standard_Boolean ShapeBuild_Edge::ReassignPCurve (const TopoDS_Edge& edge,
     //smh#8 Porting AIX
     TopoDS_Shape tmpshape = edge.Reversed();
     TopoDS_Edge erev = TopoDS::Edge (tmpshape);
-    Standard_Real cf, cl;
+    Standard_Real cf = NAN, cl = NAN;
     Handle(Geom2d_Curve) pcs = BRep_Tool::CurveOnSurface ( erev, sub, cf, cl );
     if ( edge.Orientation() == TopAbs_REVERSED ) // because B.UpdateEdge does not check edge orientation
       B.UpdateEdge ( edge, pcs, pc, sub, 0. );
@@ -604,12 +606,12 @@ Standard_Boolean ShapeBuild_Edge::BuildCurve3d (const TopoDS_Edge& edge) const
         //#50 S4054 rln 14.12.98 write cylinder in BRep mode into IGES and read back
         //with 2DUse_Forced - pcurve and removed 3D curves have different ranges
         if (BRep_Tool::SameRange (edge)) {
-          Standard_Real first, last;
+          Standard_Real first = NAN, last = NAN;
           BRep_Tool::Range (edge, first, last);
           BRep_Builder().Range (edge, first, last);//explicit setting for all reps
         }
         Handle(Geom_Curve) c3d;
-        Standard_Real f,l;
+        Standard_Real f = NAN,l = NAN;
         c3d = BRep_Tool::Curve(edge,f,l);
         if (c3d.IsNull())
           return Standard_False;
index 89b9d6922315654040ac4b5e6c38974ec7bdfa19..1745e7448882313104e93cd3d58c7bca8e45a793 100644 (file)
@@ -59,7 +59,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
     TopoDS_Compound C;
     B.MakeCompound (C);
     for (TopoDS_Iterator it (shape); it.More(); it.Next()) {
-      TopoDS_Shape sh = it.Value();
+      const TopoDS_Shape& sh = it.Value();
       Standard_Integer stat = Status (sh,newsh,Standard_False);
       if (stat != 0) modif = 1;
       if (stat >= 0) B.Add (C,newsh);
@@ -75,7 +75,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
     TopoDS_Solid S;
     B.MakeSolid (S);
     for (TopoDS_Iterator it (shape); it.More(); it.Next()) {
-      TopoDS_Shape sh = it.Value();
+      const TopoDS_Shape& sh = it.Value();
       newsh = Apply (sh,until,buildmode);
       if (newsh.IsNull()) {
        modif = -1;
@@ -83,7 +83,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
       else if (newsh.ShapeType() != TopAbs_SHELL) {
        Standard_Integer nbsub = 0;
        for (TopExp_Explorer exh(newsh,TopAbs_SHELL); exh.More(); exh.Next()) {
-         TopoDS_Shape onesh = exh.Current ();
+         const TopoDS_Shape& onesh = exh.Current ();
          B.Add (S,onesh);
          nbsub ++;
        }
@@ -110,7 +110,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
     TopoDS_Shell S;
     B.MakeShell (S);
     for (TopoDS_Iterator it (shape); it.More(); it.Next()) {
-      TopoDS_Shape sh = it.Value();
+      const TopoDS_Shape& sh = it.Value();
       newsh = Apply (sh,until,buildmode);
       if (newsh.IsNull()) {
        modif = -1;
@@ -118,7 +118,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
       else if (newsh.ShapeType() != TopAbs_FACE) {
        Standard_Integer nbsub = 0;
        for (TopExp_Explorer exf(newsh,TopAbs_FACE); exf.More(); exf.Next()) {
-         TopoDS_Shape onesh = exf.Current ();
+         const TopoDS_Shape& onesh = exf.Current ();
          B.Add (S,onesh);
          nbsub ++;
        }
@@ -189,7 +189,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
   
   // apply recorded modifications to subshapes
   for ( TopoDS_Iterator it(shape,Standard_False); it.More(); it.Next() ) {
-    TopoDS_Shape sh = it.Value();
+    const TopoDS_Shape& sh = it.Value();
     newsh = Apply ( sh, until );
     if ( newsh != sh ) {
       if ( ShapeExtend::DecodeStatus ( myStatus, ShapeExtend_DONE4 ) )
@@ -207,7 +207,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape,
     }
     Standard_Integer nitems = 0;
     for ( TopoDS_Iterator subit(newsh); subit.More(); subit.Next(), nitems++ ) {
-      TopoDS_Shape subsh = subit.Value();
+      const TopoDS_Shape& subsh = subit.Value();
       if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh );
       else locStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 );
     }
index b053b171261ed1291d4b2c42070b43fd3672b34d..05503a98ad8f300b5dc6bbe1d3aee141417a514c 100644 (file)
@@ -14,6 +14,8 @@
 //    rln 22.03.99: syntax correction in CombineVertex
 //szv#4 S4163
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <gp_Pnt.hxx>
@@ -45,7 +47,7 @@ TopoDS_Vertex ShapeBuild_Vertex::CombineVertex (const gp_Pnt& pnt1,
                                                const Standard_Real tolFactor) const
 {
   gp_Pnt pos;
-  Standard_Real tol;
+  Standard_Real tol = NAN;
   
   gp_Vec v = pnt2.XYZ() - pnt1.XYZ();
   Standard_Real dist = v.Magnitude();
index d2a9ae3a346e935f2a014f6115047900384699e4..499c64514552cc08822ca85033d7da4942cdd37b 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom2d_Conic.hxx>
@@ -309,7 +311,7 @@ Standard_Boolean ShapeConstruct::JoinPCurves(const Handle(TopTools_HSequenceOfSh
       
       resOrient = TopAbs_FORWARD;
       Handle(Geom2d_Curve) c2d,c2d2;
-      Standard_Real first, last,first2, last2;
+      Standard_Real first = NAN, last = NAN,first2 = NAN, last2 = NAN;
       if(!sae.PCurve ( Edge, theFace, c2d, first, last, Standard_False ))
         break;
       
@@ -329,7 +331,7 @@ Standard_Boolean ShapeConstruct::JoinPCurves(const Handle(TopTools_HSequenceOfSh
       }
       else {
         Handle(Geom2d_Curve) newCrv;
-        Standard_Boolean isRev1,isRev2;
+        Standard_Boolean isRev1 = 0,isRev2 = 0;
         if(!JoinCurves(aCrvRes1,c2d,resOrient,Edge.Orientation(),newf,newl,first, last,newCrv,isRev1,isRev2)) 
           break;
         
index 66fd7791a77462792d52759304b9a0ddf7119ddc..034a10e120997512fb851230e5c4e026007d8741 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepBuilderAPI_MakeEdge.hxx>
@@ -46,7 +48,7 @@ Standard_Boolean IsRightContour (const TColgp_SequenceOfPnt& pts, const Standard
   if (len < 4) return Standard_True;
 
   TColgp_Array1OfPnt thePts(1,len);
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 1; i <= len; i++) thePts(i) = pts(i);
   
   gp_XYZ Norm(0,0,0);
@@ -89,7 +91,7 @@ Standard_Boolean IsRightContour (const TColgp_SequenceOfPnt& pts, const Standard
   Standard_Integer len = pts.Length();
   if (len < 3) return gp_Vec(0,0,0);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   gp_XYZ theCenter(0,0,0);
   for (i = 1; i <= len; i++) theCenter += pts(i).XYZ();
   theCenter /= len;
@@ -110,9 +112,9 @@ Standard_Boolean IsRightContour (const TColgp_SequenceOfPnt& pts, const Standard
 //=======================================================================
 
 ShapeConstruct_MakeTriangulation::ShapeConstruct_MakeTriangulation (const TColgp_Array1OfPnt& pnts,
-                                                                   const Standard_Real prec)
+                                                                   const Standard_Real prec) : myPrecision((prec > 0.0)? prec : Precision::Confusion())
 {
-  myPrecision = (prec > 0.0)? prec : Precision::Confusion();
+  
   // Make polygonal wire from points
   BRepBuilderAPI_MakePolygon mkPoly;
   for (Standard_Integer i = pnts.Lower(); i <= pnts.Upper(); i++) mkPoly.Add(pnts(i));
@@ -130,10 +132,10 @@ ShapeConstruct_MakeTriangulation::ShapeConstruct_MakeTriangulation (const TColgp
 //=======================================================================
 
 ShapeConstruct_MakeTriangulation::ShapeConstruct_MakeTriangulation (const TopoDS_Wire& wire,
-                                                                   const Standard_Real prec)
+                                                                   const Standard_Real prec) : myPrecision((prec > 0.0)? prec : Precision::Confusion()), myWire(wire)
 {
-  myPrecision = (prec > 0.0)? prec : Precision::Confusion();
-  myWire = wire;
+  
+  
   Build();
 }
 
@@ -263,9 +265,9 @@ ShapeConstruct_MakeTriangulation::ShapeConstruct_MakeTriangulation (const TopoDS
       if (cindex%4 == 0) {
        gp_Vec theBaseNorm = MeanNormal(theAPnt->Array1());
        // Identify sequence of matching facets
-       Standard_Integer len = cindex/2, lindex, rindex, seqlen, j;
-       Standard_Real theC, theC1 = 0.0, theC2 = 0.0;
-       Standard_Integer ii; // svv Jan11 2000 : porting on DEC
+       Standard_Integer len = cindex/2, lindex = 0, rindex = 0, seqlen = 0, j = 0;
+       Standard_Real theC = NAN, theC1 = 0.0, theC2 = 0.0;
+       Standard_Integer ii = 0; // svv Jan11 2000 : porting on DEC
         // skl : change "i" to "ii"
        for (ii = 0; ii < len; ii++) { 
          // Compute normal collinearity for facet
@@ -360,11 +362,11 @@ ShapeConstruct_MakeTriangulation::ShapeConstruct_MakeTriangulation (const TopoDS
   TColgp_SequenceOfPnt pts;
   for (TopoDS_Iterator ite(wire); ite.More(); ite.Next())
     pts.Append(BRep_Tool::Pnt(sae.FirstVertex(TopoDS::Edge(ite.Value()))));
-  Standard_Integer i, nbp = pts.Length();
+  Standard_Integer i = 0, nbp = pts.Length();
   if (nbp < 3) return;
 
   // Create mean plane
-  Standard_Real cMod, maxMod = 0.0;
+  Standard_Real cMod = NAN, maxMod = 0.0;
   gp_XYZ maxVec, Normal(0,0,0);
   for (i = 1; i <= nbp; i++) {
     gp_XYZ vb(pts(i).XYZ());
index d37d601ac7339be6991d58b4ae1fe2f25b132a64..a51b008c328dc219218c04411b25b19ac6e3019e 100644 (file)
@@ -29,6 +29,8 @@
 //:s5 abv 22.04.99  Adding debug printouts in catch {} blocks
 //#1  svv 11.01.00  Porting on DEC
 
+#include <math.h>
+
 #include <Approx_CurveOnSurface.hxx>
 #include <Geom2d_BSplineCurve.hxx>
 #include <Geom2d_Circle.hxx>
@@ -106,12 +108,12 @@ static void AdjustSecondPointToFirstPoint(const gp_Pnt2d& theFirstPoint,
 //purpose  : 
 //=======================================================================
 
-ShapeConstruct_ProjectCurveOnSurface::ShapeConstruct_ProjectCurveOnSurface()
+ShapeConstruct_ProjectCurveOnSurface::ShapeConstruct_ProjectCurveOnSurface() : myPreci(Precision::Confusion()), myBuild(Standard_False), myAdjustOverDegen(1), myNbCashe(0)
 {
-  myPreci = Precision::Confusion();
-  myBuild = Standard_False;
-  myAdjustOverDegen = 1; //:c0 //szv#4:S4163:12Mar99 was boolean
-  myNbCashe = 0; //:q9
+  
+  
+  //:c0 //szv#4:S4163:12Mar99 was boolean
+  //:q9
 }
 
 //=======================================================================
@@ -232,7 +234,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::Perform (Handle(Geom_Curv
 
   // discretize the 3d curve
 
-  Standard_Integer nbrPnt;
+  Standard_Integer nbrPnt = 0;
   
 //   $$$$    :92 abv 28 Jan 98   see PRO10107, big BSplineCurve C0
   Standard_Integer nbPini = NCONTROL;  // as in BRepCheck_Edge (RLN/Nijni)
@@ -268,7 +270,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::Perform (Handle(Geom_Curv
   TColStd_SequenceOfReal params;
   NCollection_Sequence<Standard_Real> aKnotCoeffs;
   gp_Pnt p3d;
-  Standard_Integer iPnt;
+  Standard_Integer iPnt = 0;
 
   // In case of bspline compute parametrization speed on each 
   // knot interval inside [aFirstParam, aLastParam].
@@ -311,7 +313,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::Perform (Handle(Geom_Curv
         }
       }
       Standard_Real aStep = (aLastParam - aFirstParam) / (aNbIntPnts - 1);
-      Standard_Integer anIntIdx;
+      Standard_Integer anIntIdx = 0;
       gp_Pnt p3d1, p3d2;
       // Start filling from first point.
       aC3DAdaptor.D0(aFirstParam, p3d1);
@@ -354,7 +356,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::Perform (Handle(Geom_Curv
     }
   }
 
-  Standard_Real deltaT, t;
+  Standard_Real deltaT = NAN, t = NAN;
   deltaT = (Last - First) / (nbPini-1);
   nbrPnt = nbPini;
   for (iPnt = 1; iPnt <= nbPini; iPnt ++)
@@ -538,8 +540,8 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
                                                Standard_Integer theSavedPoint, // Point number to choose period
                                                Standard_Real theSavedParam) // Param from cache to choose period
 {
-  Standard_Real aSavedParam;
-  Standard_Integer aSavedPoint;
+  Standard_Real aSavedParam = NAN;
+  Standard_Integer aSavedPoint = 0;
   Standard_Real aMinParam = 0.0, aMaxParam = thePeriod;
   if (theSavedPoint < 0) {
     // normalize to first period by default
@@ -674,7 +676,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
    // project first and last points
    for( ; i < 4; i +=3)
    {
-     Standard_Integer j;
+     Standard_Integer j = 0;
      for (j = 0; j < myNbCashe; j++)
      {
        if ( myCashe3d[j].SquareDistance (aP[i] ) < aTol2)
@@ -702,7 +704,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
      // Compute second and last but one c2d points.
      for(i = 1; i < 3; i++)
      {
-       Standard_Integer j;
+       Standard_Integer j = 0;
        for (j = 0; j < myNbCashe; j++)
        {
          if ( myCashe3d[j].SquareDistance (aP[i] ) < aTol2)
@@ -865,15 +867,15 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
   // test if the curve 3d is a boundary of the surface 
   // (only for Bezier or BSpline surface)
   
-  Standard_Boolean isoParam, isoPar2d3d, isoTypeU, p1OnIso, p2OnIso, isoclosed;
+  Standard_Boolean isoParam = 0, isoPar2d3d = 0, isoTypeU = 0, p1OnIso = 0, p2OnIso = 0, isoclosed = 0;
   gp_Pnt2d valueP1, valueP2;
   Handle(Geom_Curve) cIso;
-  Standard_Real t1, t2;
+  Standard_Real t1 = NAN, t2 = NAN;
   
   Handle(Standard_Type) sType = mySurf->Surface()->DynamicType();
   Standard_Boolean isAnalytic = Standard_True;
   if (sType == STANDARD_TYPE(Geom_BezierSurface) || sType == STANDARD_TYPE(Geom_BSplineSurface)) isAnalytic = Standard_False; 
-  Standard_Real uf, ul, vf, vl;
+  Standard_Real uf = NAN, ul = NAN, vf = NAN, vl = NAN;
   mySurf->Surface()->Bounds(uf, ul, vf, vl);
   isoclosed = Standard_False;
   TColStd_Array1OfReal pout(1, nbrPnt);
@@ -886,8 +888,8 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
   
   gp_Pnt p3d;
   gp_Pnt2d p2d;
-  Standard_Real isoValue=0., isoPar1=0., isoPar2=0., tPar=0., tdeb,tfin;
-  Standard_Real Cf, Cl, parf, parl; //szv#4:S4163:12Mar99 dist not needed
+  Standard_Real isoValue=0., isoPar1=0., isoPar2=0., tPar=0., tdeb = NAN,tfin = NAN;
+  Standard_Real Cf = NAN, Cl = NAN, parf = NAN, parl = NAN; //szv#4:S4163:12Mar99 dist not needed
   
   //  Le calcul part-il dans le bon sens, c-a-d deb et fin dans le bon ordre ?
   //  Si uclosed et iso en V, attention isoPar1 ET/OU 2 peut toucher la fermeture
@@ -1037,7 +1039,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
           else
           {
             //:q9 abv 23 Mar 99: use cache as 1st approach
-            Standard_Integer j; // svv #1
+            Standard_Integer j = 0; // svv #1
             for (j = 0; j < myNbCashe; ++j)
             {
               if (myCashe3d[j].SquareDistance(p3d) < myPreci*myPreci)
@@ -1102,10 +1104,10 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
   Standard_Real aTolLast  = (TolLast == -1)?  Precision::Confusion() : TolLast;
   for (Standard_Integer i = 1; ; i++)
   {
-    Standard_Real aPreci, aFirstPar, aLastPar;
+    Standard_Real aPreci = NAN, aFirstPar = NAN, aLastPar = NAN;
     gp_Pnt aP3d;
     gp_Pnt2d aFirstP2d, aLastP2d;
-    Standard_Boolean IsUiso;
+    Standard_Boolean IsUiso = 0;
     if (!mySurf->Singularity(i, aPreci, aP3d, aFirstP2d, aLastP2d, aFirstPar, aLastPar, IsUiso))
       break;
     if (aPreci <= Precision::Confusion() &&
@@ -1140,7 +1142,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
   // algo un peu complique, on retarde l implementation
   //Standard_Real Up = ul - uf;
   //Standard_Real Vp = vl - vf;
-  Standard_Real dist2d;
+  Standard_Real dist2d = NAN;
   const Standard_Real TolOnUPeriod = Precision::Confusion() * Up;
   const Standard_Real TolOnVPeriod = Precision::Confusion() * Vp;
 #ifdef OCCT_DEBUG
@@ -1151,7 +1153,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
   // Si la surface est UCLosed, on recadre les points
   if (mySurf->IsUClosed(myPreci) || needResolveUJump) {//#78 rln 12.03.99 S4135
     // Premier point dans le domain [uf, ul]
-    Standard_Real prevX, firstX = pnt2d (1).X();
+    Standard_Real prevX = NAN, firstX = pnt2d (1).X();
     if (!isFromCashe) {
       // do not shift 2dcurve, if it connects to previous
       while (firstX < uf)  {  firstX += Up;   pnt2d (1).SetX(firstX);  }
@@ -1219,7 +1221,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
   if (mySurf->IsVClosed(myPreci) || needResolveVJump ||
     mySurf->Surface()->IsKind (STANDARD_TYPE (Geom_SphericalSurface))) {
     // Premier point dans le domain [vf, vl]
-    Standard_Real prevY, firstY = pnt2d (1).Y();
+    Standard_Real prevY = NAN, firstY = pnt2d (1).Y();
     if (!isFromCashe) {
       // do not shift 2dcurve, if it connects to previous
       while (firstY < vf)  {  firstY += Vp;  pnt2d (1).SetY(firstY);  }
@@ -1379,7 +1381,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
        // 1st, find gap point (degenerated pole)
        Standard_Real PrevX=0.;
        Standard_Integer OnBound=0, PrevOnBound=0;
-       Standard_Integer ind; // svv #1
+       Standard_Integer ind = 0; // svv #1
        Standard_Boolean start = Standard_True;
        for ( ind=1; ind <= pnt2d.Length(); ind++ ) {
          Standard_Real CurX = pnt2d(ind).X();
@@ -1424,7 +1426,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
        // 1st, find gap point (degenerated pole)
        Standard_Real PrevY=0.;
        Standard_Integer OnBound=0, PrevOnBound=0;
-       Standard_Integer ind; // svv #1
+       Standard_Integer ind = 0; // svv #1
        Standard_Boolean start = Standard_True;
        for ( ind=1; ind <= pnt2d.Length(); ind++ ) {
          Standard_Real CurY = pnt2d(ind).Y();
@@ -1505,7 +1507,7 @@ Handle(Geom2d_Curve) ShapeConstruct_ProjectCurveOnSurface::ApproximatePCurve(con
     TColgp_Array1OfPnt points3d(1,numberPnt);
     gp_Pnt2d pnt2d;
     gp_Pnt pnt;
-    Standard_Integer i; // svv #1 
+    Standard_Integer i = 0; // svv #1 
     for( i = 1; i <= numberPnt; i++) {
       pnt2d = points2d->Value(i);
       pnt.SetCoord(pnt2d.X(),pnt2d.Y(),0);
@@ -1513,7 +1515,7 @@ Handle(Geom2d_Curve) ShapeConstruct_ProjectCurveOnSurface::ApproximatePCurve(con
     }
     
     GeomAPI_PointsToBSpline appr(points3d, params->Array1(), 1, 10, GeomAbs_C1, theTolerance2d);
-    Handle(Geom_BSplineCurve) crv3d = appr.Curve();
+    const Handle(Geom_BSplineCurve)& crv3d = appr.Curve();
     Standard_Integer NbPoles = crv3d->NbPoles();
     TColgp_Array1OfPnt poles3d (1, NbPoles);
     TColgp_Array1OfPnt2d poles2d (1, NbPoles);
@@ -1659,7 +1661,7 @@ void ShapeConstruct_ProjectCurveOnSurface::CorrectExtremity(const Handle(Geom_Cu
     mySurf->Surface()->IsVPeriodic() : mySurf->Surface()->IsUPeriodic();
 
   gp_Pnt2d FirstPointOfLine, SecondPointOfLine;
-  Standard_Real FinishParam, FirstParam, SecondParam;
+  Standard_Real FinishParam = NAN, FirstParam = NAN, SecondParam = NAN;
 
   if (theIsFirstPoint)
   {
@@ -1842,7 +1844,7 @@ InsertAdditionalPointOrAdjust(Standard_Boolean& ToAdjust,
 {
   Standard_Integer firstElem = points->Lower();
   Standard_Integer lastElem  = points->Upper();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer nbPntDropped = 0;
   Standard_Integer lastValid = firstElem; // indice of last undropped point
 
@@ -1912,7 +1914,7 @@ InsertAdditionalPointOrAdjust(Standard_Boolean& ToAdjust,
 {
   Standard_Integer firstElem = points->Lower();
   Standard_Integer lastElem  = points->Upper();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Integer nbPntDropped = 0;
   Standard_Integer lastValid = firstElem; // indice of last undropped point
 
@@ -2015,7 +2017,7 @@ InsertAdditionalPointOrAdjust(Standard_Boolean& ToAdjust,
   Standard_Boolean isoParam = Standard_False;
   isoPar2d3d = Standard_False;
   
-  Standard_Real U1, U2, V1, V2;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
   mySurf->Bounds(U1, U2, V1, V2);
   
   if ( mySurf->Surface()->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
@@ -2026,8 +2028,8 @@ InsertAdditionalPointOrAdjust(Standard_Boolean& ToAdjust,
   
   gp_Pnt pt;
   Standard_Integer mpt[2]; mpt[0] = mpt[1] = 0;
-  Standard_Real t, tpar[2] = { 0.0, 0.0 }, isoValue=0.;
-  Standard_Real mindist2;
+  Standard_Real t = NAN, tpar[2] = { 0.0, 0.0 }, isoValue=0.;
+  Standard_Real mindist2 = NAN;
   Standard_Real mind2[2];
   mindist2 = mind2[0] = mind2[1] = 4*prec*prec;
   
@@ -2039,7 +2041,7 @@ InsertAdditionalPointOrAdjust(Standard_Boolean& ToAdjust,
     Standard_Real isoVal=0.;
     Standard_Boolean isoU=Standard_False; //szv#4:S4163:12Mar99 `isoU` must be Standard_Boolean
     Handle(Geom_Curve) cI;
-    Standard_Real tt1, tt2;
+    Standard_Real tt1 = NAN, tt2 = NAN;
     
     if      (j == 1 ) {
       if (Precision::IsInfinite(U1)) continue;
@@ -2198,7 +2200,7 @@ InsertAdditionalPointOrAdjust(Standard_Boolean& ToAdjust,
     if (isoPar2d3d) isoParam = Standard_True;
     else {
       Standard_Real prevParam = tpar[0];
-      Standard_Real Cf, Cl;
+      Standard_Real Cf = NAN, Cl = NAN;
       Standard_Boolean isoByDistance = Standard_True;
       Cf = cIso->FirstParameter();
       Cl = cIso->LastParameter();
index dd8c679e7fa23ebbdbea4d13ad45164edabc3832..180c14d265a4bcf97d6e5272b0a3bb1920ce35a4 100644 (file)
@@ -158,7 +158,7 @@ protected:
   Handle(ShapeAnalysis_Surface) mySurf;
   Standard_Real myPreci;
   Standard_Boolean myBuild;
-  Standard_Integer myStatus;
+  Standard_Integer myStatus{};
   Standard_Integer myAdjustOverDegen;
   Standard_Integer myNbCashe;
   gp_Pnt myCashe3d[2];
index ebab162cbe8abb8d22cf0804447e475bbd2cfc80..e38ab328a10b7e2fa6e4e72facf347aefe4af34c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_GCurve.hxx>
 #include <BRep_TEdge.hxx>
@@ -241,25 +243,25 @@ static Standard_Boolean IsConvertCurve2d(const Handle(Geom2d_Curve)& aCurve,
 //purpose  : 
 //=======================================================================
 
-ShapeCustom_BSplineRestriction::ShapeCustom_BSplineRestriction()
+ShapeCustom_BSplineRestriction::ShapeCustom_BSplineRestriction() : myApproxSurfaceFlag(Standard_True), myApproxCurve3dFlag(Standard_True), myApproxCurve2dFlag(Standard_True), myTol3d(0.01), myTol2d(1E-6), myContinuity3d(GeomAbs_C1), myContinuity2d(GeomAbs_C2), myMaxDegree(9), myNbMaxSeg(10000), mySurfaceError(Precision::Confusion()), myCurve3dError(Precision::Confusion()), myCurve2dError(Precision::PConfusion()), myNbOfSpan(0), myConvert(Standard_False), myDeg(Standard_True), myRational(Standard_False), myParameters(new ShapeCustom_RestrictionParameters)
 {
-  myApproxSurfaceFlag = Standard_True;
-  myApproxCurve3dFlag = Standard_True;
-  myApproxCurve2dFlag = Standard_True; 
-  myTol3d = 0.01;
-  myTol2d = 1E-6;
-  myContinuity3d = GeomAbs_C1;
-  myContinuity2d =GeomAbs_C2 ;
-  myMaxDegree = 9;
-  myNbMaxSeg = 10000;
-  mySurfaceError = Precision::Confusion();
-  myCurve3dError = Precision::Confusion();
-  myCurve2dError = Precision::PConfusion();
-  myNbOfSpan = 0;
-  myConvert = Standard_False;
-  myDeg =Standard_True;
-  myRational = Standard_False;
-  myParameters = new ShapeCustom_RestrictionParameters;
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 
 }
 
@@ -273,25 +275,25 @@ ShapeCustom_BSplineRestriction::ShapeCustom_BSplineRestriction(const Standard_Bo
                                                                const Standard_Integer aMaxDegree,
                                                                const Standard_Integer aNbMaxSeg,
                                                                const Standard_Boolean Deg,
-                                                               const Standard_Boolean Rational)
+                                                               const Standard_Boolean Rational) : myApproxSurfaceFlag(anApproxSurfaceFlag), myApproxCurve3dFlag(anApproxCurve3dFlag), myApproxCurve2dFlag(anApproxCurve2dFlag), myTol3d(aTol3d), myTol2d(aTol2d), myMaxDegree(aMaxDegree), myContinuity3d(aContinuity3d), myContinuity2d(aContinuity2d), myNbMaxSeg(aNbMaxSeg), mySurfaceError(Precision::Confusion()), myCurve3dError(Precision::Confusion()), myCurve2dError(Precision::PConfusion()), myNbOfSpan(0), myConvert(Standard_False), myDeg(Deg), myRational(Rational), myParameters(new ShapeCustom_RestrictionParameters)
 {
-  myApproxSurfaceFlag = anApproxSurfaceFlag;
-  myApproxCurve3dFlag = anApproxCurve3dFlag;
-  myApproxCurve2dFlag = anApproxCurve2dFlag;
-  myTol3d = aTol3d;
-  myTol2d = aTol2d;
-  myMaxDegree = aMaxDegree;
-  myContinuity3d = aContinuity3d;
-  myContinuity2d = aContinuity2d;
-  myNbMaxSeg = aNbMaxSeg;
-  mySurfaceError = Precision::Confusion();
-  myCurve3dError = Precision::Confusion();
-  myCurve2dError = Precision::PConfusion();
-  myNbOfSpan = 0;
-  myConvert = Standard_False;
-  myDeg = Deg;
-  myRational = Rational;
-  myParameters = new ShapeCustom_RestrictionParameters;
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 
 }
 
@@ -306,25 +308,25 @@ ShapeCustom_BSplineRestriction::ShapeCustom_BSplineRestriction(const Standard_Bo
                                                                const Standard_Integer aNbMaxSeg,
                                                                const Standard_Boolean Deg,
                                                                const Standard_Boolean Rational,
-                                                               const Handle(ShapeCustom_RestrictionParameters)& aModes)
+                                                               const Handle(ShapeCustom_RestrictionParameters)& aModes) : myApproxSurfaceFlag(anApproxSurfaceFlag), myApproxCurve3dFlag(anApproxCurve3dFlag), myApproxCurve2dFlag(anApproxCurve2dFlag), myTol3d(aTol3d), myTol2d(aTol2d), myMaxDegree(aMaxDegree), myContinuity3d(aContinuity3d), myContinuity2d(aContinuity2d), myNbMaxSeg(aNbMaxSeg), mySurfaceError(Precision::Confusion()), myCurve3dError(Precision::Confusion()), myCurve2dError(Precision::PConfusion()), myNbOfSpan(0), myConvert(Standard_False), myDeg(Deg), myRational(Rational), myParameters(aModes)
 {
-  myApproxSurfaceFlag = anApproxSurfaceFlag;
-  myApproxCurve3dFlag = anApproxCurve3dFlag;
-  myApproxCurve2dFlag = anApproxCurve2dFlag;
-  myTol3d = aTol3d;
-  myTol2d = aTol2d;
-  myMaxDegree = aMaxDegree;
-  myContinuity3d = aContinuity3d;
-  myContinuity2d = aContinuity2d;
-  myNbMaxSeg = aNbMaxSeg;
-  mySurfaceError = Precision::Confusion();
-  myCurve3dError = Precision::Confusion();
-  myCurve2dError = Precision::PConfusion();
-  myNbOfSpan = 0;
-  myConvert = Standard_False;
-  myDeg = Deg;
-  myRational = Rational;
-  myParameters = aModes;
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 
 }
 
@@ -349,9 +351,9 @@ Standard_Boolean ShapeCustom_BSplineRestriction::NewSurface(const TopoDS_Face& F
   if(aSurface.IsNull()) return Standard_False;
   Standard_Boolean IsOf = Standard_True;
   if(myParameters->ConvertOffsetSurf()) IsOf = Standard_False;
-  Standard_Real UF,UL,VF,VL;
+  Standard_Real UF = NAN,UL = NAN,VF = NAN,VL = NAN;
   aSurface->Bounds(UF,UL,VF,VL);
-  Standard_Real Umin, Umax, Vmin, Vmax;
+  Standard_Real Umin = NAN, Umax = NAN, Vmin = NAN, Vmax = NAN;
   BRepTools::UVBounds(F,Umin, Umax, Vmin, Vmax);
   if(myParameters->SegmentSurfaceMode()) {
     UF = Umin; UL =  Umax;
@@ -515,7 +517,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
   if (aSurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
     Handle(Geom_RectangularTrimmedSurface) tmp = Handle(Geom_RectangularTrimmedSurface)::
       DownCast (aSurf);
-    Standard_Real U1,U2,V1,V2;
+    Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
     tmp->Bounds(U1,U2,V1,V2);
     Handle(Geom_Surface) theSurf = tmp->BasisSurface();
     Handle(Geom_Surface) ResSurface;
@@ -609,11 +611,11 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
 
   }*/
 
-  Standard_Real aTol3d;
-  Standard_Integer nbOfSpan,imax=10;
+  Standard_Real aTol3d = NAN;
+  Standard_Integer nbOfSpan = 0,imax=10;
   Standard_Integer MaxSeg = myNbMaxSeg;
   Standard_Integer MaxDeg = myMaxDegree;
-  Standard_Real u1,u2,v1,v2;
+  Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
   aSurf->Bounds(u1,u2,v1,v2);
   Standard_Real ShiftU = 0, ShiftV = 0;
   if( Abs(u1-UF) > Precision::PConfusion() || Abs(u2- UL) > Precision::PConfusion() || 
@@ -641,7 +643,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
 
       if(isTrim && (u1 != u2) && (v1 != v2)) {
         Handle(Geom_RectangularTrimmedSurface) trSurface = new Geom_RectangularTrimmedSurface(aSurf,u1,u2,v1,v2);
-        Standard_Real ur1,ur2,vr1,vr2;
+        Standard_Real ur1 = NAN,ur2 = NAN,vr1 = NAN,vr2 = NAN;
         trSurface->Bounds(ur1,ur2,vr1,vr2);
         ShiftU = u1-ur1;
         ShiftV = v1-vr1;
@@ -781,7 +783,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::NewCurve(const TopoDS_Edge& E,
 {
   if ( ! myApproxCurve3dFlag )
     return Standard_False;
-  Standard_Real First, Last;
+  Standard_Real First = NAN, Last = NAN;
   Handle(Geom_Curve) aCurve = BRep_Tool::Curve(E,L,First, Last);
   Standard_Real TolCur = BRep_Tool::Tolerance(E);
   //if(aCurve.IsNull()) return Standard_False;
@@ -1089,7 +1091,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::NewCurve2d(const TopoDS_Edge& E
 {
   if ( ! myApproxCurve2dFlag && !myApproxSurfaceFlag)
     return Standard_False;
-  Standard_Real First, Last,F1,L1;
+  Standard_Real First = NAN, Last = NAN,F1 = NAN,L1 = NAN;
   TopLoc_Location L,Loc1;
   Handle(Geom_Surface) aSurface = BRep_Tool::Surface(F,L);
   GeomAdaptor_Surface AdS(aSurface);
index ce500b8e32b12915c1c19b9cd6050bf6152bdc82..93370384e08f564ca17e57312c934e76a5771dbc 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_GCurve.hxx>
 #include <BRep_TEdge.hxx>
 #include <BRep_Tool.hxx>
@@ -96,9 +98,9 @@ Standard_Boolean ShapeCustom_ConvertToBSpline::NewSurface (const TopoDS_Face& F,
                                                           Standard_Boolean& RevFace) 
 {
   S = BRep_Tool::Surface(F,L);
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   S->Bounds(U1,U2,V1,V2);
-  Standard_Real Umin, Umax,Vmin,Vmax;
+  Standard_Real Umin = NAN, Umax = NAN,Vmin = NAN,Vmax = NAN;
   BRepTools::UVBounds(F,Umin, Umax, Vmin, Vmax);
   if(Precision::IsInfinite(U1) || Precision::IsInfinite(U2)) {
     U1 = Umin;
@@ -133,7 +135,7 @@ Standard_Boolean ShapeCustom_ConvertToBSpline::NewSurface (const TopoDS_Face& F,
   if(S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)) ) {
     Handle(Geom_RectangularTrimmedSurface) RTS = 
       Handle(Geom_RectangularTrimmedSurface)::DownCast ( S );
-    Standard_Real UF, UL, VF, VL;
+    Standard_Real UF = NAN, UL = NAN, VF = NAN, VL = NAN;
     RTS->Bounds ( UF, UL, VF, VL );
     S = new Geom_RectangularTrimmedSurface ( res, UF, UL, VF, VL );
   }
@@ -169,7 +171,7 @@ Standard_Boolean ShapeCustom_ConvertToBSpline::NewCurve (const TopoDS_Edge& E,
     Handle(Geom_Surface) S = GC->Surface();
     Handle(Geom_Surface) ES;
     if ( ! IsToConvert ( S, ES ) ) continue;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     C = BRep_Tool::Curve ( E, L, f, l );
     if ( ! C.IsNull() ) C = Handle(Geom_Curve)::DownCast ( C->Copy() );
     Tol = BRep_Tool::Tolerance ( E );
@@ -209,7 +211,7 @@ Standard_Boolean ShapeCustom_ConvertToBSpline::NewCurve2d (const TopoDS_Edge& E,
   // just copy pcurve if either its surface is changing or edge was copied
   if ( ! IsToConvert ( S, ES ) && E.IsSame ( NewE ) ) return Standard_False;
   
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   C = BRep_Tool::CurveOnSurface(E,F,f,l);
   if ( ! C.IsNull() ) 
     C = Handle(Geom2d_Curve)::DownCast ( C->Copy() );
index be7eb83ede2629fed772623e297a25e91f693604..240180091f942d9e462e08610a102da1e46a8c73 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_GCurve.hxx>
 #include <BRep_TEdge.hxx>
@@ -156,7 +158,7 @@ Standard_Boolean ShapeCustom_ConvertToRevolution::NewSurface (const TopoDS_Face&
     if ( S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)) ) {
       Handle(Geom_RectangularTrimmedSurface) RTS = 
        Handle(Geom_RectangularTrimmedSurface)::DownCast ( S );
-      Standard_Real U1, U2, V1, V2;
+      Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
       RTS->Bounds ( U1, U2, V1, V2 );
       S = new Geom_RectangularTrimmedSurface ( Rev, U1, U2, V1, V2 );
     }
@@ -195,7 +197,7 @@ Standard_Boolean ShapeCustom_ConvertToRevolution::NewCurve (const TopoDS_Edge& E
     Handle(Geom_Surface) S = GC->Surface();
     Handle(Geom_ElementarySurface) ES;
     if ( ! IsToConvert ( S, ES ) ) continue;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     C = BRep_Tool::Curve ( E, L, f, l );
     if ( ! C.IsNull() ) C = Handle(Geom_Curve)::DownCast ( C->Copy() );
     Tol = BRep_Tool::Tolerance ( E );
@@ -235,7 +237,7 @@ Standard_Boolean ShapeCustom_ConvertToRevolution::NewCurve2d (const TopoDS_Edge&
   // just copy pcurve if either its surface is changing or edge was copied
   if ( ! IsToConvert ( S, ES ) && E.IsSame ( NewE ) ) return Standard_False;
   
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   C = BRep_Tool::CurveOnSurface(E,F,f,l);
   if ( ! C.IsNull() ) {
     C = Handle(Geom2d_Curve)::DownCast ( C->Copy() );
index 319d2bd015431a8b954f3b038b35c4f246b80522..83c5af322c643476976213c5d65df506a1b80085 100644 (file)
@@ -61,7 +61,7 @@ Standard_Boolean ShapeCustom_Curve2d::IsLinear(const TColgp_Array1OfPnt2d& thePo
   Standard_Real dMax = 0;
   Standard_Integer iMax1=0,iMax2=0;
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = 1; i < nbPoles; i++)
     for(Standard_Integer j = i+1; j <= nbPoles; j++) {
       Standard_Real dist = thePoles(i).SquareDistance(thePoles(j));
@@ -149,7 +149,7 @@ Handle(Geom2d_Line) ShapeCustom_Curve2d::ConvertToLine2d (const Handle(Geom2d_Cu
 Standard_Boolean ShapeCustom_Curve2d::SimplifyBSpline2d (Handle(Geom2d_BSplineCurve)& theBSpline2d,
                                                          const Standard_Real theTolerance)
 {
-  Standard_Integer aInitNbK;
+  Standard_Integer aInitNbK = 0;
   Standard_Integer NbK = aInitNbK = theBSpline2d->NbKnots();
   // search knot to remove
   Standard_Boolean IsToRemove = Standard_True;
index 19ec660ce21540f28b06d8ca7344c92cd0d0ad09..b286b41eb3452335f879b1223ce52b95d7abe341 100644 (file)
@@ -18,6 +18,8 @@
 // locations into account
 //szv 03.01.01 PositiveCones merged in
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_GCurve.hxx>
 #include <BRep_TEdge.hxx>
@@ -147,7 +149,7 @@ Standard_Boolean ShapeCustom_DirectModification::NewCurve (const TopoDS_Edge& E,
     Handle(Geom_Surface) S = GC->Surface();
     TopLoc_Location Loc = GC->Location();
     if ( ! IsIndirectSurface ( S, Loc ) ) continue;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     C = BRep_Tool::Curve ( E, L, f, l );
     if ( ! C.IsNull() ) C = Handle(Geom_Curve)::DownCast ( C->Copy() );
     Tol = BRep_Tool::Tolerance(E);
@@ -187,7 +189,7 @@ Standard_Boolean ShapeCustom_DirectModification::NewCurve2d (const TopoDS_Edge&
   Standard_Integer result = IsIndirectSurface ( S, L );
   if ( !result && E.IsSame(NewE) ) return Standard_False;
 
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   C = BRep_Tool::CurveOnSurface( E, F, f, l );
   Tol = BRep_Tool::Tolerance(E);
 
index 4e3bca9707e2e4662a6d51ae27bbe888835fb578..23f88426ac96802ea89f703b091000e05cf84e25 100644 (file)
@@ -23,27 +23,27 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeCustom_RestrictionParameters,Standard_Transient)
 //function : ShapeCustom_RestrictionParameters
 //purpose  : 
 //=======================================================================
-ShapeCustom_RestrictionParameters::ShapeCustom_RestrictionParameters()
+ShapeCustom_RestrictionParameters::ShapeCustom_RestrictionParameters() : myGMaxSeg(10000), myGMaxDegree(15), myConvPlane(Standard_False), myConvConicalSurf(Standard_False), myConvSphericalSurf(Standard_False), myConvCylindricalSurf(Standard_False), myConvToroidalSurf(Standard_False), myConvBezierSurf(Standard_False), myConvRevolSurf(Standard_True), myConvExtrSurf(Standard_True), myConvOffsetSurf(Standard_True), mySegmentSurfaceMode(Standard_True), myConvCurve3d(Standard_True), myConvOffsetCurv3d(Standard_True), myConvCurve2d(Standard_True), myConvOffsetCurv2d(Standard_True)
 {
-  myGMaxSeg = 10000;
-  myGMaxDegree = 15;
   
-  myConvPlane         = Standard_False;
+  
+  
+  
   //myConvElementarySurf = Standard_False;
   //conversion of elementary surfaces are off by default
-  myConvConicalSurf = Standard_False;
-  myConvSphericalSurf = Standard_False;
-  myConvCylindricalSurf = Standard_False;
-  myConvToroidalSurf = Standard_False;
-  
-  myConvBezierSurf    = Standard_False;
-  myConvRevolSurf     = Standard_True;
-  myConvExtrSurf      = Standard_True;
-  myConvOffsetSurf    = Standard_True;
-  mySegmentSurfaceMode= Standard_True;
-  myConvCurve3d       = Standard_True;
-  myConvOffsetCurv3d  = Standard_True;
-  myConvCurve2d       = Standard_True;
-  myConvOffsetCurv2d  = Standard_True;
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 }
 
index b2704aa783a72c38fc263e5c625ec6877eb28b4b..0667b2e28a8fc4a25b556553aae5a28ae7ad4b6e 100644 (file)
@@ -14,6 +14,8 @@
 //abv 06.01.99 fix of misprint
 //:p6 abv 26.02.99: make ConvertToPeriodic() return Null if nothing done
 
+#include <math.h>
+
 #include <ShapeCustom_Surface.hxx>
 
 #include <ElSLib.hxx>
@@ -78,8 +80,8 @@ Handle(Geom_Surface) ShapeCustom_Surface::ConvertToAnalytical (const Standard_Re
 {
   Handle(Geom_Surface) newSurf;
 
-  Standard_Integer nUP, nVP, nCP, i, j , UDeg, VDeg;
-  Standard_Real U1, U2, V1, V2, C1, C2, DU, DV, U=0, V=0;
+  Standard_Integer nUP = 0, nVP = 0, nCP = 0, i = 0, j = 0 , UDeg = 0, VDeg = 0;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN, C1 = NAN, C2 = NAN, DU = NAN, DV = NAN, U=0, V=0;
   Handle(Geom_Curve) iso;
   Standard_Boolean uClosed = Standard_True;
 
@@ -283,7 +285,7 @@ Handle(Geom_Surface) ShapeCustom_Surface::ConvertToAnalytical (const Standard_Re
                   0.5*(p3(1).Z()+p3(2).Z()));
        gp_Vec aVec(p10, p3(1));
        gp_Vec aVec2(p10, p3(3));
-       Standard_Real RR1 = R(1), RR2 = R(2), RR3;
+       Standard_Real RR1 = R(1), RR2 = R(2), RR3 = NAN;
        aVec ^= aVec2;
 
        if (aVec.Magnitude() <= gp::Resolution()) aVec.SetCoord(0., 0., 1.);
@@ -322,7 +324,7 @@ Handle(Geom_Surface) ShapeCustom_Surface::ConvertToAnalytical (const Standard_Re
   gp_Pnt P3d, P3d2;
   Standard_Boolean onSurface = Standard_True;
 
-  Standard_Real dis;  myGap = 0.;
+  Standard_Real dis = NAN;  myGap = 0.;
 
   DU = (U2-U1)/(NP-1);
   DV = (V2-V1)/(NP-1);
index 6205e4bd9b6d8c96bb2b657945870f49801ceeeb..2840b4c3d6683910cf4e68ba7f5b45ac0f764cd0 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <GeomAdaptor_SurfaceOfLinearExtrusion.hxx>
 #include <GeomAdaptor_SurfaceOfRevolution.hxx>
 #include <BRep_Builder.hxx>
@@ -192,7 +194,7 @@ Standard_Boolean ShapeCustom_SweptToElementary::NewCurve(const TopoDS_Edge& E,
     Handle(Geom_Surface) S = GC->Surface();
     Handle(Geom_SweptSurface) SS;
     if(!IsToConvert(S,SS)) continue;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     C = BRep_Tool::Curve ( E, L, f, l );
     if ( ! C.IsNull() ) C = Handle(Geom_Curve)::DownCast ( C->Copy() );
     Tol = BRep_Tool::Tolerance ( E );
@@ -234,7 +236,7 @@ Standard_Boolean ShapeCustom_SweptToElementary::NewCurve2d(const TopoDS_Edge& E,
   // just copy pcurve if either its surface is changing or edge was copied
   if ( !IsToConvert(S,SS) && E.IsSame(NewE) ) return Standard_False;
   
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   C = BRep_Tool::CurveOnSurface(E,F,f,l);
   if ( ! C.IsNull() ) {
     C = Handle(Geom2d_Curve)::DownCast ( C->Copy() );
@@ -242,7 +244,7 @@ Standard_Boolean ShapeCustom_SweptToElementary::NewCurve2d(const TopoDS_Edge& E,
     if ( !NS.IsNull() && NS->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) {
       if(SS->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) {
         Handle(Geom_SurfaceOfRevolution) SR = Handle(Geom_SurfaceOfRevolution)::DownCast(SS);
-        Standard_Real U1,U2,V1,V2;
+        Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
         SR->Bounds(U1,U2,V1,V2);
         gp_Pnt P0;
         SR->D0(U1,V1,P0);
@@ -257,10 +259,10 @@ Standard_Boolean ShapeCustom_SweptToElementary::NewCurve2d(const TopoDS_Edge& E,
        Handle(Geom_SurfaceOfRevolution) SR = Handle(Geom_SurfaceOfRevolution)::DownCast(SS);
         gp_Pnt PR,PS;
         Handle(Geom_SphericalSurface) SPH = Handle(Geom_SphericalSurface)::DownCast(NS);
-        Standard_Real US1,US2,VS1,VS2;
+        Standard_Real US1 = NAN,US2 = NAN,VS1 = NAN,VS2 = NAN;
         SPH->Bounds(US1,US2,VS1,VS2);
         SPH->D0(US1,VS1,PS);
-        Standard_Real UR1,UR2,VR1,VR2;
+        Standard_Real UR1 = NAN,UR2 = NAN,VR1 = NAN,VR2 = NAN;
         SR->Bounds(UR1,UR2,VR1,VR2);
         SR->D0(UR1,VR1,PR);
         gp_Pnt P0 = SPH->Location();
index 883334815c769e02362849a6bd2c4c991e2e16bc..980beb843386e5e3ef81eabe069964d651417e13 100644 (file)
@@ -16,6 +16,8 @@
 
 //    pdn 13.07.99 Derivatives are scaled in accordance with local/global parameter transition
 
+#include <math.h>
+
 #include <gp_Pnt.hxx>
 #include <gp_Trsf.hxx>
 #include <gp_Vec.hxx>
@@ -28,9 +30,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeExtend_ComplexCurve,Geom_Curve)
 //function : ShapeExtend_ComplexCurve
 //purpose  : 
 //=======================================================================
-ShapeExtend_ComplexCurve::ShapeExtend_ComplexCurve()
+ShapeExtend_ComplexCurve::ShapeExtend_ComplexCurve() : myClosed(Standard_False)
 {
-  myClosed = Standard_False;
+  
 }
 
 //=======================================================================
@@ -51,7 +53,7 @@ ShapeExtend_ComplexCurve::ShapeExtend_ComplexCurve()
 
  void ShapeExtend_ComplexCurve::D0(const Standard_Real U,gp_Pnt& P) const
 {
-  Standard_Real UOut;
+  Standard_Real UOut = NAN;
   Standard_Integer ind = LocateParameter (U, UOut);
   Curve(ind)->D0(UOut, P);
 }
@@ -63,7 +65,7 @@ ShapeExtend_ComplexCurve::ShapeExtend_ComplexCurve()
 
  void ShapeExtend_ComplexCurve::D1(const Standard_Real U,gp_Pnt& P,gp_Vec& V1) const
 {
-  Standard_Real UOut;
+  Standard_Real UOut = NAN;
   Standard_Integer ind = LocateParameter (U, UOut);
   Curve(ind)->D1(UOut, P, V1);
   TransformDN(V1,ind,1);
@@ -76,7 +78,7 @@ ShapeExtend_ComplexCurve::ShapeExtend_ComplexCurve()
 
  void ShapeExtend_ComplexCurve::D2(const Standard_Real U,gp_Pnt& P,gp_Vec& V1,gp_Vec& V2) const
 {
-  Standard_Real UOut;
+  Standard_Real UOut = NAN;
   Standard_Integer ind = LocateParameter (U, UOut);
   Curve(ind)->D2(UOut, P, V1, V2);
   TransformDN(V1,ind,1);
@@ -90,7 +92,7 @@ ShapeExtend_ComplexCurve::ShapeExtend_ComplexCurve()
 
  void ShapeExtend_ComplexCurve::D3(const Standard_Real U,gp_Pnt& P,gp_Vec& V1,gp_Vec& V2,gp_Vec& V3) const
 {
-  Standard_Real UOut;
+  Standard_Real UOut = NAN;
   Standard_Integer ind = LocateParameter (U, UOut);
   Curve(ind)->D3(UOut, P, V1, V2, V3);
   TransformDN(V1,ind,1);
@@ -105,7 +107,7 @@ ShapeExtend_ComplexCurve::ShapeExtend_ComplexCurve()
 
  gp_Vec ShapeExtend_ComplexCurve::DN(const Standard_Real U,const Standard_Integer N) const
 {
-  Standard_Real UOut;
+  Standard_Real UOut = NAN;
   Standard_Integer ind = LocateParameter (U, UOut);
   gp_Vec res = Curve(ind)->DN(UOut, N);
   if(N)
index b4994f3c0cc91ecf18409ce9e3935fd4d0242aeb..c442de7230ac2f81985224d354e2bf96e2d7763a 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_Curve.hxx>
 #include <Geom_Geometry.hxx>
 #include <gp_Pnt.hxx>
@@ -319,7 +321,7 @@ Standard_Real ShapeExtend_CompositeSurface::ULocalToGlobal (const Standard_Integ
                                                            const Standard_Integer j,
                                                            const Standard_Real u) const
 {
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
   myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
   Standard_Real scale = ( myUJointValues->Value(i+1) - myUJointValues->Value(i) ) / ( u2 - u1 );
   return u * scale + ( myUJointValues->Value(i) - u1 * scale ); // ! this formula is stable if u1 is infinite
@@ -334,7 +336,7 @@ Standard_Real ShapeExtend_CompositeSurface::VLocalToGlobal (const Standard_Integ
                                                            const Standard_Integer j,
                                                            const Standard_Real v) const
 {
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
   myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
   Standard_Real scale = ( myVJointValues->Value(j+1) - myVJointValues->Value(j) ) / ( v2 - v1 );
   return v * scale + ( myVJointValues->Value(j) - v1 * scale ); // ! this formula is stable if v1 is infinite
@@ -349,7 +351,7 @@ gp_Pnt2d ShapeExtend_CompositeSurface::LocalToGlobal (const Standard_Integer i,
                                                      const Standard_Integer j,
                                                      const gp_Pnt2d &uv) const
 {
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
   myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
   Standard_Real scaleu = ( myUJointValues->Value(i+1) - myUJointValues->Value(i) ) / ( u2 - u1 );
   Standard_Real scalev = ( myVJointValues->Value(j+1) - myVJointValues->Value(j) ) / ( v2 - v1 );
@@ -366,7 +368,7 @@ Standard_Real ShapeExtend_CompositeSurface::UGlobalToLocal (const Standard_Integ
                                                            const Standard_Integer j,
                                                            const Standard_Real U) const
 {
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
   myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
   Standard_Real scale = ( u2 - u1 ) / ( myUJointValues->Value(i+1) - myUJointValues->Value(i) );
   return U * scale + ( u1 - myUJointValues->Value(i) * scale ); // ! this formula is stable if u1 is infinite
@@ -381,7 +383,7 @@ Standard_Real ShapeExtend_CompositeSurface::VGlobalToLocal (const Standard_Integ
                                                            const Standard_Integer j,
                                                            const Standard_Real V) const
 {
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
   myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
   Standard_Real scale = ( v2 - v1 ) / ( myVJointValues->Value(j+1) - myVJointValues->Value(j) );
   return V * scale + ( v1 - myVJointValues->Value(j) * scale ); // ! this formula is stable if v1 is infinite
@@ -396,7 +398,7 @@ gp_Pnt2d ShapeExtend_CompositeSurface::GlobalToLocal (const Standard_Integer i,
                                                      const Standard_Integer j,
                                                      const gp_Pnt2d &UV) const
 {
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
   myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
   Standard_Real scaleu = ( u2 - u1 ) / ( myUJointValues->Value(i+1) - myUJointValues->Value(i) );
   Standard_Real scalev = ( v2 - v1 ) / ( myVJointValues->Value(j+1) - myVJointValues->Value(j) );
@@ -414,7 +416,7 @@ Standard_Boolean ShapeExtend_CompositeSurface::GlobalToLocalTransformation (cons
                                                                            Standard_Real &uFact,
                                                                            gp_Trsf2d &Trsf) const
 {
-  Standard_Real u1, u2, v1, v2;
+  Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
   myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
 
   Standard_Real scaleu = ( u2 - u1 ) / ( myUJointValues->Value(i+1) - myUJointValues->Value(i) );
@@ -732,8 +734,8 @@ void ShapeExtend_CompositeSurface::ComputeJointValues (const ShapeExtend_Paramet
   myVJointValues = new TColStd_HArray1OfReal(1,NbV+1);
   
   if ( param == ShapeExtend_Natural ) {
-    Standard_Real U1, U2, V1, V2, U=0, V=0;
-    Standard_Integer i; // svv Jan 10 2000 : porting on DEC
+    Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN, U=0, V=0;
+    Standard_Integer i = 0; // svv Jan 10 2000 : porting on DEC
     for ( i = 1; i <= NbU; i++ ) {
       myPatches->Value(i,1)->Bounds(U1,U2,V1,V2);
       if ( i ==1 ) myUJointValues->SetValue ( 1, U = U1 );
@@ -753,7 +755,7 @@ void ShapeExtend_CompositeSurface::ComputeJointValues (const ShapeExtend_Paramet
       stepu /= NbU; 
       stepv /= NbV;
     }
-    Standard_Integer i; // svv Jan 10 2000 : porting on DEC
+    Standard_Integer i = 0; // svv Jan 10 2000 : porting on DEC
     for ( i=0; i <= NbU; i++ )
       myUJointValues->SetValue ( i+1, i * stepu );
     for ( i=0; i <= NbV; i++ )
@@ -790,15 +792,15 @@ Standard_Boolean ShapeExtend_CompositeSurface::CheckConnectivity (const Standard
   Standard_Integer NbV = NbVPatches();
   
   // check in u direction
-  Standard_Integer i,j; // svv Jan 10 2000 : porting on DEC
+  Standard_Integer i = 0,j = 0; // svv Jan 10 2000 : porting on DEC
   for ( i=1, j = NbU; i <= NbU; j = i++ ) {
     Standard_Real maxdist2 = 0.;
     for ( Standard_Integer k=1; k <= NbV; k++ ) {
       Handle(Geom_Surface) sj = myPatches->Value(j,k);
       Handle(Geom_Surface) si = myPatches->Value(i,k);
-      Standard_Real Uj1, Uj2, Vj1, Vj2;
+      Standard_Real Uj1 = NAN, Uj2 = NAN, Vj1 = NAN, Vj2 = NAN;
       GetLimitedBounds ( sj, Uj1, Uj2, Vj1, Vj2 );
-      Standard_Real Ui1, Ui2, Vi1, Vi2;
+      Standard_Real Ui1 = NAN, Ui2 = NAN, Vi1 = NAN, Vi2 = NAN;
       GetLimitedBounds ( si, Ui1, Ui2, Vi1, Vi2 );
       Standard_Real stepj = ( Vj2 - Vj1 ) / ( NPOINTS - 1 );
       Standard_Real stepi = ( Vi2 - Vi1 ) / ( NPOINTS - 1 );
@@ -819,9 +821,9 @@ Standard_Boolean ShapeExtend_CompositeSurface::CheckConnectivity (const Standard
     for ( Standard_Integer k=1; k <= NbU; k++ ) {
       Handle(Geom_Surface) sj = myPatches->Value(k,j);
       Handle(Geom_Surface) si = myPatches->Value(k,i);
-      Standard_Real Uj1, Uj2, Vj1, Vj2;
+      Standard_Real Uj1 = NAN, Uj2 = NAN, Vj1 = NAN, Vj2 = NAN;
       GetLimitedBounds ( sj, Uj1, Uj2, Vj1, Vj2 );
-      Standard_Real Ui1, Ui2, Vi1, Vi2;
+      Standard_Real Ui1 = NAN, Ui2 = NAN, Vi1 = NAN, Vi2 = NAN;
       GetLimitedBounds ( si, Ui1, Ui2, Vi1, Vi2 );
       Standard_Real stepj = ( Uj2 - Uj1 ) / ( NPOINTS - 1 );
       Standard_Real stepi = ( Ui2 - Ui1 ) / ( NPOINTS - 1 );
index 032ba503974dbb0eaee6a91ff0b887da7eecec7b..ddd6bfb87a02f378fd2235fa2d09bb2857d09497 100644 (file)
@@ -302,8 +302,8 @@ private:
   Handle(TColGeom_HArray2OfSurface) myPatches;
   Handle(TColStd_HArray1OfReal) myUJointValues;
   Handle(TColStd_HArray1OfReal) myVJointValues;
-  Standard_Boolean myUClosed;
-  Standard_Boolean myVClosed;
+  Standard_Boolean myUClosed{};
+  Standard_Boolean myVClosed{};
 
 
 };
index 97a99eed4b341847ba7dc6535b16778103bd96ff..0b69a60915834693b292ba73d55366bc2d8bfaa0 100644 (file)
@@ -42,7 +42,7 @@ TopoDS_Shape ShapeExtend_Explorer::CompoundFromSeq
   BRep_Builder B;
   TopoDS_Compound C;
   B.MakeCompound(C);
-  Standard_Integer i,n = seqval->Length();
+  Standard_Integer i = 0,n = seqval->Length();
   for (i = 1; i <= n ; i ++)  B.Add(C,seqval->Value(i));
   return C;
 }
@@ -56,7 +56,7 @@ static void FillList (const Handle(TopTools_HSequenceOfShape)& list,
                      const TopoDS_Shape& comp, const Standard_Boolean expcomp)
 {
   for (TopoDS_Iterator it (comp); it.More(); it.Next()) {
-    TopoDS_Shape sub = it.Value();
+    const TopoDS_Shape& sub = it.Value();
     if (sub.ShapeType() != TopAbs_COMPOUND) list->Append (sub);
     else if (!expcomp) list->Append (sub);
     else FillList (list,sub,expcomp);
@@ -87,7 +87,7 @@ void ShapeExtend_Explorer::ListFromSeq (const Handle(TopTools_HSequenceOfShape)&
 {
   if (clear) lisval.Clear();
   if (seqval.IsNull()) return;
-  Standard_Integer i, nb = seqval->Length();
+  Standard_Integer i = 0, nb = seqval->Length();
   for (i = 1; i <= nb; i ++) lisval.Append (seqval->Value(i));
 }
 
@@ -118,7 +118,7 @@ TopAbs_ShapeEnum ShapeExtend_Explorer::ShapeType (const TopoDS_Shape& shape,
   if (!compound || res != TopAbs_COMPOUND) return res;
   res = TopAbs_SHAPE;
   for (TopoDS_Iterator iter(shape); iter.More(); iter.Next()) {
-    TopoDS_Shape sh = iter.Value();
+    const TopoDS_Shape& sh = iter.Value();
     if (sh.IsNull()) continue;
     TopAbs_ShapeEnum typ = sh.ShapeType();
     if (typ == TopAbs_COMPOUND) typ = ShapeType (sh,compound);
@@ -248,7 +248,7 @@ void ShapeExtend_Explorer::DispatchList (const Handle(TopTools_HSequenceOfShape)
   if (compsols.IsNull())  compsols  = new TopTools_HSequenceOfShape();
   if (compounds.IsNull()) compounds = new TopTools_HSequenceOfShape();
 
-  Standard_Integer i,nb = list->Length();
+  Standard_Integer i = 0,nb = list->Length();
   for (i = 1; i <= nb; i ++) {
     TopoDS_Shape sh = list->Value(i);
     if (sh.IsNull()) continue;
index 4ef48536af3616724f0da81dda65dcce54b16949..d145adca96652a590ad9f0ca12d50bf57a59e288 100644 (file)
@@ -15,6 +15,8 @@
 //    abv 28.04.99  S4137: added method Add(WireData), method SetLast fixed
 //    abv 05.05.99  S4174: protection against INTERNAL/EXTERNAL edges
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepBuilderAPI_MakeWire.hxx>
@@ -63,7 +65,7 @@ ShapeExtend_WireData::ShapeExtend_WireData (const TopoDS_Wire& wire,
 void ShapeExtend_WireData::Init (const Handle(ShapeExtend_WireData)& other) 
 {
   Clear();
-  Standard_Integer i, nb = other->NbEdges();
+  Standard_Integer i = 0, nb = other->NbEdges();
   for (i = 1; i <= nb; i++) Add ( other->Edge(i) );
   nb = other->NbNonManifoldEdges();
   for (i = 1; i <= nb; i++) Add ( other->NonmanifoldEdge(i) );
@@ -155,7 +157,7 @@ void ShapeExtend_WireData::ComputeSeams (const Standard_Boolean enforce)
   mySeams = new TColStd_HSequenceOfInteger();
   mySeamF = mySeamR = 0;
   TopoDS_Shape S;
-  Standard_Integer i, nb = NbEdges();
+  Standard_Integer i = 0, nb = NbEdges();
   TopTools_IndexedMapOfShape ME;
   Standard_Integer* SE = new Standard_Integer [nb+1];
 
@@ -191,7 +193,7 @@ void ShapeExtend_WireData::ComputeSeams (const Standard_Boolean enforce)
 void ShapeExtend_WireData::SetLast (const Standard_Integer num) 
 {
   if (num == 0) return;
-  Standard_Integer i, nb = NbEdges();
+  Standard_Integer i = 0, nb = NbEdges();
   for (i = nb; i > num; i--) {
     TopoDS_Edge edge = TopoDS::Edge ( myEdges->Value(nb) );
     myEdges->Remove (nb);
@@ -207,7 +209,7 @@ void ShapeExtend_WireData::SetLast (const Standard_Integer num)
 
 void ShapeExtend_WireData::SetDegeneratedLast() 
 {
-  Standard_Integer i, nb = NbEdges();
+  Standard_Integer i = 0, nb = NbEdges();
   for (i = 1; i <= nb; i ++) {
     if ( BRep_Tool::Degenerated ( Edge(i) ) ) {
       SetLast ( i );
@@ -412,7 +414,7 @@ void ShapeExtend_WireData::Set (const TopoDS_Edge& edge,
 
 void ShapeExtend_WireData::Reverse () 
 {
-  Standard_Integer i, nb = NbEdges();
+  Standard_Integer i = 0, nb = NbEdges();
 
   // inverser les edges + les permuter pour inverser le wire
   for (i = 1; i <= nb/2; i ++) {
@@ -447,7 +449,7 @@ static void SwapSeam (const TopoDS_Shape& S, const TopoDS_Face& F)
   
 //:S4136  Standard_Real Tol = BRep_Tool::Tolerance(theface);
   Handle(Geom2d_Curve) c2df,c2dr;
-  Standard_Real uff,ulf,ufr,ulr;
+  Standard_Real uff = NAN,ulf = NAN,ufr = NAN,ulr = NAN;
 
   // d abord FWD puis REV
   c2df = BRep_Tool::CurveOnSurface (E,theface,uff,ulf);
@@ -552,7 +554,7 @@ Standard_Boolean ShapeExtend_WireData::IsSeam (const Standard_Integer num)
   
   if (num == mySeamF || num == mySeamR) return Standard_True;
 //  Pas suffisant : on regarde dans la liste
-  Standard_Integer i, nb = mySeams->Length();
+  Standard_Integer i = 0, nb = mySeams->Length();
   for (i = 1; i <= nb; i ++) {
     if (num == mySeams->Value(i)) return Standard_True;
   }
@@ -569,7 +571,7 @@ TopoDS_Wire ShapeExtend_WireData::Wire() const
   TopoDS_Wire W;
   BRep_Builder B;
   B.MakeWire (W); 
-  Standard_Integer i, nb = NbEdges();
+  Standard_Integer i = 0, nb = NbEdges();
   Standard_Boolean ismanifold = Standard_True;
   for (i = 1; i <= nb; i ++) {
     TopoDS_Edge aE =  Edge(i);
@@ -599,7 +601,7 @@ TopoDS_Wire ShapeExtend_WireData::WireAPIMake() const
 {
   TopoDS_Wire W;
   BRepBuilderAPI_MakeWire MW;
-  Standard_Integer i, nb = NbEdges();
+  Standard_Integer i = 0, nb = NbEdges();
   for (i = 1; i <= nb; i ++)  MW.Add (Edge(i));
   if(myManifoldMode) {
     nb = NbNonManifoldEdges();
index d4d747552ff9b34b93f26ce7bab73540de467087..324625e36d46a9de2dfb94888c19cd057890b2da 100644 (file)
@@ -232,9 +232,9 @@ private:
   Handle(TopTools_HSequenceOfShape) myEdges;
   Handle(TopTools_HSequenceOfShape) myNonmanifoldEdges;
   Handle(TColStd_HSequenceOfInteger) mySeams;
-  Standard_Integer mySeamF;
-  Standard_Integer mySeamR;
-  Standard_Boolean myManifoldMode;
+  Standard_Integer mySeamF{};
+  Standard_Integer mySeamR{};
+  Standard_Boolean myManifoldMode{};
 
 
 };
index 6f710fac393c4d1207259512dd3770c40c5b1e06..e27da3309ab066580f89118dfce7e91c5b9461f6 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <ShapeFix.hxx>
 //:k2 abv 16.12.98: eliminating code duplication
 //pdn     18.12.98: checking deviation for SP edges
@@ -188,7 +190,7 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape,
       Handle(GeomAdaptor_Surface) AS = new GeomAdaptor_Surface ( plane );
       for ( TopExp_Explorer ed ( face, TopAbs_EDGE ); ed.More(); ed.Next() ) {
         TopoDS_Edge edge = TopoDS::Edge ( ed.Current() );
-        Standard_Real f, l;
+        Standard_Real f = NAN, l = NAN;
         Handle(Geom_Curve) crv = BRep_Tool::Curve ( edge, f, l );
         if ( crv.IsNull() )
           continue;
@@ -356,7 +358,7 @@ static Standard_Real getNearPoint(const TColgp_SequenceOfPnt& aSeq1,
 //purpose  : auxiliary for FixVertexPosition
 //=======================================================================
 static Standard_Boolean getNearestEdges(TopTools_ListOfShape& theLEdges,
-                                        const TopoDS_Vertex theVert,
+                                        const TopoDS_Vertex& theVert,
                                         TopTools_SequenceOfShape& theSuitEdges,
                                         TopTools_SequenceOfShape& theRejectEdges,
                                         const Standard_Real theTolerance,
@@ -375,7 +377,7 @@ static Standard_Boolean getNearestEdges(TopTools_ListOfShape& theLEdges,
   TopoDS_Vertex aVert11,aVert12;
   TopExp::Vertices(aEdge1, aVert11,aVert12 );
   aMapEdges.Add(aEdge1);
-  Standard_Real aFirst1,aLast1;
+  Standard_Real aFirst1 = NAN,aLast1 = NAN;
   Handle(Geom_Curve) aCurve1 = BRep_Tool::Curve(aEdge1,aFirst1,aLast1);
   gp_Pnt p11;
   gp_Pnt p12;
@@ -416,7 +418,7 @@ static Standard_Boolean getNearestEdges(TopTools_ListOfShape& theLEdges,
       continue;
     }
     aMapEdges.Add(aEdge);
-    Standard_Real aFirst,aLast;
+    Standard_Real aFirst = NAN,aLast = NAN;
     Handle(Geom_Curve) aCurve = BRep_Tool::Curve(aEdge,aFirst,aLast);
     if( !aCurve.IsNull()) {
       gp_Pnt p1;
@@ -505,7 +507,7 @@ Standard_Boolean ShapeFix::FixVertexPosition(TopoDS_Shape& theshape,
     Standard_Integer nV =1;
     TopoDS_Iterator aExp3(aExp1.Current());
     for( ; aExp3.More(); aExp3.Next(),nV++) {
-      TopoDS_Shape aVert =  aExp3.Value();
+      const TopoDS_Shape& aVert =  aExp3.Value();
       if(nV ==1)
         aVert1 = aVert;
       else if(aVert1.IsSame(aVert))
@@ -557,7 +559,7 @@ Standard_Boolean ShapeFix::FixVertexPosition(TopoDS_Shape& theshape,
       Standard_Boolean isLast = (aVert2.IsSame(aVert));
       if(!isFirst && !isLast)
         continue;
-      Standard_Real aFirst,aLast;
+      Standard_Real aFirst = NAN,aLast = NAN;
       Handle(Geom_Curve) aCurve;
       TopoDS_Edge aEdge = TopoDS::Edge(thecontext->Apply(aEdgeOld));
 
@@ -645,7 +647,7 @@ Standard_Boolean ShapeFix::FixVertexPosition(TopoDS_Shape& theshape,
       TopoDS_Vertex aVert1n,aVert2n;
       TopExp::Vertices(aEdge, aVert1n,aVert2n );
       
-      Standard_Real aFirst,aLast;
+      Standard_Real aFirst = NAN,aLast = NAN;
       aCurve = BRep_Tool::Curve(aEdge,aFirst,aLast);
       if( !aCurve.IsNull()) {
         gp_Pnt p1 = aCurve->Value(aFirst);
@@ -686,14 +688,14 @@ Standard_Real ShapeFix::LeastEdgeSize(TopoDS_Shape& theShape)
   Standard_Real aRes = RealLast();
   for(TopExp_Explorer exp(theShape,TopAbs_EDGE); exp.More(); exp.Next()) { 
     TopoDS_Edge edge = TopoDS::Edge ( exp.Current() );
-    Standard_Real first,last;
+    Standard_Real first = NAN,last = NAN;
     Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge, first, last);
     if(!c3d.IsNull()) {
       Bnd_Box bb;
       bb.Add(c3d->Value(first));
       bb.Add(c3d->Value(last));
       bb.Add(c3d->Value((last+first)/2.));
-      Standard_Real x1,x2,y1,y2,z1,z2,size;
+      Standard_Real x1 = NAN,x2 = NAN,y1 = NAN,y2 = NAN,z1 = NAN,z2 = NAN,size = NAN;
       bb.Get(x1,y1,z1,x2,y2,z2);
       size = (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1);
       if(size<aRes) aRes = size;
index af2f722c343fea2ac07523013ea2611fa24e52a2..e179937481b7856aa06fdcd7510b8e2415d7c012 100644 (file)
@@ -18,6 +18,8 @@
 //    abv  22.07.99 implementing patch indices
 //    svv  10.01.00 porting on DEC
 
+#include <math.h>
+
 #include <Bnd_Box2d.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -83,14 +85,14 @@ ShapeFix_ComposeShell::ShapeFix_ComposeShell () :
        myStatus(0),
        myUResolution(RealLast()),
        myVResolution(RealLast()),
-       myInvertEdgeStatus(Standard_True),
+       myTransferParamTool(new ShapeAnalysis_TransferParametersProj), myInvertEdgeStatus(Standard_True),
        myClosedMode(Standard_False),
        myUClosed(Standard_False),
        myVClosed(Standard_False),
        myUPeriod(0.),
        myVPeriod(0.)
 {
-  myTransferParamTool = new ShapeAnalysis_TransferParametersProj;
+  
 }
     
 
@@ -118,7 +120,7 @@ void ShapeFix_ComposeShell::Init (const Handle(ShapeExtend_CompositeSurface) &Gr
     myUClosed = myUClosed && theSurface->IsUClosed();
     myVClosed = myVClosed && theSurface->IsVClosed();
   } else {
-    Standard_Real U0,U1,V0,V1,GU0 = 0.,GU1 = 0.,GV0 = 0.,GV1 = 0.;
+    Standard_Real U0 = NAN,U1 = NAN,V0 = NAN,V1 = NAN,GU0 = 0.,GU1 = 0.,GV0 = 0.,GV1 = 0.;
     theSurface->Bounds(U0,U1,V0,V1);
     if (::Precision::IsInfinite (U0) || ::Precision::IsInfinite (U1) ||
         ::Precision::IsInfinite (V0) || ::Precision::IsInfinite (V1))
@@ -157,7 +159,7 @@ void ShapeFix_ComposeShell::Init (const Handle(ShapeExtend_CompositeSurface) &Gr
     Standard_Real uRange = myGrid->UJointValue(i+1)-myGrid->UJointValue(i);
     for ( Standard_Integer j=1; j <= myGrid->NbVPatches(); j++ ) {
       Standard_Real vRange = myGrid->VJointValue(j+1)-myGrid->VJointValue(j);
-      Standard_Real u1,u2,v1,v2;
+      Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
       myGrid->Patch(i,j)->Bounds(u1,u2,v1,v2);
       GeomAdaptor_Surface GAS ( myGrid->Patch(i,j) );
       Standard_Real ures = GAS.UResolution ( 1. )*uRange/(u2-u1);
@@ -307,7 +309,7 @@ static Standard_Integer PointLinePosition (const gp_Pnt2d &p, const gp_Lin2d &li
 // Define position of point relative to line
 static Standard_Integer PointLinePosition (const gp_Pnt2d &p, const gp_Lin2d &line)
 {
-  Standard_Real dev;
+  Standard_Real dev = NAN;
   return PointLinePosition ( p, line, dev );
 }
 
@@ -390,7 +392,7 @@ static Standard_Integer ApplyContext (ShapeFix_WireSegment &wire,
 
   // add edges into the wire in correct order
   if ( segw->NbEdges() >0 ) {
-    Standard_Integer ind, iumin, iumax, ivmin, ivmax;
+    Standard_Integer ind = 0, iumin = 0, iumax = 0, ivmin = 0, ivmax = 0;
     wire.GetPatchIndex ( iedge, iumin, iumax, ivmin, ivmax );
     Standard_Integer nbEdges =  segw->NbEdges(); 
     for ( Standard_Integer i=1; i <=  nbEdges; i++, index++ ) {
@@ -444,7 +446,7 @@ static Standard_Integer GetPatchIndex (const Standard_Real Param,
   Standard_Real p = Param + shift;
 
   // locate patch: the same algo as in SE_CS::LocateParameter()
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for ( i = 2; i < NP; i++ ) {
 //    Standard_Real par = Params->Value(i);
     if ( p < Params->Value(i) ) break;
@@ -547,7 +549,7 @@ void ShapeFix_ComposeShell::LoadWires (ShapeFix_SequenceOfWireSegment &seqw) con
           ShapeAnalysis_WireOrder sawo(Standard_False, 0);
           ShapeAnalysis_Edge sae;
           for(Standard_Integer i = 1; i <= nbMEdges; i++) {
-            Standard_Real f,l;
+            Standard_Real f = NAN,l = NAN;
            Handle(Geom2d_Curve) c2d;
             //smh#8
             TopoDS_Shape tmpF = myFace.Oriented(TopAbs_FORWARD);
@@ -626,13 +628,13 @@ Standard_Integer ShapeFix_ComposeShell::ComputeCode (const Handle(ShapeExtend_Wi
 
   Standard_Integer nb = wire->NbEdges();
 
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for ( i=begInd; ; i++ ) {
     if ( i > nb ) i = 1;
     TopoDS_Edge edge = wire->Edge ( i );
 
     Handle(Geom2d_Curve) c2d;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     if ( ! sae.PCurve ( edge, myFace, c2d, f, l, Standard_False ) ) {
       myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL3 );
       continue;
@@ -644,7 +646,7 @@ Standard_Integer ShapeFix_ComposeShell::ComputeCode (const Handle(ShapeExtend_Wi
     Standard_Real par2 = ( i == endInd && special <=0 ? endPar : ( isreversed ? f : l ) );
     Standard_Real dpar = ( par2 - par1 ) / ( NPOINTS - 1 );
     Standard_Integer np = ( Abs ( dpar ) < ::Precision::PConfusion() ? 1 : NPOINTS );
-    Standard_Integer j; // svv #1
+    Standard_Integer j = 0; // svv #1
     for ( j=0; j < np; j++ ) {
       Standard_Real par = par1 + dpar * j;
       gp_Pnt2d p2d = c2d->Value ( par );
@@ -721,7 +723,7 @@ Standard_Integer ShapeFix_ComposeShell::ComputeCode (const Handle(ShapeExtend_Wi
 // After applying context to (seam) edge, distribute its indices on new edges,
 // according to their parameters on that edge
 static void DistributeSplitPoints (const Handle(ShapeExtend_WireData) &sbwd,
-                                   const TopoDS_Face myFace,
+                                   const TopoDS_Face& myFace,
                                    const Standard_Integer index,
                                    const Standard_Integer nsplit,
                                    TColStd_SequenceOfInteger& indexes,
@@ -730,9 +732,9 @@ static void DistributeSplitPoints (const Handle(ShapeExtend_WireData) &sbwd,
   Standard_Boolean isreversed = ( nsplit >0 && sbwd->Edge(index).Orientation() == TopAbs_REVERSED );
 
   TColStd_Array1OfReal params(0,nsplit);
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for ( i=0; i < nsplit; i++ ) {
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     BRep_Tool::Range ( sbwd->Edge(index+i), myFace, f, l );
     params.SetValue ( i, ( isreversed ? l : f ) );
   }
@@ -785,7 +787,7 @@ static void DefinePatch (ShapeFix_WireSegment &wire, const Standard_Integer code
 //function : GetGridResolution
 //purpose  : auxiliary
 //=======================================================================
-static Standard_Real GetGridResolution(const Handle(TColStd_HArray1OfReal) SplitValues,
+static Standard_Real GetGridResolution(const Handle(TColStd_HArray1OfReal)& SplitValues,
                                        const Standard_Integer cutIndex)
 {
   Standard_Integer nb = SplitValues->Length();
@@ -837,7 +839,7 @@ ShapeFix_WireSegment ShapeFix_ComposeShell::SplitWire (ShapeFix_WireSegment &wir
     }
     TopoDS_Edge edge = wire.Edge(i);
 
-    Standard_Integer iumin, iumax, ivmin, ivmax;
+    Standard_Integer iumin = 0, iumax = 0, ivmin = 0, ivmax = 0;
     wire.GetPatchIndex ( i, iumin, iumax, ivmin, ivmax );
 
     // Position code for first segment of edge
@@ -875,13 +877,13 @@ ShapeFix_WireSegment ShapeFix_ComposeShell::SplitWire (ShapeFix_WireSegment &wir
     }
 
     Handle(Geom_Curve) c3d;
-    Standard_Real f3d, l3d;
+    Standard_Real f3d = NAN, l3d = NAN;
     if ( ! sae.Curve3d ( edge, c3d, f3d, l3d ) ) { // not a crime
       c3d.Nullify(); 
       f3d = l3d = 0;
     }
 
-    Standard_Real firstPar, lastPar;
+    Standard_Real firstPar = NAN, lastPar = NAN;
     Handle(Geom2d_Curve) C2d;
     if ( ! sae.PCurve ( edge, myFace, C2d, firstPar, lastPar ) ) {
       myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
@@ -1249,7 +1251,7 @@ Standard_Boolean ShapeFix_ComposeShell::SplitByLine (ShapeFix_WireSegment &wire,
     TopoDS_Edge E= sewd->Edge ( iedge );
     Standard_Boolean isreversed = ( E.Orientation() == TopAbs_REVERSED );
 
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     Handle(Geom2d_Curve) c2d;
     if ( ! sae.PCurve ( E, myFace, c2d, f, l, Standard_False ) ) continue;
     Handle(Geom2d_Curve) c2d_sav = c2d;
@@ -1269,7 +1271,7 @@ Standard_Boolean ShapeFix_ComposeShell::SplitByLine (ShapeFix_WireSegment &wire,
       Bnd_Box2d box;
       const Standard_Integer aNbPoints = 41;
       sac.FillBndBox ( c2d, f, l, aNbPoints, Standard_True, box );
-      Standard_Real umin, vmin, umax, vmax;
+      Standard_Real umin = NAN, vmin = NAN, umax = NAN, vmax = NAN;
       box.Get ( umin, vmin, umax, vmax );
 
       // compute shifts and adjust points adjust
@@ -1313,7 +1315,7 @@ Standard_Boolean ShapeFix_ComposeShell::SplitByLine (ShapeFix_WireSegment &wire,
 
     // detect intersections at junction of two edges
     gp_Pnt2d pos = ( isreversed ? posl : posf );
-    Standard_Real dev;
+    Standard_Real dev = NAN;
     Standard_Integer code = PointLinePosition ( pos, line, dev );
     if ( iedge ==1 ) { firstCode = code; firstPos = pos; firstDev = dev; }
     else if ( code == IOR_UNDEF || code != prevCode ) { 
@@ -1341,7 +1343,7 @@ Standard_Boolean ShapeFix_ComposeShell::SplitByLine (ShapeFix_WireSegment &wire,
 
       // Fill arrays with new intersection points
       if ( Inter.IsDone() ) {
-        Standard_Integer i;
+        Standard_Integer i = 0;
         for ( i = 1; i <= Inter.NbPoints(); i++ ) {
           IntRes2d_IntersectionPoint IP = Inter.Point (i);
           if (IP.TransitionOfSecond().PositionOnCurve() == IntRes2d_Middle || (code != IOR_UNDEF && prevCode != IOR_UNDEF) )
@@ -1375,7 +1377,7 @@ Standard_Boolean ShapeFix_ComposeShell::SplitByLine (ShapeFix_WireSegment &wire,
     Standard_Integer start = IntEdgeInd.Length() + 1; // first of the new points
 
     // Move all points into range [f,l] (intersector sometimes gives params out of range)
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for ( i = start; i <= IntEdgePar.Length(); i++ ) {
       if ( IntEdgePar(i) < f ) IntEdgePar.SetValue ( i, f );
       else if ( IntEdgePar(i) > l ) IntEdgePar.SetValue ( i, l );
@@ -1418,7 +1420,7 @@ Standard_Boolean ShapeFix_ComposeShell::SplitByLine (ShapeFix_WireSegment &wire,
   TColStd_SequenceOfInteger SegmentCodes; // classification codes for segments of wire
 
   // remove duplicated points to ensure correct results of ComputeCode
-  Standard_Integer i, j = IntEdgePar.Length();
+  Standard_Integer i = 0, j = IntEdgePar.Length();
   if ( myClosedMode && j >1 ) {
     for ( i = 1; i <= IntEdgePar.Length();  ) {
       if ( i == j ) break;
@@ -1433,7 +1435,7 @@ Standard_Boolean ShapeFix_ComposeShell::SplitByLine (ShapeFix_WireSegment &wire,
       else if ( nbe ==1 || IntEdgeInd(i) == (IntEdgeInd(j)%nbe)+1 ) {
         TopoDS_Edge E1 = sewd->Edge ( IntEdgeInd(j) );
         TopoDS_Edge E2 = sewd->Edge ( IntEdgeInd(i) );
-        Standard_Real a1, b1, a2, b2;
+        Standard_Real a1 = NAN, b1 = NAN, a2 = NAN, b2 = NAN;
         BRep_Tool::Range ( E1, myFace, a1, b1 );
         BRep_Tool::Range ( E2, myFace, a2, b2 );
         if ( Abs ( IntEdgePar(j) - ( E1.Orientation() == TopAbs_FORWARD ? b1 : a1 ) ) < ::Precision::PConfusion() &&
@@ -1567,7 +1569,7 @@ void ShapeFix_ComposeShell::SplitByLine (ShapeFix_SequenceOfWireSegment &wires,
   TopTools_SequenceOfShape SplitLineVertex;
 
   // split wires one by one, collecting data on intersection points
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for ( i=1; i <= wires.Length(); i++ ) {
     SplitByLine ( wires(i), line, isCutByU, cutIndex,
                   SplitLinePar, SplitLineCode, SplitLineVertex );
@@ -1722,9 +1724,9 @@ void ShapeFix_ComposeShell::SplitByGrid (ShapeFix_SequenceOfWireSegment &seqw)
 {
   // process splitting by U- anv V-seams (i.e. U=const and V=const curves)
   // closed composite surface is processed as periodic
-  Standard_Real Uf,Ul,Vf,Vl;
+  Standard_Real Uf = NAN,Ul = NAN,Vf = NAN,Vl = NAN;
   BRepTools::UVBounds(myFace,Uf,Ul,Vf,Vl);
-  Standard_Real Umin,Umax,Vmin,Vmax;
+  Standard_Real Umin = NAN,Umax = NAN,Vmin = NAN,Vmax = NAN;
   myGrid->Bounds(Umin,Umax,Vmin,Vmax);
 
   //value of precision to define number of patch should be the same as used in the definitin position of point relatively to seam edge (TOLINT)
@@ -1744,7 +1746,7 @@ void ShapeFix_ComposeShell::SplitByGrid (ShapeFix_SequenceOfWireSegment &seqw)
       BRep_Builder aB;
       atmpF.Orientation(TopAbs_FORWARD);
       aB.Add(atmpF, wire.WireData()->Wire());
-      Standard_Real Uf1,Ul1,Vf1,Vl1;
+      Standard_Real Uf1 = NAN,Ul1 = NAN,Vf1 = NAN,Vl1 = NAN;
       ShapeAnalysis::GetFaceUVBounds(TopoDS::Face(atmpF),Uf1,Ul1,Vf1,Vl1);
 
       //for closed mode it is necessary to move wire segment in the interval defined by first and last grid UV values 
@@ -1845,7 +1847,7 @@ void ShapeFix_ComposeShell::BreakWires (ShapeFix_SequenceOfWireSegment &seqw)
   ShapeAnalysis_Edge sae;
 
   // first collect splitting vertices
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for ( i=1; i <= seqw.Length(); i++ ) {
     TopAbs_Orientation ori_wire = seqw(i).Orientation();
     if ( ori_wire != TopAbs_EXTERNAL && 
@@ -1869,10 +1871,10 @@ void ShapeFix_ComposeShell::BreakWires (ShapeFix_SequenceOfWireSegment &seqw)
     ShapeFix_WireSegment wire = seqw(i);
     if(wire.IsVertex())
       continue;
-    Handle(ShapeExtend_WireData) sbwd = wire.WireData();
+    const Handle(ShapeExtend_WireData)& sbwd = wire.WireData();
 
     // find first vertex for split
-    Standard_Integer j; // svv #1
+    Standard_Integer j = 0; // svv #1
     for ( j=1; j <= sbwd->NbEdges(); j++ ) {
       TopoDS_Vertex V = sae.FirstVertex ( sbwd->Edge(j) );
       if ( splitVertices.Contains ( V ) ) break;
@@ -1906,7 +1908,7 @@ void ShapeFix_ComposeShell::BreakWires (ShapeFix_SequenceOfWireSegment &seqw)
         newwire.Clear();
         curOri = ori;
       }
-      Standard_Integer iumin, iumax, ivmin, ivmax;
+      Standard_Integer iumin = 0, iumax = 0, ivmin = 0, ivmax = 0;
       wire.GetPatchIndex ( j, iumin, iumax, ivmin, ivmax );
       if(ori == TopAbs_INTERNAL && edge.Orientation() == TopAbs_EXTERNAL ) {
         curOri = TopAbs_EXTERNAL;
@@ -1933,7 +1935,7 @@ void ShapeFix_ComposeShell::BreakWires (ShapeFix_SequenceOfWireSegment &seqw)
 // -1 - short in 3d but not in 2d (to be checked after algo and atteching to 
 //      another wire if alone)
 static Standard_Integer IsShortSegment (const ShapeFix_WireSegment &seg,
-                                        const TopoDS_Face myFace,
+                                        const TopoDS_Face& myFace,
                                         const Handle(Geom_Surface)& myGrid,
                                         const TopLoc_Location &myLoc,
                                         const Standard_Real UResolution,
@@ -1948,12 +1950,12 @@ static Standard_Integer IsShortSegment (const ShapeFix_WireSegment &seg,
 
   Standard_Integer code = 1;
   ShapeAnalysis_Edge sae;
-  Handle(ShapeExtend_WireData) sbwd = seg.WireData();
+  const Handle(ShapeExtend_WireData)& sbwd = seg.WireData();
   for ( Standard_Integer i=1; i <= sbwd->NbEdges(); i++ ) {
     TopoDS_Edge edge = sbwd->Edge ( i );
     if ( ! Vf.IsSame ( sae.LastVertex ( edge ) ) ) return 0;
     Handle(Geom2d_Curve) c2d;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     if ( ! sae.PCurve ( edge, myFace, c2d, f, l ) ) continue;
 
     // check 2d
@@ -1983,7 +1985,7 @@ static Standard_Boolean IsSamePatch (const ShapeFix_WireSegment& wire,
                                      const Standard_Boolean      extend=Standard_False)
 {
   // get patch indices for current segment
-  Standard_Integer jumin, jumax, jvmin, jvmax;
+  Standard_Integer jumin = 0, jumax = 0, jvmin = 0, jvmax = 0;
   wire.GetPatchIndex ( 1, jumin, jumax, jvmin, jvmax );
 
   // shift to the same period
@@ -2015,7 +2017,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
                                           ShapeFix_SequenceOfWireSegment &seqw) 
 {
   ShapeAnalysis_Edge sae;
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   // Collect information on short closed segments
   TColStd_Array1OfInteger shorts(1,seqw.Length());
   for ( i=1; i <= seqw.Length(); i++ ) {
@@ -2065,7 +2067,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
 
     // find next segment to connect (or first if sbwd is NULL)
     for ( i = 1; i <= seqw.Length(); i++ ) {
-      ShapeFix_WireSegment seg = seqw.Value(i);
+      const ShapeFix_WireSegment& seg = seqw.Value(i);
       if(seg.IsVertex())
         continue;
       TopAbs_Orientation anOr = seg.Orientation();
@@ -2101,7 +2103,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
       // distance                  2
       // short                     auto
       // angle ->> PI              1
-      Handle(ShapeExtend_WireData) wire = seg.WireData();
+      const Handle(ShapeExtend_WireData)& wire = seg.WireData();
       for ( Standard_Integer j=0; j <2; j++ ) {
         if ( ! endV.IsSame ( j ? seg.LastVertex() : seg.FirstVertex() ) ) continue;
 
@@ -2126,7 +2128,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
         // compute starting tangent
         gp_Pnt2d lPnt;
         gp_Vec2d lVec;
-        Standard_Integer k;
+        Standard_Integer k = 0;
         Standard_Real edgeTol = 0;
         for ( k=1; k <= wire->NbEdges(); k++ ) {
           TopoDS_Shape tmpE = wire->Edge(wire->NbEdges()-k+1).Reversed();
@@ -2229,7 +2231,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
       endV = sae.LastVertex ( lastEdge );
       tol = BRep_Tool::Tolerance ( endV );
       // BUC60035 2053: iteration on edges is required
-      Standard_Integer k; // svv #1
+      Standard_Integer k = 0; // svv #1
       for ( k=sbwd->NbEdges(); k >=1; k-- )
         //if ( sae.GetEndTangent2d ( sbwd->Edge ( k ), myFace, Standard_True, endPnt, endTan ) )
         if ( sae.GetEndTangent2d ( sbwd->Edge ( k ), myFace, Standard_True, endPnt, endTan, 1.e-3 ) )
@@ -2341,10 +2343,10 @@ static gp_Pnt2d GetMiddlePoint (const ShapeFix_WireSegment& wire,
   Bnd_Box2d box;
   ShapeAnalysis_Edge sae;
   ShapeAnalysis_Curve sac;
-  Handle(ShapeExtend_WireData) wd = wire.WireData();
+  const Handle(ShapeExtend_WireData)& wd = wire.WireData();
   for(Standard_Integer i = 1; i <= wd->NbEdges(); i++) {
     TopoDS_Edge E = wd->Edge (i);
-    Standard_Real cf,cl;
+    Standard_Real cf = NAN,cl = NAN;
     Handle(Geom2d_Curve) c2d;
     if(sae.PCurve (E,face,c2d,cf,cl,Standard_False)) {
       sac.FillBndBox ( c2d, cf, cl, 3, Standard_False, box );
@@ -2354,7 +2356,7 @@ static gp_Pnt2d GetMiddlePoint (const ShapeFix_WireSegment& wire,
     }
   }
   if ( box.IsVoid() ) return gp_Pnt2d(0.,0.);
-  Standard_Real aXmin, aYmin, aXmax, aYmax;
+  Standard_Real aXmin = NAN, aYmin = NAN, aXmax = NAN, aYmax = NAN;
   box.Get(aXmin, aYmin, aXmax, aYmax);
   return gp_Pnt2d ( 0.5 * ( aXmax + aXmin ), 0.5 * ( aYmax + aYmin ) );
 }
@@ -2374,7 +2376,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
   if ( loops.Length() == 1 ) {
     TopoDS_Face newFace;
     B.MakeFace ( newFace, surf, myLoc, ::Precision::Confusion() );
-    TopoDS_Shape aSH = loops.Value(1);
+    const TopoDS_Shape& aSH = loops.Value(1);
     if( aSH.ShapeType() != TopAbs_WIRE)
       return;
     TopoDS_Wire wire = TopoDS::Wire ( loops.Value(1) );
@@ -2401,7 +2403,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
 
   Handle(ShapeAnalysis_Surface) aSurfTool = new ShapeAnalysis_Surface(atSurf);
   TopTools_SequenceOfShape roots;
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for ( i = 1; i <= loops.Length(); i++ ) {
     gp_Pnt2d unp;
     TopoDS_Wire wr;
@@ -2424,12 +2426,12 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
         break;
     }
     if ( ! ew.More() ) continue;
-    Standard_Real cf, cl;
+    Standard_Real cf = NAN, cl = NAN;
     Handle(Geom2d_Curve) cw = BRep_Tool::CurveOnSurface ( ed, pf, cf, cl );
     if ( cw.IsNull() ) continue;
     unp = cw->Value ( 0.5 * ( cf + cl ) );
 
-    Standard_Integer j; // svv #1
+    Standard_Integer j = 0; // svv #1
     for ( j = 1; j <= loops.Length(); j++ ) {
       if ( i == j ) continue;
       TopoDS_Shape aShape2 = loops(j);
@@ -2460,7 +2462,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
       if(stPoint == TopAbs_ON || stPoint == TopAbs_UNKNOWN) {
 
         TopoDS_Edge anEdge = TopoDS::Edge ( ew.Value() );
-        Standard_Real aCF, aCL;
+        Standard_Real aCF = NAN, aCL = NAN;
         Handle(Geom2d_Curve) aCW = BRep_Tool::CurveOnSurface ( anEdge, pf, aCF, aCL);
         // handle tangential case (ON)
         while ( stPoint == TopAbs_ON || stPoint == TopAbs_UNKNOWN ) {
@@ -2518,7 +2520,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
 
     // find all holes for that loop
     TopTools_SequenceOfShape holes; // holes in holes not supported
-    Standard_Integer j; // svv #1
+    Standard_Integer j = 0; // svv #1
     for ( j=1; j <= loops.Length(); j++ ) {
       gp_Pnt2d unp;
       if(loops(j).ShapeType() == TopAbs_WIRE) {
@@ -2526,7 +2528,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
         TopoDS_Iterator ew ( bw );
         if ( ! ew.More() ) continue;
         TopoDS_Edge ed = TopoDS::Edge ( ew.Value() );
-        Standard_Real cf, cl;
+        Standard_Real cf = NAN, cl = NAN;
         Handle(Geom2d_Curve) cw = BRep_Tool::CurveOnSurface ( ed, pf, cf, cl );
         if ( cw.IsNull() ) continue;
         unp = cw->Value ( 0.5 * ( cf + cl ) );
@@ -2594,7 +2596,7 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
     sfw.SetPrecision ( Precision() );
 
     // pdn: shift pcurves in the seam to make OK shape w/o fixshifted
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for ( i=1; i <= wires.Length(); i++ ) {
       if(wires(i).IsVertex())
         continue;
@@ -2603,7 +2605,7 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
       for(Standard_Integer jL=1; jL <= sbwd->NbEdges(); jL++ ) {
         TopoDS_Edge E = sbwd->Edge(jL);
         if ( E.Orientation() == TopAbs_REVERSED && BRep_Tool::IsClosed(E,myFace) ) {
-          Standard_Real f1,l1, f2, l2;
+          Standard_Real f1 = NAN,l1 = NAN, f2 = NAN, l2 = NAN;
           Handle(Geom2d_Curve) c21 =  BRep_Tool::CurveOnSurface(E,myFace,f1,l1);
           TopoDS_Shape dummy = E.Reversed();
           Handle(Geom2d_Curve) c22 =  BRep_Tool::CurveOnSurface(TopoDS::Edge(dummy),myFace,f2,l2);
@@ -2660,7 +2662,7 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
   if(nb == 0)
     return;
 
-  Standard_Integer i; //svv #1 
+  Standard_Integer i = 0; //svv #1 
   for ( i = 1; i <= nb; i++ )
     mPnts.Append ( GetMiddlePoint ( wires(i), myFace ) );
 
@@ -2671,7 +2673,7 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
   ShapeAnalysis_Edge sae;
   Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
 
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   myGrid->Bounds(U1,U2,V1,V2);
   for ( i = 1; i <= nb; i++ ) {
     gp_Pnt2d pnt = mPnts(i);
@@ -2737,13 +2739,13 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
 
       // transform pcurve to parametric space of patch
       if ( needT ) {
-        Standard_Real f, l;
+        Standard_Real f = NAN, l = NAN;
         Handle(Geom2d_Curve) c2d;
         if ( sae.PCurve ( newEdge, face, c2d, f, l, Standard_False ) ) {
           Standard_Real newf = f, newl = l;
           Handle(Geom2d_Curve) c2dnew = sbe.TransformPCurve ( c2d, T, uFact, newf, newl );
           if ( BRep_Tool::IsClosed ( newEdge, face ) ) {
-            Standard_Real cf, cl;
+            Standard_Real cf = NAN, cl = NAN;
             Handle(Geom2d_Curve) c2d2;
             //smh#8
             TopoDS_Shape tmpE = newEdge.Reversed();
@@ -2771,7 +2773,7 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
         else
           etmp  = sbe.Copy ( newEdge, Standard_False );
         sfe->FixAddCurve3d ( etmp );
-        Standard_Real cf, cl;
+        Standard_Real cf = NAN, cl = NAN;
         Handle(Geom_Curve) c3d;
         if(sae.Curve3d(etmp,c3d,cf,cl,Standard_False)) {
           B.UpdateEdge ( newEdge, c3d, 0. );
@@ -2804,7 +2806,7 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
           loops.Append(wires(i).GetVertex());
       }
       else {
-        Handle(ShapeExtend_WireData) aWD = aSeg.WireData();
+        const Handle(ShapeExtend_WireData)& aWD = aSeg.WireData();
         if(!aWD.IsNull())
           loops.Append ( aWD->Wire() );
       }
index cebe39c89fc177cb6db70399f29c40976140dbec..d402725c2f3d1d4b69644c7a4f4f8c21884366e8 100644 (file)
@@ -22,6 +22,8 @@
 //:s5 abv 22.04.99 Adding debug printouts in catch {} blocks
 //    abv 05.05.99 S4137: method CopyPCurves moved to ShapeBuild_Edge
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_GCurve.hxx>
 #include <BRep_TEdge.hxx>
@@ -62,10 +64,10 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_Edge,Standard_Transient)
 //function : ShapeFix_Edge
 //purpose  : 
 //=======================================================================
-ShapeFix_Edge::ShapeFix_Edge()
+ShapeFix_Edge::ShapeFix_Edge() : myStatus(ShapeExtend::EncodeStatus (ShapeExtend_OK)), myProjector(new ShapeConstruct_ProjectCurveOnSurface)
 {
-  myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
-  myProjector = new ShapeConstruct_ProjectCurveOnSurface;
+  
+  
 }
 
 //=======================================================================
@@ -194,7 +196,7 @@ static Handle(Geom2d_Curve) TranslatePCurve (const Handle(Geom_Surface)& aSurf,
                                              Handle(Geom2d_Curve)& aC2d,
                                              const Standard_Real& aTol)
 {
-  Standard_Real uf,ul,vf,vl;
+  Standard_Real uf = NAN,ul = NAN,vf = NAN,vl = NAN;
   aSurf->Bounds(uf,ul,vf,vl);
   
   // cas d une ligne
@@ -342,9 +344,9 @@ static Handle(Geom2d_Curve) TranslatePCurve (const Handle(Geom_Surface)& aSurf,
   TopLoc_Location LocalLoc ;
 
   //Standard_Boolean  IsSameRange = Standard_True //skl
-  Standard_Boolean first_time_in = Standard_True, has_curve, has_closed_curve;
+  Standard_Boolean first_time_in = Standard_True, has_curve = 0, has_closed_curve = 0;
   Handle(BRep_GCurve) geometric_representation_ptr;
-  Standard_Real first, current_first, last, current_last;
+  Standard_Real first = NAN, current_first = NAN, last = NAN, current_last = NAN;
 
   const Handle(Geom_Curve) C = BRep_Tool::Curve(AnEdge, LocalLoc, 
                                                current_first, current_last);
@@ -460,7 +462,7 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,
 //  Standard_Real step = 0;
   try {
     OCC_CATCH_SIGNALS
-    Standard_Real First, Last;
+    Standard_Real First = NAN, Last = NAN;
 
     BRep_Builder B;
 
@@ -482,7 +484,7 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,
     //  A present, on projette
     //  stat : 0 pas pu faire, 1 analytique, 2 approx
     Handle(Geom2d_Curve) c2d;
-    Standard_Real a1, b1;
+    Standard_Real a1 = NAN, b1 = NAN;
     if ( ! sae.HasPCurve (edge, surf, location)) {
       Standard_Real TolFirst = -1, TolLast = -1;
       TopoDS_Vertex V1, V2;
@@ -513,7 +515,7 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,
       //  ATTENTION : TranslatePCurve reconstruit une Line // bords, en
       //  intuitant U ou V ...
       //  Ici, on exploite les infos deja connues
-      Standard_Real uf,ul,vf,vl;
+      Standard_Real uf = NAN,ul = NAN,vf = NAN,vl = NAN;
       surf->Bounds (uf,ul,vf,vl);
       //#4 rln 19/02/98 ProSTEP ug_exhaust-A.stp entity #284920 (thoroidal surface)
       //#13 rln 17/03/98 (updating fix #4) call to TranslatePCurve in the case
@@ -600,7 +602,7 @@ Standard_Boolean ShapeFix_Edge::FixVertexTolerance(const TopoDS_Edge& edge,
     anEdgeCopy = TopoDS::Edge(Context()->Apply(edge));
   }
 
-  Standard_Real toler1, toler2;
+  Standard_Real toler1 = NAN, toler2 = NAN;
   if (!sae.CheckVertexTolerance (anEdgeCopy, face, toler1, toler2)) return Standard_False;
   if (sae.Status (ShapeExtend_DONE1))
     myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE1);
@@ -636,7 +638,7 @@ Standard_Boolean ShapeFix_Edge::FixVertexTolerance(const TopoDS_Edge& edge)
   {
     anEdgeCopy = TopoDS::Edge(Context()->Apply(edge));
   }
-  Standard_Real toler1, toler2;
+  Standard_Real toler1 = NAN, toler2 = NAN;
   if (!sae.CheckVertexTolerance (anEdgeCopy, toler1, toler2)) return Standard_False;
   if (sae.Status (ShapeExtend_DONE1))
     myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE1);
@@ -691,7 +693,7 @@ Standard_Boolean ShapeFix_Edge::FixReversed2d (const TopoDS_Edge& edge,
   if ( ! EA.Status (ShapeExtend_DONE) ) return Standard_False;
   
   Handle(Geom2d_Curve) c2d;
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   EA.PCurve (edge, surface, location, c2d, f, l, Standard_False);
   //#46 rln 01.12.98 buc40130, entity 272 (4-th curve)
   Standard_Real newf = c2d->ReversedParameter (l), newl = c2d->ReversedParameter (f);
@@ -702,7 +704,7 @@ Standard_Boolean ShapeFix_Edge::FixReversed2d (const TopoDS_Edge& edge,
   //#51 rln 15.12.98 pro6562 entity 2788
   //Because of numerical accuracy the range on B-Splines (moreover, on any curve!)
   //the range is changed
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   BRep_Tool::Range (edge, first, last);
   if (first != newf || last != newl) {
     B.SameRange     (edge, Standard_False);
@@ -772,7 +774,7 @@ Standard_Boolean ShapeFix_Edge::FixSameParameter(const TopoDS_Edge& edge,
         // In this case pcurves in BRepLib::SameParameter() will be changed as well
         // and later ShapeBuild_Edge::CopyPCurves() will copy pcurves keeping original range.
         // To prevent this discrepancy we enforce original 3D range.
-        Standard_Real aF, aL;
+        Standard_Real aF = NAN, aL = NAN;
         BRep_Tool::Range (edge, aF, aL);
         B.Range (copyedge, aF, aL, Standard_True); // only 3D
         BRepLib::SameParameter ( copyedge, ( tolerance >= Precision::Confusion() ? tolerance : tol ) );
@@ -791,7 +793,7 @@ Standard_Boolean ShapeFix_Edge::FixSameParameter(const TopoDS_Edge& edge,
   }
   
   // compute deviation on the original pcurves
-  Standard_Real maxdev;
+  Standard_Real maxdev = NAN;
   B.SameParameter ( edge, Standard_True );
 
   // Should check all pcurves in case of non-sameparametrization input.
@@ -809,7 +811,7 @@ Standard_Boolean ShapeFix_Edge::FixSameParameter(const TopoDS_Edge& edge,
   // if BRepLib was OK, compare and select the best variant
   if ( SP )
   {
-    Standard_Real BRLTol = BRep_Tool::Tolerance ( copyedge ), BRLDev;
+    Standard_Real BRLTol = BRep_Tool::Tolerance ( copyedge ), BRLDev = NAN;
     sae.CheckSameParameter ( copyedge, BRLDev );
     myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
     if ( BRLTol < BRLDev ) BRLTol = BRLDev;
index fbabd618b09c442a45ae8772a86921ac39ca786c..a37d6d2bc3aba7728c18e4fe2f8f02bd3394c1a8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_GCurve.hxx>
 #include <BRep_TEdge.hxx>
@@ -149,7 +151,7 @@ void ShapeFix_EdgeConnect::Build ()
 
   TColgp_SequenceOfXYZ thePositions;
   gp_XYZ thePosition;
-  Standard_Real theMaxDev;
+  Standard_Real theMaxDev = NAN;
   BRep_Builder theBuilder;
 
   // Iterate on shared vertices
@@ -182,7 +184,7 @@ void ShapeFix_EdgeConnect::Build ()
        Handle(BRep_GCurve) GC = Handle(BRep_GCurve)::DownCast(theCIterator.Value());
        if ( GC.IsNull() ) continue;
        // Calculate vertex position for this curve
-       Standard_Real theFParam, theLParam;
+       Standard_Real theFParam = NAN, theLParam = NAN;
        GC->Range( theFParam, theLParam );
        gp_Pnt thePoint;
        if (use_start) {
@@ -196,7 +198,7 @@ void ShapeFix_EdgeConnect::Build ()
       }
     }
       
-    Standard_Integer i, theNbPos = thePositions.Length();
+    Standard_Integer i = 0, theNbPos = thePositions.Length();
 
     // Calculate vertex position
     thePosition = gp_XYZ(0.,0.,0.);
index 1afc7a1a692ea6cbed432fe3e954ed9be34183dc..566bc9aa896b0378669db6e1fe749898b37d9e36 100644 (file)
@@ -14,6 +14,8 @@
 //:r5 abv 06.04.99: ec_turbine-A.stp, #4313: protect against null curve
 //    abv 09.04.99  S4136: add parameter preci (to eliminate BRepAPI::Precision)
 
+#include <math.h>
+
 #include <ShapeFix_EdgeProjAux.hxx>
 
 #include <Adaptor3d_CurveOnSurface.hxx>
@@ -239,7 +241,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
   gp_Pnt Pt1,Pt2;
   // pdn 28.12.98: r_39-db.stp #605: use ends of 3d curve instead of vertices 
   ShapeAnalysis_Edge sae;
-  Standard_Real a,b;
+  Standard_Real a = NAN,b = NAN;
   Handle(Geom_Curve) C3d;
   if(sae.Curve3d(myEdge,C3d,a,b,Standard_False)) {
     Pt1 = C3d->Value(a);
@@ -254,7 +256,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
   if (V1.IsSame(V2)) {
     Handle(ShapeAnalysis_Surface) stsu = new ShapeAnalysis_Surface (theSurface);
     gp_Pnt2d aPt1,aPt2;
-    Standard_Real firstpar,lastpar;
+    Standard_Real firstpar = NAN,lastpar = NAN;
     if (stsu->DegeneratedValues(Pt1,preci,aPt1,aPt2,firstpar,lastpar)){
 
       if(theCurve2d->IsKind(STANDARD_TYPE(Geom2d_Line))) {
@@ -282,7 +284,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
   //pdn cutting pcurve by surface bounds
   if (Precision::IsInfinite(cf)||Precision::IsInfinite(cl)) {
     if(theCurve2d->IsKind(STANDARD_TYPE(Geom2d_Line))) {
-      Standard_Real uf,ul,vf,vl;
+      Standard_Real uf = NAN,ul = NAN,vf = NAN,vl = NAN;
       theSurface->Bounds(uf,ul,vf,vl);
       //Correct surface limits for extrusion/revolution surfaces based on hyperbola
       //23 is ln(1.0e+10)
@@ -304,7 +306,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
       }
       if(!Precision::IsInfinite(uf)&&!Precision::IsInfinite(ul)&&
          !Precision::IsInfinite(vf)&&!Precision::IsInfinite(vl)) {
-          Standard_Real cfi,cli;
+          Standard_Real cfi = NAN,cli = NAN;
           Handle(Geom2d_Line) lin = Handle(Geom2d_Line)::DownCast(theCurve2d);
           gp_Pnt2d pnt = lin->Location();
           gp_Dir2d dir = lin->Direction();
@@ -319,7 +321,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
             cli = (vl-pnt.Y())/dir.Y();
           } 
           else {//common case
-            Standard_Real xfi, xli, yfi, yli;
+            Standard_Real xfi = NAN, xli = NAN, yfi = NAN, yli = NAN;
             xfi = (uf-pnt.X())/dir.X();
             xli = (ul-pnt.X())/dir.X();
             yfi = (vf-pnt.Y())/dir.Y();
@@ -441,7 +443,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
 
   //pdn adjust parameters in periodic case
   if(parU || parV) {
-    Standard_Real uf,ul,vf,vl;
+    Standard_Real uf = NAN,ul = NAN,vf = NAN,vl = NAN;
     theSurface->Bounds(uf,ul,vf,vl);
     Standard_Real period = (parU ? ul-uf : vl-vf);
     w1+=ShapeAnalysis::AdjustToPeriod(w1,0,period);
@@ -454,7 +456,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
       return;
     }
     gp_Pnt mid = C3d1->Value((cf+cl)/2);
-    Standard_Real wmid;
+    Standard_Real wmid = NAN;
     sac.Project(COnS,mid,preci,pnt,wmid,Standard_False);
     wmid+=ShapeAnalysis::AdjustToPeriod(wmid,0,period);
     if(w1>=w2) {
@@ -492,7 +494,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
 
 void ShapeFix_EdgeProjAux::Init3d (const Standard_Real preci) 
 {
-  Standard_Real cl, cf;
+  Standard_Real cl = NAN, cf = NAN;
 
   // Extract Geometries
   Handle(Geom_Surface) theSurface = BRep_Tool::Surface(myFace);
index 471f3c64956c042b25d4d3e49db7f9c10384da05..c1b289483ec7d2a49f140bb6117484e194c2c0f5 100644 (file)
@@ -71,10 +71,10 @@ protected:
 
   TopoDS_Face myFace;
   TopoDS_Edge myEdge;
-  Standard_Real myFirstParam;
-  Standard_Real myLastParam;
-  Standard_Boolean myFirstDone;
-  Standard_Boolean myLastDone;
+  Standard_Real myFirstParam{};
+  Standard_Real myLastParam{};
+  Standard_Boolean myFirstDone{};
+  Standard_Boolean myLastDone{};
 
 
 private:
index 15016761ebb2685ca888049db54bd8e66767ede1..44d914135b25c32fd28e955830b552a8dcbc124c 100644 (file)
@@ -28,6 +28,8 @@
 // abv 19.10.2001  FixAddNaturalBound improved and extracted as separate fix
 // skl,pdn 14.05.2002  OCC55 (correction precision for small faces)
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BndLib_Add2dCurve.hxx>
 #include <BRep_Builder.hxx>
@@ -95,7 +97,7 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_Face,ShapeFix_Root)
 
 static Standard_Boolean IsSurfaceUVInfinite(const Handle(Geom_Surface)& theSurf)
 {
-  Standard_Real UMin,UMax,VMin,VMax;
+  Standard_Real UMin = NAN,UMax = NAN,VMin = NAN,VMax = NAN;
   theSurf->Bounds(UMin,UMax,VMin,VMax);
 
   return (Precision::IsInfinite(UMin) ||
@@ -114,11 +116,11 @@ static Standard_Boolean IsSurfaceUVPeriodic(const Handle(GeomAdaptor_Surface)& t
 //purpose  : 
 //=======================================================================
 
-ShapeFix_Face::ShapeFix_Face()
+ShapeFix_Face::ShapeFix_Face() : myFixWire(new ShapeFix_Wire), myFwd(Standard_True), myStatus(0)
 {
-  myFwd = Standard_True;
-  myStatus = 0;
-  myFixWire = new ShapeFix_Wire;
+  
+  
+  
   ClearModes();
 }
 
@@ -127,11 +129,11 @@ ShapeFix_Face::ShapeFix_Face()
 //purpose  : 
 //=======================================================================
 
-ShapeFix_Face::ShapeFix_Face(const TopoDS_Face &face)
+ShapeFix_Face::ShapeFix_Face(const TopoDS_Face &face) : myFixWire(new ShapeFix_Wire), myFwd(Standard_True), myStatus(0)
 {
-  myFwd = Standard_True;
-  myStatus = 0;
-  myFixWire = new ShapeFix_Wire;
+  
+  
+  
   ClearModes();
   Init( face );
 }
@@ -273,7 +275,7 @@ static Standard_Boolean SplitWire(const TopoDS_Face &face, const TopoDS_Wire& wi
 {
   TColStd_MapOfInteger UsedEdges;
   Handle(ShapeExtend_WireData) sewd = new ShapeExtend_WireData(wire);
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
   ShapeAnalysis_Edge sae;
   for(i=1; i<=sewd->NbEdges(); i++) {
     if(UsedEdges.Contains(i)) continue;
@@ -305,7 +307,7 @@ static Standard_Boolean SplitWire(const TopoDS_Face &face, const TopoDS_Wire& wi
       }
       if(V1.IsSame(V0)) {
         //check that V0 and V1 are same in 2d too
-        Standard_Real a1,b1,a2,b2;
+        Standard_Real a1 = NAN,b1 = NAN,a2 = NAN,b2 = NAN;
         Handle (Geom2d_Curve) curve1 = BRep_Tool::CurveOnSurface(E1,face,a1,b1);
         Handle (Geom2d_Curve) curve2 = BRep_Tool::CurveOnSurface(E2,face,a2,b2);
         gp_Pnt2d v0,v1;
@@ -691,7 +693,7 @@ Standard_Boolean ShapeFix_Face::Perform()
           TopoDS_Shape aCurW = aItW.Value();
           while(aMapReorderedWires.IsBound(aCurW))
           {
-            TopoDS_Shape aFixW = aMapReorderedWires.Find(aCurW);
+            const TopoDS_Shape& aFixW = aMapReorderedWires.Find(aCurW);
             Context()->Replace(aCurW, aFixW);
             aCurW = aFixW;
           }
@@ -715,7 +717,7 @@ Standard_Boolean ShapeFix_Face::Perform()
 
 // Shift all pcurves of edges in the given wire on the given face 
 // to vector <vec>
-static void Shift2dWire(const TopoDS_Wire w, const TopoDS_Face f,
+static void Shift2dWire(const TopoDS_Wire& w, const TopoDS_Face& f,
                        const gp_Vec2d vec, 
                         const Handle(ShapeAnalysis_Surface)& mySurf,
                         Standard_Boolean recompute3d = Standard_False)
@@ -728,7 +730,7 @@ static void Shift2dWire(const TopoDS_Wire w, const TopoDS_Face f,
   for (TopoDS_Iterator ei (w,Standard_False); ei.More(); ei.Next()){
     TopoDS_Edge edge = TopoDS::Edge(ei.Value());
     Handle (Geom2d_Curve) C2d;
-    Standard_Real cf, cl;
+    Standard_Real cf = NAN, cl = NAN;
     if ( ! sae.PCurve(edge, f, C2d, cf, cl, Standard_True) ) continue; 
     C2d->Transform(tr2d);
     if ( recompute3d ) {
@@ -847,15 +849,15 @@ Standard_Boolean ShapeFix_Face::FixAddNaturalBound()
 
   // Collect information on free intervals in U and V
   TColgp_SequenceOfPnt2d intU, intV, centers;
-  Standard_Real SUF, SUL, SVF, SVL;
+  Standard_Real SUF = NAN, SUL = NAN, SVF = NAN, SVL = NAN;
   mySurf->Bounds(SUF, SUL, SVF, SVL);
   intU.Append ( gp_Pnt2d(SUF, SUL) );
   intV.Append ( gp_Pnt2d(SVF, SVL) );
   Standard_Integer nb = ws.Length();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   
   for ( i=1; i <= nb; i ++) {
-    Standard_Real Umin, Vmin, Umax, Vmax;
+    Standard_Real Umin = NAN, Vmin = NAN, Umax = NAN, Vmax = NAN;
 //     Bnd_Box2d B;
     TopoDS_Wire aw = TopoDS::Wire (ws.Value(i));
     // PTV 01.11.2002 ACIS907, OCC921 begin
@@ -947,7 +949,7 @@ Standard_Boolean ShapeFix_Face::FixAddNaturalBound()
         // find corresponding place in boundary 
         ShapeAnalysis_Edge sae;
         TopoDS_Vertex V = sae.FirstVertex ( sbwd->Edge(j) );
-        Standard_Integer k;
+        Standard_Integer k = 0;
         for ( k=1; k <= bnd->NbEdges(); k++ ) {
           if ( ! BRep_Tool::Degenerated ( bnd->Edge(k) ) ) continue;
           if ( BRepTools::Compare ( V, sae.FirstVertex ( bnd->Edge(k) ) ) ) break;
@@ -1082,7 +1084,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
       ei.Next();
       if ( ! ei.More() ) {
         length = 0;
-        Standard_Real First, Last;
+        Standard_Real First = NAN, Last = NAN;
         Handle(Geom_Curve) c3d;
         ShapeAnalysis_Edge sae;
         if ( sae.Curve3d(anEdge,c3d,First,Last) ) {
@@ -1157,7 +1159,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
 //    Standard_Real toluv = Min ( Ads.UResolution(Precision()), Ads.VResolution(Precision()) );
     Standard_Boolean uclosed = mySurf->IsUClosed();
     Standard_Boolean vclosed = mySurf->IsVClosed();
-    Standard_Real SUF, SUL, SVF, SVL;
+    Standard_Real SUF = NAN, SUL = NAN, SVF = NAN, SVL = NAN;
     mySurf->Bounds(SUF, SUL, SVF, SVL);
     Standard_Real uRange = SUL - SUF;
     Standard_Real vRange = SVL - SVF;
@@ -1169,7 +1171,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
     SI.Clear();
     MapIntWires.Clear();
     Standard_Integer NbOuts=0;
-    Standard_Integer i;
+    Standard_Integer i = 0;
 
     NCollection_Array1<Bnd_Box2d> aWireBoxes(1, nb);
     Standard_Real uMiddle = 0, vMiddle = 0;
@@ -1179,7 +1181,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
       TopoDS_Shape aShape = ws.Value(i);
       TopoDS_Wire aWire = TopoDS::Wire (aShape);
       Bnd_Box2d aBox;
-      Standard_Real cf,cl;
+      Standard_Real cf = NAN,cl = NAN;
       TopoDS_Iterator ew (aWire);
       for(;ew.More(); ew.Next()) {
         TopoDS_Edge ed = TopoDS::Edge (ew.Value());
@@ -1200,7 +1202,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
        BndLib_Add2dCurve::Add(gac,::Precision::Confusion(),aBox);
       }
 
-      Standard_Real aXMin, aXMax, aYMin, aYMax;
+      Standard_Real aXMin = NAN, aXMax = NAN, aYMin = NAN, aYMax = NAN;
       aBox.Get(aXMin, aYMin, aXMax, aYMax);
       if (isFirst) {
         isFirst = Standard_False;
@@ -1273,7 +1275,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
           TopoDS_Iterator ew (bw);
           for(;ew.More(); ew.Next()) {
             TopoDS_Edge ed = TopoDS::Edge (ew.Value());
-            Standard_Real cf,cl;
+            Standard_Real cf = NAN,cl = NAN;
             Handle(Geom2d_Curve) cw = BRep_Tool::CurveOnSurface (ed,myFace,cf,cl);
             if (cw.IsNull()) continue;
             gp_Pnt2d unp = cw->Value ((cf+cl)/2.);
@@ -1418,7 +1420,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
     
     if(nb < nbAll) {
       for( i =1; i <= nbAll;i++) {
-        TopoDS_Shape aS2 = allSubShapes.Value(i);
+        const TopoDS_Shape& aS2 = allSubShapes.Value(i);
         if(aS2.ShapeType() != TopAbs_WIRE || 
            (aS2.Orientation() != TopAbs_FORWARD && aS2.Orientation() != TopAbs_REVERSED))
           B.Add ( S,aS2);
@@ -1467,7 +1469,7 @@ static Standard_Boolean CheckWire (const TopoDS_Wire &wire,
     TopoDS_Edge edge = TopoDS::Edge ( ed.Value() );
     if ( ! BRep_Tool::Degenerated ( edge ) ) isDeg = Standard_False;
     Handle(Geom2d_Curve) c2d;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     if ( ! sae.PCurve ( edge, face, c2d, f, l, Standard_True ) ) 
       return Standard_False;
     vec += c2d->Value(l).XY() - c2d->Value(f).XY();
@@ -1533,9 +1535,9 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
       return Standard_False;
   }
   
-  Standard_Real URange, VRange, SUF, SUL, SVF, SVL;
+  Standard_Real URange = NAN, VRange = NAN, SUF = NAN, SUL = NAN, SVF = NAN, SVL = NAN;
   mySurf->Bounds ( SUF, SUL, SVF, SVL );
-  Standard_Real fU1,fU2,fV1,fV2;
+  Standard_Real fU1 = NAN,fU2 = NAN,fV1 = NAN,fV2 = NAN;
   BRepTools::UVBounds(myFace,fU1,fU2,fV1,fV2);
   
   //pdn OCC55 fix to faces without the wires to avoid identical first and last parameters
@@ -1574,11 +1576,11 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
   }
     
   TopoDS_Wire w1, w2;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for ( i=1; i <= ws.Length(); i++ ) {
     TopoDS_Wire wire = TopoDS::Wire ( ws.Value(i) );
-    Standard_Integer isuopen, isvopen;
-    Standard_Boolean isdeg;
+    Standard_Integer isuopen = 0, isvopen = 0;
+    Standard_Boolean isdeg = 0;
     if ( ! CheckWire ( wire, myFace, URange, VRange, isuopen, isvopen, isdeg ) ) 
       continue;
     if ( w1.IsNull() ) { w1 = wire; ismodeu = isuopen; ismodev = isvopen; isdeg1 = isdeg ? i : 0; }
@@ -1637,7 +1639,7 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
     // then usual procedure applied
     gp_Pnt2d p;
     gp_Dir2d d;
-    Standard_Real aRange;
+    Standard_Real aRange = NAN;
 
     if( ismodeu && anIsDegeneratedTor )
     {
@@ -1657,7 +1659,7 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
       aRange = 2.*M_PI;
     }
     else if ( ismodev && mySurf->Surface()->IsKind(STANDARD_TYPE(Geom_BSplineSurface))) {
-      Standard_Real uCoord;
+      Standard_Real uCoord = NAN;
       if (mySurf->Value(SUF, SVF).Distance(mySurf->Value(SUF, (SVF + SVL) / 2)) < ::Precision::Confusion())
         uCoord = SUF;
       else if (mySurf->Value(SUL, SVF).Distance(mySurf->Value(SUL, (SVF + SVL) / 2)) < ::Precision::Confusion())
@@ -1669,7 +1671,7 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
       aRange = VRange;
     }
     else if ( ismodeu && mySurf->Surface()->IsKind(STANDARD_TYPE(Geom_BSplineSurface))) {
-      Standard_Real vCoord;
+      Standard_Real vCoord = NAN;
       if (mySurf->Value(SUF, SVF).Distance(mySurf->Value((SUF + SUL) / 2, SVF)) < ::Precision::Confusion())
         vCoord = SVF;
       else if (mySurf->Value(SUL, SVL).Distance(mySurf->Value((SUF + SUL) / 2, SVL)) < ::Precision::Confusion())
@@ -1779,7 +1781,7 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
         continue;
       TopoDS_Wire w = TopoDS::Wire ( it.Value() );
       if ( w == w11 ) continue;
-      Standard_Real shift;
+      Standard_Real shift = NAN;
       if ( w == w21 ) shift = shiftw2;
 
       else {
@@ -1796,7 +1798,7 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
        for ( TopoDS_Iterator iw(w); iw.More(); iw.Next() ) {
          TopoDS_Edge E = TopoDS::Edge ( iw.Value() );
          Handle(Geom2d_Curve) C;
-         Standard_Real a, b;
+         Standard_Real a = NAN, b = NAN;
          if ( ! sae.PCurve ( E, tmpF, C, a, b ) ) continue;
          C->Translate ( V );
        }
@@ -1820,7 +1822,7 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
   for ( Standard_Integer i1 = 1; i1 <= nb1 + nb2; i1++ ) {
     TopoDS_Edge edge1 = ( i1 <= nb1 ? wd1->Edge ( i1 ) : wd2->Edge ( i1-nb1 ) );
     Handle(Geom2d_Curve) c2d;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     if ( ! sae.PCurve ( edge1, tmpF, c2d, f, l, Standard_True ) ) return Standard_False;
     gp_Pnt2d pos1 = c2d->Value(l).XY();
     // the best place is end of edge which is nearest to 0 
@@ -2288,7 +2290,7 @@ Standard_Boolean ShapeFix_Face::SplitEdge(const Handle(ShapeExtend_WireData)& se
     TopLoc_Location L;
     const Handle(Geom_Surface)& S = BRep_Tool::Surface(myFace,L);
     Handle(Geom2d_Curve) c2d;
-    Standard_Real cf,cl;
+    Standard_Real cf = NAN,cl = NAN;
     ShapeAnalysis_Edge sae;
     if(sae.PCurve(newE1,S,L,c2d,cf,cl,Standard_False)) {
       Bnd_Box2d box;
@@ -2364,7 +2366,7 @@ Standard_Boolean ShapeFix_Face::SplitEdge(const Handle(ShapeExtend_WireData)& se
     TopLoc_Location L;
     const Handle(Geom_Surface)& S = BRep_Tool::Surface(myFace,L);
     Handle(Geom2d_Curve) c2d;
-    Standard_Real cf,cl;
+    Standard_Real cf = NAN,cl = NAN;
     ShapeAnalysis_Edge sae;
     if(sae.PCurve(newE1,S,L,c2d,cf,cl,Standard_False)) {
       Bnd_Box2d box;
@@ -2486,7 +2488,7 @@ Standard_Boolean ShapeFix_Face::FixSplitFace(const TopTools_DataMapOfShapeListOf
   TopoDS_Shape S = myFace;
   if ( ! Context().IsNull() ) 
     S = Context()->Apply ( myFace );
-  Standard_Integer NbWires=0, NbWiresNew=0, NbEdges;
+  Standard_Integer NbWires=0, NbWiresNew=0, NbEdges = 0;
   for(TopoDS_Iterator iter(S,Standard_False); iter.More(); iter.Next()) {
     const TopoDS_Shape& aShape = iter.Value();
     if(aShape.ShapeType() != TopAbs_WIRE || 
@@ -2597,7 +2599,7 @@ static Standard_Boolean IsPeriodicConicalLoop(const Handle(Geom_ConicalSurface)&
   {
     const TopoDS_Edge& aCurrentEdge = TopoDS::Edge(aWireIter.Value());
     Handle(Geom2d_Curve) aC2d;
-    Standard_Real aPFirst, aPLast;
+    Standard_Real aPFirst = NAN, aPLast = NAN;
 
     aSAE.PCurve(aCurrentEdge, theSurf, aLoc, aC2d, aPFirst, aPLast, Standard_True);
 
index 3e9af255333d80259a35f4301c76a7ba93c2e64a..6c6f079af378cfeb93a458e746e25848224e1311 100644 (file)
@@ -268,17 +268,17 @@ private:
   
   Standard_EXPORT Standard_Boolean SplitEdge (const Handle(ShapeExtend_WireData)& sewd, const Standard_Integer num, const Standard_Real param1, const Standard_Real param2, const TopoDS_Vertex& vert, const Standard_Real preci, ShapeFix_DataMapOfShapeBox2d& boxes);
 
-  Standard_Integer myFixWireMode;
-  Standard_Integer myFixOrientationMode;
-  Standard_Integer myFixAddNaturalBoundMode;
-  Standard_Integer myFixMissingSeamMode;
-  Standard_Integer myFixSmallAreaWireMode;
-  Standard_Integer myRemoveSmallAreaFaceMode;
-  Standard_Integer myFixLoopWiresMode;
-  Standard_Integer myFixIntersectingWiresMode;
-  Standard_Integer myFixSplitFaceMode;
-  Standard_Integer myAutoCorrectPrecisionMode;
-  Standard_Integer myFixPeriodicDegenerated;
+  Standard_Integer myFixWireMode{};
+  Standard_Integer myFixOrientationMode{};
+  Standard_Integer myFixAddNaturalBoundMode{};
+  Standard_Integer myFixMissingSeamMode{};
+  Standard_Integer myFixSmallAreaWireMode{};
+  Standard_Integer myRemoveSmallAreaFaceMode{};
+  Standard_Integer myFixLoopWiresMode{};
+  Standard_Integer myFixIntersectingWiresMode{};
+  Standard_Integer myFixSplitFaceMode{};
+  Standard_Integer myAutoCorrectPrecisionMode{};
+  Standard_Integer myFixPeriodicDegenerated{};
 
 
 };
index 1d3593a4cd721f45df208661306e1f00d95dbb71..b39e6d3eb36d79718191064c01b5e808fafd1ccb 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepBuilderAPI_Sewing.hxx>
@@ -374,7 +376,7 @@ ShapeFix_FaceConnect::ShapeFix_FaceConnect() {}
     TopoDS_Wire theNewW;
     TopoDS_Vertex theOldV1, theOldV2, theNewV1, theNewV2, theNewV;
     gp_Pnt theOldP1, theOldP2;
-    Standard_Real dist1, dist2, curdist1, curdist2;
+    Standard_Real dist1 = NAN, dist2 = NAN, curdist1 = NAN, curdist2 = NAN;
     for ( TopTools_DataMapIteratorOfDataMapOfShapeListOfShape theOEIter( myOriFreeEdges );
          theOEIter.More(); theOEIter.Next() ) {
       // Iterate on original free edges
@@ -487,7 +489,7 @@ ShapeFix_FaceConnect::ShapeFix_FaceConnect() {}
        Handle(ShapeFix_Wire) SFW = new ShapeFix_Wire;
        Handle(ShapeFix_Face) SFF = new ShapeFix_Face;
        ShapeAnalysis_Edge SAE;
-       Standard_Real f,l;
+       Standard_Real f = NAN,l = NAN;
        Handle(Geom2d_Curve) c2d;
        Handle(ShapeExtend_WireData) sewd;
 
@@ -603,7 +605,7 @@ ShapeFix_FaceConnect::ShapeFix_FaceConnect() {}
              else if ( val > theRBound.Z() ) theRBound.SetZ( val );
            }
            thePosition = gp_Pnt((theLBound.XYZ() + theRBound.XYZ())/2.);
-           Standard_Real theTolerance = 0., curtoler;
+           Standard_Real theTolerance = 0., curtoler = NAN;
            // Calculate the vertex tolerance
            for ( theN2Iter.Initialize(theRV2Iter.Value()); theN2Iter.More(); theN2Iter.Next() ) {
              theOldVert = TopoDS::Vertex(theN2Iter.Value());
index a3365808b1f44403ff129aa05ff8891e609bf98a..36c542061b2b2c009b31cf2887f00a8a5031e7df 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepLib.hxx>
@@ -52,9 +54,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_FixSmallFace,ShapeFix_Root)
 //#include <GeomLProp_SLProps.hxx>
 //#include <TColStd_Array2OfReal.hxx>
 //#include <TColStd_Array1OfReal.hxx>
-ShapeFix_FixSmallFace::ShapeFix_FixSmallFace()
+ShapeFix_FixSmallFace::ShapeFix_FixSmallFace() : myStatus(ShapeExtend::EncodeStatus ( ShapeExtend_OK ))
 {
-  myStatus = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
+  
   SetPrecision(Precision::Confusion());
 
 }
@@ -129,7 +131,7 @@ ShapeFix_FixSmallFace::ShapeFix_FixSmallFace()
   TColgp_SequenceOfXYZ thePositions;
   gp_XYZ thePosition;
   BRep_Builder theBuilder;
-  Standard_Real theMaxDev;
+  Standard_Real theMaxDev = NAN;
   Standard_Real theMaxTol = 0.0;
   thePositions.Clear();
   gp_Pnt thePoint;
@@ -156,7 +158,7 @@ ShapeFix_FixSmallFace::ShapeFix_FixSmallFace()
   //Calculate common vertex position
   thePosition = gp_XYZ(0.,0.,0.);
   Standard_Integer theNbPos = thePositions.Length();
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (  i = 1; i <= theNbPos; i++ ) thePosition += thePositions.Value(i);
   if ( theNbPos > 1 ) thePosition /= theNbPos;
    
@@ -334,7 +336,7 @@ ShapeFix_FixSmallFace::ShapeFix_FixSmallFace()
   TopExp::Vertices (E1,V1,V2);
   TopExp::Vertices (E2,V3,V4);
   gp_Pnt p1, p2;
-  Standard_Real dev;
+  Standard_Real dev = NAN;
   p1 = BRep_Tool::Pnt(V1);
   p2 =  BRep_Tool::Pnt(V3);
   dev = p1.Distance(p2);
@@ -444,7 +446,7 @@ ShapeFix_FixSmallFace::ShapeFix_FixSmallFace()
   if (theFirstVer.IsNull() || theSecondVer.IsNull()) return theNewEdge;
   //Create new edge
   theBuilder.MakeEdge(theNewEdge);
-  Standard_Real f, l, fp1, lp1/*, fp2, lp2*/;
+  Standard_Real f = NAN, l = NAN, fp1 = NAN, lp1 = NAN/*, fp2, lp2*/;
   TopLoc_Location loc;
   Handle(Geom_Curve) the3dcurve;
   the3dcurve = BRep_Tool::Curve(E1, f, l);
@@ -461,7 +463,7 @@ ShapeFix_FixSmallFace::ShapeFix_FixSmallFace()
       if(!the2dcurve2.IsNull()) GeomLib::SameRange(Precision::Confusion(), the2dcurve2, fp2, lp2, f, l, thenew2);
     }*/
 
-  Standard_Real maxdev; 
+  Standard_Real maxdev = NAN
   if ((BRep_Tool::Tolerance(theFirstVer))<=(BRep_Tool::Tolerance(theSecondVer))) 
     maxdev = (BRep_Tool::Tolerance(theSecondVer));
   else  maxdev = (BRep_Tool::Tolerance(theFirstVer));
@@ -554,12 +556,12 @@ ShapeFix_FixSmallFace::ShapeFix_FixSmallFace()
          E = TopoDS::Edge (ite.Current());
          TopoDS_Vertex V1,V2;
          TopExp::Vertices (E,V1,V2);
-         Standard_Real cf,cl;
+         Standard_Real cf = NAN,cl = NAN;
          Handle(Geom_Curve) C3D = BRep_Tool::Curve (E,cf,cl);
          if (C3D.IsNull()) continue;
          if (V.IsSame(V1) || V.IsSame(V2)) continue;
          Standard_Real vt = BRep_Tool::Tolerance (V);
-         Standard_Real param;
+         Standard_Real param = NAN;
          Standard_Real dist = SAC.Project (C3D,vp,vt*10.,proj,param,cf,cl);
          if (dist==0) continue; //Projection on same curve but on other edge ?
          if ( dist <= vt ) 
@@ -568,7 +570,7 @@ ShapeFix_FixSmallFace::ShapeFix_FixSmallFace()
              theBuilder.UpdateVertex(theNewVertex, proj, Precision::Confusion());
              theBuilder.MakeEdge(theFirstEdge);
              theBuilder.MakeEdge(theSecondEdge);
-             Standard_Real f, l;
+             Standard_Real f = NAN, l = NAN;
              Handle(Geom_Curve) the3dcurve = BRep_Tool::Curve(E, f, l);
              theBuilder.UpdateEdge(theFirstEdge, the3dcurve,Precision::Confusion());
              theBuilder.UpdateEdge(theSecondEdge, the3dcurve,Precision::Confusion());
index df9618e7e860c841ec0df0d8c2152beaff45f21a..08c3b812a38ef4451453cef588b01a2d9935d7e6 100644 (file)
@@ -53,10 +53,10 @@ ShapeFix_FreeBounds::ShapeFix_FreeBounds(const TopoDS_Shape& shape,
                                         const Standard_Real closetoler,
                                         const Standard_Boolean splitclosed,
                                         const Standard_Boolean splitopen) :
-       myShared (Standard_False), mySewToler (sewtoler), myCloseToler (closetoler),
+       myShape(shape), myShared (Standard_False), mySewToler (sewtoler), myCloseToler (closetoler),
        mySplitClosed (splitclosed), mySplitOpen (splitopen)
 {
-  myShape = shape;
+  
   Perform();
 }
 
@@ -69,10 +69,10 @@ ShapeFix_FreeBounds::ShapeFix_FreeBounds(const TopoDS_Shape& shape,
                                         const Standard_Real closetoler,
                                         const Standard_Boolean splitclosed,
                                         const Standard_Boolean splitopen):
-       myShared (Standard_True), mySewToler (0.), myCloseToler (closetoler),
+       myShape(shape), myShared (Standard_True), mySewToler (0.), myCloseToler (closetoler),
        mySplitClosed (splitclosed), mySplitOpen (splitopen)
 {
-  myShape = shape;
+  
   Perform();
 }
 
index b98d4bb2c565fa0ce8893efa3787353424ab750e..1fdb6ce02800e74de9d6a59bf823b9fb2aed1c47 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BndLib_Add2dCurve.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 //=======================================================================
 ShapeFix_IntersectionTool::ShapeFix_IntersectionTool(const Handle(ShapeBuild_ReShape)& context,
                                                      const Standard_Real preci,
-                                                     const Standard_Real maxtol)
+                                                     const Standard_Real maxtol) : myContext(context), myPreci(preci), myMaxTol(maxtol)
 {
-  myContext = context;
-  myPreci = preci;
-  myMaxTol = maxtol;
+  
+  
+  
 }
 
 
@@ -73,7 +75,7 @@ static gp_Pnt GetPointOnEdge(const TopoDS_Edge &edge,
                              const Standard_Real param )
 {
   if( BRep_Tool::SameParameter(edge) ) {
-    Standard_Real f,l;
+    Standard_Real f = NAN,l = NAN;
     TopLoc_Location L;
     const Handle(Geom_Curve) ConS = BRep_Tool::Curve ( edge, L, f, l );
     if( !ConS.IsNull() )
@@ -97,7 +99,7 @@ Standard_Boolean ShapeFix_IntersectionTool::SplitEdge(const TopoDS_Edge& edge,
                                                       TopoDS_Edge& newE2,
                                                       const Standard_Real preci) const
 {
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   ShapeAnalysis_Edge sae;
 
   TopoDS_Vertex V1 = sae.FirstVertex(edge);
@@ -113,7 +115,7 @@ Standard_Boolean ShapeFix_IntersectionTool::SplitEdge(const TopoDS_Edge& edge,
   gp_Pnt P1;
   TopLoc_Location L;
   if(BRep_Tool::SameParameter(edge) && !BRep_Tool::Degenerated(edge)) {
-    Standard_Real f,l;
+    Standard_Real f = NAN,l = NAN;
     const Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge,L,f,l);
     if(c3d.IsNull())
       return Standard_False;
@@ -137,7 +139,7 @@ Standard_Boolean ShapeFix_IntersectionTool::SplitEdge(const TopoDS_Edge& edge,
     new ShapeAnalysis_TransferParametersProj;
   transferParameters->SetMaxTolerance(preci);
   transferParameters->Init(edge,face);
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   if (a < b ) {
     first = a; 
     last = b;
@@ -188,7 +190,7 @@ Standard_Boolean ShapeFix_IntersectionTool::CutEdge(const TopoDS_Edge &edge,
 {
   if( Abs(cut-pend)<10.*Precision::PConfusion() ) return Standard_False;
   Standard_Real aRange = Abs(cut-pend);
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   BRep_Tool::Range(edge, a, b);
   
   if( aRange<10.*Precision::PConfusion() ) return Standard_False;
@@ -197,7 +199,7 @@ Standard_Boolean ShapeFix_IntersectionTool::CutEdge(const TopoDS_Edge &edge,
   if( !BRep_Tool::SameParameter(edge) ) {
     ShapeAnalysis_Edge sae;
     Handle(Geom2d_Curve) Crv;
-    Standard_Real fp,lp;
+    Standard_Real fp = NAN,lp = NAN;
     if ( sae.PCurve(edge,face,Crv,fp,lp,Standard_False) ) {
       if(Crv->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
         Handle(Geom2d_TrimmedCurve) tc = Handle(Geom2d_TrimmedCurve)::DownCast(Crv);
@@ -276,7 +278,7 @@ Standard_Boolean ShapeFix_IntersectionTool::SplitEdge1(const Handle(ShapeExtend_
   TopLoc_Location L;
   const Handle(Geom_Surface)& S = BRep_Tool::Surface(face,L);
   Handle(Geom2d_Curve) c2d;
-  Standard_Real cf,cl;
+  Standard_Real cf = NAN,cl = NAN;
   ShapeAnalysis_Edge sae;
   if(sae.PCurve(newE1,S,L,c2d,cf,cl,Standard_False)) {
     Bnd_Box2d box;
@@ -334,9 +336,9 @@ Standard_Boolean ShapeFix_IntersectionTool::SplitEdge2(const Handle(ShapeExtend_
   Standard_Real param = (param1+param2)/2;
   if(!SplitEdge(edge,param,vert,face,newE1,newE2,preci)) return Standard_False;
   // cut new edges by param1 and param2
-  Standard_Boolean IsCutLine;
+  Standard_Boolean IsCutLine = 0;
   Handle(Geom2d_Curve) Crv1, Crv2;
-  Standard_Real fp1,lp1,fp2,lp2;
+  Standard_Real fp1 = NAN,lp1 = NAN,fp2 = NAN,lp2 = NAN;
   ShapeAnalysis_Edge sae;
   if(sae.PCurve ( newE1, face, Crv1, fp1, lp1, Standard_False )) {
     if(sae.PCurve ( newE2, face, Crv2, fp2, lp2, Standard_False )) {
@@ -385,7 +387,7 @@ Standard_Boolean ShapeFix_IntersectionTool::SplitEdge2(const Handle(ShapeExtend_
   TopLoc_Location L;
   const Handle(Geom_Surface)& S = BRep_Tool::Surface(face,L);
   Handle(Geom2d_Curve) c2d;
-  Standard_Real cf,cl;
+  Standard_Real cf = NAN,cl = NAN;
   if(sae.PCurve(newE1,S,L,c2d,cf,cl,Standard_False)) {
     Bnd_Box2d box;
     Geom2dAdaptor_Curve gac;
@@ -468,7 +470,7 @@ Standard_Boolean ShapeFix_IntersectionTool::UnionVertexes(const Handle(ShapeExte
       edge2 = NewE;
       boxes.Bind(NewE,B2); // update boxes
       // replace vertex in other edge
-      Standard_Integer num21,num22;
+      Standard_Integer num21 = 0,num22 = 0;
       if(num2>1) num21=num2-1;
       else num21=sewd->NbEdges();
       if(num2<sewd->NbEdges()) num22=num2+1;
@@ -532,7 +534,7 @@ Standard_Boolean ShapeFix_IntersectionTool::UnionVertexes(const Handle(ShapeExte
       //boxes.Bind(NewE,boxes.Find(edge2)); // update boxes
       boxes.Bind(NewE,B2); // update boxes
       // replace vertex in other edge
-      Standard_Integer num21,num22;
+      Standard_Integer num21 = 0,num22 = 0;
       if(num2>1) num21=num2-1;
       else num21=sewd->NbEdges();
       if(num2<sewd->NbEdges()) num22=num2+1;
@@ -595,7 +597,7 @@ Standard_Boolean ShapeFix_IntersectionTool::UnionVertexes(const Handle(ShapeExte
       edge2 = NewE;
       boxes.Bind(NewE,B2); // update boxes
       // replace vertex in other edge
-      Standard_Integer num21,num22;
+      Standard_Integer num21 = 0,num22 = 0;
       if(num2>1) num21=num2-1;
       else num21=sewd->NbEdges();
       if(num2<sewd->NbEdges()) num22=num2+1;
@@ -658,7 +660,7 @@ Standard_Boolean ShapeFix_IntersectionTool::UnionVertexes(const Handle(ShapeExte
       edge2 = NewE;
       boxes.Bind(NewE,B2); // update boxes
       // replace vertex in other edge
-      Standard_Integer num21,num22;
+      Standard_Integer num21 = 0,num22 = 0;
       if(num2>1) num21=num2-1;
       else num21=sewd->NbEdges();
       if(num2<sewd->NbEdges()) num22=num2+1;
@@ -722,7 +724,7 @@ static Bnd_Box2d CreateBoxes2d(const Handle(ShapeExtend_WireData)& sewd,
   TopLoc_Location L;
   const Handle(Geom_Surface)& S = BRep_Tool::Surface(face,L);
   Handle(Geom2d_Curve) c2d;
-  Standard_Real cf,cl;
+  Standard_Real cf = NAN,cl = NAN;
   ShapeAnalysis_Edge sae;
   for(Standard_Integer i=1; i<=sewd->NbEdges(); i++){
     TopoDS_Edge E = sewd->Edge(i);
@@ -799,7 +801,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FindVertAndSplitEdge
   gp_Pnt pi1 = GetPointOnEdge(edge1,sas,Crv1,param1);
   BRep_Builder B;
   TopoDS_Vertex V;
-  Standard_Real tolV;
+  Standard_Real tolV = NAN;
   TopoDS_Vertex V1 = sae.FirstVertex(edge2);
   gp_Pnt PV1 = BRep_Tool::Pnt(V1);
   TopoDS_Vertex V2 = sae.LastVertex(edge2);
@@ -884,7 +886,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixSelfIntersectWire
       Bnd_Box2d B2 = boxes.Find(edge2);
       if(!B1.IsOut(B2)) {
         // intersection is possible...
-        Standard_Real a1, b1, a2, b2;
+        Standard_Real a1 = NAN, b1 = NAN, a2 = NAN, b2 = NAN;
         Handle(Geom2d_Curve) Crv1, Crv2;
         if( !sae.PCurve(edge1, face, Crv1, a1, b1, Standard_False) ) return Standard_False;
         if( !sae.PCurve(edge2, face, Crv2, a2, b2, Standard_False) ) return Standard_False;
@@ -931,7 +933,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixSelfIntersectWire
               
               Standard_Real dista = Abs(a1-param1);
               Standard_Real distb = Abs(b1-param1);
-              Standard_Boolean IsCutLine;
+              Standard_Boolean IsCutLine = 0;
               ModifE1 = CutEdge(edge1, (( dista > distb ) ? a1 : b1 ), param1, face, IsCutLine);
               if (ModifE1)
                 NbCut++;
@@ -960,7 +962,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixSelfIntersectWire
 
               Standard_Real dista = Abs(a2-param2);
               Standard_Real distb = Abs(b2-param2);
-              Standard_Boolean IsCutLine;
+              Standard_Boolean IsCutLine = 0;
               ModifE2 = CutEdge(edge2, (( dista > distb ) ? a2 : b2 ), param2, face, IsCutLine);
               if (ModifE2)
                 NbCut++;
@@ -1062,7 +1064,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixSelfIntersectWire
             Standard_Real dist1 = Pnt11.Distance(PV1);
             Standard_Real dist2 = Pnt12.Distance(PV1);
             Standard_Real maxdist = Max(dist1,dist2);
-            Standard_Real pdist;
+            Standard_Real pdist = NAN;
             if(edge1.Orientation()==TopAbs_REVERSED)
               pdist = Max(Abs(b1-p11),Abs(b1-p12));
             else
@@ -1092,12 +1094,12 @@ Standard_Boolean ShapeFix_IntersectionTool::FixSelfIntersectWire
               // cut edge1 and update tolerance NewV
               Standard_Real dista = Abs(a1-p11)+Abs(a1-p12);
               Standard_Real distb = Abs(b1-p11)+Abs(b1-p12);
-              Standard_Real pend,cut;
+              Standard_Real pend = NAN,cut = NAN;
               if(dista>distb) pend=a1;
               else pend=b1;
               if(Abs(pend-p11)>Abs(pend-p12)) cut=p12;
               else cut=p11;
-              Standard_Boolean IsCutLine;
+              Standard_Boolean IsCutLine = 0;
               if (CutEdge(edge1, pend, cut, face, IsCutLine))
                 NbCut++;
               if(newtol>BRep_Tool::Tolerance(NewV)) {
@@ -1145,12 +1147,12 @@ Standard_Boolean ShapeFix_IntersectionTool::FixSelfIntersectWire
               // cut edge1 and update tolerance NewV
               Standard_Real dista = Abs(a2-p21)+Abs(a2-p22);
               Standard_Real distb = Abs(b2-p21)+Abs(b2-p22);
-              Standard_Real pend,cut;
+              Standard_Real pend = NAN,cut = NAN;
               if(dista>distb) pend=a2;
               else pend=b2;
               if(Abs(pend-p21)>Abs(pend-p22)) cut=p22;
               else cut=p21;
-              Standard_Boolean IsCutLine;
+              Standard_Boolean IsCutLine = 0;
               if (CutEdge(edge2, pend, cut, face, IsCutLine))
                 NbCut++;
               if(newtol>BRep_Tool::Tolerance(NewV)) {
@@ -1236,7 +1238,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixSelfIntersectWire
                 TopoDS_Edge tmpE,SegE;
                 // split edge1
                 Standard_Integer akey1=0, akey2=0;
-                Standard_Real newTolerance;
+                Standard_Real newTolerance = NAN;
                 // analysis fo P01
                 newTolerance = Max(tolV1,BRep_Tool::Tolerance(V1));
                 if(P01.Distance(PV1)<newTolerance) {
@@ -1289,7 +1291,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixSelfIntersectWire
                     dnum1=1;
                   }
                   tmpE = sewd->Edge(num1);
-                  Standard_Real a,b;
+                  Standard_Real a = NAN,b = NAN;
                   Handle(Geom2d_Curve) c2d;
                   sae.PCurve(tmpE,face,c2d,a,b,Standard_False);
                   if( (a-p12)*(b-p12)>0 ) { // p12 - external for [a,b] => split next edge
@@ -1413,7 +1415,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixSelfIntersectWire
                     dnum2=1;
                   }
                   tmpE = sewd->Edge(num2+dnum1);
-                  Standard_Real a,b;
+                  Standard_Real a = NAN,b = NAN;
                   Handle(Geom2d_Curve) c2d;
                   sae.PCurve(tmpE,face,c2d,a,b,Standard_False);
                   if( (a-p22)*(b-p22)>0 ) { // p22 - external for [a,b] => split next edge
@@ -1530,7 +1532,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixIntersectingWires
           Bnd_Box2d B2 = boxes2.Find(edge2);
           if(!B1.IsOut(B2)) {
             // intersection is possible...
-            Standard_Real a1, b1, a2, b2;
+            Standard_Real a1 = NAN, b1 = NAN, a2 = NAN, b2 = NAN;
             Handle(Geom2d_Curve) Crv1, Crv2;
             if( !sae.PCurve(edge1, face, Crv1, a1, b1, Standard_False) ) 
               continue; //return Standard_False; gka 06.09.04
@@ -1631,7 +1633,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixIntersectingWires
                 Standard_Real dist1 = Pnt11.Distance(PV1);
                 Standard_Real dist2 = Pnt12.Distance(PV1);
                 Standard_Real maxdist = Max(dist1,dist2);
-                Standard_Real pdist;
+                Standard_Real pdist = NAN;
                 if(edge1.Orientation()==TopAbs_REVERSED)
                   pdist = Max(Abs(b1-p11),Abs(b1-p12));
                 else
@@ -1659,12 +1661,12 @@ Standard_Boolean ShapeFix_IntersectionTool::FixIntersectingWires
                   // cut edge1 and update tolerance NewV
                   Standard_Real dista = Abs(a1-p11)+Abs(a1-p12);
                   Standard_Real distb = Abs(b1-p11)+Abs(b1-p12);
-                  Standard_Real pend,cut;
+                  Standard_Real pend = NAN,cut = NAN;
                   if(dista>distb) pend=a1;
                   else pend=b1;
                   if(Abs(pend-p11)>Abs(pend-p12)) cut=p12;
                     else cut=p11;
-                  Standard_Boolean IsCutLine;
+                  Standard_Boolean IsCutLine = 0;
                   if(!CutEdge(edge1, pend, cut, face, IsCutLine))
                   {
                     IsModified1 = Standard_False;
@@ -1710,12 +1712,12 @@ Standard_Boolean ShapeFix_IntersectionTool::FixIntersectingWires
                   // cut edge1 and update tolerance NewV
                   Standard_Real dista = Abs(a2-p21)+Abs(a2-p22);
                   Standard_Real distb = Abs(b2-p21)+Abs(b2-p22);
-                  Standard_Real pend,cut;
+                  Standard_Real pend = NAN,cut = NAN;
                   if(dista>distb) pend=a2;
                   else pend=b2;
                   if(Abs(pend-p21)>Abs(pend-p22)) cut=p22;
                   else cut=p21;
-                  Standard_Boolean IsCutLine;
+                  Standard_Boolean IsCutLine = 0;
                   if(!CutEdge(edge2, pend, cut, face, IsCutLine))
                   {
                     IsModified2 = Standard_False;
@@ -1802,7 +1804,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixIntersectingWires
                       if(SplitEdge1(sewd1, face, num1, p11, NewV1, tolV1, boxes1)) {
                         NbModif++;
                         tmpE = sewd1->Edge (num1);
-                        Standard_Real a, b;
+                        Standard_Real a = NAN, b = NAN;
                         Handle (Geom2d_Curve) c2d;
                         sae.PCurve (tmpE, face, c2d, a, b, Standard_False);
                         if ((a - p12)*(b - p12) > 0)
@@ -1885,7 +1887,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixIntersectingWires
                         NbModif++;
                         numseg2=num2+1;
                         tmpE = sewd2->Edge (num2);
-                        Standard_Real a, b;
+                        Standard_Real a = NAN, b = NAN;
                         Handle (Geom2d_Curve) c2d;
                         sae.PCurve (tmpE, face, c2d, a, b, Standard_False);
                         if ((a - p22)*(b - p22) > 0)
@@ -1974,7 +1976,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixIntersectingWires
       B.Add(newface,wire);
     }
     for(i=1 ; i<=SeqNMShapes.Length(); i++) { 
-      TopoDS_Shape aNMS = SeqNMShapes.Value(i);
+      const TopoDS_Shape& aNMS = SeqNMShapes.Value(i);
       B.Add(newface,aNMS);
     }
     newface.Orientation(ori);
index 5794c9b30943a08aebc11dbd9cf9821bb9521f78..18be53084c5220ede761d28609fc37ccb52a176a 100644 (file)
@@ -24,10 +24,10 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_Root,Standard_Transient)
 //function : ShapeFix_Root
 //purpose  : 
 //=======================================================================
-ShapeFix_Root::ShapeFix_Root()
+ShapeFix_Root::ShapeFix_Root() : myMsgReg(new ShapeExtend_BasicMsgRegistrator)
 {
   myPrecision = myMinTol = myMaxTol = Precision::Confusion();
-  myMsgReg = new ShapeExtend_BasicMsgRegistrator;
+  
 }
 
 //=======================================================================
index 1e45f0b4696ec20959e7a2bfdcf7b2c38572fd15..391b366acdfeaacecca83fa679ae98b48559d71d 100644 (file)
@@ -39,17 +39,17 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_Shape,ShapeFix_Root)
 //function : ShapeFix_Shape
 //purpose  : 
 //=======================================================================
-ShapeFix_Shape::ShapeFix_Shape()
+ShapeFix_Shape::ShapeFix_Shape() : myFixSolid(new ShapeFix_Solid), myFixSolidMode(-1), myFixShellMode(-1), myFixFaceMode(-1), myFixWireMode(-1), myFixSameParameterMode(-1), myFixVertexPositionMode(0), myFixVertexTolMode(-1), myStatus(ShapeExtend::EncodeStatus (ShapeExtend_OK))
 {  
-  myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
-  myFixSolidMode = -1;
-  myFixShellMode = -1;
-  myFixFaceMode  = -1;
-  myFixWireMode  = -1;
-  myFixSameParameterMode = -1;
-  myFixVertexPositionMode =0;
-  myFixVertexTolMode = -1;
-  myFixSolid = new ShapeFix_Solid;
+  
+  
+  
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -57,17 +57,17 @@ ShapeFix_Shape::ShapeFix_Shape()
 //purpose  : 
 //=======================================================================
 
-ShapeFix_Shape::ShapeFix_Shape(const TopoDS_Shape& shape)
+ShapeFix_Shape::ShapeFix_Shape(const TopoDS_Shape& shape) : myFixSolid(new ShapeFix_Solid), myFixSolidMode(-1), myFixShellMode(-1), myFixFaceMode(-1), myFixWireMode(-1), myFixSameParameterMode(-1), myFixVertexPositionMode(0), myFixVertexTolMode(-1), myStatus(ShapeExtend::EncodeStatus (ShapeExtend_OK))
 {
-  myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
-  myFixSolidMode = -1;
-  myFixShellMode = -1;
-  myFixFaceMode  = -1;
-  myFixWireMode  = -1;
-  myFixSameParameterMode = -1;
-  myFixSolid = new ShapeFix_Solid;
-  myFixVertexPositionMode =0;
-  myFixVertexTolMode = -1;
+  
+  
+  
+  
+  
+  
+  
+  
+  
   Init(shape);
 }
 
index 7e10589d8135f70ddb41c901e44b1ecc9f1e4c5c..36749f5984fe506068a1a6783f890e19b02b11b9 100644 (file)
@@ -13,6 +13,8 @@
 
 // 25.12.98 pdn: adding empty constructor
 
+#include <math.h>
+
 #include <BRep_TEdge.hxx>
 #include <BRep_TFace.hxx>
 #include <BRep_Tool.hxx>
@@ -46,7 +48,7 @@ Standard_Boolean ShapeFix_ShapeTolerance::LimitTolerance(const TopoDS_Shape& sha
 {
   if (shape.IsNull() || tmin < 0) return Standard_False;
   Standard_Boolean iamax = (tmax >= tmin);
-  Standard_Real prec;
+  Standard_Real prec = NAN;
   Standard_Boolean fait = Standard_False;
   if (styp == TopAbs_VERTEX || styp == TopAbs_EDGE || styp == TopAbs_FACE) {
     for (TopExp_Explorer ex(shape,styp); ex.More(); ex.Next()) {
index fe2ba6e7541c6bf0147c0f5df496748f23536a8a..ecce75d9cbe84ddb4fb201a1b1f64ad659d3437d 100644 (file)
@@ -16,6 +16,8 @@
 
 // pdn 17.12.98 ie_exhaust-A.stp
 
+#include <math.h>
+
 #include <Bnd_Array1OfBox.hxx>
 #include <Bnd_Box.hxx>
 #include <BRep_Builder.hxx>
@@ -54,14 +56,14 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_Shell,ShapeFix_Root)
 //function : ShapeFix_Shell
 //purpose  : 
 //=======================================================================
-ShapeFix_Shell::ShapeFix_Shell()
+ShapeFix_Shell::ShapeFix_Shell() : myStatus(ShapeExtend::EncodeStatus (ShapeExtend_OK)), myFixFaceMode(-1), myFixOrientationMode(-1), myFixFace(new ShapeFix_Face), myNbShells(0), myNonManifold(Standard_False)
 {    
-  myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
-  myFixFaceMode = -1;
-  myFixOrientationMode = -1;
-  myFixFace = new ShapeFix_Face;
-  myNbShells =0;
-  myNonManifold = Standard_False;
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -69,14 +71,14 @@ ShapeFix_Shell::ShapeFix_Shell()
 //purpose  : 
 //=======================================================================
 
-ShapeFix_Shell::ShapeFix_Shell(const TopoDS_Shell& shape)
+ShapeFix_Shell::ShapeFix_Shell(const TopoDS_Shell& shape) : myStatus(ShapeExtend::EncodeStatus (ShapeExtend_OK)), myFixFaceMode(-1), myFixOrientationMode(-1), myFixFace(new ShapeFix_Face), myNonManifold(Standard_False)
 {
-  myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
-  myFixFaceMode = -1;
-  myFixOrientationMode = -1;
-  myFixFace = new ShapeFix_Face;
+  
+  
+  
+  
   Init(shape);
-  myNonManifold = Standard_False;
+  
 }
 
 //=======================================================================
@@ -339,7 +341,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface,
   TopTools_SequenceOfShape AddShapes; 
   for(Standard_Integer i1 = 1 ; i1<=Lface.Length();i1++ )  {
    
-    TopoDS_Shape aShape = Lface.Value(i1);
+    const TopoDS_Shape& aShape = Lface.Value(i1);
     
     Standard_Integer aNbMultEdges =0;
     
@@ -347,7 +349,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface,
     for(TopoDS_Iterator aItWires(aShape,Standard_False);  aItWires.More();  aItWires.Next()) {
       Standard_Integer aNbEdges =0;
       for(TopoDS_Iterator aItEdges(aItWires.Value(),Standard_False);  aItEdges.More();  aItEdges.Next(),aNbEdges++) {
-        TopoDS_Shape edge = aItEdges.Value();
+        const TopoDS_Shape& edge = aItEdges.Value();
         if(!aMapMultiConnectEdges.Contains(edge)) continue;
         aNbMultEdges++;
       }
@@ -367,7 +369,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface,
     TopTools_DataMapOfShapeShape aTmpFaceShell;
     if(GetShells(llPosibleShells,aMap,aTmpShells,aTmpFaceShell,aTmp)) {
       for(Standard_Integer kk =1; kk <= aTmpShells.Length(); kk++) {
-        TopoDS_Shape aSh = aTmpShells.Value(kk);
+        const TopoDS_Shape& aSh = aTmpShells.Value(kk);
         TopTools_MapOfShape mapEdges;
         if(GetFreeEdges(aSh,mapEdges)) {
           Standard_Integer nbedge =0;
@@ -386,7 +388,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface,
   for(Standard_Integer k1 =1; k1 <= AddShapes.Length(); k1++) {
     TopTools_DataMapOfShapeInteger MapOtherShells;
     TopTools_MapOfShape dire,reve;
-    TopoDS_Shape aSh = AddShapes.Value(k1);
+    const TopoDS_Shape& aSh = AddShapes.Value(k1);
     TopTools_MapOfShape mapEdges;
     if(!GetFreeEdges(aSh,mapEdges)) continue;
     TopTools_ListOfShape lfaces;
@@ -498,7 +500,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface,
 static Standard_Integer BoxIn(const Bnd_Box& theBox1,const Bnd_Box& theBox2)
 {
      Standard_Integer aNumIn = 0;
-     Standard_Real aXmin1,aYmin1,aXmax1,aYmax1,aXmin2,aYmin2,aXmax2,aYmax2,aZmin1,aZmax1,aZmin2,aZmax2;
+     Standard_Real aXmin1 = NAN,aYmin1 = NAN,aXmax1 = NAN,aYmax1 = NAN,aXmin2 = NAN,aYmin2 = NAN,aXmax2 = NAN,aYmax2 = NAN,aZmin1 = NAN,aZmax1 = NAN,aZmin2 = NAN,aZmax2 = NAN;
      theBox1.Get(aXmin1,aYmin1,aZmin1,aXmax1,aYmax1,aZmax1);
      theBox2.Get(aXmin2,aYmin2,aZmin2,aXmax2,aYmax2,aZmax2);
      if(aXmin1 == aXmin2 && aXmax1 == aXmax2 && aYmin1 == aYmin2 && aYmax1 == aYmax2 &&
@@ -573,7 +575,7 @@ static void GlueClosedCandidate(TopTools_SequenceOfShape& OpenShells,
       Standard_Boolean isReversed = Standard_False;
       Standard_Integer nbedge =0;
       TopTools_MapOfShape mapEdges2;
-      TopoDS_Shape aShell2 = OpenShells.Value(j);
+      const TopoDS_Shape& aShell2 = OpenShells.Value(j);
       if(!GetFreeEdges(aShell2,mapEdges2)) continue;
       for(TopTools_MapIteratorOfMapOfShape aIte2( mapEdges2);aIte2.More() && isAddShell;aIte2.Next()) {
         TopoDS_Edge edge2 = TopoDS::Edge(aIte2.Key());
@@ -675,13 +677,13 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
 {
   TopTools_IndexedDataMapOfShapeListOfShape aMap;
   for(Standard_Integer i =1 ; i <= SeqShells.Length(); i++) {
-    TopoDS_Shape aShell = SeqShells.Value(i);
+    const TopoDS_Shape& aShell = SeqShells.Value(i);
     TopTools_IndexedMapOfShape medeg;
     TopExp::MapShapes(aShell,TopAbs_EDGE,medeg);
     for(TopTools_MapIteratorOfMapOfShape mit(aMapMultiConnectEdges); mit.More(); mit.Next()) {
     //for(TopExp_Explorer aExp(aShell,TopAbs_EDGE); aExp.More(); aExp.Next(),nbe++) {
       //TopoDS_Shape ae = aExp.Current();
-      TopoDS_Shape ae =mit.Key();
+      const TopoDS_Shape& ae =mit.Key();
       //if( aMapMultiConnectEdges.Contains(aExp.Current())) {
       if(medeg.Contains(ae)) {
         if(aMap.Contains(ae))
@@ -714,7 +716,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
       else if(ismerged) {
         TopoDS_Shape arshell = aMapShells.FindFromKey(alit.Value());
         while(aMapShells.Contains(arshell)){
-          TopoDS_Shape ss = aMapShells.FindFromKey(arshell);
+          const TopoDS_Shape& ss = aMapShells.FindFromKey(arshell);
           if(ss.IsSame(arshell)) break;
           arshell = ss;
         }
@@ -729,7 +731,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
       else {
         TopoDS_Shape arshell = aMapShells.FindFromKey(alit.Value());
          while(aMapShells.Contains(arshell)) {
-          TopoDS_Shape ss = aMapShells.FindFromKey(arshell);
+          const TopoDS_Shape& ss = aMapShells.FindFromKey(arshell);
           if(ss.IsSame(arshell)) break;
           arshell = ss;
         }
@@ -749,7 +751,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
     }
     if(mapmerge.Extent() >1 || ismerged) {
       for(TopTools_MapIteratorOfMapOfShape alit1(mapmerge); alit1.More();alit1.Next()) {
-        TopoDS_Shape oldShell = alit1.Key();
+        const TopoDS_Shape& oldShell = alit1.Key();
          //while(aMapShells.Contains(oldShell)) {
          //  TopoDS_Shape ss = aMapShells.FindFromKey(oldShell);
          //  if(ss.IsSame(oldShell)) break;
@@ -764,7 +766,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells,
     if(aMapShells.Contains(SeqShells.Value(nn))) {
       TopoDS_Shape aNewShell = aMapShells.FindFromKey(SeqShells.Value(nn));
       while(aMapShells.Contains(aNewShell)) {
-        TopoDS_Shape ss = aMapShells.FindFromKey(aNewShell);
+        const TopoDS_Shape& ss = aMapShells.FindFromKey(aNewShell);
         if(ss.IsSame(aNewShell)) break;
         aNewShell = ss;
       }
index 4942e07c35ed756c2a6411bfd10d46e41808cd0e..29ac7573ba61ab66289e1839116e50773e5d6f42 100644 (file)
@@ -132,7 +132,7 @@ protected:
   Handle(ShapeFix_Face) myFixFace;
   Standard_Integer myFixFaceMode;
   Standard_Integer myFixOrientationMode;
-  Standard_Integer myNbShells;
+  Standard_Integer myNbShells{};
   Standard_Boolean myNonManifold;
 
 private:
index 7a553995b50e42eec42250f57c9561b91f074b51..6a9df82dc40be9b8a931ef155a4ae43e4551341f 100644 (file)
@@ -52,13 +52,13 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_Solid,ShapeFix_Root)
 //function : ShapeFix_Solid
 //purpose  : 
 //=======================================================================
-ShapeFix_Solid::ShapeFix_Solid()
+ShapeFix_Solid::ShapeFix_Solid() : myFixShell(new ShapeFix_Shell), myStatus(ShapeExtend::EncodeStatus (ShapeExtend_OK)), myFixShellMode(-1), myFixShellOrientationMode(-1), myCreateOpenSolidMode(Standard_False)
 {
-  myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
-  myFixShellMode = -1;
-  myFixShellOrientationMode = -1;
-  myFixShell = new ShapeFix_Shell;
-  myCreateOpenSolidMode = Standard_False;
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -66,13 +66,13 @@ ShapeFix_Solid::ShapeFix_Solid()
 //purpose  : 
 //=======================================================================
 
-ShapeFix_Solid::ShapeFix_Solid(const TopoDS_Solid& solid)
+ShapeFix_Solid::ShapeFix_Solid(const TopoDS_Solid& solid) : myFixShell(new ShapeFix_Shell), myStatus(ShapeExtend::EncodeStatus (ShapeExtend_OK)), myFixShellMode(-1), myFixShellOrientationMode(-1), myCreateOpenSolidMode(Standard_False)
 {
-  myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
-  myFixShellMode = -1;
-  myFixShellOrientationMode = -1;
-  myFixShell = new ShapeFix_Shell;
-  myCreateOpenSolidMode = Standard_False;
+  
+  
+  
+  
+  
   Init(solid);
 }
 
@@ -167,7 +167,7 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells ,
       if(!st) continue;
       for ( Standard_Integer j = 1; j <= aSeqShells.Length(); j++ ) {
         if(i==j) continue;
-        TopoDS_Shape aShell2 = aSeqShells.Value(j);
+        const TopoDS_Shape& aShell2 = aSeqShells.Value(j);
         if(!BRep_Tool::IsClosed(aShell2)) continue;
         if(aMapHoles.Contains(aShell2)) continue;
         if(aMapShellHoles.IsBound(aShell2)) {
@@ -245,7 +245,7 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells ,
 //purpose  : 
 //=======================================================================
 
-static Standard_Boolean CreateSolids(const TopoDS_Shape theShape,TopTools_IndexedMapOfShape& aMapSolids)
+static Standard_Boolean CreateSolids(const TopoDS_Shape& theShape,TopTools_IndexedMapOfShape& aMapSolids)
 {
   TopTools_SequenceOfShape aSeqShells;
   Standard_Boolean isDone = Standard_False;
@@ -432,8 +432,8 @@ Standard_Boolean ShapeFix_Solid::Perform(const Message_ProgressRange& theProgres
     if(aExp.More()) {
       TopoDS_Shell  aShtmp = TopoDS::Shell(aExp.Current());
       ShapeAnalysis_FreeBounds sfb(aShtmp);
-      TopoDS_Compound aC1 = sfb.GetClosedWires();
-      TopoDS_Compound aC2 = sfb.GetOpenWires();
+      const TopoDS_Compound& aC1 = sfb.GetClosedWires();
+      const TopoDS_Compound& aC2 = sfb.GetOpenWires();
       Standard_Integer numedge =0;
       TopExp_Explorer aExp1(aC1,TopAbs_EDGE); 
       for( ; aExp1.More(); aExp1.Next())
@@ -474,7 +474,7 @@ Standard_Boolean ShapeFix_Solid::Perform(const Message_ProgressRange& theProgres
     if(CreateSolids(aResShape,aMapSolids)) {
       SendWarning (Message_Msg ("FixAdvSolid.FixOrientation.MSG20"));// Orientation of shell was corrected.. 
       if(aMapSolids.Extent() ==1) {
-        TopoDS_Shape aResSol = aMapSolids.FindKey(1);
+        const TopoDS_Shape& aResSol = aMapSolids.FindKey(1);
         if(aResShape.ShapeType() == TopAbs_SHELL && myCreateOpenSolidMode) {
           TopoDS_Solid solid;
           BRep_Builder B;
index b2dd1d72fa37adf233dda8591e0000c6700bcced..755fa36dfe78b7e3cd975d790b50f6e74cace2b6 100644 (file)
@@ -40,9 +40,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_SplitCommonVertex,ShapeFix_Root)
 //function : ShapeFix_SplitCommonVertex
 //purpose  : 
 //=======================================================================
-ShapeFix_SplitCommonVertex::ShapeFix_SplitCommonVertex()
+ShapeFix_SplitCommonVertex::ShapeFix_SplitCommonVertex() : myStatus(ShapeExtend::EncodeStatus ( ShapeExtend_OK ))
 {
-  myStatus = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
+  
   SetPrecision(Precision::Confusion());
 }
 
index b50cdebdd0ce6263cc657c7b2ad01f57904d5462..88624ad2c426cf33a18ac4b99572b69e26f3ae90 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepTools.hxx>
@@ -61,7 +63,7 @@ Standard_Boolean ShapeFix_SplitTool::SplitEdge(const TopoDS_Edge& edge,
                                                const Standard_Real tol3d,
                                                const Standard_Real tol2d) const
 {
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   ShapeAnalysis_Edge sae;
   Handle(Geom2d_Curve) c2d;
   sae.PCurve(edge,face,c2d,a,b,Standard_True );
@@ -71,7 +73,7 @@ Standard_Boolean ShapeFix_SplitTool::SplitEdge(const TopoDS_Edge& edge,
   gp_Pnt P1;
   TopLoc_Location L;
   if(BRep_Tool::SameParameter(edge)) {
-    Standard_Real f,l;
+    Standard_Real f = NAN,l = NAN;
     const Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge,L,f,l);
     if(c3d.IsNull())
       return Standard_False;
@@ -95,7 +97,7 @@ Standard_Boolean ShapeFix_SplitTool::SplitEdge(const TopoDS_Edge& edge,
     new ShapeAnalysis_TransferParametersProj;
   transferParameters->SetMaxTolerance(tol3d);
   transferParameters->Init(edge,face);
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   if (a < b ) {
     first = a; 
     last = b;
@@ -154,9 +156,9 @@ Standard_Boolean ShapeFix_SplitTool::SplitEdge(const TopoDS_Edge& edge,
   Standard_Real param = (param1+param2)/2;
   if(SplitEdge(edge,param,vert,face,newE1,newE2,tol3d,tol2d)) {
     // cut new edges by param1 and param2
-    Standard_Boolean IsCutLine;
+    Standard_Boolean IsCutLine = 0;
     Handle(Geom2d_Curve) Crv1, Crv2;
-    Standard_Real fp1,lp1,fp2,lp2;
+    Standard_Real fp1 = NAN,lp1 = NAN,fp2 = NAN,lp2 = NAN;
     ShapeAnalysis_Edge sae;
     if(sae.PCurve ( newE1, face, Crv1, fp1, lp1, Standard_False )) {
       if(sae.PCurve ( newE2, face, Crv2, fp2, lp2, Standard_False )) {
@@ -201,7 +203,7 @@ Standard_Boolean ShapeFix_SplitTool::CutEdge(const TopoDS_Edge &edge,
 {
   if( Abs(cut-pend)<10.*Precision::PConfusion() ) return Standard_False;
   Standard_Real aRange = Abs(cut-pend);
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   BRep_Tool::Range(edge, a, b);
   iscutline = Standard_False;
   if( aRange<10.*Precision::PConfusion() ) return Standard_False;
@@ -210,7 +212,7 @@ Standard_Boolean ShapeFix_SplitTool::CutEdge(const TopoDS_Edge &edge,
   if( !BRep_Tool::SameParameter(edge) ) {
     ShapeAnalysis_Edge sae;
     Handle(Geom2d_Curve) Crv;
-    Standard_Real fp,lp;
+    Standard_Real fp = NAN,lp = NAN;
     if ( sae.PCurve(edge,face,Crv,fp,lp,Standard_False) ) {
       if(Crv->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
         Handle(Geom2d_TrimmedCurve) tc = Handle(Geom2d_TrimmedCurve)::DownCast(Crv);
@@ -291,7 +293,7 @@ Standard_Boolean ShapeFix_SplitTool::SplitEdge(const TopoDS_Edge& edge,
   aNum = 0;
   SeqE.Clear();
   BRep_Builder B;
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   ShapeAnalysis_Edge sae;
   Handle(Geom2d_Curve) c2d;
   sae.PCurve(edge,face,c2d,a,b,Standard_True);
@@ -306,7 +308,7 @@ Standard_Boolean ShapeFix_SplitTool::SplitEdge(const TopoDS_Edge& edge,
   gp_Pnt PV1 = BRep_Tool::Pnt(V1);
   gp_Pnt PV2 = BRep_Tool::Pnt(V2);
 
-  Standard_Real par1,par2;
+  Standard_Real par1 = NAN,par2 = NAN;
   Standard_Boolean IsReverse = Standard_False;
   if( (b-a)*(lp-fp)>0 ) {
     par1 = fp;
index f03fd76f01f84291f0e44aaf6c13d5f703742006..8a2d848fadc92e9588bb9689ef23ddf080874128 100644 (file)
@@ -43,6 +43,8 @@
 //                one pcurve we make replace pcurve)
 // PTV 26.06.2002  Remove regressions after fix OCC450
 
+#include <math.h>
+
 #include <ShapeFix_Wire.hxx>
 
 #include <BRep_Builder.hxx>
@@ -117,13 +119,13 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_Wire,ShapeFix_Root)
 //function : ShapeFix_Wire
 //purpose  : 
 //=======================================================================
-ShapeFix_Wire::ShapeFix_Wire() : myMaxTailAngleSine(0), myMaxTailWidth(-1)
+ShapeFix_Wire::ShapeFix_Wire() : myFixEdge(new ShapeFix_Edge), myAnalyzer(new ShapeAnalysis_Wire), myStatusRemovedSegment(Standard_False), myMaxTailAngleSine(0), myMaxTailWidth(-1)
 {
-  myFixEdge = new ShapeFix_Edge;
-  myAnalyzer = new ShapeAnalysis_Wire;
+  
+  
   ClearModes();
   ClearStatuses();
-  myStatusRemovedSegment = Standard_False;
+  
 }
 
 //=======================================================================
@@ -134,13 +136,13 @@ ShapeFix_Wire::ShapeFix_Wire() : myMaxTailAngleSine(0), myMaxTailWidth(-1)
 ShapeFix_Wire::ShapeFix_Wire (
   const TopoDS_Wire& wire,
   const TopoDS_Face &face,
-  const Standard_Real prec) : myMaxTailAngleSine(0), myMaxTailWidth(-1)
+  const Standard_Real prec) : myFixEdge(new ShapeFix_Edge), myAnalyzer(new ShapeAnalysis_Wire), myStatusRemovedSegment(Standard_False), myMaxTailAngleSine(0), myMaxTailWidth(-1)
 {
-  myFixEdge = new ShapeFix_Edge;
-  myAnalyzer = new ShapeAnalysis_Wire;
+  
+  
   ClearModes();
   SetMaxTolerance ( prec );
-  myStatusRemovedSegment = Standard_False;
+  
   Init ( wire, face, prec );
 }
 
@@ -524,7 +526,7 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
   Standard_Boolean isReady = IsReady();
 
   Handle(ShapeExtend_WireData) sbwd = WireData();
-  Standard_Integer i, nb = sbwd->NbEdges();
+  Standard_Integer i = 0, nb = sbwd->NbEdges();
   TopoDS_Face face = Face();
   Handle(ShapeFix_Edge) theAdvFixEdge = myFixEdge;
   if (theAdvFixEdge.IsNull()) myFixReversed2dMode = Standard_False;
@@ -569,23 +571,23 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
          ShapeBuild_Edge sbe;
          TopoDS_Edge E = sbwd->Edge ( i );
          ShapeAnalysis_Curve SAC;
-         Standard_Real a, b;
+         Standard_Real a = NAN, b = NAN;
          Handle(Geom_Curve) C = BRep_Tool::Curve ( E, a, b );
          Handle(ShapeAnalysis_Surface) S = myAnalyzer->Surface();
          Standard_Integer nbs = S->NbSingularities(MinTolerance());
          GeomAdaptor_Curve GAC ( C, a, b );
          TColStd_SequenceOfReal seq;
          for (Standard_Integer j=1; j <= nbs; j++) {
-           Standard_Real Preci;
+           Standard_Real Preci = NAN;
            gp_Pnt2d pd1, pd2;
            gp_Pnt P3d, pr;
-           Standard_Real par1, par2, split;
-           Standard_Boolean tmpUIsoDeg;
+           Standard_Real par1 = NAN, par2 = NAN, split = NAN;
+           Standard_Boolean tmpUIsoDeg = 0;
            S->Singularity (j, Preci, P3d, pd1, pd2, par1, par2, tmpUIsoDeg);
            if ( SAC.Project ( GAC, P3d, MinTolerance(), pr, split, Standard_True ) < Max(Preci,MinTolerance()) ) {
              if ( split - a > ::Precision::PConfusion() &&
                   b - split > ::Precision::PConfusion() ) {
-               Standard_Integer k;
+               Standard_Integer k = 0;
                for ( k=1; k <= seq.Length(); k++ ) {
                  if ( split < seq(k)-::Precision::PConfusion() ) {
                    seq.InsertBefore ( k, split );
@@ -614,7 +616,7 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
       else {
         if(sae.HasPCurve(E,face)) {
           Handle(Geom2d_Curve) C2d;
-          Standard_Real fp2d,lp2d;
+          Standard_Real fp2d = NAN,lp2d = NAN;
           if(sae.PCurve(E,face,C2d,fp2d,lp2d)) {
             if( !C2d->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve)) )
               sbe.RemovePCurve(E,face);
@@ -696,14 +698,14 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
     //:c0 abv 20 Feb 98: treat case of curve going over degenerated pole and seam
     if ( overdegen && myAnalyzer->Surface()->IsUClosed(Precision()) ) {
       ShapeBuild_Edge sbe;
-      Standard_Real URange, SUF, SUL, SVF, SVL;
+      Standard_Real URange = NAN, SUF = NAN, SUL = NAN, SVF = NAN, SVL = NAN;
       myAnalyzer->Surface()->Bounds(SUF, SUL, SVF, SVL);
       URange = (Abs(SUL - SUF));
       gp_XY vec(0,0);
       ShapeAnalysis_Edge sae;
-      Standard_Integer k;
+      Standard_Integer k = 0;
       for ( k = 1; k <= nb; k++) {
-       Standard_Real cf, cl;
+       Standard_Real cf = NAN, cl = NAN;
        Handle(Geom2d_Curve) c2d;
        if ( ! sae.PCurve ( sbwd->Edge(k), face, c2d, cf, cl, Standard_True ) ) break;
        vec += c2d->Value(cl).XY() - c2d->Value(cf).XY();
@@ -787,11 +789,11 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
     for ( i=1; i <= nb; i++ ) {
       // skl 28.10.2004 for OCC6366 - check SameRange
       ShapeAnalysis_Edge sae;
-      Standard_Real First, Last;
+      Standard_Real First = NAN, Last = NAN;
       Handle(Geom_Curve) tmpc3d = BRep_Tool::Curve(sbwd->Edge(i), First, Last);
       if(sae.HasPCurve(sbwd->Edge(i),face)) {
         Handle(Geom2d_Curve) C2d;
-        Standard_Real fp2d,lp2d;
+        Standard_Real fp2d = NAN,lp2d = NAN;
         if(sae.PCurve(sbwd->Edge(i),face,C2d,fp2d,lp2d, Standard_False)) {
           if( fabs(First-fp2d)>Precision::PConfusion() ||
               fabs(Last-lp2d)>Precision::PConfusion()    ) 
@@ -1117,7 +1119,7 @@ Standard_Boolean ShapeFix_Wire::FixReorder (const ShapeAnalysis_WireOrder& wi)
   }
 
   Handle(ShapeExtend_WireData) sbwd = WireData();
-  Standard_Integer i, nb = sbwd->NbEdges();
+  Standard_Integer i = 0, nb = sbwd->NbEdges();
   if ( nb != wi.NbEdges() ) {  
     myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
     return Standard_False;  
@@ -1311,7 +1313,7 @@ Standard_Boolean ShapeFix_Wire::FixSeam (const Standard_Integer num)
   if ( ! IsReady() ) return Standard_False;
 
   Handle(Geom2d_Curve) C1, C2;
-  Standard_Real cf, cl;
+  Standard_Real cf = NAN, cl = NAN;
   if ( ! myAnalyzer->CheckSeam (num, C1, C2, cf, cl) ) return Standard_False;
 
   BRep_Builder B;
@@ -1338,7 +1340,7 @@ Standard_Boolean ShapeFix_Wire::FixSeam (const Standard_Integer num)
 //:p4 abv 23.02.99: PRO9234 #15720: update UV points of edge 
 static void UpdateEdgeUVPoints (TopoDS_Edge &E, const TopoDS_Face &F)
 {
-  Standard_Real first, last;
+  Standard_Real first = NAN, last = NAN;
   BRep_Tool::Range ( E, F, first, last );
   BRep_Builder().Range ( E, F, first, last );
 }
@@ -1386,9 +1388,9 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
   // PTV 26.06.2002 end
   if ( ! uclosed && ! vclosed ) return Standard_False; 
   
-  Standard_Real URange, /*VRange,*/ SUF, SUL, SVF, SVL;
+  Standard_Real URange = NAN, /*VRange,*/ SUF = NAN, SUL = NAN, SVF = NAN, SVL = NAN;
   surf->Surface()->Bounds ( SUF, SUL, SVF, SVL );
-  Standard_Real SUMid, SVMid;
+  Standard_Real SUMid = NAN, SVMid = NAN;
   SUMid = 0.5*(SUF+SUL);
   SVMid = 0.5*(SVF+SVL);
   if (uclosed) URange = Abs ( SUL - SUF );
@@ -1451,7 +1453,7 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
 //    Standard_Boolean isDeg = surf->IsDegenerated ( p, Max ( Precision(), BRep_Tool::Tolerance(V) ) );
     Standard_Integer isDeg = 0;
     gp_Pnt2d degP1, degP2;
-    Standard_Real degT1, degT2;
+    Standard_Real degT1 = NAN, degT2 = NAN;
     if ( surf->DegeneratedValues ( p, Max ( Precision(), BRep_Tool::Tolerance(V) ),
                                    degP1, degP2, degT1, degT2 ) )
       isDeg = ( Abs ( degP1.X() - degP2.X() ) > Abs ( degP1.Y() - degP2.Y() ) ? 1 : 2 );
@@ -1514,7 +1516,7 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
           gp_Pnt2d pn1 = c2d1->Value ( b1 );
           gp_Pnt2d pn2 = c2d2->Value ( a2 );
           gp_Vec2d x(0.,0.); // shift vector
-          Standard_Real period;
+          Standard_Real period = NAN;
           if ( uclosed ) { x.SetX ( 1. ); period = URange; }
           else { x.SetY ( 1. ); period = VRange; }
           Standard_Real rot1 = ( pn1.XY() - pd2.XY() ) ^ x.XY();
@@ -1643,16 +1645,16 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
   }
   if ( box.IsVoid() ) return Standard_False; //#3 smh 01.04.99. S4163: Overflow, when box is void.
 
-  Standard_Real umin, vmin, umax, vmax;
+  Standard_Real umin = NAN, vmin = NAN, umax = NAN, vmax = NAN;
   box.Get ( umin, vmin, umax, vmax );
   if ( Abs ( umin + umax - SUF - SUL ) < URange &&
        Abs ( vmin + vmax - SVF - SVL ) < VRange &&
        ! LastFixStatus ( ShapeExtend_DONE ) ) return Standard_False;
 
   box.SetVoid();
-  Standard_Integer n; // svv Jan11 2000 : porting on DEC
+  Standard_Integer n = 0; // svv Jan11 2000 : porting on DEC
   for ( n=1; n <= nb; n++ ) {
-    Standard_Real a, b;
+    Standard_Real a = NAN, b = NAN;
     Handle(Geom2d_Curve) c2d;
     if ( ! sae.PCurve ( sbwd->Edge(n), Face(), c2d, a, b, Standard_True ) ) continue;
     box.Add ( c2d->Value ( a ) );
@@ -1683,7 +1685,7 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
   Shift.SetTranslation ( gp_Vec2d ( du, dv ) );
 
   for ( n=1; n <= sbwdOring->NbEdges(); n++ ) {
-    Standard_Real a, b;
+    Standard_Real a = NAN, b = NAN;
     Handle(Geom2d_Curve) c2d;
     TopoDS_Edge ed = sbwdOring->Edge(n);
     if ( ! sae.PCurve ( ed, Face(), c2d, a, b, Standard_True ) ) continue;
@@ -1780,7 +1782,7 @@ static Standard_Boolean TryNewPCurve (const TopoDS_Edge &E, const TopoDS_Face &f
                                      Standard_Real &last,
                                      Standard_Real &tol)
 {
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   Handle(Geom_Curve) crv = BRep_Tool::Curve ( E, f, l );
   if ( crv.IsNull() ) return Standard_False;
 
@@ -1843,10 +1845,10 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
                                    const Standard_Real prec,
                                     const Standard_Boolean RemoveLoop3d)
 {
-  Standard_Boolean loopRemoved3d;
+  Standard_Boolean loopRemoved3d = 0;
   if ( BRep_Tool::IsClosed ( E, face ) ) return Standard_False;
   
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   Handle(Geom_Curve) crv = BRep_Tool::Curve ( E, f, l );
 
   Standard_Real t1 = IP.ParamOnFirst();
@@ -1854,7 +1856,7 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
   if ( t1 > t2 ) { Standard_Real t = t1; t1 = t2; t2 = t; }
 
   ShapeAnalysis_Edge sae;
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   Handle(Geom2d_Curve) c2d;
   if ( ! sae.PCurve ( E, face, c2d, a, b, Standard_False ) ) 
     return Standard_False;
@@ -1976,7 +1978,7 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
   Standard_Real dist1 = pcurPnt.Distance(crv->Value(Seq3d->Value(1)));// correting Seq3d already project 
   Standard_Real dist2 = pcurPnt.Distance(crv->Value(Seq3d->Value(2)));
   Standard_Real dist3 = pcurPnt.Distance(crv->Value(Seq3d->Value(3)));
-  Standard_Real ftrim,ltrim;
+  Standard_Real ftrim = NAN,ltrim = NAN;
   if(dist3>Max(dist1,dist2)) {
     loopRemoved3d = Standard_False;
   }
@@ -2051,7 +2053,7 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
 
   if ( BRep_Tool::IsClosed ( E, face ) ) return Standard_False;
   
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   Handle(Geom_Curve) crv = BRep_Tool::Curve ( E, f, l );
 
   Standard_Real t1 = IP2d.ParamOnFirst();
@@ -2071,7 +2073,7 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
   Vlast  = sae.LastVertex(E); 
   
   // find a 2d curve and parameters from edge E
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   Handle (Geom2d_Curve) c2d;
   if ( ! sae.PCurve ( E, face, c2d, a, b, Standard_False ) ) 
     return Standard_False;
@@ -2108,7 +2110,7 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
   Standard_Real dist1 = pcurPnt.Distance(crv->Value(Seq3d->Value(1)));// correting Seq3d already project 
   Standard_Real dist2 = pcurPnt.Distance(crv->Value(Seq3d->Value(2)));
   Standard_Real dist3 = pcurPnt.Distance(crv->Value(Seq3d->Value(3)));
-  Standard_Real ftrim,ltrim;
+  Standard_Real ftrim = NAN,ltrim = NAN;
   if ( dist3 > Max(dist1, dist2)) { // is loop in 3d
     ftrim = Seq3d->Value(1);
     ltrim = Seq3d->Value(2);
@@ -2291,7 +2293,7 @@ Standard_Boolean ShapeFix_Wire::FixSelfIntersectingEdge (const Standard_Integer
   //===============================================
   if (myRemoveLoopMode == 1) {
     // after fixing will be nb+1 edges
-    Standard_Boolean loopRemoved; 
+    Standard_Boolean loopRemoved = 0
     // create a sequence of resulting edges
     Handle (TopTools_HSequenceOfShape) TTSS = new TopTools_HSequenceOfShape;
     TopoDS_Edge E2;
@@ -2355,13 +2357,13 @@ static Standard_Real ComputeLocalDeviation (const TopoDS_Edge &edge,
 {
   ShapeAnalysis_Edge sae;
   Handle(Geom_Curve) c3d;
-  Standard_Real a, b;
+  Standard_Real a = NAN, b = NAN;
   if ( ! sae.Curve3d ( edge, c3d, a, b, Standard_False ) ) return RealLast();
   
   gp_Lin line ( pint, gp_Vec ( pint, pnt ) );
   
   Handle(Geom2d_Curve) Crv;
-  Standard_Real fp,lp;
+  Standard_Real fp = NAN,lp = NAN;
   if ( sae.PCurve(edge,face,Crv,fp,lp,Standard_False) ) {
     if(Crv->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
       Handle(Geom2d_TrimmedCurve) tc = Handle(Geom2d_TrimmedCurve)::DownCast(Crv);
@@ -2423,7 +2425,7 @@ Standard_Boolean ShapeFix_Wire::FixIntersectingEdges (const Standard_Integer num
 
   Standard_Boolean isForward1 = ( E1.Orientation() == TopAbs_FORWARD );
   Standard_Boolean isForward2 = ( E2.Orientation() == TopAbs_FORWARD );
-  Standard_Real a1, b1, a2, b2;
+  Standard_Real a1 = NAN, b1 = NAN, a2 = NAN, b2 = NAN;
   BRep_Tool::Range ( E1, Face(), a1, b1 );
   BRep_Tool::Range ( E2, Face(), a2, b2 );
 
@@ -2686,7 +2688,7 @@ Standard_Boolean ShapeFix_Wire::FixIntersectingEdges (const Standard_Integer num
   vertices(3) = sae.FirstVertex(edge2);
   vertices(4) = sae.LastVertex(edge2);
   
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 1; i <=4; i++) {
     vertexPoints(i) = BRep_Tool::Pnt(TopoDS::Vertex(vertices(i)));
     vertexTolers(i) = BRep_Tool::Tolerance(TopoDS::Vertex(vertices(i)));
@@ -2699,7 +2701,7 @@ Standard_Boolean ShapeFix_Wire::FixIntersectingEdges (const Standard_Integer num
 
     // searching for the nearest vertexies to the intersection point
     Standard_Real aVtx1Param=0., aVtx2Param=0.;
-    Standard_Integer aVC1, aVC2;
+    Standard_Integer aVC1 = 0, aVC2 = 0;
     Standard_Real aMinDist = RealLast();
     gp_Pnt aNearestVertex;
     Standard_Real aNecessaryVtxTole = 0.0;
@@ -2723,7 +2725,7 @@ Standard_Boolean ShapeFix_Wire::FixIntersectingEdges (const Standard_Integer num
     Standard_Real param1 = IP.ParamOnFirst(); 
     Standard_Real param2 = IP.ParamOnSecond();  
     Handle(Geom_Curve) aCurve1, aCurve2;
-    Standard_Real f,l;
+    Standard_Real f = NAN,l = NAN;
     TopLoc_Location L1, L2;
     aCurve1 = BRep_Tool::Curve(edge1, L1, f, l);
     aCurve2 = BRep_Tool::Curve(edge2, L2, f, l);
@@ -2736,7 +2738,7 @@ Standard_Boolean ShapeFix_Wire::FixIntersectingEdges (const Standard_Integer num
     if(aMinDist < RealLast() && !aCurve1.IsNull() && !aCurve2.IsNull())
     {
       gp_Lin aLig(aNearestVertex, gp_Vec(aNearestVertex, pint));
-      Standard_Integer aPointsC;
+      Standard_Integer aPointsC = 0;
       Standard_Real du1 = 0.05*(param1 - aVtx1Param);
       Standard_Real du2 = 0.05*(param2 - aVtx2Param);
       Standard_Real tole1=BRep_Tool::Tolerance(edge1);
@@ -3010,7 +3012,7 @@ Standard_Boolean ShapeFix_Wire::FixLacking (const Standard_Integer num,
     // analyze the 3d space btw edges: is it enough to add long 3d edge?
     if ( myTopoMode ) {
       Handle(Geom_Curve) c3d;
-      Standard_Real a, b;
+      Standard_Real a = NAN, b = NAN;
       if ( ! sae.Curve3d ( E1, c3d, a, b, Standard_True ) ) { // cannot work
        myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 );
        return Standard_False; 
@@ -3204,8 +3206,8 @@ Standard_Boolean ShapeFix_Wire::FixNotchedEdges()
   Handle(ShapeExtend_WireData) sewd = WireData();
   
   for (Standard_Integer i = 1; i <= NbEdges() && NbEdges() > 2; i++) {
-    Standard_Real param;
-    Standard_Integer toRemove;
+    Standard_Real param = NAN;
+    Standard_Integer toRemove = 0;
     if(theAdvAnalyzer->CheckNotchedEdges(i,toRemove,param,MinTolerance())){
       Standard_Integer n2 = (i > 0)  ? i : NbEdges();
       Standard_Integer n1 = (n2 > 1) ? n2-1 : NbEdges();
@@ -3214,7 +3216,7 @@ Standard_Boolean ShapeFix_Wire::FixNotchedEdges()
       TopoDS_Edge splitE =  sewd->Edge ( toSplit );
       ShapeAnalysis_Edge sae;
       Handle(Geom2d_Curve) c2d;
-      Standard_Real a, b;
+      Standard_Real a = NAN, b = NAN;
       sae.PCurve ( splitE, face, c2d, a, b, Standard_True );
       ShapeBuild_Edge sbe;
       TopAbs_Orientation orient = splitE.Orientation();
@@ -3240,7 +3242,7 @@ Standard_Boolean ShapeFix_Wire::FixNotchedEdges()
           new ShapeAnalysis_TransferParametersProj;
        transferParameters->SetMaxTolerance(MaxTolerance());
        transferParameters->Init(splitE,face);
-       Standard_Real first, last;
+       Standard_Real first = NAN, last = NAN;
        if (a < b ) {
          first = a; 
          last = b;
@@ -3306,8 +3308,8 @@ static void CopyReversePcurves(const TopoDS_Edge& toedge,
                               const TopoDS_Edge& fromedge,
                               const Standard_Boolean reverse)
 {
-  TopLoc_Location fromLoc = fromedge.Location();
-  TopLoc_Location toLoc = toedge.Location();
+  const TopLoc_Location& fromLoc = fromedge.Location();
+  const TopLoc_Location& toLoc = toedge.Location();
   for (BRep_ListIteratorOfListOfCurveRepresentation fromitcr
        ((*((Handle(BRep_TEdge)*)&fromedge.TShape()))->ChangeCurves()); fromitcr.More(); fromitcr.Next()) {
     Handle(BRep_GCurve) fromGC = Handle(BRep_GCurve)::DownCast(fromitcr.Value());
@@ -3444,7 +3446,7 @@ void ShapeFix_Wire::FixDummySeam(const Standard_Integer num)
   if ( !Context().IsNull() ) Context()->Replace ( nextE, tmpE1);
   
   //removing edges from wire
-  Standard_Integer n1, n2;
+  Standard_Integer n1 = 0, n2 = 0;
   if ( num < num1 ) {
     n1 = num; n2 = num1;
   } else {
index e90a0cf659c85067ba6893781b1901e5cf1b9e92..77b7fd4876423ad5b20409717d4cf348d2401ba6 100644 (file)
@@ -464,49 +464,49 @@ protected:
 
   Handle(ShapeFix_Edge) myFixEdge;
   Handle(ShapeAnalysis_Wire) myAnalyzer;
-  Standard_Boolean myGeomMode;
-  Standard_Boolean myTopoMode;
-  Standard_Boolean myClosedMode;
-  Standard_Boolean myPreference2d;
-  Standard_Boolean myFixGapsByRanges;
-  Standard_Integer myFixReversed2dMode;
-  Standard_Integer myFixRemovePCurveMode;
-  Standard_Integer myFixAddPCurveMode;
-  Standard_Integer myFixRemoveCurve3dMode;
-  Standard_Integer myFixAddCurve3dMode;
-  Standard_Integer myFixSeamMode;
-  Standard_Integer myFixShiftedMode;
-  Standard_Integer myFixSameParameterMode;
-  Standard_Integer myFixVertexToleranceMode;
-  Standard_Integer myFixNotchedEdgesMode;
-  Standard_Integer myFixSelfIntersectingEdgeMode;
-  Standard_Integer myFixIntersectingEdgesMode;
-  Standard_Integer myFixNonAdjacentIntersectingEdgesMode;
-  Standard_Integer myFixTailMode;
-  Standard_Integer myRemoveLoopMode;
-  Standard_Integer myFixReorderMode;
-  Standard_Integer myFixSmallMode;
-  Standard_Integer myFixConnectedMode;
-  Standard_Integer myFixEdgeCurvesMode;
-  Standard_Integer myFixDegeneratedMode;
-  Standard_Integer myFixSelfIntersectionMode;
-  Standard_Integer myFixLackingMode;
-  Standard_Integer myFixGaps3dMode;
-  Standard_Integer myFixGaps2dMode;
-  Standard_Integer myLastFixStatus;
-  Standard_Integer myStatusReorder;
-  Standard_Integer myStatusSmall;
-  Standard_Integer myStatusConnected;
-  Standard_Integer myStatusEdgeCurves;
-  Standard_Integer myStatusDegenerated;
-  Standard_Integer myStatusClosed;
-  Standard_Integer myStatusSelfIntersection;
-  Standard_Integer myStatusLacking;
-  Standard_Integer myStatusGaps3d;
-  Standard_Integer myStatusGaps2d;
+  Standard_Boolean myGeomMode{};
+  Standard_Boolean myTopoMode{};
+  Standard_Boolean myClosedMode{};
+  Standard_Boolean myPreference2d{};
+  Standard_Boolean myFixGapsByRanges{};
+  Standard_Integer myFixReversed2dMode{};
+  Standard_Integer myFixRemovePCurveMode{};
+  Standard_Integer myFixAddPCurveMode{};
+  Standard_Integer myFixRemoveCurve3dMode{};
+  Standard_Integer myFixAddCurve3dMode{};
+  Standard_Integer myFixSeamMode{};
+  Standard_Integer myFixShiftedMode{};
+  Standard_Integer myFixSameParameterMode{};
+  Standard_Integer myFixVertexToleranceMode{};
+  Standard_Integer myFixNotchedEdgesMode{};
+  Standard_Integer myFixSelfIntersectingEdgeMode{};
+  Standard_Integer myFixIntersectingEdgesMode{};
+  Standard_Integer myFixNonAdjacentIntersectingEdgesMode{};
+  Standard_Integer myFixTailMode{};
+  Standard_Integer myRemoveLoopMode{};
+  Standard_Integer myFixReorderMode{};
+  Standard_Integer myFixSmallMode{};
+  Standard_Integer myFixConnectedMode{};
+  Standard_Integer myFixEdgeCurvesMode{};
+  Standard_Integer myFixDegeneratedMode{};
+  Standard_Integer myFixSelfIntersectionMode{};
+  Standard_Integer myFixLackingMode{};
+  Standard_Integer myFixGaps3dMode{};
+  Standard_Integer myFixGaps2dMode{};
+  Standard_Integer myLastFixStatus{};
+  Standard_Integer myStatusReorder{};
+  Standard_Integer myStatusSmall{};
+  Standard_Integer myStatusConnected{};
+  Standard_Integer myStatusEdgeCurves{};
+  Standard_Integer myStatusDegenerated{};
+  Standard_Integer myStatusClosed{};
+  Standard_Integer myStatusSelfIntersection{};
+  Standard_Integer myStatusLacking{};
+  Standard_Integer myStatusGaps3d{};
+  Standard_Integer myStatusGaps2d{};
   Standard_Boolean myStatusRemovedSegment;
-  Standard_Integer myStatusNotches;
-  Standard_Integer myStatusFixTails;
+  Standard_Integer myStatusNotches{};
+  Standard_Integer myStatusFixTails{};
   Standard_Real myMaxTailAngleSine;
   Standard_Real myMaxTailWidth;
 
index 3dfef905083b857e3ce4370809117ab6bac9f2b4..7f9ec63207db6b5839a999e0a7b4cf24ab18af03 100644 (file)
 //function : ShapeFix_WireSegment
 //purpose  : 
 //=======================================================================
-ShapeFix_WireSegment::ShapeFix_WireSegment()
+ShapeFix_WireSegment::ShapeFix_WireSegment() : myOrient(TopAbs_FORWARD)
 {
   Clear();
-  myOrient = TopAbs_FORWARD;
+  
 }
 
 //=======================================================================
@@ -37,10 +37,10 @@ ShapeFix_WireSegment::ShapeFix_WireSegment()
 //=======================================================================
 
 ShapeFix_WireSegment::ShapeFix_WireSegment(const Handle(ShapeExtend_WireData)& wire,
-                                          const TopAbs_Orientation ori)
+                                          const TopAbs_Orientation ori) : myOrient(ori)
 {
   Load ( wire );
-  myOrient = ori;
+  
 }
 
 //=======================================================================
index 80eca5c76006a38ac205276ae26de49eb45c7462..5eb5a52cd3e1da255dd9083d3c56cbfdb3d3546d 100644 (file)
@@ -13,6 +13,8 @@
 
 //szv#4 S4163
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <gp_Pnt.hxx>
 #include <ShapeAnalysis_Edge.hxx>
@@ -115,7 +117,7 @@ Standard_Integer ShapeFix_WireVertex::FixSame()
   BRep_Builder B;
 
   Handle(ShapeExtend_WireData) sbwd = myAnalyzer.WireData();
-  Standard_Integer i, nb = sbwd->NbEdges();
+  Standard_Integer i = 0, nb = sbwd->NbEdges();
 
   for (i = 1; i <= nb; i ++) {
     Standard_Integer j = (i == nb ? 1 : i+1);
@@ -135,7 +137,7 @@ Standard_Integer ShapeFix_WireVertex::FixSame()
     if (stat == 2) {
       // OK mais en reprenant les tolerances
       Handle(Geom_Curve) crv;  
-      Standard_Real cf,cl;
+      Standard_Real cf = NAN,cl = NAN;
       sae.Curve3d ( sbwd->Edge(i), crv, cf, cl );
       B.UpdateVertex (V1,cl,E1,myAnalyzer.Precision());
       sae.Curve3d ( sbwd->Edge(j), crv, cf, cl );
@@ -171,7 +173,7 @@ Standard_Integer ShapeFix_WireVertex::Fix()
 
   Handle(ShapeExtend_WireData) sbwd = myAnalyzer.WireData();
   
-  Standard_Integer i, nb = sbwd->NbEdges();
+  Standard_Integer i = 0, nb = sbwd->NbEdges();
   Standard_Integer nbfix = 0;
   for (i = 1; i <= nb; i ++) {
     //    On note les valeurs
@@ -210,7 +212,7 @@ Standard_Integer ShapeFix_WireVertex::Fix()
     Standard_Real ufol = myAnalyzer.UFollowing(j);
 
     Handle(Geom_Curve) crv;  
-    Standard_Real cf,cl;
+    Standard_Real cf = NAN,cl = NAN;
     //szv#4:S4163:12Mar99 optimized
     if (stat < 4) {
       sae.Curve3d ( sbwd->Edge(i), crv, cf, cl );
index 901cbad65dc96432e3b7c456ca8bbb5478848947..533f3c988eb30392dec3df2a5c7983db46d4513d 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 // szv 19.08.99: new methods for fixing gaps between edges (3d curves and pcurves)
+#include <math.h>
+
 #include <ShapeFix_Wire.hxx>
 #include <Standard_Failure.hxx>
 
@@ -79,7 +81,7 @@ Standard_Boolean ShapeFix_Wire::FixGaps3d ()
   myStatusGaps3d = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
 // if ( !IsReady() ) return Standard_False;
   
-  Standard_Integer i, start = ( myClosedMode ? 1 : 2 );
+  Standard_Integer i = 0, start = ( myClosedMode ? 1 : 2 );
   if (myFixGapsByRanges) 
   {
     for ( i = start; i <= NbEdges(); i++ ) 
@@ -107,7 +109,7 @@ Standard_Boolean ShapeFix_Wire::FixGaps3d ()
   myStatusGaps2d = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
 //  if ( !IsReady() ) return Standard_False;
 
-  Standard_Integer i, start = ( myClosedMode ? 1 : 2 );
+  Standard_Integer i = 0, start = ( myClosedMode ? 1 : 2 );
   if (myFixGapsByRanges) 
   {
     for ( i = start; i <= NbEdges(); i++ ) 
@@ -173,7 +175,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
 //  TopoDS_Face face = myAnalyzer->Face(); // comment by enk 
 
   // Retrieve curves on edges
-  Standard_Real cfirst1, clast1, cfirst2, clast2;
+  Standard_Real cfirst1 = NAN, clast1 = NAN, cfirst2 = NAN, clast2 = NAN;
   Handle(Geom_Curve) C1, C2;
   ShapeAnalysis_Edge SAE;
   if (!SAE.Curve3d(E1,C1,cfirst1,clast1) ||
@@ -199,7 +201,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
   gp_Pnt vpnt = (V1.IsSame(V2))? BRep_Tool::Pnt(V1) :
     gp_Pnt((BRep_Tool::Pnt(V1).XYZ()+BRep_Tool::Pnt(V2).XYZ())*0.5);
 
-  Standard_Real first1, last1, first2, last2;
+  Standard_Real first1 = NAN, last1 = NAN, first2 = NAN, last2 = NAN;
   if (reversed1) 
   { 
     first1 = clast1;  last1 = cfirst1; 
@@ -272,7 +274,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
 
     Handle(Geom_BSplineCurve) bsp1, bsp2;
     Handle(Geom_Curve) c;
-    Standard_Real first, last;
+    Standard_Real first = NAN, last = NAN;
 
     // iterate on curves
     Standard_Integer nbcurv = (n1==n2? 1 : 2);
@@ -446,7 +448,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
       if (Proj.NbPoints()) 
       {
        Standard_Integer index = 1;
-       Standard_Real dist, mindist=-1.;
+       Standard_Real dist = NAN, mindist=-1.;
        for (Standard_Integer i=1; i<=Proj.NbPoints(); i++) 
         {
          dist = vpnt.Distance(Proj.Point(i));
@@ -461,7 +463,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
       if (Proj.NbPoints()) 
       {
        Standard_Integer index = 1;
-       Standard_Real dist, mindist=-1.;
+       Standard_Real dist = NAN, mindist=-1.;
        for (Standard_Integer i=1; i<=Proj.NbPoints(); i++) 
         {
          dist = vpnt.Distance(Proj.Point(i));
@@ -518,7 +520,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
            // First find all intersections
            gp_Pnt pp1, pp2;
            Standard_Integer index1=0, index2=0;
-           Standard_Real uu1, uu2, pardist, pardist1=-1., pardist2=-1.;
+           Standard_Real uu1 = NAN, uu2 = NAN, pardist = NAN, pardist1=-1., pardist2=-1.;
            for (Standard_Integer i=1; i<=Extr.NbExtrema(); i++) 
             {
              Extr.Parameters(i,uu1,uu2);
@@ -766,7 +768,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
   TopoDS_Face face = myAnalyzer->Face();
 
   // Retrieve pcurves on edges
-  Standard_Real cfirst1, clast1, cfirst2, clast2;
+  Standard_Real cfirst1 = NAN, clast1 = NAN, cfirst2 = NAN, clast2 = NAN;
   Handle(Geom2d_Curve) PC1, PC2;
   ShapeAnalysis_Edge SAE;
   if (!SAE.PCurve(E1,face,PC1,cfirst1,clast1) ||
@@ -789,7 +791,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
   Standard_Boolean reversed1 = (E1.Orientation()==TopAbs_REVERSED),
                    reversed2 = (E2.Orientation()==TopAbs_REVERSED);
 
-  Standard_Real first1, last1, first2, last2;
+  Standard_Real first1 = NAN, last1 = NAN, first2 = NAN, last2 = NAN;
   if (reversed1) 
   { 
     first1 = clast1;  last1 = cfirst1;
@@ -860,7 +862,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
 
     Handle(Geom2d_BSplineCurve) bsp1, bsp2;
     Handle(Geom2d_Curve) pc;
-    Standard_Real first, last;
+    Standard_Real first = NAN, last = NAN;
 
     // iterate on pcurves
     Standard_Integer nbcurv = (n1==n2? 1 : 2);
@@ -1038,8 +1040,8 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
       {
        if (Inter.NbPoints() || Inter.NbSegments()) 
         {
-         Standard_Integer i, index1 = 0, index2 = 0;
-         Standard_Real pardist, pardist1=-1., pardist2=-1.;
+         Standard_Integer i = 0, index1 = 0, index2 = 0;
+         Standard_Real pardist = NAN, pardist1=-1., pardist2=-1.;
          // iterate on intersection points
          IntRes2d_IntersectionPoint IP;
          for ( i=1; i<=Inter.NbPoints(); i++ ) 
@@ -1148,7 +1150,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
        Geom2dAPI_ExtremaCurveCurve Extr(pc1,pc2,domfirst1,domlast1,domfirst2,domlast2);
        if (Extr.NbExtrema()) 
         {
-         Standard_Real u1, u2;
+         Standard_Real u1 = NAN, u2 = NAN;
          Extr.LowerDistanceParameters(u1,u2);
          // Adjust parameters on periodic curves
          u1 = AdjustOnPeriodic2d(pc1,reversed1,first1,last1,u1);
@@ -1177,7 +1179,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
        if (Proj.NbPoints()) 
         {
          Standard_Integer index = 1;
-         Standard_Real dist, mindist=-1.;
+         Standard_Real dist = NAN, mindist=-1.;
          for (Standard_Integer i=1; i<=Proj.NbPoints(); i++) 
           {
            dist = cpnt2.Distance(Proj.Point(i));
@@ -1193,7 +1195,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
        if (Proj.NbPoints()) 
         {
          Standard_Integer index = 1;
-         Standard_Real dist, mindist=-1.;
+         Standard_Real dist = NAN, mindist=-1.;
          for (Standard_Integer i=1; i<=Proj.NbPoints(); i++) 
           {
            dist = cpnt1.Distance(Proj.Point(i));
@@ -1222,7 +1224,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
          if (Proj.NbPoints()) 
           {
            Standard_Integer index = 1;
-           Standard_Real dist, mindist=-1.;
+           Standard_Real dist = NAN, mindist=-1.;
            for (Standard_Integer i=1; i<=Proj.NbPoints(); i++) 
             {
              dist = mpnt.Distance(Proj.Point(i));
@@ -1238,7 +1240,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
          if (Proj.NbPoints()) 
           {
            Standard_Integer index = 1;
-           Standard_Real dist, mindist=-1.;
+           Standard_Real dist = NAN, mindist=-1.;
            for (Standard_Integer i=1; i<=Proj.NbPoints(); i++) 
             {
              dist = mpnt.Distance(Proj.Point(i));
@@ -1279,12 +1281,12 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
         {
 
          // Check whether new points lie inside the surface bounds
-         Standard_Real umin, umax, vmin, vmax;
+         Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
          myAnalyzer->Surface()->Surface()->Bounds(umin,umax,vmin,vmax);
          if (::Precision::IsInfinite(umin) || ::Precision::IsInfinite(umax) ||
              ::Precision::IsInfinite(vmin) || ::Precision::IsInfinite(vmax)) 
           {
-           Standard_Real fumin, fumax, fvmin, fvmax;
+           Standard_Real fumin = NAN, fumax = NAN, fvmin = NAN, fvmax = NAN;
            BRepTools::UVBounds(face,fumin,fumax,fvmin,fvmax);
            if (::Precision::IsInfinite(umin)) umin = fumin-preci;
            if (::Precision::IsInfinite(umax)) umax = fumax+preci;
@@ -1293,8 +1295,8 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
          }
 
          gp_Pnt2d ipnt, P1, P2;
-         Standard_Real u, v;
-         Standard_Boolean out;
+         Standard_Real u = NAN, v = NAN;
+         Standard_Boolean out = 0;
          // iterate on curves
          for (Standard_Integer j=1; j<=2; j++) 
           {
@@ -1350,7 +1352,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
                IntRes2d_Domain dlin(P1,0.,tolint,P2,P1.Distance(P2),tolint);
 
                Handle(Geom2d_Curve) pc;
-               Standard_Real fpar, lpar;
+               Standard_Real fpar = NAN, lpar = NAN;
                if (j==1) 
                 {
                  if (cfirst1<ipar1) 
@@ -1385,8 +1387,8 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
                 {
                  if (Inter.NbPoints() || Inter.NbSegments()) 
                   {
-                   Standard_Integer i, index = 1;
-                   Standard_Real uu, dist, mindist=-1.;
+                   Standard_Integer i = 0, index = 1;
+                   Standard_Real uu = NAN, dist = NAN, mindist=-1.;
                    // iterate on intersection points
                    for ( i=1; i<=Inter.NbPoints(); i++ ) 
                     {
index 092d54246be178594f50ab552b8005e8494fc2e5..6a14dee5ad07d9fba54d449dabadea984cd261ec 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom2d_BSplineCurve.hxx>
@@ -55,11 +57,11 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_Wireframe,ShapeFix_Root)
 //function : ShapeFix_Wireframe
 //purpose  : 
 //=======================================================================
-ShapeFix_Wireframe::ShapeFix_Wireframe()
+ShapeFix_Wireframe::ShapeFix_Wireframe() : myModeDrop(Standard_False), myLimitAngle(-1)
 {
   ClearStatuses();
-  myModeDrop = Standard_False;
-  myLimitAngle = -1;
+  
+  
 }
 
 //=======================================================================
@@ -67,12 +69,12 @@ ShapeFix_Wireframe::ShapeFix_Wireframe()
 //purpose  : 
 //=======================================================================
 
-ShapeFix_Wireframe::ShapeFix_Wireframe(const TopoDS_Shape& shape)
+ShapeFix_Wireframe::ShapeFix_Wireframe(const TopoDS_Shape& shape) : myShape(shape), myModeDrop(Standard_False), myLimitAngle(-1)
 {
   ClearStatuses();
-  myShape = shape;
-  myModeDrop = Standard_False;
-  myLimitAngle = -1;
+  
+  
+  
 }
 
 //=======================================================================
@@ -282,7 +284,7 @@ ShapeFix_Wireframe::ShapeFix_Wireframe(const TopoDS_Shape& shape)
   Standard_Boolean isSame = (V11.IsSame(V12) || V22.IsSame(V21));
   BRep_Builder B;
   B.MakeEdge(newedge);
-  Standard_Real cf1,cf2,cl1,cl2,first1,first2,last1,last2;
+  Standard_Real cf1 = NAN,cf2 = NAN,cl1 = NAN,cl2 = NAN,first1 = NAN,first2 = NAN,last1 = NAN,last2 = NAN;
   newedge.Orientation(TopAbs_FORWARD);
   try 
   {
@@ -295,7 +297,7 @@ ShapeFix_Wireframe::ShapeFix_Wireframe(const TopoDS_Shape& shape)
     B.Add(newedge,V22.Oriented(TopAbs_REVERSED));
     
     Handle(Geom_Curve) CRes;
-    Standard_Boolean isRev1,isRev2;
+    Standard_Boolean isRev1 = 0,isRev2 = 0;
 //     Standard_Real newf,newl;
     if(!ShapeConstruct::JoinCurves(c3d1,c3d2,E1.Orientation(),E2.Orientation(),cf1, cl1,cf2, cl2,CRes,isRev1,isRev2))
       return  ReplaceFirst;
@@ -335,7 +337,7 @@ ShapeFix_Wireframe::ShapeFix_Wireframe(const TopoDS_Shape& shape)
       if(!sae.PCurve ( E2, face, c2d2, first2, last2, Standard_False )) return ReplaceFirst;
       
       Handle(Geom2d_Curve) C2dRes;
-      Standard_Boolean isRev12,isRev22;
+      Standard_Boolean isRev12 = 0,isRev22 = 0;
       if(!ShapeConstruct::JoinCurves(c2d1,c2d2,OrEdge1,OrEdge2,first1, last1,first2, last2,C2dRes,isRev12,isRev22,isSame))
       return  ReplaceFirst;
       
@@ -490,7 +492,7 @@ Standard_Boolean ShapeFix_Wireframe::CheckSmallEdges(TopTools_MapOfShape& theSma
       SAW.Init(aswd,face,Precision());
       // pnd protection on seam edges
       TopTools_DataMapOfShapeInteger EdgeMap;
-      Standard_Integer i;
+      Standard_Integer i = 0;
       for (i=1; i<=SAW.NbEdges(); i++) 
       {
        edge = SAW.WireData()->Edge(i);
@@ -541,7 +543,7 @@ Standard_Boolean ShapeFix_Wireframe::CheckSmallEdges(TopTools_MapOfShape& theSma
   {
     SAW.SetPrecision(Precision());
     TopTools_DataMapOfShapeInteger EdgeMap;
-    Standard_Integer i;
+    Standard_Integer i = 0;
     TopoDS_Wire theWire=TopoDS::Wire(expw1.Current());
     TopTools_ListOfShape theEdgeList;
     SAW.Load(theWire);
@@ -655,7 +657,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
            //SFW->Load(aWire);
            SFW->Load(aswd);
            SFW->FixReorder();
-           Standard_Integer prev, next, index = 1;
+           Standard_Integer prev = 0, next = 0, index = 1;
            
            while (index <= SFW->WireData()->NbEdges() && SFW->NbEdges()>1) 
             {
@@ -683,7 +685,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
                Standard_Boolean take_next = IsAnyJoin; //Standard_False;
                Standard_Boolean isLimAngle = Standard_False;
                Handle(Geom_Curve) C1, C2, C3;
-               Standard_Real aux, last1, first2, last2, first3;
+               Standard_Real aux = NAN, last1 = NAN, first2 = NAN, last2 = NAN, first3 = NAN;
                Standard_Real Ang1 = 0., Ang2 =0.;
                if (SAE.Curve3d(edge1,C1,aux,last1) &&
                    SAE.Curve3d(edge2,C2,first2,last2) &&
@@ -1017,7 +1019,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
                   TopoDS_Edge ed = (take_next ? edge1 : edge2);
                   ShapeAnalysis_Edge sae;
                   Handle(Geom_Curve) c3d;
-                  Standard_Real f1,l1;
+                  Standard_Real f1 = NAN,l1 = NAN;
                   if(sae.Curve3d(ed,c3d,f1,l1,Standard_False)) 
                   {
                     gp_Pnt p1,p2,p3;
@@ -1105,7 +1107,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
            TopoDS_Wire aWire = TopoDS::Wire(expw1.Current());
            SFW->Load(aWire);
            SFW->FixReorder();
-           Standard_Integer prev, next, index = 1;
+           Standard_Integer prev = 0, next = 0, index = 1;
            while (index <= SFW->NbEdges() && SFW->NbEdges()>1) 
             {
              prev = (index==1)? SFW->NbEdges() : index-1;
@@ -1132,7 +1134,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
                Standard_Boolean take_next = IsAnyJoin; //Standard_False;
                Standard_Boolean isLimAngle = Standard_False;
                Handle(Geom_Curve) C1, C2, C3;
-               Standard_Real aux, last1, first2, last2, first3;
+               Standard_Real aux = NAN, last1 = NAN, first2 = NAN, last2 = NAN, first3 = NAN;
                Standard_Real Ang1 = 0., Ang2 =0.;
                if (SAE.Curve3d(edge1,C1,aux,last1) &&
                    SAE.Curve3d(edge2,C2,first2,last2) &&
@@ -1465,7 +1467,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
                   TopoDS_Edge ed = (take_next ? edge1 : edge2);
                   ShapeAnalysis_Edge sae;
                   Handle(Geom_Curve) c3d;
-                  Standard_Real f1,l1;
+                  Standard_Real f1 = NAN,l1 = NAN;
                   if(sae.Curve3d(ed,c3d,f1,l1,Standard_False)) 
                   {
                     gp_Pnt p1,p2,p3;
index f5cbc076b790ac67b540ddd330165b7daab7da7b..f7db78776f444486909a972cf5994b7cb93eaaf0 100644 (file)
@@ -111,8 +111,8 @@ private:
 
   Standard_Boolean myModeDrop;
   Standard_Real myLimitAngle;
-  Standard_Integer myStatusWireGaps;
-  Standard_Integer myStatusSmallEdges;
+  Standard_Integer myStatusWireGaps{};
+  Standard_Integer myStatusSmallEdges{};
 
 
 };
index e38395aec5d0fdfaaa22b9599cdf7290c669942d..dfdda507d6c6ee60d2c6d67c1429b1c2a67ebe90 100644 (file)
@@ -89,7 +89,7 @@ Standard_Boolean ShapeProcess::Perform (const Handle(ShapeProcess_Context)& cont
   }
   TColStd_SequenceOfAsciiString sequenceOfOperators;
   TCollection_AsciiString oper;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for ( i=1; ; i++ ) {
     oper = sequence.Token ( " \t,;", i );
     if ( oper.Length() <=0 ) break;
index 1e9d891ef46e2dfadde5e2d3d9c76a92d9d8cdd0..3081cdc6a9bebc31472afb5921b7c6e60344daaf 100644 (file)
@@ -25,6 +25,7 @@
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_HAsciiString.hxx>
 
+#include <math.h>
 #include <sys/stat.h>
 IMPLEMENT_STANDARD_RTTIEXT(ShapeProcess_Context,Standard_Transient)
 
@@ -34,10 +35,10 @@ static Standard_Mutex THE_SHAPE_PROCESS_MUTEX;
 //function : ShapeProcess_Context
 //purpose  : 
 //=======================================================================
-ShapeProcess_Context::ShapeProcess_Context() 
+ShapeProcess_Context::ShapeProcess_Context() : myMessenger(Message::DefaultMessenger()), myTraceLev(1) 
 {
-  myMessenger = Message::DefaultMessenger();
-  myTraceLev = 1;
+  
+  
 }
        
 //=======================================================================
@@ -46,11 +47,11 @@ ShapeProcess_Context::ShapeProcess_Context()
 //=======================================================================
 
 ShapeProcess_Context::ShapeProcess_Context (const Standard_CString file,
-                                            const Standard_CString scope)
+                                            const Standard_CString scope) : myMessenger(Message::DefaultMessenger()), myTraceLev(1)
 {
   Init ( file, scope );
-  myMessenger = Message::DefaultMessenger();
-  myTraceLev = 1;
+  
+  
 }
 
 //=======================================================================
@@ -92,7 +93,7 @@ Handle(Resource_Manager) ShapeProcess_Context::LoadResourceManager (const Standa
   static Standard_Time sMtime, sUMtime;
   static TCollection_AsciiString sName;
 
-  struct stat buf;
+  struct stat buf{};
   Standard_Time aMtime(0), aUMtime(0);
   TCollection_AsciiString aPath,aUserPath;
   Resource_Manager::GetResourcePath(aPath,name,Standard_False);
@@ -344,7 +345,7 @@ Standard_Boolean ShapeProcess_Context::GetBoolean (const Standard_CString param,
 Standard_Real ShapeProcess_Context::RealVal (const Standard_CString param,
                                              const Standard_Real def) const
 {
-  Standard_Real val;
+  Standard_Real val = NAN;
   return GetReal ( param, val ) ? val : def;
 }
 
@@ -356,7 +357,7 @@ Standard_Real ShapeProcess_Context::RealVal (const Standard_CString param,
 Standard_Boolean ShapeProcess_Context::BooleanVal (const Standard_CString param,
                                                    const Standard_Boolean def) const
 {
-  Standard_Boolean val;
+  Standard_Boolean val = 0;
   return GetBoolean ( param, val ) ? val : def;
 }
 
@@ -368,7 +369,7 @@ Standard_Boolean ShapeProcess_Context::BooleanVal (const Standard_CString param,
 Standard_Integer ShapeProcess_Context::IntegerVal (const Standard_CString param,
                                                    const Standard_Integer def) const
 {
-  Standard_Integer val;
+  Standard_Integer val = 0;
   return GetInteger ( param, val ) ? val : def;
 }
 
index 71be9188df48dad8d35b335d303b814993e75253..871e245af1957221738d14047b2dc0c9001ec3d4 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRepLib.hxx>
 #include <BRepTools_Modifier.hxx>
@@ -166,7 +168,7 @@ static Standard_Boolean settol (const Handle(ShapeProcess_Context)& context,
   Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
   if ( ctx.IsNull() ) return Standard_False;
 
-  Standard_Real val;
+  Standard_Real val = NAN;
   if ( ctx->IntegerVal ( "Mode", 0 ) >0 && ctx->GetReal ( "Value", val ) ) {
     Standard_Real rat = ctx->RealVal ( "Ratio", 1. );
     if ( rat >= 1 ) {
@@ -177,7 +179,7 @@ static Standard_Boolean settol (const Handle(ShapeProcess_Context)& context,
 
   BRepLib::UpdateTolerances (ctx->Result(),Standard_True);
 
-  Standard_Real reg;
+  Standard_Real reg = NAN;
   if ( ctx->GetReal ("Regularity", reg) )  
     BRepLib::EncodeRegularity (ctx->Result(), reg);
 
@@ -377,11 +379,11 @@ static Standard_Boolean shapetobezier (const Handle(ShapeProcess_Context)& conte
     SCB.SetBSplineMode(BSplineMode);
   }
   
-  Standard_Real maxTol, minTol;
+  Standard_Real maxTol = NAN, minTol = NAN;
   if ( ctx->GetReal ( "MaxTolerance",   maxTol ) ) SCB.SetMaxTolerance(maxTol);
   if ( ctx->GetReal ( "MinCurveLength", minTol ) ) SCB.SetMinTolerance(minTol);
   
-  Standard_Boolean EdgeMode;
+  Standard_Boolean EdgeMode = 0;
   if ( ctx->GetBoolean ( "EdgeMode", EdgeMode ) ) SCB.SetEdgeMode(EdgeMode);
  
   if ( ! SCB.Perform() && SCB.Status (ShapeExtend_FAIL) ) { 
@@ -459,7 +461,7 @@ static Standard_Boolean splitcontinuity (const Handle(ShapeProcess_Context)& con
 
   tool.SetMsgRegistrator( msg );
     
-  Standard_Real maxTol;
+  Standard_Real maxTol = NAN;
   if ( ctx->GetReal ( "MaxTolerance", maxTol ) ) tool.SetMaxTolerance(maxTol);
   
   if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) { 
@@ -493,10 +495,10 @@ static Standard_Boolean splitclosedfaces (const Handle(ShapeProcess_Context)& co
   ShapeUpgrade_ShapeDivideClosed tool ( ctx->Result() );
   tool.SetMsgRegistrator( msg );
 
-  Standard_Real closeTol;
+  Standard_Real closeTol = NAN;
   if ( ctx->GetReal ( "CloseTolerance", closeTol ) ) tool.SetPrecision(closeTol);
   
-  Standard_Real maxTol;
+  Standard_Real maxTol = NAN;
   if ( ctx->GetReal ( "MaxTolerance", maxTol ) ) tool.SetMaxTolerance(maxTol);
   
   Standard_Integer num = ctx->IntegerVal ( "NbSplitPoints", 1 );
@@ -539,7 +541,7 @@ static Standard_Boolean fixfacesize (const Handle(ShapeProcess_Context)& context
   FSC.Init(ctx->Result());
   FSC.SetMsgRegistrator ( msg );
 
-  Standard_Real aTol;
+  Standard_Real aTol = NAN;
   if ( ctx->GetReal ( "Tolerance", aTol ) ) FSC.SetPrecision (aTol);
 
   FSC.Perform();
@@ -605,8 +607,8 @@ static Standard_Boolean dropsmallsolids (const Handle(ShapeProcess_Context)& con
   ShapeFix_FixSmallSolid FSS;
   FSS.SetMsgRegistrator( msg );
 
-  Standard_Real aThreshold;
-  Standard_Integer aMode;
+  Standard_Real aThreshold = NAN;
+  Standard_Integer aMode = 0;
   if (ctx->GetInteger ("FixMode", aMode))
     FSS.SetFixMode (aMode);
   if (ctx->GetReal ("VolumeThreshold", aThreshold))
index e24d82e595ac699f1105ad01544d7229dab6157a..7cf4ab76613f9011272c3a2ab77dcd118292d058 100644 (file)
@@ -177,7 +177,7 @@ static void RecModif (const TopoDS_Shape &S,
 {
   TopoDS_Shape r = S;
   //gka  -modification to keep history for shape with location (OCC21617)
-  TopLoc_Location aShLoc = S.Location();
+  const TopLoc_Location& aShLoc = S.Location();
   TopLoc_Location aNullLoc;
   r.Location(aNullLoc);
 
@@ -204,9 +204,9 @@ static void RecModif (const TopoDS_Shape &S,
       Standard_Boolean modif = Standard_False;
       BRep_Builder B;
       for ( TopoDS_Iterator it(r,Standard_False); it.More(); it.Next() ) {
-       TopoDS_Shape sh = it.Value();
+       const TopoDS_Shape& sh = it.Value();
        if ( repl.IsBound(sh) ) {
-         TopoDS_Shape newsh = repl.Find(sh);
+         const TopoDS_Shape& newsh = repl.Find(sh);
          if ( ! newsh.IsNull() ) B.Add ( result, newsh );
          modif = Standard_True;
        }
@@ -366,7 +366,7 @@ static void ExplodeModifier (const TopoDS_Shape &S,
                             TopTools_DataMapOfShapeShape &map,
                             const TopAbs_ShapeEnum until)
 {
-  TopoDS_Shape res = repl.ModifiedShape ( S );
+  const TopoDS_Shape& res = repl.ModifiedShape ( S );
   
   if ( res != S ) 
   {
index bc423263828923e95c281e7b4f4a5a389a1a1ae3..c7ecadc728ec6a59eae7c58602b8051802499a5b 100644 (file)
 //purpose  : 
 //=======================================================================
 ShapeProcessAPI_ApplySequence::ShapeProcessAPI_ApplySequence(const Standard_CString rscName, 
-                                                            const Standard_CString seqName)
+                                                            const Standard_CString seqName) : myContext(new ShapeProcess_ShapeContext(rscName))
 {
 
-  myContext = new ShapeProcess_ShapeContext(rscName);
+  
   myContext->SetDetalisation ( TopAbs_FACE );
   TCollection_AsciiString str ( seqName );
 
index 2c3d838d8f7c4bdc8cc982bde8d2191ed29f23ab..1e8b8b213474d78d892af36233abc1dca623a808 100644 (file)
@@ -65,7 +65,7 @@ Standard_Boolean ShapeUpgrade::Debug()
   BS->Multiplicities(Mults);
   BS->KnotSequence (KnotSequence);
        
-  Standard_Integer StartKnotIndex, EndKnotIndex, j;
+  Standard_Integer StartKnotIndex = 0, EndKnotIndex = 0, j = 0;
 
   StartKnotIndex = BS->FirstUKnotIndex();
   for ( EndKnotIndex = StartKnotIndex + 1; EndKnotIndex <= BS->LastUKnotIndex(); EndKnotIndex++ ) {
index 38b5dc6e539eb5303a7b2127fcc8e52e61fc0367..5e008764b715ad5b0b084a03893f9a871d83e6ed 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <Geom2d_Curve.hxx>
 #include <Geom_Curve.hxx>
@@ -56,7 +58,7 @@ Standard_Boolean ShapeUpgrade_ClosedEdgeDivide::Compute(const TopoDS_Edge& anEdg
     gp_Pnt pntV = BRep_Tool::Pnt(V1);
     Standard_Real TolV1 = LimitTolerance( BRep_Tool::Tolerance(V1) );
     TolV1=TolV1*TolV1;
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     Handle(Geom_Curve) curve3d = BRep_Tool::Curve (anEdge, f, l);
     myHasCurve3d = !curve3d.IsNull();
     Standard_Real f2d = 0., l2d = 0.;
index 5f06125da1dbe13606aa3c5153cb94f912f0326b..a0d746dfb27969a7d9d990b967a300d02c23b934 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box2d.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom2d_Curve.hxx>
@@ -46,9 +48,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_ClosedFaceDivide,ShapeUpgrade_FaceDivide
 //purpose  : 
 //=======================================================================
 ShapeUpgrade_ClosedFaceDivide::ShapeUpgrade_ClosedFaceDivide():
-       ShapeUpgrade_FaceDivide()
+       ShapeUpgrade_FaceDivide(), myNbSplit(1)
 {
-  myNbSplit = 1;
+  
 }
 
 //=======================================================================
@@ -57,9 +59,9 @@ ShapeUpgrade_ClosedFaceDivide::ShapeUpgrade_ClosedFaceDivide():
 //=======================================================================
 
 ShapeUpgrade_ClosedFaceDivide::ShapeUpgrade_ClosedFaceDivide(const TopoDS_Face& F):
-       ShapeUpgrade_FaceDivide(F)
+       ShapeUpgrade_FaceDivide(F), myNbSplit(1)
 {
-  myNbSplit = 1;
+  
 }
 
 //=======================================================================
@@ -78,7 +80,7 @@ Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface(const Standard_Real
   }
   TopoDS_Face face = TopoDS::Face ( myResult );
   
-  Standard_Real Uf,Ul,Vf,Vl;
+  Standard_Real Uf = NAN,Ul = NAN,Vf = NAN,Vl = NAN;
   ShapeAnalysis::GetFaceUVBounds ( myFace, Uf, Ul, Vf, Vl );
   // 01.10.99 pdn Porting on DEC 
   if( ::Precision::IsInfinite(Uf) || ::Precision::IsInfinite(Ul) || 
@@ -104,7 +106,7 @@ Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface(const Standard_Real
        TopoDS_Edge edge = sewd->Edge(i);
        ShapeAnalysis_Edge sae;
        Handle(Geom2d_Curve) c1, c2;
-       Standard_Real f1,f2,l1,l2;
+       Standard_Real f1 = NAN,f2 = NAN,l1 = NAN,l2 = NAN;
        if(!sae.PCurve(edge,face,c1,f1,l1,Standard_False))
          continue;
 //smh#8
@@ -117,11 +119,11 @@ Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface(const Standard_Real
        Bnd_Box2d B1, B2;
        sac.FillBndBox ( c1, f1, l1, 20, Standard_True, B1 );
        sac.FillBndBox ( c2, f2, l2, 20, Standard_True, B2 );
-       Standard_Real x1min,y1min,x1max,y1max;
-       Standard_Real x2min,y2min,x2max,y2max;
+       Standard_Real x1min = NAN,y1min = NAN,x1max = NAN,y1max = NAN;
+       Standard_Real x2min = NAN,y2min = NAN,x2max = NAN,y2max = NAN;
        B1.Get(x1min,y1min,x1max,y1max);
        B2.Get(x2min,y2min,x2max,y2max);
-       Standard_Real xf,xl,yf,yl;
+       Standard_Real xf = NAN,xl = NAN,yf = NAN,yl = NAN;
        if(x1min < x2min) {
          xf = x1max;
          xl = x2min;
@@ -161,7 +163,7 @@ Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface(const Standard_Real
     Handle(ShapeAnalysis_Surface) sas = new ShapeAnalysis_Surface( surf );
     Standard_Boolean uclosed = sas->IsUClosed(Precision());
     Standard_Boolean vclosed = sas->IsVClosed(Precision());
-    Standard_Real U1, U2, V1, V2;
+    Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
     if(uclosed) {
       surf -> Bounds(U1, U2, V1, V2);
       GeomAdaptor_Surface GAS ( surf );
index cf2aefafdd7931f8741e9f630fa6515c45a35a68..279b72a827bee529013de889f2cf709b3cf179fe 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom2d_BezierCurve.hxx>
 #include <Geom2d_Conic.hxx>
 #include <Geom2d_Line.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_ConvertCurve2dToBezier,ShapeUpgrade_SplitCurve2d)
 
-ShapeUpgrade_ConvertCurve2dToBezier::ShapeUpgrade_ConvertCurve2dToBezier()
+ShapeUpgrade_ConvertCurve2dToBezier::ShapeUpgrade_ConvertCurve2dToBezier() : mySegments(new TColGeom2d_HSequenceOfCurve), mySplitParams(new TColStd_HSequenceOfReal)
 {
-  mySegments = new TColGeom2d_HSequenceOfCurve;
-  mySplitParams = new TColStd_HSequenceOfReal;
+  
+  
 }
 
 static Handle(Geom2d_BezierCurve) MakeBezier2d(const Handle(Geom2d_Curve)& theCurve2d,
@@ -70,7 +72,7 @@ void ShapeUpgrade_ConvertCurve2dToBezier::Compute()
        myCurve->IsKind(STANDARD_TYPE(Geom2d_BezierCurve)) )
   {
     // static function`s code getted from ShapeConvert
-    Standard_Real tmpF, tmpL, aDeviation;
+    Standard_Real tmpF = NAN, tmpL = NAN, aDeviation = NAN;
     Handle(Geom2d_Line) aTmpLine2d = 
       ShapeCustom_Curve2d::ConvertToLine2d(myCurve, First, Last, Precision::Approximation(),
                                                tmpF, tmpL, aDeviation);
@@ -179,7 +181,7 @@ void ShapeUpgrade_ConvertCurve2dToBezier::Compute()
     TColStd_Array1OfReal knots(1,nbArcs+1);
     tool.Knots(knots);
     mySplitParams->Append(First+Shift);
-    Standard_Integer j; // svv Jan 10 2000 : porting on DEC
+    Standard_Integer j = 0; // svv Jan 10 2000 : porting on DEC
     
     Standard_Real newFirst = First+Shift;
     Standard_Real newLast = First+Shift;
@@ -192,7 +194,7 @@ void ShapeUpgrade_ConvertCurve2dToBezier::Compute()
         {
           newFirst = newLast;
           newLast = nextKnot;
-          Standard_Real tmpF, tmpL, aDeviation;
+          Standard_Real tmpF = NAN, tmpL = NAN, aDeviation = NAN;
           Handle(Geom2d_Line) aTmpLine2d = 
            ShapeCustom_Curve2d::ConvertToLine2d(aCrv2d, newFirst, newLast, Precision::Approximation(),
                                                      tmpF, tmpL, aDeviation);
index d7745ed114805690b8992157fefd8c0913115d7e..e9727f609464fd363cc3a37167d8a063b4c8a302 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_ConvertCurve3dToBezier,ShapeUpgrade_SplitCurve3d)
 
-ShapeUpgrade_ConvertCurve3dToBezier::ShapeUpgrade_ConvertCurve3dToBezier()
+ShapeUpgrade_ConvertCurve3dToBezier::ShapeUpgrade_ConvertCurve3dToBezier() : mySegments(new TColGeom_HSequenceOfCurve), mySplitParams(new TColStd_HSequenceOfReal), myLineMode(Standard_True), myCircleMode(Standard_True), myConicMode(Standard_True)
 {
-  mySegments = new TColGeom_HSequenceOfCurve;
-  mySplitParams = new TColStd_HSequenceOfReal;
-  myLineMode = Standard_True;
-  myCircleMode = Standard_True;
-  myConicMode = Standard_True;
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -161,7 +161,7 @@ void ShapeUpgrade_ConvertCurve3dToBezier::Compute()
     TColStd_Array1OfReal knots(1,nbArcs+1);
     tool.Knots(knots);
     mySplitParams->Append(First+Shift);
-    Standard_Integer j; // svv Jan 10 2000 : porting on DEC
+    Standard_Integer j = 0; // svv Jan 10 2000 : porting on DEC
     for(j = 1; j <=nbArcs; j++) {
       Standard_Real nextKnot = knots(j+1)+Shift;
       if(nextKnot - mySplitParams->Value(mySplitParams->Length()) > precision) {
index ff0c54fe2b3bb127515479b8654696ff981fc09a..273901bfd60e95b5c87b54bc3f344c923e1cbab7 100644 (file)
@@ -16,6 +16,8 @@
 
 //   svv  10.01.00 porting on DEC
 
+#include <math.h>
+
 #include <Geom_BezierCurve.hxx>
 #include <Geom_Curve.hxx>
 #include <Geom_OffsetCurve.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_ConvertSurfaceToBezierBasis,ShapeUpgrade_SplitSurface)
 
-ShapeUpgrade_ConvertSurfaceToBezierBasis::ShapeUpgrade_ConvertSurfaceToBezierBasis()
+ShapeUpgrade_ConvertSurfaceToBezierBasis::ShapeUpgrade_ConvertSurfaceToBezierBasis() : myPlaneMode(Standard_True), myRevolutionMode(Standard_True), myExtrusionMode(Standard_True), myBSplineMode(Standard_True)
 {
-  myPlaneMode      = Standard_True;
-  myRevolutionMode = Standard_True;
-  myExtrusionMode  = Standard_True;
-  myBSplineMode    = Standard_True;
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -60,7 +62,7 @@ ShapeUpgrade_ConvertSurfaceToBezierBasis::ShapeUpgrade_ConvertSurfaceToBezierBas
 void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Segment)
 {
   if(!Segment) {
-    Standard_Real UF,UL,VF,VL;
+    Standard_Real UF = NAN,UL = NAN,VF = NAN,VL = NAN;
     mySurface->Bounds(UF,UL,VF,VL);
     if(!Precision::IsInfinite(UF)) myUSplitValues->SetValue(1,UF);
     if(!Precision::IsInfinite(UL)) myUSplitValues->SetValue(myUSplitValues->Length(),UL);
@@ -148,7 +150,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
   } else if(mySurface->IsKind(STANDARD_TYPE(Geom_BSplineSurface))&&myBSplineMode) {
     Handle(Geom_BSplineSurface) bspline = Handle(Geom_BSplineSurface)::DownCast(mySurface);
     //pdn
-    Standard_Real u1,u2,v1,v2;
+    Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
     bspline->Bounds(u1,u2,v1,v2);
     GeomConvert_BSplineSurfaceToBezierSurface converter(bspline);//,UFirst,ULast,VFirst,VLast,precision;
     Standard_Integer nbUPatches = converter.NbUPatches();
@@ -165,7 +167,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
     converter.UKnots(UJoints);
     TColStd_SequenceOfReal UFilteredJoints;
     UFilteredJoints.Append(UJoints(1));
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for(i = 2; i <= nbUPatches+1; i++)
       if(UJoints(i)-UJoints(i-1) < precision) {
        NbUFiltered++;
@@ -216,7 +218,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
     
     mySegments = new ShapeExtend_CompositeSurface(srf,uj,vj);
     
-    Standard_Integer j; // svv #1
+    Standard_Integer j = 0; // svv #1
     for(j = 2; j <= myUSplitValues->Length(); j++) {
       ULast =  myUSplitValues->Value(j);
       for(Standard_Integer ii = 2; ii <= nbUPatches+1; ii++) {
@@ -247,7 +249,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
       basis = tc->BasisCurve();
     }
     Handle(TColGeom_HArray1OfCurve) curves;
-    Standard_Integer nbCurves;
+    Standard_Integer nbCurves = 0;
     Handle(TColStd_HSequenceOfReal) vPar = new TColStd_HSequenceOfReal;
     Handle(TColStd_HSequenceOfReal) vSVal= new TColStd_HSequenceOfReal;
     if(basis->IsKind(STANDARD_TYPE(Geom_OffsetCurve))) {
@@ -288,9 +290,9 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
     
     gp_Ax1 axis = revol->Axis();
     Handle(TColGeom_HArray2OfSurface) surf = new TColGeom_HArray2OfSurface(1,1,1,nbCurves);
-    Standard_Real Umin,Umax,Vmin,Vmax;
+    Standard_Real Umin = NAN,Umax = NAN,Vmin = NAN,Vmax = NAN;
     mySurface->Bounds(Umin,Umax,Vmin,Vmax);
-    Standard_Integer i; // svv #1
+    Standard_Integer i = 0; // svv #1
     for(i = 1; i <= nbCurves; i++) {
       Handle(Geom_SurfaceOfRevolution) rev = new Geom_SurfaceOfRevolution(curves->Value(i),axis);
       if( UFirst-Umin < Precision::PConfusion() &&
@@ -326,7 +328,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
     //gp_Dir direction = extr->Direction(); // direction not used (skl)
     
     Handle(TColGeom_HArray1OfCurve) curves;
-    Standard_Integer nbCurves;
+    Standard_Integer nbCurves = 0;
     Handle(TColStd_HSequenceOfReal) uPar = new TColStd_HSequenceOfReal;
     Handle(TColStd_HSequenceOfReal) uSVal= new TColStd_HSequenceOfReal;
     ShapeUpgrade_ConvertCurve3dToBezier converter;
@@ -342,7 +344,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
     shiftL.SetTranslation(extr->Value(UFirst,0),extr->Value(UFirst,VLast));
     Handle(TColGeom_HArray2OfSurface) surf = new TColGeom_HArray2OfSurface(1,nbCurves,1,1);
     
-    Standard_Integer i; // svv #1
+    Standard_Integer i = 0; // svv #1
     for(i = 1; i <= nbCurves; i++) {
       Handle(Geom_BezierCurve) bez = Handle(Geom_BezierCurve)::DownCast(curves->Value(i));
       Standard_Integer nbPoles = bez->NbPoles();
@@ -384,7 +386,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
     TColStd_Array1OfReal VJoints(1,2);
     VJoints(1) = VFirst; VJoints(2) = VLast;
     Handle(TColGeom_HArray2OfSurface) surf = new TColGeom_HArray2OfSurface(1,1,1,1);
-    Standard_Real U1,U2,V1,V2;
+    Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
     mySurface->Bounds(U1,U2,V1,V2);
     Handle(Geom_Surface) S;
     if(U1-UFirst < precision && ULast - U2 < precision &&
@@ -406,7 +408,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
 //purpose  : 
 //=======================================================================
 
-static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface) surf,
+static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface)& surf,
                                       const Standard_Real U1,
                                       const Standard_Real U2,
                                       const Standard_Real V1,
@@ -440,7 +442,7 @@ static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface) surf,
   
   if(S->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) {
     Handle(Geom_SurfaceOfRevolution) revol = Handle(Geom_SurfaceOfRevolution)::DownCast(S->Copy());
-    Standard_Real Umin,Umax,Vmin,Vmax;
+    Standard_Real Umin = NAN,Umax = NAN,Vmin = NAN,Vmax = NAN;
     revol->Bounds(Umin,Umax,Vmin,Vmax);
     Handle(Geom_Curve) basis = revol->BasisCurve();
     if(basis->IsKind(STANDARD_TYPE(Geom_OffsetCurve))) {
@@ -464,7 +466,7 @@ static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface) surf,
     return res;
   }
   else {
-    Standard_Real Umin,Umax,Vmin,Vmax;
+    Standard_Real Umin = NAN,Umax = NAN,Vmin = NAN,Vmax = NAN;
     surf->Bounds(Umin,Umax,Vmin,Vmax);
     if( U1-Umin < Precision::PConfusion() &&
         Umax-U2 < Precision::PConfusion() &&
@@ -523,7 +525,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Build(const Standard_Boolean /*Se
          break;
       
       Handle(Geom_Surface) patch = mySegments->Patch(j1-1,j2-1);
-      Standard_Real U1, U2, V1, V2;
+      Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
       patch->Bounds(U1,U2,V1,V2);
       //linear recomputation of part:
       Standard_Real uFirst = myUSplitParams->Value(j1-1);
@@ -549,7 +551,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Build(const Standard_Boolean /*Se
   }
   
   TColStd_Array1OfReal UJoints(1,nbU);
-  Standard_Integer i; // svv #1
+  Standard_Integer i = 0; // svv #1
   for(i = 1; i <= nbU; i++)
     UJoints(i) = myUSplitValues->Value(i);
   
index 1a477dfe3245fbd89ac15d30559aa3e774489390..314337b7b4069758a3bdda1c2d3a358843ba1f66 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <ShapeAnalysis_Edge.hxx>
 #include <ShapeUpgrade_EdgeDivide.hxx>
@@ -30,10 +32,10 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_EdgeDivide,ShapeUpgrade_Tool)
 //purpose  : 
 //=======================================================================
 ShapeUpgrade_EdgeDivide::ShapeUpgrade_EdgeDivide():
-      ShapeUpgrade_Tool()
+      ShapeUpgrade_Tool(), mySplitCurve3dTool(new ShapeUpgrade_SplitCurve3d), mySplitCurve2dTool(new ShapeUpgrade_SplitCurve2d)
 {
-  mySplitCurve3dTool = new ShapeUpgrade_SplitCurve3d;
-  mySplitCurve2dTool = new ShapeUpgrade_SplitCurve2d;
+  
+  
 }
 
 
@@ -59,7 +61,7 @@ Standard_Boolean ShapeUpgrade_EdgeDivide::Compute(const TopoDS_Edge& anEdge)
 {
   Clear();
   
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   Handle(Geom_Curve) curve3d = BRep_Tool::Curve (anEdge, f, l);
   myHasCurve3d = !curve3d.IsNull();
   
index 6198c8d0d6165960ae0ad8a035dcd8b2c39a628c..122d21f0e4dfaf68bd112e5f0def9da74654ea07 100644 (file)
@@ -76,8 +76,8 @@ protected:
 
 
   TopoDS_Face myFace;
-  Standard_Boolean myHasCurve2d;
-  Standard_Boolean myHasCurve3d;
+  Standard_Boolean myHasCurve2d{};
+  Standard_Boolean myHasCurve3d{};
   Handle(TColStd_HSequenceOfReal) myKnots2d;
   Handle(TColStd_HSequenceOfReal) myKnots3d;
 
index 39249cc8d65236218c112e5ad657288124769abc..9efd20f6de4f0440e1d02c4669f64c69c73cf4b2 100644 (file)
@@ -16,6 +16,8 @@
 
 //    gka  01.06.99 S4205: changing order of splitting surface/curves for converting to bezier
 
+#include <math.h>
+
 #include <Bnd_Box2d.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -44,11 +46,11 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_FaceDivide,ShapeUpgrade_Tool)
 //purpose  : 
 //=======================================================================
 ShapeUpgrade_FaceDivide::ShapeUpgrade_FaceDivide():
-       ShapeUpgrade_Tool(), myStatus(0)
+       ShapeUpgrade_Tool(), mySegmentMode(Standard_True), myStatus(0), mySplitSurfaceTool(new ShapeUpgrade_SplitSurface), myWireDivideTool(new ShapeUpgrade_WireDivide)
 {
-  mySegmentMode = Standard_True;
-  mySplitSurfaceTool = new ShapeUpgrade_SplitSurface;
-  myWireDivideTool = new ShapeUpgrade_WireDivide;
+  
+  
+  
 }
 
 //=======================================================================
@@ -57,11 +59,11 @@ ShapeUpgrade_FaceDivide::ShapeUpgrade_FaceDivide():
 //=======================================================================
 
 ShapeUpgrade_FaceDivide::ShapeUpgrade_FaceDivide (const TopoDS_Face &F):
-       ShapeUpgrade_Tool(), myStatus(0)
+       ShapeUpgrade_Tool(), mySegmentMode(Standard_True), myStatus(0), mySplitSurfaceTool(new ShapeUpgrade_SplitSurface), myWireDivideTool(new ShapeUpgrade_WireDivide)
 {
-  mySegmentMode = Standard_True;
-  mySplitSurfaceTool = new ShapeUpgrade_SplitSurface;
-  myWireDivideTool = new ShapeUpgrade_WireDivide;
+  
+  
+  
   Init ( F );
 }
 
@@ -123,7 +125,7 @@ Standard_Boolean ShapeUpgrade_FaceDivide::SplitSurface (const Standard_Real theA
   Handle(Geom_Surface) surf;
   surf = BRep_Tool::Surface ( face, L );
   
-  Standard_Real Uf,Ul,Vf,Vl;
+  Standard_Real Uf = NAN,Ul = NAN,Vf = NAN,Vl = NAN;
 //  BRepTools::UVBounds(myFace,Uf,Ul,Vf,Vl);
   ShapeAnalysis::GetFaceUVBounds ( face, Uf, Ul, Vf, Vl );
   if(Precision::IsInfinite(Uf) || Precision::IsInfinite(Ul) ||
@@ -131,7 +133,7 @@ Standard_Boolean ShapeUpgrade_FaceDivide::SplitSurface (const Standard_Real theA
     return Standard_False;
 
   // make little extension to ensure all pcurves fit inside new surface bounds
-  Standard_Real aSUf, aSUl, aSVf, aSVl;
+  Standard_Real aSUf = NAN, aSUl = NAN, aSVf = NAN, aSVl = NAN;
   surf->Bounds(aSUf, aSUl, aSVf, aSVl);
   if (!surf->IsUPeriodic()) {
     Standard_Real dU = (Ul - Uf) * 0.01;
index 03ca53df1f4c413e3903ddb4e637feb404f03465..a9e20cb6445fbba5f1692ddcf9a168d260ea0337 100644 (file)
@@ -32,12 +32,12 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_FaceDivideArea,ShapeUpgrade_FaceDivide)
 //function : ShapeUpgrade_FaceDivideArea
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea()
+ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea() : myMaxArea(Precision::Infinite()), myNbParts(0), myIsSplittingByNumber(Standard_False)
 {
-  myMaxArea = Precision::Infinite();
-  myNbParts = 0;
+  
+  
   myUnbSplit = myVnbSplit = -1;
-  myIsSplittingByNumber = Standard_False;
+  
   SetPrecision(1.e-5);
   SetSplitSurfaceTool (new ShapeUpgrade_SplitSurfaceArea);
 }
@@ -47,12 +47,12 @@ ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea()
 //purpose  : 
 //=======================================================================
 
-ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea(const TopoDS_Face& F)
+ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea(const TopoDS_Face& F) : myMaxArea(Precision::Infinite()), myNbParts(0), myIsSplittingByNumber(Standard_False)
 {
-  myMaxArea = Precision::Infinite();
-  myNbParts = 0;
+  
+  
   myUnbSplit = myVnbSplit = -1;
-  myIsSplittingByNumber = Standard_False;
+  
   SetPrecision(1.e-5);
   SetSplitSurfaceTool (new ShapeUpgrade_SplitSurfaceArea);
   Init(F);
index 280556d335fbd39ae718974c3050a42516b8c12d..6bb249de76b2458260a468cc31903b58066d9cf2 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <Geom2d_BSplineCurve.hxx>
 #include <Geom2d_Curve.hxx>
@@ -53,7 +55,7 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
  
   ShapeAnalysis_Edge sae;
   Handle(Geom_Curve) c3d;
-  Standard_Real f,l;
+  Standard_Real f = NAN,l = NAN;
   if(sae.Curve3d(myEdge,c3d,f,l,Standard_False)) {
     if(First < f)
       First = f;
@@ -127,7 +129,7 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
   Standard_Boolean isSeam = BRep_Tool::IsClosed ( myEdge, myFace );
   if ( isSeam ) {
     Handle(Geom2d_Curve) c2;
-    Standard_Real f2, l2;
+    Standard_Real f2 = NAN, l2 = NAN;
     //smh#8
     TopoDS_Shape tmpE = myEdge.Reversed();
     TopoDS_Edge erev = TopoDS::Edge (tmpE );
index 16f579355c39599f35f33f7b2da3c4d7950a5973..50074b1ce7861c305eb43da6a0c302405c50a879 100644 (file)
@@ -34,9 +34,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_FixSmallCurves,ShapeUpgrade_Tool)
 //purpose  : 
 //=======================================================================
 
-ShapeUpgrade_FixSmallCurves::ShapeUpgrade_FixSmallCurves()
+ShapeUpgrade_FixSmallCurves::ShapeUpgrade_FixSmallCurves() : myStatus(ShapeExtend::EncodeStatus ( ShapeExtend_OK ))
 {
-  myStatus = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
+  
 }
 //=======================================================================
 //function : Init
index 1b000c1366801df5fe830d13f1b37b8b9778dd71..1afdf9fe5d5953b59906ee4ff281320ffa7d121b 100644 (file)
@@ -37,11 +37,11 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_RemoveInternalWires,ShapeUpgrade_Tool)
 //function : ShapeUpgrade_RemoveInternalWires
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_RemoveInternalWires::ShapeUpgrade_RemoveInternalWires()
+ShapeUpgrade_RemoveInternalWires::ShapeUpgrade_RemoveInternalWires() : myMinArea(0.), myRemoveFacesMode(Standard_True), myStatus(ShapeExtend::EncodeStatus ( ShapeExtend_OK ))
 {
-  myMinArea =0.;
-  myRemoveFacesMode = Standard_True;
-  myStatus = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
+  
+  
+  
   Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape;
   SetContext(aContext);
   
@@ -113,7 +113,7 @@ ShapeUpgrade_RemoveInternalWires::ShapeUpgrade_RemoveInternalWires(const TopoDS_
   TopTools_IndexedDataMapOfShapeListOfShape aWireFaces;
   Standard_Integer i =1, nb = theSeqShapes.Length();
   for( ; i <= nb; i++) {
-    TopoDS_Shape aS = theSeqShapes.Value(i);
+    const TopoDS_Shape& aS = theSeqShapes.Value(i);
     if(aS.ShapeType() == TopAbs_FACE)
       removeSmallWire(aS,TopoDS_Wire());
     else if(aS.ShapeType() == TopAbs_WIRE) {
@@ -163,7 +163,7 @@ void ShapeUpgrade_RemoveInternalWires::removeSmallWire (const TopoDS_Shape& theF
       
       TopoDS_Iterator aIte(aW,Standard_False);
       for( ; aIte.More(); aIte.Next()) {
-        TopoDS_Shape aE = aIte.Value();
+        const TopoDS_Shape& aE = aIte.Value();
         if(myRemoveEdges.IsBound(aE))
           myRemoveEdges.ChangeFind(aE).Append(aF);
         else {
@@ -193,7 +193,7 @@ void ShapeUpgrade_RemoveInternalWires::removeSmallFaces ()
     //collecting all faces containing edges from removed wire
     for( ; aIte.More(); aIte.Next()) {
       
-      TopoDS_Shape aEdge =  aIte.Value();
+      const TopoDS_Shape& aEdge =  aIte.Value();
       if(!myEdgeFaces.Contains(aEdge)) {
         myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL2);
         continue;
index 77c0483cc51624950975c9556a5171a6ca4f19fc..df6a57f41c89f3bd7addeb3b0efeb82d53aefa10 100644 (file)
@@ -94,7 +94,7 @@ protected:
   //! Clear all sequences and temporary map;
   Standard_EXPORT void Clear();
 
-  Standard_Integer myStatus;
+  Standard_Integer myStatus{};
 
 
 private:
@@ -109,8 +109,8 @@ private:
 
   TopoDS_Shape myShape;
   TopoDS_Shape myResult;
-  Standard_Real myMinArea;
-  Standard_Boolean myRemoveFacesMode;
+  Standard_Real myMinArea{};
+  Standard_Boolean myRemoveFacesMode{};
   TopTools_IndexedDataMapOfShapeListOfShape myEdgeFaces;
   TopTools_DataMapOfShapeListOfShape myRemoveEdges;
   TopTools_SequenceOfShape myRemovedFaces;
index caba9bfb613409aae2e46afd6e497ec03dbd77cf..19102c45aa1b5e52102a85623b1f71ef2ea5dcc0 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_TEdge.hxx>
 #include <BRep_Tool.hxx>
@@ -40,9 +42,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_RemoveLocations,Standard_Transient)
 //function : ShapeUpgrade_RemoveLocations
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_RemoveLocations::ShapeUpgrade_RemoveLocations()
+ShapeUpgrade_RemoveLocations::ShapeUpgrade_RemoveLocations() : myLevelRemoving(TopAbs_SHAPE)
 {
-  myLevelRemoving = TopAbs_SHAPE;
+  
 }
 
 //=======================================================================
@@ -52,7 +54,7 @@ ShapeUpgrade_RemoveLocations::ShapeUpgrade_RemoveLocations()
 
  Standard_Boolean ShapeUpgrade_RemoveLocations::Remove(const TopoDS_Shape& theShape) 
 {
-  TopoDS_Shape aShape = theShape;
+  const TopoDS_Shape& aShape = theShape;
   myShape = aShape;
   TopAbs_ShapeEnum shtype = theShape.ShapeType();
   Standard_Boolean isRemoveLoc = ((shtype != TopAbs_COMPOUND && myLevelRemoving == TopAbs_SHAPE) || 
@@ -94,7 +96,7 @@ static Standard_Boolean RebuildShape(const TopoDS_Edge& theEdge, TopoDS_Edge& th
   if(!isBound) {
     Handle(Geom_Curve) C3d;
     TopLoc_Location aLoc;
-    Standard_Real First3d,Last3d;
+    Standard_Real First3d = NAN,Last3d = NAN;
     C3d = BRep_Tool::Curve( theEdge,aLoc,First3d,Last3d);
     aB.MakeEdge(theNewEdge);
     if(!C3d.IsNull()) {
@@ -115,7 +117,7 @@ static Standard_Boolean RebuildShape(const TopoDS_Edge& theEdge, TopoDS_Edge& th
     Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace);
     if(!aSurf->IsKind(STANDARD_TYPE(Geom_Plane))) {
       Handle(Geom2d_Curve) c2d,c2d1;
-      Standard_Real First2d,Last2d;
+      Standard_Real First2d = NAN,Last2d = NAN;
       
       c2d= BRep_Tool::CurveOnSurface( theEdge,theFace,First2d,Last2d);
       if(BRep_Tool::IsClosed(theEdge,theFace)) {
@@ -179,7 +181,7 @@ Standard_Boolean ShapeUpgrade_RemoveLocations::MakeNewShape(const TopoDS_Shape&
      aNewShape= myMapNewShapes.Find(aShape);
      aNewShape.Orientation(theShape.Orientation());
      if(!theRemoveLoc && !theShape.Location().IsIdentity()) {
-       TopLoc_Location aL = theShape.Location();
+       const TopLoc_Location& aL = theShape.Location();
        aNewShape.Location(aL);
      }
      if(shtype != TopAbs_EDGE) {
@@ -256,7 +258,7 @@ Standard_Boolean ShapeUpgrade_RemoveLocations::MakeNewShape(const TopoDS_Shape&
     aNewShape.Orientation(TopAbs_FORWARD);
     TopoDS_Iterator aIt(aShape,Standard_False,isRemoveLoc);
     for( ; aIt.More(); aIt.Next()) {
-      TopoDS_Shape subshape = aIt.Value();
+      const TopoDS_Shape& subshape = aIt.Value();
       TopoDS_Shape anewsubshape;
       Standard_Boolean isDoneSubShape = MakeNewShape(subshape,anAncShape,anewsubshape,isRemoveLoc);
       isDone = (isDone || isDoneSubShape);
index 58ef035a1c9ba2c2fd51f4566f03b2a61b5ebdc8..c79ad5b7dd1f4f63ff2a83cbd703b4f292862918 100644 (file)
@@ -16,6 +16,8 @@
 
 // 15.06 2000 gka fix against small edges ; merging ends pcurves and 3d curves
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepTools.hxx>
 //function : ShapeUpgrade_ShapeConvertToBezier
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_ShapeConvertToBezier::ShapeUpgrade_ShapeConvertToBezier()
+ShapeUpgrade_ShapeConvertToBezier::ShapeUpgrade_ShapeConvertToBezier() : my2dMode(Standard_False), my3dMode(Standard_False), mySurfaceMode(Standard_False), my3dLineMode(Standard_True), my3dCircleMode(Standard_True), my3dConicMode(Standard_True), myPlaneMode(Standard_True), myRevolutionMode(Standard_True), myExtrusionMode(Standard_True), myBSplineMode(Standard_True), myLevel(0)
 {
-  myLevel = 0;
-  my2dMode = Standard_False;
-  my3dMode = Standard_False;
-  mySurfaceMode = Standard_False;
+  
+  
+  
+  
   //set spesial flags to true
-  my3dLineMode = Standard_True;
-  my3dCircleMode = Standard_True;
-  my3dConicMode = Standard_True;
-  myPlaneMode      = Standard_True;
-  myRevolutionMode = Standard_True;
-  myExtrusionMode  = Standard_True;
-  myBSplineMode    = Standard_True;
+  
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -72,20 +74,20 @@ ShapeUpgrade_ShapeConvertToBezier::ShapeUpgrade_ShapeConvertToBezier()
 //=======================================================================
 
 ShapeUpgrade_ShapeConvertToBezier::ShapeUpgrade_ShapeConvertToBezier(const TopoDS_Shape& S):
-       ShapeUpgrade_ShapeDivide(S)
+       ShapeUpgrade_ShapeDivide(S), my2dMode(Standard_False), my3dMode(Standard_False), mySurfaceMode(Standard_False), my3dLineMode(Standard_True), my3dCircleMode(Standard_True), my3dConicMode(Standard_True), myPlaneMode(Standard_True), myRevolutionMode(Standard_True), myExtrusionMode(Standard_True), myBSplineMode(Standard_True), myLevel(0)
 {
-  myLevel = 0;
-  my2dMode = Standard_False;
-  my3dMode = Standard_False;
-  mySurfaceMode = Standard_False;
+  
+  
+  
+  
   //set spesial flags to true
-  my3dLineMode = Standard_True;
-  my3dCircleMode = Standard_True;
-  my3dConicMode = Standard_True;
-  myPlaneMode      = Standard_True;
-  myRevolutionMode = Standard_True;
-  myExtrusionMode  = Standard_True;
-  myBSplineMode    = Standard_True;
+  
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -141,7 +143,7 @@ Standard_Boolean ShapeUpgrade_ShapeConvertToBezier::Perform (const Standard_Bool
          TopoDS_Edge edge = sewd->Edge(i);
          //TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
          Handle(Geom_Curve) c3d;
-         Standard_Real first, last;
+         Standard_Real first = NAN, last = NAN;
          TopoDS_Vertex V1,V2;
          TopExp::Vertices(edge,V1,V2);
          if(sae.Curve3d(edge,c3d,first,last,Standard_False)) {
@@ -214,7 +216,7 @@ Standard_Boolean ShapeUpgrade_ShapeConvertToBezier::Perform (const Standard_Bool
          
          TopoDS_Edge edgenext = sewd->Edge((i == sewd->NbEdges() ? 1 : i+1));
          Handle(Geom2d_Curve) c2dnext,c2drevnext,newnextCurve;
-         Standard_Real first2,last2;
+         Standard_Real first2 = NAN,last2 = NAN;
          Handle(Geom2d_BezierCurve) beziernext,bezierRnext;
          if(!sae.PCurve(edgenext,face,c2dnext,first2,last2,Standard_False)) continue ;
          if(!c2dnext->IsKind(STANDARD_TYPE(Geom2d_BezierCurve)) ) continue;
@@ -255,7 +257,7 @@ Standard_Boolean ShapeUpgrade_ShapeConvertToBezier::Perform (const Standard_Bool
          }
           
          if(bezier.IsNull()  || beziernext.IsNull() ) continue; //gka fix against small edges ; merging ends of pcurves 
-         Standard_Real f1,l1,f2,l2;
+         Standard_Real f1 = NAN,l1 = NAN,f2 = NAN,l2 = NAN;
          f1 = bezier->FirstParameter();
          l1 = bezier->LastParameter();
          f2 = beziernext->FirstParameter();
index a271dbdd7c0ce10b0032dd4f06e4e7007e70288e..444c846aebb1d05684d642e727fc992e21b2b650 100644 (file)
 //function : ShapeUpgrade_ShapeDivide
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_ShapeDivide::ShapeUpgrade_ShapeDivide() : myStatus(0)
+ShapeUpgrade_ShapeDivide::ShapeUpgrade_ShapeDivide() : myMaxTol(1), myContext(new ShapeBuild_ReShape), mySegmentMode(Standard_True), myStatus(0), mySplitFaceTool(new ShapeUpgrade_FaceDivide), myEdgeMode(2)
 {
   myPrecision = myMinTol = Precision::Confusion();
-  myMaxTol = 1; //Precision::Infinite() ?? pdn
-  mySplitFaceTool = new ShapeUpgrade_FaceDivide;
-  myContext = new ShapeBuild_ReShape;
+  //Precision::Infinite() ?? pdn
+  
+  
   //myMsgReg = new ShapeExtend_BasicMsgRegistrator;
-  mySegmentMode = Standard_True;
-  myEdgeMode = 2;
+  
+  
 }
 
 //=======================================================================
@@ -58,14 +58,14 @@ ShapeUpgrade_ShapeDivide::ShapeUpgrade_ShapeDivide() : myStatus(0)
 //purpose  : 
 //=======================================================================
 
-ShapeUpgrade_ShapeDivide::ShapeUpgrade_ShapeDivide(const TopoDS_Shape &S) : myStatus(0)
+ShapeUpgrade_ShapeDivide::ShapeUpgrade_ShapeDivide(const TopoDS_Shape &S) : myMaxTol(1), myContext(new ShapeBuild_ReShape), mySegmentMode(Standard_True), myStatus(0), mySplitFaceTool(new ShapeUpgrade_FaceDivide), myEdgeMode(2)
 {
   myPrecision = myMinTol = Precision::Confusion();
-  myMaxTol = 1; //Precision::Infinite() ?? pdn
-  mySplitFaceTool = new ShapeUpgrade_FaceDivide;
-  myContext = new ShapeBuild_ReShape;
-  mySegmentMode = Standard_True;
-  myEdgeMode = 2;
+  //Precision::Infinite() ?? pdn
+  
+  
+  
+  
   Init(S);
 }
 
index 0e9ac2917e864f5d1ed220506db59eb2e9e9ce43..71e216059035ee685f861284090d9c5af2db9bdd 100644 (file)
 //purpose  : 
 //=======================================================================
 ShapeUpgrade_ShapeDivideArea::ShapeUpgrade_ShapeDivideArea():
-       ShapeUpgrade_ShapeDivide()
+       ShapeUpgrade_ShapeDivide(), myMaxArea(Precision::Infinite()), myNbParts(0), myIsSplittingByNumber(Standard_False)
 {
-  myMaxArea = Precision::Infinite();
-  myNbParts = 0;
+  
+  
   myUnbSplit = myVnbSplit = -1;
-  myIsSplittingByNumber = Standard_False;
+  
 }
 
 //=======================================================================
@@ -37,13 +37,13 @@ ShapeUpgrade_ShapeDivideArea::ShapeUpgrade_ShapeDivideArea():
 //=======================================================================
 
 ShapeUpgrade_ShapeDivideArea::ShapeUpgrade_ShapeDivideArea(const TopoDS_Shape& S):
-       ShapeUpgrade_ShapeDivide(S)
+       ShapeUpgrade_ShapeDivide(S), myMaxArea(Precision::Infinite()), myNbParts(0), myIsSplittingByNumber(Standard_False)
        
 {
-  myMaxArea = Precision::Infinite();
-  myNbParts = 0;
+  
+  
   myUnbSplit = myVnbSplit = -1;
-  myIsSplittingByNumber = Standard_False;
+  
 }
 
 //=======================================================================
index 4bdb6850881263b8c0641de75413c1c23cc952b8..1051949504c4dc76c59351acc742b562caa1a5d0 100644 (file)
 //function : ShapeUpgrade_ShapeDivideContinuity
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_ShapeDivideContinuity::ShapeUpgrade_ShapeDivideContinuity()
+ShapeUpgrade_ShapeDivideContinuity::ShapeUpgrade_ShapeDivideContinuity() : myCurve3dCriterion(GeomAbs_C1), myCurve2dCriterion(GeomAbs_C1), mySurfaceCriterion(GeomAbs_C1), myTolerance3d(Precision::Confusion()), myTolerance2d(Precision::PConfusion())
 {
-  myCurve3dCriterion = GeomAbs_C1;
-  myCurve2dCriterion = GeomAbs_C1;
-  mySurfaceCriterion  = GeomAbs_C1;
-  myTolerance3d = Precision::Confusion();
-  myTolerance2d = Precision::PConfusion();
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -43,13 +43,13 @@ ShapeUpgrade_ShapeDivideContinuity::ShapeUpgrade_ShapeDivideContinuity()
 //=======================================================================
 
 ShapeUpgrade_ShapeDivideContinuity::ShapeUpgrade_ShapeDivideContinuity(const TopoDS_Shape& S):
-     ShapeUpgrade_ShapeDivide(S)
+     ShapeUpgrade_ShapeDivide(S), myCurve3dCriterion(GeomAbs_C1), myCurve2dCriterion(GeomAbs_C1), mySurfaceCriterion(GeomAbs_C1), myTolerance3d(Precision::Confusion()), myTolerance2d(Precision::PConfusion())
 {
-  myCurve3dCriterion = GeomAbs_C1;
-  myCurve2dCriterion = GeomAbs_C1;
-  mySurfaceCriterion  = GeomAbs_C1;
-  myTolerance3d = Precision::Confusion();
-  myTolerance2d = Precision::PConfusion();
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index 73001b62a7a13515b12190dd48201754c333c2a0..8f19e66bddb27fa90d87e99bfd84dfd7738b2948 100644 (file)
@@ -28,9 +28,9 @@
 //function : ShapeUpgrade_ShellSewing
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_ShellSewing::ShapeUpgrade_ShellSewing()
+ShapeUpgrade_ShellSewing::ShapeUpgrade_ShellSewing() : myReShape(new ShapeBuild_ReShape)
 {
-  myReShape = new ShapeBuild_ReShape;
+  
 }
 
 //=======================================================================
index e58fec2990d2b8913ae7a10820d06a7bae4ceed6..55910c597ef02c508246bfe57ec72bcb3a8b6537 100644 (file)
@@ -33,11 +33,11 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve2dContinuity,ShapeUpgrade_Spli
 //function : ShapeUpgrade_SplitCurve2dContinuity
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_SplitCurve2dContinuity::ShapeUpgrade_SplitCurve2dContinuity()
+ShapeUpgrade_SplitCurve2dContinuity::ShapeUpgrade_SplitCurve2dContinuity() : myCriterion(GeomAbs_C1), myTolerance(Precision::PConfusion()), myCont(1)
 {
-  myCriterion = GeomAbs_C1;
-  myTolerance = Precision::PConfusion();
-  myCont =1;
+  
+  
+  
 }
 
 //=======================================================================
index ebaf87e030cf3026b8c3c3dea8c936120ba5a29e..8bd940f4805cfc98ca93772b0e60b4d0d1521c2f 100644 (file)
@@ -34,11 +34,11 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve3dContinuity,ShapeUpgrade_Spli
 //function : ShapeUpgrade_SplitCurve3dContinuity
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_SplitCurve3dContinuity::ShapeUpgrade_SplitCurve3dContinuity()
+ShapeUpgrade_SplitCurve3dContinuity::ShapeUpgrade_SplitCurve3dContinuity() : myCriterion(GeomAbs_C1), myTolerance(Precision::Confusion()), myCont(1)
 {
-  myCriterion = GeomAbs_C1;
-  myTolerance = Precision::Confusion();
-  myCont =1;
+  
+  
+  
 }
 
 //=======================================================================
index 9bac8b4458621b405dfd8be9bc7e2a95c8cece23..5181ce2dfc6ef1cb1a6ff1d18f0b169d5ee4ff2d 100644 (file)
@@ -16,6 +16,8 @@
 
 //    gka 30.04.99 S4137: extended for all types of surfaces
 
+#include <math.h>
+
 #include <Geom_BezierSurface.hxx>
 #include <Geom_OffsetSurface.hxx>
 #include <Geom_RectangularTrimmedSurface.hxx>
@@ -68,7 +70,7 @@ void ShapeUpgrade_SplitSurface::Init(const Handle(Geom_Surface)& S)
   myResSurfaces = new ShapeExtend_CompositeSurface();
   myNbResultingRow =1;
   myNbResultingCol =1;
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   mySurface->Bounds(U1,U2,V1,V2);
 
   myUSplitValues->Append(U1);
@@ -100,14 +102,14 @@ void ShapeUpgrade_SplitSurface::Init(const Handle(Geom_Surface)& S,
 
   myArea = theArea;
 
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   mySurface->Bounds(U1,U2,V1,V2);
   Standard_Real precision = Precision::PConfusion();
   if ( mySurface->IsUPeriodic() && 
        ULast - UFirst <= U2 - U1 + precision ) { U1 = UFirst; U2 = U1 + mySurface->UPeriod(); }
   if ( mySurface->IsVPeriodic() && 
        VLast - VFirst <= V2 - V1 + precision ) { V1 = VFirst; V2 = V1 + mySurface->VPeriod(); }
-  Standard_Real UF,UL,VF,VL;
+  Standard_Real UF = NAN,UL = NAN,VF = NAN,VL = NAN;
   if( UFirst > U2-precision || 
       ULast  < U1-precision ) {
     UF =U1; UL = U2;
@@ -225,7 +227,7 @@ void ShapeUpgrade_SplitSurface::Build(const Standard_Boolean Segment)
   if(myUSplitValues->Length() > 2 || myVSplitValues->Length() > 2)
     myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE1);
   
-  Standard_Real U1,U2,V1,V2;
+  Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
   mySurface->Bounds(U1, U2, V1, V2);
   if (mySurface->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) {      
     Handle(Geom_SurfaceOfRevolution) Surface = Handle(Geom_SurfaceOfRevolution)::DownCast(mySurface);
@@ -242,7 +244,7 @@ void ShapeUpgrade_SplitSurface::Build(const Standard_Boolean Segment)
       for(Standard_Integer nc =1; nc <= myNbResultingCol; nc++) {
        Handle(Geom_SurfaceOfRevolution) NewSurfaceRev = 
          new Geom_SurfaceOfRevolution(spc.GetCurves()->Value(nc),Surface->Axis()); 
-       Standard_Real U1p,U2p,V1p,V2p;
+       Standard_Real U1p = NAN,U2p = NAN,V1p = NAN,V2p = NAN;
        NewSurfaceRev->Bounds(U1p,U2p,V1p,V2p);
        for(Standard_Integer nc1 =1; nc1 <= myNbResultingRow; nc1++) { 
          Handle(Geom_RectangularTrimmedSurface) NewSurf = 
@@ -295,7 +297,7 @@ void ShapeUpgrade_SplitSurface::Build(const Standard_Boolean Segment)
       for(Standard_Integer nc1 =1; nc1 <= myNbResultingRow; nc1++) {
        Handle(Geom_SurfaceOfLinearExtrusion) NewSurfaceEx = new Geom_SurfaceOfLinearExtrusion(spc.GetCurves()->Value(nc1),
                                                                                               Surface->Direction()); 
-       Standard_Real U1p,U2p,V1p,V2p;
+       Standard_Real U1p = NAN,U2p = NAN,V1p = NAN,V2p = NAN;
        NewSurfaceEx->Bounds(U1p,U2p,V1p,V2p);
        for(Standard_Integer nc2 =1; nc2 <= myNbResultingCol; nc2++) {
          Handle(Geom_RectangularTrimmedSurface) NewSurf = new Geom_RectangularTrimmedSurface
@@ -489,7 +491,7 @@ void ShapeUpgrade_SplitSurface::Build(const Standard_Boolean Segment)
   }
   Standard_Integer nbU =  myUSplitValues->Length();
   TColStd_Array1OfReal UJoints(1,nbU);
-  Standard_Integer i;//svv Jan 10 2000 : porting on DEC
+  Standard_Integer i = 0;//svv Jan 10 2000 : porting on DEC
   for(i = 1; i <= nbU; i++)
     UJoints(i) = myUSplitValues->Value(i);
   
index 61f726b1451a2570549d39c6863d4675a7f3bccc..6a545da7ca444b53a7ebcdc698a1b16b1c20c42e 100644 (file)
@@ -112,9 +112,9 @@ protected:
   Handle(Geom_Surface) mySurface;
   Standard_Integer myStatus;
   Handle(ShapeExtend_CompositeSurface) myResSurfaces;
-  Standard_Real myArea;
-  Standard_Real myUsize;
-  Standard_Real myVsize;
+  Standard_Real myArea{};
+  Standard_Real myUsize{};
+  Standard_Real myVsize{};
 
 
 private:
index b8ab399aad943cfe5fc0172332d12570365516f8..79ce8428dab64b4bf49ca7ec0353868968264463 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_ConicalSurface.hxx>
 #include <Geom_CylindricalSurface.hxx>
 #include <Geom_OffsetSurface.hxx>
@@ -34,9 +36,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitSurfaceAngle,ShapeUpgrade_SplitSurf
 //function : ShapeUpgrade_SplitSurfaceAngle
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_SplitSurfaceAngle::ShapeUpgrade_SplitSurfaceAngle (const Standard_Real MaxAngle)
+ShapeUpgrade_SplitSurfaceAngle::ShapeUpgrade_SplitSurfaceAngle (const Standard_Real MaxAngle) : myMaxAngle(MaxAngle)
 {
-  myMaxAngle = MaxAngle;
+  
 }
 
 //=======================================================================
@@ -73,7 +75,7 @@ void ShapeUpgrade_SplitSurfaceAngle::Compute(const Standard_Boolean /*Segment*/)
     Handle(Geom_RectangularTrimmedSurface) rts = 
       Handle(Geom_RectangularTrimmedSurface)::DownCast(mySurface);
     isRect = Standard_True;
-    Standard_Real V1,V2;
+    Standard_Real V1 = NAN,V2 = NAN;
     rts->Bounds(U1,U2,V1,V2);
     S = rts->BasisSurface();
   }
index 72941c2bcb1a4ab372c233b4ec38bacfd2b125db..3d3a227229565432d72641d918747bc09108d708 100644 (file)
@@ -24,11 +24,11 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitSurfaceArea,ShapeUpgrade_SplitSurfa
 //purpose  : 
 //=======================================================================
 ShapeUpgrade_SplitSurfaceArea::ShapeUpgrade_SplitSurfaceArea():
-       ShapeUpgrade_SplitSurface()
+       ShapeUpgrade_SplitSurface(), myNbParts(1), myIsSplittingIntoSquares(Standard_False)
 {
-  myNbParts = 1;
+  
   myUnbSplit = myVnbSplit = -1;
-  myIsSplittingIntoSquares = Standard_False;
+  
 }
 
 //=======================================================================
@@ -59,7 +59,7 @@ ShapeUpgrade_SplitSurfaceArea::ShapeUpgrade_SplitSurfaceArea():
     aNbUV = 1./aNbUV;
 
   Standard_Boolean anIsFixedUVnbSplits = (myUnbSplit > 0 && myVnbSplit > 0);
-  Standard_Integer nbSplitF, nbSplitS;
+  Standard_Integer nbSplitF = 0, nbSplitS = 0;
   if (myIsSplittingIntoSquares && myNbParts > 0)
   {
     if (!anIsFixedUVnbSplits) //(myUnbSplit <= 0 || myVnbSplit <= 0)
index eb252bddc0a0aeb6fed5800d49641a7860b50c6d..4e54b79c57c48b68d740e53dbe822d0e26769063 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Geom_OffsetSurface.hxx>
 #include <Geom_RectangularTrimmedSurface.hxx>
 #include <Geom_SurfaceOfLinearExtrusion.hxx>
@@ -35,10 +37,10 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitSurfaceContinuity,ShapeUpgrade_Spli
 //purpose  : 
 //=======================================================================
 ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
-: myCont(0)
+: myCriterion(GeomAbs_C1), myTolerance(Precision::Confusion()), myCont(0)
 {
-  myCriterion = GeomAbs_C1;
-  myTolerance = Precision::Confusion();
+  
+  
   
 }
 
@@ -77,7 +79,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
  void ShapeUpgrade_SplitSurfaceContinuity::Compute(const Standard_Boolean Segment) 
 {
   if(!Segment) {
-    Standard_Real UF,UL,VF,VL;
+    Standard_Real UF = NAN,UL = NAN,VF = NAN,VL = NAN;
     mySurface->Bounds(UF,UL,VF,VL);
     if(!Precision::IsInfinite(UF)) myUSplitValues->SetValue(1,UF);
     if(!Precision::IsInfinite(UL)) myUSplitValues->SetValue(myUSplitValues->Length(),UL);
@@ -138,7 +140,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
       myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE2 );
     if ( spc.Status ( ShapeExtend_DONE3 ) ) {
       myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
-      Handle(Geom_Curve) aNewBascurve = spc.GetCurve();
+      const Handle(Geom_Curve)& aNewBascurve = spc.GetCurve();
       Surface->SetBasisCurve(aNewBascurve);
     }
     return;
@@ -149,7 +151,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
     if(tmp->Continuity() >=  myCriterion && myUSplitValues->Length() ==2 && myVSplitValues->Length() == 2) {
       return;
     }
-    Standard_Real U1,U2,V1,V2;
+    Standard_Real U1 = NAN,U2 = NAN,V1 = NAN,V2 = NAN;
     tmp->Bounds(U1,U2,V1,V2);
     Handle(Geom_Surface) theSurf = tmp->BasisSurface();
     ShapeUpgrade_SplitSurfaceContinuity sps;
index a617df4a72027b3a97d5e501870c50f91cb76487..18ca5e3f91121bbdb430f610326d5f3d902e11b2 100644 (file)
@@ -26,10 +26,10 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_Tool,Standard_Transient)
 //function : ShapeUpgrade_Tool
 //purpose  : 
 //=======================================================================
-ShapeUpgrade_Tool::ShapeUpgrade_Tool()
+ShapeUpgrade_Tool::ShapeUpgrade_Tool() : myMaxTol(1)
 {
   myPrecision = myMinTol = Precision::Confusion();
-  myMaxTol = 1; //Precision::Infinite() ?? pdn
+  //Precision::Infinite() ?? pdn
 }
 
 //=======================================================================
index 7d603b2dae6b84d2c0769aaae4c79746ddf2b85f..9d40819aa37b4b5ad545c3f19c18a6affee1d6bb 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <ShapeUpgrade_UnifySameDomain.hxx>
 
 #include <BRep_Builder.hxx>
@@ -324,7 +326,7 @@ static Standard_Real ComputeMinEdgeSize(const TopTools_SequenceOfShape& theEdges
     BRepAdaptor_Curve2d BAcurve2d(anEdge, theRefFace);
     gp_Pnt2d FirstP2d = BAcurve2d.Value(BAcurve2d.FirstParameter());
     gp_Pnt2d LastP2d  = BAcurve2d.Value(BAcurve2d.LastParameter());
-    Standard_Real aSqDist;
+    Standard_Real aSqDist = NAN;
     if (V1.IsSame(V2) &&
         !BRep_Tool::Degenerated(anEdge))
     {
@@ -370,7 +372,7 @@ static void FindCoordBounds(const TopTools_SequenceOfShape& theFaces,
       const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
       if (!theEdgesMap.Contains(anEdge))
         continue;
-      Standard_Real fpar, lpar;
+      Standard_Real fpar = NAN, lpar = NAN;
       Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(anEdge, theRefFace, fpar, lpar);
       UpdateBoundaries (aPCurve, fpar, lpar, theIndCoord, aMinCoord, aMaxCoord);
     }
@@ -470,7 +472,7 @@ static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges
         {
           StartEdge = anEdge;
           BRepAdaptor_Curve2d StartBAcurve(StartEdge, theRefFace);
-          Standard_Real aFirstParam, aLastParam;
+          Standard_Real aFirstParam = NAN, aLastParam = NAN;
           if (StartEdge.Orientation() == TopAbs_FORWARD)
           {
             aFirstParam = StartBAcurve.FirstParameter();
@@ -497,7 +499,7 @@ static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges
         else
         {
           BRepAdaptor_Curve2d aBAcurve(anEdge, theRefFace);
-          Standard_Real aFirstParam, aLastParam;
+          Standard_Real aFirstParam = NAN, aLastParam = NAN;
           if (anEdge.Orientation() == TopAbs_FORWARD)
           {
             aFirstParam = aBAcurve.FirstParameter();
@@ -532,7 +534,7 @@ static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges
     TopoDS_Vertex StartVertex = (anOr == TopAbs_FORWARD)?
       TopExp::FirstVertex(StartEdge, Standard_True) : TopExp::LastVertex(StartEdge, Standard_True);
     TopoDS_Edge CurEdge = StartEdge;
-    Standard_Real fpar, lpar;
+    Standard_Real fpar = NAN, lpar = NAN;
     Handle(Geom2d_Curve) CurPCurve = BRep_Tool::CurveOnSurface(CurEdge, theRefFace, fpar, lpar);
     CurPCurve = new Geom2d_TrimmedCurve(CurPCurve, fpar, lpar);
     theEdgeNewPCurve.Bind(CurEdge, CurPCurve);
@@ -688,7 +690,7 @@ static Standard_Boolean FindClosestPoints(const TopoDS_Edge& theEdge1,
   if (theCommonFace.IsNull())
     return Standard_False;
   
-  Standard_Real fpar1, lpar1, fpar2, lpar2;
+  Standard_Real fpar1 = NAN, lpar1 = NAN, fpar2 = NAN, lpar2 = NAN;
   Handle(Geom2d_Curve) PCurve1 = BRep_Tool::CurveOnSurface(theEdge1, theCommonFace, fpar1, lpar1);
   Handle(Geom2d_Curve) PCurve2 = BRep_Tool::CurveOnSurface(theEdge2, theCommonFace, fpar2, lpar2);
   PointsOnEdge1[0] = PCurve1->Value(fpar1);
@@ -734,7 +736,7 @@ static void ReconstructMissedSeam(const TopTools_SequenceOfShape& theRemovedEdge
     TopoDS_Edge anEdge = TopoDS::Edge(theRemovedEdges(i));
     if (anEdge.IsSame (theCurEdge))
       continue;
-    Standard_Real Param1, Param2;
+    Standard_Real Param1 = NAN, Param2 = NAN;
     Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnSurface(anEdge, theFrefFace, Param1, Param2);
     if (aPC.IsNull())
       continue;
@@ -793,7 +795,7 @@ static void ReconstructMissedSeam(const TopTools_SequenceOfShape& theRemovedEdge
 
   if (!theSeamEdge.IsNull())
   {
-    Standard_Real Param1, Param2;
+    Standard_Real Param1 = NAN, Param2 = NAN;
     Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnSurface(theSeamEdge, theFrefFace, Param1, Param2);
     Standard_Real aParam = (theSeamEdge.Orientation() == TopAbs_FORWARD)? Param2 : Param1;
     theNextPoint = aPC->Value (aParam);
@@ -808,7 +810,7 @@ static Standard_Boolean SameSurf(const Handle(Geom_Surface)& theS1, const Handle
 {
   static Standard_Real aCoefs[2] = { 0.3399811, 0.7745966 };
 
-  Standard_Real uf1, ul1, vf1, vl1, uf2, ul2, vf2, vl2;
+  Standard_Real uf1 = NAN, ul1 = NAN, vf1 = NAN, vl1 = NAN, uf2 = NAN, ul2 = NAN, vf2 = NAN, vl2 = NAN;
   theS1->Bounds(uf1, ul1, vf1, vl1);
   theS2->Bounds(uf2, ul2, vf2, vl2);
   Standard_Real aPTol = Precision::PConfusion();
@@ -917,8 +919,8 @@ static Standard_Boolean SameSurf(const Handle(Geom_Surface)& theS1, const Handle
   }
   //
 
-  Standard_Real u, v, du = (ul1 - uf1), dv = (vl1 - vf1);
-  Standard_Integer i, j;
+  Standard_Real u = NAN, v = NAN, du = (ul1 - uf1), dv = (vl1 - vf1);
+  Standard_Integer i = 0, j = 0;
   for (i = 0; i < 2; ++i)
   {
     u = uf1 + aCoefs[i] * du;
@@ -1032,7 +1034,7 @@ static void TransformPCurves(const TopoDS_Face& theRefFace,
 
     TopAbs_Orientation anOr = anEdge.Orientation();
 
-    Standard_Real fpar, lpar;
+    Standard_Real fpar = NAN, lpar = NAN;
     Handle(Geom2d_Curve) PCurveOnRef = BRep_Tool::CurveOnSurface(anEdge, theRefFace, fpar, lpar);
     Handle(Geom2d_Curve) PCurve2;
     if (!PCurveOnRef.IsNull()/* && !(ToModify || ToProject)*/)
@@ -1091,7 +1093,7 @@ static void TransformPCurves(const TopoDS_Face& theRefFace,
       else
       {
         //check: may be it is the same pcurve
-        Standard_Real aUmin, aUmax, aVmin, aVmax;
+        Standard_Real aUmin = NAN, aUmax = NAN, aVmin = NAN, aVmax = NAN;
         RefSurf->Bounds (aUmin, aUmax, aVmin, aVmax);
         Standard_Real aUperiod = (RefSurf->IsUClosed())? (aUmax - aUmin) : 0.;
         Standard_Real aVperiod = (RefSurf->IsVClosed())? (aVmax - aVmin) : 0.;
@@ -1154,7 +1156,7 @@ static void AddPCurves(const TopTools_SequenceOfShape& theFaces,
 // seams and equal edges are dropped
 // Returns true if one of original edges dropped
 static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
-                                         const TopoDS_Shape aShape,
+                                         const TopoDS_Shape& aShape,
                                          Standard_Integer& anIndex,
                                          TopTools_SequenceOfShape& theRemovedEdges)
 {
@@ -1162,7 +1164,7 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
   TopTools_IndexedMapOfShape aNewEdges;
   //add edges without seams
   for(TopExp_Explorer exp(aShape,TopAbs_EDGE); exp.More(); exp.Next()) {
-    TopoDS_Shape edge = exp.Current();
+    const TopoDS_Shape& edge = exp.Current();
     if(aNewEdges.Contains(edge))
     {
       aNewEdges.RemoveKey(edge);
@@ -1174,7 +1176,7 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
 
   Standard_Boolean isDropped = Standard_False;
   //merge edges and drop seams
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= edges.Length(); i++) {
     TopoDS_Shape current = edges(i);
     if(aNewEdges.Contains(current)) {
@@ -1281,7 +1283,7 @@ static Standard_Boolean GetNormalToSurface(const TopoDS_Face& theFace,
                                            const Standard_Real theP,
                                            gp_Dir& theNormal)
 {
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   // get 2d curve to get point in 2d
   Handle(Geom2d_Curve) aC2d;
   if (BRep_Tool::IsClosed(theEdge, theFace))
@@ -1474,7 +1476,7 @@ static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
                                         const TopoDS_Vertex& FirstVertex,
                                         const TopoDS_Vertex& LastVertex)
 {
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   TopoDS_Edge FirstEdge = TopoDS::Edge(aChain(1));
   TColGeom_SequenceOfSurface SurfSeq;
@@ -1485,7 +1487,7 @@ static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
     Handle(Geom2d_Curve) aCurve;
     Handle(Geom_Surface) aSurface;
     TopLoc_Location aLocation;
-    Standard_Real aFirst, aLast;
+    Standard_Real aFirst = NAN, aLast = NAN;
     BRep_Tool::CurveOnSurface (FirstEdge, aCurve, aSurface, aLocation, aFirst, aLast, aCurveIndex);
     if (aCurve.IsNull())
       break;
@@ -1494,7 +1496,7 @@ static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
     LocSeq.Append(aLocation);
   }
 
-  Standard_Real fpar, lpar;
+  Standard_Real fpar = NAN, lpar = NAN;
   BRep_Tool::Range(FirstEdge, fpar, lpar);
   TopoDS_Edge PrevEdge = FirstEdge;
   TopoDS_Vertex CV;
@@ -1632,7 +1634,7 @@ static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
 void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape& theChain,
                                                 TopoDS_Edge& theEdge)
 {
-  Standard_Real aFirst3d, aLast3d;
+  Standard_Real aFirst3d = NAN, aLast3d = NAN;
   Handle(Geom_Curve) aCurve = BRep_Tool::Curve (theEdge, aFirst3d, aLast3d);
   Standard_Real aTolEdge = BRep_Tool::Tolerance(theEdge);
   Standard_Real aMaxTol = aTolEdge;
@@ -1691,7 +1693,7 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape&
     TColStd_SequenceOfBoolean aForwardsSeq;
     GeomAbs_CurveType aCurrentType = GeomAbs_OtherCurve;
 
-    Standard_Real aFirst, aLast;
+    Standard_Real aFirst = NAN, aLast = NAN;
     for (Standard_Integer i = 1; i <= theChain.Length(); i++)
     {
       TopoDS_Edge anEdge = TopoDS::Edge(theChain.Value(i));
@@ -1829,7 +1831,7 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape&
     }
 
     Handle(Geom2d_Curve) aResPCurve;
-    Standard_Real aResFirst, aResLast;
+    Standard_Real aResFirst = NAN, aResLast = NAN;
     if (aPCurveSeq.Length() == 1) {
       aResPCurve = aPCurveSeq.Last();
       aResFirst = aFirstsSeq.Last();
@@ -2007,8 +2009,8 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeSubSeq(const TopTools_Sequen
   ShapeAnalysis_Edge sae;
   BRep_Builder B;
   // union edges in chain
-  int j;
-  Standard_Real fp1,lp1,fp2,lp2;
+  int j = 0;
+  Standard_Real fp1 = NAN,lp1 = NAN,fp2 = NAN,lp2 = NAN;
   Standard_Boolean IsUnionOfLinesPossible = Standard_True;
   Standard_Boolean IsUnionOfCirclesPossible = Standard_True;
   Handle(Geom_Curve) c3d1, c3d2;
@@ -2024,9 +2026,9 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeSubSeq(const TopTools_Sequen
       TopoDS_Edge edgeFirst = TopoDS::Edge(theChain.First());
       TopoDS_Edge edgeLast  = TopoDS::Edge(theChain.Last());
       TopoDS_Face CommonFace;
-      Standard_Real MinSqDist;
+      Standard_Real MinSqDist = NAN;
       TopAbs_Orientation OrOfE1OnFace, OrOfE2OnFace;
-      Standard_Integer IndOnE1, IndOnE2;
+      Standard_Integer IndOnE1 = 0, IndOnE2 = 0;
       gp_Pnt2d PointsOnEdge1 [2], PointsOnEdge2 [2];
       if (!FindClosestPoints(edgeFirst, edgeLast, theVFmap, CommonFace,
                              MinSqDist, OrOfE1OnFace, OrOfE2OnFace,
@@ -2139,7 +2141,7 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeSubSeq(const TopTools_Sequen
 
   if (IsUnionOfCirclesPossible)
   {
-    double f,l;
+    double f = NAN,l = NAN;
     TopoDS_Edge FE = TopoDS::Edge(theChain.First());
     Handle(Geom_Curve) c3d = BRep_Tool::Curve(FE,f,l);
 
@@ -2172,7 +2174,7 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeSubSeq(const TopTools_Sequen
       // closed chain
       BRepAdaptor_Curve adef(FE);
       Handle(Geom_Circle) Cir1;
-      double FP, LP;
+      double FP = NAN, LP = NAN;
       if ( FE.Orientation() == TopAbs_FORWARD)
       {
         FP = adef.FirstParameter();
@@ -2307,9 +2309,9 @@ static Standard_Boolean IsMergingPossible(const TopoDS_Edge& edge1, const TopoDS
   {
     //Find connstion point in 2d
     TopoDS_Face CommonFace;
-    Standard_Real MinSqDist;
+    Standard_Real MinSqDist = NAN;
     TopAbs_Orientation OrOfE1OnFace, OrOfE2OnFace;
-    Standard_Integer IndOnE1, IndOnE2;
+    Standard_Integer IndOnE1 = 0, IndOnE2 = 0;
     gp_Pnt2d PointsOnEdge1 [2], PointsOnEdge2 [2];
     if (!FindClosestPoints(edge1, edge2, theVFmap, CommonFace,
                            MinSqDist, OrOfE1OnFace, OrOfE2OnFace,
@@ -2395,7 +2397,7 @@ static Standard_Boolean IsMergingPossible(const TopoDS_Edge& edge1, const TopoDS
 //=======================================================================
 static Standard_Boolean GetLineEdgePoints(const TopoDS_Edge& theInpEdge, gp_Pnt& theFirstPoint, gp_Vec& theDirectionVec)
 {
-  double f, l;
+  double f = NAN, l = NAN;
   Handle(Geom_Curve) aCur = BRep_Tool::Curve(theInpEdge, f, l);
   if(aCur.IsNull()) 
     return Standard_False;
@@ -2487,7 +2489,7 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeEdges(TopTools_SequenceOfSha
                                                           const TopTools_MapOfShape& NonMergVrt)
 {
   TopTools_IndexedDataMapOfShapeListOfShape aMapVE;
-  Standard_Integer j;
+  Standard_Integer j = 0;
   TopTools_MapOfShape VerticesToAvoid;
   const Standard_Integer aNbE = SeqEdges.Length();
   for (j = 1; j <= aNbE; j++)
@@ -2496,7 +2498,7 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeEdges(TopTools_SequenceOfSha
     // fill in the map V-E
     for (TopoDS_Iterator it(anEdge.Oriented(TopAbs_FORWARD)); it.More(); it.Next())
     {
-      TopoDS_Shape aV = it.Value();
+      const TopoDS_Shape& aV = it.Value();
       if (aV.Orientation() == TopAbs_FORWARD || aV.Orientation() == TopAbs_REVERSED)
       {
         if (!aMapVE.Contains(aV))
@@ -2652,9 +2654,9 @@ ShapeUpgrade_UnifySameDomain::ShapeUpgrade_UnifySameDomain()
     myConcatBSplines (Standard_False),
     myAllowInternal (Standard_False),
     mySafeInputMode(Standard_True),
-    myHistory(new BRepTools_History)
+    myContext(new ShapeBuild_ReShape), myHistory(new BRepTools_History)
 {
-  myContext = new ShapeBuild_ReShape;
+  
 }
 
 //=======================================================================
@@ -2675,9 +2677,9 @@ ShapeUpgrade_UnifySameDomain::ShapeUpgrade_UnifySameDomain(const TopoDS_Shape& a
     myAllowInternal (Standard_False),
     mySafeInputMode (Standard_True),
     myShape (aShape),
-    myHistory(new BRepTools_History)
+    myContext(new ShapeBuild_ReShape), myHistory(new BRepTools_History)
 {
-  myContext = new ShapeBuild_ReShape;
+  
 }
 
 //=======================================================================
@@ -2909,7 +2911,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
     TopTools_SequenceOfShape edges;
     TopTools_SequenceOfShape RemovedEdges;
 
-    Standard_Integer dummy;
+    Standard_Integer dummy = 0;
     AddOrdinaryEdges(edges, aFace, dummy, RemovedEdges);
 
     // Faces to get unified with the current faces
@@ -2939,7 +2941,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
     const TopTools_MapOfShape* pFShells1 = theGMapFaceShells.Seek (aFace);
 
     // find adjacent faces to union
-    Standard_Integer i;
+    Standard_Integer i = 0;
     for (i = 1; i <= edges.Length(); i++) {
       TopoDS_Edge edge = TopoDS::Edge(edges(i));
       if (BRep_Tool::Degenerated(edge))
@@ -2969,7 +2971,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
       gp_Dir aDN1;
       //
       // take intermediate point on edge to compute the normal
-      Standard_Real f, l;
+      Standard_Real f = NAN, l = NAN;
       BRep_Tool::Range(edge, f, l);
       Standard_Real aTMid = (f + l) * .5;
       //
@@ -3072,7 +3074,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
               Standard_Boolean hasConnectAnotherFaces = Standard_False;
               TopExp_Explorer ex(faces(i), TopAbs_EDGE);
               for (; ex.More() && !hasConnectAnotherFaces; ex.Next()) {
-                TopoDS_Shape aE = ex.Current();
+                const TopoDS_Shape& aE = ex.Current();
                 const TopTools_ListOfShape& aLF = aMapEF.FindFromKey(aE);
                 if (aLF.Extent() > 1) {
                   for (it.Init(aLF); it.More() && !hasConnectAnotherFaces; it.Next()) {
@@ -3221,7 +3223,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
       if (aIsEdgeWith2pcurvesSmooth)
       {
         Handle(Geom2d_Curve) aPC1, aPC2;
-        Standard_Real aFirst, aLast;
+        Standard_Real aFirst = NAN, aLast = NAN;
         aPC1 = BRep_Tool::CurveOnSurface (EdgeWith2pcurves, F_RefFace, aFirst, aLast);
         EdgeWith2pcurves.Reverse();
         aPC2 = BRep_Tool::CurveOnSurface (EdgeWith2pcurves, F_RefFace, aFirst, aLast);
@@ -3295,8 +3297,8 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
           {
             //try to find the origin of U in 2d space
             //so that all the faces are in [origin, origin + Uperiod]
-            Standard_Real aMinCoord, aMaxCoord; //Umin, Umax;
-            Standard_Integer aNumberOfIntervals, i_face_max;
+            Standard_Real aMinCoord = NAN, aMaxCoord = NAN; //Umin, Umax;
+            Standard_Integer aNumberOfIntervals = 0, i_face_max = 0;
             FindCoordBounds (faces, F_RefFace, aMapEF, edgesMap, ii+1, aPeriods[ii],
                              aMinCoord, aMaxCoord, aNumberOfIntervals, i_face_max);
             
@@ -3318,7 +3320,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
                 const TopoDS_Edge& anEdge = TopoDS::Edge(edges(ind));
                 if (!UsedEdges.Contains(anEdge))
                 {
-                  Standard_Real fpar, lpar;
+                  Standard_Real fpar = NAN, lpar = NAN;
                   Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(anEdge, F_RefFace, fpar, lpar);
                   aPCurve = new Geom2d_TrimmedCurve(aPCurve, fpar, lpar);
                   EdgeNewPCurve.Bind(anEdge, aPCurve);
@@ -3389,7 +3391,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
         Handle(Geom_Surface) aSurf = BRep_Tool::Surface(RefFace, aLoc);
         if (aSurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
           aSurf = (Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf))->BasisSurface();
-        Standard_Real Ufirst, Ulast, Vfirst, Vlast;
+        Standard_Real Ufirst = NAN, Ulast = NAN, Vfirst = NAN, Vlast = NAN;
         aSurf->Bounds(Ufirst, Ulast, Vfirst, Vlast);
         if (Uperiod == 0 && aSurf->IsUClosed())
           Uperiod = Ulast - Ufirst;
@@ -3439,11 +3441,11 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
         RemoveEdgeFromMap(StartEdge, VEmap);
         TopTools_IndexedMapOfShape SplittingVertices;
         
-        Standard_Real fpar, lpar;
+        Standard_Real fpar = NAN, lpar = NAN;
         Handle(Geom2d_Curve) StartPCurve = BRep_Tool::CurveOnSurface(StartEdge, F_RefFace, fpar, lpar);
         TopoDS_Vertex StartVertex, CurVertex;
         TopExp::Vertices(StartEdge, StartVertex, CurVertex, Standard_True); //with orientation
-        Standard_Real StartParam, CurParam;
+        Standard_Real StartParam = NAN, CurParam = NAN;
         if (StartEdge.Orientation() == TopAbs_FORWARD)
         {
           StartParam = fpar; CurParam = lpar;
@@ -3760,7 +3762,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
             if (BRep_Tool::Degenerated(anEdge) ||
                 BRep_Tool::IsClosed(anEdge, RefFace))
               continue;
-            Standard_Integer jj;
+            Standard_Integer jj = 0;
             for (jj = 1; jj <= Emaps.Length(); jj++)
               if (Emaps(jj).Contains(anEdge))
                 break;
@@ -3942,7 +3944,7 @@ void ShapeUpgrade_UnifySameDomain::FillHistory()
   TopExp::MapShapes(myShape, TopAbs_SOLID , aMapResultShapes);
 
   // Iterate on all input shapes and get their modifications
-  Standard_Integer i, aNb = aMapInputShape.Extent();
+  Standard_Integer i = 0, aNb = aMapInputShape.Extent();
   for (i = 1; i <= aNb; ++i)
   {
     const TopoDS_Shape& aS = aMapInputShape(i);
@@ -4054,7 +4056,7 @@ void SplitWire (const TopoDS_Wire&                theWire,
         }
         else
         {
-          Standard_Real fpar, lpar;
+          Standard_Real fpar = NAN, lpar = NAN;
           Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(CurEdge, theFace, fpar, lpar);
           Standard_Real aParam = (CurEdge.Orientation() == TopAbs_FORWARD)? lpar : fpar;
           gp_Pnt2d aPoint;
index 0bd2850378a814e8dcfcca988498e72c5047a2db..1fcac73cd181d5a2e928b1e5bc127cc3dc2aa1df 100644 (file)
@@ -19,6 +19,8 @@
 //    abv 14.07.99 dealing with edges without 3d curve
 //    svv 10.01.00 porting on DEC
 
+#include <math.h>
+
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -67,15 +69,15 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_WireDivide,ShapeUpgrade_Tool)
 //purpose  : 
 //=======================================================================
 ShapeUpgrade_WireDivide::ShapeUpgrade_WireDivide():
-       ShapeUpgrade_Tool(), myStatus(0)
+       ShapeUpgrade_Tool(), myStatus(0), mySplitCurve3dTool(new ShapeUpgrade_SplitCurve3d), mySplitCurve2dTool(new ShapeUpgrade_SplitCurve2d), myTransferParamTool(new ShapeAnalysis_TransferParametersProj), myEdgeMode(2), myFixSmallCurveTool(new ShapeUpgrade_FixSmallCurves), myEdgeDivide(new ShapeUpgrade_EdgeDivide)
 {
 //  if (ShapeUpgrade::Debug()) std::cout <<"ShapeUpgrade_WireDivide"<<std::endl;
-  mySplitCurve3dTool = new ShapeUpgrade_SplitCurve3d;
-  mySplitCurve2dTool = new ShapeUpgrade_SplitCurve2d;
-  myTransferParamTool = new ShapeAnalysis_TransferParametersProj;
-  myEdgeMode = 2;
-  myFixSmallCurveTool = new ShapeUpgrade_FixSmallCurves; 
-  myEdgeDivide = new ShapeUpgrade_EdgeDivide;
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -167,8 +169,8 @@ void ShapeUpgrade_WireDivide::SetSurface(const Handle(Geom_Surface)& S,
 //purpose  : 
 //=======================================================================
 
-static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal) orig3d,
-                              const Handle(TColStd_HSequenceOfReal) orig2d,
+static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal)& orig3d,
+                              const Handle(TColStd_HSequenceOfReal)& orig2d,
                               Handle(TColStd_HSequenceOfReal) new2d,
                               Handle(TColStd_HSequenceOfReal) new3d)
 {
@@ -182,7 +184,7 @@ static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal) orig3d,
   Standard_Real Last3d = orig3d->Value(len3d);
   Standard_Real Last2d = orig2d->Value(len2d);
 
-  Standard_Integer i;// svv #1
+  Standard_Integer i = 0;// svv #1
   for( i = 1; i <= len3d ; i++) {
     Standard_Real par = new2d->Value(i);
     Standard_Integer index = 0;
@@ -232,7 +234,7 @@ static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal) orig3d,
     }
   }
   if(new2d->Value(len3d) > Last3d) {
-    Standard_Integer ind; // svv #1
+    Standard_Integer ind = 0; // svv #1
     for( ind = len3d; ind > 1 && !fixNew2d(ind); ind--);
     Standard_Real lastFix = new2d->Value(ind);
     for(i = len3d; i >= ind; i--) { 
@@ -257,7 +259,7 @@ static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal) orig3d,
     }
   }
   if(new3d->Value(len2d) > Last2d) {
-    Standard_Integer ind; // svv #1
+    Standard_Integer ind = 0; // svv #1
     for(ind = len2d; ind > 1 && !fixNew3d(ind); ind--);
     Standard_Real lastFix = new3d->Value(ind);
     for(i = len2d; i >= ind; i--) { 
@@ -364,7 +366,7 @@ void ShapeUpgrade_WireDivide::Perform ()
       Handle(TColGeom2d_HArray1OfCurve) theSegments2dR;
       if ( isSeam ) {
        Handle(Geom2d_Curve) c2;
-       Standard_Real f2, l2;    
+       Standard_Real f2 = NAN, l2 = NAN;    
 //smh#8
        TopoDS_Shape tmpE = E.Reversed();
        TopoDS_Edge erev = TopoDS::Edge (tmpE );
@@ -436,7 +438,7 @@ void ShapeUpgrade_WireDivide::Perform ()
          TopoDS_Vertex aVold = TopoDS::Vertex(aItv.Value());
          aSeqNMVertices.Append(aVold);
          gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aVold));
-         Standard_Real ppar;
+         Standard_Real ppar = NAN;
          gp_Pnt pproj;
          if(!c3d.IsNull())
            sac.Project(c3d,aP,Precision(),pproj,ppar,af,al,Standard_False);
@@ -490,7 +492,7 @@ void ShapeUpgrade_WireDivide::Perform ()
       FixSmallCurveTool->SetSplitCurve2dTool(theSplit2dTool);
       FixSmallCurveTool->SetPrecision(MinTolerance());
       Standard_Integer Savnum =0;
-      Standard_Real SavParf;
+      Standard_Real SavParf = NAN;
       Standard_Integer Small = 0;
       for ( Standard_Integer icurv = 1; icurv <= nbc; icurv++ ) {
       
@@ -505,7 +507,7 @@ void ShapeUpgrade_WireDivide::Perform ()
        // construction of the intermediate Vertex
        TopoDS_Vertex V;
        if ( icurv <= nbc && nbc != 1 && ! isDeg ) {
-         Standard_Real par,parf /*,SavParl*/;
+         Standard_Real par = NAN,parf = NAN /*,SavParl*/;
           //Standard_Real SaveParf; // SaveParf not used - see below (skl)
          gp_Pnt P,P1,PM;
          // if edge has 3d curve, take point from it
@@ -629,7 +631,7 @@ void ShapeUpgrade_WireDivide::Perform ()
        
         Standard_Real f3d = 0., l3d =0.;
         if(!Savnum) Savnum = icurv;
-       Standard_Boolean srNew;
+       Standard_Boolean srNew = 0;
        if(!theNewCurve3d.IsNull()) {
          if(theNewCurve3d->IsKind(STANDARD_TYPE(Geom_BoundedCurve))) {
            f3d = theNewCurve3d->FirstParameter();
@@ -668,7 +670,7 @@ void ShapeUpgrade_WireDivide::Perform ()
        sbe.CopyRanges(newEdge,E, alpha, beta);*/
        Savnum =0;
        Handle(Geom2d_Curve) c2dTmp;
-       Standard_Real setF, setL;
+       Standard_Real setF = NAN, setL = NAN;
        if( ! myFace.IsNull() && sae.PCurve (newEdge, myFace, c2dTmp, setF, setL, Standard_False))
          srNew &= ( (setF==f2d) && (setL==l2d) );
 
index bc601165c6f5cde1f41ea00e9eeec6f5d2e6285a..8302f55ccc5207a8370aee19e7b1ab839e69f3f7 100644 (file)
@@ -97,7 +97,7 @@ Standard_MMgrFactory::Standard_MMgrFactory()
   Standard_STATIC_ASSERT(sizeof(Standard_WideChar) == sizeof(Standard_Utf16Char));
 #endif
 
-  char* aVar;
+  char* aVar = nullptr;
   aVar = getenv ("MMGT_OPT");
   Standard_Integer anAllocId   = (aVar ?  atoi (aVar): OCCT_MMGT_OPT_DEFAULT);
 
index 232ae2b2ecf9f1fe77281b7a32711b6458005a0c..b3325aa37df7f41ffa5093fac1a672cfc0067883 100644 (file)
@@ -134,8 +134,8 @@ bool Standard_Condition::Wait (int theTimeMilliseconds)
   pthread_mutex_lock (&myMutex);
   if (!myFlag)
   {
-    struct timespec aNow;
-    struct timespec aTimeout;
+    struct timespec aNow{};
+    struct timespec aTimeout{};
     conditionGetRealTime (aNow);
     aTimeout.tv_sec  = (theTimeMilliseconds / 1000);
     aTimeout.tv_nsec = (theTimeMilliseconds - aTimeout.tv_sec * 1000) * 1000000;
@@ -166,8 +166,8 @@ bool Standard_Condition::Check()
   pthread_mutex_lock (&myMutex);
   if (!myFlag)
   {
-    struct timespec aNow;
-    struct timespec aTimeout;
+    struct timespec aNow{};
+    struct timespec aTimeout{};
     conditionGetRealTime (aNow);
     aTimeout.tv_sec  = aNow.tv_sec;
     aTimeout.tv_nsec = aNow.tv_nsec + 100;
@@ -193,8 +193,8 @@ bool Standard_Condition::CheckReset()
   bool wasSignalled = myFlag;
   if (!myFlag)
   {
-    struct timespec aNow;
-    struct timespec aTimeout;
+    struct timespec aNow{};
+    struct timespec aTimeout{};
     conditionGetRealTime (aNow);
     aTimeout.tv_sec  = aNow.tv_sec;
     aTimeout.tv_nsec = aNow.tv_nsec + 100;
index d5c81913b32d4345c487f8d01e9a43ba1660cc97..4a976a9104d8cb4ae4a11bcd53038d62755c2dfc 100644 (file)
@@ -76,8 +76,8 @@ private:
 #ifdef _WIN32
   void*           myEvent;
 #else
-  pthread_mutex_t myMutex;
-  pthread_cond_t  myCond;
+  pthread_mutex_t myMutex{};
+  pthread_cond_t  myCond{};
   bool            myFlag;
 #endif
 
index 3fc6c189d99b680169eb8299dbaced6028891dee..3729eb9641d8c472e599cbf62d2f9f3ae84ba20d 100644 (file)
@@ -65,13 +65,13 @@ static inline Standard_ThreadId GetThreadID()
 //============================================================================
 
 Standard_ErrorHandler::Standard_ErrorHandler () : 
-       myStatus(Standard_HandlerVoid), myCallbackPtr(0)
+       myPrevious(Top), myStatus(Standard_HandlerVoid), myThread(GetThreadID()), myCallbackPtr(0)
 {
-  myThread   = GetThreadID();
+  
   memset (&myLabel, 0, sizeof(myLabel));
 
   GetMutex().Lock();
-  myPrevious = Top;
+  
   Top        = this;
   GetMutex().Unlock();
 }
index 85b5ff9fe2b7665e4d6920cd2d9abaecaad4065f..8db6cdf917fccb2e07e1a0764e76e9013fe27849 100644 (file)
@@ -197,7 +197,7 @@ private:
 
   Standard_PErrorHandler myPrevious;
   Handle(Standard_Failure) myCaughtError;
-  Standard_JmpBuf myLabel;
+  Standard_JmpBuf myLabel{};
   Standard_HandlerStatus myStatus;
   Standard_ThreadId myThread;
   Callback* myCallbackPtr;
index 002c42a426ae52a4139d803c0933385b5e87988b..5820ebaa8f4ddabb3146ce6d1ed5da15dd97680a 100644 (file)
@@ -112,10 +112,9 @@ Standard_Failure::Standard_Failure()
 // purpose  :
 // =======================================================================
 Standard_Failure::Standard_Failure (const Standard_CString theDesc)
-: myMessage (NULL),
-  myStackTrace (NULL)
+: myMessage(StringRef::allocate_message (theDesc)), myStackTrace (NULL)
 {
-  myMessage = StringRef::allocate_message (theDesc);
+  
   const Standard_Integer aStackLength = Standard_Failure_DefaultStackTraceLength;
   if (aStackLength > 0)
   {
@@ -136,12 +135,8 @@ Standard_Failure::Standard_Failure (const Standard_CString theDesc)
 // =======================================================================
 Standard_Failure::Standard_Failure (const Standard_CString theDesc,
                                     const Standard_CString theStackTrace)
-: myMessage (NULL),
-  myStackTrace (NULL)
-{
-  myMessage = StringRef::allocate_message (theDesc);
-  myStackTrace = StringRef::allocate_message (theStackTrace);
-}
+: myMessage(StringRef::allocate_message (theDesc)), myStackTrace(StringRef::allocate_message (theStackTrace))
+{}
 
 // =======================================================================
 // function : Standard_Failure
@@ -149,11 +144,10 @@ Standard_Failure::Standard_Failure (const Standard_CString theDesc,
 // =======================================================================
 Standard_Failure::Standard_Failure (const Standard_Failure& theFailure)
 : Standard_Transient (theFailure),
-  myMessage (NULL),
-  myStackTrace (NULL)
+  myMessage(StringRef::copy_message (theFailure.myMessage)), myStackTrace(StringRef::copy_message (theFailure.myStackTrace))
 {
-  myMessage    = StringRef::copy_message (theFailure.myMessage);
-  myStackTrace = StringRef::copy_message (theFailure.myStackTrace);
+  
+  
 }
 
 // =======================================================================
index 6383445f8880eaf09583fe15fb5e43b776f22195..827a6876b492758dfc3eedf9aa82c6ec4873929f 100644 (file)
@@ -104,7 +104,7 @@ Standard_Boolean Standard_GUID::CheckGUIDFormat(const Standard_CString aGuid)
   if (aGuid == NULL) return Standard_False;
 
   if (strlen(aGuid) == Standard_GUID_SIZE) {
-    Standard_Integer i;
+    Standard_Integer i = 0;
 
     for (i = 0; i < 8 && result; i++) {
       if (!IsXDigit(aGuid[i])) {
@@ -244,32 +244,32 @@ Standard_GUID::Standard_GUID(const Standard_Integer a32b,
        const Standard_Byte a8b3,
        const Standard_Byte a8b4,
        const Standard_Byte a8b5,
-       const Standard_Byte a8b6)
+       const Standard_Byte a8b6) : my32b(a32b), my16b1(a16b1), my16b2(a16b2), my16b3(a16b3), my8b1(a8b1), my8b2(a8b2), my8b3(a8b3), my8b4(a8b4), my8b5(a8b5), my8b6(a8b6)
 {
-       my32b = a32b;
-       my16b1 = a16b1;
-        my16b2 = a16b2;
-        my16b3 = a16b3;
-        my8b1 = a8b1;
-        my8b2 = a8b2;
-        my8b3 = a8b3;
-        my8b4 = a8b4;
-        my8b5 = a8b5;
-        my8b6 = a8b6;
+       
+       
+        
+        
+        
+        
+        
+        
+        
+        
 }
 
-Standard_GUID::Standard_GUID(const Standard_GUID& aGuid)
+Standard_GUID::Standard_GUID(const Standard_GUID& aGuid) : my32b(aGuid.my32b), my16b1(aGuid.my16b1), my16b2(aGuid.my16b2), my16b3(aGuid.my16b3), my8b1(aGuid.my8b1), my8b2(aGuid.my8b2), my8b3(aGuid.my8b3), my8b4(aGuid.my8b4), my8b5(aGuid.my8b5), my8b6(aGuid.my8b6)
 {
-        my32b  = aGuid.my32b;
-        my16b1 = aGuid.my16b1;
-        my16b2 = aGuid.my16b2;
-        my16b3 = aGuid.my16b3;
-        my8b1  = aGuid.my8b1;
-        my8b2  = aGuid.my8b2;
-        my8b3  = aGuid.my8b3;
-        my8b4  = aGuid.my8b4;
-        my8b5  = aGuid.my8b5;
-        my8b6  = aGuid.my8b6;
+        
+        
+        
+        
+        
+        
+        
+        
+        
+        
 }
 
 Standard_GUID::Standard_GUID (const Standard_UUID& theUUID)
@@ -328,7 +328,7 @@ void Standard_GUID::ToExtString(const Standard_PExtCharacter aStrGuid) const
 
 Standard_UUID Standard_GUID::ToUUID() const
 {
-  Standard_UUID result ;
+  Standard_UUID result{} ;
 
   result.Data1 = my32b ;
   result.Data2 = my16b1 ;
index 148e51116130b9e162316de24c0b03f9f1eb295b..236475b2530f2f8e182e02f2ded84528ad9db26a 100644 (file)
@@ -130,16 +130,16 @@ private:
 
 
 
-  Standard_Integer my32b;
-  Standard_ExtCharacter my16b1;
-  Standard_ExtCharacter my16b2;
-  Standard_ExtCharacter my16b3;
-  Standard_Byte my8b1;
-  Standard_Byte my8b2;
-  Standard_Byte my8b3;
-  Standard_Byte my8b4;
-  Standard_Byte my8b5;
-  Standard_Byte my8b6;
+  Standard_Integer my32b{};
+  Standard_ExtCharacter my16b1{};
+  Standard_ExtCharacter my16b2{};
+  Standard_ExtCharacter my16b3{};
+  Standard_Byte my8b1{};
+  Standard_Byte my8b2{};
+  Standard_Byte my8b3{};
+  Standard_Byte my8b4{};
+  Standard_Byte my8b5{};
+  Standard_Byte my8b6{};
 
 
 };
index e28d94ba23fa96d011a6d0573841cad2728d4790..325504803acdb946086df5c5da4ea57d54ed11f3 100644 (file)
@@ -531,7 +531,7 @@ Standard_Integer Standard_MMgrOpt::Purge(Standard_Boolean )
 
   while (aNextPool) {
     // fill the table of pools
-    Standard_Integer iPool;
+    Standard_Integer iPool = 0;
     for (iPool = 0; aNextPool && iPool < NB_POOLS_WIN; iPool++) {
       aPools[iPool] = aNextPool;
       aFreeSize[iPool] = 0;
@@ -574,7 +574,7 @@ Standard_Integer Standard_MMgrOpt::Purge(Standard_Boolean )
 
     // scan free blocks again, and remove those of them
     // that belong to free pools
-    Standard_Integer j;
+    Standard_Integer j = 0;
     for (i = 0; i <= nCells; i++ ) {
       Standard_Size * aFree = myFreeList[i];
       Standard_Size * aPrevFree = NULL;
index 83ec13944670922f57be9c062f02166e7568c148..ca08f4d4bfb4f29b996d13980b369c241f459caa 100644 (file)
@@ -21,9 +21,9 @@
 //purpose  : 
 //=======================================================================
 
-Standard_MMgrRaw::Standard_MMgrRaw(const Standard_Boolean aClear)
+Standard_MMgrRaw::Standard_MMgrRaw(const Standard_Boolean aClear) : myClear(aClear)
 {
-  myClear = aClear;
+  
 }
 
 //=======================================================================
index 8c7a2df17a6c2762d03400332bd67f60e60b455a..d3f12adb055bd3af184d2192bdd6b7a43c1a62fd 100644 (file)
@@ -33,9 +33,9 @@ using namespace tbb;
 //purpose  : 
 //=======================================================================
 
-Standard_MMgrTBBalloc::Standard_MMgrTBBalloc(const Standard_Boolean aClear)
+Standard_MMgrTBBalloc::Standard_MMgrTBBalloc(const Standard_Boolean aClear) : myClear(aClear)
 {
-  myClear = aClear;
+  
 }
 
 //=======================================================================
index 7197979d4ddf3a665b8e7addf7ddacf8cd6d81c9..d855174741f1b64ef8786c091aebf5618720848e 100644 (file)
@@ -166,7 +166,7 @@ private:
 #if (defined(_WIN32) || defined(__WIN32__))
   CRITICAL_SECTION myMutex;
 #else
-  pthread_mutex_t myMutex;
+  pthread_mutex_t myMutex{};
 #endif  
 };
 
index 0edcc3c366d8379afcda618c0eb5bd3a87b82875..23b02135c39106ba8c4e3ccd13787900e78aaec4 100644 (file)
@@ -75,7 +75,7 @@ public:
   DEFINE_STANDARD_RTTIEXT(Standard_OutOfMemory,Standard_ProgramError)
 
 protected:
-  char myBuffer[1024];
+  char myBuffer[1024]{};
 };
 
 #endif // _Standard_OutOfMemory_HeaderFile
index f43762aeed2e8ea00f4e4a4a5885fef63077db32..c6422073776982c6bee5f44fd372649fe51701d4 100644 (file)
@@ -13,6 +13,7 @@
 // commercial license or contractual agreement.
 
 #include <float.h>
+#include <math.h>
 #include <Standard_Real.hxx>
 #include <Standard_NumericError.hxx>
 #include <Standard_NullValue.hxx>
@@ -34,7 +35,7 @@ Standard_Integer HashCode (const Standard_Real theReal, const Standard_Integer t
   {
     Standard_Real    R;
     Standard_Integer I[2];
-  } U;
+  } U{};
 
   //  U.R = Abs(me); // Treat me = -0.0 ADN 27/11/97
   U.R = theReal;
@@ -78,7 +79,7 @@ inline Standard_Real apx_for_ACosApprox (const Standard_Real x)
 
 Standard_Real ACosApprox (const Standard_Real Value)
 {
-  double XX;
+  double XX = NAN;
   if (Value < 0.) {
     XX = 1.+Value;
     if (XX < RealSmall())
@@ -157,7 +158,7 @@ union RealMap {
 //--------------------------------------------------------------------
 static int HardwareHighBitsOfDouble()
 {
-  RealMap MaxDouble;
+  RealMap MaxDouble{};
   MaxDouble.real = DBL_MAX;
   //=========================================================
   // representation of the max double in IEEE is
@@ -179,7 +180,7 @@ static int HardwareHighBitsOfDouble()
 //--------------------------------------------------------------------
 static int HardwareLowBitsOfDouble()
 {
-  RealMap MaxDouble;
+  RealMap MaxDouble{};
   MaxDouble.real = DBL_MAX;
   //=========================================================
   // representation of the max double in IEEE is
@@ -199,7 +200,7 @@ static int LowBitsOfDouble = HardwareLowBitsOfDouble();
 
 double NextAfter(const double x, const double y)
 {
-  RealMap res;
+  RealMap res{};
 
   res.real=x;
   
index f3c123e13c365ff4e2a5f0748dc9e24f9f0f8c0c..b705c33edc15ba6f9bedd894703d9223f74b8584 100644 (file)
@@ -29,7 +29,7 @@ Standard_Integer HashCode (const Standard_ShortReal theShortReal, const Standard
   {
     Standard_ShortReal R;
     Standard_Integer   I;
-  } U;
+  } U{};
   U.R = theShortReal;
 
   return HashCode (U.I, theUpperBound);
index 018961925668c3d571b2c07f25320ab62e2c4bef..50e7e5c6cafc4b28ecbf03a93997f37eed99a3b7 100644 (file)
@@ -29,6 +29,8 @@
 
 */
 
+#include <math.h>
+
 #include <Standard_CString.hxx>
 
 #define IEEE_8087 1
@@ -1599,10 +1601,10 @@ get_TI(void)
  static Bigint *
 Balloc(int k MTd)
 {
-       int x;
-       Bigint *rv;
+       int x = 0;
+       Bigint *rv = nullptr;
 #ifndef Omit_Private_Memory
-       unsigned int len;
+       unsigned int len = 0;
 #endif
 #ifdef MULTIPLE_THREADS
        ThInfo *TI;
@@ -1677,17 +1679,17 @@ y->wds*sizeof(Long) + 2*sizeof(int))
  static Bigint *
 multadd(Bigint *b, int m, int a MTd)   /* multiply by m and add a */
 {
-       int i, wds;
+       int i = 0, wds = 0;
 #ifdef ULLong
-       ULong *x;
-       ULLong carry, y;
+       ULong *x = nullptr;
+       ULLong carry = 0, y = 0;
 #else
        ULong carry, *x, y;
 #ifdef Pack_32
        ULong xi, z;
 #endif
 #endif
-       Bigint *b1;
+       Bigint *b1 = nullptr;
 
        wds = b->wds;
        x = b->x;
@@ -1729,9 +1731,9 @@ multadd(Bigint *b, int m, int a MTd)      /* multiply by m and add a */
  static Bigint *
 s2b(const char *s, int nd0, int nd, ULong y9, int dplen MTd)
 {
-       Bigint *b;
-       int i, k;
-       Long x, y;
+       Bigint *b = nullptr;
+       int i = 0, k = 0;
+       Long x = 0, y = 0;
 
        x = (nd + 8) / 9;
        for(k = 0, y = 1; x > y; y <<= 1, k++) ;
@@ -1791,7 +1793,7 @@ hi0bits(ULong x)
  static int
 lo0bits(ULong *y)
 {
-       int k;
+       int k = 0;
        ULong x = *y;
 
        if (x & 7) {
@@ -1834,7 +1836,7 @@ lo0bits(ULong *y)
  static Bigint *
 i2b(int i MTd)
 {
-       Bigint *b;
+       Bigint *b = nullptr;
 
        b = Balloc(1 MTa);
        b->x[0] = i;
@@ -1845,12 +1847,12 @@ i2b(int i MTd)
  static Bigint *
 mult(Bigint *a, Bigint *b MTd)
 {
-       Bigint *c;
-       int k, wa, wb, wc;
-       ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
-       ULong y;
+       Bigint *c = nullptr;
+       int k = 0, wa = 0, wb = 0, wc = 0;
+       ULong *x = nullptr, *xa = nullptr, *xae = nullptr, *xb = nullptr, *xbe = nullptr, *xc = nullptr, *xc0 = nullptr;
+       ULong y = 0;
 #ifdef ULLong
-       ULLong carry, z;
+       ULLong carry = 0, z = 0;
 #else
        ULong carry, z;
 #ifdef Pack_32
@@ -1950,11 +1952,11 @@ mult(Bigint *a, Bigint *b MTd)
  static Bigint *
 pow5mult(Bigint *b, int k MTd)
 {
-       Bigint *b1, *p5, *p51;
+       Bigint *b1 = nullptr, *p5 = nullptr, *p51 = nullptr;
 #ifdef MULTIPLE_THREADS
        ThInfo *TI;
 #endif
-       int i;
+       int i = 0;
        static int p05[3] = { 5, 25, 125 };
 
        if ((i = k & 3))
@@ -2017,9 +2019,9 @@ pow5mult(Bigint *b, int k MTd)
  static Bigint *
 lshift(Bigint *b, int k MTd)
 {
-       int i, k1, n, n1;
-       Bigint *b1;
-       ULong *x, *x1, *xe, z;
+       int i = 0, k1 = 0, n = 0, n1 = 0;
+       Bigint *b1 = nullptr;
+       ULong *x = nullptr, *x1 = nullptr, *xe = nullptr, z = 0;
 
 #ifdef Pack_32
        n = k >> 5;
@@ -2072,8 +2074,8 @@ lshift(Bigint *b, int k MTd)
  static int
 cmp(Bigint *a, Bigint *b)
 {
-       ULong *xa, *xa0, *xb, *xb0;
-       int i, j;
+       ULong *xa = nullptr, *xa0 = nullptr, *xb = nullptr, *xb0 = nullptr;
+       int i = 0, j = 0;
 
        i = a->wds;
        j = b->wds;
@@ -2101,11 +2103,11 @@ cmp(Bigint *a, Bigint *b)
  static Bigint *
 diff(Bigint *a, Bigint *b MTd)
 {
-       Bigint *c;
-       int i, wa, wb;
-       ULong *xa, *xae, *xb, *xbe, *xc;
+       Bigint *c = nullptr;
+       int i = 0, wa = 0, wb = 0;
+       ULong *xa = nullptr, *xae = nullptr, *xb = nullptr, *xbe = nullptr, *xc = nullptr;
 #ifdef ULLong
-       ULLong borrow, y;
+       ULLong borrow = 0, y = 0;
 #else
        ULong borrow, y;
 #ifdef Pack_32
@@ -2190,7 +2192,7 @@ diff(Bigint *a, Bigint *b MTd)
  static double
 ulp(U *x)
 {
-       Long L;
+       Long L = 0;
        U u;
 
        L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
@@ -2227,8 +2229,8 @@ ulp(U *x)
  static double
 b2d(Bigint *a, int *e)
 {
-       ULong *xa, *xa0, w, y, z;
-       int k;
+       ULong *xa = nullptr, *xa0 = nullptr, w = 0, y = 0, z = 0;
+       int k = 0;
        U d;
 #ifdef VAX
        ULong d0, d1;
@@ -2292,11 +2294,11 @@ b2d(Bigint *a, int *e)
  static Bigint *
 d2b(U *d, int *e, int *bits MTd)
 {
-       Bigint *b;
-       int de, k;
-       ULong *x, y, z;
+       Bigint *b = nullptr;
+       int de = 0, k = 0;
+       ULong *x = nullptr, y = 0, z = 0;
 #ifndef Sudden_Underflow
-       int i;
+       int i = 0;
 #endif
 #ifdef VAX
        ULong d0, d1;
@@ -2422,7 +2424,7 @@ d2b(U *d, int *e, int *bits MTd)
 ratio(Bigint *a, Bigint *b)
 {
        U da, db;
-       int k, ka, kb;
+       int k = 0, ka = 0, kb = 0;
 
        dval(&da) = b2d(a, &ka);
        dval(&db) = b2d(b, &kb);
@@ -2560,7 +2562,7 @@ static unsigned char hexdig[256] = {
  static int
 match(const char **sp, const char *t)
 {
-       int c, d;
+       int c = 0, d = 0;
        const char *s = *sp;
 
        while((d = *t++)) {
@@ -2577,9 +2579,9 @@ match(const char **sp, const char *t)
  static void
 hexnan(U *rvp, const char **sp)
 {
-       ULong c, x[2];
-       const char *s;
-       int c1, havedig, udx0, xshift;
+       ULong c = 0, x[2];
+       const char *s = nullptr;
+       int c1 = 0, havedig = 0, udx0 = 0, xshift = 0;
 
        /**** if (!hexdig['0']) hexdig_init(); ****/
        x[0] = x[1] = 0;
@@ -2651,8 +2653,8 @@ hexnan(U *rvp, const char **sp)
  static Bigint *
 increment(Bigint *b MTd)
 {
-       ULong *x, *xe;
-       Bigint *b1;
+       ULong *x = nullptr, *xe = nullptr;
+       Bigint *b1 = nullptr;
 
        x = b->x;
        xe = x + b->wds;
@@ -2682,8 +2684,8 @@ increment(Bigint *b MTd)
  static void
 rshift(Bigint *b, int k)
 {
-       ULong *x, *x1, *xe, y;
-       int n;
+       ULong *x = nullptr, *x1 = nullptr, *xe = nullptr, y = 0;
+       int n = 0;
 
        x = x1 = b->x;
        n = k >> kshift;
@@ -2711,8 +2713,8 @@ rshift(Bigint *b, int k)
  static ULong
 any_on(Bigint *b, int k)
 {
-       int n, nwds;
-       ULong *x, *x0, x1, x2;
+       int n = 0, nwds = 0;
+       ULong *x = nullptr, *x0 = nullptr, x1 = 0, x2 = 0;
 
        x = b->x;
        nwds = b->wds;
@@ -2744,11 +2746,11 @@ enum {  /* rounding values: same as FLT_ROUNDS */
  void
 gethex( const char **sp, U *rvp, int rounding, int sign MTd)
 {
-       Bigint *b;
-       const unsigned char *decpt, *s0, *s, *s1;
-       Long e, e1;
-       ULong L, lostbits, *x;
-       int big, denorm, esign, havedig, k, n, nbits, up, zret;
+       Bigint *b = nullptr;
+       const unsigned char *decpt = nullptr, *s0 = nullptr, *s = nullptr, *s1 = nullptr;
+       Long e = 0, e1 = 0;
+       ULong L = 0, lostbits = 0, *x = nullptr;
+       int big = 0, denorm = 0, esign = 0, havedig = 0, k = 0, n = 0, nbits = 0, up = 0, zret = 0;
 #ifdef IBM
        int j;
 #endif
@@ -3118,10 +3120,10 @@ dshift(Bigint *b, int p2)
  static int
 quorem(Bigint *b, Bigint *S)
 {
-       int n;
-       ULong *bx, *bxe, q, *sx, *sxe;
+       int n = 0;
+       ULong *bx = nullptr, *bxe = nullptr, q = 0, *sx = nullptr, *sxe = nullptr;
 #ifdef ULLong
-       ULLong borrow, carry, y, ys;
+       ULLong borrow = 0, carry = 0, y = 0, ys = 0;
 #else
        ULong borrow, carry, y, ys;
 #ifdef Pack_32
@@ -3239,8 +3241,8 @@ quorem(Bigint *b, Bigint *S)
 sulp(U *x, BCinfo *bc)
 {
        U u;
-       double rv;
-       int i;
+       double rv = NAN;
+       int i = 0;
 
        rv = ulp(x);
        if (!bc->scale || (i = 2*P + 1 - ((word0(x) & Exp_mask) >> Exp_shift)) <= 0)
@@ -3255,8 +3257,8 @@ sulp(U *x, BCinfo *bc)
  static void
 bigcomp(U *rv, const char *s0, BCinfo *bc MTd)
 {
-       Bigint *b, *d;
-       int b2, bbits, d2, dd=0, dig, dsign, i, j, nd, nd0, p2, p5, speccase;
+       Bigint *b = nullptr, *d = nullptr;
+       int b2 = 0, bbits = 0, d2 = 0, dd=0, dig = 0, dsign = 0, i = 0, j = 0, nd = 0, nd0 = 0, p2 = 0, p5 = 0, speccase = 0;
 
        dsign = bc->dsign;
        nd = bc->nd;
@@ -3458,22 +3460,22 @@ retlow1:
  double
 Strtod(const char *s00, char **se)
 {
-       int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, e, e1;
-       int esign, i, j, k, nd, nd0, nf, nz, nz0, nz1, sign;
-       const char *s, *s0, *s1;
-       double aadj, aadj1;
-       Long L;
+       int bb2 = 0, bb5 = 0, bbe = 0, bd2 = 0, bd5 = 0, bbbits = 0, bs2 = 0, c = 0, e = 0, e1 = 0;
+       int esign = 0, i = 0, j = 0, k = 0, nd = 0, nd0 = 0, nf = 0, nz = 0, nz0 = 0, nz1 = 0, sign = 0;
+       const char *s = nullptr, *s0 = nullptr, *s1 = nullptr;
+       double aadj = NAN, aadj1 = NAN;
+       Long L = 0;
        U aadj2, adj, rv, rv0;
-       ULong y, z;
+       ULong y = 0, z = 0;
        BCinfo bc;
        Bigint *bb=0, *bb1=0, *bd=0, *bd0=0, *bs=0, *delta=0;
 #ifdef USE_BF96
-       ULLong bhi, blo, brv, t00, t01, t02, t10, t11, terv, tg, tlo, yz;
-       const BF96 *p10;
-       int bexact, erv;
+       ULLong bhi = 0, blo = 0, brv = 0, t00 = 0, t01 = 0, t02 = 0, t10 = 0, t11 = 0, terv = 0, tg = 0, tlo = 0, yz = 0;
+       const BF96 *p10 = nullptr;
+       int bexact = 0, erv = 0;
 #endif
 #ifdef Avoid_Underflow
-       ULong Lsb, Lsb1;
+       ULong Lsb = 0, Lsb1 = 0;
 #endif
 #ifdef SET_INEXACT
        int oldinexact;
index cde1d4ec4d8a5b007a8dfc3994f39ca76666d5e2..a2da424787b8919b3334acd916044772fce1b7ce 100644 (file)
@@ -17,6 +17,8 @@
 // Great zoom leads to non-coincidence of
 // a point and non-infinite lines passing through this point:
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <gp_Circ.hxx>
 #include <gp_Dir.hxx>
@@ -84,7 +86,7 @@ static void FindLimits(const Adaptor3d_Curve& aCurve,
 // purpose:
 //==================================================================
 static void DrawCurve (const Adaptor3d_Curve&        aCurve,
-                       const Handle(Graphic3d_Group) aGroup,
+                       const Handle(Graphic3d_Group)& aGroup,
                        const Standard_Integer        NbP,
                        const Standard_Real           U1,
                        const Standard_Real           U2,
@@ -153,7 +155,7 @@ static Standard_Boolean MatchCurve (
                       const Standard_Real    U1,
                       const Standard_Real    U2)
 {
-  Standard_Real retdist;
+  Standard_Real retdist = NAN;
   switch (aCurve.GetType())
   {
     case GeomAbs_Line:
@@ -219,7 +221,7 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
 {
   aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
 
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2);
 
   const Standard_Integer NbPoints =  aDrawer->Discretisation();
@@ -247,7 +249,7 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
                         TColgp_SequenceOfPnt&              Points,
                         const Standard_Boolean             drawCurve)
 {
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2);
 
   const Standard_Integer NbPoints =  aDrawer->Discretisation();
@@ -315,7 +317,7 @@ Standard_Boolean StdPrs_Curve::Match
                       const Adaptor3d_Curve&       aCurve,
                       const Handle (Prs3d_Drawer)& aDrawer)
 {
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2);
 
   const Standard_Integer NbPoints = aDrawer->Discretisation();
@@ -339,7 +341,7 @@ Standard_Boolean StdPrs_Curve::Match
                       const Standard_Real    aLimit,
                       const Standard_Integer NbPoints)
 {
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   FindLimits(aCurve, aLimit, V1, V2);
 
   return MatchCurve(X,Y,Z,aDistance,aCurve,
index 4b16d010a4564c0df8814910a7f592047f1b873a..c0be98f4d6f075041fa3cac2294fb131a5d1af76 100644 (file)
@@ -15,6 +15,8 @@
 // Great zoom leads to non-coincidence of
 // a point and non-infinite lines passing through this point:
 
+#include <math.h>
+
 #include <BndLib_Add3dCurve.hxx>
 #include <GCPnts_TangentialDeflection.hxx>
 #include <gp_Circ.hxx>
@@ -42,14 +44,14 @@ static Standard_Real GetDeflection(const Adaptor3d_Curve&        aCurve,
                                    const Standard_Real         U2, 
                                    const Handle(Prs3d_Drawer)& aDrawer)
 {
-  Standard_Real TheDeflection;
+  Standard_Real TheDeflection = NAN;
 
   if (aDrawer->TypeOfDeflection() == Aspect_TOD_RELATIVE)
   {
     // On calcule la fleche en fonction des min max globaux de la piece:
     Bnd_Box Total;
     BndLib_Add3dCurve::Add(aCurve, U1, U2, 0.,Total);
-    Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+    Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN;
     Total.Get( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );
     Standard_Real m = RealLast();
     if ( ! (Total.IsOpenXmin() || Total.IsOpenXmax() ))
@@ -156,8 +158,8 @@ static void drawCurve (Adaptor3d_Curve&              aCurve,
       TColStd_Array1OfReal T(1, nbinter+1);
       aCurve.Intervals(T, GeomAbs_C1);
 
-      Standard_Real theU1, theU2;
-      Standard_Integer NumberOfPoints, i, j;
+      Standard_Real theU1 = NAN, theU2 = NAN;
+      Standard_Integer NumberOfPoints = 0, i = 0, j = 0;
       TColgp_SequenceOfPnt SeqP;
 
       for (j = 1; j <= nbinter; j++) {
@@ -212,7 +214,7 @@ static Standard_Boolean MatchCurve (
                       const Standard_Real   U1,
                       const Standard_Real   U2)
 {
-  Standard_Real retdist;
+  Standard_Real retdist = NAN;
   switch (aCurve.GetType())
   {
     case GeomAbs_Line:
@@ -288,7 +290,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
     aGroup->SetPrimitivesAspect (aDrawer->LineAspect()->Aspect());
   }
 
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   if (FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2))
   {
     TColgp_SequenceOfPnt Points;
@@ -392,7 +394,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
                                   const Standard_Real                anAngle,
                                   const Standard_Boolean theToDrawCurve)
 {
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   if (!FindLimits(aCurve, aLimit, V1, V2))
   {
     return;
@@ -420,7 +422,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
                                   TColgp_SequenceOfPnt&              Points,
                                   const Standard_Boolean theToDrawCurve)
 {
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   if (!FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2))
   {
     return;
@@ -447,7 +449,7 @@ Standard_Boolean StdPrs_DeflectionCurve::Match
                       const Adaptor3d_Curve&         aCurve,
                       const Handle (Prs3d_Drawer)& aDrawer) 
 {
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   if (FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2))
   {
     return MatchCurve(X,Y,Z,aDistance,aCurve,
@@ -515,7 +517,7 @@ Standard_Boolean StdPrs_DeflectionCurve::Match
                           const Standard_Real   aLimit,
                           const Standard_Real   anAngle)
 {
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   if (FindLimits(aCurve, aLimit, V1, V2))
   {
     return MatchCurve(X,Y,Z,aDistance,aCurve,aDeflection,anAngle,V1,V2);
index ef2de23a70dc2ae8f576399e9a53b5803da31adc..e99594d3135a61cc094b433e4c53e9fef6e73d6d 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <StdPrs_HLRPolyShape.hxx>
 
 #include <BRepMesh_IncrementalMesh.hxx>
@@ -75,12 +77,12 @@ void StdPrs_HLRPolyShape::ComputeHLR (const Handle(Prs3d_Presentation)& aPresent
   Handle(HLRBRep_PolyAlgo) hider = new HLRBRep_PolyAlgo(aShape);
   hider->Projector (aProj);
   hider->Update();
-  Standard_Real sta,end,dx,dy,dz;
-  Standard_ShortReal tolsta, tolend;
+  Standard_Real sta = NAN,end = NAN,dx = NAN,dy = NAN,dz = NAN;
+  Standard_ShortReal tolsta = NAN, tolend = NAN;
   HLRAlgo_EdgeStatus status;
   HLRAlgo_EdgeIterator It;
-  Standard_Boolean reg1,regn,outl, intl;
-  Standard_Address Coordinates;
+  Standard_Boolean reg1 = 0,regn = 0,outl = 0, intl = 0;
+  Standard_Address Coordinates = nullptr;
   TopoDS_Shape S;
 
   HLRBRep_ListOfBPoint BiPntVis, BiPntHid;
old mode 100755 (executable)
new mode 100644 (file)
index 8c10e81..3ea9e7e
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <StdPrs_HLRShape.hxx>
 
 #include <BRepAdaptor_Curve.hxx>
@@ -43,8 +45,8 @@ void StdPrs_HLRShape::ComputeHLR (const Handle(Prs3d_Presentation)& thePresentat
 
   StdPrs_HLRToolShape aTool(theShape, aProj);
   Standard_Integer aNbEdges = aTool.NbEdges();
-  Standard_Integer anI;
-  Standard_Real anU1, anU2;
+  Standard_Integer anI = 0;
+  Standard_Real anU1 = NAN, anU2 = NAN;
   BRepAdaptor_Curve aCurve;
   Standard_Real aDeviation = theDrawer->MaximalChordialDeviation();
   Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
index be3b1a47d058beeed32d87f4574987817d123e38..f89929c5aab9d278eafad9636e652dc8d87c2531 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <HLRBRep_Algo.hxx>
 #include <HLRBRep_Data.hxx>
 #include <StdPrs_HLRToolShape.hxx>
@@ -20,7 +22,7 @@
 
 StdPrs_HLRToolShape::StdPrs_HLRToolShape (
                  const TopoDS_Shape& TheShape,
-                  const HLRAlgo_Projector& TheProjector)
+                  const HLRAlgo_Projector& TheProjector) : MyCurrentEdgeNumber(0)
 {
   Handle(HLRBRep_Algo) Hider = new HLRBRep_Algo();
   Standard_Integer nbIso = 0; // 5;
@@ -29,7 +31,7 @@ StdPrs_HLRToolShape::StdPrs_HLRToolShape (
   Hider->Update();
   Hider->Hide();
   MyData = Hider->DataStructure();
-  MyCurrentEdgeNumber = 0;
+  
 }
 
 Standard_Integer StdPrs_HLRToolShape::NbEdges() const {
@@ -54,7 +56,7 @@ void StdPrs_HLRToolShape::Visible(BRepAdaptor_Curve& TheEdge,
     .ChangeValue(MyCurrentEdgeNumber)
       .ChangeGeometry()
        .Curve();
-  Standard_ShortReal t1,t2;
+  Standard_ShortReal t1 = NAN,t2 = NAN;
   myEdgeIterator.Visible(U1,t1,U2,t2);
 }
 void StdPrs_HLRToolShape::InitHidden(const Standard_Integer EdgeNumber) {
@@ -76,6 +78,6 @@ void StdPrs_HLRToolShape::Hidden (BRepAdaptor_Curve& TheEdge,
     .ChangeValue(MyCurrentEdgeNumber)
       .ChangeGeometry()
        .Curve();
-  Standard_ShortReal t1,t2;
+  Standard_ShortReal t1 = NAN,t2 = NAN;
   myEdgeIterator.Hidden(U1,t1,U2,t2);
 }
index ca64927abd1cb53dac1dbc97d138a4ecb7935333..58748f70aecbba2755b54fcff77cebc3e43149f4 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <StdPrs_Isolines.hxx>
 
 #include <Adaptor3d_IsoCurve.hxx>
@@ -199,7 +201,7 @@ void StdPrs_Isolines::AddOnTriangulation (const TopoDS_Face&          theFace,
   const Handle(Standard_Type)& TheType = aSurface->DynamicType();
   if (TheType == STANDARD_TYPE(Geom_OffsetSurface))
   {
-    Standard_Real u1, u2, v1, v2;
+    Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
     aSurface->Bounds(u1, u2, v1, v2);
     //Isolines of Offset surfaces are calculated by approximation and
     //cannot be calculated for infinite limits.
index 40d1bcc7a57d357105118f01276275292ba905b8..5f8823846ab592f48aa2310b15c0504271f9022c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <Geom_Plane.hxx>
 #include <gp_Dir.hxx>
@@ -40,7 +42,7 @@ void StdPrs_Plane::Add (const Handle (Prs3d_Presentation)& aPresentation,
   Handle(Prs3d_PlaneAspect) theaspect = aDrawer->PlaneAspect();
 
   gp_Pnt p1;
-  Standard_Real Xmax,Ymax;
+  Standard_Real Xmax = NAN,Ymax = NAN;
   Xmax = 0.5*Standard_Real(theaspect->PlaneXLength());
   Ymax = 0.5*Standard_Real(theaspect->PlaneYLength());
   if (theaspect->DisplayEdges()) {
@@ -61,7 +63,7 @@ void StdPrs_Plane::Add (const Handle (Prs3d_Presentation)& aPresentation,
     const Standard_Integer nbx = Standard_Integer(Abs(2.*Xmax) / dist) - 1;
     const Standard_Integer nby = Standard_Integer(Abs(2.*Ymax) / dist) - 1;
     Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2*(nbx+nby));
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real cur = -Xmax+dist;
     for (i = 0; i < nbx; i++, cur += dist) {
       aPrims->AddVertex(thegeom->Value(cur, Ymax));
index 787ef66dd5be18e06f749a33f0d33bd2a27efefa..e96a863e7ffd5d58b777e28e21bbbde5487921b6 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <Geom_BezierCurve.hxx>
 #include <Geom_BSplineCurve.hxx>
@@ -42,7 +44,7 @@ void StdPrs_PoleCurve::Add (const Handle (Prs3d_Presentation)& aPresentation,
 
   GeomAbs_CurveType CType = aCurve.GetType();
   if (CType == GeomAbs_BezierCurve || CType == GeomAbs_BSplineCurve) {
-    Standard_Integer i, Nb;
+    Standard_Integer i = 0, Nb = 0;
     if (CType == GeomAbs_BezierCurve) {
       Handle(Geom_BezierCurve) Bz = aCurve.Bezier();
       Nb = Bz->NbPoles();
@@ -87,8 +89,8 @@ Standard_Boolean StdPrs_PoleCurve::Match(const Standard_Real        X,
                                         const Handle (Prs3d_Drawer)& /*aDrawer*/) 
 {
   GeomAbs_CurveType CType = aCurve.GetType();
-  Standard_Integer i, Nb = 0;
-  Standard_Real x,y,z;
+  Standard_Integer i = 0, Nb = 0;
+  Standard_Real x = NAN,y = NAN,z = NAN;
   if (CType == GeomAbs_BezierCurve) {
     Handle(Geom_BezierCurve) Bz = aCurve.Bezier();
     Nb = Bz->NbPoles();
@@ -123,9 +125,9 @@ Standard_Integer StdPrs_PoleCurve::Pick
              const Adaptor3d_Curve&        aCurve,
              const Handle(Prs3d_Drawer)& /*aDrawer*/) 
 {
-  Standard_Real x, y, z, DistMin = RealLast();
-  Standard_Integer num = 0, i, Nb = 0;
-  Standard_Real dist;
+  Standard_Real x = NAN, y = NAN, z = NAN, DistMin = RealLast();
+  Standard_Integer num = 0, i = 0, Nb = 0;
+  Standard_Real dist = NAN;
   GeomAbs_CurveType CType = aCurve.GetType();
 
   if (CType == GeomAbs_BezierCurve) {
index ab0e9dddcb3183cc7f7ee80c61c25b80b5f534ef..92f9a62be7ea9e0c8be75cc8f3fca75701554cc8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Surface.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Vec.hxx>
@@ -52,7 +54,7 @@ void StdPrs_ShadedSurface::Add (const Handle(Prs3d_Presentation)& thePrs,
   theSurface.UIntervals (anInterU, GeomAbs_C1);
   theSurface.VIntervals (anInterV, GeomAbs_C1);
 
-  Standard_Real U1, U2, V1, V2, DU, DV;
+  Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN, DU = NAN, DV = NAN;
 
   gp_Pnt P1, P2;
   gp_Vec D1U, D1V, D1, D2;
index 6411fd6d64baeadcc968f35ba26a8d61e672dfe3..abf21db1aec0eee7e112545f0a7a91225753e69e 100644 (file)
@@ -99,8 +99,8 @@ private:
   TopExp_Explorer myFaceExplorer;
   TopTools_IndexedDataMapOfShapeListOfShape myEdgeMap;
   TopTools_IndexedMapOfShape myVertexMap;
-  Standard_Integer myEdge;
-  Standard_Integer myVertex;
+  Standard_Integer myEdge{};
+  Standard_Integer myVertex{};
 
 };
 
index 4f40be4844172cb5c62aa0556ab7ea9b11ec2839..db68055bf61a5460f7d294e70e5265b655528751 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <StdPrs_ToolRFace.hxx>
 
 #include <BRep_Tool.hxx>
@@ -53,7 +55,7 @@ const TopoDS_Edge& StdPrs_ToolRFace::Edge() const
 //=======================================================================
 void StdPrs_ToolRFace::next()
 {
-  Standard_Real aParamU1, aParamU2;
+  Standard_Real aParamU1 = NAN, aParamU2 = NAN;
   for (; myExplorer.More(); myExplorer.Next())
   {
     // skip INTERNAL and EXTERNAL edges
index 4cbe46d26c459562ad09ffd23a80b2bed1a8e818..8aceae538a033cc597d9667f8c539325493d0912 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_IsoCurve.hxx>
 #include <Bnd_Box2d.hxx>
 #include <GCPnts_QuasiUniformDeflection.hxx>
@@ -123,7 +125,7 @@ void StdPrs_WFDeflectionRestrictedFace::Add
 
   // update min max for the hatcher.
   gp_Pnt2d P1,P2;
-  Standard_Real U1, U2;
+  Standard_Real U1 = NAN, U2 = NAN;
   gp_Pnt dummypnt;
   Standard_Real ddefle= Max(UMax-UMin, VMax-VMin) * aDrawer->DeviationCoefficient();
   TColgp_SequenceOfPnt2d tabP;
@@ -401,9 +403,9 @@ Standard_Boolean StdPrs_WFDeflectionRestrictedFace::Match
    const Standard_Real aLimit = aDrawer->MaximalParameterValue();
 
   // compute bounds of the restriction
-  Standard_Real UMin,UMax,VMin,VMax;
-  Standard_Real u,v,step;
-  Standard_Integer i,nbPoints = 10;
+  Standard_Real UMin = NAN,UMax = NAN,VMin = NAN,VMax = NAN;
+  Standard_Real u = NAN,v = NAN,step = NAN;
+  Standard_Integer i = 0,nbPoints = 10;
   UMin = VMin = RealLast();
   UMax = VMax = RealFirst();
   
index e0631123717905c936f7908bb4d617e86f7b763b..9ae64697bf212cd59f53c27c9948a198803f5406 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_IsoCurve.hxx>
 #include <BndLib_AddSurface.hxx>
 #include <GeomAbs_IsoType.hxx>
@@ -43,7 +45,7 @@ static void FindLimits(const Handle(Adaptor3d_Surface)& surf ,
   
   if (UfirstInf || UlastInf) {
     gp_Pnt P1,P2;
-    Standard_Real v;
+    Standard_Real v = NAN;
     if (VfirstInf && VlastInf) 
       v = 0;
     else if (VfirstInf)
@@ -130,14 +132,14 @@ void StdPrs_WFDeflectionSurface::Add (
                              const Handle(Adaptor3d_Surface)&    aSurface,
                              const Handle (Prs3d_Drawer)&       aDrawer)
 {
-    Standard_Real  U1, U2, V1, V2;
+    Standard_Real  U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
     Standard_Real MaxP = aDrawer->MaximalParameterValue();
     FindLimits(aSurface, MaxP, U1, U2, V1, V2);
     
     Standard_Boolean UClosed = aSurface->IsUClosed();
     Standard_Boolean VClosed = aSurface->IsVClosed();
       
-    Standard_Real TheDeflection;
+    Standard_Real TheDeflection = NAN;
     Aspect_TypeOfDeflection TOD = aDrawer->TypeOfDeflection();    
     if (TOD == Aspect_TOD_RELATIVE) {
 // On calcule la fleche en fonction des min max globaux de la piece:
@@ -145,7 +147,7 @@ void StdPrs_WFDeflectionSurface::Add (
        BndLib_AddSurface::Add (*aSurface, U1, U2, V1, V2, 0., Total);
        Standard_Real m = aDrawer->MaximalChordialDeviation()/
         aDrawer->DeviationCoefficient();
-       Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+       Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN;
        Total.Get( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );
        if ( ! (Total.IsOpenXmin() || Total.IsOpenXmax() ))
          m = Min ( m , Abs (aXmax-aXmin));
index 1a180a26d17398963f56cef21b036b93bad373d5..7ffe8769344c5f62d02899ca8b44686a19ccfbc2 100644 (file)
@@ -28,7 +28,7 @@ static void AddPoles(const Handle (Prs3d_Presentation)& aPresentation,
                      const TColgp_Array2OfPnt&          A,
                      const Handle (Prs3d_Drawer)&       aDrawer)
 {
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   const Standard_Integer n = A.ColLength();
   const Standard_Integer m = A.RowLength();
 
@@ -64,7 +64,7 @@ void StdPrs_WFPoleSurface::Add (const Handle (Prs3d_Presentation)& aPresentation
 
   GeomAbs_SurfaceType SType = aSurface.GetType();
   if (SType == GeomAbs_BezierSurface || SType == GeomAbs_BSplineSurface) {
-    Standard_Integer n , m;
+    Standard_Integer n = 0 , m = 0;
     if (SType == GeomAbs_BezierSurface) {
       Handle(Geom_BezierSurface) B = aSurface.Bezier();
       n = aSurface.NbUPoles();
old mode 100755 (executable)
new mode 100644 (file)
index 52f176c..d74dcec
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <Hatch_Hatcher.hxx>
 #include <Graphic3d_Group.hxx>
 #include <Prs3d_IsoAspect.hxx>
@@ -46,8 +48,8 @@ void StdPrs_WFRestrictedFace::Add
   StdPrs_ToolRFace aToolRst (theFace);
 
   // Compute bounds of the restriction
-  Standard_Real aUMin,aUMax,aVMin,aVMax;
-  Standard_Integer anI;
+  Standard_Real aUMin = NAN,aUMax = NAN,aVMin = NAN,aVMax = NAN;
+  Standard_Integer anI = 0;
   gp_Pnt2d aPoint1,aPoint2;
   Bnd_Box2d aBndBox;
 
@@ -109,7 +111,7 @@ void StdPrs_WFRestrictedFace::Add
   }
 
   // Trim the isos
-  Standard_Real anU1, anU2, anU, aDU;
+  Standard_Real anU1 = NAN, anU2 = NAN, anU = NAN, aDU = NAN;
 
   for (aToolRst.Init(); aToolRst.More(); aToolRst.Next())
   {
@@ -229,9 +231,9 @@ Standard_Boolean StdPrs_WFRestrictedFace::Match
   StdPrs_ToolRFace aToolRst (theFace);
 
   // Compute bounds of the restriction
-  Standard_Real anUMin,anUMax,aVMin,aVMax;
-  Standard_Real anU,aV,aStep;
-  Standard_Integer anI,anNbP = 10;
+  Standard_Real anUMin = NAN,anUMax = NAN,aVMin = NAN,aVMax = NAN;
+  Standard_Real anU = NAN,aV = NAN,aStep = NAN;
+  Standard_Integer anI = 0,anNbP = 10;
   anUMin = aVMin = RealLast();
   anUMax = aVMax = RealFirst();
   gp_Pnt2d aPoint1,aPoint2;
@@ -309,7 +311,7 @@ Standard_Boolean StdPrs_WFRestrictedFace::Match
   }
 
   // Trim the isos
-  Standard_Real anU1, anU2, aDU;
+  Standard_Real anU1 = NAN, anU2 = NAN, aDU = NAN;
 
   for (aToolRst.Init(); aToolRst.More(); aToolRst.Next())
   {
index d69d2fcfb0eb39bd68697757dcc470e688faecca..df375dd669f8eecf94da1a847e26247e41c9fe9c 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_IsoCurve.hxx>
 #include <GeomAbs_IsoType.hxx>
 #include <Graphic3d_ArrayOfPolylines.hxx>
@@ -45,7 +47,7 @@ static void FindLimits(const Handle(Adaptor3d_Surface)& surf ,
   
   if (UfirstInf || UlastInf) {
     gp_Pnt P1,P2;
-    Standard_Real v;
+    Standard_Real v = NAN;
     if (VfirstInf && VlastInf) 
       v = 0;
     else if (VfirstInf)
@@ -129,7 +131,7 @@ void StdPrs_WFSurface::Add (const Handle(Prs3d_Presentation)& aPresentation,
                            const Handle(Prs3d_Drawer)&       aDrawer)
 {
   
-    Standard_Real  U1, U2, V1, V2;
+    Standard_Real  U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
     Standard_Real MaxP = aDrawer->MaximalParameterValue();
 
     FindLimits(aSurface, MaxP, U1, U2, V1, V2);
index 07b5a96543ffe528a78104206805823dd05f2094..93e932dc32d1b9809aeae652d9c582f4cc613788 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <StdSelect_BRepSelectionTool.hxx>
 
 #include <BRep_Tool.hxx>
@@ -503,8 +505,8 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
         Standard_Integer aNbIntervals = cu3d.NbIntervals (GeomAbs_C1);
         TColStd_Array1OfReal anIntervals (1, aNbIntervals + 1);
         cu3d.Intervals (anIntervals, GeomAbs_C1);
-        Standard_Real aV1, aV2;
-        Standard_Integer aNumberOfPoints;
+        Standard_Real aV1 = NAN, aV2 = NAN;
+        Standard_Integer aNumberOfPoints = 0;
         TColgp_SequenceOfPnt aPointsSeq;
         for (Standard_Integer anIntervalId = 1; anIntervalId <= aNbIntervals; ++anIntervalId)
         {
@@ -546,7 +548,7 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
         nbintervals = Max (1, nbintervals / 3);
       }
 
-      Standard_Real aParam;
+      Standard_Real aParam = NAN;
       Standard_Integer aPntNb = Max (2, theNbPOnEdge * nbintervals);
       Standard_Real aParamDelta = (aParamLast - aParamFirst) / (aPntNb - 1);
       Handle(TColgp_HArray1OfPnt) aPointArray = new TColgp_HArray1OfPnt (1, aPntNb);
@@ -668,7 +670,7 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_
         gp_Trsf aTrsf;
         aTrsf.SetTransformation (aCone.Position(), gp::XOY());
 
-        Standard_Real aRad2;
+        Standard_Real aRad2 = NAN;
         if (aRad1 == 0.0)
         {
           aRad2 = Tan (aCone.SemiAngle()) * aHeight;
index c189307ce5812d21adfebdbc2d8fa227cbbd2484..e00718b1d38b347213f5a8f21fec66191399c456 100644 (file)
@@ -597,7 +597,7 @@ Handle(StepFEA_HSequenceOfElementRepresentation) StepAP209_Construct::GetFeaElem
     aSequence = new StepFEA_HSequenceOfElementRepresentation;
   
   for (; anIter.More(); anIter.Next()) {
-    Handle(Standard_Transient) anEntity = anIter.Value();
+    const Handle(Standard_Transient)& anEntity = anIter.Value();
     if(anEntity->IsKind(theType)) {
       Handle(StepFEA_ElementRepresentation) anElement =
         Handle(StepFEA_ElementRepresentation)::DownCast(anEntity);
index bd3ed79acef69a20d30b4ad875089681f2f33f3a..aef6e6b1256a79ff4aa8f78e0aae4243033bd584 100644 (file)
@@ -26,9 +26,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_Action,Standard_Transient)
 //function : StepBasic_Action
 //purpose  : 
 //=======================================================================
-StepBasic_Action::StepBasic_Action ()
+StepBasic_Action::StepBasic_Action () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 01a8d4e0a450d13f07952b621ea14914d9e556d3..7ff1bfcd36fbc673c55cb74936366f4579b4e6e1 100644 (file)
@@ -25,9 +25,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ActionMethod,Standard_Transient)
 //function : StepBasic_ActionMethod
 //purpose  : 
 //=======================================================================
-StepBasic_ActionMethod::StepBasic_ActionMethod ()
+StepBasic_ActionMethod::StepBasic_ActionMethod () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 2cf4b6d6532d14abc96ccca89ecdaec7e8955363..0eb7a4b2b653572a28f0a9beb2f587cc8eb57892 100644 (file)
@@ -161,18 +161,18 @@ private:
   Handle(TCollection_HAsciiString) telephoneNumber;
   Handle(TCollection_HAsciiString) electronicMailAddress;
   Handle(TCollection_HAsciiString) telexNumber;
-  Standard_Boolean hasInternalLocation;
-  Standard_Boolean hasStreetNumber;
-  Standard_Boolean hasStreet;
-  Standard_Boolean hasPostalBox;
-  Standard_Boolean hasTown;
-  Standard_Boolean hasRegion;
-  Standard_Boolean hasPostalCode;
-  Standard_Boolean hasCountry;
-  Standard_Boolean hasFacsimileNumber;
-  Standard_Boolean hasTelephoneNumber;
-  Standard_Boolean hasElectronicMailAddress;
-  Standard_Boolean hasTelexNumber;
+  Standard_Boolean hasInternalLocation{};
+  Standard_Boolean hasStreetNumber{};
+  Standard_Boolean hasStreet{};
+  Standard_Boolean hasPostalBox{};
+  Standard_Boolean hasTown{};
+  Standard_Boolean hasRegion{};
+  Standard_Boolean hasPostalCode{};
+  Standard_Boolean hasCountry{};
+  Standard_Boolean hasFacsimileNumber{};
+  Standard_Boolean hasTelephoneNumber{};
+  Standard_Boolean hasElectronicMailAddress{};
+  Standard_Boolean hasTelexNumber{};
 
 
 };
index 296d5e3bc76d351be1f7b8804a1b5bc67cec8e2c..92f73d04fd8a8ccdd5be269a1e1448d283e4bf40 100644 (file)
@@ -76,7 +76,7 @@ private:
 
   Handle(TCollection_HAsciiString) status;
   Handle(TCollection_HAsciiString) applicationInterpretedModelSchemaName;
-  Standard_Integer applicationProtocolYear;
+  Standard_Integer applicationProtocolYear{};
   Handle(StepBasic_ApplicationContext) application;
 
 
index 5c347f4162a85fafd8e59778055de8ea8c106a89..660a5ade3d7f01b4a18a2cb947afd141ba6a583a 100644 (file)
@@ -60,8 +60,8 @@ protected:
 private:
 
 
-  Standard_Integer dayComponent;
-  Standard_Integer monthComponent;
+  Standard_Integer dayComponent{};
+  Standard_Integer monthComponent{};
 
 
 };
index f13065c0e313b936c2c59749489aa02a0bdcfe70..4b00d84f40b80f12dbe55f4f45328471a6db54aa 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_CharacterizedObject,Standard_Transient)
 //function : StepBasic_CharacterizedObject
 //purpose  : 
 //=======================================================================
-StepBasic_CharacterizedObject::StepBasic_CharacterizedObject ()
+StepBasic_CharacterizedObject::StepBasic_CharacterizedObject () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 4cbd412583a1b68304a39d862afd43a76b616050..14cded78a6f5d6e7735ee48ba995d8fee954d73c 100644 (file)
@@ -69,10 +69,10 @@ protected:
 private:
 
 
-  Standard_Integer hourOffset;
-  Standard_Integer minuteOffset;
+  Standard_Integer hourOffset{};
+  Standard_Integer minuteOffset{};
   StepBasic_AheadOrBehind sense;
-  Standard_Boolean hasMinuteOffset;
+  Standard_Boolean hasMinuteOffset{};
 
 
 };
index fdc7b09fe3e8d91c00b477d3c84b9cb0796f6649..170d98c5edcc725d117872bc8945d6746209e23a 100644 (file)
@@ -56,7 +56,7 @@ protected:
 private:
 
 
-  Standard_Integer yearComponent;
+  Standard_Integer yearComponent{};
 
 
 };
index 016986861f04200c2f0fb8f0ab51b0c9108006ce..9a147eb3df38ed6d083bce60254e3534d8dee7b2 100644 (file)
@@ -60,7 +60,7 @@ private:
 
 
   Handle(StepBasic_NamedUnit) theUnit;
-  Standard_Real theExponent;
+  Standard_Real theExponent{};
 
 
 };
index 7a21dc8ef4422c7cf14028cc7130c34ba87217d7..94451069c213179d359d6bc216e38c2613e35f5f 100644 (file)
@@ -79,13 +79,13 @@ protected:
 private:
 
 
-  Standard_Real lengthExponent;
-  Standard_Real massExponent;
-  Standard_Real timeExponent;
-  Standard_Real electricCurrentExponent;
-  Standard_Real thermodynamicTemperatureExponent;
-  Standard_Real amountOfSubstanceExponent;
-  Standard_Real luminousIntensityExponent;
+  Standard_Real lengthExponent{};
+  Standard_Real massExponent{};
+  Standard_Real timeExponent{};
+  Standard_Real electricCurrentExponent{};
+  Standard_Real thermodynamicTemperatureExponent{};
+  Standard_Real amountOfSubstanceExponent{};
+  Standard_Real luminousIntensityExponent{};
 
 
 };
index 7a827763fa1face781b55098f787869d763af062..efa67e902c11445cbf1c87e527bc8a0791530b3e 100644 (file)
@@ -25,9 +25,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_Document,Standard_Transient)
 //function : StepBasic_Document
 //purpose  : 
 //=======================================================================
-StepBasic_Document::StepBasic_Document ()
+StepBasic_Document::StepBasic_Document () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 681b8f44f5460c0242170179a209cacfad70946d..ed194fb8399ee6ee07ae2a1184c84ac7453f65da 100644 (file)
@@ -27,9 +27,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_DocumentFile,StepBasic_Document)
 //function : StepBasic_DocumentFile
 //purpose  : 
 //=======================================================================
-StepBasic_DocumentFile::StepBasic_DocumentFile ()
+StepBasic_DocumentFile::StepBasic_DocumentFile () : theCharacterizedObject(new StepBasic_CharacterizedObject)
 {
-  theCharacterizedObject = new StepBasic_CharacterizedObject;
+  
 }
 
 //=======================================================================
index acefef1ad891ae8dad16d0e70cc95a22b9451a33..d7bcc7c4f2e4b59864cc7ca32119bfa770c32569 100644 (file)
@@ -26,9 +26,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_DocumentProductAssociation,Standard_Transie
 //function : StepBasic_DocumentProductAssociation
 //purpose  : 
 //=======================================================================
-StepBasic_DocumentProductAssociation::StepBasic_DocumentProductAssociation ()
+StepBasic_DocumentProductAssociation::StepBasic_DocumentProductAssociation () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 037df4b36608edff261953caeb441693d4ac68ae..a099bbad7cd688948c9833b263a76df9ff8e1636 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GeneralProperty,Standard_Transient)
 //function : StepBasic_GeneralProperty
 //purpose  : 
 //=======================================================================
-StepBasic_GeneralProperty::StepBasic_GeneralProperty ()
+StepBasic_GeneralProperty::StepBasic_GeneralProperty () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index ab65434ebf5a7627124538392d1fdf6c1224267a..099727f46dc232c8b2cd256906ecab6a3824664d 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_Group,Standard_Transient)
 //function : StepBasic_Group
 //purpose  : 
 //=======================================================================
-StepBasic_Group::StepBasic_Group ()
+StepBasic_Group::StepBasic_Group () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 8e907e2f8b3939c671db5852fa40e354f4cef07c..f60aefea381ed5c79c9a8af6f80362b8daa154ef 100644 (file)
@@ -25,9 +25,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GroupRelationship,Standard_Transient)
 //function : StepBasic_GroupRelationship
 //purpose  : 
 //=======================================================================
-StepBasic_GroupRelationship::StepBasic_GroupRelationship ()
+StepBasic_GroupRelationship::StepBasic_GroupRelationship () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 58a3e8b2417bfad9b5bda82e9c09094c7a5735e6..fb57e0af28997c021ccb5235235395d643847552 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_IdentificationRole,Standard_Transient)
 //function : StepBasic_IdentificationRole
 //purpose  : 
 //=======================================================================
-StepBasic_IdentificationRole::StepBasic_IdentificationRole ()
+StepBasic_IdentificationRole::StepBasic_IdentificationRole () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 970da885c1c3ee5bb8c9ac9701fd483193a232b6..40e3e9bd1bda37dea7984e6ebf628ae0f9767c06 100644 (file)
@@ -77,12 +77,12 @@ protected:
 private:
 
 
-  Standard_Integer hourComponent;
-  Standard_Integer minuteComponent;
-  Standard_Real secondComponent;
+  Standard_Integer hourComponent{};
+  Standard_Integer minuteComponent{};
+  Standard_Real secondComponent{};
   Handle(StepBasic_CoordinatedUniversalTimeOffset) zone;
-  Standard_Boolean hasMinuteComponent;
-  Standard_Boolean hasSecondComponent;
+  Standard_Boolean hasMinuteComponent{};
+  Standard_Boolean hasSecondComponent{};
 
 
 };
index b4814dd362fde978a9474c473996ef78250178df..01a7e30e4c4eac44756a8c68262e252661ae1563 100644 (file)
@@ -21,9 +21,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_MeasureValueMember,StepData_SelectReal)
 //function : StepBasic_MeasureValueMember
 //purpose  : 
 //=======================================================================
-StepBasic_MeasureValueMember::StepBasic_MeasureValueMember()
+StepBasic_MeasureValueMember::StepBasic_MeasureValueMember() : thecase(0)
 {
-  thecase = 0;
+  
 }
 
 
index ae405707c737fa4f1f32d1e7da3a5d2144200a9d..312d551fd079da5e46045bd9a60a52d8c3d6ae90 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ObjectRole,Standard_Transient)
 //function : StepBasic_ObjectRole
 //purpose  : 
 //=======================================================================
-StepBasic_ObjectRole::StepBasic_ObjectRole ()
+StepBasic_ObjectRole::StepBasic_ObjectRole () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 4204c2858f2c7d3fa3ad806dfca3c6b380a8feb2..f1bddbb842f401d8ff8ea11c38605e59477e0531 100644 (file)
@@ -56,7 +56,7 @@ protected:
 private:
 
 
-  Standard_Integer dayComponent;
+  Standard_Integer dayComponent{};
 
 
 };
index 2dff7a034594049f544b7a4a2efe2b94732dd9cc..ad91b524a812a0fe5659c1c7f8b109e8159eb57f 100644 (file)
@@ -72,7 +72,7 @@ private:
   Handle(TCollection_HAsciiString) id;
   Handle(TCollection_HAsciiString) name;
   Handle(TCollection_HAsciiString) description;
-  Standard_Boolean hasId;
+  Standard_Boolean hasId{};
 
 
 };
index 9eb5de333bf54d3c8626f681d0cbe67eecf757ad..b51f726f169f0350a0a110ba94e82666db802235 100644 (file)
@@ -116,11 +116,11 @@ private:
   Handle(Interface_HArray1OfHAsciiString) middleNames;
   Handle(Interface_HArray1OfHAsciiString) prefixTitles;
   Handle(Interface_HArray1OfHAsciiString) suffixTitles;
-  Standard_Boolean hasLastName;
-  Standard_Boolean hasFirstName;
-  Standard_Boolean hasMiddleNames;
-  Standard_Boolean hasPrefixTitles;
-  Standard_Boolean hasSuffixTitles;
+  Standard_Boolean hasLastName{};
+  Standard_Boolean hasFirstName{};
+  Standard_Boolean hasMiddleNames{};
+  Standard_Boolean hasPrefixTitles{};
+  Standard_Boolean hasSuffixTitles{};
 
 
 };
index f4e543ea8ae52bdc30d365a052dbcb1a6f24de47..3704f81423dd45506f8daad35ef245dbf41a0bcb 100644 (file)
@@ -67,7 +67,7 @@ private:
 
   Handle(TCollection_HAsciiString) name;
   Handle(TCollection_HAsciiString) description;
-  Standard_Boolean hasDescription;
+  Standard_Boolean hasDescription{};
 
 
 };
index 75168c9915c1764c2ffbb543279a1892d81ecc1c..9f8691394c4ee5d2200fdab43509bbd33b42b1a7 100644 (file)
@@ -26,9 +26,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ProductCategoryRelationship,Standard_Transi
 //function : StepBasic_ProductCategoryRelationship
 //purpose  : 
 //=======================================================================
-StepBasic_ProductCategoryRelationship::StepBasic_ProductCategoryRelationship ()
+StepBasic_ProductCategoryRelationship::StepBasic_ProductCategoryRelationship () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index df986ef3e9e58dcbee9a55aa368034bdbb97e130..38b364eb0a83f92ed26df4665bd7ae1d14e43ccf 100644 (file)
@@ -123,7 +123,7 @@ private:
   Handle(TCollection_HAsciiString) myProductDefinitionFormationId;
   Handle(TCollection_HAsciiString) myProductDefinitionId;
   Handle(TCollection_HAsciiString) myIdOwningOrganizationName;
-  Standard_Boolean hasIdOwningOrganizationName;
+  Standard_Boolean hasIdOwningOrganizationName{};
 };
 
 #endif // _StepBasic_ProductDefinitionReference_HeaderFile
index 7406fa04fbd4f7f261981b8278711a168d2c7e43..db451e3e0cdafd6d398aa70585e0e8c798552154 100644 (file)
@@ -25,9 +25,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ProductDefinitionRelationship,Standard_Tran
 //function : StepBasic_ProductDefinitionRelationship
 //purpose  : 
 //=======================================================================
-StepBasic_ProductDefinitionRelationship::StepBasic_ProductDefinitionRelationship ()
+StepBasic_ProductDefinitionRelationship::StepBasic_ProductDefinitionRelationship () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index a9c676aa5f34b9405ac8d4ee9635c8e22a4d05e1..cd55b0cccf0939f6cc89fc257363f6f4a5c87b12 100644 (file)
@@ -72,7 +72,7 @@ private:
 
   StepBasic_SiPrefix prefix;
   StepBasic_SiUnitName name;
-  Standard_Boolean hasPrefix;
+  Standard_Boolean hasPrefix{};
 
 
 };
index f6cd25dba1f407a4d60b8ff6e7c97b1f6b7e7a38..1b283e6b9fb9ca47e1d9c3a21e1730e663adb534 100644 (file)
@@ -25,9 +25,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepBasic_VersionedActionRequest,Standard_Transient)
 //function : StepBasic_VersionedActionRequest
 //purpose  : 
 //=======================================================================
-StepBasic_VersionedActionRequest::StepBasic_VersionedActionRequest ()
+StepBasic_VersionedActionRequest::StepBasic_VersionedActionRequest () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 444896f5585615e70e290e30be8e601dfa491113..ee0a2e5df19e40ed3f46d8b867cd9b8ed3d06257 100644 (file)
@@ -64,9 +64,9 @@ protected:
 private:
 
 
-  Standard_Integer weekComponent;
-  Standard_Integer dayComponent;
-  Standard_Boolean hasDayComponent;
+  Standard_Integer weekComponent{};
+  Standard_Integer dayComponent{};
+  Standard_Boolean hasDayComponent{};
 
 
 };
index 83141f07b573c361539488bb5cdaf1f39eef306b..b47c07ea59cc260ce5348d5f479b352af44c04f3 100644 (file)
@@ -45,7 +45,7 @@ StepData_ECDescr::StepData_ECDescr  ()    {  }
     Handle(TColStd_HSequenceOfAsciiString)  StepData_ECDescr::TypeList () const
 {
   Handle(TColStd_HSequenceOfAsciiString) tl = new TColStd_HSequenceOfAsciiString();
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     TCollection_AsciiString nam (Member(i)->TypeName());
     tl->Append(nam);
@@ -56,7 +56,7 @@ StepData_ECDescr::StepData_ECDescr  ()    {  }
 
     Standard_Boolean  StepData_ECDescr::Matches (const Standard_CString name) const
 {
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     Handle(StepData_ESDescr) member = Member(i);
     if (member->Matches(name)) return Standard_True;
@@ -70,7 +70,7 @@ StepData_ECDescr::StepData_ECDescr  ()    {  }
     Handle(StepData_Described)  StepData_ECDescr::NewEntity () const
 {
   Handle(StepData_Plex) ent = new StepData_Plex (this);
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     Handle(StepData_ESDescr) member = Member(i);
     Handle(StepData_Simple) mem = Handle(StepData_Simple)::DownCast(member->NewEntity());
index 7084493623bb3b1d922a6765cdba54015061731e..2b29567ba7fa00a7537bf676bcd2b0938e9ce4f5 100644 (file)
@@ -26,7 +26,7 @@ StepData_ESDescr::StepData_ESDescr  (const Standard_CString name)
 
 void  StepData_ESDescr::SetNbFields (const Standard_Integer nb)
 {
-  Standard_Integer minb,i, oldnb = NbFields();
+  Standard_Integer minb = 0,i = 0, oldnb = NbFields();
   thenames.Clear();
   if (nb == 0)  {  thedescr.Nullify();  return;  }
   Handle(TColStd_HArray1OfTransient) li = new TColStd_HArray1OfTransient(1,nb);
@@ -97,7 +97,7 @@ void  StepData_ESDescr::SetNbFields (const Standard_Integer nb)
 
     Standard_Integer  StepData_ESDescr::Rank (const Standard_CString name) const
 {
-  Standard_Integer rank;
+  Standard_Integer rank = 0;
   if (!thenames.Find(name, rank))
     return 0;
   return rank;
index 5fa8fd6e8a8f5d9466115aa2d46b9d166c63916d..e1966d0b56cd901be45ff2cde617f75bbeeae2e3 100644 (file)
@@ -37,7 +37,7 @@ StepData_EnumTool::StepData_EnumTool
    const Standard_CString e32,const Standard_CString e33,
    const Standard_CString e34,const Standard_CString e35,
    const Standard_CString e36,const Standard_CString e37,
-   const Standard_CString e38,const Standard_CString e39)
+   const Standard_CString e38,const Standard_CString e39) : theinit(thetexts.Length()), theopt(Standard_True)
 {
   AddDefinition (e0);   AddDefinition (e1);   AddDefinition (e2);
   AddDefinition (e3);   AddDefinition (e4);   AddDefinition (e5);
@@ -53,7 +53,7 @@ StepData_EnumTool::StepData_EnumTool
   AddDefinition (e33);  AddDefinition (e34);  AddDefinition (e35);
   AddDefinition (e36);  AddDefinition (e37);  AddDefinition (e38);
   AddDefinition (e39);
-  theinit = thetexts.Length();  theopt = Standard_True;
+   
 }
 
     void  StepData_EnumTool::AddDefinition (const Standard_CString term)
index d717483e4ef1d63179d97d0d946de5933e6a9a55..02a9c8104ee1e89b60952ffbcde5b558fcd84f8a 100644 (file)
@@ -99,7 +99,7 @@ static Standard_Integer TrueKind (const Standard_Integer kind)
   }
 //    Les listes ...
   if ((thekind & KindArity) == KindList)  {
-    Standard_Integer i, low, up;
+    Standard_Integer i = 0, low = 0, up = 0;
     DeclareAndCast(TColStd_HArray1OfInteger,hi,theany);
     if (!hi.IsNull()) {
       low = hi->Lower();  up = hi->Upper();
index b5f9c9ace6cc6dc85e86c71e7f9aae4864b18fd6..75e9c7cbf0750be7b074d4a401d6702325d554e1 100644 (file)
@@ -197,9 +197,9 @@ private:
 
 
 
-  Standard_Integer thekind;
-  Standard_Integer theint;
-  Standard_Real thereal;
+  Standard_Integer thekind{};
+  Standard_Integer theint{};
+  Standard_Real thereal{};
   Handle(Standard_Transient) theany;
 
 
index 679c18c2ec43654a44634224827db1b1269500fe..6cf1138ff203ab28988d65f10a3f6290c1f99442 100644 (file)
@@ -41,11 +41,11 @@ StepData_Field&  StepData_FieldList::CField (const Standard_Integer)
 
 void  StepData_FieldList::FillShared (Interface_EntityIterator& iter) const
 {
-  Standard_Integer i, nb = NbFields();
+  Standard_Integer i = 0, nb = NbFields();
   for (i = 1; i <= nb; i ++) {
     const StepData_Field& fi = Field(i);
     if (fi.Kind() != 7) continue;  // KindEntity
-    Standard_Integer i1,i2, nb1 = 1, nb2 = 1, ari = fi.Arity();
+    Standard_Integer i1 = 0,i2 = 0, nb1 = 1, nb2 = 1, ari = fi.Arity();
     if (ari == 1)   nb1 = fi.Length();
     if (ari == 2) { nb1 = fi.Length(1); nb2 = fi.Length(2); }
     for (i1 = 1; i1 <= nb1; i1 ++)
index 6a264f7c88c595948dc498363007522c2185470a..24fb90705282872c1057738cb2a299d8a8369caf 100644 (file)
@@ -57,7 +57,7 @@ Standard_Boolean StepData_FileProtocol::GlobalCheck(const Interface_Graph& G,
                                                     Handle(Interface_Check)& ach) const
 {
   Standard_Boolean res = Standard_False;
-  Standard_Integer i,nb = NbResources();
+  Standard_Integer i = 0,nb = NbResources();
   for (i = 1; i <= nb; i ++) res |= Resource(i)->GlobalCheck (G,ach);
   return res;
 }
index cd5cb1f67d141e06ae1457aae4923342096fb155..9a41fea049f6e6213f5800c94831d6e858a26195 100644 (file)
@@ -98,7 +98,7 @@ StepData_PDescr::StepData_PDescr  ()
 {
   if (other.IsNull()) return;
   thekind = other->Kind();
-  Standard_Integer i, maxenum = other->EnumMax ();
+  Standard_Integer i = 0, maxenum = other->EnumMax ();
   for (i = 0; i <= maxenum; i ++)    AddEnumDef (other->EnumText(i));
 //  ne sont pas reprises : les SELECT
   thetype = other->Type();
index 0c391174b8d05b709e4d8fd587ec6f7d81550c4d..6f95fb8d8001cb80977aae805544e5dc5d2f216a 100644 (file)
@@ -40,7 +40,7 @@ static StepData_Field bid;
 
     Standard_Boolean  StepData_Plex::Matches (const Standard_CString steptype) const
 {
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     if (Member(i)->Matches (steptype)) return Standard_True;
   }
@@ -50,7 +50,7 @@ static StepData_Field bid;
     Handle(StepData_Simple)  StepData_Plex::As  (const Standard_CString steptype) const
 {
   Handle(StepData_Simple) ent;
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     ent = Member(i);
     if (ent->Matches(steptype)) return ent;
@@ -61,7 +61,7 @@ static StepData_Field bid;
 
     Standard_Boolean  StepData_Plex::HasField (const Standard_CString name) const
 {
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     if (Member(i)->HasField (name)) return Standard_True;
   }
@@ -71,7 +71,7 @@ static StepData_Field bid;
     const StepData_Field&  StepData_Plex::Field (const Standard_CString name) const
 {
   Handle(StepData_Simple) ent;
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     ent = Member(i);
     if (ent->HasField (name)) return ent->Field (name);
@@ -83,7 +83,7 @@ static StepData_Field bid;
     StepData_Field&  StepData_Plex::CField (const Standard_CString name)
 {
   Handle(StepData_Simple) ent;
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     ent = Member(i);
     if (ent->HasField (name)) return ent->CField (name);
@@ -101,7 +101,7 @@ static StepData_Field bid;
     Handle(TColStd_HSequenceOfAsciiString)  StepData_Plex::TypeList () const
 {
   Handle(TColStd_HSequenceOfAsciiString) tl = new TColStd_HSequenceOfAsciiString();
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     TCollection_AsciiString nam (Member(i)->StepType());
     tl->Append (nam);
@@ -112,7 +112,7 @@ static StepData_Field bid;
 
 void StepData_Plex::Check(Handle(Interface_Check)& ach) const
 {
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     Handle(StepData_Simple) si = Member(i);
     si->Check(ach);
@@ -122,7 +122,7 @@ void StepData_Plex::Check(Handle(Interface_Check)& ach) const
 
     void  StepData_Plex::Shared (Interface_EntityIterator& list) const
 {
-  Standard_Integer i, nb = NbMembers();
+  Standard_Integer i = 0, nb = NbMembers();
   for (i = 1; i <= nb; i ++) {
     Handle(StepData_Simple) si = Member(i);
     si->Shared (list);
index 330299ccd7d735b892616e8d6ff3f954bfe35df1..c1022032b5b224bb005e734d853eb24873ebaa69 100644 (file)
@@ -161,7 +161,7 @@ Handle(StepData_EDescr)  StepData_Protocol::Descr
   }
   if (!anylevel) return sd;
 
-  Standard_Integer i, nb = NbResources();
+  Standard_Integer i = 0, nb = NbResources();
   for (i = 1; i <= nb; i ++) {
     Handle(StepData_Protocol) sp = Handle(StepData_Protocol)::DownCast(Resource(i));
     if (sp.IsNull()) continue;
@@ -182,7 +182,7 @@ Handle(StepData_ESDescr)  StepData_Protocol::ESDescr
 Handle(StepData_ECDescr)  StepData_Protocol::ECDescr
   (const TColStd_SequenceOfAsciiString& names, const Standard_Boolean anylevel) const
 {
-  Standard_Integer i, nb = names.Length();
+  Standard_Integer i = 0, nb = names.Length();
   Handle(StepData_ECDescr) cd;
   Interface_DataMapIteratorOfDataMapOfTransientInteger iter(thedscnum);
   for (; iter.More(); iter.Next()) {
@@ -227,7 +227,7 @@ Handle(StepData_PDescr)  StepData_Protocol::PDescr
   }
   if (!anylevel) return sd;
 
-  Standard_Integer i, nb = NbResources();
+  Standard_Integer i = 0, nb = NbResources();
   for (i = 1; i <= nb; i ++) {
     Handle(StepData_Protocol) sp = Handle(StepData_Protocol)::DownCast(Resource(i));
     if (sp.IsNull()) continue;
@@ -256,7 +256,7 @@ Handle(StepData_EDescr)  StepData_Protocol::BasicDescr
   }
   if (!anylevel) return sd;
 
-  Standard_Integer i, nb = NbResources();
+  Standard_Integer i = 0, nb = NbResources();
   for (i = 1; i <= nb; i ++) {
     Handle(StepData_Protocol) sp = Handle(StepData_Protocol)::DownCast(Resource(i));
     if (sp.IsNull()) continue;
index 6517ab9301d6f2e6b5d325d1e693611e6fb12f2c..0a5a4fb73f712ac9954c7febffe0fe77138341ed 100644 (file)
@@ -17,7 +17,7 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(StepData_SelectInt,StepData_SelectMember)
 
-StepData_SelectInt::StepData_SelectInt  ()    {  thekind = 0;  theval = 0;  }
+StepData_SelectInt::StepData_SelectInt  () : thekind(0), theval(0)    {    }
 
 Standard_Integer  StepData_SelectInt::Kind () const    {  return thekind;  }
 void  StepData_SelectInt::SetKind (const Standard_Integer kind)    {  thekind = kind;  }
index 65063744a8eca89f3826cd4a8b0cdc370d33005a..8c5cdd71a4560f536c8fd4fc40da7cba995ab2dd 100644 (file)
@@ -20,7 +20,7 @@ IMPLEMENT_STANDARD_RTTIEXT(StepData_SelectReal,StepData_SelectMember)
 //  Definitions : cf Field
 #define KindReal 5
 
-StepData_SelectReal::StepData_SelectReal  ()    {  theval = 0.0;  }
+StepData_SelectReal::StepData_SelectReal  () : theval(0.0)    {   }
 
 Standard_Integer  StepData_SelectReal::Kind () const    {  return KindReal;  }
 
index d66b94e48949babdc8526e7abbafa34c0537c878..392aa65f79a5ce7cb05e087d2cf5592f562724e2 100644 (file)
@@ -88,10 +88,10 @@ void StepData_Simple::Check(Handle(Interface_Check)& /*ach*/) const
 
     void  StepData_Simple::Shared (Interface_EntityIterator& list) const
 {
-  Standard_Integer i, nb = thefields.NbFields();
+  Standard_Integer i = 0, nb = thefields.NbFields();
   for (i = 1; i <= nb; i ++) {
     const StepData_Field& fi = thefields.Field(i);
-    Standard_Integer j1,j2,l1,l2;  l1 = l2 = 1;
+    Standard_Integer j1 = 0,j2 = 0,l1 = 0,l2 = 0;  l1 = l2 = 1;
     if (fi.Arity() >= 1) l1 = fi.Length(1);
     if (fi.Arity() >  1) l2 = fi.Length(2);
     for (j1 = 1; j1 <= l1; j1 ++) {
index a3533c8034de1d9bc614edd83f970b4101304557..dcc7004d60e91391a9f5e9ec35079caf8e55e920 100644 (file)
@@ -29,9 +29,9 @@ StepData_StepDumper::StepData_StepDumper
   (const Handle(StepData_StepModel)& amodel,
    const Handle(StepData_Protocol)& protocol,
    const Standard_Integer mode)
-    : theslib (protocol) , thewlib (protocol) , thewriter (amodel)
+    : themodel(amodel), theslib (protocol) , thewlib (protocol) , thewriter (amodel)
 {
-  themodel = amodel;
+  
   if (mode > 0) thewriter.LabelMode () = 2;
 }
 
@@ -46,7 +46,7 @@ Standard_Boolean  StepData_StepDumper::Dump
   (Standard_OStream& S, const Handle(Standard_Transient)& ent,
    const Standard_Integer level)
 {
-  Standard_Integer i, nb = themodel->NbEntities();
+  Standard_Integer i = 0, nb = themodel->NbEntities();
   TColStd_Array1OfInteger ids(0,nb); ids.Init(0);
   Standard_Integer num  = themodel->Number(ent);
   Standard_Integer nlab = themodel->IdentLabel(ent);
@@ -54,7 +54,7 @@ Standard_Boolean  StepData_StepDumper::Dump
 
   if (level <= 0) {
     Handle(StepData_ReadWriteModule) module;
-    Standard_Integer CN;
+    Standard_Integer CN = 0;
     if (num > 0) S << "#" << num << " = ";
     else S << "#??? = ";
     if (thewlib.Select(ent,module,CN)) {
@@ -79,7 +79,7 @@ Standard_Boolean  StepData_StepDumper::Dump
   else if (level == 1) {
 //  ...  Idents  ...
     Handle(Standard_Transient) anent;
-    Handle(Interface_GeneralModule) module;  Standard_Integer CN;
+    Handle(Interface_GeneralModule) module;  Standard_Integer CN = 0;
     if (theslib.Select(ent,module,CN)) {
       Interface_EntityIterator iter;
       module->FillSharedCase  (CN,ent,iter);
@@ -100,7 +100,7 @@ Standard_Boolean  StepData_StepDumper::Dump
 //  ...  Envoi  ...
     TColStd_Array1OfInteger tab(0,nb); tab.Init(0);
     tab.SetValue(num,1);
-    Handle(Interface_GeneralModule) module;  Standard_Integer CN;
+    Handle(Interface_GeneralModule) module;  Standard_Integer CN = 0;
     if (theslib.Select(ent,module,CN)) {
       Interface_EntityIterator iter;
       module->FillSharedCase  (CN,ent,iter);
index 5d86f078358f9edceb5afb54e4f97fbba57a7428..f0a6a6e7fd8e354632f3b665569a506c6aec1fb5 100644 (file)
@@ -111,9 +111,9 @@ void StepData_StepModel::VerifyCheck(Handle(Interface_Check)& ach) const
   Handle(StepData_StepModel) me (this);
   Handle(Interface_Protocol) aHP = StepData::HeaderProtocol();
   Interface_ShareTool sh(me,aHP);
-  Handle(Interface_GeneralModule) module;  Standard_Integer CN;
+  Handle(Interface_GeneralModule) module;  Standard_Integer CN = 0;
   for (Interface_EntityIterator iter = Header(); iter.More(); iter.Next()) {
-    Handle(Standard_Transient) head = iter.Value();
+    const Handle(Standard_Transient)& head = iter.Value();
     if (!lib.Select(head,module,CN)) continue;
     module->CheckCase(CN,head,sh,ach);
   }
index 3221e05d5996118447d863dd89d62988884ea05a..73d1b6f4c1e84353ce481a2235f497667ec8ccee 100644 (file)
@@ -324,12 +324,12 @@ StepData_StepReaderData::StepData_StepReaderData
 (const Standard_Integer nbheader, const Standard_Integer nbtotal,
   const Standard_Integer nbpar, const Resource_FormatType theSourceCodePage)
   : Interface_FileReaderData(nbtotal, nbpar), theidents(1, nbtotal),
-  thetypes(1, nbtotal), mySourceCodePage(theSourceCodePage) //, themults (1,nbtotal)
+  thetypes(1, nbtotal), thenbents(0), thelastn(0), thenbhead(nbheader), thenbscop(0), thecheck(new Interface_Check), mySourceCodePage(theSourceCodePage) //, themults (1,nbtotal)
 {
   //  char textnum[10];
-  thenbscop = 0;  thenbents = 0;  thelastn = 0;  thenbhead = nbheader;
+     
   //themults.Init(0);
-  thecheck = new Interface_Check;
+  
   if (initstr) return;
   //for (Standard_Integer i = 0; i < Maxlst; i ++) {
   //  sprintf(textnum,"$%d",i+1);
@@ -349,7 +349,7 @@ void StepData_StepReaderData::SetRecord(const Standard_Integer num,
   const Standard_CString type,
   const Standard_Integer /* nbpar */)
 {
-  Standard_Integer numlst;
+  Standard_Integer numlst = 0;
   /*
     if (strcmp(type,"/ * (SUB) * /") == 0) {    // defini dans recfile.pc
       thetypes.SetValue (num,sublist);
@@ -791,7 +791,7 @@ Standard_Integer StepData_StepReaderData::ReadSub(const Standard_Integer numsub,
     //    Il faut passer au transient ...
     if (htr.IsNull()) {
       htr = new TColStd_HArray1OfTransient(1, nbp);  val = htr;
-      Standard_Integer jp;
+      Standard_Integer jp = 0;
       if (!hin.IsNull()) {
         for (jp = 1; jp < ip; jp++) {
           Handle(StepData_SelectInt) sin = new StepData_SelectInt;
@@ -914,7 +914,7 @@ Standard_Boolean StepData_StepReaderData::ReadField(const Standard_Integer num,
   const Interface_FileParameter& FP = Param(num, nump);
   Standard_CString str = FP.CValue();
   Standard_Boolean OK = Standard_True;
-  Standard_Integer nent, kind;
+  Standard_Integer nent = 0, kind = 0;
   Handle(TCollection_HAsciiString) txt;
   Handle(Standard_Transient) sub;
   Interface_ParamType FT = FP.ParamType();
@@ -967,7 +967,7 @@ Standard_Boolean StepData_StepReaderData::ReadList(const Standard_Integer num,
   StepData_FieldList& list) const
 {
   // controler nbs egaux
-  Standard_Integer i, nb = list.NbFields();
+  Standard_Integer i = 0, nb = list.NbFields();
   if (!CheckNbParams(num, nb, ach, descr->TypeName())) return Standard_False;
   for (i = 1; i <= nb; i++) {
     Handle(StepData_PDescr) pde = descr->Field(i);
@@ -1756,7 +1756,7 @@ void StepData_StepReaderData::SetEntityNumbers(const Standard_Boolean withmap)
   TColStd_IndexedMapOfInteger imap(thenbents);
   TColStd_Array1OfInteger indm(0, nbdirec);    // Index Map -> Record Number (seulement si map)
 
-  Standard_Integer num; // svv Jan11 2000 : porting on DEC
+  Standard_Integer num = 0; // svv Jan11 2000 : porting on DEC
   for (num = 1; num <= nbdirec; num++) {
     Standard_Integer ident = theidents(num);
     if (ident > 0) {      // Ident normal -> Map ?
@@ -1987,7 +1987,7 @@ void StepData_StepReaderData::SetEntityNumbers(const Standard_Boolean withmap)
         if (id < 0) continue;    // deja resolu en tete
 
       // Voila : on va chercher id dans ndi; algorithme de balayage
-        Standard_Integer pass, sens, nok, n0, irec;    pass = sens = nok = 0;
+        Standard_Integer pass = 0, sens = 0, nok = 0, n0 = 0, irec = 0;        pass = sens = nok = 0;
         if (!iamap) pass = 1;                  // si map non disponible
         while (pass < 3) {
           pass++;
@@ -2056,7 +2056,7 @@ void StepData_StepReaderData::SetEntityNumbers(const Standard_Boolean withmap)
           //  Alimenter le Check ...  Pour cela, determiner n0 Entite et Ident
           char failmess[100];
           Standard_Integer nument = 0;
-          Standard_Integer n0ent; // svv Jan11 2000 : porting on DEC
+          Standard_Integer n0ent = 0; // svv Jan11 2000 : porting on DEC
           for (n0ent = 1; n0ent <= nr; n0ent++) {
             if (indi(n0ent) > 0) nument++;
           }
index 9ece1b80b8d5ff3ab06ca1f08b83d2ad2340f4d0..06303c31d574ec3e1346c438a0e05d7d7606f9b2 100644 (file)
@@ -215,7 +215,7 @@ Standard_Boolean StepData_StepReaderTool::AnalyseRecord
 {
   DeclareAndCast(StepData_StepReaderData,stepdat,Data());
   Handle(Interface_ReaderModule) imodule;
-  Standard_Integer CN;
+  Standard_Integer CN = 0;
   if (therlib.Select(anent,imodule,CN))
   {
     Handle(StepData_ReadWriteModule) module =
index ee04642aa8c02d2bf459557f623c80e99cac5ed0..733f345b95e82a42a8f4298242eb2146a8e40b17 100644 (file)
@@ -64,13 +64,13 @@ static TCollection_AsciiString  textunknown  (".U.");
 //=======================================================================
 
 StepData_StepWriter::StepData_StepWriter(const Handle(StepData_StepModel)& amodel)
-    : thecurr (StepLong) , thefloatw (12)
+    : themodel(amodel), thefile(new TColStd_HSequenceOfHAsciiString()), thecurr (StepLong) , thesect(Standard_False), thecomm(Standard_False), thefirst(Standard_True), themult(Standard_False), theindent(Standard_False), thefloatw (12), thelabmode(thetypmode = 0)
 {
-  themodel = amodel;  thelabmode = thetypmode = 0;
-  thefile  = new TColStd_HSequenceOfHAsciiString();
-  thesect  = Standard_False;  thefirst = Standard_True;
-  themult  = Standard_False;  thecomm  = Standard_False;
-  thelevel = theindval = 0;   theindent = Standard_False;
+   
+  
+   
+   
+  thelevel = theindval = 0;   
 //  Format flottant : reporte dans le FloatWriter
 }
 
@@ -172,10 +172,10 @@ void StepData_StepWriter::SendModel(const Handle(StepData_Protocol)& protocol,
   Interface_EntityIterator header = themodel->Header();
   thenum = 0;
   for (header.Start(); header.More(); header.Next()) {
-    Handle(Standard_Transient) anent = header.Value();
+    const Handle(Standard_Transient)& anent = header.Value();
 
 //   Write Entity via Lib  (similaire a SendEntity)
-    Handle(StepData_ReadWriteModule) module;  Standard_Integer CN;
+    Handle(StepData_ReadWriteModule) module;  Standard_Integer CN = 0;
     if (lib.Select(anent,module,CN)) {
       if (module->IsComplex(CN))   StartComplex();
       else {
@@ -331,7 +331,7 @@ void StepData_StepWriter::SendEntity(const Standard_Integer num,
 
 //   Write Entity via Lib
   thenum = num;
-  Handle(StepData_ReadWriteModule) module;  Standard_Integer CN;
+  Handle(StepData_ReadWriteModule) module;  Standard_Integer CN = 0;
   if (themodel->IsRedefinedContent(num)) {
 //    Entite Erreur : Ecrire le Contenu + les Erreurs en Commentaires
     Handle(Interface_ReportEntity) rep = themodel->ReportEntity(num);
@@ -586,7 +586,7 @@ void StepData_StepWriter::SendField(const StepData_Field& fild,
   if (arity == 0) {  SendUndef();  return;  }    // PAS NORMAL
   if (arity == 1) {
     OpenSub();
-    Standard_Integer i,low = fild.Lower(), up = low + fild.Length() - 1;
+    Standard_Integer i = 0,low = fild.Lower(), up = low + fild.Length() - 1;
     for (i = low; i <= up; i ++) {
       kind = fild.ItemKind(i);
       done = Standard_True;
@@ -607,7 +607,7 @@ void StepData_StepWriter::SendField(const StepData_Field& fild,
   }
   if (arity == 2) {
     OpenSub();
-    Standard_Integer   j,low1 = fild.Lower(1), up1 = low1 + fild.Length(1) - 1;
+    Standard_Integer   j = 0,low1 = fild.Lower(1), up1 = low1 + fild.Length(1) - 1;
     for (j = low1; j <= up1; j ++) {
       Standard_Integer i=0,low2 = fild.Lower(2), up2 = low2 + fild.Length(2) - 1;
       OpenSub();
@@ -677,11 +677,11 @@ void  StepData_StepWriter::SendList(const StepData_FieldList& list,
                                     const Handle(StepData_ESDescr)& descr)
 {
 // start entity  ?
-  Standard_Integer i, nb = list.NbFields();
+  Standard_Integer i = 0, nb = list.NbFields();
   for (i = 1; i <= nb; i ++) {
     Handle(StepData_PDescr) pde;
     if (!descr.IsNull()) pde  = descr->Field(i);
-    const StepData_Field fild = list.Field(i);
+    const StepData_Field& fild = list.Field(i);
     SendField (fild,pde);
   }
 // end entity  ?
index 34c2fc2ea69e26a0f44e1f41c94bced0fbeb2dac..e3a32c83c5714e6951daed14cffb1311d2602ed8 100644 (file)
@@ -298,10 +298,10 @@ private:
   Standard_Integer thelevel;
   Standard_Boolean theindent;
   Standard_Integer theindval;
-  Standard_Integer thetypmode;
+  Standard_Integer thetypmode{};
   Interface_FloatWriter thefloatw;
   Interface_CheckIterator thechecks;
-  Standard_Integer thenum;
+  Standard_Integer thenum{};
   Standard_Integer thelabmode;
   Handle(TColStd_HArray1OfInteger) thescopebeg;
   Handle(TColStd_HArray1OfInteger) thescopeend;
index 381ebb81f3d987165fda3c5100ace33649ccbe6f..50135b7e7f349fee49ab45d4595f334661593d84 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(StepData_UndefinedEntity,Standard_Transient)
 
-StepData_UndefinedEntity::StepData_UndefinedEntity ()
-      {  thecont = new Interface_UndefinedContent;  thesub = Standard_False;  }
+StepData_UndefinedEntity::StepData_UndefinedEntity () : thecont(new Interface_UndefinedContent), thesub(Standard_False)
+      {    }
 
     StepData_UndefinedEntity::StepData_UndefinedEntity
-  (const Standard_Boolean issub)
-      { thesub = issub;  thecont = new Interface_UndefinedContent;  }
+  (const Standard_Boolean issub) : thecont(new Interface_UndefinedContent), thesub(issub)
+      {   }
 
     Handle(Interface_UndefinedContent)
       StepData_UndefinedEntity::UndefinedContent () const
@@ -151,7 +151,7 @@ void StepData_UndefinedEntity::WriteParams (StepData_StepWriter& SW) const
     void  StepData_UndefinedEntity::FillShared
   (Interface_EntityIterator& list) const
 {
-  Standard_Integer i, nb = thecont->NbParams();
+  Standard_Integer i = 0, nb = thecont->NbParams();
   for (i = 1; i <= nb; i ++) {
     Interface_ParamType ptype = thecont->ParamType(i);
     if (ptype == Interface_ParamSub) {
index 7483f54fadcb21e75ce5fc534463828184c2a50f..55e709498572eba856ab8257420f2564907ab3b5 100644 (file)
@@ -65,7 +65,7 @@ protected:
 private:
 
 
-  Standard_Integer myPrecedence;
+  Standard_Integer myPrecedence{};
   Handle(StepDimTol_Datum) myReferencedDatum;
 
 
index a48e319fcdc84b721044d6926a77adfbed926256..841168011ce7af1128708537bc2bada82418cabf 100644 (file)
@@ -65,7 +65,7 @@ private:
 
 
   StepElement_CurveElementFreedom theReleaseFreedom;
-  Standard_Real theReleaseStiffness;
+  Standard_Real theReleaseStiffness{};
 
 
 };
index beb012e474e83527eba76ca7f52f7f4a2916b6c9..77ab047c194455249f6329b8f8dc199ca963c9af 100644 (file)
@@ -66,7 +66,7 @@ private:
 
 
   Handle(TCollection_HAsciiString) theDescription;
-  Standard_Real theSectionAngle;
+  Standard_Real theSectionAngle{};
 
 
 };
index ad35682e9252237ebd5b3c4832786935144294d4..e6eed075aca000c76ac05c63f214972c8a1a407f 100644 (file)
@@ -115,10 +115,10 @@ protected:
 private:
 
 
-  Standard_Real theCrossSectionalArea;
+  Standard_Real theCrossSectionalArea{};
   Handle(StepElement_HArray1OfMeasureOrUnspecifiedValue) theShearArea;
   Handle(TColStd_HArray1OfReal) theSecondMomentOfArea;
-  Standard_Real theTorsionalConstant;
+  Standard_Real theTorsionalConstant{};
   StepElement_MeasureOrUnspecifiedValue theWarpingConstant;
   Handle(StepElement_HArray1OfMeasureOrUnspecifiedValue) theLocationOfCentroid;
   Handle(StepElement_HArray1OfMeasureOrUnspecifiedValue) theLocationOfShearCentre;
index caa5fcdc99605f5241b6ac9b8d30c1671a6b666d..f7e24bc83b06007c21fe18c23dd0141be52f563f 100644 (file)
@@ -65,7 +65,7 @@ private:
 
 
   Handle(StepElement_HArray1OfSurfaceSection) theDefinitions;
-  Standard_Boolean theAdditionalNodeValues;
+  Standard_Boolean theAdditionalNodeValues{};
 
 
 };
index eef5f43892db370d35a596701b1dda2f8c4f4eec..51945bd31a146a3e43daed06393d2d382d0452d6 100644 (file)
@@ -69,7 +69,7 @@ protected:
 private:
 
 
-  Standard_Real theThickness;
+  Standard_Real theThickness{};
   StepElement_MeasureOrUnspecifiedValue theBendingThickness;
   StepElement_MeasureOrUnspecifiedValue theShearThickness;
 
index d4430739f3b77232ca775b7b0d6ec8116eac90bd..dfb0ea76cbe75919c81bacc9d3c15ec84cdbf938 100644 (file)
@@ -66,8 +66,8 @@ protected:
 private:
 
 
-  Standard_Integer theAxis;
-  Standard_Real theAngle;
+  Standard_Integer theAxis{};
+  Standard_Real theAngle{};
 
 
 };
index 21cc753bb64731bdbd7b99af09883bd5cc8029ae..5e2206d7bc7dfecc3c19ef1b4c9d6582928cb9a7 100644 (file)
@@ -59,7 +59,7 @@ protected:
 private:
 
 
-  Standard_Real theFeaConstant;
+  Standard_Real theFeaConstant{};
 
 
 };
index 1127a580c3cc5c5bb02146a64df64f7f6682e1bc..ce2db39a3860558bb6a8e7d3d13e0924478f7f96 100644 (file)
@@ -59,7 +59,7 @@ protected:
 private:
 
 
-  Standard_Real theFeaConstant;
+  Standard_Real theFeaConstant{};
 
 
 };
index 0c13239ef27a2b59d0b6e412c89ef1468e130833..4c741ad42a73ed7bd7c92edf8588713a5aeca579 100644 (file)
@@ -66,7 +66,7 @@ private:
 
 
   StepFEA_SymmetricTensor23d theFeaConstants;
-  Standard_Real theReferenceTemperature;
+  Standard_Real theReferenceTemperature{};
 
 
 };
index 0b284d0efafdde4cec6a87796d61d17f32e9ce06..0c5114158a573bb97a5db313acc7dbbeefbb6c96 100644 (file)
@@ -66,8 +66,8 @@ protected:
 private:
 
 
-  Standard_Integer theAxis;
-  Standard_Real theAngle;
+  Standard_Integer theAxis{};
+  Standard_Real theAngle{};
 
 
 };
index 26319a7c43e364d9ee7f302cb7dd17121aec78af..a6101e787c29b1b57ea97da74a7f0de1795b1d78 100644 (file)
@@ -110,17 +110,17 @@ static Standard_Integer StepFile_Read (const char* theName,
 
   sout << "      ...    STEP File   Read    ...\n";
 
-  Standard_Integer nbhead, nbrec, nbpar;
+  Standard_Integer nbhead = 0, nbrec = 0, nbpar = 0;
   aFileDataModel.GetFileNbR (&nbhead,&nbrec,&nbpar);  // renvoi par lex/yacc
   Handle(StepData_StepReaderData) undirec =
     new StepData_StepReaderData(nbhead,nbrec,nbpar, theStepModel->SourceCodePage());  // creation tableau de records
   for ( Standard_Integer nr = 1; nr <= nbrec; nr ++) {
-    int nbarg; char* ident; char* typrec = 0;
+    int nbarg = 0; char* ident = nullptr; char* typrec = 0;
     aFileDataModel.GetRecordDescription(&ident, &typrec, &nbarg);
     undirec->SetRecord (nr, ident, typrec, nbarg);
 
     if (nbarg>0) {
-      Interface_ParamType typa; char* val;
+      Interface_ParamType typa; char* val = nullptr;
       while(aFileDataModel.GetArgDescription (&typa, &val) == 1) {
         undirec->AddStepParam (nr, val, typa);
       }
index 98054dc1286fd2145fc723019af43fa9a34a5608..8fdfebb8a85cb0ba55c284add047219f4b400301 100644 (file)
@@ -35,9 +35,9 @@ class StepFile_ReadData::CharactersPage {
 
 public:
 
-  CharactersPage(const Standard_Integer theMaxCar) :myNext(NULL), myUsed(0)
+  CharactersPage(const Standard_Integer theMaxCar) :myNext(NULL), myCharacters(new char[theMaxCar]), myUsed(0)
   {
-    myCharacters = new char[theMaxCar];
+    
   }
 
   ~CharactersPage()
@@ -83,9 +83,9 @@ public:
 
 public:
 
-  ArgumentsPage(Standard_Integer theMaxArg) :myNext(NULL), myUsed(0)
+  ArgumentsPage(Standard_Integer theMaxArg) :myNext(NULL), myArgs(new Argument[theMaxArg]), myUsed(0)
   {
-    myArgs = new Argument[theMaxArg];
+    
   }
 
   ~ArgumentsPage()
@@ -151,9 +151,9 @@ class StepFile_ReadData::RecordsPage
 
 public:
 
-  RecordsPage(const Standard_Integer theMaxRec) :myNext(NULL), myUsed(0)
+  RecordsPage(const Standard_Integer theMaxRec) :myNext(NULL), myRecords(new Record[theMaxRec]), myUsed(0)
   {
-    myRecords = new Record[theMaxRec];
+    
   }
 
   ~RecordsPage()
@@ -205,11 +205,11 @@ StepFile_ReadData::StepFile_ReadData()
   myNbRec(0), myNbHead(0), myNbPar(0), myYaRec(0),
   myNumSub(0), myErrorArg(Standard_False), myResText(NULL), myCurrType(TextValue::SubList),
   mySubArg(NULL), myTypeArg(Interface_ParamSub), myCurrArg(NULL), myFirstRec(NULL),
-  myCurRec(NULL), myLastRec(NULL), myCurScope(NULL), myFirstError(NULL), myCurError(NULL)
+  myCurRec(NULL), myLastRec(NULL), myCurScope(NULL), myFirstError(NULL), myCurError(NULL), myOneCharPage(new CharactersPage(myMaxChar)), myOneArgPage(new ArgumentsPage(myMaxArg)), myOneRecPage(new RecordsPage(myMaxRec))
 {
-  myOneCharPage = new CharactersPage(myMaxChar);
-  myOneArgPage = new ArgumentsPage(myMaxArg);
-  myOneRecPage = new RecordsPage(myMaxRec);
+  
+  
+  
 };
 
 //=======================================================================
@@ -310,7 +310,7 @@ void StepFile_ReadData::RecordListStart()
 {
   if (myNumSub > 0)
   {
-    Record* aSubRec;
+    Record* aSubRec = nullptr;
     aSubRec = CreateNewRecord();
     switch (myNumSub)
     {
@@ -344,11 +344,11 @@ void StepFile_ReadData::RecordListStart()
 
 void StepFile_ReadData::CreateNewArg()
 {
-  Argument* aNewArg;
+  Argument* aNewArg = nullptr;
   myNbPar++;
   if (myOneArgPage->myUsed >= myMaxArg)
   {
-    ArgumentsPage* aNewArgPage;
+    ArgumentsPage* aNewArgPage = nullptr;
     aNewArgPage = new ArgumentsPage(myMaxArg);
     aNewArgPage->myNext = myOneArgPage;
     myOneArgPage = aNewArgPage;
@@ -409,8 +409,8 @@ void StepFile_ReadData::CreateErrorArg()
 
 void StepFile_ReadData::AddNewScope()
 {
-  Scope* aNewScope;
-  Record* aRecord;
+  Scope* aNewScope = nullptr;
+  Record* aRecord = nullptr;
   aNewScope = new Scope;
   aNewScope->myRecord = myCurRec;
   aNewScope->myPrevious = myCurScope;
@@ -429,8 +429,8 @@ void StepFile_ReadData::AddNewScope()
 
 void StepFile_ReadData::FinalOfScope()
 {
-  Scope* anOldScope;
-  Record* aRecord;
+  Scope* anOldScope = nullptr;
+  Record* aRecord = nullptr;
   if (myCurScope == NULL) return;
 
   aRecord = CreateNewRecord();
@@ -687,8 +687,8 @@ Standard_CString StepFile_ReadData::GetLastError() const
 
 char* StepFile_ReadData::RecordNewText(char* theText)
 {
-  char* aSavResText;
-  char* aNewText;
+  char* aSavResText = nullptr;
+  char* aNewText = nullptr;
   aSavResText = myResText;
   CreateNewText(theText, (int)strlen(theText));
   aNewText = myResText;
@@ -726,10 +726,10 @@ void StepFile_ReadData::AddNewRecord(Record* theNewRecord)
 
 StepFile_ReadData::Record* StepFile_ReadData::CreateNewRecord()
 {
-  Record* aNewRecord;
+  Record* aNewRecord = nullptr;
   if (myOneRecPage->myUsed >= myMaxRec)
   {
-    RecordsPage* aNewRecPage;
+    RecordsPage* aNewRecPage = nullptr;
     aNewRecPage = new RecordsPage(myMaxRec);
     aNewRecPage->myNext = myOneRecPage;
     myOneRecPage = aNewRecPage;
index 24d51f0a0a68c742afefeb3c2f1db40aee49e42d..262c68a86e49036cec2b1ff2c30f5886c324b070 100644 (file)
@@ -797,9 +797,9 @@ static int yy_flex_strlen ( const char * );
  */
 YY_DECL
 {
-       yy_state_type yy_current_state;
-       char *yy_cp, *yy_bp;
-       int yy_act;
+       yy_state_type yy_current_state = 0;
+       char *yy_cp = nullptr, *yy_bp = nullptr;
+       int yy_act = 0;
     
        if ( !(yy_init) )
                {
@@ -1146,7 +1146,7 @@ YY_FATAL_ERROR( "flex scanner jammed" );
                 */
                if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
                        { /* This was really a NUL. */
-                       yy_state_type yy_next_state;
+                       yy_state_type yy_next_state = 0;
 
                        (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
 
@@ -1373,8 +1373,8 @@ int yyFlexLexer::yy_get_next_buffer()
 {
        char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
        char *source = (yytext_ptr);
-       int number_to_move, i;
-       int ret_val;
+       int number_to_move = 0, i = 0;
+       int ret_val = 0;
 
        if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
                YY_FATAL_ERROR(
@@ -1479,8 +1479,8 @@ int yyFlexLexer::yy_get_next_buffer()
 
     yy_state_type yyFlexLexer::yy_get_previous_state()
 {
-       yy_state_type yy_current_state;
-       char *yy_cp;
+       yy_state_type yy_current_state = 0;
+       char *yy_cp = nullptr;
     
        yy_current_state = (yy_start);
 
@@ -1510,7 +1510,7 @@ int yyFlexLexer::yy_get_next_buffer()
  */
     yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
 {
-       int yy_is_jam;
+       int yy_is_jam = 0;
     
        YY_CHAR yy_c = 50;
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
@@ -1530,7 +1530,7 @@ int yyFlexLexer::yy_get_next_buffer()
 #ifndef YY_NO_UNPUT
     void yyFlexLexer::yyunput( int c, char* yy_bp)
 {
-       char *yy_cp;
+       char *yy_cp = nullptr;
     
     yy_cp = (yy_c_buf_p);
 
@@ -1568,7 +1568,7 @@ int yyFlexLexer::yy_get_next_buffer()
 
     int yyFlexLexer::yyinput()
 {
-       int c;
+       int c = 0;
     
        *(yy_c_buf_p) = (yy_hold_char);
 
@@ -1715,7 +1715,7 @@ void yyFlexLexer::yyrestart( std::istream* input_file )
  */
     YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
 {
-       YY_BUFFER_STATE b;
+       YY_BUFFER_STATE b = nullptr;
     
        b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
        if ( ! b )
@@ -1878,7 +1878,7 @@ void yyFlexLexer::yypop_buffer_state (void)
  */
 void yyFlexLexer::yyensure_buffer_stack(void)
 {
-       yy_size_t num_to_alloc;
+       yy_size_t num_to_alloc = 0;
     
        if (!(yy_buffer_stack)) {
 
@@ -1923,7 +1923,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
 {
        if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
                {
-               yy_size_t new_size;
+               yy_size_t new_size = 0;
 
                (yy_start_stack_depth) += YY_START_STACK_INCR;
                new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
index 32a8fee759fa1c58d174ed9ec8165494360c8add..00297407f28900740e756c0f6aa800f77287b29e 100644 (file)
@@ -174,7 +174,7 @@ namespace step {
   template <typename Base>
   parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (semantic_type) v)
     : Base (t)
-    , value (YY_MOVE (v))
+    , value (v)
   {}
 
   template <typename Base>
@@ -206,7 +206,7 @@ namespace step {
 
 #if 201103L <= YY_CPLUSPLUS
   parser::by_kind::by_kind (by_kind&& that)
-    : kind_ (that.kind_)
noexcept     : kind_ (that.kind_)
   {
     that.clear ();
   }
@@ -285,7 +285,7 @@ namespace step {
   {}
 
   parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that)
   : super_type (YY_MOVE (that.state), YY_MOVE (that.value))
noexcept     : super_type (that.state, YY_MOVE (that.value))
   {
 #if 201103L <= YY_CPLUSPLUS
     // that is emptied.
@@ -434,7 +434,7 @@ namespace step {
   int
   parser::parse ()
   {
-    int yyn;
+    int yyn = 0;
     /// Length of the RHS of the rule being reduced.
     int yylen = 0;
 
@@ -446,7 +446,7 @@ namespace step {
     symbol_type yyla;
 
     /// The return value of parse ().
-    int yyresult;
+    int yyresult = 0;
 
 #if YY_EXCEPTIONS
     try
@@ -686,7 +686,7 @@ namespace step {
         ++yynerrs_;
         context yyctx (*this, yyla);
         std::string msg = yysyntax_error_ (yyctx);
-        error (YY_MOVE (msg));
+        error (msg);
       }
 
 
index 914aac07b0b12dae491ff7ac609c44ee25121427..82a82c061e166473954dfedab8040f63f7631e95 100644 (file)
@@ -405,7 +405,7 @@ namespace step {
 
 #if 201103L <= YY_CPLUSPLUS
       /// Move constructor.
-      by_kind (by_kind&& that);
+      by_kind (by_kind&& that) noexcept;
 #endif
 
       /// Copy constructor.
@@ -655,7 +655,7 @@ namespace step {
       /// Construct an empty symbol.
       stack_symbol_type ();
       /// Move or copy construction.
-      stack_symbol_type (YY_RVREF (stack_symbol_type) that);
+      stack_symbol_type (YY_RVREF (stack_symbol_type) that) noexcept;
       /// Steal the contents from \a sym to build this.
       stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
 #if YY_CPLUSPLUS < 201103L
index 2db12165a1b422d0b2842a9b3d94d70c6673b167..ce3e8e07001ffbe69ce04be18deb91dde78c9966 100644 (file)
@@ -64,7 +64,7 @@ private:
 
 
   Handle(StepGeom_Direction) axis;
-  Standard_Boolean hasAxis;
+  Standard_Boolean hasAxis{};
 
 
 };
index b13f8d7b1270ff14c4d0af77a53bd0071c372d28..347572b63f47d029c9841445ce09509a5470a800 100644 (file)
@@ -64,7 +64,7 @@ private:
 
 
   Handle(StepGeom_Direction) refDirection;
-  Standard_Boolean hasRefDirection;
+  Standard_Boolean hasRefDirection{};
 
 
 };
index 82a199393f2f93127a572720d7e6376ae81d7492..ea4ee823afcf9aee941efaee282da72465b7bc40 100644 (file)
@@ -73,8 +73,8 @@ private:
 
   Handle(StepGeom_Direction) axis;
   Handle(StepGeom_Direction) refDirection;
-  Standard_Boolean hasAxis;
-  Standard_Boolean hasRefDirection;
+  Standard_Boolean hasAxis{};
+  Standard_Boolean hasRefDirection{};
 
 
 };
index 8dfaf7c9d7032b30307f1f7e6ca951a290b67f19..6c5de1b65511d6e5562d471a43559e62f2018306 100644 (file)
@@ -81,7 +81,7 @@ protected:
 private:
 
 
-  Standard_Integer degree;
+  Standard_Integer degree{};
   Handle(StepGeom_HArray1OfCartesianPoint) controlPointsList;
   StepGeom_BSplineCurveForm curveForm;
   StepData_Logical closedCurve;
index 59fe5fd4e7bf113f5d437675e40e15c3a85ad895..86a5c5a772d0783a3a5f704f2953b83f8061c354 100644 (file)
@@ -91,8 +91,8 @@ protected:
 private:
 
 
-  Standard_Integer uDegree;
-  Standard_Integer vDegree;
+  Standard_Integer uDegree{};
+  Standard_Integer vDegree{};
   Handle(StepGeom_HArray2OfCartesianPoint) controlPointsList;
   StepGeom_BSplineSurfaceForm surfaceForm;
   StepData_Logical uClosed;
index daab1642d6231137541b0fa6de0027fe2c47605e..94e51b8cc15d7eafcb46288331ad6e7cc909f6bf 100644 (file)
@@ -66,8 +66,8 @@ protected:
 private:
 
 
-  Standard_Integer nbcoord;
-  Standard_Real coords[3];
+  Standard_Integer nbcoord{};
+  Standard_Real coords[3]{};
 
 
 };
index 054cc2fbd6d1851a27cce14bbb8d8a2d9e4a60ae..d2edfbcdc64a2a729a0ca7056fbae636c7efe996 100644 (file)
@@ -85,10 +85,10 @@ private:
   Handle(StepGeom_Direction) axis1;
   Handle(StepGeom_Direction) axis2;
   Handle(StepGeom_CartesianPoint) localOrigin;
-  Standard_Real scale;
-  Standard_Boolean hasAxis1;
-  Standard_Boolean hasAxis2;
-  Standard_Boolean hasScale;
+  Standard_Real scale{};
+  Standard_Boolean hasAxis1{};
+  Standard_Boolean hasAxis2{};
+  Standard_Boolean hasScale{};
 
 
 };
index 576b2b1c7483bc013f27bbaef76bc2fe88911541..449cbcc85e85ddf2314f2e06b9791186ba5d37b5 100644 (file)
@@ -63,7 +63,7 @@ private:
 
 
   Handle(StepGeom_Direction) axis3;
-  Standard_Boolean hasAxis3;
+  Standard_Boolean hasAxis3{};
 
 
 };
index e3dfc5828690bc07e0f96c57b114ea92bfec062f..e73ea112a0514b053d8318588b82b7754d4f4d67 100644 (file)
@@ -57,7 +57,7 @@ protected:
 private:
 
 
-  Standard_Real radius;
+  Standard_Real radius{};
 
 
 };
index 9db52e3f1ff5ae6ad49cc9fad99b57e158f04a3a..4b8b3e8383367106075a87217a5671a8884d5580 100644 (file)
@@ -66,7 +66,7 @@ private:
 
 
   StepGeom_TransitionCode transition;
-  Standard_Boolean sameSense;
+  Standard_Boolean sameSense{};
   Handle(StepGeom_Curve) parentCurve;
 
 
index fa98f9846eb167375eb4c02bcdd44c10093f3ac1..29f66c0b199ddd7f12448bd64a12f5b9a1ecbd26 100644 (file)
@@ -61,8 +61,8 @@ protected:
 private:
 
 
-  Standard_Real radius;
-  Standard_Real semiAngle;
+  Standard_Real radius{};
+  Standard_Real semiAngle{};
 
 
 };
index b62d74cdd679e851fc63c8fd149e7360b2e8975e..51b6a07b5c2b531ac4fd8d836b89850e9c492493 100644 (file)
@@ -75,7 +75,7 @@ private:
 
   Handle(StepGeom_Surface) theBasisSurface;
   Handle(StepGeom_HArray1OfSurfaceBoundary) theBoundaries;
-  Standard_Boolean theImplicitOuter;
+  Standard_Boolean theImplicitOuter{};
 
 
 };
index 36158a8f9980a50970709bae8deeb7b9e6fc3f70..b213bf54e084a4f4c31151b7e06102bcd59ee137 100644 (file)
@@ -57,7 +57,7 @@ protected:
 private:
 
 
-  Standard_Real radius;
+  Standard_Real radius{};
 
 
 };
index 2a5674ba12f956e542fe343f96e171f9ade7e7c8..46cb6e736e0e83005f4e23eaa12ad37d8196ce20 100644 (file)
@@ -57,7 +57,7 @@ protected:
 private:
 
 
-  Standard_Boolean selectOuter;
+  Standard_Boolean selectOuter{};
 
 
 };
index 5d08511a6c53e2a889c7490bfb314462f0bd4baf..8cfb607ff906071581f027ab5d204fbd3ccd7e6b 100644 (file)
@@ -61,8 +61,8 @@ protected:
 private:
 
 
-  Standard_Real semiAxis1;
-  Standard_Real semiAxis2;
+  Standard_Real semiAxis1{};
+  Standard_Real semiAxis2{};
 
 
 };
index 0683821dbe4521a9b8cec761f3db9e5a820859f9..29d89828eb6137a1aae8d68d48335a284837aa7f 100644 (file)
@@ -57,7 +57,7 @@ protected:
 private:
 
 
-  Standard_Integer coordinateSpaceDimension;
+  Standard_Integer coordinateSpaceDimension{};
 
 
 };
index 10f3035112261eebbd766cc07c5a84fa1c6c822c..9d719751d09b20d36c928224135b4401041e8eaf 100644 (file)
@@ -61,8 +61,8 @@ protected:
 private:
 
 
-  Standard_Real semiAxis;
-  Standard_Real semiImagAxis;
+  Standard_Real semiAxis{};
+  Standard_Real semiImagAxis{};
 
 
 };
index 5b541e3ecbd871a59f34ef8cdb6389ffbf785f61..cc6a26d070b9da0627c0662fc35e6e766123be42 100644 (file)
@@ -71,7 +71,7 @@ private:
 
 
   Handle(StepGeom_Curve) basisCurve;
-  Standard_Real distance;
+  Standard_Real distance{};
   StepData_Logical selfIntersect;
   Handle(StepGeom_Direction) refDirection;
 
index 4bf545f8bd56d521a32c0bc542d92e6df0aaff11..8e9e3cfc3e0396ffeea40b81a5d0afaa4f44fdd7 100644 (file)
@@ -67,7 +67,7 @@ private:
 
 
   Handle(StepGeom_Surface) basisSurface;
-  Standard_Real distance;
+  Standard_Real distance{};
   StepData_Logical selfIntersect;
 
 
index 0f746f501e255ff031bfcf173766c3cd5b8f62c2..9facf97a6dab31da35cba49a1cf411b17a6f04dd 100644 (file)
@@ -59,7 +59,7 @@ protected:
 private:
 
 
-  Standard_Boolean theOrientation;
+  Standard_Boolean theOrientation{};
 
 
 };
index 1d7d7c74863805ddbaae28917b7680d0ee4d20f2..679cacb256ef6e5ba1d12d6cdbe26ab170e0bf81 100644 (file)
@@ -57,7 +57,7 @@ protected:
 private:
 
 
-  Standard_Real focalDist;
+  Standard_Real focalDist{};
 
 
 };
index 719b22ef5d6e9eeeed5e9e1929361c77db06cd31..fa5b4e87b83ba1d47e53a2d447afecc95c2d26c6 100644 (file)
@@ -62,7 +62,7 @@ private:
 
 
   Handle(StepGeom_Curve) basisCurve;
-  Standard_Real pointParameter;
+  Standard_Real pointParameter{};
 
 
 };
index bf29823bdb3f8a9dd12601522aa7f26edef219b3..d4c432a664efdc58fae5352b08a6c0aaed4131b7 100644 (file)
@@ -67,8 +67,8 @@ private:
 
 
   Handle(StepGeom_Surface) basisSurface;
-  Standard_Real pointParameterU;
-  Standard_Real pointParameterV;
+  Standard_Real pointParameterU{};
+  Standard_Real pointParameterV{};
 
 
 };
index f3cfa0bf056bcf3db800ec74e8b41f32a7a3df12..62936fa4672d43e8356e7b86d7a307582e881d05 100644 (file)
@@ -84,12 +84,12 @@ private:
 
 
   Handle(StepGeom_Surface) basisSurface;
-  Standard_Real u1;
-  Standard_Real u2;
-  Standard_Real v1;
-  Standard_Real v2;
-  Standard_Boolean usense;
-  Standard_Boolean vsense;
+  Standard_Real u1{};
+  Standard_Real u2{};
+  Standard_Real v1{};
+  Standard_Real v2{};
+  Standard_Boolean usense{};
+  Standard_Boolean vsense{};
 
 
 };
index ca3ab395886aac07e5fb2f366534dddfd7089f55..30cd11607e1755cfea77eb7185beaab43fb41a98 100644 (file)
@@ -57,7 +57,7 @@ protected:
 private:
 
 
-  Standard_Real paramLength;
+  Standard_Real paramLength{};
 
 
 };
index 6d23c633316a1a767d7f4e15aec08160d319bfe8..a0f4d0100cabbfadb88b2c2689d2dbf51737b255 100644 (file)
@@ -57,7 +57,7 @@ protected:
 private:
 
 
-  Standard_Real radius;
+  Standard_Real radius{};
 
 
 };
index 2874a986b03bbf3b1439f8c6d20db6f234a3dad0..38eb7f97c01d444f9d91d938811408a80d1d8c40 100644 (file)
@@ -74,12 +74,12 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepGeom_SuParameters, StepGeom_GeometricRepresentationItem)
 
 private:
-  Standard_Real myA;
-  Standard_Real myAlpha;
-  Standard_Real myB;
-  Standard_Real myBeta;
-  Standard_Real myC;
-  Standard_Real myGamma;
+  Standard_Real myA{};
+  Standard_Real myAlpha{};
+  Standard_Real myB{};
+  Standard_Real myBeta{};
+  Standard_Real myC{};
+  Standard_Real myGamma{};
 
 };
 #endif // _StepGeom_SuParameters_HeaderFile_
index 2f3d98cdcf2227f085eee2419cba9c0b644d6d3d..0c42cafb45fed8b8ef96b7b26a0a91117d2a0033 100644 (file)
@@ -76,8 +76,8 @@ private:
   Handle(StepGeom_BoundedSurface) parentSurface;
   StepGeom_TransitionCode uTransition;
   StepGeom_TransitionCode vTransition;
-  Standard_Boolean uSense;
-  Standard_Boolean vSense;
+  Standard_Boolean uSense{};
+  Standard_Boolean vSense{};
 
 
 };
index f2ade9a217c309c9adf166294e7832cb090c5657..6d4c19f4ede1b24d5c6ec7d22d4ba588ef1fcae0 100644 (file)
@@ -61,8 +61,8 @@ protected:
 private:
 
 
-  Standard_Real majorRadius;
-  Standard_Real minorRadius;
+  Standard_Real majorRadius{};
+  Standard_Real minorRadius{};
 
 
 };
index 45a186c18b198e8aef2e0cced1c3e329e98a5414..649fd34d65c348b435e967460af1f33c86e453b0 100644 (file)
@@ -88,7 +88,7 @@ private:
   Handle(StepGeom_Curve) basisCurve;
   Handle(StepGeom_HArray1OfTrimmingSelect) trim1;
   Handle(StepGeom_HArray1OfTrimmingSelect) trim2;
-  Standard_Boolean senseAgreement;
+  Standard_Boolean senseAgreement{};
   StepGeom_TrimmingPreference masterRepresentation;
 
 
index d407840e753076d572183e5b1413e6ac3f9c439c..211eddcf6891b5855bc6b2f14f702de936650dd5 100644 (file)
@@ -62,7 +62,7 @@ private:
 
 
   Handle(StepGeom_Direction) orientation;
-  Standard_Real magnitude;
+  Standard_Real magnitude{};
 
 
 };
index 123f8f3024e3e4e0c41f4ff43206180b40120876..987c603e17a06dacc9b032efba399fcbc3e652d9 100644 (file)
@@ -22,14 +22,14 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ActuatedKinematicPair, StepKinematics_
 //function : StepKinematics_ActuatedKinematicPair
 //purpose  :
 //=======================================================================
-StepKinematics_ActuatedKinematicPair::StepKinematics_ActuatedKinematicPair ()
+StepKinematics_ActuatedKinematicPair::StepKinematics_ActuatedKinematicPair () : defTX(Standard_False), defTY(Standard_False), defTZ(Standard_False), defRX(Standard_False), defRY(Standard_False), defRZ(Standard_False)
 {
-  defTX = Standard_False;
-  defTY = Standard_False;
-  defTZ = Standard_False;
-  defRX = Standard_False;
-  defRY = Standard_False;
-  defRZ = Standard_False;
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index 9c1f07c8e20a54a37240b2e6aa2ef9fdb32d470e..9978a401209bd8db5cd999c0c1f7a7a0fd3967a1 100644 (file)
@@ -52,8 +52,8 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_CylindricalPairValue, StepKinematics_PairValue)
 
 private:
-  Standard_Real myActualTranslation;
-  Standard_Real myActualRotation;
+  Standard_Real myActualTranslation{};
+  Standard_Real myActualRotation{};
 
 };
 #endif // _StepKinematics_CylindricalPairValue_HeaderFile_
index 81dbb23807b0b0fd57d0751f7cbb5bb1202a8c48..b5de1f4a671606296c18516e9042472bf590ba7a 100644 (file)
@@ -22,12 +22,12 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_CylindricalPairWithRange, StepKinemati
 //function : StepKinematics_CylindricalPairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_CylindricalPairWithRange::StepKinematics_CylindricalPairWithRange ()
+StepKinematics_CylindricalPairWithRange::StepKinematics_CylindricalPairWithRange () : defLowerLimitActualTranslation(Standard_False), defUpperLimitActualTranslation(Standard_False), defLowerLimitActualRotation(Standard_False), defUpperLimitActualRotation(Standard_False)
 {
-  defLowerLimitActualTranslation = Standard_False;
-  defUpperLimitActualTranslation = Standard_False;
-  defLowerLimitActualRotation = Standard_False;
-  defUpperLimitActualRotation = Standard_False;
+  
+  
+  
+  
 }
 
 //=======================================================================
index b1d9369fe2594e1e6195cd211ddc7a83d7274e48..ace87a53abbdf97001ef07b50b229b155af4fe3f 100644 (file)
@@ -88,10 +88,10 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_CylindricalPairWithRange, StepKinematics_CylindricalPair)
 
 private:
-  Standard_Real myLowerLimitActualTranslation; //!< optional
-  Standard_Real myUpperLimitActualTranslation; //!< optional
-  Standard_Real myLowerLimitActualRotation; //!< optional
-  Standard_Real myUpperLimitActualRotation; //!< optional
+  Standard_Real myLowerLimitActualTranslation{}; //!< optional
+  Standard_Real myUpperLimitActualTranslation{}; //!< optional
+  Standard_Real myLowerLimitActualRotation{}; //!< optional
+  Standard_Real myUpperLimitActualRotation{}; //!< optional
   Standard_Boolean defLowerLimitActualTranslation; //!< flag "is LowerLimitActualTranslation defined"
   Standard_Boolean defUpperLimitActualTranslation; //!< flag "is UpperLimitActualTranslation defined"
   Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined"
index ed70c155450c70a8fb1c8963c310fe974f65ab9b..fb978deb6e8057d47250f734cff724c75897e25c 100644 (file)
@@ -76,11 +76,11 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_GearPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling)
 
 private:
-  Standard_Real myRadiusFirstLink;
-  Standard_Real myRadiusSecondLink;
-  Standard_Real myBevel;
-  Standard_Real myHelicalAngle;
-  Standard_Real myGearRatio;
+  Standard_Real myRadiusFirstLink{};
+  Standard_Real myRadiusSecondLink{};
+  Standard_Real myBevel{};
+  Standard_Real myHelicalAngle{};
+  Standard_Real myGearRatio{};
 
 };
 #endif // _StepKinematics_GearPair_HeaderFile_
index 0e8b800d80ff7ca1e32d77bb08280342e6478292..e5c2a949be48cdadd8a67eeb213161d93ed7dea1 100644 (file)
@@ -46,7 +46,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_GearPairValue, StepKinematics_PairValue)
 
 private:
-  Standard_Real myActualRotation1;
+  Standard_Real myActualRotation1{};
 
 };
 #endif // _StepKinematics_GearPairValue_HeaderFile_
index 4e2448f80a07a732e68ce69283361ae241e350d4..208a8d83d7bc66195374240104d6e4f9f0abbc66 100644 (file)
@@ -22,10 +22,10 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_GearPairWithRange, StepKinematics_Gear
 //function : StepKinematics_GearPairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_GearPairWithRange::StepKinematics_GearPairWithRange ()
+StepKinematics_GearPairWithRange::StepKinematics_GearPairWithRange () : defLowerLimitActualRotation1(Standard_False), defUpperLimitActualRotation1(Standard_False)
 {
-  defLowerLimitActualRotation1 = Standard_False;
-  defUpperLimitActualRotation1 = Standard_False;
+  
+  
 }
 
 //=======================================================================
index c90048fd8cb6faaeb1b1842d81565b42bb0cc4a4..1f7f806ce5fba37b24d20af2b8a02912f987a7d6 100644 (file)
@@ -69,8 +69,8 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_GearPairWithRange, StepKinematics_GearPair)
 
 private:
-  Standard_Real myLowerLimitActualRotation1; //!< optional
-  Standard_Real myUpperLimitActualRotation1; //!< optional
+  Standard_Real myLowerLimitActualRotation1{}; //!< optional
+  Standard_Real myUpperLimitActualRotation1{}; //!< optional
   Standard_Boolean defLowerLimitActualRotation1; //!< flag "is LowerLimitActualRotation1 defined"
   Standard_Boolean defUpperLimitActualRotation1; //!< flag "is UpperLimitActualRotation1 defined"
 
index 71d12f2a1fc70846a10f1c0f386440e3ab782100..87cfb8a0bb1207510686f252fcc53f446d6e4585 100644 (file)
@@ -52,7 +52,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_LinearFlexibleAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling)
 
 private:
-  Standard_Real myPinionRadius;
+  Standard_Real myPinionRadius{};
 
 };
 #endif // _StepKinematics_LinearFlexibleAndPinionPair_HeaderFile_
index 10c0b7efdbcbb3e2d35ea19f9f757afb198c26e0..7fa05f10e6ce547ce77b985ecff1f4f683df7604 100644 (file)
@@ -60,7 +60,7 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_LinearFlexibleAndPlanarCurvePair, StepKin
 
 private:
   Handle(StepGeom_Curve) myPairCurve;
-  Standard_Boolean myOrientation;
+  Standard_Boolean myOrientation{};
 
 };
 #endif // _StepKinematics_LinearFlexibleAndPlanarCurvePair_HeaderFile_
index f395c1645376f354a3d5a61aeaf7fdc240b0d7b9..49e02404ccfd99dfbcf593bac1cdb9c403824ccb 100644 (file)
@@ -82,12 +82,12 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPair, StepKinematics_KinematicPair)
 
 private:
-  Standard_Boolean myTX;
-  Standard_Boolean myTY;
-  Standard_Boolean myTZ;
-  Standard_Boolean myRX;
-  Standard_Boolean myRY;
-  Standard_Boolean myRZ;
+  Standard_Boolean myTX{};
+  Standard_Boolean myTY{};
+  Standard_Boolean myTZ{};
+  Standard_Boolean myRX{};
+  Standard_Boolean myRY{};
+  Standard_Boolean myRZ{};
 
 };
 #endif // _StepKinematics_LowOrderKinematicPair_HeaderFile_
index b5f9c51041cd97866da023faeeaf84a244dc84a9..db22ca7296eb3502e175b50c9bacddeb81d1b303 100644 (file)
@@ -76,12 +76,12 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPairValue, StepKinematics_PairValue)
 
 private:
-  Standard_Real myActualTranslationX;
-  Standard_Real myActualTranslationY;
-  Standard_Real myActualTranslationZ;
-  Standard_Real myActualRotationX;
-  Standard_Real myActualRotationY;
-  Standard_Real myActualRotationZ;
+  Standard_Real myActualTranslationX{};
+  Standard_Real myActualTranslationY{};
+  Standard_Real myActualTranslationZ{};
+  Standard_Real myActualRotationX{};
+  Standard_Real myActualRotationY{};
+  Standard_Real myActualRotationZ{};
 
 };
 #endif // _StepKinematics_LowOrderKinematicPairValue_HeaderFile_
index 277303707b288670b5a21c64a365956380a271c0..fb85ca269fd5cd811ecd47520476abb602f710ae 100644 (file)
@@ -22,20 +22,20 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPairWithRange, StepKi
 //function : StepKinematics_LowOrderKinematicPairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_LowOrderKinematicPairWithRange::StepKinematics_LowOrderKinematicPairWithRange ()
-{
-  defLowerLimitActualRotationX = Standard_False;
-  defUpperLimitActualRotationX = Standard_False;
-  defLowerLimitActualRotationY = Standard_False;
-  defUpperLimitActualRotationY = Standard_False;
-  defLowerLimitActualRotationZ = Standard_False;
-  defUpperLimitActualRotationZ = Standard_False;
-  defLowerLimitActualTranslationX = Standard_False;
-  defUpperLimitActualTranslationX = Standard_False;
-  defLowerLimitActualTranslationY = Standard_False;
-  defUpperLimitActualTranslationY = Standard_False;
-  defLowerLimitActualTranslationZ = Standard_False;
-  defUpperLimitActualTranslationZ = Standard_False;
+StepKinematics_LowOrderKinematicPairWithRange::StepKinematics_LowOrderKinematicPairWithRange () : defLowerLimitActualRotationX(Standard_False), defUpperLimitActualRotationX(Standard_False), defLowerLimitActualRotationY(Standard_False), defUpperLimitActualRotationY(Standard_False), defLowerLimitActualRotationZ(Standard_False), defUpperLimitActualRotationZ(Standard_False), defLowerLimitActualTranslationX(Standard_False), defUpperLimitActualTranslationX(Standard_False), defLowerLimitActualTranslationY(Standard_False), defUpperLimitActualTranslationY(Standard_False), defLowerLimitActualTranslationZ(Standard_False), defUpperLimitActualTranslationZ(Standard_False)
+{
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index ca4bc55da65282d3993f312ba04c21127f4f4a3a..1364f902f2f09730f20637d5569ce0f87c11f665 100644 (file)
@@ -160,18 +160,18 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPairWithRange, StepKinematics_LowOrderKinematicPair)
 
 private:
-  Standard_Real myLowerLimitActualRotationX; //!< optional
-  Standard_Real myUpperLimitActualRotationX; //!< optional
-  Standard_Real myLowerLimitActualRotationY; //!< optional
-  Standard_Real myUpperLimitActualRotationY; //!< optional
-  Standard_Real myLowerLimitActualRotationZ; //!< optional
-  Standard_Real myUpperLimitActualRotationZ; //!< optional
-  Standard_Real myLowerLimitActualTranslationX; //!< optional
-  Standard_Real myUpperLimitActualTranslationX; //!< optional
-  Standard_Real myLowerLimitActualTranslationY; //!< optional
-  Standard_Real myUpperLimitActualTranslationY; //!< optional
-  Standard_Real myLowerLimitActualTranslationZ; //!< optional
-  Standard_Real myUpperLimitActualTranslationZ; //!< optional
+  Standard_Real myLowerLimitActualRotationX{}; //!< optional
+  Standard_Real myUpperLimitActualRotationX{}; //!< optional
+  Standard_Real myLowerLimitActualRotationY{}; //!< optional
+  Standard_Real myUpperLimitActualRotationY{}; //!< optional
+  Standard_Real myLowerLimitActualRotationZ{}; //!< optional
+  Standard_Real myUpperLimitActualRotationZ{}; //!< optional
+  Standard_Real myLowerLimitActualTranslationX{}; //!< optional
+  Standard_Real myUpperLimitActualTranslationX{}; //!< optional
+  Standard_Real myLowerLimitActualTranslationY{}; //!< optional
+  Standard_Real myUpperLimitActualTranslationY{}; //!< optional
+  Standard_Real myLowerLimitActualTranslationZ{}; //!< optional
+  Standard_Real myUpperLimitActualTranslationZ{}; //!< optional
   Standard_Boolean defLowerLimitActualRotationX; //!< flag "is LowerLimitActualRotationX defined"
   Standard_Boolean defUpperLimitActualRotationX; //!< flag "is UpperLimitActualRotationX defined"
   Standard_Boolean defLowerLimitActualRotationY; //!< flag "is LowerLimitActualRotationY defined"
index 7dca9ea9f74205c881b10e7817277bef2fd739f1..b5570da5f45fe0b6bd6828232c51f62dfb11720e 100644 (file)
@@ -24,7 +24,7 @@ StepKinematics_MechanismStateRepresentation::StepKinematics_MechanismStateRepres
 void StepKinematics_MechanismStateRepresentation::Init(const Handle(TCollection_HAsciiString)& theName,
                                                             const Handle(StepRepr_HArray1OfRepresentationItem)& theItems,
                                                             const Handle(StepRepr_RepresentationContext)& theContextOfItems,
-                                                            const Handle(StepKinematics_MechanismRepresentation) theMechanism)
+                                                            const Handle(StepKinematics_MechanismRepresentation)& theMechanism)
 {
        StepRepr_Representation::Init(theName, theItems, theContextOfItems);
        myRepresentedMechanism = theMechanism;
index 82ee1ca25cde65c3a55f0e0f123684ea5b03629e..7e26f9c1890ed307aee6ea44faa36ec1e951711c 100644 (file)
@@ -34,7 +34,7 @@ public:
   //! Returns a MechanismStateRepresentation
   Standard_EXPORT StepKinematics_MechanismStateRepresentation();
 
-  Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, const Handle(StepKinematics_MechanismRepresentation) theMechanism);
+  Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, const Handle(StepKinematics_MechanismRepresentation)& theMechanism);
 
   Standard_EXPORT void SetMechanism(const Handle(StepKinematics_MechanismRepresentation)& theMechanism);
 
index 5ee0512fd5ae4b40be5b516767350d9ce126c20a..b5a7afddd89b321543c57e14267a4227f9587835 100644 (file)
@@ -67,7 +67,7 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_PlanarCurvePair, StepKinematics_HighOrder
 private:
   Handle(StepGeom_Curve) myCurve1;
   Handle(StepGeom_Curve) myCurve2;
-  Standard_Boolean myOrientation;
+  Standard_Boolean myOrientation{};
 
 };
 #endif // _StepKinematics_PlanarCurvePair_HeaderFile_
index a6a2560d0af73b1db91957fdfa0b211243b00ea8..eb5509a3f83c84eee37b4de6fb3e8c10df4c3acd 100644 (file)
@@ -58,9 +58,9 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_PlanarPairValue, StepKinematics_PairValue)
 
 private:
-  Standard_Real myActualRotation;
-  Standard_Real myActualTranslationX;
-  Standard_Real myActualTranslationY;
+  Standard_Real myActualRotation{};
+  Standard_Real myActualTranslationX{};
+  Standard_Real myActualTranslationY{};
 
 };
 #endif // _StepKinematics_PlanarPairValue_HeaderFile_
index 3328a4a0eecc2e941c0c321f4b02ae4f6fbdbf8a..e0e578f14193d7de7befbbbf502ea0ba41499481 100644 (file)
@@ -22,14 +22,14 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PlanarPairWithRange, StepKinematics_Pl
 //function : StepKinematics_PlanarPairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_PlanarPairWithRange::StepKinematics_PlanarPairWithRange ()
+StepKinematics_PlanarPairWithRange::StepKinematics_PlanarPairWithRange () : defLowerLimitActualRotation(Standard_False), defUpperLimitActualRotation(Standard_False), defLowerLimitActualTranslationX(Standard_False), defUpperLimitActualTranslationX(Standard_False), defLowerLimitActualTranslationY(Standard_False), defUpperLimitActualTranslationY(Standard_False)
 {
-  defLowerLimitActualRotation = Standard_False;
-  defUpperLimitActualRotation = Standard_False;
-  defLowerLimitActualTranslationX = Standard_False;
-  defUpperLimitActualTranslationX = Standard_False;
-  defLowerLimitActualTranslationY = Standard_False;
-  defUpperLimitActualTranslationY = Standard_False;
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index 3ccff45350c5f2ed5dce24146ae10f06058b9503..a08c6efd6b1f9736cd8702b3c6573e6e92bf4454 100644 (file)
@@ -106,12 +106,12 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_PlanarPairWithRange, StepKinematics_PlanarPair)
 
 private:
-  Standard_Real myLowerLimitActualRotation; //!< optional
-  Standard_Real myUpperLimitActualRotation; //!< optional
-  Standard_Real myLowerLimitActualTranslationX; //!< optional
-  Standard_Real myUpperLimitActualTranslationX; //!< optional
-  Standard_Real myLowerLimitActualTranslationY; //!< optional
-  Standard_Real myUpperLimitActualTranslationY; //!< optional
+  Standard_Real myLowerLimitActualRotation{}; //!< optional
+  Standard_Real myUpperLimitActualRotation{}; //!< optional
+  Standard_Real myLowerLimitActualTranslationX{}; //!< optional
+  Standard_Real myUpperLimitActualTranslationX{}; //!< optional
+  Standard_Real myLowerLimitActualTranslationY{}; //!< optional
+  Standard_Real myUpperLimitActualTranslationY{}; //!< optional
   Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined"
   Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined"
   Standard_Boolean defLowerLimitActualTranslationX; //!< flag "is LowerLimitActualTranslationX defined"
index 8fee9cdf321f10e98b7e01785c078c1651a4c28b..0b4ca057583f0bcb6b5e1bac875f8b95f330789f 100644 (file)
@@ -60,7 +60,7 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_PointOnPlanarCurvePair, StepKinematics_Hi
 
 private:
   Handle(StepGeom_Curve) myPairCurve;
-  Standard_Boolean myOrientation;
+  Standard_Boolean myOrientation{};
 
 };
 #endif // _StepKinematics_PointOnPlanarCurvePair_HeaderFile_
index e6027ad144f684ebb8a33db82b2ec2276764a44d..d8bff3989e8b73be4972889207bd6be2058ed6b0 100644 (file)
@@ -22,14 +22,14 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PointOnPlanarCurvePairWithRange, StepK
 //function : StepKinematics_PointOnPlanarCurvePairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_PointOnPlanarCurvePairWithRange::StepKinematics_PointOnPlanarCurvePairWithRange ()
+StepKinematics_PointOnPlanarCurvePairWithRange::StepKinematics_PointOnPlanarCurvePairWithRange () : defLowerLimitYaw(Standard_False), defUpperLimitYaw(Standard_False), defLowerLimitPitch(Standard_False), defUpperLimitPitch(Standard_False), defLowerLimitRoll(Standard_False), defUpperLimitRoll(Standard_False)
 {
-  defLowerLimitYaw = Standard_False;
-  defUpperLimitYaw = Standard_False;
-  defLowerLimitPitch = Standard_False;
-  defUpperLimitPitch = Standard_False;
-  defLowerLimitRoll = Standard_False;
-  defUpperLimitRoll = Standard_False;
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index c49ef2fe3c2098d2ba6ae91230f4308a46f60222..d88f8c776b6f657027cad0e324864698263d6760 100644 (file)
@@ -111,12 +111,12 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_PointOnPlanarCurvePairWithRange, StepKine
 
 private:
   Handle(StepGeom_TrimmedCurve) myRangeOnPairCurve;
-  Standard_Real myLowerLimitYaw; //!< optional
-  Standard_Real myUpperLimitYaw; //!< optional
-  Standard_Real myLowerLimitPitch; //!< optional
-  Standard_Real myUpperLimitPitch; //!< optional
-  Standard_Real myLowerLimitRoll; //!< optional
-  Standard_Real myUpperLimitRoll; //!< optional
+  Standard_Real myLowerLimitYaw{}; //!< optional
+  Standard_Real myUpperLimitYaw{}; //!< optional
+  Standard_Real myLowerLimitPitch{}; //!< optional
+  Standard_Real myUpperLimitPitch{}; //!< optional
+  Standard_Real myLowerLimitRoll{}; //!< optional
+  Standard_Real myUpperLimitRoll{}; //!< optional
   Standard_Boolean defLowerLimitYaw; //!< flag "is LowerLimitYaw defined"
   Standard_Boolean defUpperLimitYaw; //!< flag "is UpperLimitYaw defined"
   Standard_Boolean defLowerLimitPitch; //!< flag "is LowerLimitPitch defined"
index 74d76a7af2b8513ba6bec8e5d3676d43c32e2d2c..868e0fcf98eff89f1e674bf04a11d947a059bf7e 100644 (file)
@@ -22,14 +22,14 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PointOnSurfacePairWithRange, StepKinem
 //function : StepKinematics_PointOnSurfacePairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_PointOnSurfacePairWithRange::StepKinematics_PointOnSurfacePairWithRange ()
+StepKinematics_PointOnSurfacePairWithRange::StepKinematics_PointOnSurfacePairWithRange () : defLowerLimitYaw(Standard_False), defUpperLimitYaw(Standard_False), defLowerLimitPitch(Standard_False), defUpperLimitPitch(Standard_False), defLowerLimitRoll(Standard_False), defUpperLimitRoll(Standard_False)
 {
-  defLowerLimitYaw = Standard_False;
-  defUpperLimitYaw = Standard_False;
-  defLowerLimitPitch = Standard_False;
-  defUpperLimitPitch = Standard_False;
-  defLowerLimitRoll = Standard_False;
-  defUpperLimitRoll = Standard_False;
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index bc10b25124f0c2a0b4434c04c3462a2f8f5506b8..958e81c5b164ee1ca8c93ff97f376d239a3af3a5 100644 (file)
@@ -110,12 +110,12 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_PointOnSurfacePairWithRange, StepKinemati
 
 private:
   Handle(StepGeom_RectangularTrimmedSurface) myRangeOnPairSurface;
-  Standard_Real myLowerLimitYaw; //!< optional
-  Standard_Real myUpperLimitYaw; //!< optional
-  Standard_Real myLowerLimitPitch; //!< optional
-  Standard_Real myUpperLimitPitch; //!< optional
-  Standard_Real myLowerLimitRoll; //!< optional
-  Standard_Real myUpperLimitRoll; //!< optional
+  Standard_Real myLowerLimitYaw{}; //!< optional
+  Standard_Real myUpperLimitYaw{}; //!< optional
+  Standard_Real myLowerLimitPitch{}; //!< optional
+  Standard_Real myUpperLimitPitch{}; //!< optional
+  Standard_Real myLowerLimitRoll{}; //!< optional
+  Standard_Real myUpperLimitRoll{}; //!< optional
   Standard_Boolean defLowerLimitYaw; //!< flag "is LowerLimitYaw defined"
   Standard_Boolean defUpperLimitYaw; //!< flag "is UpperLimitYaw defined"
   Standard_Boolean defLowerLimitPitch; //!< flag "is LowerLimitPitch defined"
index dd11337e9a1ffb30a7d4c30e2e1d77d3a2b14de5..315f0809eedd2797229b6116bc5ccefe92893ebe 100644 (file)
@@ -46,7 +46,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_PrismaticPairValue, StepKinematics_PairValue)
 
 private:
-  Standard_Real myActualTranslation;
+  Standard_Real myActualTranslation{};
 
 };
 #endif // _StepKinematics_PrismaticPairValue_HeaderFile_
index 84f058ae4825f44bd5a1c986c168b1866b7edf4b..dec7b44466209d07c5d2216771a58580847255fa 100644 (file)
@@ -22,10 +22,10 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PrismaticPairWithRange, StepKinematics
 //function : StepKinematics_PrismaticPairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_PrismaticPairWithRange::StepKinematics_PrismaticPairWithRange ()
+StepKinematics_PrismaticPairWithRange::StepKinematics_PrismaticPairWithRange () : defLowerLimitActualTranslation(Standard_False), defUpperLimitActualTranslation(Standard_False)
 {
-  defLowerLimitActualTranslation = Standard_False;
-  defUpperLimitActualTranslation = Standard_False;
+  
+  
 }
 
 //=======================================================================
index 009df4743eb3f108dad58b023b743277f54492d9..ca880df18c255733a73842d4d8f1921edafcc49b 100644 (file)
@@ -70,8 +70,8 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_PrismaticPairWithRange, StepKinematics_PrismaticPair)
 
 private:
-  Standard_Real myLowerLimitActualTranslation; //!< optional
-  Standard_Real myUpperLimitActualTranslation; //!< optional
+  Standard_Real myLowerLimitActualTranslation{}; //!< optional
+  Standard_Real myUpperLimitActualTranslation{}; //!< optional
   Standard_Boolean defLowerLimitActualTranslation; //!< flag "is LowerLimitActualTranslation defined"
   Standard_Boolean defUpperLimitActualTranslation; //!< flag "is UpperLimitActualTranslation defined"
 
index 02169f79e66d397eb32cb38af793286fe4f82062..5ff8ecee2f3cc53c958ba7d95ce36c71e1cc8ed3 100644 (file)
@@ -52,7 +52,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling)
 
 private:
-  Standard_Real myPinionRadius;
+  Standard_Real myPinionRadius{};
 
 };
 #endif // _StepKinematics_RackAndPinionPair_HeaderFile_
index cd927db9eb19ef7445207f8c45f8a12f4d02fb99..551dac3ef970e9439ccae18798c2b16b8da170d3 100644 (file)
@@ -46,7 +46,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPairValue, StepKinematics_PairValue)
 
 private:
-  Standard_Real myActualDisplacement;
+  Standard_Real myActualDisplacement{};
 
 };
 #endif // _StepKinematics_RackAndPinionPairValue_HeaderFile_
index ddae6497463af99579633fb0e5c9c44e74a3184f..f2fc2a41c34849b49c2fb1e4bab474d7ae0d9040 100644 (file)
@@ -22,10 +22,10 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPairWithRange, StepKinema
 //function : StepKinematics_RackAndPinionPairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_RackAndPinionPairWithRange::StepKinematics_RackAndPinionPairWithRange ()
+StepKinematics_RackAndPinionPairWithRange::StepKinematics_RackAndPinionPairWithRange () : defLowerLimitRackDisplacement(Standard_False), defUpperLimitRackDisplacement(Standard_False)
 {
-  defLowerLimitRackDisplacement = Standard_False;
-  defUpperLimitRackDisplacement = Standard_False;
+  
+  
 }
 
 //=======================================================================
index 1ce7e12392714e61a72ae1a6a95b9fd7cfef67ea..68a44d7ecb6b179f85301e49f6515d958f4b5124 100644 (file)
@@ -65,8 +65,8 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPairWithRange, StepKinematics_RackAndPinionPair)
 
 private:
-  Standard_Real myLowerLimitRackDisplacement; //!< optional
-  Standard_Real myUpperLimitRackDisplacement; //!< optional
+  Standard_Real myLowerLimitRackDisplacement{}; //!< optional
+  Standard_Real myUpperLimitRackDisplacement{}; //!< optional
   Standard_Boolean defLowerLimitRackDisplacement; //!< flag "is LowerLimitRackDisplacement defined"
   Standard_Boolean defUpperLimitRackDisplacement; //!< flag "is UpperLimitRackDisplacement defined"
 
index 17374c4628fa7732985cf02fd25fc5a5fcfaef78..c85906f2257eb837bbab167f7d28bd12fe8e10df 100644 (file)
@@ -46,7 +46,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_RevolutePairValue, StepKinematics_PairValue)
 
 private:
-  Standard_Real myActualRotation;
+  Standard_Real myActualRotation{};
 
 };
 #endif // _StepKinematics_RevolutePairValue_HeaderFile_
index db06b53bff6ac981560b4517a009d6a6ad5ba3b2..bd7497ec6d0af1ef9f8e78c72d7a51f1a4c9879a 100644 (file)
@@ -22,10 +22,10 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RevolutePairWithRange, StepKinematics_
 //function : StepKinematics_RevolutePairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_RevolutePairWithRange::StepKinematics_RevolutePairWithRange ()
+StepKinematics_RevolutePairWithRange::StepKinematics_RevolutePairWithRange () : defLowerLimitActualRotation(Standard_False), defUpperLimitActualRotation(Standard_False)
 {
-  defLowerLimitActualRotation = Standard_False;
-  defUpperLimitActualRotation = Standard_False;
+  
+  
 }
 
 //=======================================================================
index 98851137bc4906a8f881081acb64c63dd7aec1b1..1161246dedfa80d135f8089255134bef25792d08 100644 (file)
@@ -70,8 +70,8 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_RevolutePairWithRange, StepKinematics_RevolutePair)
 
 private:
-  Standard_Real myLowerLimitActualRotation; //!< optional
-  Standard_Real myUpperLimitActualRotation; //!< optional
+  Standard_Real myLowerLimitActualRotation{}; //!< optional
+  Standard_Real myUpperLimitActualRotation{}; //!< optional
   Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined"
   Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined"
 
index eb0b59ef91d6bd7dc189b386b7b93c3f6d842ac8..c7c4016af5b9e3eaa2da49787bfa193d8f9f0fd2 100644 (file)
@@ -54,7 +54,7 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_RollingSurfacePairValue, StepKinematics_P
 
 private:
   Handle(StepGeom_PointOnSurface) myActualPointOnSurface;
-  Standard_Real myActualRotation;
+  Standard_Real myActualRotation{};
 
 };
 #endif // _StepKinematics_RollingSurfacePairValue_HeaderFile_
index 409ff7126883398e5fe980ffd1b1d56aa31e9a00..ec0783566e311e99a24064cdcf6ffe7db7f065e5 100644 (file)
@@ -51,7 +51,7 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_RotationAboutDirection, StepGeom_Geometri
 
 private:
   Handle(StepGeom_Direction) myDirectionOfAxis;
-  Standard_Real myRotationAngle;
+  Standard_Real myRotationAngle{};
 
 };
 #endif // _StepKinematics_RotationAboutDirection_HeaderFile_
index 618c553ee7abd20e79df46df42c2d8bf243ef782..43d14bfcfac3213851db5539936c807629c3f710 100644 (file)
@@ -52,7 +52,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_ScrewPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling)
 
 private:
-  Standard_Real myPitch;
+  Standard_Real myPitch{};
 
 };
 #endif // _StepKinematics_ScrewPair_HeaderFile_
index 7ca723db15c38529400c88f2c3adc35d082a84cf..8ee329607d4d5c8aa7de8e32add118c48d591613 100644 (file)
@@ -46,7 +46,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_ScrewPairValue, StepKinematics_PairValue)
 
 private:
-  Standard_Real myActualRotation;
+  Standard_Real myActualRotation{};
 
 };
 #endif // _StepKinematics_ScrewPairValue_HeaderFile_
index 200d4b9fe2ad5b5d5340b7f870d9f6424cb50c01..43bf8f7442feb3e1dc53d45af51aae3e93f55314 100644 (file)
@@ -22,10 +22,10 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ScrewPairWithRange, StepKinematics_Scr
 //function : StepKinematics_ScrewPairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_ScrewPairWithRange::StepKinematics_ScrewPairWithRange ()
+StepKinematics_ScrewPairWithRange::StepKinematics_ScrewPairWithRange () : defLowerLimitActualRotation(Standard_False), defUpperLimitActualRotation(Standard_False)
 {
-  defLowerLimitActualRotation = Standard_False;
-  defUpperLimitActualRotation = Standard_False;
+  
+  
 }
 
 //=======================================================================
index 0dafd7c0f26a4569541f36b66ff863cc2fa9738c..ca25e0775e508eb74ebde85aeb46a3f53f9af1fa 100644 (file)
@@ -65,8 +65,8 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_ScrewPairWithRange, StepKinematics_ScrewPair)
 
 private:
-  Standard_Real myLowerLimitActualRotation; //!< optional
-  Standard_Real myUpperLimitActualRotation; //!< optional
+  Standard_Real myLowerLimitActualRotation{}; //!< optional
+  Standard_Real myUpperLimitActualRotation{}; //!< optional
   Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined"
   Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined"
 
index c1cef284f2ae908b12896c4ae99eb8771e05fa4e..21d237e8d46932274d9fa13c20731eec9d7a5d6e 100644 (file)
@@ -61,7 +61,7 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_SlidingSurfacePairValue, StepKinematics_P
 private:
   Handle(StepGeom_PointOnSurface) myActualPointOnSurface1;
   Handle(StepGeom_PointOnSurface) myActualPointOnSurface2;
-  Standard_Real myActualRotation;
+  Standard_Real myActualRotation{};
 
 };
 #endif // _StepKinematics_SlidingSurfacePairValue_HeaderFile_
index 0b876d5b2705d253f978bb9a34d125f9abca70cf..59a4a3e300e8aba633e70984b69ec99703c4c9c2 100644 (file)
@@ -22,12 +22,12 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithPinAndRange, StepKine
 //function : StepKinematics_SphericalPairWithPinAndRange
 //purpose  :
 //=======================================================================
-StepKinematics_SphericalPairWithPinAndRange::StepKinematics_SphericalPairWithPinAndRange ()
+StepKinematics_SphericalPairWithPinAndRange::StepKinematics_SphericalPairWithPinAndRange () : defLowerLimitYaw(Standard_False), defUpperLimitYaw(Standard_False), defLowerLimitRoll(Standard_False), defUpperLimitRoll(Standard_False)
 {
-  defLowerLimitYaw = Standard_False;
-  defUpperLimitYaw = Standard_False;
-  defLowerLimitRoll = Standard_False;
-  defUpperLimitRoll = Standard_False;
+  
+  
+  
+  
 }
 
 //=======================================================================
index c8e9aa89bc4a75285c61bb9e670f29b34a9b97ae..a6cc446aaeff28a05c8ea83ca760228337cc8f87 100644 (file)
@@ -88,10 +88,10 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithPinAndRange, StepKinematics_SphericalPairWithPin)
 
 private:
-  Standard_Real myLowerLimitYaw; //!< optional
-  Standard_Real myUpperLimitYaw; //!< optional
-  Standard_Real myLowerLimitRoll; //!< optional
-  Standard_Real myUpperLimitRoll; //!< optional
+  Standard_Real myLowerLimitYaw{}; //!< optional
+  Standard_Real myUpperLimitYaw{}; //!< optional
+  Standard_Real myLowerLimitRoll{}; //!< optional
+  Standard_Real myUpperLimitRoll{}; //!< optional
   Standard_Boolean defLowerLimitYaw; //!< flag "is LowerLimitYaw defined"
   Standard_Boolean defUpperLimitYaw; //!< flag "is UpperLimitYaw defined"
   Standard_Boolean defLowerLimitRoll; //!< flag "is LowerLimitRoll defined"
index b43479ba1d15a738a23155d7ff4a73fc1980e46f..6604c9c4e62fd36cfd21381b2326a5d770c6dff1 100644 (file)
@@ -22,14 +22,14 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithRange, StepKinematics
 //function : StepKinematics_SphericalPairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_SphericalPairWithRange::StepKinematics_SphericalPairWithRange ()
+StepKinematics_SphericalPairWithRange::StepKinematics_SphericalPairWithRange () : defLowerLimitYaw(Standard_False), defUpperLimitYaw(Standard_False), defLowerLimitPitch(Standard_False), defUpperLimitPitch(Standard_False), defLowerLimitRoll(Standard_False), defUpperLimitRoll(Standard_False)
 {
-  defLowerLimitYaw = Standard_False;
-  defUpperLimitYaw = Standard_False;
-  defLowerLimitPitch = Standard_False;
-  defUpperLimitPitch = Standard_False;
-  defLowerLimitRoll = Standard_False;
-  defUpperLimitRoll = Standard_False;
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index 43cf7c6bd6f4269cb5a8d4f9b7a19d9c99e107a5..7fe09f26586cace1fc975e2a56adcd25be9ab6f5 100644 (file)
@@ -106,12 +106,12 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithRange, StepKinematics_SphericalPair)
 
 private:
-  Standard_Real myLowerLimitYaw; //!< optional
-  Standard_Real myUpperLimitYaw; //!< optional
-  Standard_Real myLowerLimitPitch; //!< optional
-  Standard_Real myUpperLimitPitch; //!< optional
-  Standard_Real myLowerLimitRoll; //!< optional
-  Standard_Real myUpperLimitRoll; //!< optional
+  Standard_Real myLowerLimitYaw{}; //!< optional
+  Standard_Real myUpperLimitYaw{}; //!< optional
+  Standard_Real myLowerLimitPitch{}; //!< optional
+  Standard_Real myUpperLimitPitch{}; //!< optional
+  Standard_Real myLowerLimitRoll{}; //!< optional
+  Standard_Real myUpperLimitRoll{}; //!< optional
   Standard_Boolean defLowerLimitYaw; //!< flag "is LowerLimitYaw defined"
   Standard_Boolean defUpperLimitYaw; //!< flag "is UpperLimitYaw defined"
   Standard_Boolean defLowerLimitPitch; //!< flag "is LowerLimitPitch defined"
index d0164f3653237b04fb99f041ff3b8d7fe73d4b35..ccf71512c367af0bb4199561cf6701024aad9805 100644 (file)
@@ -67,7 +67,7 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_SurfacePair, StepKinematics_HighOrderKine
 private:
   Handle(StepGeom_Surface) mySurface1;
   Handle(StepGeom_Surface) mySurface2;
-  Standard_Boolean myOrientation;
+  Standard_Boolean myOrientation{};
 
 };
 #endif // _StepKinematics_SurfacePair_HeaderFile_
index 7c36fd1b5564ff0462633f4106cb24636c8eea87..fe6f582be266735cdc105e7414c8bcbe834b23e1 100644 (file)
@@ -22,10 +22,10 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SurfacePairWithRange, StepKinematics_S
 //function : StepKinematics_SurfacePairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_SurfacePairWithRange::StepKinematics_SurfacePairWithRange ()
+StepKinematics_SurfacePairWithRange::StepKinematics_SurfacePairWithRange () : defLowerLimitActualRotation(Standard_False), defUpperLimitActualRotation(Standard_False)
 {
-  defLowerLimitActualRotation = Standard_False;
-  defUpperLimitActualRotation = Standard_False;
+  
+  
 }
 
 //=======================================================================
index e948ad48f4bdbec432d12cc0fd528397c96a13ab..4cbaf14e5eaae3a5a21898b4b706d46c88c24622 100644 (file)
@@ -83,8 +83,8 @@ DEFINE_STANDARD_RTTIEXT(StepKinematics_SurfacePairWithRange, StepKinematics_Surf
 private:
   Handle(StepGeom_RectangularTrimmedSurface) myRangeOnSurface1;
   Handle(StepGeom_RectangularTrimmedSurface) myRangeOnSurface2;
-  Standard_Real myLowerLimitActualRotation; //!< optional
-  Standard_Real myUpperLimitActualRotation; //!< optional
+  Standard_Real myLowerLimitActualRotation{}; //!< optional
+  Standard_Real myUpperLimitActualRotation{}; //!< optional
   Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined"
   Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined"
 
index d9103609e9377eec9d10f61a53c986bef08cec31..6696df47a44735e3a9e6d0b2f78e07c3c78a7927 100644 (file)
@@ -22,9 +22,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_UniversalPair, StepKinematics_LowOrder
 //function : StepKinematics_UniversalPair
 //purpose  :
 //=======================================================================
-StepKinematics_UniversalPair::StepKinematics_UniversalPair ()
+StepKinematics_UniversalPair::StepKinematics_UniversalPair () : defInputSkewAngle(Standard_False)
 {
-  defInputSkewAngle = Standard_False;
+  
 }
 
 //=======================================================================
index becf5ae6ec4fbf1b0ffa2f2e9a9dd2ffb559c809..e5787de50129df8d5375f3fa9541efa2e678fb90 100644 (file)
@@ -61,7 +61,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_UniversalPair, StepKinematics_LowOrderKinematicPair)
 
 private:
-  Standard_Real myInputSkewAngle; //!< optional
+  Standard_Real myInputSkewAngle{}; //!< optional
   Standard_Boolean defInputSkewAngle; //!< flag "is InputSkewAngle defined"
 
 };
index a26ece433ebfe93a3caaacec491f1bc73d893cb4..81a40c375cbc4b7c07726a5b5131feb0b91f3b2e 100644 (file)
@@ -52,8 +52,8 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_UniversalPairValue, StepKinematics_PairValue)
 
 private:
-  Standard_Real myFirstRotationAngle;
-  Standard_Real mySecondRotationAngle;
+  Standard_Real myFirstRotationAngle{};
+  Standard_Real mySecondRotationAngle{};
 
 };
 #endif // _StepKinematics_UniversalPairValue_HeaderFile_
index 9fd98da7a8d14cc2217ee777f4faea8acee2a528..2173b1fe8fbb3c390116f1ba65074666caee6474 100644 (file)
@@ -22,12 +22,12 @@ IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_UniversalPairWithRange, StepKinematics
 //function : StepKinematics_UniversalPairWithRange
 //purpose  :
 //=======================================================================
-StepKinematics_UniversalPairWithRange::StepKinematics_UniversalPairWithRange ()
+StepKinematics_UniversalPairWithRange::StepKinematics_UniversalPairWithRange () : defLowerLimitFirstRotation(Standard_False), defUpperLimitFirstRotation(Standard_False), defLowerLimitSecondRotation(Standard_False), defUpperLimitSecondRotation(Standard_False)
 {
-  defLowerLimitFirstRotation = Standard_False;
-  defUpperLimitFirstRotation = Standard_False;
-  defLowerLimitSecondRotation = Standard_False;
-  defUpperLimitSecondRotation = Standard_False;
+  
+  
+  
+  
 }
 
 //=======================================================================
index 7aedf8118a800597ee796b9712b8de8d014d6cae..2fd76a7b2691eba7e7ea6e5dcdf472c3a3569f1c 100644 (file)
@@ -90,10 +90,10 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepKinematics_UniversalPairWithRange, StepKinematics_UniversalPair)
 
 private:
-  Standard_Real myLowerLimitFirstRotation; //!< optional
-  Standard_Real myUpperLimitFirstRotation; //!< optional
-  Standard_Real myLowerLimitSecondRotation; //!< optional
-  Standard_Real myUpperLimitSecondRotation; //!< optional
+  Standard_Real myLowerLimitFirstRotation{}; //!< optional
+  Standard_Real myUpperLimitFirstRotation{}; //!< optional
+  Standard_Real myLowerLimitSecondRotation{}; //!< optional
+  Standard_Real myUpperLimitSecondRotation{}; //!< optional
   Standard_Boolean defLowerLimitFirstRotation; //!< flag "is LowerLimitFirstRotation defined"
   Standard_Boolean defUpperLimitFirstRotation; //!< flag "is UpperLimitFirstRotation defined"
   Standard_Boolean defLowerLimitSecondRotation; //!< flag "is LowerLimitSecondRotation defined"
index 374815fadd236dd41ed6a727c6f8d9278ebdbf4f..4a5ffb898242645d593cbae00cdf1c3a30902d8f 100644 (file)
@@ -25,9 +25,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_AssemblyComponentUsage,StepRepr_ProductDefin
 //function : StepRepr_AssemblyComponentUsage
 //purpose  : 
 //=======================================================================
-StepRepr_AssemblyComponentUsage::StepRepr_AssemblyComponentUsage ()
+StepRepr_AssemblyComponentUsage::StepRepr_AssemblyComponentUsage () : defReferenceDesignator(Standard_False)
 {
-  defReferenceDesignator = Standard_False;
+  
 }
 
 //=======================================================================
index 22599123ac6995098292d5fe80b01036c23615d1..6d6cf99bf0523e9bcc539e5747ed8d3c208a314b 100644 (file)
@@ -26,10 +26,10 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ConfigurationItem,Standard_Transient)
 //function : StepRepr_ConfigurationItem
 //purpose  : 
 //=======================================================================
-StepRepr_ConfigurationItem::StepRepr_ConfigurationItem ()
+StepRepr_ConfigurationItem::StepRepr_ConfigurationItem () : defDescription(Standard_False), defPurpose(Standard_False)
 {
-  defDescription = Standard_False;
-  defPurpose = Standard_False;
+  
+  
 }
 
 //=======================================================================
index 08a6ccedbea0a935e8e2d034b9db903404dbb3fd..543eae98c84b41550e9ab2e412f568968ef7745d 100644 (file)
@@ -51,6 +51,6 @@ public:
   DEFINE_STANDARD_RTTIEXT(StepRepr_IntegerRepresentationItem,StepRepr_RepresentationItem)
 
 private:
-  Standard_Integer value;
+  Standard_Integer value{};
 };
 #endif // _StepRepr_IntegerRepresentationItem_HeaderFile
index fae73e1b2f65a7cd7c78cd80e13839323dda2b9f..1c016ac495716af4e01abe55fc69a9cfe9be5e5a 100644 (file)
@@ -76,7 +76,7 @@ protected:
 private:
 
 
-  Standard_Integer theRanking;
+  Standard_Integer theRanking{};
   Handle(TCollection_HAsciiString) theRankingRationale;
   Handle(StepBasic_MeasureWithUnit) theQuantity;
 
index 88a45d878d9ceb7505dc830f12687d068ae121f4..a3ea397efdbf7c8bfb14f4f1763f2184f0dd6b95 100644 (file)
@@ -28,9 +28,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_MeasureRepresentationItem,StepRepr_Represent
 //function : StepRepr_MeasureRepresentationItem
 //purpose  : 
 //=======================================================================
-StepRepr_MeasureRepresentationItem::StepRepr_MeasureRepresentationItem() 
+StepRepr_MeasureRepresentationItem::StepRepr_MeasureRepresentationItem() : myMeasure(new StepBasic_MeasureWithUnit) 
 {
-  myMeasure = new StepBasic_MeasureWithUnit;
+  
 }
 
 //=======================================================================
index 0848fb0e47411a713675120c070af11cf050ef8a..ad23a2ea546a6100f7cb01cdc19c286f79dff036 100644 (file)
@@ -26,9 +26,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ProductConcept,Standard_Transient)
 //function : StepRepr_ProductConcept
 //purpose  : 
 //=======================================================================
-StepRepr_ProductConcept::StepRepr_ProductConcept ()
+StepRepr_ProductConcept::StepRepr_ProductConcept () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 0064af22759cb0e37afc743b816a16547f496dab..56fd82cead20231df9a36b23b6230c1eafbd938f 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_PropertyDefinition,Standard_Transient)
 //function : StepRepr_PropertyDefinition
 //purpose  : 
 //=======================================================================
-StepRepr_PropertyDefinition::StepRepr_PropertyDefinition ()
+StepRepr_PropertyDefinition::StepRepr_PropertyDefinition () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 821b856c998d3447fd8146dfe80037c77a29e785..e59e3839f6d32e9b9c8e3cce6f876aa9b1916b24 100644 (file)
@@ -22,9 +22,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndLengthMeasureWithUnit,StepRepr_Re
 //function : StepRepr_ReprItemAndLengthMeasureWithUnit
 //purpose  : 
 //=======================================================================
-StepRepr_ReprItemAndLengthMeasureWithUnit::StepRepr_ReprItemAndLengthMeasureWithUnit() : StepRepr_ReprItemAndMeasureWithUnit()
+StepRepr_ReprItemAndLengthMeasureWithUnit::StepRepr_ReprItemAndLengthMeasureWithUnit() : StepRepr_ReprItemAndMeasureWithUnit(), myLengthMeasureWithUnit(new StepBasic_LengthMeasureWithUnit())
 {
-  myLengthMeasureWithUnit = new StepBasic_LengthMeasureWithUnit();
+  
 }
 
 //=======================================================================
index 2a61ce9b7541c38ec3c179206def8565fe5bc1c6..501a697935f20cf502367daa9a761dea87d024fc 100644 (file)
@@ -22,9 +22,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI,StepR
 //function : StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI
 //purpose  : 
 //=======================================================================
-StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI::StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI() : StepRepr_ReprItemAndMeasureWithUnitAndQRI()
+StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI::StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI() : StepRepr_ReprItemAndMeasureWithUnitAndQRI(), myLengthMeasureWithUnit(new StepBasic_LengthMeasureWithUnit())
 {
-  myLengthMeasureWithUnit = new StepBasic_LengthMeasureWithUnit();
+  
 }
 
 //=======================================================================
index b881f28d0a386c765e8cc2245bed07ccee7b4d86..fe901abe5c1722134fad92736f37b22ac0ccc371 100644 (file)
@@ -26,10 +26,10 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndMeasureWithUnit,StepRepr_Represen
 //function : StepRepr_ReprItemAndMeasureWithUnit
 //purpose  : 
 //=======================================================================
-StepRepr_ReprItemAndMeasureWithUnit::StepRepr_ReprItemAndMeasureWithUnit()
+StepRepr_ReprItemAndMeasureWithUnit::StepRepr_ReprItemAndMeasureWithUnit() : myMeasureWithUnit(new StepBasic_MeasureWithUnit()), myMeasureRepresentationItem(new StepRepr_MeasureRepresentationItem())
 {
-  myMeasureWithUnit = new StepBasic_MeasureWithUnit();
-  myMeasureRepresentationItem = new StepRepr_MeasureRepresentationItem();
+  
+  
 }
 
 
index b03f5f357513a9fb3188d2b254f01da180cfa5ea..822380f95e7de9d2e21b7c3af4ba5863c78f5dae 100644 (file)
@@ -27,7 +27,7 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndMeasureWithUnitAndQRI,StepRepr_Re
 
 void StepRepr_ReprItemAndMeasureWithUnitAndQRI::Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, 
                                                       const Handle(StepRepr_RepresentationItem)& aRI, 
-                                                      const Handle(StepShape_QualifiedRepresentationItem) aQRI)
+                                                      const Handle(StepShape_QualifiedRepresentationItem)& aQRI)
 {
   StepRepr_ReprItemAndMeasureWithUnit::Init(aMWU, aRI);
   myQualifiedRepresentationItem = aQRI;
@@ -37,9 +37,9 @@ void StepRepr_ReprItemAndMeasureWithUnitAndQRI::Init (const Handle(StepBasic_Mea
 //function : StepRepr_ReprItemAndMeasureWithUnitAndQRI
 //purpose  : 
 //=======================================================================
-StepRepr_ReprItemAndMeasureWithUnitAndQRI::StepRepr_ReprItemAndMeasureWithUnitAndQRI() : StepRepr_ReprItemAndMeasureWithUnit()
+StepRepr_ReprItemAndMeasureWithUnitAndQRI::StepRepr_ReprItemAndMeasureWithUnitAndQRI() : StepRepr_ReprItemAndMeasureWithUnit(), myQualifiedRepresentationItem(new StepShape_QualifiedRepresentationItem())
 {
-  myQualifiedRepresentationItem = new StepShape_QualifiedRepresentationItem();
+  
 }
 
 //=======================================================================
index 961a8165dd7f3d2c803b5172df4fa6ece0754b86..c8108ac603d02257a26685d8d0ac26fa06b3d397 100644 (file)
@@ -35,7 +35,7 @@ public:
   
   Standard_EXPORT StepRepr_ReprItemAndMeasureWithUnitAndQRI();
 
-  Standard_EXPORT void Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, const Handle(StepRepr_RepresentationItem)& aRI, const Handle(StepShape_QualifiedRepresentationItem) aQRI);
+  Standard_EXPORT void Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, const Handle(StepRepr_RepresentationItem)& aRI, const Handle(StepShape_QualifiedRepresentationItem)& aQRI);
   
   Standard_EXPORT void SetQualifiedRepresentationItem (const Handle(StepShape_QualifiedRepresentationItem)& aQRI);
   
index 7e9aa19115ec97531b4c0947dc7d3a60632991fa..d76c4d1d7f12a111d9c8955a58f058e15846719e 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndPlaneAngleMeasureWithUnit,StepRep
 //function : StepRepr_ReprItemAndPlaneAngleMeasureWithUnit
 //purpose  : 
 //=======================================================================
-StepRepr_ReprItemAndPlaneAngleMeasureWithUnit::StepRepr_ReprItemAndPlaneAngleMeasureWithUnit() : StepRepr_ReprItemAndMeasureWithUnit()
+StepRepr_ReprItemAndPlaneAngleMeasureWithUnit::StepRepr_ReprItemAndPlaneAngleMeasureWithUnit() : StepRepr_ReprItemAndMeasureWithUnit(), myPlaneAngleMeasureWithUnit(new StepBasic_PlaneAngleMeasureWithUnit())
 {
-  myPlaneAngleMeasureWithUnit = new StepBasic_PlaneAngleMeasureWithUnit();
+  
 }
 
 //=======================================================================
index fd72a32493410a64a9269f3e7509df89473c0ea3..b1498e327ba819de588c9644f6c5dad21d38c2a8 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI,S
 //function : StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI
 //purpose  : 
 //=======================================================================
-StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI::StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI() : StepRepr_ReprItemAndMeasureWithUnitAndQRI()
+StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI::StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI() : StepRepr_ReprItemAndMeasureWithUnitAndQRI(), myPlaneAngleMeasureWithUnit(new StepBasic_PlaneAngleMeasureWithUnit())
 {
-  myPlaneAngleMeasureWithUnit = new StepBasic_PlaneAngleMeasureWithUnit();
+  
 }
 
 //=======================================================================
index 0d5ce23c34f9b7e86cc9c1505002934c1025e5b0..c0317d67baa2d51153f037d2f894acc77ce13c8c 100644 (file)
@@ -25,9 +25,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ShapeAspectRelationship,Standard_Transient)
 //function : StepRepr_ShapeAspectRelationship
 //purpose  : 
 //=======================================================================
-StepRepr_ShapeAspectRelationship::StepRepr_ShapeAspectRelationship ()
+StepRepr_ShapeAspectRelationship::StepRepr_ShapeAspectRelationship () : defDescription(Standard_False)
 {
-  defDescription = Standard_False;
+  
 }
 
 //=======================================================================
index 69b5397606d4036e270ff25ab73fa69eb7b38e94..b326804c29244212f15dcff7ce779ad0b3d9538d 100644 (file)
@@ -51,7 +51,7 @@ static TCollection_AsciiString lastvalue;
 {
   lastvalue.Clear();
   Handle(StepData_ReadWriteModule) module;
-  Standard_Integer CN;
+  Standard_Integer CN = 0;
   Standard_Boolean ok = thelib.Select (ent,module,CN);
   if (!ok) {
     lastvalue.AssignCat ("..NOT FROM SCHEMA ");
index 5110fb5b4fe7f74c187cb12795b7d177a9aa76a5..1e34cd3fe69f937b5dc0cc83120e7ab49a25eb5d 100644 (file)
@@ -70,9 +70,9 @@ private:
 
 
   Handle(StepGeom_Axis2Placement3d) position;
-  Standard_Real x;
-  Standard_Real y;
-  Standard_Real z;
+  Standard_Real x{};
+  Standard_Real y{};
+  Standard_Real z{};
 
 
 };
index 689b8075fb1b753420b0730a1db15aaf5baa43a1..af90dc0a8918c4472001cc9a76976e09d6a40706 100644 (file)
@@ -85,7 +85,7 @@ private:
   Handle(StepShape_HalfSpaceSolid) theHalfSpaceSolid;
   StepShape_CsgPrimitive theCsgPrimitive;
   Handle(StepShape_BooleanResult) theBooleanResult;
-  Standard_Integer theTypeOfContent;
+  Standard_Integer theTypeOfContent{};
 
 
 };
index 08e6a1f1954937d000154bd688183dbe22730a8f..839712b97c36324df3f3625da6fe8ab78d32d6b1 100644 (file)
@@ -69,9 +69,9 @@ private:
 
 
   Handle(StepGeom_CartesianPoint) corner;
-  Standard_Real xlength;
-  Standard_Real ylength;
-  Standard_Real zlength;
+  Standard_Real xlength{};
+  Standard_Real ylength{};
+  Standard_Real zlength{};
 
 
 };
index ffd9e758608e3b6bba025d6ef3afb95acdf43b7b..d14d5b23f024b89437da1e50ab12c07a823857e2 100644 (file)
@@ -66,7 +66,7 @@ private:
 
   Handle(StepShape_BooleanResult) theBooleanResult;
   StepShape_CsgPrimitive theCsgPrimitive;
-  Standard_Integer theTypeOfContent;
+  Standard_Integer theTypeOfContent{};
 
 
 };
index 0b7fb8b600e1e1502bc6987361fa4e4b76f4fd10..2cf401ad3d99c7838c653b7bd45753293f3697b7 100644 (file)
@@ -63,7 +63,7 @@ private:
 
 
   Handle(StepGeom_Curve) edgeGeometry;
-  Standard_Boolean sameSense;
+  Standard_Boolean sameSense{};
 
 
 };
index 2dbcfeebbc131bc9fa498b572069c237a4e0660b..2271015f98597ce1cee58d8c5154cd871cee5d60 100644 (file)
@@ -63,7 +63,7 @@ private:
 
 
   Handle(StepGeom_Direction) extrudedDirection;
-  Standard_Real depth;
+  Standard_Real depth{};
 
 
 };
index e47cce88bc5abca477594fa47f2e845b1649e01e..3da03811cf84b254cea7698451cb22483340df7c 100644 (file)
@@ -63,7 +63,7 @@ private:
 
 
   Handle(StepGeom_Direction) extrudedDirection;
-  Standard_Real depth;
+  Standard_Real depth{};
 
 
 };
index 2890d90775c72c9dbb88e5cbf8088944daa99265..78f4346bf9b765792c28c69da1752cefbe3529de 100644 (file)
@@ -63,7 +63,7 @@ private:
 
 
   Handle(StepShape_Loop) bound;
-  Standard_Boolean orientation;
+  Standard_Boolean orientation{};
 
 
 };
index 7ef488b805a52d1a83bed3994162812818ee97d6..6e7cbe921c615f0f84a011b83e1f0e6faa4f2e6f 100644 (file)
@@ -63,7 +63,7 @@ private:
 
 
   Handle(StepGeom_Surface) faceGeometry;
-  Standard_Boolean sameSense;
+  Standard_Boolean sameSense{};
 
 
 };
index b80bba46417cac519e41dafed6d4ab46fc177481..dce5d45c18867810d6375316836a7f74d2fb4a8a 100644 (file)
@@ -62,7 +62,7 @@ private:
 
 
   Handle(StepGeom_Surface) baseSurface;
-  Standard_Boolean agreementFlag;
+  Standard_Boolean agreementFlag{};
 
 
 };
index 8d5c033d6b2545711b497a54049b57f17b83b975..40cfc9e74e259d15edce2942e65eef0a093830e8 100644 (file)
@@ -22,9 +22,9 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(StepShape_MeasureRepresentationItemAndQualifiedRepresentationItem,StepRepr_RepresentationItem)
 
-StepShape_MeasureRepresentationItemAndQualifiedRepresentationItem::StepShape_MeasureRepresentationItemAndQualifiedRepresentationItem  ()
+StepShape_MeasureRepresentationItemAndQualifiedRepresentationItem::StepShape_MeasureRepresentationItemAndQualifiedRepresentationItem  () : myMeasure(new StepBasic_MeasureWithUnit)
 {
-  myMeasure = new StepBasic_MeasureWithUnit;
+  
 }
 
 void  StepShape_MeasureRepresentationItemAndQualifiedRepresentationItem::Init
index 90082e01d3e18d5999128965d858238bba35ec0d..b503eb93ae17d251fd4470fa93958af35c82daf9 100644 (file)
@@ -73,7 +73,7 @@ private:
 
 
   Handle(StepShape_ClosedShell) closedShellElement;
-  Standard_Boolean orientation;
+  Standard_Boolean orientation{};
 
 
 };
index 3f80561a9bb3084f88862a93d67020db0d671fce..b9f2a23754b2d2daf0a1676d52dbb926148af533 100644 (file)
@@ -71,7 +71,7 @@ private:
 
 
   Handle(StepShape_Edge) edgeElement;
-  Standard_Boolean orientation;
+  Standard_Boolean orientation{};
 
 
 };
index 3458ac4b8e313c60f33c6a6ccb28f7eca401fe78..cf3664ed48716406a6d436714533c482838b20e5 100644 (file)
@@ -73,7 +73,7 @@ private:
 
 
   Handle(StepShape_Face) faceElement;
-  Standard_Boolean orientation;
+  Standard_Boolean orientation{};
 
 
 };
index c44889c932effef08eb13c2a2664159b40675907..aae38e1ee45c0f378fb033ab5a56d34de12a4970 100644 (file)
@@ -73,7 +73,7 @@ private:
 
 
   Handle(StepShape_OpenShell) openShellElement;
-  Standard_Boolean orientation;
+  Standard_Boolean orientation{};
 
 
 };
index 29d268d042da6f1997b28223b12850480ba66c62..8a6d0f26012afda004dadf923b44b64c7964aa13 100644 (file)
@@ -73,7 +73,7 @@ private:
 
 
   Handle(StepShape_EdgeLoop) pathElement;
-  Standard_Boolean orientation;
+  Standard_Boolean orientation{};
 
 
 };
index 7214e968b5358d795fd54a9000268ccf25c76774..5e37b6cea3053fe5ff1d165ea1bf284e36e4c600 100644 (file)
@@ -54,7 +54,7 @@ protected:
 private:
 
 
-  Standard_Integer thePrecisionValue;
+  Standard_Integer thePrecisionValue{};
 
 
 };
index 2fce9ccf377b43fe5657e110bad57618fb585098..9d47659116e9e2da91030e65c087502fb87340f4 100644 (file)
@@ -63,7 +63,7 @@ private:
 
 
   Handle(StepGeom_Axis1Placement) axis;
-  Standard_Real angle;
+  Standard_Real angle{};
 
 
 };
index 5fd4409fdf8f6f10ba43fe96a600bb7660fc66e7..c12757bedfd810ba173e02cfbafd492b849b21bb 100644 (file)
@@ -65,7 +65,7 @@ private:
 
 
   Handle(StepGeom_Axis1Placement) axis;
-  Standard_Real angle;
+  Standard_Real angle{};
 
 
 };
index 213ff0de19153c987f41f85372cd35fd1160127b..ac30fcfa2ebcc62732f6e615fe99593139358734 100644 (file)
@@ -74,10 +74,10 @@ private:
 
 
   Handle(StepGeom_Axis2Placement3d) position;
-  Standard_Real x;
-  Standard_Real y;
-  Standard_Real z;
-  Standard_Real ltx;
+  Standard_Real x{};
+  Standard_Real y{};
+  Standard_Real z{};
+  Standard_Real ltx{};
 
 
 };
index c967ca3d81b8779ba0a01f66d89097d22661b14d..d881a1d02018349e3fdbbbbc9938249cf78dbc0e 100644 (file)
@@ -70,9 +70,9 @@ private:
 
 
   Handle(StepGeom_Axis1Placement) position;
-  Standard_Real height;
-  Standard_Real radius;
-  Standard_Real semiAngle;
+  Standard_Real height{};
+  Standard_Real radius{};
+  Standard_Real semiAngle{};
 
 
 };
index c6180d6c24143cbf8ef678ce727ec44ea51bf6a7..f043a5feec9f85ab4d38bf1c889e12239e319c8c 100644 (file)
@@ -66,8 +66,8 @@ private:
 
 
   Handle(StepGeom_Axis1Placement) position;
-  Standard_Real height;
-  Standard_Real radius;
+  Standard_Real height{};
+  Standard_Real radius{};
 
 
 };
index 445c29dec16ecba6f059830f263b4a085e373f7f..ec791690a3a6afc12c76478efd7b8214cd9f97f6 100644 (file)
@@ -61,7 +61,7 @@ protected:
 private:
 
 
-  Standard_Real radius;
+  Standard_Real radius{};
   Handle(StepGeom_Point) centre;
 
 
index 5014e1f257231df986ca3575248c19140ab432b5..e4bf03c5bd90a9432344ea5b131a130063706a78 100644 (file)
@@ -66,8 +66,8 @@ private:
 
 
   Handle(StepGeom_Axis1Placement) position;
-  Standard_Real majorRadius;
-  Standard_Real minorRadius;
+  Standard_Real majorRadius{};
+  Standard_Real minorRadius{};
 
 
 };
index 1b365c150ef957173485964526437b85cf64835b..d1003f77e217642e1b1b26bd475884df4632ff53 100644 (file)
@@ -767,7 +767,7 @@ Handle(TBSplineCurve) MakeBSplineCurveCommon
     aSummaryMuultypisity += aUniqueKnotMultiplicities.Value(i);
   }
 
-  Standard_Boolean shouldBePeriodic;
+  Standard_Boolean shouldBePeriodic = 0;
   if (aSummaryMuultypisity == (NbPoles + aDegree + 1))
   {
     shouldBePeriodic = Standard_False;
@@ -834,7 +834,7 @@ Handle(Geom2d_BSplineCurve) StepToGeom::MakeBSplineCurve2d (const Handle(StepGeo
 
 Handle(Geom_BSplineSurface) StepToGeom::MakeBSplineSurface (const Handle(StepGeom_BSplineSurface)& SS)
 {
-  Standard_Integer                    i, j;
+  Standard_Integer                    i = 0, j = 0;
   Handle(StepGeom_BSplineSurfaceWithKnots) BS;
   Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) BSR;
 
@@ -1899,7 +1899,7 @@ static Standard_Boolean  ExtractParameter
  Standard_Real & aParam)
 {
   Handle(StepGeom_CartesianPoint) aPoint;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 //:S4136  Standard_Real precBrep = BRepAPI::Precision();
   for ( i = 1 ; i <= nbSel ; i++) {
     StepGeom_TrimmingSelect theSel = TS->Value(i);
@@ -1995,7 +1995,7 @@ Handle(Geom_TrimmedCurve) StepToGeom::MakeTrimmedCurve (const Handle(StepGeom_Tr
   const Standard_Integer nbSel1 = SC->NbTrim1();
   const Standard_Integer nbSel2 = SC->NbTrim2();
 
-  Standard_Integer MasterRep;
+  Standard_Integer MasterRep = 0;
   switch (SC->MasterRepresentation())
   {
     case StepGeom_tpCartesian: MasterRep = 1; break;
@@ -2007,7 +2007,7 @@ Handle(Geom_TrimmedCurve) StepToGeom::MakeTrimmedCurve (const Handle(StepGeom_Tr
   //and parameters are specified as CARTESIAN_POINT
   Standard_Boolean isPoint = Standard_False;
   if(MasterRep == 0 || (MasterRep == 2 && nbSel1 >1 && nbSel2 > 1)) {
-    Standard_Integer ii;
+    Standard_Integer ii = 0;
     for(ii = 1; ii <= nbSel1; ii++)
     {
       if (!(theTrimSel1->Value(ii).CartesianPoint().IsNull()))
index b502766c3b0b57c47c44f0ba14b56e7c48590b81..86a861135af95fa2d94f3569a65f039647590349 100644 (file)
@@ -87,6 +87,7 @@
 #include <Transfer_TransientProcess.hxx>
 #include <TransferBRep.hxx>
 
+#include <math.h>
 #include <stdio.h>
 static void ResetPreci (const TopoDS_Shape& S, Standard_Real maxtol)
 {
@@ -369,7 +370,7 @@ void StepToTopoDS_Builder::Init
     BRep_Builder B;
     B.MakeSolid(S);
     B.Add(S,Sh);
-    Standard_Integer Nb, i;
+    Standard_Integer Nb = 0, i = 0;
     Nb = aFBABWV->NbVoids();
     Message_ProgressScope aPS (aPSRoot.Next(), NULL, Nb);
     for ( i=1; i<=Nb && aPS.More(); i++) {
@@ -639,7 +640,7 @@ static TopoDS_Face TranslateBoundedSurf (const Handle(StepGeom_Surface) &surf,
 
   if (!RS.IsNull())
   {
-    Standard_Real umin, umax, vmin, vmax;
+    Standard_Real umin = NAN, umax = NAN, vmin = NAN, vmax = NAN;
     theSurf->Bounds(umin, umax, vmin, vmax);
 
     myMkFace.Init(RS->BasisSurface(), umin, umax, vmin, vmax, TolDegen);
@@ -664,7 +665,7 @@ void StepToTopoDS_Builder::Init
   BRep_Builder B;
   B.MakeCompound(S);
   TopoDS_Edge theEdge;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Real preci = Precision();   //gka
   Standard_Real maxtol = MaxTol();
   Standard_Integer nbElem = GCS->NbElements();
@@ -673,7 +674,7 @@ void StepToTopoDS_Builder::Init
   {
     Message_ProgressRange aRange = aPS.Next();
     StepShape_GeometricSetSelect aGSS = GCS->ElementsValue(i);
-    Handle(Standard_Transient) ent = aGSS.Value();
+    const Handle(Standard_Transient)& ent = aGSS.Value();
 
     TopoDS_Shape res = TransferBRep::ShapeResult ( TP, ent );
     if ( ! res.IsNull() ) { // already translated
index 8db51983252050778e51d4c8f41dbe7344dc2d02..3e6b110ba0dde1cd00dd587aab3a643e5c98a6c9 100644 (file)
@@ -23,9 +23,9 @@
 // Purpose : Default constructor
 // ============================================================================
 
-StepToTopoDS_NMTool::StepToTopoDS_NMTool() {
-  myIDEASCase = Standard_False;
-  myActiveFlag = Standard_False;
+StepToTopoDS_NMTool::StepToTopoDS_NMTool() : myIDEASCase(Standard_False), myActiveFlag(Standard_False) {
+  
+  
 }
 
 // ============================================================================
@@ -34,9 +34,9 @@ StepToTopoDS_NMTool::StepToTopoDS_NMTool() {
 // ============================================================================
 
 StepToTopoDS_NMTool::StepToTopoDS_NMTool(const StepToTopoDS_DataMapOfRI& MapOfRI, 
-                                         const StepToTopoDS_DataMapOfRINames& MapOfRINames) {
-  myIDEASCase = Standard_False;
-  myActiveFlag = Standard_False;
+                                         const StepToTopoDS_DataMapOfRINames& MapOfRINames) : myIDEASCase(Standard_False), myActiveFlag(Standard_False) {
+  
+  
   Init(MapOfRI, MapOfRINames);
 }
 
@@ -184,7 +184,7 @@ Standard_Boolean StepToTopoDS_NMTool::IsPureNMShell(const TopoDS_Shape& Shell) {
   Standard_Boolean result = Standard_True;
   TopExp_Explorer edgeExp(Shell, TopAbs_EDGE);
   for ( ; edgeExp.More(); edgeExp.Next() ) {
-    TopoDS_Shape currentEdge = edgeExp.Current();
+    const TopoDS_Shape& currentEdge = edgeExp.Current();
     if ( !this->isEdgeRegisteredAsNM(currentEdge) ) {
       result = Standard_False;
       break;
@@ -223,10 +223,10 @@ Standard_Boolean StepToTopoDS_NMTool::isAdjacentShell(const TopoDS_Shape& ShellA
 
   TopExp_Explorer edgeExpA(ShellA, TopAbs_EDGE);
   for ( ; edgeExpA.More(); edgeExpA.Next() ) {
-    TopoDS_Shape currentEdgeA = edgeExpA.Current();
+    const TopoDS_Shape& currentEdgeA = edgeExpA.Current();
     TopExp_Explorer edgeExpB(ShellB, TopAbs_EDGE);
     for ( ; edgeExpB.More(); edgeExpB.Next() ) {
-      TopoDS_Shape currentEdgeB = edgeExpB.Current();
+      const TopoDS_Shape& currentEdgeB = edgeExpB.Current();
       if ( currentEdgeA.IsSame(currentEdgeB) )
         return Standard_True;
     }  
index 57f45ab26cfc78d69cc7f4a769686b698da7630d..b51dc7f46a6918eb456b3eff98aa99763ccb5b4a 100644 (file)
@@ -120,17 +120,17 @@ private:
   StepToTopoDS_DataMapOfTRI myDataMap;
   StepToTopoDS_PointVertexMap myVertexMap;
   StepToTopoDS_PointEdgeMap myEdgeMap;
-  Standard_Boolean myComputePC;
+  Standard_Boolean myComputePC{};
   Handle(Transfer_TransientProcess) myTransProc;
-  Standard_Integer myNbC0Surf;
-  Standard_Integer myNbC1Surf;
-  Standard_Integer myNbC2Surf;
-  Standard_Integer myNbC0Cur2;
-  Standard_Integer myNbC1Cur2;
-  Standard_Integer myNbC2Cur2;
-  Standard_Integer myNbC0Cur3;
-  Standard_Integer myNbC1Cur3;
-  Standard_Integer myNbC2Cur3;
+  Standard_Integer myNbC0Surf{};
+  Standard_Integer myNbC1Surf{};
+  Standard_Integer myNbC2Surf{};
+  Standard_Integer myNbC0Cur2{};
+  Standard_Integer myNbC1Cur2{};
+  Standard_Integer myNbC2Cur2{};
+  Standard_Integer myNbC0Cur3{};
+  Standard_Integer myNbC1Cur3{};
+  Standard_Integer myNbC2Cur3{};
 
 
 };
index 74f25802f909686c314790692993456b1ef4ef84..a88655ae819e70f2b386cdbf193641af4feefd6e 100644 (file)
@@ -78,7 +78,7 @@ private:
 
 
   TopoDS_Wire myWire;
-  Standard_Boolean myInfiniteSegment;
+  Standard_Boolean myInfiniteSegment{};
 
 
 };
index 3b0e2fca74491e339d2e80fbc6826f990afe1462..6f9f654d64fc48c79a3dbe8004ee44153f389c69 100644 (file)
@@ -17,6 +17,8 @@
 //:o0 abv 16.02.99: POLYLINE allowed as 3d curve of edge
 //gka,abv 05.04.99: S4136: improving tolerance management, eliminate BRepAPI::Precision()
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepLib.hxx>
@@ -136,7 +138,7 @@ static void DecodeMakeEdgeError(const BRepLib_MakeEdge&   ME,
 // ============================================================================
 
 static Handle(Geom_Curve) MakeCurve
-  (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess) TP)
+  (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess)& TP)
 {
   Handle(Geom_Curve) C2 = Handle(Geom_Curve)::DownCast (TP->FindTransient(C1));
   if (!C2.IsNull()) return C2;
@@ -383,7 +385,7 @@ void  StepToTopoDS_TranslateEdge::MakeFromCurve3D
     // -- Statistics -- -> No Warning message
   aTool.AddContinuity (C1);
   BRep_Builder B;
-  Standard_Real temp1,temp2, U1,U2;
+  Standard_Real temp1 = NAN,temp2 = NAN, U1 = NAN,U2 = NAN;
   gp_Pnt pproj;
   gp_Pnt pv1 = BRep_Tool::Pnt(V1);
   gp_Pnt pv2 = BRep_Tool::Pnt(V2);
index 156197a60543ae68cef59a8e310be54de0dd530c..15efa9ce4e158d174b4650723602a91bda9bf511 100644 (file)
@@ -22,6 +22,8 @@
 //    rln 02.06.99 removing #include <StepToTopoDS_DegeneratedTool.hxx>
 //    smh 31.01.01 BUC60810 : IsNull protection
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_TEdge.hxx>
 #include <BRep_Tool.hxx>
@@ -109,7 +111,7 @@ static void CheckPCurves (TopoDS_Wire& aWire, const TopoDS_Face& aFace,
 {
   if (isPlane) { RemovePCurves (aWire, aFace);return; }
   BRep_Builder B;
-  Standard_Real w1, w2, cf, cl;
+  Standard_Real w1 = NAN, w2 = NAN, cf = NAN, cl = NAN;
   Handle(Geom_Surface) mySurf = BRep_Tool::Surface(aFace);
 
   Handle(ShapeExtend_WireData) sbwd = new ShapeExtend_WireData (aWire);
@@ -152,7 +154,7 @@ static void CheckPCurves (TopoDS_Wire& aWire, const TopoDS_Face& aFace,
 
     if (w1 > w2 && mySurf->IsUPeriodic())
     {
-      Standard_Real u1, u2, v1, v2;
+      Standard_Real u1 = NAN, u2 = NAN, v1 = NAN, v2 = NAN;
       mySurf->Bounds(u1, u2, v1, v2);
       ElCLib::AdjustPeriodic(u1, u2,
         Min(Abs(w2-w1)/2, Precision::PConfusion()),
@@ -225,7 +227,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
   TopoDS_Edge   E;
   TopoDS_Vertex V;
 
-  Standard_Boolean isSeam, isLikeSeam;
+  Standard_Boolean isSeam = 0, isLikeSeam = 0;
 
   Handle(StepShape_OrientedEdge) OrEdge1, OrEdge2;
   Handle(StepGeom_Curve) StepCurve, StepCurve1, StepCurve2;
@@ -234,7 +236,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
   Handle(Geom2d_Curve) C2d, C2d1, C2d2, WhichC2d1, WhichC2d2;
   TopoDS_Edge   suspectE; //:f1, degEdge; 
 
-  Standard_Integer j, NbEdge = EL->NbEdgeList();
+  Standard_Integer j = 0, NbEdge = EL->NbEdgeList();
   if (NbEdge == 0) {
     TP->AddWarning(EL, "Wire not done. EdgeLoop does not contain edges.");
     done = Standard_False;
index 2db5e71008e18bb4fb3ce057e5a84772d8ed90d5..684544c2cddd154173ea103d15bf3eaa8e2cdd31 100644 (file)
@@ -16,6 +16,8 @@
 
 //gka,abv 14.09.99: S4136: eliminate BRepAPI::Precision()
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <ElSLib.hxx>
 #include <Geom2d_Line.hxx>
@@ -72,7 +74,7 @@ void StepToTopoDS_TranslatePolyLoop::Init(const Handle(StepShape_PolyLoop)& PL,
     Handle(Transfer_TransientProcess) TP = aTool.TransientProcess();
 
 //:S4136    Standard_Real preci = BRepAPI::Precision();
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Handle(StepGeom_CartesianPoint) P1,P2;
     Handle(Geom_CartesianPoint) GP1, GP2;
     TopoDS_Vertex V1, V2;
@@ -82,7 +84,7 @@ void StepToTopoDS_TranslatePolyLoop::Init(const Handle(StepShape_PolyLoop)& PL,
     Handle(Geom2d_Line) L2d;
     gp_Vec V;
     gp_Vec2d V2d;
-    Standard_Real Magn;
+    Standard_Real Magn = NAN;
     Handle(Geom_Plane) SP = Handle(Geom_Plane)::DownCast(GeomSurf);
     if (SP.IsNull()) TP->AddFail(PL,"Surface not planar in a FacetedBRep !");
     Handle(ShapeAnalysis_Surface) STSU = new ShapeAnalysis_Surface ( GeomSurf );
index 2a5e5910ded98cf78ae5ae5e05be486dbfa36e71..032d8cba0bc131c2088729cb0860d98d62ad9cbd 100644 (file)
@@ -54,8 +54,8 @@ private:
 
 
 
-  Standard_Real theRealValue;
-  Standard_Integer theTypeOfContent;
+  Standard_Real theRealValue{};
+  Standard_Integer theTypeOfContent{};
 
 
 };
index 6d22dc02bc99107865b0bbdb03460ed8041ff2cf..396c56cc52ecba0a86b518d60f167e903d2a51ad 100644 (file)
@@ -63,7 +63,7 @@ private:
 
 
   Handle(StepVisual_PlanarBox) viewWindow;
-  Standard_Boolean viewWindowClipping;
+  Standard_Boolean viewWindowClipping{};
 
 
 };
index bdaea0c35a9ad7b21446c632b91d0745a72e648a..c72d669e12730a4f23e7ff4f20c2db718ffc1d27 100644 (file)
@@ -65,9 +65,9 @@ protected:
 private:
 
 
-  Standard_Real red;
-  Standard_Real green;
-  Standard_Real blue;
+  Standard_Real red{};
+  Standard_Real green{};
+  Standard_Real blue{};
 
 
 };
index eeca58dc0089f1e84601e9e3401180f10d4a9914..c435e65ec01926c359bb53992a3562155c78234d 100644 (file)
@@ -59,8 +59,8 @@ protected:
 private:
 
 
-  Standard_Real visibleSegmentLength;
-  Standard_Real invisibleSegmentLength;
+  Standard_Real visibleSegmentLength{};
+  Standard_Real invisibleSegmentLength{};
 
 
 };
index 62c7625e5132acc797ccf6e36e8aa39732387ad1..3d462905cfa7e346d733ffe975e6e350c2a8d339 100644 (file)
@@ -61,8 +61,8 @@ protected:
 private:
 
 
-  Standard_Real sizeInX;
-  Standard_Real sizeInY;
+  Standard_Real sizeInX{};
+  Standard_Real sizeInY{};
 
 
 };
index 26577ec0b99330c6e88398a945a6999fbe4968d6..da0c1c75f60b8df4d3f6ca2bee7808faf19f454e 100644 (file)
@@ -18,9 +18,9 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(StepVisual_PreDefinedColour,StepVisual_Colour)
 
-StepVisual_PreDefinedColour::StepVisual_PreDefinedColour ()  
+StepVisual_PreDefinedColour::StepVisual_PreDefinedColour () : myItem(new StepVisual_PreDefinedItem)  
 {
-  myItem = new StepVisual_PreDefinedItem;
+  
 }
 
 void StepVisual_PreDefinedColour::SetPreDefinedItem (const Handle(StepVisual_PreDefinedItem) &item)  
index baf55343c774e6242712fa44dba068e085198168..2c57e3776cbe89a1b42723f853aef17977a155a4 100644 (file)
@@ -43,7 +43,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepVisual_SurfaceStyleReflectanceAmbient, Standard_Transient)
 
 private:
-  Standard_Real myAmbientReflectance;
+  Standard_Real myAmbientReflectance{};
 
 };
 #endif // _StepVisual_SurfaceStyleReflectanceAmbient_HeaderFile_
index 28b293a6063ff03e22c0f8f5642cbde5dde87caf..158e4caa639d73d49ab68406ad6799dba538161e 100644 (file)
@@ -43,7 +43,7 @@ public :
 DEFINE_STANDARD_RTTIEXT(StepVisual_SurfaceStyleTransparent, Standard_Transient)
 
 private:
-  Standard_Real myTransparency;
+  Standard_Real myTransparency{};
 
 };
 #endif // _StepVisual_SurfaceStyleTransparent_HeaderFile_
index 7096b10ba0aca239a5a0339f39ec92be7af81ae9..886edb4cc0d1c17bf28f61713278de3d6a54a845 100644 (file)
@@ -23,9 +23,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedEdge, StepVisual_TessellatedStr
 //purpose  : 
 //=======================================================================
 
-StepVisual_TessellatedEdge::StepVisual_TessellatedEdge ()
+StepVisual_TessellatedEdge::StepVisual_TessellatedEdge () : myHasGeometricLink(Standard_False)
 {
-  myHasGeometricLink = Standard_False;
+  
 }
 
 //=======================================================================
index 1432d69d95337dce34e8094599ff85164cb76308..83b5a230746917b7606c92f12ee9b899a51d27ea 100644 (file)
@@ -23,9 +23,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedFace, StepVisual_TessellatedStr
 //purpose  : 
 //=======================================================================
 
-StepVisual_TessellatedFace::StepVisual_TessellatedFace ()
+StepVisual_TessellatedFace::StepVisual_TessellatedFace () : myHasGeometricLink(Standard_False)
 {
-  myHasGeometricLink = Standard_False;
+  
 }
 
 //=======================================================================
index 9386ed38229362ed769a14775a770213cc606c7a..1ef3923e83cbc071c355af6f6f8246bed9f98cf6 100644 (file)
@@ -79,7 +79,7 @@ public :
 private:
 
   Handle(StepVisual_CoordinatesList) myCoordinates;
-  Standard_Integer myPnmax;
+  Standard_Integer myPnmax{};
   Handle(TColStd_HArray2OfReal) myNormals;
   StepVisual_FaceOrSurface myGeometricLink; //!< optional
   Standard_Boolean myHasGeometricLink; //!< flag "is GeometricLink defined"
index 879282aba4fa75a9955a39a42733865843f328dc..4262a90de1ba6089749ab19ace90d91f1eb01193 100644 (file)
@@ -23,9 +23,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedShell, StepVisual_TessellatedIt
 //purpose  : 
 //=======================================================================
 
-StepVisual_TessellatedShell::StepVisual_TessellatedShell ()
+StepVisual_TessellatedShell::StepVisual_TessellatedShell () : myHasTopologicalLink(Standard_False)
 {
-  myHasTopologicalLink = Standard_False;
+  
 }
 
 //=======================================================================
index 169ecd240d89b0a24bc2297c7a2e31524c0cb229..117ed89977c8f29dbdb5a649cf35dfa9a7953161 100644 (file)
@@ -23,9 +23,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedSolid, StepVisual_TessellatedIt
 //purpose  : 
 //=======================================================================
 
-StepVisual_TessellatedSolid::StepVisual_TessellatedSolid ()
+StepVisual_TessellatedSolid::StepVisual_TessellatedSolid () : myHasGeometricLink(Standard_False)
 {
-  myHasGeometricLink = Standard_False;
+  
 }
 
 //=======================================================================
index 436aa4645b1dcfb0ea2afec9ca41d7a3b22a41c2..5c77f7410b2bb547e932953bf8a618952235504a 100644 (file)
@@ -67,7 +67,7 @@ public :
 private:
 
   Handle(StepVisual_CoordinatesList) myCoordinates;
-  Standard_Integer myPnmax;
+  Standard_Integer myPnmax{};
   Handle(TColStd_HArray2OfReal) myNormals;
 
 };
index 59527941c331f3236e3f1a6c968e42e088f21356..3a8f4d897ae897ee28bec9be39cf8173f7075746 100644 (file)
@@ -23,10 +23,10 @@ IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedVertex, StepVisual_TessellatedS
 //purpose  : 
 //=======================================================================
 
-StepVisual_TessellatedVertex::StepVisual_TessellatedVertex ()
+StepVisual_TessellatedVertex::StepVisual_TessellatedVertex () : myPointIndex(0), myHasTopologicalLink(Standard_False)
 {
-  myPointIndex = 0;
-  myHasTopologicalLink = Standard_False;
+  
+  
 }
 
 //=======================================================================
index bfb34eed41d414a7b51c648bf2aa41f797c16a63..4e568f8d6fa0c1cffad5ffea38348283af2d84ff 100644 (file)
@@ -23,9 +23,9 @@ IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedWire, StepVisual_TessellatedIte
 //purpose  : 
 //=======================================================================
 
-StepVisual_TessellatedWire::StepVisual_TessellatedWire ()
+StepVisual_TessellatedWire::StepVisual_TessellatedWire () : myHasGeometricModelLink(Standard_False)
 {
-  myHasGeometricModelLink = Standard_False;
+  
 }
 
 //=======================================================================
index 56d8de03d67a8dd47118e4ad18af0c0d66943982..5f441a7315d2ecbf9075dc2839a2a5b73947b864 100644 (file)
@@ -92,12 +92,12 @@ private:
 
   StepVisual_CentralOrParallel projectionType;
   Handle(StepGeom_CartesianPoint) projectionPoint;
-  Standard_Real viewPlaneDistance;
-  Standard_Real frontPlaneDistance;
-  Standard_Boolean frontPlaneClipping;
-  Standard_Real backPlaneDistance;
-  Standard_Boolean backPlaneClipping;
-  Standard_Boolean viewVolumeSidesClipping;
+  Standard_Real viewPlaneDistance{};
+  Standard_Real frontPlaneDistance{};
+  Standard_Boolean frontPlaneClipping{};
+  Standard_Real backPlaneDistance{};
+  Standard_Boolean backPlaneClipping{};
+  Standard_Boolean viewVolumeSidesClipping{};
   Handle(StepVisual_PlanarBox) viewWindow;
 
 
index 6e7edaaa6cfa221c1863be86f97080aae68b9141..26a3b98f68e5a7cd436144fec2058bd69edd80e8 100644 (file)
@@ -34,7 +34,7 @@ TCollection_AsciiString Storage_BaseDriver::ReadMagicNumber (Standard_IStream& t
 
   TCollection_AsciiString aReadMagicNumber;
 
-  char aChar;
+  char aChar = 0;
   Standard_Size aReadCharNb = 0;
 
   while (theIStream.good() && (aReadCharNb < aMagicNumberLen))
index 4ff095359e53f5b22bd90004f472e8fbabd37e48..6ffb320a99dba5606f63dc805de3d74df707c76c 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Storage_Data,Standard_Transient)
 
-Storage_Data::Storage_Data()
+Storage_Data::Storage_Data() : myRootData(new Storage_RootData), myTypeData(new Storage_TypeData), myInternal(new Storage_InternalData), myHeaderData(new Storage_HeaderData)
 {
-  myRootData = new Storage_RootData;
-  myTypeData = new Storage_TypeData;
-  myInternal = new Storage_InternalData;
-  myHeaderData = new Storage_HeaderData;
+  
+  
+  
+  
 }
 
 void Storage_Data::AddRoot(const Handle(Standard_Persistent)& anObject) const
index b5093120a94a3b4a58c1d85f77d9fdf4a33c1b8b..b563bade1b2241e1d3486e440bdaf4dadba9b052 100644 (file)
@@ -48,7 +48,7 @@ Standard_Boolean Storage_RootData::Read (const Handle(Storage_BaseDriver)& theDr
   }
 
   TCollection_AsciiString aRootName, aTypeName;
-  Standard_Integer aRef;
+  Standard_Integer aRef = 0;
 
   Standard_Integer len = theDriver->RootSectionSize();
   for (Standard_Integer i = 1; i <= len; i++)
index bb617809b06b831f8d2044fc674022ecfd9671cd..bc6809b0a43c972af90ee98626f25370ede30364 100644 (file)
@@ -97,15 +97,15 @@ Standard_Persistent* Storage_Bucket::Value
 Storage_BucketOfPersistent::Storage_BucketOfPersistent
                          (const Standard_Integer theBucketSize,
                           const Standard_Integer theBucketNumber)
-: myNumberOfBucket(1),myNumberOfBucketAllocated(theBucketNumber),myBucketSize
+: myBuckets((Storage_Bucket**)Standard::Allocate
+                         (sizeof(Storage_Bucket*) * theBucketNumber)), myNumberOfBucket(1),myNumberOfBucketAllocated(theBucketNumber),myCurrentBucket(myBuckets[0]), myLength(0), myCurrentBucketNumber(0), myBucketSize
                          (theBucketSize)
 {
-  myBuckets =  (Storage_Bucket**)Standard::Allocate
-                         (sizeof(Storage_Bucket*) * theBucketNumber);
+  
   myBuckets[0] = new Storage_Bucket(myBucketSize);
-  myCurrentBucket = myBuckets[0];
-  myLength = 0;
-  myCurrentBucketNumber = 0;
+  
+  
+  
 }
 
 //=======================================================================
@@ -116,7 +116,7 @@ Storage_BucketOfPersistent::Storage_BucketOfPersistent
 void Storage_BucketOfPersistent::Clear()
 {
   if (myBuckets) {
-    Standard_Integer i;
+    Standard_Integer i = 0;
 
     for (i = 1; i < myNumberOfBucket; i++) delete myBuckets[i];
     myNumberOfBucket = 1;
@@ -143,7 +143,7 @@ Storage_BucketOfPersistent::~Storage_BucketOfPersistent()
 Standard_Persistent* Storage_BucketOfPersistent::Value
                          (const Standard_Integer theIndex)
 {
-  Standard_Integer theInd,theCurrentBucketNumber,tecurrentind = theIndex - 1;
+  Standard_Integer theInd = 0,theCurrentBucketNumber = 0,tecurrentind = theIndex - 1;
   theCurrentBucketNumber = tecurrentind / myBucketSize;
   theInd = tecurrentind - (myBucketSize * theCurrentBucketNumber);
 
@@ -269,11 +269,11 @@ void Storage_BucketIterator::Next()
 //           IMPLEMENTATION BucketOfPersistent
 //=======================================================================
 
-Storage_Schema::Storage_Schema()
+Storage_Schema::Storage_Schema() : myCallBackState(Standard_False)
 {
   Clear();
   ResetDefaultCallBack();
-  myCallBackState = Standard_False;
+  
 }
 
 //=======================================================================
@@ -332,7 +332,7 @@ void Storage_Schema::Write (const Handle(Storage_BaseDriver)& theDriver,
 
   // add all the persistent to write...
   //
-  Standard_Integer                 posfrom,posto;
+  Standard_Integer                 posfrom = 0,posto = 0;
   Handle(Standard_Persistent)      p;
   Handle(Storage_HSeqOfRoot)       plist;
   TCollection_AsciiString          errorContext("AddPersistent");
@@ -359,8 +359,8 @@ void Storage_Schema::Write (const Handle(Storage_BaseDriver)& theDriver,
 
   // ...and now we write
   //
-  Standard_Integer            i,
-                              len;
+  Standard_Integer            i = 0,
+                              len = 0;
 
  aData->HeaderData()->SetCreationDate(ICreationDate());
  aData->HeaderData()->SetStorageVersion(Storage::Version());
@@ -662,7 +662,7 @@ Standard_Boolean Storage_Schema::AddPersistent
     Handle(Storage_InternalData)     iData = Storage_Schema::ICurrentData()->InternalData();
 
     if (sp->_typenum == 0) {
-      Standard_Integer         aTypenum;
+      Standard_Integer         aTypenum = 0;
       static TCollection_AsciiString  aTypeName;
       aTypeName = tName;
       Handle(Storage_TypeData) tData = Storage_Schema::ICurrentData()->TypeData();
@@ -830,8 +830,8 @@ Handle(Storage_Data)& Storage_Schema::ICurrentData()
 TCollection_AsciiString Storage_Schema::ICreationDate()
 {
   char nowstr[SLENGTH];
-  time_t nowbin;
-  struct tm *nowstruct;
+  time_t nowbin = 0;
+  struct tm *nowstruct = nullptr;
   if (time(&nowbin) == (time_t)-1)
   {
 #ifdef OCCT_DEBUG
index ee0cb721b61d73bae00235c495f8c53a41185bcf..a6ad934d5f1ca791ea1356bcc6b5ca94077e7ea0 100644 (file)
@@ -44,7 +44,7 @@ Standard_Boolean Storage_TypeData::Read (const Handle(Storage_BaseDriver)& theDr
     return Standard_False;
   }
 
-  Standard_Integer        aTypeNum;
+  Standard_Integer        aTypeNum = 0;
   TCollection_AsciiString aTypeName;
 
   Standard_Integer len = theDriver->TypeSectionSize();
@@ -88,7 +88,7 @@ Standard_Boolean Storage_TypeData::IsType(const TCollection_AsciiString& aName)
 Handle(TColStd_HSequenceOfAsciiString) Storage_TypeData::Types() const
 {
   Handle(TColStd_HSequenceOfAsciiString) r = new TColStd_HSequenceOfAsciiString;
-  Standard_Integer                       i;
+  Standard_Integer                       i = 0;
 
   for (i = 1; i <= myPt.Extent(); i++) {
     r->Append(myPt.FindKey(i));
index c3c0d9e198f92bcbdfbdf36342f927d05f95e44a..d39e6d0b4bd8666f8100d4d216ccd9af8fe24e62 100644 (file)
@@ -23,10 +23,10 @@ Storage_TypedCallBack::Storage_TypedCallBack() : myIndex(0)
 {
 }
 
-Storage_TypedCallBack::Storage_TypedCallBack(const TCollection_AsciiString& aTypeName,const Handle(Storage_CallBack)& aCallBack) : myIndex(0)
+Storage_TypedCallBack::Storage_TypedCallBack(const TCollection_AsciiString& aTypeName,const Handle(Storage_CallBack)& aCallBack) : myType(aTypeName), myCallBack(aCallBack), myIndex(0)
 {
-  myType = aTypeName;
-  myCallBack = aCallBack;
+  
+  
 }
 
 void Storage_TypedCallBack::SetType(const TCollection_AsciiString& aType) 
index 07650da631eeda539174d73fcae6818728ddef18..19d1efbe3d4f326610c4aaa6b27f37411a14dd0a 100644 (file)
@@ -552,9 +552,9 @@ void TColStd_PackedMapOfInteger::Intersection
   else if (myData1 == theMap2.myData1)
     Intersect (theMap1);
   else {
-    const TColStd_intMapNode* const* aData1;
-    const TColStd_intMapNode* const* aData2;
-    Standard_Integer nBuckets1, nBuckets2;
+    const TColStd_intMapNode* const* aData1 = nullptr;
+    const TColStd_intMapNode* const* aData2 = nullptr;
+    Standard_Integer nBuckets1 = 0, nBuckets2 = 0;
     if (theMap1.Extent() < theMap2.Extent())
     {
       aData1 = theMap1.myData1;
@@ -841,7 +841,7 @@ void TColStd_PackedMapOfInteger::Difference  (const TColStd_PackedMapOfInteger&
   else if (myData1 == theMap2.myData1)
     Differ(theMap1);
   else {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     const Standard_Integer nBuckets1 = theMap1.myNbBuckets;
     const Standard_Integer nBuckets2 = theMap2.myNbBuckets;
     Clear();
index 3234a888bdc4af4dde1af84e8b3bdc69499bc4cc..6d8511e35775bcb950135909fbe83489c42b54a9 100644 (file)
@@ -46,9 +46,9 @@ static inline void Free (Standard_PCharacter aAddr)
 // ----------------------------------------------------------------------------
 // Create an empty AsciiString
 // ----------------------------------------------------------------------------
-TCollection_AsciiString::TCollection_AsciiString()
+TCollection_AsciiString::TCollection_AsciiString() : mylength(0)
 {
-  mylength = 0;
+  
   
   mystring = Allocate(mylength+1);
   mystring[mylength] = '\0';
@@ -116,10 +116,10 @@ TCollection_AsciiString::TCollection_AsciiString(const Standard_Character aChar)
 // Create an AsciiString from a filler
 // ----------------------------------------------------------------------------
 TCollection_AsciiString::TCollection_AsciiString(const Standard_Integer length,
-                                                 const Standard_Character filler )
+                                                 const Standard_Character filler ) : mystring(Allocate(length+1)), mylength(length)
 {
-  mystring = Allocate(length+1);
-  mylength = length;
+  
+  
   for (int i = 0 ; i < length ; i++) mystring[i] = filler;
   mystring[length] = '\0';
 }
@@ -472,7 +472,7 @@ Standard_Integer TCollection_AsciiString::FirstLocationNotInSet
 {
   if (mylength == 0 || Set.mylength == 0) return 0;
   if (FromIndex > 0 && ToIndex <= mylength && FromIndex <= ToIndex ) {
-    Standard_Boolean find;
+    Standard_Boolean find = 0;
     for (int i = FromIndex-1 ; i < ToIndex; i++) {
       find = Standard_False;
       for(int j = 0; j < Set.mylength; j++)  
@@ -735,7 +735,7 @@ Standard_Boolean TCollection_AsciiString::EndsWith (const TCollection_AsciiStrin
 // ----------------------------------------------------------------------------
 Standard_Integer TCollection_AsciiString::IntegerValue()const
 {
-  char *ptr;
+  char *ptr = nullptr;
   Standard_Integer value = (Standard_Integer)strtol(mystring,&ptr,10); 
   if (ptr != mystring) return value;
 
@@ -747,7 +747,7 @@ Standard_Integer TCollection_AsciiString::IntegerValue()const
 // ----------------------------------------------------------------------------
 Standard_Boolean TCollection_AsciiString::IsIntegerValue()const
 {
-  char *ptr;
+  char *ptr = nullptr;
   strtol(mystring,&ptr,10);
 
   if (ptr != mystring) {
@@ -764,7 +764,7 @@ Standard_Boolean TCollection_AsciiString::IsIntegerValue()const
 // ----------------------------------------------------------------------------
 Standard_Boolean TCollection_AsciiString::IsRealValue (Standard_Boolean theToCheckFull)const
 {
-  char *ptr;
+  char *ptr = nullptr;
   Strtod(mystring,&ptr);
   if (theToCheckFull)
   {
@@ -793,7 +793,7 @@ Standard_Boolean TCollection_AsciiString::IsAscii()const
 //------------------------------------------------------------------------
 void TCollection_AsciiString::LeftAdjust ()
 {
-   Standard_Integer i ;
+   Standard_Integer i = 0 ;
    for( i = 0 ; i < mylength ; i ++) if(!IsSpace(mystring[i])) break;
    if( i > 0 ) Remove(1,i);
 }
@@ -890,7 +890,7 @@ void TCollection_AsciiString::Prepend(const TCollection_AsciiString& what)
 // ----------------------------------------------------------------------------
 Standard_Real TCollection_AsciiString::RealValue()const
 {
-  char *ptr;
+  char *ptr = nullptr;
   Standard_Real value = Strtod(mystring,&ptr);
   if (ptr != mystring) return value;
 
@@ -985,7 +985,7 @@ void TCollection_AsciiString::Remove (const Standard_Integer where,
                                       const Standard_Integer ahowmany)
 {
  if (where+ahowmany <= mylength+1) {
-   int i,j;
+   int i = 0,j = 0;
    for(i = where+ahowmany-1, j = where-1; i < mylength; i++, j++)
      mystring[j] = mystring[i];
    mylength -= ahowmany;
@@ -1003,7 +1003,7 @@ void TCollection_AsciiString::Remove (const Standard_Integer where,
 //------------------------------------------------------------------------
 void TCollection_AsciiString::RightAdjust ()
 {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for ( i = mylength-1 ; i >= 0 ; i--)
     if(!IsSpace(mystring[i]))
       break;
@@ -1017,8 +1017,8 @@ void TCollection_AsciiString::RightAdjust ()
 void TCollection_AsciiString::RightJustify(const Standard_Integer Width,
                                            const Standard_Character Filler)
 {
-  Standard_Integer i ;
-  Standard_Integer k ;
+  Standard_Integer i = 0 ;
+  Standard_Integer k = 0 ;
   if (Width > mylength) {
     mystring = Reallocate (mystring, Width + 1);
 
@@ -1041,7 +1041,7 @@ Standard_Integer TCollection_AsciiString::Search
 {
   Standard_Integer size = Standard_Integer( what ? strlen( what ) : 0 );
   if (size) {
-    int k,j;
+    int k = 0,j = 0;
     int i = 0;
     while ( i < mylength-size+1 ) {
       k = i++;
@@ -1063,7 +1063,7 @@ Standard_Integer TCollection_AsciiString::Search
   Standard_Integer size = what.mylength;
   Standard_CString swhat = what.mystring;  
   if (size) {
-    int k,j;
+    int k = 0,j = 0;
     int i = 0;
     while ( i < mylength-size+1 ) {
       k = i++;
@@ -1084,7 +1084,7 @@ Standard_Integer TCollection_AsciiString::SearchFromEnd
 {
   Standard_Integer size = Standard_Integer( what ? strlen( what ) : 0 );
   if (size) {
-    int k,j;
+    int k = 0,j = 0;
     int i = mylength-1;
     while ( i >= size-1 ) {
       k = i--;
@@ -1106,7 +1106,7 @@ Standard_Integer TCollection_AsciiString::SearchFromEnd
   int size = what.mylength;
   if (size) {
     Standard_CString swhat = what.mystring;  
-    int k,j;
+    int k = 0,j = 0;
     int i = mylength-1;
     while ( i >= size-1 ) {
       k = i--;
@@ -1256,9 +1256,9 @@ TCollection_AsciiString TCollection_AsciiString::Token
     throw Standard_NullObject("TCollection_AsciiString::Token : "
                               "parameter 'separators'");
 
-  Standard_Integer theOne ;
+  Standard_Integer theOne = 0 ;
   Standard_Integer StringIndex = 0 ;
-  Standard_Integer SeparatorIndex ;
+  Standard_Integer SeparatorIndex = 0 ;
   Standard_Integer BeginIndex=0 ;
   Standard_Integer EndIndex=0 ;
 
@@ -1327,7 +1327,7 @@ void TCollection_AsciiString::UpperCase()
 //------------------------------------------------------------------------
 Standard_Integer TCollection_AsciiString::UsefullLength () const
 {
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for ( i = mylength -1 ; i >= 0 ; i--) 
     if (IsGraphic(mystring[i])) break;
   return i+1;
index 2a83bab60312cbdd224ff19c91ba349c5dccce20..294bfd5b9d3002f3fe1ab310600c888ca797d06a 100644 (file)
@@ -184,10 +184,10 @@ TCollection_ExtendedString::TCollection_ExtendedString
 // Create a string from a ExtCharacter
 // ----------------------------------------------------------------------------
 TCollection_ExtendedString::TCollection_ExtendedString
-                                        (const Standard_ExtCharacter aChar)
+                                        (const Standard_ExtCharacter aChar) : mylength(1), mystring(allocateExtChars (1))
 {
-  mylength    = 1;
-  mystring    = allocateExtChars (1);
+  
+  
   mystring[0] = aChar;
   mystring[1] = 0;
 }
@@ -197,10 +197,10 @@ TCollection_ExtendedString::TCollection_ExtendedString
 // ----------------------------------------------------------------------------
 TCollection_ExtendedString::TCollection_ExtendedString
                                         (const Standard_Integer      length,
-                                         const Standard_ExtCharacter filler )
+                                         const Standard_ExtCharacter filler ) : mystring(allocateExtChars (length)), mylength(length)
 {
-  mystring = allocateExtChars (length);
-  mylength = length;
+  
+  
   for (int i = 0 ; i < length ; i++) mystring[i] = filler;
   mystring[mylength] = 0;
 }
@@ -212,7 +212,7 @@ TCollection_ExtendedString::TCollection_ExtendedString
                                         (const Standard_Integer aValue)
 {
   union {int bid ;
-         char t [13];} CHN ;
+         char t [13];} CHN{} ;
   Sprintf(&CHN.t[0],"%d",aValue);
   mylength = (int)strlen(CHN.t);
   mystring = allocateExtChars (mylength);
@@ -227,7 +227,7 @@ TCollection_ExtendedString::TCollection_ExtendedString
                                         (const Standard_Real aValue)
 {
   union {int bid ;
-         char t [50];} CHN ;
+         char t [50];} CHN{} ;
   Sprintf(&CHN.t[0],"%g",aValue);
   mylength = (int)strlen( CHN.t );
   mystring = allocateExtChars (mylength);
@@ -239,11 +239,11 @@ TCollection_ExtendedString::TCollection_ExtendedString
 // create an extendedstring from an extendedstring
 // ----------------------------------------------------------------------------
 TCollection_ExtendedString::TCollection_ExtendedString
-                                (const TCollection_ExtendedString& astring)
+                                (const TCollection_ExtendedString& astring) : mylength(astring.mylength), mystring(allocateExtChars (astring.mylength))
 {
   const Standard_Integer aSizeBytes = astring.mylength * sizeof(Standard_ExtCharacter);
-  mylength = astring.mylength;
-  mystring = allocateExtChars (astring.mylength);
+  
+  
   memcpy (mystring, astring.mystring, aSizeBytes);
   mystring[mylength] = 0;
 }
@@ -253,9 +253,9 @@ TCollection_ExtendedString::TCollection_ExtendedString
 //---------------------------------------------------------------------------
 TCollection_ExtendedString::TCollection_ExtendedString
                                 (const TCollection_AsciiString& theString,
-                                 const Standard_Boolean isMultiByte)
+                                 const Standard_Boolean isMultiByte) : mylength(nbSymbols (theString.ToCString()))
 {
-  mylength = nbSymbols (theString.ToCString());
+  
   mystring = allocateExtChars (mylength);
   mystring[mylength] = 0;
   if (isMultiByte && ConvertToUnicode (theString.ToCString()))
@@ -644,7 +644,7 @@ void TCollection_ExtendedString::Remove (const Standard_Integer where,
                                          const Standard_Integer ahowmany)
 {
   if (where+ahowmany <= mylength+1) {
-    int i,j;
+    int i = 0,j = 0;
     for (i = where+ahowmany-1, j = where-1; i < mylength; i++, j++)
       mystring[j] = mystring[i];
     mylength -= ahowmany;
@@ -665,7 +665,7 @@ Standard_Integer TCollection_ExtendedString::Search
   Standard_Integer size = what.mylength;
   Standard_ExtString swhat = what.mystring;  
   if (size) {
-    int k,j;
+    int k = 0,j = 0;
     int i = 0;
     Standard_Boolean find = Standard_False; 
     while ( i < mylength-size+1 && !find) {
@@ -688,7 +688,7 @@ Standard_Integer TCollection_ExtendedString::SearchFromEnd
   Standard_Integer size = what.mylength;
   if (size) {
     Standard_ExtString swhat = what.mystring;  
-    int k,j;
+    int k = 0,j = 0;
     int i = mylength-1;
     Standard_Boolean find = Standard_False; 
     while ( i >= size-1 && !find) {
@@ -771,11 +771,11 @@ TCollection_ExtendedString TCollection_ExtendedString::Token
     throw Standard_NullObject("TCollection_ExtendedString::Token : "
                               "parameter 'separators'");
   
-  int                   i,j,k,l;
+  int                   i = 0,j = 0,k = 0,l = 0;
   Standard_PExtCharacter  buftmp = allocateExtChars (mylength);
-  Standard_ExtCharacter aSep;
+  Standard_ExtCharacter aSep = 0;
   
-  Standard_Boolean isSepFound   = Standard_False, otherSepFound;
+  Standard_Boolean isSepFound   = Standard_False, otherSepFound = 0;
   
   j = 0;
   
index 201a44ee13f43e0c0bbaa6d6a77a6f623e1f6cfd..b7ae1727fe859a1d3a29b35b6adfae8cdabcdfc5 100644 (file)
@@ -388,7 +388,7 @@ Standard_OStream& TDF_Attribute::Dump(Standard_OStream& anOS) const
   if (IsBackuped())  anOS<<" Backuped";
   if (IsForgotten()) anOS<<" Forgotten";
   char toto[45];
-  Standard_PCharacter pStr;
+  Standard_PCharacter pStr = nullptr;
   //
   pStr=toto;
   ID().ToCString(pStr);
index f7aad675b328b6ab98fc160a2bfe2e236d4f3094..005a802a44f727765523d8e9f950bc2e6928572c 100644 (file)
@@ -117,7 +117,7 @@ void TDF_ClosureTool::LabelAttributes
  const TDF_ClosureMode& aMode) 
 {
   Handle(TDF_DataSet) tmpDataSet;
-  Standard_Boolean BindLabel;
+  Standard_Boolean BindLabel = 0;
   TDF_MapIteratorOfAttributeMap attMItr;
   TDF_MapIteratorOfLabelMap labMItr;
 
index e2c701774cad4a11b6d2b5c1083962854c0ae645..8846fe6b87b59067eca16d31810a40a174eb3e60 100644 (file)
@@ -50,9 +50,9 @@ TDF_CopyLabel::TDF_CopyLabel()
 //=======================================================================
 
 TDF_CopyLabel::TDF_CopyLabel(const TDF_Label& aSource,const TDF_Label& aTarget )
-     :myFilter(Standard_False), myIsDone(Standard_False)
+     :mySL(aSource), myTL(aTarget), myFilter(Standard_False), myIsDone(Standard_False)
 {
-  mySL = aSource; myTL = aTarget;
+  
 }
 
 //=======================================================================
@@ -80,7 +80,7 @@ void TDF_CopyLabel::ExternalReferences(const TDF_Label& aRefLabel, const TDF_Lab
 //     TDF_Tool::Entry(itr.Value()->Label(), entr1);  //d
 //     std::cout<<"\tSource Attribute dynamic type = "<<itr.Value()->DynamicType()<<" Label = "<<entr1 <<std::endl;
     for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) {
-      Handle(TDF_Attribute) att = attMItr.Key();
+      const Handle(TDF_Attribute)& att = attMItr.Key();
 
 //       TDF_Tool::Entry(att->Label(), entr1);  
 //       std::cout<<"\t\tReferences attribute dynamic type = "<<att->DynamicType()<<" Label = "<<entr1 <<std::endl;
@@ -169,7 +169,7 @@ void TDF_CopyLabel::Perform()
   TDF_ClosureTool::Closure(ds, myFilter, mode);
   if(extReferers) {
     for (TDF_MapIteratorOfAttributeMap attMItr(myMapOfExt);attMItr.More(); attMItr.Next()) {
-      Handle(TDF_Attribute) att = attMItr.Key();
+      const Handle(TDF_Attribute)& att = attMItr.Key();
       myRT->SetRelocation(att, att);
 #ifdef OCCT_DEBUG
       PrintEntry(att->Label(), Standard_True);
index 50e85d0fc2a3be8a1274b6308ecc2970f68bdab0..afbd2dae757d9033cf57aae70de614afea1e724d 100644 (file)
@@ -243,7 +243,7 @@ Standard_Integer TDF_Data::CommitTransaction
           if (aPtrCurrentAtt->mySavedTransaction >=
               aPtrCurrentAtt->myTransaction)
           {
-            const Handle(TDF_Attribute) currentAtt = aPtrCurrentAtt;
+            const Handle(TDF_Attribute)& currentAtt = aPtrCurrentAtt;
             // Collision with a not forgotten version.
             if (backupAtt.IsNull()) {
               TDF_Data_DeltaCreation
index 60d5b7c79bb536c273b2291f8f4b99397f666369..711416eaa7127e93c178435259bd88dc5a9de730 100644 (file)
@@ -87,7 +87,7 @@ void TDF_Delta::BeforeOrAfterApply(const Standard_Boolean before) const
 
   Standard_Boolean noDeadLock = Standard_True;
   Standard_Integer nbAD = ADlist.Extent();
-  Standard_Boolean next;
+  Standard_Boolean next = 0;
   while (noDeadLock && (nbAD != 0)) {
     itr.Initialize(ADlist);
     while (itr.More()) {
index ca2228f9be07da17e66d8375c0172c82c164696e..c617a3f763e13d502334ffb5ed9b5694ff637866 100644 (file)
@@ -172,7 +172,7 @@ static Standard_Boolean TDF_Tool_DescendantRef
           attMItr.More(); attMItr.Next()) {
        // CLE
        // const Handle(TDF_Attribute)& att = attMItr.Key();
-       Handle(TDF_Attribute) att = attMItr.Key();
+       const Handle(TDF_Attribute)& att = attMItr.Key();
         if (!att.IsNull() && !att->Label().IsNull())
         {
          // ENDCLE
@@ -242,7 +242,7 @@ static void TDF_Tool_OutReferers(const TDF_Label& aRefLabel,
         attMItr.More(); attMItr.Next()) {
       // CLE
       // const Handle(TDF_Attribute)& att = attMItr.Key();
-      Handle(TDF_Attribute) att = attMItr.Key();
+      const Handle(TDF_Attribute)& att = attMItr.Key();
       // ENDCLE
       if (aFilterForReferences.IsKept(att) &&
           !att->Label().IsNull() &&
@@ -316,7 +316,7 @@ static void TDF_Tool_OutReferences(const TDF_Label& aRefLabel,
     itr.Value()->References(ds);
     const TDF_AttributeMap& attMap = ds->Attributes();
     for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More();attMItr.Next()) {
-      Handle(TDF_Attribute) att = attMItr.Key();
+      const Handle(TDF_Attribute)& att = attMItr.Key();
       if (aFilterForReferences.IsKept(att) &&
           !att->Label().IsNull() &&
           !att->Label().IsDescendant(aRefLabel))
@@ -650,7 +650,7 @@ void TDF_Tool::ExtendedDeepDump
   anOS<<std::endl<<"Extended dump of filtered attribute(s):"<<std::endl;
   Standard_Integer nba = 0;
   TCollection_AsciiString entry;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for ( i = 1; i<= map.Extent(); ++i) {
     const Handle(TDF_Attribute)& att = map.FindKey(i);
     if (aFilter.IsKept(att)) {
index 97c3c71e1581a2812cb850627ce25203c46d27f9..983300b70884fac15a4cdb6d13e2234b0299c34d 100644 (file)
@@ -112,8 +112,8 @@ private:
 
 
   Handle(TColStd_HArray1OfByte) myValues;
-  Standard_Integer myLower;
-  Standard_Integer myUpper;
+  Standard_Integer myLower{};
+  Standard_Integer myUpper{};
   Standard_GUID myID;
 
 };
index e8d3cf0e1a012e224c53ed80393767a92add1c9f..7c6a834e4e1399e95f38571ecacef3c6a7f88ece 100644 (file)
@@ -177,7 +177,7 @@ void TDataStd_ByteArray::ChangeArray (const Handle(TColStd_HArray1OfByte)& newAr
   Standard_Integer aLower    = newArray->Lower();
   Standard_Integer anUpper   = newArray->Upper();
   Standard_Boolean aDimEqual = Standard_False;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   if ( Lower() == aLower && Upper() == anUpper ) {
     aDimEqual = Standard_True;
index 54c623167b8bd245c436cffd671ef1c042015cf8..6a89a9a61ebdf054d3bb766ad2237a31d11197e2 100644 (file)
@@ -55,7 +55,7 @@ TDataStd_DeltaOnModificationOfByteArray::TDataStd_DeltaOnModificationOfByteArray
       if(Arr1 != Arr2) {
        myUp1 = Arr1->Upper();
        myUp2 = Arr2->Upper();
-       Standard_Integer i, N=0, aCase=0; 
+       Standard_Integer i = 0, N=0, aCase=0; 
        if(myUp1 == myUp2) 
          {aCase = 1; N = myUp1;}
        else if(myUp1 < myUp2) 
@@ -124,7 +124,7 @@ void TDataStd_DeltaOnModificationOfByteArray::Apply()
   else 
     aCurAtt->Backup();
 
-  Standard_Integer aCase;
+  Standard_Integer aCase = 0;
   if(myUp1 == myUp2) 
     aCase = 1;
   else if(myUp1 < myUp2) 
@@ -135,7 +135,7 @@ void TDataStd_DeltaOnModificationOfByteArray::Apply()
   if (aCase == 1 && (myIndxes.IsNull() || myValues.IsNull()))
     return;
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Handle(TColStd_HArray1OfByte) BArr = aCurAtt->InternalArray();
   if(BArr.IsNull()) return;
   if(aCase == 1)   
index 2d557592187987ab0db76ff1b3d4fa7107484631..849440dd91223a91c98d5ebd50c23e7f27950036 100644 (file)
@@ -54,7 +54,7 @@ TDataStd_DeltaOnModificationOfExtStringArray::TDataStd_DeltaOnModificationOfExtS
       if(Arr1 != Arr2) {
        myUp1 = Arr1->Upper();
        myUp2 = Arr2->Upper();
-       Standard_Integer i, N =0, aCase=0; 
+       Standard_Integer i = 0, N =0, aCase=0; 
        if(myUp1 == myUp2) 
          {aCase = 1; N = myUp1;}
        else if(myUp1 < myUp2) 
@@ -123,7 +123,7 @@ void TDataStd_DeltaOnModificationOfExtStringArray::Apply()
   else 
     aCurAtt->Backup();
 
-  Standard_Integer aCase;
+  Standard_Integer aCase = 0;
   if(myUp1 == myUp2) 
     aCase = 1;
   else if(myUp1 < myUp2) 
@@ -134,7 +134,7 @@ void TDataStd_DeltaOnModificationOfExtStringArray::Apply()
   if (aCase == 1 && (myIndxes.IsNull() || myValues.IsNull()))
     return;
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Handle(TColStd_HArray1OfExtendedString) aStrArr = aCurAtt->Array();
   if(aStrArr.IsNull()) return;
 
index 89f197109ee313438099503566c82d856ae9a7c2..a9eeb30b12b4ba3a912ffe00253cbeda334976c0 100644 (file)
@@ -54,7 +54,7 @@ TDataStd_DeltaOnModificationOfIntArray::TDataStd_DeltaOnModificationOfIntArray(c
       if(Arr1 != Arr2) {
        myUp1 = Arr1->Upper();
        myUp2 = Arr2->Upper();
-       Standard_Integer i, N=0, aCase=0; 
+       Standard_Integer i = 0, N=0, aCase=0; 
        if(myUp1 == myUp2) 
          {aCase = 1; N = myUp1;}
        else if(myUp1 < myUp2) 
@@ -122,7 +122,7 @@ void TDataStd_DeltaOnModificationOfIntArray::Apply()
   else 
     aCurAtt->Backup();
 
-  Standard_Integer aCase;
+  Standard_Integer aCase = 0;
   if(myUp1 == myUp2) 
     aCase = 1;
   else if(myUp1 < myUp2) 
@@ -133,7 +133,7 @@ void TDataStd_DeltaOnModificationOfIntArray::Apply()
   if (aCase == 1 && (myIndxes.IsNull() || myValues.IsNull()))
     return;
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Handle(TColStd_HArray1OfInteger) IntArr = aCurAtt->Array();
   if(IntArr.IsNull()) return;
   if(aCase == 1) 
index d0b4b70f59f0f08247c6b501f79f5e3e52087042..3805497ebb903f9f70cb3efc98a1ca3334a7c02a 100644 (file)
@@ -54,7 +54,7 @@ TDataStd_DeltaOnModificationOfRealArray::
     if(Arr1 != Arr2) {
       myUp1 = Arr1->Upper();
       myUp2 = Arr2->Upper();
-      Standard_Integer i, N =0, aCase=0; 
+      Standard_Integer i = 0, N =0, aCase=0; 
       if(myUp1 == myUp2) 
        {aCase = 1; N = myUp1;}
       else if(myUp1 < myUp2) 
@@ -121,7 +121,7 @@ void TDataStd_DeltaOnModificationOfRealArray::Apply()
   else 
     aCurAtt->Backup();
 
-  Standard_Integer aCase;
+  Standard_Integer aCase = 0;
   if(myUp1 == myUp2) 
     aCase = 1;
   else if(myUp1 < myUp2) 
@@ -132,7 +132,7 @@ void TDataStd_DeltaOnModificationOfRealArray::Apply()
   if (aCase == 1 && (myIndxes.IsNull() || myValues.IsNull()))
     return;
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Handle(TColStd_HArray1OfReal) aRealArr = aCurAtt->Array();
   if(aRealArr.IsNull()) return;
   if(aCase == 1)   
index a9e565723f6e71d28458b27b5f5efe283813a99f..2bcd6fba1261b012cc364a8d10dfed8ce0a257be 100644 (file)
@@ -193,7 +193,7 @@ void TDataStd_ExtStringArray::ChangeArray(const Handle(TColStd_HArray1OfExtended
   Standard_Integer aLower    = newArray->Lower();
   Standard_Integer anUpper   = newArray->Upper();
   Standard_Boolean aDimEqual = Standard_False;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   if (Lower() == aLower && Upper() == anUpper ) {
     aDimEqual = Standard_True;
@@ -267,7 +267,7 @@ Handle(TDF_Attribute) TDataStd_ExtStringArray::NewEmpty () const
 
 void TDataStd_ExtStringArray::Restore(const Handle(TDF_Attribute)& With) 
 {
-  Standard_Integer i, lower, upper;
+  Standard_Integer i = 0, lower = 0, upper = 0;
   Handle(TDataStd_ExtStringArray) anArray = Handle(TDataStd_ExtStringArray)::DownCast(With);
   if(!anArray->myValue.IsNull()) {
     lower = anArray->Lower();
@@ -309,7 +309,7 @@ Standard_OStream& TDataStd_ExtStringArray::Dump (Standard_OStream& anOS) const
 {  
   anOS << "\nExtStringArray :";
   if(!myValue.IsNull()) {
-    Standard_Integer i, lower, upper;
+    Standard_Integer i = 0, lower = 0, upper = 0;
     lower = myValue->Lower();
     upper = myValue->Upper();
     for(i = lower; i<=upper; i++)
index ef1f71bd5014e5c2ddb3bf62ea2c40f4b3d899fe..527cfa49da2d16e3700abe328ceba207e453e9da 100644 (file)
@@ -62,9 +62,9 @@ Handle(TDataStd_IntPackedMap) TDataStd_IntPackedMap::Set (const TDF_Label& theLa
 //purpose  : 
 //=======================================================================
 TDataStd_IntPackedMap::TDataStd_IntPackedMap ()
-     :myIsDelta(Standard_False)
+     :myMap(new TColStd_HPackedMapOfInteger ()), myIsDelta(Standard_False)
 {
-  myMap = new TColStd_HPackedMapOfInteger ();
+  
 }
 //=======================================================================
 //function : ChangeMap
index d827b1e604397d2a77215f1ba1f0d08b63c47afe..8cf68ab52aee135b5614c6ffb76ff415623cfda4 100644 (file)
@@ -190,7 +190,7 @@ void TDataStd_IntegerArray::ChangeArray(const Handle(TColStd_HArray1OfInteger)&
   Standard_Integer aLower    = newArray->Lower();
   Standard_Integer anUpper   = newArray->Upper();
   Standard_Boolean aDimEqual = Standard_False;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   if(Lower() == aLower && Upper() == anUpper ) {
     aDimEqual = Standard_True;
@@ -264,7 +264,7 @@ Handle(TDF_Attribute) TDataStd_IntegerArray::NewEmpty () const
 
 void TDataStd_IntegerArray::Restore(const Handle(TDF_Attribute)& With) 
 {
-  Standard_Integer i, lower, upper;
+  Standard_Integer i = 0, lower = 0, upper = 0;
   Handle(TDataStd_IntegerArray) anArray = Handle(TDataStd_IntegerArray)::DownCast(With);
   if(!anArray->myValue.IsNull()) {
     lower = anArray->Lower();
@@ -307,7 +307,7 @@ Standard_OStream& TDataStd_IntegerArray::Dump (Standard_OStream& anOS) const
 {  
   anOS << "\nIntegerArray:: " << this <<" :";
   if(!myValue.IsNull()) {
-    Standard_Integer i, lower, upper;
+    Standard_Integer i = 0, lower = 0, upper = 0;
     lower = myValue->Lower();
     upper = myValue->Upper();
     for(i = lower; i<=upper; i++)
index 90bf7b32f960103ab965b6f63d85e4865d618640..828ac44e3d2088ef07d53a3ddce56200241ff05a 100644 (file)
@@ -190,7 +190,7 @@ void TDataStd_RealArray::ChangeArray(const Handle(TColStd_HArray1OfReal)& newArr
   Standard_Integer aLower    = newArray->Lower();
   Standard_Integer anUpper   = newArray->Upper();
   Standard_Boolean aDimEqual = Standard_False;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   if (!myValue.IsNull()) {
     if (Lower() == aLower && Upper() == anUpper ) {
@@ -265,7 +265,7 @@ Handle(TDF_Attribute) TDataStd_RealArray::NewEmpty () const
 
 void TDataStd_RealArray::Restore(const Handle(TDF_Attribute)& With) 
 {
-  Standard_Integer i, lower, upper;
+  Standard_Integer i = 0, lower = 0, upper = 0;
   Handle(TDataStd_RealArray) anArray = Handle(TDataStd_RealArray)::DownCast(With);
   if(!anArray->myValue.IsNull()) {
     lower = anArray->Lower();
@@ -307,7 +307,7 @@ Standard_OStream& TDataStd_RealArray::Dump (Standard_OStream& anOS) const
 {  
   anOS << "\nRealArray::" << this <<" :";
   if(!myValue.IsNull()) {
-    Standard_Integer i, lower, upper;
+    Standard_Integer i = 0, lower = 0, upper = 0;
     lower = myValue->Lower();
     upper = myValue->Upper();
     for(i = lower; i<=upper; i++)
index 2d94dd66c7d587dc88b54764848eccba56b76556..138a20bda278729ddce85e82eab295f90fcbbb65 100644 (file)
@@ -179,7 +179,7 @@ void TDataStd_ReferenceArray::SetInternalArray (const Handle(TDataStd_HLabelArra
   Standard_Integer aLower    = values->Lower();
   Standard_Integer anUpper   = values->Upper();
   Standard_Boolean aDimEqual = Standard_False;
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
 #ifdef OCC2932
   if (Lower() == aLower && Upper() == anUpper ) {
index 9c066f792bd08f3a317d065a4701a3e7f68ac0f8..b1120d3cca54708baaf18942b67dfd4f6a817c34 100644 (file)
@@ -443,7 +443,7 @@ void TDataXtd_Constraint::References(const Handle(TDF_DataSet)& DS) const
 { 
 //bidouille en attendant traitement des contraintes d assemblage en dehors de la part 
 // l attribut placement devrait oriente vers les contraintes de placement en dehors
-  Standard_Integer Lim;
+  Standard_Integer Lim = 0;
   if (myType >= TDataXtd_MATE && myType<=TDataXtd_FACES_ANGLE)  Lim =1;
   else Lim =3;
 
index d9b258a5b043ba503732450f053f778bd9e0d4fc..2858e4596d79250af9791e218c691139e2d6170f 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <Geom_CartesianPoint.hxx>
 #include <Geom_Circle.hxx>
@@ -157,7 +159,7 @@ Standard_Boolean TDataXtd_Geometry::Line(const Handle(TNaming_NamedShape)& NS,gp
   if (shape.IsNull()) return Standard_False;
   if (shape.ShapeType() == TopAbs_EDGE) {
     const TopoDS_Edge& edge = TopoDS::Edge(shape);
-    Standard_Real first,last;
+    Standard_Real first = NAN,last = NAN;
     // TopLoc_Location loc;
     Handle(Geom_Curve) curve = BRep_Tool::Curve (edge,first,last);
     if (!curve.IsNull()) {
@@ -198,7 +200,7 @@ Standard_Boolean TDataXtd_Geometry::Circle(const Handle(TNaming_NamedShape)& NS,
   if (shape.IsNull()) return Standard_False;
   if (shape.ShapeType() == TopAbs_EDGE) {
     const TopoDS_Edge& edge = TopoDS::Edge(shape);
-    Standard_Real first,last;
+    Standard_Real first = NAN,last = NAN;
     // TopLoc_Location loc;
     Handle(Geom_Curve) curve = BRep_Tool::Curve (edge,first,last);
     if (!curve.IsNull()) {
@@ -241,7 +243,7 @@ Standard_Boolean TDataXtd_Geometry::Ellipse(const Handle(TNaming_NamedShape)& NS
   if (shape.IsNull()) return Standard_False;
   if (shape.ShapeType() == TopAbs_EDGE) {
     const TopoDS_Edge& edge = TopoDS::Edge(shape);
-    Standard_Real first,last;
+    Standard_Real first = NAN,last = NAN;
     Handle(Geom_Curve) curve = BRep_Tool::Curve (edge,first,last);
     if (!curve.IsNull()) {
       if (curve->IsInstance (STANDARD_TYPE (Geom_TrimmedCurve)))
@@ -372,7 +374,7 @@ TDataXtd_GeometryEnum  TDataXtd_Geometry::Type (const Handle(TNaming_NamedShape)
   case TopAbs_EDGE : 
     {    
       const TopoDS_Edge& edge = TopoDS::Edge(shape);    
-      Standard_Real first,last;
+      Standard_Real first = NAN,last = NAN;
       // TopLoc_Location loc;
       Handle(Geom_Curve) curve = BRep_Tool::Curve (edge,first,last);
       if (!curve.IsNull()) {
index 7157746eb80a2118af39b5c3d5cef45433c4ce69..751ea1f8264fd8162229b88f72f9611202cf2b99 100644 (file)
@@ -119,7 +119,7 @@ void TDocStd_Application::ReadingFormats(TColStd_SequenceOfAsciiString &theForma
   NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_RetrievalDriver)>::Iterator
     anIter(myReaders);
   for (; anIter.More(); anIter.Next()) {
-    Handle(PCDM_RetrievalDriver) aDriver = anIter.Value();
+    const Handle(PCDM_RetrievalDriver)& aDriver = anIter.Value();
     if (aDriver.IsNull() == Standard_False) {
       theFormats.Append(anIter.Key());
     }
@@ -138,7 +138,7 @@ void TDocStd_Application::WritingFormats(TColStd_SequenceOfAsciiString &theForma
   NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_StorageDriver)>::Iterator
     anIter(myWriters);
   for (; anIter.More(); anIter.Next()) {
-    Handle(PCDM_StorageDriver) aDriver = anIter.Value();
+    const Handle(PCDM_StorageDriver)& aDriver = anIter.Value();
     if (aDriver.IsNull() == Standard_False) {
       theFormats.Append(anIter.Key());
     }
index 96e5dbef9f2f9d7b307c0235950d2dc03ef04773..0175c717fd807cd2e61f94078c98688bb05df723 100644 (file)
@@ -37,7 +37,7 @@ void TDocStd_ApplicationDelta::Dump(Standard_OStream& anOS) const {
   myName.Print(anOS);
   anOS<<" - " << myDocuments.Length() << " documents ";
   anOS<<" ( ";
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= myDocuments.Length(); i++) {
     Handle(TDocStd_Document) aDocAddr= myDocuments.Value(i);
     anOS << "\"" << aDocAddr.get();
index 94c732866c0467d716a1d153aef9b79e0da9d50a..fb21fa7a8d86c122d79b114d22acdd8895ebe5ee 100644 (file)
@@ -668,7 +668,7 @@ void TDocStd_Document::UpdateReferences(const TCollection_AsciiString& aDocEntry
 {
 
   TDF_AttributeList aRefList;
-  TDocStd_XLink* xRefPtr;
+  TDocStd_XLink* xRefPtr = nullptr;
   for (TDocStd_XLinkIterator xItr (this); xItr.More(); xItr.Next()) {
     xRefPtr = xItr.Value();
     if (xRefPtr->DocumentEntry() == aDocEntry) {
index 4e0c752b31297882457a7ee1cb0fd52988cc62d1..097161b6fc8843d61aff99eccefbca2b99576d64 100644 (file)
@@ -293,7 +293,7 @@ private:
   Standard_Integer mySaveTime;
   Standard_Boolean myIsNestedTransactionMode;
   TDF_DeltaList myUndoFILO;
-  Standard_Boolean myOnlyTransactionModification;
+  Standard_Boolean myOnlyTransactionModification{};
   Standard_Boolean mySaveEmptyLabels;
   TDocStd_FormatVersion myStorageFormatVersion;
 
index f59f862ffd792334d7e488d668650e2c3d8c619e..50927784e3628707e3809ee4d95cdc48ac765350 100644 (file)
@@ -26,12 +26,12 @@ IMPLEMENT_STANDARD_RTTIEXT(TDocStd_MultiTransactionManager,Standard_Transient)
 //function : TDocStd_MultiTransactionManager
 //purpose  : Constructor
 //=======================================================================
-TDocStd_MultiTransactionManager::TDocStd_MultiTransactionManager ()
+TDocStd_MultiTransactionManager::TDocStd_MultiTransactionManager () : myUndoLimit(0), myOpenTransaction(Standard_False), myIsNestedTransactionMode(Standard_False), myOnlyTransactionModification(Standard_False)
 {
-  myUndoLimit = 0;
-  myOpenTransaction = Standard_False;
-  myIsNestedTransactionMode = Standard_False;
-  myOnlyTransactionModification = Standard_False;
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -51,7 +51,7 @@ void TDocStd_MultiTransactionManager::SetUndoLimit(const Standard_Integer theLim
     --n;
   }
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--)
     myDocuments.Value(i)->SetUndoLimit(myUndoLimit);
 
@@ -66,7 +66,7 @@ void TDocStd_MultiTransactionManager::Undo()
 {
   if (myUndos.IsEmpty()) return;
   const TDocStd_SequenceOfDocument& docs = myUndos.First()->GetDocuments();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = docs.Length(); i > 0; i--) {
     Handle(TDocStd_Document) doc = docs.Value(i);
     if (doc.IsNull() || doc->GetAvailableUndos() == 0) continue;
@@ -85,7 +85,7 @@ void TDocStd_MultiTransactionManager::Undo()
 void TDocStd_MultiTransactionManager::Redo() {
   if (myRedos.IsEmpty()) return;
   const TDocStd_SequenceOfDocument& docs = myRedos.First()->GetDocuments();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = docs.Length(); i > 0; i--) {
     Handle(TDocStd_Document) doc = docs.Value(i);
     if (doc.IsNull() || doc->GetAvailableRedos() == 0) continue;
@@ -112,7 +112,7 @@ void TDocStd_MultiTransactionManager::OpenCommand() {
                             "while a previous one is not committed or aborted");
   }
   myOpenTransaction = Standard_True;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--) {
     while(myDocuments.Value(i)->HasOpenCommand())
       myDocuments.Value(i)->AbortCommand();
@@ -127,7 +127,7 @@ void TDocStd_MultiTransactionManager::OpenCommand() {
 
 void TDocStd_MultiTransactionManager::AbortCommand() {
   myOpenTransaction = Standard_False;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--) {
     while(myDocuments.Value(i)->HasOpenCommand())
       myDocuments.Value(i)->AbortCommand();
@@ -143,7 +143,7 @@ Standard_Boolean TDocStd_MultiTransactionManager::CommitCommand()
 {
   Handle(TDocStd_ApplicationDelta) aDelta = new TDocStd_ApplicationDelta;
   Standard_Boolean isCommited = Standard_False;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--) {
     isCommited = Standard_False;
     while(myDocuments.Value(i)->HasOpenCommand())
@@ -187,7 +187,7 @@ Standard_Boolean TDocStd_MultiTransactionManager::CommitCommand
 
 void TDocStd_MultiTransactionManager::DumpTransaction(Standard_OStream& anOS) const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   if(myDocuments.Length() == 0)
     anOS << "Manager is empty" << std::endl;
   else {
@@ -237,7 +237,7 @@ void TDocStd_MultiTransactionManager::RemoveLastUndo()
 {
   if(myUndos.Length() == 0) return;
   const TDocStd_SequenceOfDocument& docs = myUndos.Last()->GetDocuments();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= docs.Length(); i++) {
     docs.Value(i)->RemoveFirstUndo();
   }
@@ -252,7 +252,7 @@ void TDocStd_MultiTransactionManager::RemoveLastUndo()
 void TDocStd_MultiTransactionManager::AddDocument
   (const Handle(TDocStd_Document)& theDoc)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--)
     if(myDocuments.Value(i) == theDoc)
       return; // the document is already added to the list
@@ -285,7 +285,7 @@ void TDocStd_MultiTransactionManager::AddDocument
 void TDocStd_MultiTransactionManager::RemoveDocument
   (const Handle(TDocStd_Document)& theDoc)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--) {
     if(myDocuments.Value(i) == theDoc)
       myDocuments.Remove(i);
@@ -323,7 +323,7 @@ void TDocStd_MultiTransactionManager::SetNestedTransactionMode
   (const Standard_Boolean isAllowed)
 {
   myIsNestedTransactionMode = isAllowed;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--) {
     if(myDocuments.Value(i)->IsNestedTransactionMode() != myIsNestedTransactionMode)
       myDocuments.Value(i)->SetNestedTransactionMode(myIsNestedTransactionMode);
@@ -340,7 +340,7 @@ void TDocStd_MultiTransactionManager::SetModificationMode
 {
   myOnlyTransactionModification = theTransactionOnly;
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--) {
     myDocuments.Value(i)->SetModificationMode(myOnlyTransactionModification);
   }
@@ -356,7 +356,7 @@ void TDocStd_MultiTransactionManager::ClearUndos()
   AbortCommand();
 
   myUndos.Clear();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--) {
     myDocuments.Value(i)->ClearUndos();
   }
@@ -372,7 +372,7 @@ void TDocStd_MultiTransactionManager::ClearRedos()
   AbortCommand();
 
   myRedos.Clear();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for(i = myDocuments.Length(); i > 0; i--) {
     myDocuments.Value(i)->ClearRedos();
   }
index 5e3b62346ed4f1f2d08b43f49f439d55bbff16d1..f4c9e75bda26b23d9d570b26e0ee3e893db4fa0e 100644 (file)
@@ -87,7 +87,7 @@ protected:
 private:
 
   //! It keeps pointer to the document to avoid handles cyclic dependency
-  TDocStd_Document* myDocument;
+  TDocStd_Document* myDocument{};
 
 
 };
index 5f9fd775c2eced6bc026ce037d94d331a2437a31..adabc5862f6b1e9e4625bec536670fb9e60357ba 100644 (file)
@@ -18,9 +18,9 @@
 
 #include <TCollection_ExtendedString.hxx>
 
-TDocStd_PathParser::TDocStd_PathParser(const TCollection_ExtendedString& path)
+TDocStd_PathParser::TDocStd_PathParser(const TCollection_ExtendedString& path) : myPath(path)
 {
-       myPath = path;
+       
        Parse();
 }
 
index cb51806e608c5d4ecc9d9a5c734d3a389c6105cf..2c72e27b13787689c8b95bd04bfe8505a2df44cc 100644 (file)
@@ -34,9 +34,9 @@
 //function : TDocStd_XLinkTool
 //purpose  : 
 //=======================================================================
-TDocStd_XLinkTool::TDocStd_XLinkTool () {
-  isDone = Standard_False;
-  myRT = new TDF_RelocationTable();
+TDocStd_XLinkTool::TDocStd_XLinkTool () : isDone(Standard_False), myRT(new TDF_RelocationTable()) {
+  
+  
 }
 
 //=======================================================================
index 9051d0d615f761636c496590ef948e69b61d117c..4759f55da644b3314a61317b608ee484b9545aa2 100644 (file)
@@ -14,6 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <TNaming.hxx>
 
 #include <BRep_Builder.hxx>
@@ -108,7 +110,7 @@ static void SubstituteShape(const TopoDS_Shape& oldShape,
   if (!amap.IsBound(oldShape)) {
       return;
   }
-  TNaming_RefShape* pos;
+  TNaming_RefShape* pos = nullptr;
   pos = amap.ChangeFind(oldShape);
   pos->Shape(newShape);
   amap.UnBind(oldShape);
@@ -170,7 +172,7 @@ Standard_Boolean TNaming::SubstituteSShape(const TDF_Label& Lab, const TopoDS_Sh
   TNaming_DataMapOfShapePtrRefShape& amap = US->Map();
   if (!amap.IsBound(To)) 
     return Standard_False;
-  TNaming_RefShape* pos;
+  TNaming_RefShape* pos = nullptr;
   pos = amap.ChangeFind(To);
   if(!amap.UnBind(To)) return Standard_False;
   //update shape
@@ -207,7 +209,7 @@ static Standard_Boolean  Rebuild (const TopoDS_Shape& S,
   TopoDS_Shape NewS = S.Oriented(TopAbs_FORWARD);
   NewS.EmptyCopy();
   if (NewS.ShapeType() == TopAbs_EDGE) {
-    Standard_Real f,l;
+    Standard_Real f = NAN,l = NAN;
     BRep_Tool::Range(TopoDS::Edge(S),f,l);
     B.Range(TopoDS::Edge(NewS),f,l);
   }
@@ -547,7 +549,7 @@ static TopoDS_Shape  ShapeCopy(const TopoDS_Shape& S,
   TopoDS_Shape NewS = S.Oriented(TopAbs_FORWARD);
   NewS.EmptyCopy();
   if (NewS.ShapeType() == TopAbs_EDGE) {
-    Standard_Real f,l;
+    Standard_Real f = NAN,l = NAN;
     BRep_Tool::Range(TopoDS::Edge(S),f,l);
     B.Range(TopoDS::Edge(NewS),f,l);
   }
index f5a10d98332ee8c88aabfe0b9fb70da0b0bc415c..7451ad15f6d10cf11c6bcf26806c05253cb6c184 100644 (file)
@@ -28,9 +28,9 @@ IMPLEMENT_STANDARD_RTTIEXT(TNaming_DeltaOnRemoval,TDF_DeltaOnRemoval)
 //purpose  : 
 //=======================================================================
 TNaming_DeltaOnRemoval::TNaming_DeltaOnRemoval(const Handle(TNaming_NamedShape)& NS)
-:TDF_DeltaOnRemoval(NS)
+:TDF_DeltaOnRemoval(NS), myDelta(new TNaming_DeltaOnModification(NS))
 {
-  myDelta = new TNaming_DeltaOnModification(NS);
+  
 }
 
 //=======================================================================
index e322d2fa7b39e18f68b86e05c7d85e5ce09bcadb..82d4a7f36e9a46c6db496252f6c27f992e4a1975 100644 (file)
@@ -81,7 +81,7 @@ private:
 
 
 
-  Standard_Integer myCurTrans;
+  Standard_Integer myCurTrans{};
   Handle(TNaming_UsedShapes) myUS;
   TopTools_ListOfShape myShapeWithSubShapes;
   TNaming_ListOfMapOfShape mySubShapes;
index 7238eda6a28089f703300a21b629bed13c00c4d3..9a7af7472664e04ef7f6717a97af7e04fa304f97 100644 (file)
@@ -376,7 +376,7 @@ static TopoDS_Shape MakeShape (const TopTools_IndexedMapOfShape& MS)
 //purpose  : Tries to make shape with given type from the given shape
 //=======================================================================
 
-static TopoDS_Shape ShapeWithType(const TopoDS_Shape     theShape,
+static TopoDS_Shape ShapeWithType(const TopoDS_Shape&     theShape,
                                  const TopAbs_ShapeEnum theType ) {
   if (theShape.IsNull() || theType == TopAbs_SHAPE) return theShape;
   Standard_Integer aType = theShape.ShapeType();
@@ -397,7 +397,7 @@ static TopoDS_Shape ShapeWithType(const TopoDS_Shape     theShape,
   TopTools_ListIteratorOfListOfShape aListIter(aShapes);
 
   if (aType < theType) {
-    Standard_Integer aCount;
+    Standard_Integer aCount = 0;
     for(aCount=0;aListIter.More();aListIter.Next()) {
       TopExp_Explorer anExp(aListIter.Value(),theType);
       if (anExp.More()) {
@@ -1351,7 +1351,7 @@ static Standard_Boolean  FilterByNeighbourgs (const TDF_Label&                L,
   //----------------------------------------
   // First argument: collection has to be filtered.
   //----------------------------------------
-  Handle(TNaming_NamedShape) Cand  = Args.First(); //collection of candidates
+  const Handle(TNaming_NamedShape)& Cand  = Args.First(); //collection of candidates
    
 #ifdef OCCT_DEBUG_FNB
   Standard_Integer i = 1;
index 5c298e53566fbcb55eaa50b9bd564284a1657269..9352d9e2da4d5aa7377152be08cdc372fd1607dd 100644 (file)
@@ -157,11 +157,11 @@ void TNaming_Node::DumpJson (Standard_OStream& theOStream, Standard_Integer theD
 //purpose  : 
 //=======================================================================
 
-TNaming_NamedShape::TNaming_NamedShape()
+TNaming_NamedShape::TNaming_NamedShape() : myNode(0L), myVersion(0), myEvolution(TNaming_PRIMITIVE)
 { 
-  myNode    = 0L;
-  myVersion = 0;
-  myEvolution = TNaming_PRIMITIVE;
+  
+  
+  
 }
 
 //=======================================================================
@@ -295,7 +295,7 @@ void TNaming_NamedShape::Clear()
   }
     
   p = myNode;
-  TNaming_Node* q;
+  TNaming_Node* q = nullptr;
   while (p != 0L) {
     q = p;
     p = p->nextSameAttribute;
@@ -363,7 +363,7 @@ Standard_Boolean TNaming_NamedShape::AfterUndo
     }
     
     p = myNode;
-    TNaming_Node* q;
+    TNaming_Node* q = nullptr;
     while (p != 0L) {
       q = p;
       p = p->nextSameAttribute;
@@ -418,7 +418,7 @@ void TNaming_NamedShape::Restore(const Handle(TDF_Attribute)& anAttribute)
 {
   Clear();
 
-  TNaming_NamedShape* PAtt  = (TNaming_NamedShape*)anAttribute.operator->();
+  TNaming_NamedShape* PAtt  = dynamic_cast<TNaming_NamedShape*>(anAttribute.operator->());
   myNode                   = PAtt->myNode;
   myEvolution              = PAtt->myEvolution;
   myVersion                = PAtt->myVersion;
@@ -678,7 +678,7 @@ void TNaming_Builder::Generated(const TopoDS_Shape& newShape)
   }
 
   TNaming_RefShape* pos = 0L;
-  TNaming_RefShape* pns;
+  TNaming_RefShape* pns = nullptr;
   
   if (myShapes->myMap.IsBound(newShape)) {
 #ifdef OCCT_DEBUG_BUILDER
@@ -716,8 +716,8 @@ void TNaming_Builder::Delete(const TopoDS_Shape& oldShape)
       throw Standard_ConstructionError("TNaming_Builder : not same evolution");
   }
 
-  TNaming_RefShape* pns;
-  TNaming_RefShape* pos;
+  TNaming_RefShape* pns = nullptr;
+  TNaming_RefShape* pos = nullptr;
 
   if (myShapes->myMap.IsBound(oldShape)) 
     pos = myShapes->myMap.ChangeFind(oldShape); 
@@ -759,7 +759,7 @@ void TNaming_Builder::Generated(const TopoDS_Shape& oldShape,
 #endif
     return;
   }
-  TNaming_RefShape* pos;
+  TNaming_RefShape* pos = nullptr;
   if (!myShapes->myMap.IsBound(oldShape)) {
     pos = new TNaming_RefShape(oldShape);
     myShapes->myMap.Bind(oldShape,pos);
@@ -767,7 +767,7 @@ void TNaming_Builder::Generated(const TopoDS_Shape& oldShape,
   else
     pos = myShapes->myMap.ChangeFind(oldShape);
   
-  TNaming_RefShape* pns;
+  TNaming_RefShape* pns = nullptr;
   if (!myShapes->myMap.IsBound(newShape)) {
     pns = new TNaming_RefShape(newShape);
     myShapes->myMap.Bind(newShape,pns);
@@ -802,7 +802,7 @@ void TNaming_Builder::Modify(const TopoDS_Shape& oldShape,
 #endif
     return;
   }
-  TNaming_RefShape* pos;
+  TNaming_RefShape* pos = nullptr;
   if (!myShapes->myMap.IsBound(oldShape)) {
     pos = new TNaming_RefShape(oldShape);
     myShapes->myMap.Bind(oldShape,pos);
@@ -810,7 +810,7 @@ void TNaming_Builder::Modify(const TopoDS_Shape& oldShape,
   else
     pos = myShapes->myMap.ChangeFind(oldShape);
   
-  TNaming_RefShape* pns;
+  TNaming_RefShape* pns = nullptr;
   if (!myShapes->myMap.IsBound(newShape)) {
     pns = new TNaming_RefShape(newShape);
     myShapes->myMap.Bind(newShape,pns);
@@ -838,7 +838,7 @@ void TNaming_Builder::Select (const TopoDS_Shape& S,
       throw Standard_ConstructionError("TNaming_Builder : not same evolution");
   }
 
-  TNaming_RefShape* pos;  
+  TNaming_RefShape* pos = nullptr;  
   if (!myShapes->myMap.IsBound(InS)) {
     pos = new TNaming_RefShape(InS);
     myShapes->myMap.Bind(InS,pos);
@@ -846,7 +846,7 @@ void TNaming_Builder::Select (const TopoDS_Shape& S,
   else
     pos = myShapes->myMap.ChangeFind(InS);
 
-  TNaming_RefShape* pns;
+  TNaming_RefShape* pns = nullptr;
   if (!myShapes->myMap.IsBound(S)) {
     pns = new TNaming_RefShape(S);
     myShapes->myMap.Bind(S,pns);
@@ -870,9 +870,9 @@ void TNaming_Builder::Select (const TopoDS_Shape& S,
 //=======================================================================
 
 TNaming_Iterator::TNaming_Iterator(const Handle(TNaming_NamedShape)& Att)
-:myTrans(-1)
+:myNode(Att->myNode), myTrans(-1)
 {
-  myNode  = Att->myNode; 
+  
 }
 
 //=======================================================================
@@ -1005,7 +1005,7 @@ static void SelectSameShape (TNaming_Node*&          myNode,
   TNaming_Node* pdn = myNode;
   
   while (pdn != 0L) {
-    Standard_Boolean Valid;
+    Standard_Boolean Valid = 0;
     if (Trans < 0) Valid = pdn->myAtt->IsValid(); 
     else Valid = pdn->IsValidInTrans(Trans);
 
@@ -1074,11 +1074,11 @@ TNaming_NewShapeIterator::TNaming_NewShapeIterator
 //=======================================================================
 
 TNaming_NewShapeIterator::TNaming_NewShapeIterator (const TNaming_Iterator& anIterator)
-:myTrans(anIterator.myTrans)
+:myNode(anIterator.myNode), myTrans(anIterator.myTrans)
 {
   Standard_NoSuchObject_Raise_if(anIterator.myNode == 0L,
                                  "TNaming_NewShapeIterator::TNaming_NewShapeIterator");
-  myNode = anIterator.myNode;  
+   
   TNaming_RefShape* RS = myNode->myNew;
   if (RS == 0L) 
     myNode = 0L;  // No descendant
@@ -1135,11 +1135,11 @@ TNaming_NewShapeIterator::TNaming_NewShapeIterator
 //=======================================================================
 
 TNaming_NewShapeIterator::TNaming_NewShapeIterator(const TNaming_NewShapeIterator& anIterator)
-:myTrans(anIterator.myTrans)
+:myNode(anIterator.myNode), myTrans(anIterator.myTrans)
 {
   Standard_NoSuchObject_Raise_if(anIterator.myNode == 0L,
                                  "TNaming_NewShapeIterator::TNaming_NewShapeIterator");
-  myNode = anIterator.myNode;
+  
   TNaming_RefShape* RS = myNode->myNew;
   if (RS == 0L) 
     myNode = 0L;  // No descendant
@@ -1302,11 +1302,11 @@ TNaming_OldShapeIterator::TNaming_OldShapeIterator
 //=======================================================================
 
 TNaming_OldShapeIterator::TNaming_OldShapeIterator (const TNaming_Iterator& anIterator)
-:myTrans(anIterator.myTrans)
+:myNode(anIterator.myNode), myTrans(anIterator.myTrans)
 {
   Standard_NoSuchObject_Raise_if(anIterator.myNode == 0L,
                                                 "TNaming_OldShapeIterator::TNaming_OldShapeIterator");
-  myNode = anIterator.myNode; 
+  
   TNaming_RefShape* RS = myNode->myNew;
   if (RS == 0L) 
     myNode = 0L;  // No descendant
@@ -1324,11 +1324,11 @@ TNaming_OldShapeIterator::TNaming_OldShapeIterator (const TNaming_Iterator& anIt
 //=======================================================================
 
 TNaming_OldShapeIterator::TNaming_OldShapeIterator(const TNaming_OldShapeIterator& anIterator)
-:myTrans(anIterator.myTrans)
+:myNode(anIterator.myNode), myTrans(anIterator.myTrans)
 {
   Standard_NoSuchObject_Raise_if(anIterator.myNode == 0L,
                                                 "TNaming_OldShapeIterator::TNaming_OldShapeIterator");
-  myNode = anIterator.myNode;  
+   
   TNaming_RefShape* RS = myNode->myOld;
   if (RS == 0L) 
     myNode = 0L;  // No descendant
@@ -1443,7 +1443,7 @@ TNaming_SameShapeIterator::TNaming_SameShapeIterator
 
 void TNaming_SameShapeIterator::Next() 
 {
-  TNaming_RefShape* prs;
+  TNaming_RefShape* prs = nullptr;
   if (myIsNew) prs = myNode->myNew; else prs = myNode->myOld;
   
   myNode = myNode->NextSameShape(prs);
@@ -1638,7 +1638,7 @@ Standard_Integer TNaming_Tool::ValidUntil (const TopoDS_Shape&               S,
   Standard_NoSuchObject_Raise_if(!TNaming_Tool::HasLabel(US,S),"TNaming_Tool::ValidUntil"); 
   
   TNaming_RefShape* RS  = US->Map().ChangeFind(S);
-  Standard_Integer  Cur;
+  Standard_Integer  Cur = 0;
   Standard_Integer  Until  = 0;  
   TNaming_Node*     Node   = RS->FirstUse();
 
index 95b0bd217a80de2e9db249f0d022e149b16e5eac..c60c70b95b31159f1ba0af8c51c9ffe2afc49df9 100644 (file)
@@ -34,10 +34,10 @@ TNaming_Scope::TNaming_Scope () : myWithValid(Standard_False)
 //purpose  : 
 //=======================================================================
 
-TNaming_Scope::TNaming_Scope (TDF_LabelMap& map)
+TNaming_Scope::TNaming_Scope (TDF_LabelMap& map) : myWithValid(Standard_True), myValid(map)
 { 
-  myWithValid = Standard_True;
-  myValid = map;
+  
+  
 }
 
 //=======================================================================
index bba7a914da4f5743c0f2c59050fa62dee2a33530..1f2ac26464d415802e0324d3cb9c9f191e80862a 100644 (file)
@@ -295,9 +295,9 @@ Standard_Boolean TNaming_Selector::IsIdentified (const TDF_Label& L,
 //purpose  : 
 //=======================================================================
 
-TNaming_Selector::TNaming_Selector (const TDF_Label& L) 
+TNaming_Selector::TNaming_Selector (const TDF_Label& L) : myLabel(L) 
 {
-  myLabel = L;
+  
 }
 
 //=======================================================================
index 4763f9753e24ea03c06d90c00434de48c8bc08e4..6a52d667607e230c516466c4b328d38f12878bca 100644 (file)
@@ -411,7 +411,7 @@ void TNaming_Tool::FirstOlds (const Handle(TNaming_UsedShapes)& US,
                              TopTools_IndexedMapOfShape& MS,
                              TDF_LabelList&          Labels) 
 {  
-  Standard_Integer TransDef;
+  Standard_Integer TransDef = 0;
   Standard_Boolean YaModif = 0;
 
   for (; it.More(); it.Next()) {
@@ -445,7 +445,7 @@ TopoDS_Shape TNaming_Tool::InitialShape(const TopoDS_Shape&  S,
 
   if (!TNaming_Tool::HasLabel(US,S)) return Res;
 
-  Standard_Integer Transdef;
+  Standard_Integer Transdef = 0;
   Label(US,S,Transdef); 
   TopTools_IndexedMapOfShape MS;
   TNaming_OldShapeIterator it(S,Transdef,US);
index b4a2b4d96b22b8fc38f5c0db837dfc6c096a43ab..8d6a260ede521e23a4065f3a31a215034e61d351 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Curve3D.hxx>
 #include <BRep_CurveOn2Surfaces.hxx>
@@ -251,7 +253,7 @@ void TNaming_TranslateTool::UpdateEdge
   lcr.Clear();
 
   Handle(BRep_GCurve) GC;
-  Standard_Real f, l;
+  Standard_Real f = NAN, l = NAN;
   while (itcr.More()) {
 
     const Handle(BRep_CurveRepresentation)& CR = itcr.Value();
index 9445d0da434332bd1309896fc740c9e7dd270bb7..1d0a1fc36381e824c67592d6a8b140f2ee64b969 100644 (file)
@@ -82,6 +82,7 @@
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <UnitsAPI.hxx>
 
+#include <math.h>
 #include <stdio.h>
 static Standard_Boolean CheckShapesPair(const TopoDS_Shape& , const TopoDS_Shape& ); //ota
 
@@ -176,7 +177,7 @@ void TPrsStd_ConstraintTools::ComputeTextAndValue(const Handle(TDataXtd_Constrai
                                                 TCollection_ExtendedString&   txt,
                                                 const Standard_Boolean  anIsAngle  )
 {
-  Standard_Real outvalue;
+  Standard_Real outvalue = NAN;
   const Handle(TDataStd_Real)& VAL = aConst->GetValue();
   val      = VAL->Get();
   if(anIsAngle){
@@ -217,7 +218,7 @@ void TPrsStd_ConstraintTools::UpdateOnlyValue(const Handle(TDataXtd_Constraint)&
 {
   if (anAIS.IsNull()) return; 
   if (!aConst->IsDimension()) return; 
-  Standard_Real val;
+  Standard_Real val = NAN;
   TCollection_ExtendedString txt;
   TPrsStd_ConstraintTools:: ComputeTextAndValue(aConst,val,txt,aConst->GetType() == TDataXtd_ANGLE);
   Handle(PrsDim_Relation) rel = Handle(PrsDim_Relation)::DownCast(anAIS);
@@ -293,7 +294,7 @@ void TPrsStd_ConstraintTools::ComputeDistance (const Handle(TDataXtd_Constraint)
   }
 
   // Get custom value
-  Standard_Real aValue;
+  Standard_Real aValue = NAN;
   TCollection_ExtendedString aText;
   ComputeTextAndValue (theConst, aValue, aText,Standard_False);
 
@@ -803,7 +804,7 @@ void TPrsStd_ConstraintTools::ComputeAngleForOneFace (const Handle(TDataXtd_Cons
     return;
   }
 
-  Standard_Real val1;
+  Standard_Real val1 = NAN;
   TCollection_ExtendedString txt;
   TPrsStd_ConstraintTools::ComputeTextAndValue (aConst,val1,txt,Standard_True);  
   
@@ -1020,7 +1021,7 @@ void TPrsStd_ConstraintTools::ComputeAngle (const Handle(TDataXtd_Constraint)& a
       return;
     }
   }
-  Standard_Real val1;
+  Standard_Real val1 = NAN;
   TCollection_ExtendedString txt;
   ComputeTextAndValue (aConst,val1,txt,Standard_True);  
   
@@ -1190,7 +1191,7 @@ void TPrsStd_ConstraintTools::ComputeRadius (const Handle(TDataXtd_Constraint)&
   if (IsFace(shape1))
     shape1 = GetFace(shape1);
 
-  Standard_Real val1;
+  Standard_Real val1 = NAN;
   TCollection_ExtendedString txt;
   ComputeTextAndValue(aConst,val1,txt,Standard_False);
 
@@ -1267,7 +1268,7 @@ void TPrsStd_ConstraintTools::ComputeMinRadius (const Handle(TDataXtd_Constraint
   if (IsFace(shape1))
     shape1 = GetFace(shape1);
 
-  Standard_Real val1;
+  Standard_Real val1 = NAN;
   TCollection_ExtendedString txt;
   ComputeTextAndValue(aConst,val1,txt,Standard_False);
 
@@ -1346,7 +1347,7 @@ void TPrsStd_ConstraintTools::ComputeMaxRadius (const Handle(TDataXtd_Constraint
   if (IsFace(shape1))
     shape1 = GetFace(shape1);
 
-  Standard_Real val1;
+  Standard_Real val1 = NAN;
   TCollection_ExtendedString txt;
   ComputeTextAndValue(aConst,val1,txt,Standard_False);
 
@@ -1591,7 +1592,7 @@ void TPrsStd_ConstraintTools::ComputeEqualRadius(const Handle(TDataXtd_Constrain
     // get the circle plane 
     Handle(Geom_Plane) aPlane2 = new Geom_Plane (anAx32);
 
-    Standard_Real A, B, C ,D1, D2;
+    Standard_Real A = NAN, B = NAN, C = NAN ,D1 = NAN, D2 = NAN;
     aPlane1->Coefficients(A, B, C, D1);//Get normalized coefficients
     aPlane2->Coefficients(A, B, C, D2);//Get normalized coefficients
     const gp_Dir& aDir1 = anAx31.Direction();
@@ -1654,7 +1655,7 @@ void TPrsStd_ConstraintTools::ComputeDiameter(const Handle(TDataXtd_Constraint)&
     NullifyAIS(anAIS);
     return;
   }
-  Standard_Real val1;
+  Standard_Real val1 = NAN;
   TCollection_ExtendedString txt;
   ComputeTextAndValue(aConst,val1,txt,Standard_False);
 
@@ -1801,7 +1802,7 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
   }
 
 
-  Standard_Real val1;
+  Standard_Real val1 = NAN;
   TCollection_ExtendedString txt;
   Handle(PrsDim_LengthDimension) ais;
   //Handle(Prs3d_Drawer) aDrawer;
@@ -2157,7 +2158,7 @@ void TPrsStd_ConstraintTools::ComputeRound(const Handle(TDataXtd_Constraint)& aC
     return;
   }
   
-  Standard_Real val1;
+  Standard_Real val1 = NAN;
   TCollection_ExtendedString txt;
   ComputeTextAndValue(aConst,val1,txt,Standard_False);
   
index f1e5eac3bd50c11c1e1a1fa9926f8a440caa912c..779cf5682539a60314bef5de68813165b952433c 100644 (file)
@@ -66,8 +66,7 @@ Standard_Boolean TPrsStd_NamedShapeDriver::Update (const TDF_Label& aLabel,
   if(S.IsNull()){ 
     return Standard_False; 
   }  
-  TopLoc_Location L  = S.Location();
-
+  
   Handle(AIS_Shape) AISShape;
   if (AIS.IsNull()) AISShape = new AIS_Shape(S);
   else {
index d87dd372ed9ef80b85827d20a01113aaa85765c9..f4bbc18b9bfa577744b2f69ba6c4cfa8cc93d227 100644 (file)
@@ -36,14 +36,14 @@ static const Standard_Integer theStackSize = 20;
 //purpose  :
 //=======================================================================
 TopExp_Explorer::TopExp_Explorer()
-: myStack (0L),
+: myStack((TopoDS_Iterator*)Standard::Allocate(theStackSize*sizeof(TopoDS_Iterator))),
   myTop (-1),
   mySizeOfStack (theStackSize),
   toFind  (TopAbs_SHAPE),
   toAvoid (TopAbs_SHAPE),
   hasMore (Standard_False)
 {
-  myStack = (TopoDS_Iterator*)Standard::Allocate(theStackSize*sizeof(TopoDS_Iterator));
+  
 }
 
 //=======================================================================
@@ -53,15 +53,13 @@ TopExp_Explorer::TopExp_Explorer()
 TopExp_Explorer::TopExp_Explorer (const TopoDS_Shape& theS,
                                   const TopAbs_ShapeEnum theToFind,
                                   const TopAbs_ShapeEnum theToAvoid)
-: myStack (0L),
+: myStack((TopoDS_Iterator*)Standard::Allocate(theStackSize*sizeof(TopoDS_Iterator))),
   myTop (-1),
   mySizeOfStack (theStackSize),
   toFind  (theToFind),
   toAvoid (theToAvoid),
   hasMore (Standard_False)
 {
-  myStack = (TopoDS_Iterator*)Standard::Allocate(theStackSize*sizeof(TopoDS_Iterator));
-
   Init (theS, theToFind, theToAvoid);
 }
 
@@ -137,7 +135,7 @@ const TopoDS_Shape&  TopExp_Explorer::Current()const
 //=======================================================================
 void TopExp_Explorer::Next()
 {
-  Standard_Integer NewSize;
+  Standard_Integer NewSize = 0;
   TopoDS_Shape ShapTop;
   TopAbs_ShapeEnum ty;
   Standard_NoMoreObject_Raise_if(!hasMore,"TopExp_Explorer::Next");
@@ -161,7 +159,7 @@ void TopExp_Explorer::Next()
       if(++myTop >= mySizeOfStack) {
        NewSize = mySizeOfStack + theStackSize;
        TopExp_Stack newStack = (TopoDS_Iterator*)Standard::Allocate(NewSize*sizeof(TopoDS_Iterator));
-       Standard_Integer i;
+       Standard_Integer i = 0;
        for ( i =0; i < myTop; i++) {
          new (&newStack[i]) TopoDS_Iterator(myStack[i]);
          myStack[i].~TopoDS_Iterator();
@@ -187,7 +185,7 @@ void TopExp_Explorer::Next()
        if(++myTop >= mySizeOfStack) {
          NewSize = mySizeOfStack + theStackSize;
          TopExp_Stack newStack = (TopoDS_Iterator*)Standard::Allocate(NewSize*sizeof(TopoDS_Iterator));
-         Standard_Integer i;
+         Standard_Integer i = 0;
          for (i =0; i < myTop; i++) {
            new (&newStack[i]) TopoDS_Iterator(myStack[i]);
            myStack[i].~TopoDS_Iterator();
index 4c1e1fc0ef134263df7e57525ed3acd33958463e..18852add0de7ca1caee0d6ff2a4c326d2ce26df4 100644 (file)
@@ -59,7 +59,7 @@ void TopLoc_Datum3D::DumpJson (Standard_OStream& theOStream, Standard_Integer th
 void  TopLoc_Datum3D::ShallowDump(Standard_OStream& S) const 
 {
   S << " TopLoc_Datum3D " << (void*)this << std::endl;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   gp_Trsf T = myTrsf;
   for (i = 1; i<=3; i++) {
     S<<"  ( "<<std::setw(10)<<T.Value(i,1);
index ff70e5db945835b9cd100d5124c489013eeccd96..512b0bfe2be2e7dca81b046a890c13ec9f86f4aa 100644 (file)
@@ -127,7 +127,7 @@ static void WriteTrsf(const gp_Trsf& T,
 
 void  TopTools_LocationSet::Dump(Standard_OStream& OS) const 
 {
-  Standard_Integer i, nbLoc = myMap.Extent();
+  Standard_Integer i = 0, nbLoc = myMap.Extent();
 
   OS << "\n\n";
   OS << "\n -------";
@@ -172,7 +172,7 @@ void  TopTools_LocationSet::Write(Standard_OStream& OS, const Message_ProgressRa
   
   std::streamsize prec = OS.precision(15);
 
-  Standard_Integer i, nbLoc = myMap.Extent();
+  Standard_Integer i = 0, nbLoc = myMap.Extent();
   OS << "Locations " << nbLoc << "\n";
   
   //OCC19559
@@ -246,7 +246,7 @@ void  TopTools_LocationSet::Read(Standard_IStream& IS, const Message_ProgressRan
   myMap.Clear();
 
   char buffer[255];
-  Standard_Integer l1,p;
+  Standard_Integer l1 = 0,p = 0;
 
   IS >> buffer;
   if (strcmp(buffer,"Locations")) {
@@ -254,7 +254,7 @@ void  TopTools_LocationSet::Read(Standard_IStream& IS, const Message_ProgressRan
     return;
   }
 
-  Standard_Integer i, nbLoc;
+  Standard_Integer i = 0, nbLoc = 0;
   IS >> nbLoc;
   
   TopLoc_Location L;
@@ -263,7 +263,7 @@ void  TopTools_LocationSet::Read(Standard_IStream& IS, const Message_ProgressRan
   //OCC19559
   Message_ProgressScope PS(theProgress, "Locations", nbLoc);
   for (i = 1; i <= nbLoc&& PS.More(); i++, PS.Next()) {
-    Standard_Integer typLoc;
+    Standard_Integer typLoc = 0;
     IS >> typLoc;
     
     if (typLoc == 1) {
index ba63755e9e64fe84a8e6ae2a924b37fe6e079721..fc50d535cc366d9b6a31e355284a655a3b4f1b05 100644 (file)
@@ -385,7 +385,7 @@ void  TopTools_ShapeSet::Dump(Standard_OStream& OS)const
   // dump the shapes
   //-----------------------------------------
 
-  Standard_Integer i, nbShapes = myShapes.Extent();
+  Standard_Integer i = 0, nbShapes = myShapes.Extent();
   
   OS << "\nDump of " << nbShapes << " TShapes";
   OS << "\n\n-----------------\n\n";
@@ -494,7 +494,7 @@ void  TopTools_ShapeSet::Write(Standard_OStream& OS, const Message_ProgressRange
   // write the shapes
   //-----------------------------------------
 
-  Standard_Integer i, nbShapes = myShapes.Extent();
+  Standard_Integer i = 0, nbShapes = myShapes.Extent();
   
   OS << "\nTShapes " << nbShapes << "\n";
 
@@ -675,7 +675,7 @@ void  TopTools_ShapeSet::Read(Standard_IStream& IS, const Message_ProgressRange&
     return;
   }
 
-  Standard_Integer i, nbShapes;
+  Standard_Integer i = 0, nbShapes = 0;
   IS >> nbShapes;
 
   //OCC19559
@@ -810,7 +810,7 @@ void  TopTools_ShapeSet::Read(TopoDS_Shape& S,
       break;
     }
 
-    Standard_Integer l;
+    Standard_Integer l = 0;
     IS >> l;
     S.Location(myLocations.Location(l), Standard_False);
   }
index 4ead87760c6268b232e806db8a4317daad870896..924e5b5748f6699b954cdea728cb155f22a105f4 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <TopAbs.hxx>
 #include <TopTrans_CurveTransition.hxx>
 
@@ -304,7 +306,7 @@ Standard_Boolean TopTrans_CurveTransition::IsBefore
       // The reference is curv 
       // The first is the interference which have the nearest curvature
       // in the direction
-      Standard_Real deltaC1, deltaC2;
+      Standard_Real deltaC1 = NAN, deltaC2 = NAN;
       if (C1==0. || myCurv==0.) {
        deltaC1=C1-myCurv;
       }
index 530e6ffd5e5625c86ec725a38e993416af4d23e2..07d88782a629af624603ce0251ebffcd50e010e6 100644 (file)
@@ -16,6 +16,8 @@
 
 // Modified: eap Mar 25 2002 (occ102,occ227), touch case
 
+#include <math.h>
+
 #include <Precision.hxx>
 #include <TopAbs.hxx>
 #include <TopAbs_Orientation.hxx>
@@ -303,11 +305,11 @@ void TopTrans_SurfaceTransition::Compare
   Standard_Real prod = (dironF^Norm).Dot(myTgt);
   if (prod < 0.) Curv = -Curv;
 
-  Standard_Real Ang;
+  Standard_Real Ang = NAN;
   // -----
   Ang = ::FUN_Ang(myNorm,beafter,myTgt,Norm,O);
 
-  Standard_Integer i,j
+  Standard_Integer i = 0,j = 0
   // -----
   // i = 0,1,2 : cos = 0,>0,<0
   // j = 0,1,2 : sin = 0,>0,<0
@@ -369,7 +371,7 @@ void TopTrans_SurfaceTransition::Compare
     
   // i = 0,1,2 : cos = 0,>0,<0
   // j = 0,1,2 : sin = 0,>0,<0
-  Standard_Integer i,j; ::FUN_getSTA(Ang,tola,i,j);
+  Standard_Integer i = 0,j = 0; ::FUN_getSTA(Ang,tola,i,j);
 
   Standard_Integer kmax = M_INTERNAL(O) ? 2 : 1;
   for (Standard_Integer k=1; k <=kmax; k++) {
index 38a7638eb7b75d7061b7190f256779c4c64b5bc0..2c86ce973f881c412dd0f5aafc81f1e3d246120a 100644 (file)
@@ -24,9 +24,9 @@ IMPLEMENT_STANDARD_RTTIEXT(TopoDS_AlertWithShape,Message_Alert)
 //purpose  : 
 //=======================================================================
 
-TopoDS_AlertWithShape::TopoDS_AlertWithShape (const TopoDS_Shape& theShape)
+TopoDS_AlertWithShape::TopoDS_AlertWithShape (const TopoDS_Shape& theShape) : myShape(theShape)
 {
-  myShape = theShape;
+  
 }
 
 //=======================================================================
index 6500b231df85a6b87c0374af00d9245076c7db64..31f2db4ac8ef43883bd0432d2050f95a7f7fdae8 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <Geom2d_BezierCurve.hxx>
 #include <Geom2d_BSplineCurve.hxx>
@@ -49,7 +51,7 @@ TopoDSToStep_FacetedError TopoDSToStep_FacetedTool::CheckTopoDSShape
     else if (Su->IsKind(STANDARD_TYPE(Geom_BSplineSurface))) {
       Handle(Geom_BSplineSurface) aBsplS =
        Handle(Geom_BSplineSurface)::DownCast(Su);
-      Standard_Integer uDeg, vDeg, nUPol, nVPol;
+      Standard_Integer uDeg = 0, vDeg = 0, nUPol = 0, nVPol = 0;
       uDeg = aBsplS->UDegree();
       if (uDeg == 1) {
        vDeg = aBsplS->VDegree();
@@ -73,7 +75,7 @@ TopoDSToStep_FacetedError TopoDSToStep_FacetedTool::CheckTopoDSShape
     else if (Su->IsKind(STANDARD_TYPE(Geom_BezierSurface))) {
       Handle(Geom_BezierSurface) aBzS = 
        Handle(Geom_BezierSurface)::DownCast(Su);
-      Standard_Integer uDeg, vDeg, nUPol, nVPol;
+      Standard_Integer uDeg = 0, vDeg = 0, nUPol = 0, nVPol = 0;
       uDeg = aBzS->UDegree();
       if (uDeg == 1) {
        vDeg = aBzS->VDegree();
@@ -106,7 +108,7 @@ TopoDSToStep_FacetedError TopoDSToStep_FacetedTool::CheckTopoDSShape
       const TopoDS_Edge anEdge = TopoDS::Edge(EdgeExp.Current());
       EdgeExp.Next();
       
-      Standard_Real cf, cl;
+      Standard_Real cf = NAN, cl = NAN;
       Handle(Geom2d_Curve) C2d = 
        BRep_Tool::CurveOnSurface(anEdge, aFace, cf, cl);
       
index edf9f1b5f7eb1a243740f03c6592e9abeafc8300..6e36413f327ad138e9370b69f9556385e0bfdd0a 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
@@ -109,8 +111,8 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
   }
 
 #define Nbpt 21
-  Standard_Integer i;
-  Standard_Real    U, U1, U2;
+  Standard_Integer i = 0;
+  Standard_Real    U = NAN, U1 = NAN, U2 = NAN;
   gp_Pnt           P;
   
   Standard_Boolean isSeam = BRep_Tool::IsClosed(aEdge, aTool.CurrentFace());
index 00c4c5475d78d652c48992a22b44aa056b1bb4e9..dc62a38e8dac3a71e3331f6e6805022963020827 100644 (file)
@@ -21,6 +21,8 @@
 //szv#4 S4163
 // abv 30.11.99: fix %30 pdn changed to produce SurfaceOfRevolution instead of DegenerateToroidalSurface
 
+#include <math.h>
+
 #include <Bnd_Box2d.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepTools.hxx>
@@ -141,7 +143,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
     return;
   }
   
-  Standard_Integer i;
+  Standard_Integer i = 0;
   
   //BRepAdaptor_Surface SA = BRepAdaptor_Surface(ForwardFace);  
 
@@ -237,7 +239,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
       gp_Dir dir = Ax3.Direction();
       gp_Dir X = Ax3.XDirection();
       // create basis curve
-      Standard_Real UF, VF, UL, VL;
+      Standard_Real UF = NAN, VF = NAN, UL = NAN, VL = NAN;
       ShapeAlgo::AlgoContainer()->GetFaceUVBounds(aFace, UF, UL, VF, VL);
       gp_Ax2 Ax2(pos.XYZ() + X.XYZ() * TS->MajorRadius(), X ^ dir, X);
       Handle(Geom_Curve) BasisCurve = new Geom_Circle(Ax2, TS->MinorRadius());
@@ -351,7 +353,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
     
     for (;Ex.More(); Ex.Next()) {
       TopoDS_Edge E = TopoDS::Edge(Ex.Current());
-      Standard_Real cf, cl;
+      Standard_Real cf = NAN, cl = NAN;
       Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E, ForwardFace, cf, cl);
 
       //CA = BRepAdaptor_Curve(E, ForwardFace);
index 252fc3a0e435f0e0a29a235a24bb2a12a0aa2019..b39754d5b53e3ed51fd716b10c01fcacc4291a7c 100644 (file)
@@ -16,6 +16,8 @@
 
 //szv#4 S4163
 
+#include <math.h>
+
 #include <BRep_Tool.hxx>
 #include <BRepTools_WireExplorer.hxx>
 #include <Geom2d_Curve.hxx>
@@ -195,7 +197,7 @@ void TopoDSToStep_MakeStepWire::Init (const TopoDS_Wire& aWire,
     Standard_Integer nb = anExtWire2->NbEdges();
     if (nb % 2 == 0)
     {
-      Standard_Integer ie;
+      Standard_Integer ie = 0;
       // check if two adjacent edges are the same
       for (ie = 1; ie < nb; ie++)
       {
@@ -240,7 +242,7 @@ void TopoDSToStep_MakeStepWire::Init (const TopoDS_Wire& aWire,
       // ---------------------------------
       // --- Is the edge Degenerated ? ---
       // ---------------------------------
-      Standard_Real cf, cl;
+      Standard_Real cf = NAN, cl = NAN;
       Handle(Geom2d_Curve) theC2d = BRep_Tool::CurveOnSurface (anEdge, aTool.CurrentFace(), cf, cl);
       if (BRep_Tool::Degenerated (anEdge))
       {
index d44213a510af04a5b65fee8a93c15424bfaacb92..d9af58cfa5fc6668b1f6bf5f14c231cafa3e0475 100644 (file)
@@ -17,8 +17,8 @@
 
 #include <TopoDSToStep_Root.hxx>
 
-TopoDSToStep_Root::TopoDSToStep_Root ()
-{  done = Standard_False;  toler = 0.0001;  }
+TopoDSToStep_Root::TopoDSToStep_Root () : done(Standard_False), toler(0.0001)
+{    }
 
 Standard_Real& TopoDSToStep_Root::Tolerance ()
 {  return toler;  }
index 864b6bc9bf9e627ceaaec921648fb9aff93b87f2..5e1fcd44e03ef51946382d870c58932c9e59bedb 100644 (file)
@@ -25,9 +25,9 @@
 //purpose  : 
 //=======================================================================
 TopoDSToStep_Tool::TopoDSToStep_Tool()
-     : myFacetedContext(Standard_False), myLowestTol(0.),myReversedSurface (Standard_False)
+     : myFacetedContext(Standard_False), myLowestTol(0.),myReversedSurface (Standard_False), myPCurveMode(Interface_Static::IVal("write.surfacecurve.mode"))
 {
-  myPCurveMode = Interface_Static::IVal("write.surfacecurve.mode");
+  
 }
 
 //=======================================================================
index 11d0e85c2d4ef93143fbd4a9ed6dad9e6abef39a..552080d728bbf45c8eac3fed643a37505d61c784 100644 (file)
@@ -101,7 +101,7 @@ private:
 
 
   MoniTool_DataMapOfShapeTransient myDataMap;
-  Standard_Boolean myFacetedContext;
+  Standard_Boolean myFacetedContext{};
   Standard_Real myLowestTol;
   TopoDS_Shell myCurrentShell;
   TopoDS_Face myCurrentFace;
@@ -109,7 +109,7 @@ private:
   TopoDS_Edge myCurrentEdge;
   TopoDS_Vertex myCurrentVertex;
   Standard_Boolean myReversedSurface;
-  Standard_Integer myPCurveMode;
+  Standard_Integer myPCurveMode{};
 
 
 };
index 673e55459a47d81b2f4548c15726528064bf63ad..5f965499ee40704f6b4181af4cfca1c2a597ff33 100644 (file)
@@ -17,6 +17,8 @@
 // - fixed trimming of circles and ellipses (radians used instead of degrees)
 //szv#4 S4163
 
+#include <math.h>
+
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
@@ -109,8 +111,8 @@ const Handle(TColStd_HSequenceOfTransient)& TopoDSToStep_WireframeBuilder::Value
 #define Nbpt 23
 
 static Handle(StepGeom_TrimmedCurve) MakeTrimmedCurve (const Handle(StepGeom_Curve) &C,
-                                                      const Handle(StepGeom_CartesianPoint) P1, 
-                                                      const Handle(StepGeom_CartesianPoint) P2, 
+                                                      const Handle(StepGeom_CartesianPoint)& P1, 
+                                                      const Handle(StepGeom_CartesianPoint)& P2, 
                                                       Standard_Real trim1,
                                                       Standard_Real trim2,
                                                       Standard_Boolean sense)
@@ -195,7 +197,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder::
     }
   }
 
-  Standard_Real aFirst, aLast;
+  Standard_Real aFirst = NAN, aLast = NAN;
   Handle(Geom_Curve) aC = BRep_Tool::Curve(anEdge, aFirst, aLast);
 
   if (!aC.IsNull())
@@ -209,7 +211,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder::
     {
       return Standard_False;
     }
-    Handle(StepGeom_Curve) aPMSC = aGTSMC.Value();
+    const Handle(StepGeom_Curve)& aPMSC = aGTSMC.Value();
 
     // trim the curve
     Standard_Real aTrim1 = aCA.FirstParameter();
@@ -257,7 +259,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder::
     Standard_Boolean aIPlan = Standard_False;
     if (!theFace.IsNull())
     {
-      Standard_Real aCF, aCL;
+      Standard_Real aCF = NAN, aCL = NAN;
       Handle(Geom2d_Curve) aC2d = BRep_Tool::CurveOnSurface(anEdge, theFace, aCF, aCL);
       Handle(Geom_Surface) aS = BRep_Tool::Surface(theFace);
       if (aS->IsKind(STANDARD_TYPE(Geom_Plane)) && aC2d->IsKind(STANDARD_TYPE(Geom2d_Line)))
index a5019409bd1cd1e4d7fe3a4977a5932d051404c0..f765c973f8a303beebc28607abf932dfb13c2614 100644 (file)
@@ -23,7 +23,7 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(Transfer_ActorOfFinderProcess,Transfer_ActorOfProcessForFinder)
 
-Transfer_ActorOfFinderProcess::Transfer_ActorOfFinderProcess ()    {  themodetrans = 0;  }
+Transfer_ActorOfFinderProcess::Transfer_ActorOfFinderProcess () : themodetrans(0)    {   }
 
 Standard_Integer& Transfer_ActorOfFinderProcess::ModeTrans ()
 {  return themodetrans;  }
index 1ae815cd4a37e27efd0e553aa538be1e006e79cd..a4ece873773fff9cebcb83ae30c08836bd83f92d 100644 (file)
@@ -26,11 +26,11 @@ IMPLEMENT_STANDARD_RTTIEXT(Transfer_Binder,Standard_Transient)
 //function : Transfer_Binder
 //purpose  : 
 //=======================================================================
-Transfer_Binder::Transfer_Binder ()
+Transfer_Binder::Transfer_Binder () : thestatus(Transfer_StatusVoid), theexecst(Transfer_StatusInitial), thecheck(new Interface_Check)
 {  
-  thestatus = Transfer_StatusVoid; 
-  theexecst = Transfer_StatusInitial;
-  thecheck = new Interface_Check;
+  
+  
+  
 } 
 
 //=======================================================================
index e0fd85ce4ef1183ed7dbb2ff5b7ce437c010fd54..e98b4e171e07d4d1677d1159cf58a9b907cdd620 100644 (file)
@@ -22,8 +22,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Transfer_DispatchControl,Interface_CopyControl)
 
 Transfer_DispatchControl::Transfer_DispatchControl
   (const Handle(Interface_InterfaceModel)& model,
-   const Handle(Transfer_TransientProcess)& TP)
-      { themodel = model;  theTP = TP;  }
+   const Handle(Transfer_TransientProcess)& TP) : themodel(model), theTP(TP)
+      {   }
 
 
     const Handle(Transfer_TransientProcess)&
index b23b49de1b32158fe94ba223220c5821280c686a..1fba56d936f1110e0ff191d57669a23bca834565 100644 (file)
@@ -179,9 +179,9 @@ NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>& Transf
 
   NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator iter(list);
   for (; iter.More(); iter.Next()) {
-    TCollection_AsciiString name = iter.Key();
+    const TCollection_AsciiString& name = iter.Key();
     if (!name.StartsWith(fromname)) continue;
-    Handle(Standard_Transient) atr = iter.Value();
+    const Handle(Standard_Transient)& atr = iter.Value();
     Handle(Standard_Transient) newatr = atr;
 
 //    Copy ? according type
index f8b74f08f10a8db6046a54ae6d23fa336d7325f3..ce354715121e8cd63bbb0743ef9069d9fa72fac7 100644 (file)
@@ -33,7 +33,7 @@ Transfer_FinderProcess::Transfer_FinderProcess (const Standard_Integer nb)
     Standard_Integer  Transfer_FinderProcess::NextMappedWithAttribute
   (const Standard_CString name, const Standard_Integer num0) const
 {
-  Standard_Integer num, nb = NbMapped();
+  Standard_Integer num = 0, nb = NbMapped();
   for (num = num0+1; num <= nb; num ++) {
     Handle(Transfer_Finder) fnd = Mapped (num);
     if (fnd.IsNull()) continue;
@@ -64,7 +64,7 @@ void  Transfer_FinderProcess::PrintStats (const Standard_Integer mode, Standard_
     S<< "********                 Basic Statistics                  ********"<<std::endl;
 
     Standard_Integer nbr = 0, nbe = 0, nbw = 0;
-    Standard_Integer i, max = NbMapped(), nbroots = NbRoots();
+    Standard_Integer i = 0, max = NbMapped(), nbroots = NbRoots();
     S<< "****        Nb Final Results    : "<< nbroots <<std::endl;
 
     for (i = 1; i <= max; i ++) {
index 74a0bf4e88086d289341e85e403740b0ad96afec..2c03efbfba4543b1077b64d864d532f10065774a 100644 (file)
@@ -26,8 +26,8 @@
 
 IMPLEMENT_STANDARD_RTTIEXT(Transfer_ResultFromModel,Standard_Transient)
 
-Transfer_ResultFromModel::Transfer_ResultFromModel ()
-      {  themnum = 0;  themchk = Interface_CheckAny;  }
+Transfer_ResultFromModel::Transfer_ResultFromModel () : themnum(0), themchk(Interface_CheckAny)
+      {    }
 
     void  Transfer_ResultFromModel::SetModel
   (const Handle(Interface_InterfaceModel)& model)
@@ -122,7 +122,7 @@ Transfer_ResultFromModel::Transfer_ResultFromModel ()
     Handle(TColStd_HSequenceOfTransient)  Transfer_ResultFromModel::Results
   (const Standard_Integer level) const
 {
-  Standard_Integer i,nb;
+  Standard_Integer i = 0,nb = 0;
   Handle(TColStd_HSequenceOfTransient) list = new TColStd_HSequenceOfTransient();
   if (level > 1) {
     TColStd_IndexedMapOfTransient map (themodel.IsNull() ? 1000 : themodel->NbEntities());
@@ -144,7 +144,7 @@ Transfer_ResultFromModel::Transfer_ResultFromModel ()
     Handle(TColStd_HSequenceOfTransient)  Transfer_ResultFromModel::TransferredList
   (const Standard_Integer level) const
 {
-  Standard_Integer i,nb;
+  Standard_Integer i = 0,nb = 0;
   Handle(TColStd_HSequenceOfTransient) list = new TColStd_HSequenceOfTransient();
   Handle(TColStd_HSequenceOfTransient) res  = Results(level);
   nb = res->Length();
@@ -159,7 +159,7 @@ Transfer_ResultFromModel::Transfer_ResultFromModel ()
     Handle(TColStd_HSequenceOfTransient)  Transfer_ResultFromModel::CheckedList
   (const Interface_CheckStatus check, const Standard_Boolean result) const
 {
-  Standard_Integer i,nb;
+  Standard_Integer i = 0,nb = 0;
   Handle(TColStd_HSequenceOfTransient) list = new TColStd_HSequenceOfTransient();
   Handle(TColStd_HSequenceOfTransient) res  = Results(2);
   nb = res->Length();
@@ -177,7 +177,7 @@ Transfer_ResultFromModel::Transfer_ResultFromModel ()
   (const Standard_Boolean erronly, const Standard_Integer level) const
 {
   Interface_CheckIterator chl;
-  Standard_Integer i,nb;
+  Standard_Integer i = 0,nb = 0;
   Handle(TColStd_HSequenceOfTransient) list = new TColStd_HSequenceOfTransient();
   Handle(TColStd_HSequenceOfTransient) res  = Results(level);
   nb = res->Length();
index 453c19471eb225be1c120534523931704156b215..49924f7cd4ba6abe858f21b34bec551f633bc23e 100644 (file)
@@ -61,7 +61,7 @@ Handle(Transfer_ResultFromTransient)  Transfer_ResultFromTransient::ResultFromKe
 {
   Handle(Transfer_ResultFromTransient) res;
   if (key == thestart) return this;
-  Standard_Integer i, nb = NbSubResults();
+  Standard_Integer i = 0, nb = NbSubResults();
   for (i = 1; i <= nb; i ++) {
     res = SubResult(i)->ResultFromKey(key);
     if (!res.IsNull()) return res;
@@ -73,7 +73,7 @@ Handle(Transfer_ResultFromTransient)  Transfer_ResultFromTransient::ResultFromKe
   (TColStd_IndexedMapOfTransient& map) const
 {
   if (thesubs.IsNull()) return;
-  Standard_Integer i, nb = thesubs->Length();
+  Standard_Integer i = 0, nb = thesubs->Length();
   for (i = 1; i <= nb; i ++)  map.Add (thesubs->Value(i));
   for (i = 1; i <= nb; i ++)  SubResult(i)->FillMap(map);
 }
index 05232fed00976d49765f9bfd1f8a9fe9d3654393..6024faef9711da675a7c83047f2946fe628b7b26 100644 (file)
@@ -37,7 +37,7 @@ Transfer_TransferInput::Transfer_TransferInput ()    {  }
 {
   Interface_EntityIterator iter;
   for (list.Start(); list.More(); list.Next()) {
-    Handle(Transfer_Binder) binder = list.Value();
+    const Handle(Transfer_Binder)& binder = list.Value();
     if (binder.IsNull()) continue;
     if (binder->IsKind(STANDARD_TYPE(Transfer_VoidBinder))) continue;
 
index 7d81b210d0b97608e165863512e3f5a474cce39a..e6ef809100a65e9d4687d9b187e13c676c7e6acf 100644 (file)
 static Handle(Standard_Transient)   nultrans;  // pour retour const&(Null)
 
 
-    Transfer_TransferIterator::Transfer_TransferIterator ()
+    Transfer_TransferIterator::Transfer_TransferIterator () : theitems(new Transfer_HSequenceOfBinder()), theselect(new TColStd_HSequenceOfInteger()), themaxi(0), thecurr(1)
 {
-  theitems  = new Transfer_HSequenceOfBinder();
-  theselect = new TColStd_HSequenceOfInteger();
-  themaxi = 0;
-  thecurr = 1;
+  
+  
+  
+  
 }
 
     void  Transfer_TransferIterator::AddItem
@@ -57,7 +57,7 @@ static Handle(Standard_Transient)   nultrans;  // pour retour const&(Null)
   for (Standard_Integer i = theitems->Length(); i > 0; i --) {
     Handle(Transfer_Binder) atr = theitems->Value(i);
     Handle(Standard_Type) btype = ResultType();
-    Standard_Boolean matchtype;
+    Standard_Boolean matchtype = 0;
     if      (!atr->HasResult()) matchtype = Standard_False;
     else if (atr->IsMultiple()) matchtype = Standard_False;
     else if (casetype == 0) matchtype = (atype == btype);         // Type fixe
@@ -93,7 +93,7 @@ static Handle(Standard_Transient)   nultrans;  // pour retour const&(Null)
 
     Standard_Integer  Transfer_TransferIterator::Number () const
 {
-  Standard_Integer numb,i;  numb = 0;
+  Standard_Integer numb = 0,i = 0;  numb = 0;
   for (i = 1; i <= themaxi; i ++) {
     if (theselect->Value(i) != 0) numb ++;
   }
index 1bd7d194c1b8504edce550b7bc2a3879aef5d603..a1fedbe6711b76894f537face482f52949891683 100644 (file)
 #include <Message_ProgressScope.hxx>
 
 Transfer_TransferOutput::Transfer_TransferOutput (const Handle(Transfer_ActorOfTransientProcess)& actor,
-                                                 const Handle(Interface_InterfaceModel)& amodel)
+                                                 const Handle(Interface_InterfaceModel)& amodel) : theproc(new Transfer_TransientProcess (amodel->NbEntities())), themodel(amodel)
 {
-  theproc  = new Transfer_TransientProcess (amodel->NbEntities());
+  
   theproc->SetActor(actor);
-  themodel = amodel;
+  
 //  thescope = Standard_False;
 //  theundef = Transfer_UndefIgnore;
 }
 
 Transfer_TransferOutput::Transfer_TransferOutput (const Handle(Transfer_TransientProcess)& proc,
-                                                 const Handle(Interface_InterfaceModel)& amodel)
+                                                 const Handle(Interface_InterfaceModel)& amodel) : theproc(proc), themodel(amodel)
 {
-  theproc  = proc;
-  themodel = amodel;
+  
+  
 //  thescope = Standard_False; //szv#4:S4163:12Mar99 initialization needed
 //  theundef = Transfer_UndefIgnore;
 }
@@ -93,7 +93,7 @@ void Transfer_TransferOutput::TransferRoots (const Handle(Interface_Protocol)& p
   Interface_EntityIterator list = tool.RootEntities();
   Message_ProgressScope aPS(theProgress, NULL, list.NbEntities());
   for (list.Start(); list.More() && aPS.More(); list.Next()) {
-    Handle(Standard_Transient) ent = list.Value();
+    const Handle(Standard_Transient)& ent = list.Value();
 //    Standard_Integer scope = 0;
 //    if (thescope) scope = theproc->NewScope (ent);
     if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent);
@@ -110,7 +110,7 @@ void Transfer_TransferOutput::TransferRoots (const Interface_Graph& G,
   Interface_EntityIterator list = tool.RootEntities();
   Message_ProgressScope aPS(theProgress, NULL, list.NbEntities());
   for (list.Start(); list.More() && aPS.More(); list.Next()) {
-    Handle(Standard_Transient) ent = list.Value();
+    const Handle(Standard_Transient)& ent = list.Value();
 //    Standard_Integer scope = 0;
 //    if (thescope) scope = theproc->NewScope (ent);
     if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent);
index 4f4c8d6770d87902ea311f71177b8f515540c3ef..e3a794fb23496a7dba9d2f0c478bbc3d4ee1bd38 100644 (file)
@@ -24,8 +24,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Transfer_TransientListBinder,Transfer_Binder)
 //function : Constructor
 //purpose  : 
 //=======================================================================
-Transfer_TransientListBinder::Transfer_TransientListBinder  ()
-{  theres = new TColStd_HSequenceOfTransient();  }
+Transfer_TransientListBinder::Transfer_TransientListBinder  () : theres(new TColStd_HSequenceOfTransient())
+{   }
 
 //=======================================================================
 //function : Constructor
@@ -33,8 +33,8 @@ Transfer_TransientListBinder::Transfer_TransientListBinder  ()
 //=======================================================================
 
 Transfer_TransientListBinder::Transfer_TransientListBinder
-  (const Handle(TColStd_HSequenceOfTransient)& list)
-{  theres = list;  }
+  (const Handle(TColStd_HSequenceOfTransient)& list) : theres(list)
+{   }
 
 //=======================================================================
 //function : IsMultiple
index 1950dd4d745ab2a3c532fcfc4dfdcbecf730c60a..4a0da51c928ae45cff463ef798729301d2158e52 100644 (file)
@@ -29,9 +29,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Transfer_TransientProcess,Transfer_ProcessForTransien
 //purpose  : 
 //=======================================================================
 Transfer_TransientProcess::Transfer_TransientProcess
-  (const Standard_Integer nb) : Transfer_ProcessForTransient (nb)  
+  (const Standard_Integer nb) : Transfer_ProcessForTransient (nb), thetrroots(new TColStd_HSequenceOfTransient)  
 {  
-  thetrroots = new TColStd_HSequenceOfTransient;
+  
 }
 
 
@@ -243,7 +243,7 @@ void Transfer_TransientProcess::PrintStats(const Standard_Integer /*mode*/,
       S<<"****        Nb Entities         : "<<model->NbEntities()<<std::endl;
 
     Standard_Integer nbr = 0, nbe = 0, nbw = 0;
-    Standard_Integer i, max = NbMapped(), nbroots = NbRoots();
+    Standard_Integer i = 0, max = NbMapped(), nbroots = NbRoots();
     S<< "****        Nb Final Results    : "<<nbroots<<std::endl;
 
     for (i = 1; i <= max; i ++) {
index b3830b11828f4a51013cf8d21750f80de1721b60..75a533092ec565f0c644c3edaa3f97c06f7e2be2 100644 (file)
@@ -44,7 +44,7 @@ static void  ShapeAppend
   }
   else if (binder->IsKind(STANDARD_TYPE(TransferBRep_ShapeListBinder))) {
     DeclareAndCast(TransferBRep_ShapeListBinder,slbind,binder);
-    Standard_Integer i,nb = slbind->NbShapes();
+    Standard_Integer i = 0,nb = slbind->NbShapes();
     for (i = 1; i <= nb; i ++) shapes->Append (slbind->Shape(i));
   }
   else if (binder->IsKind(STANDARD_TYPE(Transfer_SimpleBinderOfTransient))) {
@@ -109,7 +109,7 @@ static void  ShapeAppend
     (roots ? TP->RootResult() : TP->CompleteResult());
 
   for (list.Start(); list.More(); list.Next()) {
-    Handle(Transfer_Binder) binder = list.Value();
+    const Handle(Transfer_Binder)& binder = list.Value();
     ShapeAppend (binder,shapes);
   }
   return shapes;
@@ -123,7 +123,7 @@ static void  ShapeAppend
   if (TP.IsNull() && list.IsNull()) return shapes;
   shapes = new TopTools_HSequenceOfShape();
 
-  Standard_Integer ie, ne = list->Length();
+  Standard_Integer ie = 0, ne = list->Length();
   for (ie = 1; ie <= ne; ie ++) {
     Handle(Transfer_Binder) binder = TP->Find(list->Value(ie));
     ShapeAppend (binder,shapes);
@@ -225,7 +225,7 @@ static void FillInfo (const Handle(Transfer_Binder)& Binder,
   InfoSeq = new TransferBRep_HSequenceOfTransferResultInfo;
   if (TP.IsNull() || EntityTypes.IsNull()) return;
   Standard_Integer SeqLen = EntityTypes->Length();
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 1; i <= SeqLen; i++) {
     InfoSeq->Append (new TransferBRep_TransferResultInfo);
   }
@@ -263,7 +263,7 @@ static void FillInfo (const Handle(Transfer_Binder)& Binder,
   InfoSeq = new TransferBRep_HSequenceOfTransferResultInfo;
   if (FP.IsNull() || ShapeTypes.IsNull()) return;
   Standard_Integer SeqLen = ShapeTypes->Length();
-  Standard_Integer i; // svv Jan11 2000 : porting on DEC
+  Standard_Integer i = 0; // svv Jan11 2000 : porting on DEC
   for (i = 1; i <= SeqLen; i++) {
     InfoSeq->Append (new TransferBRep_TransferResultInfo);
   }
@@ -320,7 +320,7 @@ Interface_CheckIterator TransferBRep::BRepCheck
   nchl.SetModel(model);
   for (chl.Start(); chl.More(); chl.Next()) {
     Standard_Integer num = 0;
-    Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->NbFails() + ach->NbWarnings() == 0) continue;
     DeclareAndCast(Transfer_Finder,starting,ach->Entity());
     Handle(Standard_Transient) ent;
@@ -339,7 +339,7 @@ Interface_CheckIterator TransferBRep::BRepCheck
 {
   Handle(TColStd_HSequenceOfTransient) ls = new TColStd_HSequenceOfTransient();
   for (chl.Start(); chl.More(); chl.Next()) {
-    const Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->NbFails() + ach->NbWarnings() == 0) continue;
     Handle(Standard_Transient) ent = ach->Entity();
     if (ent.IsNull()) continue;
@@ -358,7 +358,7 @@ Interface_CheckIterator TransferBRep::BRepCheck
 {
   Handle(TopTools_HSequenceOfShape) ls = new TopTools_HSequenceOfShape();
   for (chl.Start(); chl.More(); chl.Next()) {
-    const Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->NbFails() + ach->NbWarnings() == 0) continue;
     Handle(Standard_Transient) ent = ach->Entity();
     if (ent.IsNull()) continue;
@@ -385,13 +385,13 @@ Interface_CheckIterator TransferBRep::BRepCheck
   Interface_CheckIterator nchl;
 
   for (chl.Start(); chl.More(); chl.Next()) {
-    const Handle(Interface_Check) ach = chl.Value();
+    const Handle(Interface_Check)& ach = chl.Value();
     if (ach->NbFails() + ach->NbWarnings() == 0) continue;
     Handle(Standard_Transient) ent = ach->Entity();
     if (ent.IsNull()) continue;
     if (S.IsNull()) {
       if (ent == obj) {
-       Handle(Interface_Check) bch(ach);  bch->SetEntity(ent);
+       const Handle(Interface_Check)& bch(ach);  bch->SetEntity(ent);
        nchl.Add (bch,0);
       }
     } else {
@@ -403,7 +403,7 @@ Interface_CheckIterator TransferBRep::BRepCheck
       if (!sbs.IsNull()) sh = sbs->Result();
       if (!smp.IsNull()) sh = smp->Value();
       if (sh == S) {
-       Handle(Interface_Check) bch(ach);  bch->SetEntity(ent);
+       const Handle(Interface_Check)& bch(ach);  bch->SetEntity(ent);
        nchl.Add (bch,0);
       }
     }
@@ -421,7 +421,7 @@ void TransferBRep::PrintResultInfo(const Handle(Message_Printer)& Printer,
                                   const Handle(TransferBRep_TransferResultInfo)& ResultInfo,
                                   const Standard_Boolean printEmpty)
 {
-  Standard_Integer R, RW, RF, RWF, NR, NRW, NRF, NRWF;
+  Standard_Integer R = 0, RW = 0, RF = 0, RWF = 0, NR = 0, NRW = 0, NRF = 0, NRWF = 0;
   R    = ResultInfo->Result();
   RW   = ResultInfo->ResultWarning();
   RF   = ResultInfo->ResultFail();
index 81d56534a5020c46f3cb66ee01d0a72196d80f96..6f1b876896740b829d0ab51f99fe7e7f263a8f5b 100644 (file)
@@ -29,8 +29,8 @@
 #include <TransferBRep_Reader.hxx>
 
 TransferBRep_Reader::TransferBRep_Reader ()
-    : theDone (Standard_False) , theFilest (0) , theNewpr (Standard_False)
-      {    theShapes = new TopTools_HSequenceOfShape();  theTransi = new TColStd_HSequenceOfTransient();  }
+    : theDone (Standard_False) , theFilest (0) , theNewpr (Standard_False), theShapes(new TopTools_HSequenceOfShape()), theTransi(new TColStd_HSequenceOfTransient())
+      {      }
 
     void  TransferBRep_Reader::SetProtocol
   (const Handle(Interface_Protocol)& protocol)
@@ -119,7 +119,7 @@ TransferBRep_Reader::TransferBRep_Reader ()
     void  TransferBRep_Reader::EndTransfer ()
 {
   theShapes->Append ( TransferBRep::Shapes (theProc,Standard_True) );
-  Standard_Integer i,nb = theProc->NbRoots();
+  Standard_Integer i = 0,nb = theProc->NbRoots();
   for (i = 1; i <= nb; i ++) {
     Handle(Standard_Transient) ent = theProc->Root(i);
     Handle(Standard_Transient) res = theProc->FindTransient(ent);
@@ -168,7 +168,7 @@ TransferBRep_Reader::TransferBRep_Reader ()
   if (!BeginTransfer()) return;
   if (list.IsNull()) return;
   Transfer_TransferOutput TP (theProc,theModel);
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   Message_Messenger::StreamBuffer sout = theProc->Messenger()->SendInfo();
 
   if (theProc->TraceLevel() > 1) 
index 060c1e66cd3675ea18032cb823ec43a3c4901f83..7a98ea7c0553abe2727834922cc2c4ae93c726f6 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(TransferBRep_ShapeListBinder,Transfer_Binder)
 
-TransferBRep_ShapeListBinder::TransferBRep_ShapeListBinder  ()
-      {  theres = new TopTools_HSequenceOfShape();  }
+TransferBRep_ShapeListBinder::TransferBRep_ShapeListBinder  () : theres(new TopTools_HSequenceOfShape())
+      {   }
 
     TransferBRep_ShapeListBinder::TransferBRep_ShapeListBinder
-  (const Handle(TopTools_HSequenceOfShape)& list)
-      {  theres = list;  }
+  (const Handle(TopTools_HSequenceOfShape)& list) : theres(list)
+      {   }
 
     Standard_Boolean  TransferBRep_ShapeListBinder::IsMultiple () const
       {  return (NbShapes() > 1);  }
index 79a58d4466a3a6cd248be4c391f2dd776ab9c49d..4063548fee7382a1e9f3c86254f0d19857a6e0d9 100644 (file)
@@ -78,14 +78,14 @@ protected:
 private:
 
 
-  Standard_Integer myR;
-  Standard_Integer myRW;
-  Standard_Integer myRF;
-  Standard_Integer myRWF;
-  Standard_Integer myNR;
-  Standard_Integer myNRW;
-  Standard_Integer myNRF;
-  Standard_Integer myNRWF;
+  Standard_Integer myR{};
+  Standard_Integer myRW{};
+  Standard_Integer myRF{};
+  Standard_Integer myRWF{};
+  Standard_Integer myNR{};
+  Standard_Integer myNRW{};
+  Standard_Integer myNRF{};
+  Standard_Integer myNRWF{};
 
 
 };
index 202f63c892faf06f0f272f27beaa7991decb81ee..594acaefb7e6dedc6342938c1f73c6d1b81952a0 100644 (file)
@@ -95,7 +95,7 @@ Handle(Units_UnitsDictionary) Units::DictionaryOfUnits(const Standard_Boolean am
 
 Handle(Units_Quantity) Units::Quantity(const Standard_CString aquantity)
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   Handle(Units_Quantity) quantity;
   Handle(Units_Quantity) nullquantity;
   Handle(Units_QuantitiesSequence) quantitiessequence;
@@ -122,7 +122,7 @@ Handle(Units_Quantity) Units::Quantity(const Standard_CString aquantity)
 static TCollection_AsciiString symbol_string,quantity_string;
 Standard_CString Units::FirstQuantity(const Standard_CString aunit)
 {
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
   Handle(Units_Quantity) thequantity;
   Handle(Units_QuantitiesSequence) quantitiessequence;
   Handle(Units_UnitsSequence) unitssequence;
index 11e9849165d101179a4a72abb8b115dad0b4a1ab..c536c445766c9aa564dd620a3d6affe092822c39 100644 (file)
@@ -35,17 +35,17 @@ Units_Dimensions::Units_Dimensions(const Standard_Real amass
                                   const Standard_Real anamountofsubstance       ,
                                   const Standard_Real aluminousintensity        ,
                                   const Standard_Real aplaneangle               ,
-                                  const Standard_Real asolidangle               )
+                                  const Standard_Real asolidangle               ) : themass(amass), thelength(alength), thetime(atime), theelectriccurrent(anelectriccurrent), thethermodynamictemperature(athermodynamictemperature), theamountofsubstance(anamountofsubstance), theluminousintensity(aluminousintensity), theplaneangle(aplaneangle), thesolidangle(asolidangle)
 {
-  themass                     = amass                     ;
-  thelength                   = alength                   ;
-  thetime                     = atime                     ;
-  theelectriccurrent          = anelectriccurrent         ;
-  thethermodynamictemperature = athermodynamictemperature ;
-  theamountofsubstance        = anamountofsubstance       ;
-  theluminousintensity        = aluminousintensity        ;
-  theplaneangle               = aplaneangle               ;
-  thesolidangle               = asolidangle               ;
+  
+  
+  
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -181,7 +181,7 @@ Standard_Boolean Units_Dimensions::IsNotEqual
 
 void Units_Dimensions::Dump(const Standard_Integer ashift) const
 {
-  int i;
+  int i = 0;
   for(i=0; i<ashift; i++)std::cout<<"  ";
   std::cout<<" with the physical dimensions : "<<std::endl;
   for(i=0; i<ashift; i++)std::cout<<"  ";
index 0fb0283881f6aecc7a543c515e0734e1c96492f9..d3d28c07682e28df87160be3f684ddcfb767ec95 100644 (file)
 //function : Units_Explorer
 //purpose  : 
 //=======================================================================
-Units_Explorer::Units_Explorer()
+Units_Explorer::Units_Explorer() : thecurrentquantity(1), thecurrentunit(1)
 {
-  thecurrentquantity = 1;
-  thecurrentunit = 1;
+  
+  
 }
 
 //=======================================================================
@@ -95,7 +95,7 @@ void Units_Explorer::Init(const Handle(Units_UnitsSystem)& aunitssystem)
 
 void Units_Explorer::Init(const Handle(Units_UnitsDictionary)& aunitsdictionary)
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   thecurrentquantity = 1;
   thequantitiessequence = aunitsdictionary->Sequence();
   theactiveunitssequence = new TColStd_HSequenceOfInteger();
@@ -116,7 +116,7 @@ void Units_Explorer::Init(const Handle(Units_UnitsDictionary)& aunitsdictionary)
 void Units_Explorer::Init(const Handle(Units_UnitsSystem)& aunitssystem,
                          const Standard_CString aquantity)
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   thecurrentquantity = 0;
   thequantitiessequence = aunitssystem->QuantitiesSequence();
   theactiveunitssequence = aunitssystem->ActiveUnitsSequence();
@@ -145,7 +145,7 @@ void Units_Explorer::Init(const Handle(Units_UnitsDictionary)& aunitsdictionary,
                          const Standard_CString aquantity)
 {
   Handle(Units_Quantity) quantity;
-  Standard_Integer index;
+  Standard_Integer index = 0;
   thecurrentquantity = 0;
   thequantitiessequence = aunitsdictionary->Sequence();
   theactiveunitssequence = new TColStd_HSequenceOfInteger();
index c54996c3bbd55edac28284832e832639a0426bba..cf11464d54f94fcd3a5151b61e041926c18b34a9 100644 (file)
@@ -120,9 +120,9 @@ private:
 
 
 
-  Standard_Integer thecurrentquantity;
+  Standard_Integer thecurrentquantity{};
   Handle(Units_QuantitiesSequence) thequantitiessequence;
-  Standard_Integer thecurrentunit;
+  Standard_Integer thecurrentunit{};
   Handle(Units_UnitsSequence) theunitssequence;
   Handle(TColStd_HSequenceOfInteger) theactiveunitssequence;
 
index 71c03cedfab96ebae62ad98273206637e752a40d..0b98898718a7fb221a3a7dbf21dea0c1fa7ed469 100644 (file)
@@ -140,7 +140,7 @@ void Units_Lexicon::AddToken(const Standard_CString aword,
   Handle(Units_Token) token;
   Handle(Units_Token) referencetoken;
   Standard_Boolean found = Standard_False;
-  Standard_Integer index;
+  Standard_Integer index = 0;
 
   for(index=1;index<=thesequenceoftokens->Length();index++) {
     referencetoken = thesequenceoftokens->Value(index);
index 3e52746ddcd25f603bef9056b2815c06d4b5682b..dd789e6640655c813fbe78d180ec1159ea1ef40a 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Units.hxx>
 #include <Units_Measurement.hxx>
 #include <Units_Operators.hxx>
 //function : Units_Measurement
 //purpose  : 
 //=======================================================================
-Units_Measurement::Units_Measurement()
+Units_Measurement::Units_Measurement() : themeasurement(0.), myHasToken(Standard_False)
 {
-  themeasurement = 0.;
-  myHasToken = Standard_False;
+  
+  
 }
 
 
@@ -38,11 +40,11 @@ Units_Measurement::Units_Measurement()
 //=======================================================================
 
 Units_Measurement::Units_Measurement(const Standard_Real avalue,
-                                    const Handle(Units_Token)& atoken)
+                                    const Handle(Units_Token)& atoken) : themeasurement(avalue), thetoken(atoken), myHasToken(Standard_True)
 {
-  themeasurement = avalue;
-  thetoken       = atoken;
-  myHasToken = Standard_True;
+  
+  
+  
 }
 
 
@@ -52,9 +54,9 @@ Units_Measurement::Units_Measurement(const Standard_Real avalue,
 //=======================================================================
 
 Units_Measurement::Units_Measurement(const Standard_Real avalue,
-                                    const Standard_CString aunit)
+                                    const Standard_CString aunit) : themeasurement(avalue)
 {
-  themeasurement=avalue;
+  
   Units_UnitSentence unit(aunit);
   if(!unit.IsDone()) {
 #ifdef OCCT_DEBUG
@@ -155,7 +157,7 @@ Handle(Units_Token) Units_Measurement::Token() const
 Units_Measurement Units_Measurement::Add
        (const Units_Measurement& ameasurement) const
 {
-  Standard_Real value;
+  Standard_Real value = NAN;
   Units_Measurement measurement;
   if(thetoken->Dimensions()->IsNotEqual((ameasurement.Token())->Dimensions()))
     return measurement;
@@ -175,7 +177,7 @@ Units_Measurement Units_Measurement::Add
 Units_Measurement Units_Measurement::Subtract
   (const Units_Measurement& ameasurement) const
 {
-  Standard_Real value;
+  Standard_Real value = NAN;
   Units_Measurement measurement;
   if(thetoken->Dimensions()->IsNotEqual((ameasurement.Token())->Dimensions()))
     return measurement;
index 8250f2ba2c19c65045a8cda4b6c6902eaf67407c..715a6cb3116eb1c81cb6bc9d6926b9bfca97b794 100644 (file)
@@ -38,7 +38,7 @@ Standard_Boolean Units_Quantity::IsEqual(const Standard_CString astring) const
 void Units_Quantity::Dump(const Standard_Integer ashift,
                          const Standard_Integer alevel) const
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   std::cout<<std::endl;
   for(int i=0; i<ashift; i++)std::cout<<"  ";
   std::cout<<Name()<<std::endl;
index 610dbdfb90b688a5aede5cb73521c8faee3eb170..efd1b59e471de1ac11a859687f238c826e9ed228 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Units_Lexicon.hxx>
 #include <Units_NoSuchType.hxx>
 #include <Units_Operators.hxx>
@@ -51,14 +53,14 @@ static Handle(Units_Token) CreateTokenForNumber(const Standard_CString str)
 //=======================================================================
 
 Units_Sentence::Units_Sentence(const Handle(Units_Lexicon)& alexicon,
-                              const Standard_CString astring)
+                              const Standard_CString astring) : thesequenceoftokens(new Units_TokensSequence())
 {
-  Standard_Integer index;
-  Standard_Size i,limchain;
+  Standard_Integer index = 0;
+  Standard_Size i = 0,limchain = 0;
   Handle(Units_Token) token;
   Handle(Units_Token) referencetoken;
   
-  thesequenceoftokens = new Units_TokensSequence();
+  
   Handle(Units_TokensSequence) lstlexicon=alexicon->Sequence();
   if(lstlexicon.IsNull())
     throw Units_NoSuchType("BAD LEXICON descriptor");
@@ -131,8 +133,8 @@ Units_Sentence::Units_Sentence(const Handle(Units_Lexicon)& alexicon,
 
 void Units_Sentence::SetConstants()
 {
-  Standard_Integer index;
-  Standard_Real value;
+  Standard_Integer index = 0;
+  Standard_Real value = NAN;
   Handle(Units_Token) token;
   TCollection_AsciiString string;
 
@@ -163,7 +165,7 @@ static Handle(Units_Token) CalculateLocal(const Handle(Units_TokensSequence)& aS
   //}
   //std::cout<<std::endl;
   Handle(Units_Token) tok1,tok2;
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
 
   if(aSeq->Length()==1) {
     return aSeq->Value(1);
index 0a2e150c9e22141799e20ee251a000a811f10900..31be3c51d94265a59c0caae7c57788e6cc8d5717 100644 (file)
@@ -31,9 +31,9 @@ Units_ShiftedToken::Units_ShiftedToken(const Standard_CString aword,
                                       const Standard_Real avalue,
                                       const Standard_Real amove,
                                       const Handle(Units_Dimensions)& adimensions)
-     : Units_Token(aword,amean,avalue,adimensions)
+     : Units_Token(aword,amean,avalue,adimensions), themove(amove)
 {
-  themove = amove;
+  
 }
 
 //=======================================================================
index b6192e7805c7a52b2b8734fb902b4702c830fdfe..1b95d5d5f543448606a33bc49da153163128d043 100644 (file)
@@ -33,9 +33,9 @@ Units_ShiftedUnit::Units_ShiftedUnit(const Standard_CString aname,
                                     const Standard_Real avalue,
                                     const Standard_Real amove,
                                     const Handle(Units_Quantity)& aquantity)
-     : Units_Unit(aname,asymbol,avalue,aquantity)
+     : Units_Unit(aname,asymbol,avalue,aquantity), themove(amove)
 {
-  themove = amove;
+  
 }
 
 //=======================================================================
@@ -100,7 +100,7 @@ Handle(Units_Token) Units_ShiftedUnit::Token() const
 void Units_ShiftedUnit::Dump(const Standard_Integer ,
                             const Standard_Integer ) const
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   TCollection_AsciiString string;
 
 //  int i;
index 2f3aa04cbe7b860e6987c16dda3003d50909b783..52556b7227a741167849367d3e61686ba1c7747c 100644 (file)
@@ -34,12 +34,12 @@ IMPLEMENT_STANDARD_RTTIEXT(Units_Token,Standard_Transient)
 //function : Units_Token
 //purpose  : 
 //=======================================================================
-Units_Token::Units_Token()
+Units_Token::Units_Token() : theword(" "), themean(" "), thevalue(0.), thedimensions(new Units_Dimensions(0.,0.,0.,0.,0.,0.,0.,0.,0.))
 {
-  theword=" ";
-  themean=" ";
-  thevalue=0.;
-  thedimensions=new Units_Dimensions(0.,0.,0.,0.,0.,0.,0.,0.,0.);
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -47,12 +47,12 @@ Units_Token::Units_Token()
 //purpose  : 
 //=======================================================================
 
-Units_Token::Units_Token(const Standard_CString aword)
+Units_Token::Units_Token(const Standard_CString aword) : theword(aword), themean(" "), thevalue(0.), thedimensions(new Units_Dimensions(0.,0.,0.,0.,0.,0.,0.,0.,0.))
 {
-  theword=aword;
-  themean=" ";
-  thevalue=0.;
-  thedimensions=new Units_Dimensions(0.,0.,0.,0.,0.,0.,0.,0.,0.);
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -61,12 +61,12 @@ Units_Token::Units_Token(const Standard_CString aword)
 //=======================================================================
 
 Units_Token::Units_Token(const Standard_CString aword,
-                        const Standard_CString amean)
+                        const Standard_CString amean) : theword(aword), themean(amean), thevalue(0.), thedimensions(new Units_Dimensions(0.,0.,0.,0.,0.,0.,0.,0.,0.))
 {
-  theword=aword;
-  themean=amean;
-  thevalue=0.;
-  thedimensions=new Units_Dimensions(0.,0.,0.,0.,0.,0.,0.,0.,0.);
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -76,12 +76,12 @@ Units_Token::Units_Token(const Standard_CString aword,
 
 Units_Token::Units_Token(const Standard_CString aword,
                         const Standard_CString amean,
-                        const Standard_Real avalue)
+                        const Standard_Real avalue) : theword(aword), themean(amean), thevalue(avalue), thedimensions(new Units_Dimensions(0.,0.,0.,0.,0.,0.,0.,0.,0.))
 {
-  theword=aword;
-  themean=amean;
-  thevalue=avalue;
-  thedimensions=new Units_Dimensions(0.,0.,0.,0.,0.,0.,0.,0.,0.);
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -92,11 +92,11 @@ Units_Token::Units_Token(const Standard_CString aword,
 Units_Token::Units_Token(const Standard_CString aword,
                         const Standard_CString amean,
                         const Standard_Real avalue,
-                        const Handle(Units_Dimensions)& adimensions)
+                        const Handle(Units_Dimensions)& adimensions) : theword(aword), themean(amean), thevalue(avalue)
 {
-  theword=aword;
-  themean=amean;
-  thevalue=avalue;
+  
+  
+  
   if(adimensions.IsNull())
     thedimensions = new Units_Dimensions(0.,0.,0.,0.,0.,0.,0.,0.,0.);
   else
@@ -159,11 +159,11 @@ void Units_Token::Dimensions(const Handle(Units_Dimensions)& adimensions)
 //purpose  : 
 //=======================================================================
 
-Units_Token::Units_Token(const Handle(Units_Token)& atoken)
+Units_Token::Units_Token(const Handle(Units_Token)& atoken) : thevalue(atoken->Value())
 {
   theword       = atoken->Word();
   themean       = atoken->Mean();
-  thevalue      = atoken->Value();
+  
   thedimensions = atoken->Dimensions();
 }
 
@@ -358,7 +358,7 @@ Standard_Boolean Units_Token::IsEqual (const Handle(Units_Token)& atoken) const
 void Units_Token::Dump(const Standard_Integer ashift,
                       const Standard_Integer alevel) const
 {
-  int i;
+  int i = 0;
   TCollection_AsciiString word = Word();
   TCollection_AsciiString mean = Mean();
 
index b36352edfd23bea69934ebf8c3cea36d7befb049..9bf93e4f1900556edcfe2d017c08a3511b4ab563 100644 (file)
@@ -30,13 +30,13 @@ IMPLEMENT_STANDARD_RTTIEXT(Units_Unit,Standard_Transient)
 Units_Unit::Units_Unit(const Standard_CString aname,
                       const Standard_CString asymbol,
                       const Standard_Real avalue,
-                      const Handle(Units_Quantity)& aquantity)
+                      const Handle(Units_Quantity)& aquantity) : thename(new TCollection_HAsciiString(aname)), thevalue(avalue), thequantity(aquantity), thesymbolssequence(new TColStd_HSequenceOfHAsciiString())
 {
-  thename       = new TCollection_HAsciiString(aname);
-  thevalue      = avalue;
-  thequantity = aquantity;
+  
+  
+  
   Handle(TCollection_HAsciiString) symbol = new TCollection_HAsciiString(asymbol);
-  thesymbolssequence = new TColStd_HSequenceOfHAsciiString();
+  
   thesymbolssequence->Prepend(symbol);
 }
 
@@ -46,12 +46,12 @@ Units_Unit::Units_Unit(const Standard_CString aname,
 //=======================================================================
 
 Units_Unit::Units_Unit(const Standard_CString aname,
-                      const Standard_CString asymbol)
+                      const Standard_CString asymbol) : thename(new TCollection_HAsciiString(aname)), thevalue(0.), thesymbolssequence(new TColStd_HSequenceOfHAsciiString())
 {
-  thename       = new TCollection_HAsciiString(aname);
-  thevalue      = 0.;
+  
+  
   Handle(TCollection_HAsciiString) symbol = new TCollection_HAsciiString(asymbol);
-  thesymbolssequence = new TColStd_HSequenceOfHAsciiString();
+  
   thesymbolssequence->Prepend(symbol);
 }
 
@@ -60,11 +60,11 @@ Units_Unit::Units_Unit(const Standard_CString aname,
 //purpose  : 
 //=======================================================================
 
-Units_Unit::Units_Unit(const Standard_CString aname)
+Units_Unit::Units_Unit(const Standard_CString aname) : thename(new TCollection_HAsciiString(aname)), thevalue(0.), thesymbolssequence(new TColStd_HSequenceOfHAsciiString())
 {
-  thename  = new TCollection_HAsciiString(aname);
-  thevalue = 0.;
-  thesymbolssequence = new TColStd_HSequenceOfHAsciiString();
+  
+  
+  
 }
 
 //=======================================================================
@@ -96,7 +96,7 @@ Handle(Units_Token) Units_Unit::Token() const
 
 Standard_Boolean Units_Unit::IsEqual(const Standard_CString astring) const
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   TCollection_AsciiString symbol;
 
   for(index=1;index<=thesymbolssequence->Length();index++)
@@ -116,7 +116,7 @@ Standard_Boolean Units_Unit::IsEqual(const Standard_CString astring) const
 void Units_Unit::Dump(const Standard_Integer /*ashift*/,
                      const Standard_Integer) const
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   TCollection_AsciiString string;
 
 //  int i;
index f8465da8e95ea19693cee161ec685ddb16e848f4..5f563c047426af09274774ec41d99908a8521607 100644 (file)
@@ -65,7 +65,7 @@ void Units_UnitSentence::Analyse()
   if(Sequence()->Length()==0)
     return;
 
-  Standard_Integer index;
+  Standard_Integer index = 0;
   TCollection_AsciiString s;
   Handle(Units_Token) token;
   Handle(Units_Token) previoustoken;
@@ -177,7 +177,7 @@ void Units_UnitSentence::Analyse()
 void Units_UnitSentence::SetUnits
   (const Handle(Units_QuantitiesSequence)& aquantitiessequence)
 {
-  Standard_Integer index,jindex,kindex;
+  Standard_Integer index = 0,jindex = 0,kindex = 0;
   Standard_Boolean istheend=0;
   Handle(Units_Quantity) quantity;
   Handle(Units_TokensSequence) sequenceoftokens;
@@ -186,10 +186,8 @@ void Units_UnitSentence::SetUnits
   Handle(Units_Unit) unit;
   TCollection_AsciiString symbol;
 
-  Handle(Units_QuantitiesSequence) quantitiessequence = aquantitiessequence;
-
-  for(index=1; index<=quantitiessequence->Length(); index++) {
-    quantity = quantitiessequence->Value(index);
+  for(index=1; index<=aquantitiessequence->Length(); index++) {
+    quantity = aquantitiessequence->Value(index);
     unitssequence=quantity->Sequence();
     for(jindex=1; jindex<=unitssequence->Length(); jindex++) {
       unit = unitssequence->Value(jindex);
index 05268f9a1e18ba0e20e9e3b3689405df464e07c6..09162ed15d4d4ca362db9808bfa8e2942d4675ec 100644 (file)
@@ -100,8 +100,8 @@ namespace
 
 void Units_UnitsDictionary::Creates()
 {
-  Standard_Boolean ismove;
-  Standard_Integer i, j, k, charnumber, unitscomputed;
+  Standard_Boolean ismove = 0;
+  Standard_Integer i = 0, j = 0, k = 0, charnumber = 0, unitscomputed = 0;
   Standard_Real matrix[50][50], coeff=0, move=0;
   Handle(Units_Token) token;
   Handle(Units_UnitsSequence) theunitssequence;
@@ -329,7 +329,7 @@ void Units_UnitsDictionary::Creates()
 
 TCollection_AsciiString Units_UnitsDictionary::ActiveUnit(const Standard_CString aquantity) const
 {
-  Standard_Integer index1;
+  Standard_Integer index1 = 0;
   Handle(Units_Unit) unit;
   Handle(Units_UnitsSequence) unitssequence;
   Handle(Units_Quantity) quantity;
index 48bd1541d3b317a78287a63df8f18bd38fbba4a0..9a3490998388075103ea3cffdf101253c250e6d2 100644 (file)
@@ -16,6 +16,8 @@
 
 //              Convertir correctement les unites translatees
 
+#include <math.h>
+
 #include <Resource_Manager.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
@@ -39,10 +41,10 @@ IMPLEMENT_STANDARD_RTTIEXT(Units_UnitsSystem,Standard_Transient)
 //function : Units_UnitsSystem
 //purpose  : 
 //=======================================================================
-Units_UnitsSystem::Units_UnitsSystem()
+Units_UnitsSystem::Units_UnitsSystem() : thequantitiessequence(new Units_QuantitiesSequence()), theactiveunitssequence(new TColStd_HSequenceOfInteger)
 {
-  thequantitiessequence = new Units_QuantitiesSequence();
-  theactiveunitssequence = new TColStd_HSequenceOfInteger;
+  
+  
 }
 
 
@@ -52,12 +54,12 @@ Units_UnitsSystem::Units_UnitsSystem()
 //=======================================================================
 
 Units_UnitsSystem::Units_UnitsSystem(const Standard_CString aName,
-                                     const Standard_Boolean Verbose)
+                                     const Standard_Boolean Verbose) : thequantitiessequence(new Units_QuantitiesSequence()), theactiveunitssequence(new TColStd_HSequenceOfInteger)
 {
   Handle(Resource_Manager) themanager = new Resource_Manager(aName,Verbose);
 
-  thequantitiessequence = new Units_QuantitiesSequence();
-  theactiveunitssequence = new TColStd_HSequenceOfInteger;
+  
+  
 }
 
 
@@ -90,7 +92,7 @@ Handle(TColStd_HSequenceOfInteger) Units_UnitsSystem::ActiveUnitsSequence() cons
 
 void Units_UnitsSystem::Specify(const Standard_CString aquantity,const Standard_CString aunit)
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   Handle(Units_Unit) unit;
   Handle(Units_UnitsSequence) unitssequence;
   Handle(Units_Quantity) quantity;
@@ -152,7 +154,7 @@ void Units_UnitsSystem::Specify(const Standard_CString aquantity,const Standard_
 void Units_UnitsSystem::Remove(const Standard_CString aquantity,
                                const Standard_CString aunit)
 {
-  Standard_Integer index1,index2;
+  Standard_Integer index1 = 0,index2 = 0;
   Handle(Units_Unit) unit;
   Handle(Units_UnitsSequence) unitssequence;
   Handle(Units_Quantity) quantity;
@@ -200,7 +202,7 @@ void Units_UnitsSystem::Remove(const Standard_CString aquantity,
 void Units_UnitsSystem::Activate(const Standard_CString aquantity,
                                  const Standard_CString aunit)
 {
-  Standard_Integer index1,index2;
+  Standard_Integer index1 = 0,index2 = 0;
   Handle(Units_Unit) unit;
   Handle(Units_UnitsSequence) unitssequence;
   Handle(Units_Quantity) quantity;
@@ -231,7 +233,7 @@ void Units_UnitsSystem::Activate(const Standard_CString aquantity,
 
 void Units_UnitsSystem::Activates()
 {
-  Standard_Integer index;
+  Standard_Integer index = 0;
   Handle(Units_UnitsSequence) unitssequence;
   Handle(Units_Quantity) quantity;
 
@@ -252,7 +254,7 @@ void Units_UnitsSystem::Activates()
 
 TCollection_AsciiString Units_UnitsSystem::ActiveUnit(const Standard_CString aquantity) const
 {
-  Standard_Integer index1,index2;
+  Standard_Integer index1 = 0,index2 = 0;
   Handle(Units_Unit) unit;
   Handle(Units_UnitsSequence) unitssequence;
   Handle(Units_Quantity) quantity;
@@ -304,13 +306,13 @@ Standard_Real Units_UnitsSystem::ConvertValueToUserSystem
 Standard_Real Units_UnitsSystem::ConvertSIValueToUserSystem
   (const Standard_CString aquantity,const Standard_Real avalue) const
 {
-  Standard_Integer index,activeunit;
+  Standard_Integer index = 0,activeunit = 0;
   Handle(Units_UnitsSequence) unitssequence;
   Handle(Units_Quantity) quantity;
   Handle(Units_QuantitiesSequence) quantitiessequence;
   Handle(Units_Unit) unit;
   Handle(Units_ShiftedUnit) sunit;
-  Standard_Real uvalue,umove;
+  Standard_Real uvalue = NAN,umove = NAN;
 
   for(index=1;index<=thequantitiessequence->Length();index++) {
     quantity = thequantitiessequence->Value(index);
@@ -353,13 +355,13 @@ Standard_Real Units_UnitsSystem::ConvertSIValueToUserSystem
 Standard_Real Units_UnitsSystem::ConvertUserSystemValueToSI
   (const Standard_CString aquantity,const Standard_Real avalue) const
 {
-  Standard_Integer index,activeunit;
+  Standard_Integer index = 0,activeunit = 0;
   Handle(Units_UnitsSequence) unitssequence;
   Handle(Units_Quantity) quantity;
   Handle(Units_QuantitiesSequence) quantitiessequence;
   Handle(Units_Unit) unit;
   Handle(Units_ShiftedUnit) sunit;
-  Standard_Real uvalue,umove;
+  Standard_Real uvalue = NAN,umove = NAN;
 
   for(index=1;index<=thequantitiessequence->Length();index++) {
     quantity = thequantitiessequence->Value(index);
index 0de5961313d708f75d807bcd52ba01d5928ba4a9..150c9854c25de0497c32d323a794f0d600f3dcc2 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <OSD_Environment.hxx>
 #include <Resource_Manager.hxx>
 #include <TCollection_AsciiString.hxx>
@@ -337,7 +339,7 @@ Standard_Real UnitsAPI::AnyToLS(const Standard_Real aData,
 Standard_Real UnitsAPI::AnyToSI(const Standard_Real aData,
                                 const Standard_CString aUnit)
 {
-  Standard_Real aValue;
+  Standard_Real aValue = NAN;
   CheckLoading (UnitsAPI_DEFAULT); 
   aValue = Units::ToSI(aData,aUnit);
   return aValue;
@@ -353,7 +355,7 @@ Standard_Real UnitsAPI::AnyToSI(const Standard_Real aData,
                                 const Standard_CString aUnit,
                                 Handle(Units_Dimensions) &aDim)
 {
-  Standard_Real aValue;
+  Standard_Real aValue = NAN;
   CheckLoading (UnitsAPI_DEFAULT);
   aValue = Units::ToSI(aData,aUnit,aDim);
   return aValue;
@@ -393,7 +395,7 @@ Standard_Real UnitsAPI::AnyFromLS(const Standard_Real aData,
 Standard_Real UnitsAPI::AnyFromSI(const Standard_Real aData,
                                   const Standard_CString aUnit)
 {
-  Standard_Real aValue;
+  Standard_Real aValue = NAN;
   CheckLoading (UnitsAPI_DEFAULT); 
   aValue = Units::FromSI(aData,aUnit);
   return aValue;
index 2bf1342634406ce91a4b3db7160711bad30b7ca3..b60487d732822e0b4e064480b73b9af979cff023 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <V3d.hxx>
 
 #include <Aspect_Grid.hxx>
@@ -34,8 +36,8 @@ namespace
 
 void V3d::ArrowOfRadius(const Handle(Graphic3d_Group)& garrow,const Standard_Real X0,const Standard_Real Y0,const Standard_Real Z0,const Standard_Real Dx,const Standard_Real Dy,const Standard_Real Dz,const Standard_Real Alpha,const Standard_Real Lng)
 {
-  Standard_Real Xc, Yc, Zc, Xi, Yi, Zi, Xj, Yj, Zj;
-  Standard_Real Xn, Yn, Zn, X, Y, Z, X1 = 0., Y1 = 0., Z1 = 0., Norme;
+  Standard_Real Xc = NAN, Yc = NAN, Zc = NAN, Xi = NAN, Yi = NAN, Zi = NAN, Xj = NAN, Yj = NAN, Zj = NAN;
+  Standard_Real Xn = NAN, Yn = NAN, Zn = NAN, X = NAN, Y = NAN, Z = NAN, X1 = 0., Y1 = 0., Z1 = 0., Norme = NAN;
   const Standard_Integer NbPoints = 10;
 
 //      Centre du cercle base de la fleche :
@@ -62,7 +64,7 @@ void V3d::ArrowOfRadius(const Handle(Graphic3d_Group)& garrow,const Standard_Rea
 
   Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(3*NbPoints,NbPoints);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   const Standard_Real Tg = Tan(Alpha);
   for (i = 1; i <= NbPoints; i++)
   {
@@ -90,7 +92,7 @@ void V3d::CircleInPlane(const Handle(Graphic3d_Group)& gcircle,const Standard_Re
   Standard_Real Norme = Sqrt ( DX*DX + DY*DY + DZ*DZ );
   if ( Norme >= 0.0001 )
   {
-    Standard_Real VX,VY,VZ,X,Y,Z,Xn,Yn,Zn,Xi,Yi,Zi,Xj,Yj,Zj;
+    Standard_Real VX = NAN,VY = NAN,VZ = NAN,X = NAN,Y = NAN,Z = NAN,Xn = NAN,Yn = NAN,Zn = NAN,Xi = NAN,Yi = NAN,Zi = NAN,Xj = NAN,Yj = NAN,Zj = NAN;
 
     VX= DX/Norme; VY = DY/Norme; VZ = DZ/Norme;
 
index ca4a7c911d2cc9b91047a4cb18df6505e2487550..6e2de9f291b8e2380ff729fd00d10b40f8ccc827 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <V3d_CircularGrid.hxx>
 
 #include <Graphic3d_ArrayOfPoints.hxx>
@@ -42,7 +44,7 @@ public:
   : Graphic3d_Structure (theManager), myGrid (theGrid) {}
 
   //! Override method initiating recomputing in V3d_CircularGrid.
-  virtual void Compute() Standard_OVERRIDE
+  void Compute() Standard_OVERRIDE
   {
     GraphicClear (Standard_False);
     myGrid->myGroup = NewGroup();
@@ -120,10 +122,10 @@ void V3d_CircularGrid::UpdateDisplay ()
 {
   gp_Ax3 ThePlane = myViewer->PrivilegedPlane();
 
-  Standard_Real xl, yl, zl;
-  Standard_Real xdx, xdy, xdz;
-  Standard_Real ydx, ydy, ydz;
-  Standard_Real dx, dy, dz;
+  Standard_Real xl = NAN, yl = NAN, zl = NAN;
+  Standard_Real xdx = NAN, xdy = NAN, xdz = NAN;
+  Standard_Real ydx = NAN, ydy = NAN, ydz = NAN;
+  Standard_Real dx = NAN, dy = NAN, dz = NAN;
   ThePlane.Location ().Coord (xl, yl, zl);
   ThePlane.XDirection ().Coord (xdx, xdy, xdz);
   ThePlane.YDirection ().Coord (ydx, ydy, ydz);
@@ -135,10 +137,10 @@ void V3d_CircularGrid::UpdateDisplay ()
     MakeTransform = (RotationAngle() != myCurAngle || XOrigin() != myCurXo || YOrigin() != myCurYo);
     if (!MakeTransform)
     {
-      Standard_Real curxl, curyl, curzl;
-      Standard_Real curxdx, curxdy, curxdz;
-      Standard_Real curydx, curydy, curydz;
-      Standard_Real curdx, curdy, curdz;
+      Standard_Real curxl = NAN, curyl = NAN, curzl = NAN;
+      Standard_Real curxdx = NAN, curxdy = NAN, curxdz = NAN;
+      Standard_Real curydx = NAN, curydy = NAN, curydz = NAN;
+      Standard_Real curdx = NAN, curdy = NAN, curdz = NAN;
       myCurViewPlane.Location ().Coord (curxl, curyl, curzl);
       myCurViewPlane.XDirection ().Coord (curxdx, curxdy, curxdz);
       myCurViewPlane.YDirection ().Coord (curydx, curydy, curydz);
@@ -246,7 +248,7 @@ void V3d_CircularGrid::DefineLines ()
   if (aSeqTenth.Length())
   {
     myGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectLine3d (myTenthColor, Aspect_TOL_SOLID, 1.0));
-    Standard_Integer n, np;
+    Standard_Integer n = 0, np = 0;
     const Standard_Integer nbl = aSeqTenth.Length() / nbpnts;
     Handle(Graphic3d_ArrayOfPolylines) aPrims2 = new Graphic3d_ArrayOfPolylines(aSeqTenth.Length(),nbl);
     for (np = 1, n=0; n<nbl; n++) {
@@ -259,7 +261,7 @@ void V3d_CircularGrid::DefineLines ()
   if (aSeqLines.Length())
   {
     myGroup->SetPrimitivesAspect (new Graphic3d_AspectLine3d (myColor, Aspect_TOL_SOLID, 1.0));
-    Standard_Integer n, np;
+    Standard_Integer n = 0, np = 0;
     const Standard_Integer nbl = aSeqLines.Length() / nbpnts;
     Handle(Graphic3d_ArrayOfPolylines) aPrims3 = new Graphic3d_ArrayOfPolylines(aSeqLines.Length(),nbl);
     for (np = 1, n=0; n<nbl; n++) {
@@ -306,7 +308,7 @@ void V3d_CircularGrid::DefinePoints ()
   MarkerAttrib->SetScale (3.);
 
   const Standard_Integer nbpnts = Standard_Integer (2*aDivision);
-  Standard_Real r, alpha = M_PI / aDivision;
+  Standard_Real r = NAN, alpha = M_PI / aDivision;
 
   // diameters
   TColgp_SequenceOfPnt aSeqPnts;
@@ -318,7 +320,7 @@ void V3d_CircularGrid::DefinePoints ()
   myGroup->SetGroupPrimitivesAspect (MarkerAttrib);
   if (aSeqPnts.Length())
   {
-    Standard_Real X,Y,Z;
+    Standard_Real X = NAN,Y = NAN,Z = NAN;
     const Standard_Integer nbv = aSeqPnts.Length();
     Handle(Graphic3d_ArrayOfPoints) Cercle = new Graphic3d_ArrayOfPoints (nbv);
     for (Standard_Integer i=1; i<=nbv; i++)
index 35b1d2b2579e7e701ed67c559333849c2b4b14c2..0435aa613bb19502efe5d3336e3a6badfc7535b5 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <V3d_RectangularGrid.hxx>
 
 #include <Graphic3d_ArrayOfPoints.hxx>
@@ -40,7 +42,7 @@ public:
   : Graphic3d_Structure (theManager), myGrid (theGrid) {}
 
   //! Override method initiating recomputing in V3d_RectangularGrid.
-  virtual void Compute() Standard_OVERRIDE
+  void Compute() Standard_OVERRIDE
   {
     GraphicClear (Standard_False);
     myGrid->myGroup = NewGroup();
@@ -121,10 +123,10 @@ void V3d_RectangularGrid::UpdateDisplay ()
   gp_Ax3 ThePlane = myViewer->PrivilegedPlane ();
 
   Standard_Boolean MakeTransform = Standard_False;
-  Standard_Real xl, yl, zl;
-  Standard_Real xdx, xdy, xdz;
-  Standard_Real ydx, ydy, ydz;
-  Standard_Real dx, dy, dz;
+  Standard_Real xl = NAN, yl = NAN, zl = NAN;
+  Standard_Real xdx = NAN, xdy = NAN, xdz = NAN;
+  Standard_Real ydx = NAN, ydy = NAN, ydz = NAN;
+  Standard_Real dx = NAN, dy = NAN, dz = NAN;
   ThePlane.Location ().Coord (xl, yl, zl);
   ThePlane.XDirection ().Coord (xdx, xdy, xdz);
   ThePlane.YDirection ().Coord (ydx, ydy, ydz);
@@ -135,10 +137,10 @@ void V3d_RectangularGrid::UpdateDisplay ()
     if (RotationAngle() != myCurAngle || XOrigin() != myCurXo || YOrigin() != myCurYo)
       MakeTransform = Standard_True;
     if (! MakeTransform) {
-      Standard_Real curxl, curyl, curzl;
-      Standard_Real curxdx, curxdy, curxdz;
-      Standard_Real curydx, curydy, curydz;
-      Standard_Real curdx, curdy, curdz;
+      Standard_Real curxl = NAN, curyl = NAN, curzl = NAN;
+      Standard_Real curxdx = NAN, curxdy = NAN, curxdz = NAN;
+      Standard_Real curydx = NAN, curydy = NAN, curydz = NAN;
+      Standard_Real curdx = NAN, curdy = NAN, curdz = NAN;
       myCurViewPlane.Location ().Coord (curxl, curyl, curzl);
       myCurViewPlane.XDirection ().Coord (curxdx, curxdy, curxdz);
       myCurViewPlane.YDirection ().Coord (curydx, curydy, curydz);
@@ -215,8 +217,8 @@ void V3d_RectangularGrid::DefineLines ()
   myToComputePrs = Standard_False;
   myGroup->Clear();
 
-  Standard_Integer nblines;
-  Standard_Real xl, yl, zl = myOffSet;
+  Standard_Integer nblines = 0;
+  Standard_Real xl = NAN, yl = NAN, zl = myOffSet;
 
   TColgp_SequenceOfPnt aSeqLines, aSeqTenth;
 
@@ -298,7 +300,7 @@ void V3d_RectangularGrid::DefinePoints ()
   myGroup->Clear();
 
   // horizontals
-  Standard_Real xl, yl;
+  Standard_Real xl = NAN, yl = NAN;
   TColgp_SequenceOfPnt aSeqPnts;
   for (xl = 0.0; xl <= myXSize; xl += aXStep) {
     aSeqPnts.Append(gp_Pnt( xl, 0.0, -myOffSet));
@@ -312,8 +314,8 @@ void V3d_RectangularGrid::DefinePoints ()
   }
   if (aSeqPnts.Length())
   {
-    Standard_Integer i;
-    Standard_Real X,Y,Z;
+    Standard_Integer i = 0;
+    Standard_Real X = NAN,Y = NAN,Z = NAN;
     const Standard_Integer nbv = aSeqPnts.Length();
     Handle(Graphic3d_ArrayOfPoints) Vertical = new Graphic3d_ArrayOfPoints (nbv);
     for (i=1; i<=nbv; i++)
index 29c04ba8c3f432e22a726890a90e3e2f0f31c025..0386a0f9938e62ec4b0f02befdb27ce198e3ac3c 100644 (file)
@@ -64,7 +64,7 @@ public:
   : Graphic3d_Structure (theManager), myTrihedron (theTrihedron) {}
 
   //! Override method to redirect to V3d_Trihedron.
-  virtual void Compute() Standard_OVERRIDE { myTrihedron->compute(); }
+  void Compute() Standard_OVERRIDE { myTrihedron->compute(); }
 
 private:
   V3d_Trihedron* myTrihedron;
index 8497cfc596b0c398cb940ddf8c79c1d3692c3330..e170f335b5d5bab0a252cf78d7d4c56f1ba96344 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <V3d_View.hxx>
 
 #include <Aspect_CircularGrid.hxx>
@@ -63,7 +65,8 @@ namespace
 //purpose  :
 //=============================================================================
 V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView theType)
-: myIsInvalidatedImmediate (Standard_True),
+: myDefaultCamera(new Graphic3d_Camera()), myImmediateUpdate(Standard_True),
+  myIsInvalidatedImmediate (Standard_True),
   MyViewer (theViewer.operator->()),
   SwitchSetFront (Standard_False),
   myZRotation (Standard_False),
@@ -85,9 +88,9 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th
     ? Graphic3d_Camera::Projection_Orthographic
     : Graphic3d_Camera::Projection_Perspective);
 
-  myDefaultCamera = new Graphic3d_Camera();
+  
 
-  myImmediateUpdate = Standard_False;
+  
   SetAutoZFitMode (Standard_True, 1.0);
   SetBackFacingModel (V3d_TOBM_AUTOMATIC);
   SetCamera (aCamera);
@@ -104,7 +107,7 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th
   SetViewOrientationDefault();
   theViewer->AddView (this);
   Init();
-  myImmediateUpdate = Standard_True;
+  
 }
 
 //=============================================================================
@@ -112,25 +115,25 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th
 //purpose  :
 //=============================================================================
 V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const Handle(V3d_View)& theView)
-: myIsInvalidatedImmediate (Standard_True),
+: myDefaultCamera(new Graphic3d_Camera (theView->DefaultCamera())), myImmediateUpdate(Standard_True), myIsInvalidatedImmediate (Standard_True),
   MyViewer (theViewer.operator->()),
-  SwitchSetFront(Standard_False),
+  myDefaultViewAxis(theView->myDefaultViewAxis), myDefaultViewPoint(theView->myDefaultViewPoint), SwitchSetFront(Standard_False),
   myZRotation (Standard_False),
   MyTrsf (1, 4, 1, 4)
 {
   myView = theViewer->Driver()->CreateView (theViewer->StructureManager());
 
   myView->CopySettings (theView->View());
-  myDefaultViewPoint = theView->myDefaultViewPoint;
-  myDefaultViewAxis  = theView->myDefaultViewAxis;
+  
+  
 
-  myDefaultCamera = new Graphic3d_Camera (theView->DefaultCamera());
+  
 
-  myImmediateUpdate = Standard_False;
+  
   SetAutoZFitMode (theView->AutoZFitMode(), theView->AutoZFitScaleFactor());
   theViewer->AddView (this);
   Init();
-  myImmediateUpdate = Standard_True;
+  
 }
 
 //=============================================================================
@@ -179,7 +182,7 @@ void V3d_View::SetMagnify (const Handle(Aspect_Window)& theWindow,
 {
   if (!myView->IsRemoved() && !myView->IsDefined())
   {
-    Standard_Real aU1, aV1, aU2, aV2;
+    Standard_Real aU1 = NAN, aV1 = NAN, aU2 = NAN, aV2 = NAN;
     thePreviousView->Convert (theX1, theY1, aU1, aV1);
     thePreviousView->Convert (theX2, theY2, aU2, aV2);
     myView->SetWindow (Handle(Graphic3d_CView)(), theWindow, nullptr);
@@ -756,7 +759,7 @@ void V3d_View::SetVisualization (const V3d_TypeOfVisualization theType)
 void V3d_View::SetFront()
 {
   gp_Ax3 a = MyViewer->PrivilegedPlane();
-  Standard_Real xo, yo, zo, vx, vy, vz, xu, yu, zu;
+  Standard_Real xo = NAN, yo = NAN, zo = NAN, vx = NAN, vy = NAN, vz = NAN, xu = NAN, yu = NAN, zu = NAN;
 
   a.Direction().Coord(vx,vy,vz);
   a.YDirection().Coord(xu,yu,zu);
@@ -1374,7 +1377,7 @@ void V3d_View::Reset (const Standard_Boolean theToUpdate)
 void V3d_View::SetCenter (const Standard_Integer theXp,
                           const Standard_Integer theYp)
 {
-  Standard_Real aXv, aYv;
+  Standard_Real aXv = NAN, aYv = NAN;
   Convert (theXp, theYp, aXv, aYv);
   Translate (Camera(), aXv, aYv);
 
@@ -1589,9 +1592,9 @@ void V3d_View::FitAll (const Bnd_Box& theBox, const Standard_Real theMargin, con
 void V3d_View::DepthFitAll(const Standard_Real Aspect,
                            const Standard_Real Margin)
 {
-  Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax,U,V,W,U1,V1,W1 ;
-  Standard_Real Umin,Vmin,Wmin,Umax,Vmax,Wmax ;
-  Standard_Real Dx,Dy,Dz,Size;
+  Standard_Real Xmin = NAN,Ymin = NAN,Zmin = NAN,Xmax = NAN,Ymax = NAN,Zmax = NAN,U = NAN,V = NAN,W = NAN,U1 = NAN,V1 = NAN,W1 = NAN ;
+  Standard_Real Umin = NAN,Vmin = NAN,Wmin = NAN,Umax = NAN,Vmax = NAN,Wmax = NAN ;
+  Standard_Real Dx = NAN,Dy = NAN,Dz = NAN,Size = NAN;
 
   Standard_Integer Nstruct = myView->NumberOfDisplayedStructures() ;
 
@@ -1669,7 +1672,7 @@ void V3d_View::WindowFit (const Standard_Integer theMinXp,
   if (!aCamera->IsOrthographic())
   {
     // normalize view coordinates
-    Standard_Integer aWinWidth, aWinHeight;
+    Standard_Integer aWinWidth = 0, aWinHeight = 0;
     MyWindow->Size (aWinWidth, aWinHeight);
 
     // z coordinate of camera center
@@ -1702,7 +1705,7 @@ void V3d_View::WindowFit (const Standard_Integer theMinXp,
   }
   else
   {
-    Standard_Real aX1, aY1, aX2, aY2;
+    Standard_Real aX1 = NAN, aY1 = NAN, aX2 = NAN, aY2 = NAN;
     Convert (theMinXp, theMinYp, aX1, aY1);
     Convert (theMaxXp, theMaxYp, aX2, aY2);
     FitAll (aX1, aY1, aX2, aY2);
@@ -1768,12 +1771,12 @@ void V3d_View::ConvertToGrid(const Standard_Real theX,
 //=======================================================================
 Standard_Real V3d_View::Convert(const Standard_Integer Vp) const
 {
-  Standard_Integer aDxw, aDyw ;
+  Standard_Integer aDxw = 0, aDyw = 0 ;
 
   V3d_UnMapped_Raise_if (!myView->IsDefined(), "view has no window");
 
   MyWindow->Size (aDxw, aDyw);
-  Standard_Real aValue;
+  Standard_Real aValue = NAN;
 
   gp_Pnt aViewDims = Camera()->ViewDimensions();
   aValue = aViewDims.X() * (Standard_Real)Vp / (Standard_Real)aDxw;
@@ -1790,7 +1793,7 @@ void V3d_View::Convert(const Standard_Integer Xp,
                        Standard_Real& Xv,
                        Standard_Real& Yv) const
 {
-  Standard_Integer aDxw, aDyw;
+  Standard_Integer aDxw = 0, aDyw = 0;
 
   V3d_UnMapped_Raise_if (!myView->IsDefined(), "view has no window");
 
@@ -1811,7 +1814,7 @@ Standard_Integer V3d_View::Convert(const Standard_Real Vv) const
 {
   V3d_UnMapped_Raise_if (!myView->IsDefined(), "view has no window");
 
-  Standard_Integer aDxw, aDyw;
+  Standard_Integer aDxw = 0, aDyw = 0;
   MyWindow->Size (aDxw, aDyw);
 
   gp_Pnt aViewDims = Camera()->ViewDimensions();
@@ -1831,7 +1834,7 @@ void V3d_View::Convert(const Standard_Real Xv,
 {
   V3d_UnMapped_Raise_if (!myView->IsDefined(), "view has no window");
 
-  Standard_Integer aDxw, aDyw;
+  Standard_Integer aDxw = 0, aDyw = 0;
   MyWindow->Size (aDxw, aDyw);
 
   gp_Pnt aPoint (Xv, Yv, 0.0);
@@ -1914,7 +1917,7 @@ void V3d_View::Convert(const Standard_Real X,
                        Standard_Integer& Yp) const
 {
   V3d_UnMapped_Raise_if (!myView->IsDefined(), "view has no window");
-  Standard_Integer aHeight, aWidth;
+  Standard_Integer aHeight = 0, aWidth = 0;
   MyWindow->Size (aWidth, aHeight);
 
   gp_Pnt aPoint = Camera()->Project (gp_Pnt (X, Y, Z));
@@ -1933,7 +1936,7 @@ void V3d_View::Project (const Standard_Real theX,
                         Standard_Real& theXp,
                         Standard_Real& theYp) const
 {
-  Standard_Real aZp;
+  Standard_Real aZp = NAN;
   Project (theX, theY, theZ, theXp, theYp, aZp);
 }
 
@@ -2058,8 +2061,8 @@ Standard_Integer V3d_View::MinMax(Standard_Real& Umin,
                                   Standard_Real& Umax,
                                   Standard_Real& Vmax) const
 {
-  Standard_Real Wmin,Wmax,U,V,W ;
-  Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax ;
+  Standard_Real Wmin = NAN,Wmax = NAN,U = NAN,V = NAN,W = NAN ;
+  Standard_Real Xmin = NAN,Ymin = NAN,Zmin = NAN,Xmax = NAN,Ymax = NAN,Zmax = NAN ;
   // CAL 6/11/98
   Standard_Integer Nstruct = myView->NumberOfDisplayedStructures() ;
 
@@ -2139,7 +2142,7 @@ gp_Pnt V3d_View::GravityPoint() const
     }
   }
 
-  Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
+  Standard_Real Xmin = NAN, Ymin = NAN, Zmin = NAN, Xmax = NAN, Ymax = NAN, Zmax = NAN;
   Standard_Integer aNbPoints = 0;
   gp_XYZ aResult (0.0, 0.0, 0.0);
   for (Graphic3d_MapIteratorOfMapOfStructure aStructIter (aSetOfStructures);
@@ -2251,7 +2254,7 @@ void V3d_View::ProjReferenceAxe(const Standard_Integer Xpix,
                                 Standard_Real& VY,
                                 Standard_Real& VZ) const
 {
-  Standard_Real Xo,Yo,Zo;
+  Standard_Real Xo = NAN,Yo = NAN,Zo = NAN;
 
   Convert (Xpix, Ypix, XP, YP, ZP);
   if ( Type() == V3d_PERSPECTIVE ) 
@@ -2472,7 +2475,7 @@ gp_XYZ V3d_View::TrsPoint (const Graphic3d_Vertex& thePnt, const TColStd_Array2O
     return gp_XYZ (thePnt.X(), thePnt.Y(), thePnt.Z());
   }
 
-  Standard_Real X, Y, Z;
+  Standard_Real X = NAN, Y = NAN, Z = NAN;
   thePnt.Coord (X,Y,Z);
   const Standard_Real XX = (theMat(lr,lc+3)   + X*theMat(lr,lc)   + Y*theMat(lr,lc+1)   + Z*theMat(lr,lc+2)) / theMat(lr+3,lc+3);
   const Standard_Real YY = (theMat(lr+1,lc+3) + X*theMat(lr+1,lc) + Y*theMat(lr+1,lc+1) + Z*theMat(lr+1,lc+2))/theMat(lr+3,lc+3);
@@ -2622,7 +2625,7 @@ void V3d_View::AxialScale (const Standard_Integer Dx,
                            const V3d_TypeOfAxe Axis)
 {
   if( Dx != 0. || Dy != 0. ) {
-    Standard_Real Sx, Sy, Sz;
+    Standard_Real Sx = NAN, Sy = NAN, Sz = NAN;
     AxialScale( Sx, Sy, Sz );
     Standard_Real dscale = Sqrt(Dx*Dx + Dy*Dy) / 100. + 1;
     dscale = (Dx > 0) ?  dscale : 1./dscale;
@@ -2672,7 +2675,7 @@ void V3d_View::StartRotation(const Standard_Integer X,
                              const Standard_Real zRotationThreshold)
 {
   sx = X; sy = Y;
-  Standard_Real x,y;
+  Standard_Real x = NAN,y = NAN;
   Size(x,y);
   rx = Standard_Real(Convert(x));
   ry = Standard_Real(Convert(y));
@@ -2783,7 +2786,7 @@ void V3d_View::Init()
 Standard_Boolean V3d_View::Dump (const Standard_CString      theFile,
                                  const Graphic3d_BufferType& theBufferType)
 {
-  Standard_Integer aWinWidth, aWinHeight;
+  Standard_Integer aWinWidth = 0, aWinHeight = 0;
   MyWindow->Size (aWinWidth, aWinHeight);
   Image_AlienPixMap anImage;
 
@@ -3372,7 +3375,7 @@ void V3d_View::Move (const Standard_Real theDx,
     }
   }
 
-  Standard_Real XX, XY, XZ, YX, YY, YZ, ZX, ZY, ZZ;
+  Standard_Real XX = NAN, XY = NAN, XZ = NAN, YX = NAN, YY = NAN, YZ = NAN, ZX = NAN, ZY = NAN, ZZ = NAN;
   myXscreenAxis.Coord (XX,XY,XZ);
   myYscreenAxis.Coord (YX,YY,YZ);
   myZscreenAxis.Coord (ZX,ZY,ZZ);
@@ -3532,10 +3535,10 @@ void V3d_View::SetGrid (const gp_Ax3& aPlane, const Handle(Aspect_Grid)& aGrid)
   MyPlane      = aPlane;
   MyGrid       = aGrid;
 
-  Standard_Real xl, yl, zl;
-  Standard_Real xdx, xdy, xdz;
-  Standard_Real ydx, ydy, ydz;
-  Standard_Real dx, dy, dz;
+  Standard_Real xl = NAN, yl = NAN, zl = NAN;
+  Standard_Real xdx = NAN, xdy = NAN, xdz = NAN;
+  Standard_Real ydx = NAN, ydy = NAN, ydz = NAN;
+  Standard_Real dx = NAN, dy = NAN, dz = NAN;
   aPlane.Location ().Coord (xl, yl, zl);
   aPlane.XDirection ().Coord (xdx, xdy, xdz);
   aPlane.YDirection ().Coord (ydx, ydy, ydz);
@@ -3580,10 +3583,10 @@ void V3d_View::SetGrid (const gp_Ax3& aPlane, const Handle(Aspect_Grid)& aGrid)
   Trsf2 (2, 3) = 0.0,
   Trsf2 (3, 3) = 1.0;
 
-  Standard_Real valuetrsf;
-  Standard_Real valueoldtrsf;
-  Standard_Real valuenewtrsf;
-  Standard_Integer i, j, k;
+  Standard_Real valuetrsf = NAN;
+  Standard_Real valueoldtrsf = NAN;
+  Standard_Real valuenewtrsf = NAN;
+  Standard_Integer i = 0, j = 0, k = 0;
   // Calculation of the product of matrices
   for (i=1; i<=4; i++)
       for (j=1; j<=4; j++) {
index 22847902e993e4815eb548aa5bd8ae78b1f58868..f9e2b751fa28e5d63b117e16495ca4f2f836da42 100644 (file)
@@ -1035,8 +1035,8 @@ private:
 
 protected:
 
-  Standard_Real myOldMouseX;
-  Standard_Real myOldMouseY;
+  Standard_Real myOldMouseX{};
+  Standard_Real myOldMouseY{};
   gp_Dir myCamStartOpUp;
   gp_Dir myCamStartOpDir;
   gp_Pnt myCamStartOpEye;
@@ -1051,23 +1051,23 @@ private:
   V3d_Viewer* MyViewer;
 
   NCollection_Sequence<Handle(V3d_View)> mySubviews;
-  V3d_View* myParentView;
+  V3d_View* myParentView{};
 
   V3d_ListOfLight myActiveLights;
   gp_Dir myDefaultViewAxis;
   gp_Pnt myDefaultViewPoint;
   Handle(Aspect_Window) MyWindow;
   V3d_ListOfLight::Iterator myActiveLightsIterator;
-  Standard_Integer sx;
-  Standard_Integer sy;
-  Standard_Real rx;
-  Standard_Real ry;
+  Standard_Integer sx{};
+  Standard_Integer sy{};
+  Standard_Real rx{};
+  Standard_Real ry{};
   gp_Pnt myRotateGravity;
-  Standard_Boolean myComputedMode;
+  Standard_Boolean myComputedMode{};
   Standard_Boolean SwitchSetFront;
   Standard_Boolean myZRotation;
-  Standard_Integer MyZoomAtPointX;
-  Standard_Integer MyZoomAtPointY;
+  Standard_Integer MyZoomAtPointX{};
+  Standard_Integer MyZoomAtPointY{};
   Handle(V3d_Trihedron) myTrihedron;
   Handle(Aspect_Grid) MyGrid;
   gp_Ax3 MyPlane;
@@ -1079,8 +1079,8 @@ private:
   gp_Vec myZscreenAxis;
   gp_Dir myViewAxis;
   Graphic3d_Vertex myGravityReferencePoint;
-  Standard_Boolean myAutoZFitIsOn;
-  Standard_Real myAutoZFitScaleFactor;
+  Standard_Boolean myAutoZFitIsOn{};
+  Standard_Real myAutoZFitScaleFactor{};
 
 };
 
index 0facc261c2cde14e5004b9fe3d8614402ba7c659..75d450ed8ae414f44686d640aa39112704448d6d 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Vrml_AsciiText,Standard_Transient)
 
-Vrml_AsciiText::Vrml_AsciiText()
+Vrml_AsciiText::Vrml_AsciiText() : mySpacing(1), myJustification(Vrml_LEFT), myWidth(0)
 {
     TCollection_AsciiString tmpS("");
     myString =  new TColStd_HArray1OfAsciiString(1,1,tmpS);
 
-    mySpacing = 1;
-    myJustification = Vrml_LEFT;
-    myWidth = 0;
+    
+    
+    
 }
 
  Vrml_AsciiText::Vrml_AsciiText(const Handle(TColStd_HArray1OfAsciiString)& aString, 
                                const Standard_Real aSpacing, 
                                const Vrml_AsciiTextJustification aJustification, 
-                               const Standard_Real aWidth)
+                               const Standard_Real aWidth) : myString(aString), mySpacing(aSpacing), myJustification(aJustification), myWidth(aWidth)
 {
-    myString = aString;
-    mySpacing = aSpacing;
-    myJustification = aJustification;
-    myWidth = aWidth;
+    
+    
+    
+    
 }
 
 void Vrml_AsciiText::SetString(const  Handle(TColStd_HArray1OfAsciiString)& aString)
@@ -80,7 +80,7 @@ Standard_Real Vrml_AsciiText::Width() const
 
 Standard_OStream& Vrml_AsciiText::Print(Standard_OStream& anOStream) const 
 {
- Standard_Integer i;
+ Standard_Integer i = 0;
 
  anOStream  << "AsciiText {\n";
 
index c769d84912d15172bcf3f35a63599f35b973046f..7adcbd911295fe205d4f574ecaea7e0e04a19344 100644 (file)
 
 Vrml_Cone::Vrml_Cone(const Vrml_ConeParts aParts,
                     const Standard_Real aBottomRadius,
-                    const Standard_Real aHeight)
+                    const Standard_Real aHeight) : myParts(aParts), myBottomRadius(aBottomRadius), myHeight(aHeight)
 {
-    myParts = aParts;
-    myBottomRadius = aBottomRadius;
-    myHeight = aHeight;
+    
+    
+    
 }
 
  void Vrml_Cone::SetParts(const Vrml_ConeParts aParts) 
index 6cb9de24b2ecbccd67fc54f7335d88ddf9316e90..103a005aef369f9dbf9b6e41c2b133e8b45a4efe 100644 (file)
@@ -40,9 +40,9 @@ Vrml_ConfigurationNode::Vrml_ConfigurationNode() :
 // purpose  :
 //=======================================================================
 Vrml_ConfigurationNode::Vrml_ConfigurationNode(const Handle(Vrml_ConfigurationNode)& theNode)
-  :DE_ConfigurationNode(theNode)
+  :DE_ConfigurationNode(theNode), InternalParameters(theNode->InternalParameters)
 {
-  InternalParameters = theNode->InternalParameters;
+  
 }
 
 //=======================================================================
index 81b7661ee8b8c93443e5acf040bae333de2bdfa0..4fb0665f85b4706afa8a4bed41c30a5428b82ad8 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Vrml_Coordinate3,Standard_Transient)
 
-Vrml_Coordinate3::Vrml_Coordinate3(const Handle(TColgp_HArray1OfVec)& aPoint)
+Vrml_Coordinate3::Vrml_Coordinate3(const Handle(TColgp_HArray1OfVec)& aPoint) : myPoint(aPoint)
 {
- myPoint = aPoint;
 }
 
- Vrml_Coordinate3::Vrml_Coordinate3()
+ Vrml_Coordinate3::Vrml_Coordinate3() : myPoint(new TColgp_HArray1OfVec(1,1))
 {
  gp_Vec Tmp_Vec;
  
- myPoint = new TColgp_HArray1OfVec(1,1);
  Tmp_Vec.SetX(0); Tmp_Vec.SetY(0); Tmp_Vec.SetZ(0);
  myPoint->SetValue (1,Tmp_Vec);
 }
@@ -43,7 +43,7 @@ Handle(TColgp_HArray1OfVec) Vrml_Coordinate3::Point() const
 
 Standard_OStream& Vrml_Coordinate3::Print(Standard_OStream& anOStream) const 
 {
- Standard_Integer i;
+ Standard_Integer i = 0;
  
  anOStream  << "Coordinate3 {\n";
  
index 79988707e954e42ed238b091e975e868a4170805..6e32fbed5db85a52b8c1f037af7c6d6e0bee2665 100644 (file)
 
 Vrml_Cube::Vrml_Cube(const Standard_Real aWidth,
                     const Standard_Real aHeight,
-                    const Standard_Real aDepth)
+                    const Standard_Real aDepth) : myWidth(aWidth), myHeight(aHeight), myDepth(aDepth)
 {
-    myWidth = aWidth;
-    myHeight = aHeight;
-    myDepth = aDepth;
+    
+    
+    
 }
 
  void Vrml_Cube::SetWidth(const Standard_Real aWidth) 
index 77abdc4e48d0f0e143b9ce650959974cb12beccf..f608cbeee54616b39487ca5730746714412539e0 100644 (file)
 
 Vrml_Cylinder::Vrml_Cylinder(const Vrml_CylinderParts aParts,
                             const Standard_Real aRadius,
-                            const Standard_Real aHeight)
+                            const Standard_Real aHeight) : myParts(aParts), myRadius(aRadius), myHeight(aHeight)
 {
-    myParts = aParts;   
-    myRadius = aRadius;
-    myHeight = aHeight;
+      
+    
+    
 }
 
  void Vrml_Cylinder::SetParts(const Vrml_CylinderParts aParts) 
index decdb5e8bc76bee41feab41ede2fa5d774762b6c..ac200a2ba6edc2b1330e084e9fbefa903e93ebba 100644 (file)
@@ -26,9 +26,9 @@ Vrml_DirectionalLight::Vrml_DirectionalLight():
  Vrml_DirectionalLight::Vrml_DirectionalLight(const Standard_Boolean aOnOff, 
                                              const Standard_Real aIntensity, 
                                              const Quantity_Color& aColor, 
-                                             const gp_Vec& aDirection)
+                                             const gp_Vec& aDirection) : myOnOff(aOnOff)
 {
-  myOnOff = aOnOff;
+  
   if (aIntensity < 0. || aIntensity > 1.)
     {
       throw Standard_Failure("Error : Light intensity must be in the range 0.0 to 1.0, inclusive.");
index 48667c4380b8baf53116b8500c16ccf87eb8d7bd..bf9698dbfe0675a976ecabd60a8a2c8821ae14c7 100644 (file)
 
 Vrml_FontStyle::Vrml_FontStyle(const Standard_Real aSize,
                               const Vrml_FontStyleFamily aFamily,
-                              const Vrml_FontStyleStyle aStyle)
+                              const Vrml_FontStyleStyle aStyle) : mySize(aSize), myFamily(aFamily), myStyle(aStyle)
 {
-  mySize = aSize;
-  myFamily = aFamily;
-  myStyle = aStyle;
+  
+  
+  
 }
 
  void Vrml_FontStyle::SetSize(const Standard_Real aSize) 
index f8425cc2db5d4c9a755eedde7ccb30d463cf8f06..fb5890c0fc5c964cc079832ca0f75397b17711b9 100644 (file)
@@ -14,9 +14,9 @@
 
 #include <Vrml_Group.hxx>
 
-Vrml_Group::Vrml_Group()
+Vrml_Group::Vrml_Group() : myFlagPrint(0)
 {
-  myFlagPrint = 0;
+  
 }
 
 Standard_OStream& Vrml_Group::Print(Standard_OStream& anOStream)
index a096fa2a70ddedaa31962f5180140313baec6ac9..d2273370b1d4648fed59e301c2ed7c0c886f1095 100644 (file)
@@ -20,12 +20,12 @@ IMPLEMENT_STANDARD_RTTIEXT(Vrml_IndexedFaceSet,Standard_Transient)
 Vrml_IndexedFaceSet::Vrml_IndexedFaceSet(const Handle(TColStd_HArray1OfInteger)& aCoordIndex, 
                                          const Handle(TColStd_HArray1OfInteger)& aMaterialIndex, 
                                          const Handle(TColStd_HArray1OfInteger)& aNormalIndex, 
-                                         const Handle(TColStd_HArray1OfInteger)& aTextureCoordIndex)
+                                         const Handle(TColStd_HArray1OfInteger)& aTextureCoordIndex) : myCoordIndex(aCoordIndex), myMaterialIndex(aMaterialIndex), myNormalIndex(aNormalIndex), myTextureCoordIndex(aTextureCoordIndex)
 {
- myCoordIndex = aCoordIndex;
- myMaterialIndex = aMaterialIndex;
- myNormalIndex = aNormalIndex;
- myTextureCoordIndex = aTextureCoordIndex;
 }
 
  Vrml_IndexedFaceSet::Vrml_IndexedFaceSet()
@@ -79,7 +79,7 @@ Handle(TColStd_HArray1OfInteger) Vrml_IndexedFaceSet::TextureCoordIndex() const
 
 Standard_OStream& Vrml_IndexedFaceSet::Print(Standard_OStream& anOStream) const 
 {
- Standard_Integer i;
+ Standard_Integer i = 0;
  anOStream  << "IndexedFaceSet {\n";
 
  if ( myCoordIndex->Length() != 1 || myCoordIndex->Value(myCoordIndex->Lower())!=0 )
index 4a0dbb1927c96272ba9326a513b174af445c2385..91d94cb7b656084f2f597a0ba556f63191b112d2 100644 (file)
@@ -20,12 +20,12 @@ IMPLEMENT_STANDARD_RTTIEXT(Vrml_IndexedLineSet,Standard_Transient)
 Vrml_IndexedLineSet::Vrml_IndexedLineSet(const Handle(TColStd_HArray1OfInteger)& aCoordIndex, 
                                          const Handle(TColStd_HArray1OfInteger)& aMaterialIndex, 
                                          const Handle(TColStd_HArray1OfInteger)& aNormalIndex, 
-                                         const Handle(TColStd_HArray1OfInteger)& aTextureCoordIndex)
+                                         const Handle(TColStd_HArray1OfInteger)& aTextureCoordIndex) : myCoordIndex(aCoordIndex), myMaterialIndex(aMaterialIndex), myNormalIndex(aNormalIndex), myTextureCoordIndex(aTextureCoordIndex)
 {
- myCoordIndex = aCoordIndex;
- myMaterialIndex = aMaterialIndex;
- myNormalIndex = aNormalIndex;
- myTextureCoordIndex = aTextureCoordIndex;
 }
 
  Vrml_IndexedLineSet::Vrml_IndexedLineSet()
@@ -78,7 +78,7 @@ Handle(TColStd_HArray1OfInteger) Vrml_IndexedLineSet::TextureCoordIndex() const
 
 Standard_OStream& Vrml_IndexedLineSet::Print(Standard_OStream& anOStream) const 
 {
- Standard_Integer i;
+ Standard_Integer i = 0;
 
  anOStream  << "IndexedLineSet {" << '\n';
  
index 34f3ea2b1f528ca0d9a8651b5fa30b7216ac0b7d..b1b6d6f88a407641aa8fe6680a2498a06f4d2447 100644 (file)
@@ -14,9 +14,9 @@
 
 #include <Vrml_Info.hxx>
 
-Vrml_Info::Vrml_Info(const TCollection_AsciiString& aString)
+Vrml_Info::Vrml_Info(const TCollection_AsciiString& aString) : myString(aString)
 {
-  myString = aString;
+  
 }
 
  void Vrml_Info::SetString(const TCollection_AsciiString& aString) 
index 5ce1b311e02c74cd585bcfddd7a4e4ffc400e25c..fe760bc982c19532ca2f028061ce0bcfeced024e 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Vrml_LOD,Standard_Transient)
 
-Vrml_LOD::Vrml_LOD()
+Vrml_LOD::Vrml_LOD() : myRange(new TColStd_HArray1OfReal(1,1)), myRangeFlag(Standard_False)
 {
-  myRange = new TColStd_HArray1OfReal(1,1);
+  
   gp_Vec tmpVec(0,0,0);
   myCenter = tmpVec;
-  myRangeFlag = Standard_False;
+  
 }
 
 Vrml_LOD::Vrml_LOD(const Handle(TColStd_HArray1OfReal)& aRange,
-                  const gp_Vec& aCenter)
+                  const gp_Vec& aCenter) : myRange(aRange), myCenter(aCenter), myRangeFlag(Standard_True)
 {
-  myRange = aRange;
-  myCenter = aCenter;
-  myRangeFlag = Standard_True;
+  
+  
+  
 }
 
  void Vrml_LOD::SetRange(const Handle(TColStd_HArray1OfReal)& aRange) 
@@ -57,7 +57,7 @@ Vrml_LOD::Vrml_LOD(const Handle(TColStd_HArray1OfReal)& aRange,
 
  Standard_OStream& Vrml_LOD::Print(Standard_OStream& anOStream) const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   anOStream  << "LOD {\n";
   
   if ( myRangeFlag == Standard_True )
index 3ca8b27e0d1200b9b03e499dc5cbbb85a055ec65..f2fdf59ff8c973f0d49f5817a4ed50cb5b14c75f 100644 (file)
@@ -22,14 +22,14 @@ Vrml_Material::Vrml_Material(const Handle(Quantity_HArray1OfColor)& aAmbientColo
                              const Handle(Quantity_HArray1OfColor)& aSpecularColor, 
                              const Handle(Quantity_HArray1OfColor)& aEmissiveColor, 
                              const Handle(TColStd_HArray1OfReal)& aShininess, 
-                             const Handle(TColStd_HArray1OfReal)& aTransparency)
+                             const Handle(TColStd_HArray1OfReal)& aTransparency) : myAmbientColor(aAmbientColor), myDiffuseColor(aDiffuseColor), mySpecularColor(aSpecularColor), myEmissiveColor(aEmissiveColor)
 {
- myAmbientColor = aAmbientColor;
- myDiffuseColor = aDiffuseColor;
- mySpecularColor = aSpecularColor;
- myEmissiveColor = aEmissiveColor;
 
- Standard_Integer i;
+ Standard_Integer i = 0;
  for ( i = aShininess->Lower(); i <= aShininess->Upper(); i++ )
    {
      if (aShininess->Value(i) < 0. || aShininess->Value(i) > 1.)
@@ -102,7 +102,7 @@ Handle(Quantity_HArray1OfColor) Vrml_Material::EmissiveColor() const
 
 void Vrml_Material::SetShininess(const Handle(TColStd_HArray1OfReal)& aShininess)
 {
- Standard_Integer i;
+ Standard_Integer i = 0;
  for ( i = aShininess->Lower(); i <= aShininess->Upper(); i++ )
    {
      if (aShininess->Value(i) < 0. || aShininess->Value(i) > 1.)
@@ -120,7 +120,7 @@ Handle(TColStd_HArray1OfReal) Vrml_Material::Shininess() const
 
 void Vrml_Material::SetTransparency(const Handle(TColStd_HArray1OfReal)& aTransparency)
 {
- Standard_Integer i;
+ Standard_Integer i = 0;
  for ( i = aTransparency->Lower(); i <= aTransparency->Upper(); i++ )
    {
      if (aTransparency->Value(i) < 0. || aTransparency->Value(i) > 1.)
@@ -139,7 +139,7 @@ Handle(TColStd_HArray1OfReal) Vrml_Material::Transparency() const
 Standard_OStream& Vrml_Material::Print(Standard_OStream& anOStream) const 
 {
  NCollection_Vec3<Standard_Real> aColor_sRGB;
- Standard_Integer i;
+ Standard_Integer i = 0;
  anOStream  << "Material {\n";
 
  if ( myAmbientColor->Length() != 1 ||
index 8a3f471fb5c99ec5922f971be817438f03239348..7804855d85e5c02991f06fca5c38292b5f6cf143 100644 (file)
 
 #include <Vrml_MaterialBinding.hxx>
 
-Vrml_MaterialBinding::Vrml_MaterialBinding(const Vrml_MaterialBindingAndNormalBinding aValue)
+Vrml_MaterialBinding::Vrml_MaterialBinding(const Vrml_MaterialBindingAndNormalBinding aValue) : myValue(aValue)
 {
- myValue = aValue;
 }
 
- Vrml_MaterialBinding::Vrml_MaterialBinding()
+ Vrml_MaterialBinding::Vrml_MaterialBinding() : myValue(Vrml_DEFAULT)
 {
- myValue = Vrml_DEFAULT;
 }
 
 void Vrml_MaterialBinding::SetValue(const Vrml_MaterialBindingAndNormalBinding aValue)
index 4fcc63aba73b0ebe7346875b91b2e794f896c0d8..4f5784862939088f5bb2539c985dbf37e59f5627 100644 (file)
@@ -33,9 +33,9 @@ Vrml_MatrixTransform::Vrml_MatrixTransform()
   myMatrix = T;
 }
 
- Vrml_MatrixTransform::Vrml_MatrixTransform(const gp_Trsf& aMatrix)
+ Vrml_MatrixTransform::Vrml_MatrixTransform(const gp_Trsf& aMatrix) : myMatrix(aMatrix)
 {
-  myMatrix = aMatrix;
+  
 }
 
  void Vrml_MatrixTransform::SetMatrix(const gp_Trsf& aMatrix) 
@@ -50,7 +50,7 @@ Vrml_MatrixTransform::Vrml_MatrixTransform()
 
  Standard_OStream& Vrml_MatrixTransform::Print(Standard_OStream& anOStream) const
 {
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   anOStream  << "MatrixTransform {\n";
 
   if ( Abs(myMatrix.Value(1,1) - 1) > 0.0000001 || Abs(myMatrix.Value(2,1) - 0) > 0.0000001 || Abs(myMatrix.Value(3,1) - 0) > 0.0000001 || 
index 0f52a54fca1e6a8863884e09c523c79cdf1883bb..30d559899ccb04e1ef7abe92f492e106789546fa 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Vrml_Normal,Standard_Transient)
 
-Vrml_Normal::Vrml_Normal(const Handle(TColgp_HArray1OfVec)& aVector)
+Vrml_Normal::Vrml_Normal(const Handle(TColgp_HArray1OfVec)& aVector) : myVector(aVector)
 {
- myVector = aVector;
 }
 
- Vrml_Normal::Vrml_Normal()
+ Vrml_Normal::Vrml_Normal() : myVector(new TColgp_HArray1OfVec (1,1))
 {
  gp_Vec Tmp_Vec;
- myVector = new TColgp_HArray1OfVec (1,1);
  
  Tmp_Vec.SetX(0); Tmp_Vec.SetY(0); Tmp_Vec.SetZ(1);
  myVector->SetValue(1,Tmp_Vec);
@@ -43,7 +43,7 @@ Handle(TColgp_HArray1OfVec) Vrml_Normal::Vector() const
 
 Standard_OStream& Vrml_Normal::Print(Standard_OStream& anOStream) const 
 {
- Standard_Integer i;
+ Standard_Integer i = 0;
 
  anOStream  << "Normal {\n";
  i = myVector->Lower();
index 2f3620f6a29946b04bc1f2bd04d41ee807b88a95..68394c4c7940caf5e61122e982dc609e71b49225 100644 (file)
 
 #include <Vrml_NormalBinding.hxx>
 
-Vrml_NormalBinding::Vrml_NormalBinding(const Vrml_MaterialBindingAndNormalBinding aValue)
+Vrml_NormalBinding::Vrml_NormalBinding(const Vrml_MaterialBindingAndNormalBinding aValue) : myValue(aValue)
 {
- myValue = aValue;
 }
 
- Vrml_NormalBinding::Vrml_NormalBinding()
+ Vrml_NormalBinding::Vrml_NormalBinding() : myValue(Vrml_DEFAULT)
 {
- myValue = Vrml_DEFAULT;
 }
 
 void Vrml_NormalBinding::SetValue(const Vrml_MaterialBindingAndNormalBinding aValue)
index ae2352c997d64839a66dfe06a7fb79a3922ec4b7..a91ddcfe30af46de0e9ee16334dbdcf68bbf61f3 100644 (file)
@@ -30,12 +30,12 @@ Vrml_OrthographicCamera::Vrml_OrthographicCamera():
 Vrml_OrthographicCamera::Vrml_OrthographicCamera( const gp_Vec&          aPosition, 
                                                  const Vrml_SFRotation& aOrientation, 
                                                  const Standard_Real    aFocalDistance, 
-                                                 const Standard_Real    aHeight)
+                                                 const Standard_Real    aHeight) : myPosition(aPosition), myOrientation(aOrientation), myFocalDistance(aFocalDistance), myHeight(aHeight)
 {
-    myPosition      = aPosition;
-    myOrientation   = aOrientation;
-    myFocalDistance = aFocalDistance;
-    myHeight        = aHeight;
+    
+    
+    
+    
 }
 
 void Vrml_OrthographicCamera::SetPosition(const gp_Vec& aPosition)
index b8b82d14530002d0a1e8fd61f0e0c9d02a7aeb59..2c8ff3b08d9ac0eecf9163c60511ecbe1d28f8e7 100644 (file)
@@ -30,12 +30,12 @@ Vrml_PerspectiveCamera::Vrml_PerspectiveCamera():
 Vrml_PerspectiveCamera::Vrml_PerspectiveCamera(   const gp_Vec&          aPosition, 
                                                  const Vrml_SFRotation& aOrientation, 
                                                  const Standard_Real    aFocalDistance, 
-                                                 const Standard_Real    aHeightAngle)
+                                                 const Standard_Real    aHeightAngle) : myPosition(aPosition), myOrientation(aOrientation), myFocalDistance(aFocalDistance), myHeightAngle(aHeightAngle)
 {
-    myPosition      = aPosition;
-    myOrientation   = aOrientation;
-    myFocalDistance = aFocalDistance;
-    myHeightAngle   = aHeightAngle;
+    
+    
+    
+    
 }
 
 void Vrml_PerspectiveCamera::SetPosition(const gp_Vec& aPosition)
index cc8cab902276bcb818e70e95c27ac969ddc422b1..7af78a978899d9ddda7b1e93fe997603290e6433 100644 (file)
 #include <Vrml_PointSet.hxx>
 
 Vrml_PointSet::Vrml_PointSet(const Standard_Integer aStartIndex, 
-                             const Standard_Integer aNumPoints)
+                             const Standard_Integer aNumPoints) : myStartIndex(aStartIndex), myNumPoints(aNumPoints)
 {
- myStartIndex = aStartIndex;
- myNumPoints  = aNumPoints;
 }
 
 void Vrml_PointSet::SetStartIndex(const Standard_Integer aStartIndex)
index c6d205d6773221af0002c4698a86f2814b3e3c3a..4a3b8cc64783e425f8a1a9cef5e20ab623ec837c 100644 (file)
@@ -21,9 +21,9 @@ Vrml_Rotation::Vrml_Rotation()
   myRotation = tmpR;
 }
 
-Vrml_Rotation::Vrml_Rotation(const Vrml_SFRotation& aRotation)
+Vrml_Rotation::Vrml_Rotation(const Vrml_SFRotation& aRotation) : myRotation(aRotation)
 {
-  myRotation = aRotation;
+  
 }
 
  void Vrml_Rotation::SetRotation(const Vrml_SFRotation& aRotation) 
index 30e0432ae4fd752c1520d688432d25dea5b8da73..813d6a24fa02b10d0620088e7cce11ac5c3ace71 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Vrml_SFImage,Standard_Transient)
 
-Vrml_SFImage::Vrml_SFImage()
+Vrml_SFImage::Vrml_SFImage() : myArray(new TColStd_HArray1OfInteger(1,1)), myArrayFlag(Standard_False)
 {
-  myArray = new TColStd_HArray1OfInteger(1,1);
-  myArrayFlag = Standard_False;
+  
+  
 }
  Vrml_SFImage::Vrml_SFImage(const Standard_Integer aWidth, 
                            const Standard_Integer aHeight, 
index 604e2a9ae4e7878948be9ddd6b7b3af0528831a1..9ad7605d4b32ac99454d8a0801d2323c2cc46d60 100644 (file)
@@ -71,8 +71,8 @@ protected:
 private:
 
 
-  Standard_Integer myWidth;
-  Standard_Integer myHeight;
+  Standard_Integer myWidth{};
+  Standard_Integer myHeight{};
   Vrml_SFImageNumber myNumber;
   Handle(TColStd_HArray1OfInteger) myArray;
   Standard_Boolean myArrayFlag;
index 9d68e02fe0fdfc8823c20e8f2e8c434a3304ef83..610b6918911af16987f08652db80ce5230c960a3 100644 (file)
@@ -21,12 +21,12 @@ Vrml_SFRotation::Vrml_SFRotation()
 Vrml_SFRotation::Vrml_SFRotation( const Standard_Real aRotationX, 
                                  const Standard_Real aRotationY, 
                                  const Standard_Real aRotationZ, 
-                                 const Standard_Real anAngle )
+                                 const Standard_Real anAngle ) : myRotationX(aRotationX), myRotationY(aRotationY), myRotationZ(aRotationZ), myAngle(anAngle)
 {
-    myRotationX = aRotationX;
-    myRotationY = aRotationY;
-    myRotationZ = aRotationZ;
-    myAngle     = anAngle;
+    
+    
+    
+    
 }
 
 void Vrml_SFRotation::SetRotationX(const Standard_Real aRotationX)
index 5a2c309f42da435ed3b754d46775a4ae4d82d568..7bf4214cf7d45d0662a94e9371b765bfa9d8f9f0 100644 (file)
@@ -67,10 +67,10 @@ private:
 
 
 
-  Standard_Real myRotationX;
-  Standard_Real myRotationY;
-  Standard_Real myRotationZ;
-  Standard_Real myAngle;
+  Standard_Real myRotationX{};
+  Standard_Real myRotationY{};
+  Standard_Real myRotationZ{};
+  Standard_Real myAngle{};
 
 
 };
index bc1a495085bfbf916e2bb8f7147277e2894bc095..ba0940b028f2c2b3bccdbe7fd90365ea688a648b 100644 (file)
@@ -20,9 +20,9 @@ Vrml_Scale::Vrml_Scale()
   myScaleFactor = tmpV;
 }
 
-Vrml_Scale::Vrml_Scale(const gp_Vec& aScaleFactor)
+Vrml_Scale::Vrml_Scale(const gp_Vec& aScaleFactor) : myScaleFactor(aScaleFactor)
 {
-  myScaleFactor = aScaleFactor;
+  
 }
 
  void Vrml_Scale::SetScaleFactor(const gp_Vec& aScaleFactor) 
index 026d21159ca562d2072955485076d7ccd958b507..e92d0684667f632c3240fbbb6fee9782ad5bf47f 100644 (file)
 
 #include <Vrml_Separator.hxx>
 
-Vrml_Separator::Vrml_Separator(const Vrml_SeparatorRenderCulling aRenderCulling)
+Vrml_Separator::Vrml_Separator(const Vrml_SeparatorRenderCulling aRenderCulling) : myRenderCulling(aRenderCulling), myFlagPrint(0)
 {
-  myRenderCulling = aRenderCulling;
-  myFlagPrint = 0;
+  
+  
 }
 
- Vrml_Separator::Vrml_Separator()
+ Vrml_Separator::Vrml_Separator() : myRenderCulling(Vrml_AUTO), myFlagPrint(0)
 {
-  myRenderCulling = Vrml_AUTO;
-  myFlagPrint = 0;
+  
+  
 }
 
 void Vrml_Separator::SetRenderCulling(const Vrml_SeparatorRenderCulling aRenderCulling)
index 66db06d71ee59b05bb5cafadd296a1f18a7435bb..38685647975a376d2b2225673766cbc721d3fe2e 100644 (file)
 Vrml_ShapeHints::Vrml_ShapeHints(const Vrml_VertexOrdering aVertexOrdering, 
                                  const Vrml_ShapeType aShapeType, 
                                  const Vrml_FaceType aFaceType, 
-                                 const Standard_Real aAngle)
+                                 const Standard_Real aAngle) : myVertexOrdering(aVertexOrdering), myShapeType(aShapeType), myFaceType(aFaceType), myAngle(aAngle)
 {
- myVertexOrdering = aVertexOrdering;
- myShapeType = aShapeType;
- myFaceType = aFaceType;
- myAngle = aAngle;
 }
 
 void Vrml_ShapeHints::SetVertexOrdering(const Vrml_VertexOrdering aVertexOrdering)
index d73f4bc7b4a4a941fa280539d2a0f464a63f7253..37077ed32856af9df14d5dfb3a1e6684b764b2b0 100644 (file)
@@ -14,9 +14,9 @@
 
 #include <Vrml_Sphere.hxx>
 
-Vrml_Sphere::Vrml_Sphere(const Standard_Real aRadius)
+Vrml_Sphere::Vrml_Sphere(const Standard_Real aRadius) : myRadius(aRadius)
 {
-  myRadius = aRadius;
+  
 }
 
  void Vrml_Sphere::SetRadius(const Standard_Real aRadius) 
index 31b9b24240302e003c0a4c76732dd515c64541b9..c69ceefa6de38a5282b705b155791725225b37ad 100644 (file)
@@ -32,9 +32,9 @@ Vrml_SpotLight::Vrml_SpotLight():
                                 const gp_Vec& aLocation,
                                 const gp_Vec& aDirection,
                                 const Standard_Real aDropOffRate, 
-                                const Standard_Real aCutOffAngle) 
+                                const Standard_Real aCutOffAngle) : myOnOff(aOnOff) 
 {
-  myOnOff = aOnOff;
+  
   if (aIntensity < 0. || aIntensity > 1.)
     {
       throw Standard_Failure("Error : Light intensity must be in the range 0.0 to 1.0, inclusive.");
index 11efaea6eb68ff23fc86fdf9fb850e19619e1ae2..40feca5b72f8b9fef52cac9effa2fcb798c9beba 100644 (file)
@@ -14,9 +14,9 @@
 
 #include <Vrml_Switch.hxx>
 
-Vrml_Switch::Vrml_Switch(const Standard_Integer aWhichChild)
+Vrml_Switch::Vrml_Switch(const Standard_Integer aWhichChild) : myWhichChild(aWhichChild)
 {
-  myWhichChild = aWhichChild;
+  
 }
 
  void Vrml_Switch::SetWhichChild(const Standard_Integer aWhichChild) 
index 6f12d260e05784e0b75edf6f6315fda022dd8fc5..cb746e73cba33ed4fe66ee2a35077e12636b42ce 100644 (file)
 #include <Vrml_SFImage.hxx>
 #include <Vrml_Texture2.hxx>
 
-Vrml_Texture2::Vrml_Texture2()
+Vrml_Texture2::Vrml_Texture2() : myFilename(""), myImage(new Vrml_SFImage), myWrapS(Vrml_REPEAT), myWrapT(Vrml_REPEAT)
 {
-  myFilename = "";
+  
 
-  myImage = new Vrml_SFImage;
+  
 
   myImage->SetWidth(0);
   myImage->SetHeight(0);
   myImage->SetNumber(Vrml_NULL);
 
-  myWrapS = Vrml_REPEAT;
-  myWrapT = Vrml_REPEAT; 
+  
+  
 }
 
 Vrml_Texture2::Vrml_Texture2(const TCollection_AsciiString& aFilename,
                             const Handle(Vrml_SFImage)& aImage,
                             const Vrml_Texture2Wrap aWrapS,
-                            const Vrml_Texture2Wrap aWrapT)
+                            const Vrml_Texture2Wrap aWrapT) : myFilename(aFilename), myImage(aImage), myWrapS(aWrapS), myWrapT(aWrapT)
 {
-  myFilename = aFilename;
-  myImage = aImage;
-  myWrapS = aWrapS;
-  myWrapT = aWrapT;
+  
+  
+  
+  
 }
 
  void Vrml_Texture2::SetFilename(const TCollection_AsciiString& aFilename) 
@@ -84,7 +84,7 @@ Vrml_Texture2::Vrml_Texture2(const TCollection_AsciiString& aFilename,
 
  Standard_OStream& Vrml_Texture2::Print(Standard_OStream& anOStream) const
 {
- Standard_Integer i;
+ Standard_Integer i = 0;
  anOStream  << "Texture2 {\n";
 
  if ( !(myFilename.IsEqual("") ) )
index 95f72f4fe84f18fa7a1783d5c2b594fdbad1ec9a..8537debe96b78a40d8d743ffcaeaea47da732286 100644 (file)
 
 #include <Vrml_Texture2Transform.hxx>
 
-Vrml_Texture2Transform::Vrml_Texture2Transform()
+Vrml_Texture2Transform::Vrml_Texture2Transform() : myRotation(0)
 {
   gp_Vec2d tmpVec(0,0);
   myTranslation = tmpVec;
   myCenter = tmpVec; 
 
-  myRotation = 0;
+  
 
   tmpVec.SetCoord(1,1);
   myScaleFactor = tmpVec;
@@ -29,12 +29,12 @@ Vrml_Texture2Transform::Vrml_Texture2Transform()
 Vrml_Texture2Transform::Vrml_Texture2Transform(const gp_Vec2d& aTranslation,
                                               const Standard_Real aRotation,
                                               const gp_Vec2d& aScaleFactor,
-                                              const gp_Vec2d& aCenter)
+                                              const gp_Vec2d& aCenter) : myTranslation(aTranslation), myRotation(aRotation), myScaleFactor(aScaleFactor), myCenter(aCenter)
 {
-  myTranslation = aTranslation;
-  myRotation = aRotation;
-  myScaleFactor = aScaleFactor;
-  myCenter = aCenter; 
+  
+  
+  
+  
 }
 
  void Vrml_Texture2Transform::SetTranslation(const gp_Vec2d& aTranslation) 
index 58d5c8eec3cb75299c59e4b61a00222d0a421a59..0bfdb7ac5fa8c974943adaa7f152926a65cc025b 100644 (file)
@@ -23,9 +23,9 @@ Vrml_TextureCoordinate2::Vrml_TextureCoordinate2()
   myPoint = new TColgp_HArray1OfVec2d(1,1,tmpVec);
 }
 
-Vrml_TextureCoordinate2::Vrml_TextureCoordinate2(const Handle(TColgp_HArray1OfVec2d)& aPoint)
+Vrml_TextureCoordinate2::Vrml_TextureCoordinate2(const Handle(TColgp_HArray1OfVec2d)& aPoint) : myPoint(aPoint)
 {
-  myPoint = aPoint;
+  
 }
 
  void Vrml_TextureCoordinate2::SetPoint(const Handle(TColgp_HArray1OfVec2d)& aPoint) 
@@ -40,7 +40,7 @@ Vrml_TextureCoordinate2::Vrml_TextureCoordinate2(const Handle(TColgp_HArray1OfVe
 
  Standard_OStream& Vrml_TextureCoordinate2::Print(Standard_OStream& anOStream) const
 {
- Standard_Integer i;
+ Standard_Integer i = 0;
  anOStream  << "TextureCoordinate2 {\n";
 
  if ( myPoint->Length() != 1 || Abs(myPoint->Value(myPoint->Lower()).X() - 0) > 0.0001 || 
index 17228cbbc40035b87fb11609ccaf10f89c639546..5ad28742afdf29121fbb668f73b19120cb7885a7 100644 (file)
@@ -43,13 +43,13 @@ Vrml_Transform::Vrml_Transform(const gp_Vec& aTranslation,
                               const Vrml_SFRotation& aRotation,
                               const gp_Vec& aScaleFactor,
                               const Vrml_SFRotation& aScaleOrientation,
-                              const gp_Vec& aCenter)
+                              const gp_Vec& aCenter) : myTranslation(aTranslation), myRotation(aRotation), myScaleFactor(aScaleFactor), myScaleOrientation(aScaleOrientation), myCenter(aCenter)
 {
-  myTranslation = aTranslation;
-  myRotation = aRotation;
-  myScaleFactor = aScaleFactor;
-  myScaleOrientation = aScaleOrientation;
-  myCenter = aCenter;
+  
+  
+  
+  
+  
 }
 
  void Vrml_Transform::SetTranslation(const gp_Vec& aTranslation) 
index 794b8bf0ae28ba9d90072245f0957495102ab5f4..47d359378c390ff92fbc021c56e7d0b58e15f8a6 100644 (file)
@@ -14,9 +14,9 @@
 
 #include <Vrml_TransformSeparator.hxx>
 
-Vrml_TransformSeparator::Vrml_TransformSeparator()
+Vrml_TransformSeparator::Vrml_TransformSeparator() : myFlagPrint(0)
 {
-  myFlagPrint = 0;
+  
 }
 
 Standard_OStream& Vrml_TransformSeparator::Print(Standard_OStream& anOStream) 
index cd827353b03b7d53754c1b05346ecf0bedbd618b..49934aa193008170f437381557154855576b465c 100644 (file)
@@ -20,9 +20,9 @@ Vrml_Translation::Vrml_Translation()
   myTranslation = tmpV;
 }
 
-Vrml_Translation::Vrml_Translation(const gp_Vec& aTranslation)
+Vrml_Translation::Vrml_Translation(const gp_Vec& aTranslation) : myTranslation(aTranslation)
 {
-  myTranslation = aTranslation;
+  
 }
 
  void Vrml_Translation::SetTranslation(const gp_Vec& aTranslation) 
index cb02879477d401f3b7dd184eb5b0350d68d2acde..b760bfbb03c7f83488ee60bc60bd77ae0069142d 100644 (file)
 
 Vrml_WWWAnchor::Vrml_WWWAnchor(const TCollection_AsciiString& aName,
                               const TCollection_AsciiString& aDescription,
-                              const Vrml_WWWAnchorMap aMap)
+                              const Vrml_WWWAnchorMap aMap) : myName(aName), myDescription(aDescription), myMap(aMap)
 {
- myName = aName;
- myDescription = aDescription;
- myMap = aMap;
 }
 
  void Vrml_WWWAnchor::SetName(const TCollection_AsciiString& aName) 
index 294223dc452e639e64a196662f7b7928adc52e8a..662f3ed8e6e3005ddf937ec312f71310d72bcf09 100644 (file)
@@ -15,9 +15,9 @@
 #include <TCollection_AsciiString.hxx>
 #include <Vrml_WWWInline.hxx>
 
-Vrml_WWWInline::Vrml_WWWInline()
+Vrml_WWWInline::Vrml_WWWInline() : myName("")
 {
-  myName = "";
+  
   gp_Vec tmpVec(0,0,0);
   myBboxSize = tmpVec;
   myBboxCenter = tmpVec;
@@ -25,11 +25,11 @@ Vrml_WWWInline::Vrml_WWWInline()
 
 Vrml_WWWInline::Vrml_WWWInline(const TCollection_AsciiString& aName,
                               const gp_Vec& aBboxSize,
-                              const gp_Vec& aBboxCenter)
+                              const gp_Vec& aBboxCenter) : myName(aName), myBboxSize(aBboxSize), myBboxCenter(aBboxCenter)
 {
-  myName = aName;
-  myBboxSize = aBboxSize;
-  myBboxCenter = aBboxCenter;
+  
+  
+  
 }
 
 void Vrml_WWWInline::SetName(const TCollection_AsciiString& aName) 
index 70cc2ef969ea721d33753deea7c026cc19edce91..32888d69439f531acb98255b28f32de080e7c3f9 100644 (file)
 #include <VrmlData_Scene.hxx>
 #include <VrmlData_ShapeConvert.hxx>
 
-VrmlAPI_Writer::VrmlAPI_Writer()
+VrmlAPI_Writer::VrmlAPI_Writer() : myDrawer(new VrmlConverter_Drawer), myDeflection(-1), DX(1), DY(-1), DZ(1), XUp(0), YUp(0), ZUp(1), Focus(6)
 {
-  myDrawer = new VrmlConverter_Drawer;
-  myDeflection = -1;
+  
+  
   Handle(Quantity_HArray1OfColor) Col1 = new Quantity_HArray1OfColor (1, 1, Quantity_NOC_BLACK);
   Handle(TColStd_HArray1OfReal) kik1 = new TColStd_HArray1OfReal(1,1,0.0);
   Handle(TColStd_HArray1OfReal) kik2 = new TColStd_HArray1OfReal(1,1,0.1);
@@ -55,13 +55,13 @@ VrmlAPI_Writer::VrmlAPI_Writer()
   myWireMaterial = new Vrml_Material(Col1,Col1, Col1, Col1, kik1, kik2);
   myFreeBoundsMaterial = new Vrml_Material(Col1,Col1, Col1, Col1, kik1, kik2);
   myUnfreeBoundsMaterial = new Vrml_Material(Col1,Col1, Col1, Col1, kik1, kik2);
-  DX = 1;      
-  DY = -1;  
-  DZ = 1;
-  XUp = 0;
-  YUp = 0;
-  ZUp = 1;
-  Focus = 6;
+       
+   
+  
+  
+  
+  
+  
   ResetToDefaults();
 }
 
index 5fb66fcbc73e7463254acb8d4a54f0bd1862ed5d..8fcaa8df69f3c50d984cbf9f52f919c7f751d76e 100644 (file)
@@ -130,8 +130,8 @@ private:
   Standard_Real myDeflection;
   Handle(VrmlConverter_Projector) myPerespectiveCamera;
   Handle(VrmlConverter_Projector) myOrthographicCamera;
-  Standard_Real myTransparency;
-  Standard_Real myShininess;
+  Standard_Real myTransparency{};
+  Standard_Real myShininess{};
   Handle(Vrml_Material) myFrontMaterial;
   Handle(Vrml_Material) myPointsMaterial;
   Handle(Vrml_Material) myUisoMaterial;
index 5c1f63c978a29d62f0f625682ad271ae720e55a8..65b317c31a7e743545754134c8020ee23d1a8a85 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Vec.hxx>
@@ -81,7 +83,7 @@ static void DrawCurve (const Adaptor3d_Curve&          aCurve,
                       const Handle(VrmlConverter_Drawer)& aDrawer, // for passsing of LineAspect
                        Standard_OStream&             anOStream) 
 {
-  Standard_Integer nbintervals = 1, i;
+  Standard_Integer nbintervals = 1, i = 0;
   Handle(TColgp_HArray1OfVec) HAV1;
   Handle(TColStd_HArray1OfInteger) HAI1;
   
@@ -117,7 +119,7 @@ static void DrawCurve (const Adaptor3d_Curve&          aCurve,
   default:
     {
 
-      Standard_Real U;
+      Standard_Real U = NAN;
       Standard_Integer N = Max(2, NbP*nbintervals);
 
 //     std::cout << "nbintervals " << nbintervals << std::endl;
@@ -208,7 +210,7 @@ void VrmlConverter_Curve::Add(const Adaptor3d_Curve&                aCurve,
 
 
   Standard_Integer NbPoints = aDrawer->Discretisation();
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   Standard_Real aLimit = aDrawer->MaximalParameterValue();
   FindLimits(aCurve, aLimit, V1, V2);
 
index 6664391d787631e9a530f7bf8bd863ce20817137..ecf48e2c79f0c03ec02cda8e43bc8bf09c72bfbb 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_Curve.hxx>
 #include <Bnd_Box.hxx>
 #include <BndLib_Add3dCurve.hxx>
@@ -120,7 +122,7 @@ static void DrawCurve (Adaptor3d_Curve&          aCurve,
                       const Handle(VrmlConverter_Drawer)& aDrawer, // for passsing of LineAspect
                        Standard_OStream&             anOStream) 
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Boolean key = Standard_False;
   Handle(TColgp_HArray1OfVec) HAV1;
   Handle(TColStd_HArray1OfInteger) HAI1;
@@ -164,7 +166,7 @@ static void DrawCurve (Adaptor3d_Curve&          aCurve,
         HAI1 = new TColStd_HArray1OfInteger(1,N+2);
 
         DU = (U2-U1) / N;
-        Standard_Real U;
+        Standard_Real U = NAN;
         gp_Pnt p;
 
         for (Standard_Integer Index = 1; Index <= N+1; Index++) {
@@ -243,13 +245,13 @@ static Standard_Real GetDeflection(const Adaptor3d_Curve&        aCurve,
                                   const Standard_Real         U2, 
                                   const Handle(VrmlConverter_Drawer)& aDrawer) {
 
-  Standard_Real theRequestedDeflection;
+  Standard_Real theRequestedDeflection = NAN;
   if(aDrawer->TypeOfDeflection() == Aspect_TOD_RELATIVE)   // TOD_RELATIVE, TOD_ABSOLUTE
     {
       Bnd_Box box;
       BndLib_Add3dCurve::Add(aCurve, U1, U2, Precision::Confusion(), box);
 
-      Standard_Real  Xmin, Xmax, Ymin, Ymax, Zmin, Zmax, diagonal;
+      Standard_Real  Xmin = NAN, Xmax = NAN, Ymin = NAN, Ymax = NAN, Zmin = NAN, Zmax = NAN, diagonal = NAN;
       box.Get( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax );
       if (!(box.IsOpenXmin() || box.IsOpenXmax() ||
            box.IsOpenYmin() || box.IsOpenYmax() ||
@@ -282,7 +284,7 @@ void VrmlConverter_DeflectionCurve::Add(Standard_OStream&                   anOS
                                        const Handle(VrmlConverter_Drawer)& aDrawer)
 {
 
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   Standard_Real aLimit = aDrawer->MaximalParameterValue();
   FindLimits(aCurve, aLimit, V1, V2);
  
@@ -325,7 +327,7 @@ void VrmlConverter_DeflectionCurve::Add(Standard_OStream&    anOStream,
                                        const Standard_Real  aDeflection, 
                                        const Standard_Real  aLimit)
 {
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   FindLimits(aCurve, aLimit, V1, V2);
 
   Handle(VrmlConverter_Drawer) aDrawer = new VrmlConverter_Drawer;
@@ -347,7 +349,7 @@ void VrmlConverter_DeflectionCurve::Add(Standard_OStream&                   anOS
                                        const Handle(VrmlConverter_Drawer)& aDrawer)
 {
   Standard_Real aLimit = aDrawer->MaximalParameterValue();
-  Standard_Real V1, V2;
+  Standard_Real V1 = NAN, V2 = NAN;
   FindLimits(aCurve, aLimit, V1, V2);
 
   DrawCurve(aCurve,
@@ -388,7 +390,7 @@ void VrmlConverter_DeflectionCurve::Add(Standard_OStream& anOStream,
   Handle(TColgp_HArray1OfVec) aHAV1 = new TColgp_HArray1OfVec(1, aNbNodes);
   Handle(TColStd_HArray1OfInteger) aHAI1 = new TColStd_HArray1OfInteger(1, aNbNodes + 1);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   gp_Pnt aPoint;
   gp_Vec aVec;
   for (i = 1; i<=aNbNodes; i++)
index e83290bec9cae327191f219c2e9db50005e510b2..add3d1d3e99dc526d833852dfb7b6c0ae9d97eff 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BRepAdaptor_Curve.hxx>
 #include <BRepBndLib.hxx>
@@ -38,17 +40,17 @@ void VrmlConverter_HLRShape::Add(Standard_OStream&                          anOS
   StdPrs_HLRToolShape Tool(aShape,aProjector->Projector());
 
   Standard_Integer NbEdge = Tool.NbEdges();
-  Standard_Integer i;
-  Standard_Real U1,U2;
+  Standard_Integer i = 0;
+  Standard_Real U1 = NAN,U2 = NAN;
   BRepAdaptor_Curve TheCurve;
 
-  Standard_Real theRequestedDeflection;
+  Standard_Real theRequestedDeflection = NAN;
   if(aDrawer->TypeOfDeflection() == Aspect_TOD_RELATIVE)   // TOD_RELATIVE, TOD_ABSOLUTE
     {
       Bnd_Box box;
       BRepBndLib::AddClose(aShape, box);
       
-      Standard_Real  Xmin, Xmax, Ymin, Ymax, Zmin, Zmax, diagonal;
+      Standard_Real  Xmin = NAN, Xmax = NAN, Ymin = NAN, Ymax = NAN, Zmin = NAN, Zmax = NAN, diagonal = NAN;
       box.Get( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax );
       if (!(box.IsOpenXmin() || box.IsOpenXmax() ||
            box.IsOpenYmin() || box.IsOpenYmax() ||
index a75d34300f913f205809b543e87c2134738492e5..16b7afd233833de214ab7fccec4bd304b0622671 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(VrmlConverter_IsoAspect,VrmlConverter_LineAspect)
 
-VrmlConverter_IsoAspect::VrmlConverter_IsoAspect():VrmlConverter_LineAspect ()
+VrmlConverter_IsoAspect::VrmlConverter_IsoAspect():VrmlConverter_LineAspect (), myNumber(10)
 {
- myNumber = 10; 
 }
 
 VrmlConverter_IsoAspect::VrmlConverter_IsoAspect (const Handle(Vrml_Material)& aMaterial,
                                                     const Standard_Boolean OnOff,
                                                    const Standard_Integer aNumber) 
- :VrmlConverter_LineAspect (aMaterial, OnOff)
+ :VrmlConverter_LineAspect (aMaterial, OnOff), myNumber(aNumber)
 {
-   myNumber = aNumber;
+   
 }
 
 void VrmlConverter_IsoAspect::SetNumber (const Standard_Integer aNumber) 
index 07fb3b3dc4907d769c28207a340b3dc19a49cc01..64ecb2e95a6c93782e6e82891b4d2818a0703d88 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(VrmlConverter_LineAspect,Standard_Transient)
 
-VrmlConverter_LineAspect::VrmlConverter_LineAspect()
+VrmlConverter_LineAspect::VrmlConverter_LineAspect() : myHasMaterial(Standard_False)
 {
- myHasMaterial = Standard_False;
 }
 
 VrmlConverter_LineAspect::VrmlConverter_LineAspect (const Handle(Vrml_Material)& aMaterial,
-                                                    const Standard_Boolean OnOff)
+                                                    const Standard_Boolean OnOff) : myMaterial(aMaterial), myHasMaterial(OnOff)
 {
- myMaterial = aMaterial;
- myHasMaterial = OnOff;
 }
 
 
index bf85bdddb3c2484f749601714904237d45dd27c7..5a09d72f9b02fc9fcb840ce601f30917867665bf 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(VrmlConverter_PointAspect,Standard_Transient)
 
-VrmlConverter_PointAspect::VrmlConverter_PointAspect()
+VrmlConverter_PointAspect::VrmlConverter_PointAspect() : myHasMaterial(Standard_False)
 {
- myHasMaterial = Standard_False;
 }
 
 VrmlConverter_PointAspect::VrmlConverter_PointAspect (const Handle(Vrml_Material)& aMaterial,
-                                                      const Standard_Boolean OnOff)
+                                                      const Standard_Boolean OnOff) : myMaterial(aMaterial), myHasMaterial(OnOff)
 {
- myMaterial = aMaterial;
- myHasMaterial = OnOff;
 }
 
 
index 0db9159c5780f55c7d7706f2ba7747539430416b..4dbc246668bbf5aac31ff5605ec5f819624ead32 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BRepBndLib.hxx>
 #include <gp_Ax3.hxx>
@@ -38,17 +40,17 @@ VrmlConverter_Projector::VrmlConverter_Projector (const TopTools_Array1OfShape&
                                                  const Standard_Real YUp,
                                                  const Standard_Real ZUp, 
                                                  const VrmlConverter_TypeOfCamera Camera,
-                                                 const VrmlConverter_TypeOfLight Light)
+                                                 const VrmlConverter_TypeOfLight Light) : myTypeOfCamera(Camera), myTypeOfLight(Light)
 
 {
 
-  myTypeOfCamera = Camera;
-  myTypeOfLight = Light;
+  
+  
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Bnd_Box box;
-  Standard_Real  Xmin, Xmax, Ymin, Ymax, Zmin, Zmax, diagonal;
-  Standard_Real  Xtarget, Ytarget, Ztarget, Angle, MaxAngle, Height, MaxHeight
+  Standard_Real  Xmin = NAN, Xmax = NAN, Ymin = NAN, Ymax = NAN, Zmin = NAN, Zmax = NAN, diagonal = NAN;
+  Standard_Real  Xtarget = NAN, Ytarget = NAN, Ztarget = NAN, Angle = NAN, MaxAngle = NAN, Height = NAN, MaxHeight = NAN
 
   for ( i=Shapes.Lower(); i <= Shapes.Upper(); i++)
     {
index 414a2fb6e3d73d9b95812929ffc0d47b632fef58..b3a2194f5b01780a2fa4a18c8f44ac8a71c1553f 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <VrmlConverter_Drawer.hxx>
 #include <VrmlConverter_ShadedShape.hxx>
 #include <Vrml_Normal.hxx>
@@ -49,7 +51,7 @@ void VrmlConverter_ShadedShape::Add( Standard_OStream& anOStream,
   {
   Handle(Poly_Triangulation) T;
   TopLoc_Location theLocation;
-  Standard_Integer i, j, k, decal, nnv, EI;
+  Standard_Integer i = 0, j = 0, k = 0, decal = 0, nnv = 0, EI = 0;
   
   Standard_Integer t[3], n[3];
   gp_Pnt p;
@@ -60,7 +62,7 @@ void VrmlConverter_ShadedShape::Add( Standard_OStream& anOStream,
   
   Standard_Integer nbTriangles = 0, nbVertices = 0;
   
-  Standard_Integer nt, nnn, n1, n2, n3;
+  Standard_Integer nt = 0, nnn = 0, n1 = 0, n2 = 0, n3 = 0;
     
   // iterating on each face of the shape:
   for (ex.Init(aShape, TopAbs_FACE); ex.More(); ex.Next()) {  
@@ -357,7 +359,7 @@ void VrmlConverter_ShadedShape::ComputeNormal(const TopoDS_Face& aFace,
   const Handle(Poly_Triangulation)& T = pc.Triangulation();
   BRepAdaptor_Surface S;
   Standard_Boolean hasUV = T->HasUVNodes();
-  Standard_Integer i;
+  Standard_Integer i = 0;
   TopLoc_Location l;
   Handle(Geom_Surface) GS = BRep_Tool::Surface(aFace, l);
 
@@ -366,7 +368,7 @@ void VrmlConverter_ShadedShape::ComputeNormal(const TopoDS_Face& aFace,
     gp_Vec D1U,D1V;
     gp_Vec D2U,D2V,D2UV;
     gp_Pnt P;
-    Standard_Real U, V;
+    Standard_Real U = NAN, V = NAN;
     CSLib_DerivativeStatus aStatus;
     CSLib_NormalStatus NStat;
     S.Initialize(aFace);
index 56023e7a9a9ca9d2b7815072e0e8e22bf22ce53a..2cd990847a96e0f0b900f699a40ec902279b4c48 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(VrmlConverter_ShadingAspect,Standard_Transient)
 
-VrmlConverter_ShadingAspect::VrmlConverter_ShadingAspect()
+VrmlConverter_ShadingAspect::VrmlConverter_ShadingAspect() : myHasNormals(Standard_False), myHasMaterial(Standard_False)
 {
  Handle(Vrml_Material) m = new Vrml_Material;
  Vrml_ShapeHints sh;
  myFrontMaterial = m;
  myShapeHints = sh;
- myHasNormals = Standard_False;
- myHasMaterial = Standard_False;
 }
 void VrmlConverter_ShadingAspect::SetFrontMaterial(const Handle(Vrml_Material)& aMaterial)
 {
index bfba8b13be91155db842600a299921622e44bc5f..56507b4e68de5132500e8c8251d37c88ee4c581c 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor2d_Curve2d.hxx>
 #include <Adaptor3d_IsoCurve.hxx>
 #include <Bnd_Box.hxx>
 static Standard_Real GetDeflection(const Handle(BRepAdaptor_Surface)& aFace,
                                   const Handle (VrmlConverter_Drawer)& aDrawer) {
 
-  Standard_Real theRequestedDeflection;
+  Standard_Real theRequestedDeflection = NAN;
   if(aDrawer->TypeOfDeflection() == Aspect_TOD_RELATIVE)   // TOD_RELATIVE, TOD_ABSOLUTE
     {
       Bnd_Box box;
       BndLib_AddSurface::Add(aFace->Surface(), Precision::Confusion(), box);
 
-      Standard_Real  Xmin, Xmax, Ymin, Ymax, Zmin, Zmax, diagonal;
+      Standard_Real  Xmin = NAN, Xmax = NAN, Ymin = NAN, Ymax = NAN, Zmin = NAN, Zmax = NAN, diagonal = NAN;
       box.Get( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax );
       if (!(box.IsOpenXmin() || box.IsOpenXmax() ||
            box.IsOpenYmin() || box.IsOpenYmax() ||
@@ -84,7 +86,7 @@ void VrmlConverter_WFDeflectionRestrictedFace::Add
 {
 
   StdPrs_ToolRFace ToolRst (aFace);
-  Standard_Real UF, UL, VF, VL;
+  Standard_Real UF = NAN, UL = NAN, VF = NAN, VL = NAN;
   UF = aFace->FirstUParameter();
   UL = aFace->LastUParameter();
   VF = aFace->FirstVParameter();
@@ -93,8 +95,8 @@ void VrmlConverter_WFDeflectionRestrictedFace::Add
   Standard_Real aLimit = aDrawer->MaximalParameterValue();
 
   // compute bounds of the restriction
-  Standard_Real UMin,UMax,VMin,VMax;
-  Standard_Integer i;
+  Standard_Real UMin = NAN,UMax = NAN,VMin = NAN,VMax = NAN;
+  Standard_Integer i = 0;
 
   UMin = UF;
   UMax = UL;
@@ -138,7 +140,7 @@ void VrmlConverter_WFDeflectionRestrictedFace::Add
 
   // trim the isos
   gp_Pnt2d P1,P2;
-  Standard_Real U1, U2;
+  Standard_Real U1 = NAN, U2 = NAN;
   gp_Pnt dummypnt;
   for (ToolRst.Init(); ToolRst.More(); ToolRst.Next()) {
     TopAbs_Orientation Orient = ToolRst.Orientation();
index 7b46cc9de2558cf811999535ab29b591573b9a7a..049cf98ea915d89641313187c2f6a476a1ddb319 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Bnd_Box.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
@@ -42,13 +44,13 @@ void VrmlConverter_WFDeflectionShape::Add( Standard_OStream&                   a
 
     StdPrs_ShapeTool Tool(aShape);
 
-    Standard_Real theRequestedDeflection;
+    Standard_Real theRequestedDeflection = NAN;
     if(aDrawer->TypeOfDeflection() == Aspect_TOD_RELATIVE)   // TOD_RELATIVE, TOD_ABSOLUTE
       {
        Bnd_Box box;
        BRepBndLib::AddClose(aShape, box);
 
-       Standard_Real  Xmin, Xmax, Ymin, Ymax, Zmin, Zmax, diagonal;
+       Standard_Real  Xmin = NAN, Xmax = NAN, Ymin = NAN, Ymax = NAN, Zmin = NAN, Zmax = NAN, diagonal = NAN;
        box.Get( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax );
        if (!(box.IsOpenXmin() || box.IsOpenXmax() ||
              box.IsOpenYmin() || box.IsOpenYmax() ||
index fd23d50898fec0ca8613610bf2fbf5804f5f54d9..d279f64a332bf0f260961948de9a0784565b8f2a 100644 (file)
@@ -12,6 +12,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Adaptor3d_IsoCurve.hxx>
 #include <Bnd_Box2d.hxx>
 #include <BndLib_Add2dCurve.hxx>
@@ -44,8 +46,8 @@ void VrmlConverter_WFRestrictedFace::Add
   StdPrs_ToolRFace ToolRst (aFace);
 
   // compute bounds of the restriction
-  Standard_Real UMin,UMax,VMin,VMax;
-  Standard_Integer i;
+  Standard_Real UMin = NAN,UMax = NAN,VMin = NAN,VMax = NAN;
+  Standard_Integer i = 0;
   gp_Pnt2d P1,P2;
   Bnd_Box2d B;
   
@@ -91,7 +93,7 @@ void VrmlConverter_WFRestrictedFace::Add
   }
 
   // trim the isos
-  Standard_Real U1, U2, U, DU;
+  Standard_Real U1 = NAN, U2 = NAN, U = NAN, DU = NAN;
 
   for (ToolRst.Init(); ToolRst.More(); ToolRst.Next()) {
     TopAbs_Orientation Orient = ToolRst.Orientation();
index 2ee9766e0a24b1439ffc4d9345d29c94e0ab6fc4..400c47759b356aec7ba75b41192b642b1f6a7bba 100644 (file)
@@ -45,7 +45,7 @@ void VrmlConverter_WFShape::Add(Standard_OStream&                    anOStream,
        aDrawer->VIsoAspect()->Number() != 0 ) {
 
       BRepAdaptor_Surface S;
-      Standard_Boolean isoU, isoV;
+      Standard_Boolean isoU = 0, isoV = 0;
       for(Tool.InitFace();Tool.MoreFace();Tool.NextFace()){
        isoU = (aDrawer->UIsoAspect()->Number() != 0);
        isoV = (aDrawer->VIsoAspect()->Number() != 0);
index 3af1d8c706f6aac755ae565299a9d933380761e7..8b15668042890c0e338c0587cda017eeb6ca5157 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <VrmlData_Group.hxx>
 #include <VrmlData_Scene.hxx>
 #include <VrmlData_WorldInfo.hxx>
@@ -422,7 +424,7 @@ VrmlData_ErrorStatus VrmlData_Group::openFile
                                 (Standard_IStream&              theStream,
                                  const TCollection_AsciiString& theFilename)
 {
-  std::ifstream& aStream = static_cast<std::ifstream&> (theStream);
+  std::ifstream& aStream = dynamic_cast<std::ifstream&> (theStream);
   VrmlData_ErrorStatus aStatus (VrmlData_EmptyData);
   NCollection_List<TCollection_ExtendedString>::Iterator aDirIter =
     Scene().VrmlDirIterator();
@@ -511,7 +513,7 @@ VrmlData_ErrorStatus VrmlData_Group::Write (const char * thePrefix) const
 
         // Output the Rotation
         gp_XYZ anAxis;
-        Standard_Real anAngle;
+        Standard_Real anAngle = NAN;
         if (myTrsf.GetRotation (anAxis, anAngle)) {
           // output the Rotation
           Sprintf (buf, "rotation    %.12g %.12g %.12g %.9g",
index 3b0c346e9ada72e95a64d8635d7f9c31b0827285..aec4bde3c7de7817d2b894b4119ebe2ad9555b6a 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <VrmlData_IndexedFaceSet.hxx>
 #include <VrmlData_InBuffer.hxx>
 #include <VrmlData_UnknownNode.hxx>
@@ -49,7 +51,7 @@ IMPLEMENT_STANDARD_RTTIEXT(VrmlData_IndexedFaceSet,VrmlData_Faceted)
 VrmlData_ErrorStatus VrmlData_Faceted::readData (VrmlData_InBuffer& theBuffer)
 {
   VrmlData_ErrorStatus aStatus (VrmlData_EmptyData);
-  Standard_Boolean aBool;
+  Standard_Boolean aBool = 0;
   if        (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "ccw")) {
     if (OK(aStatus, ReadBoolean (theBuffer, aBool)))
       myIsCCW = aBool;
@@ -60,7 +62,7 @@ VrmlData_ErrorStatus VrmlData_Faceted::readData (VrmlData_InBuffer& theBuffer)
     if (OK(aStatus, ReadBoolean (theBuffer, aBool)))
       myIsSolid = aBool;
   } else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "creaseAngle")) {
-    Standard_Real anAngle;
+    Standard_Real anAngle = NAN;
     if (OK(aStatus, Scene().ReadReal (theBuffer, anAngle,
                                       Standard_False, Standard_False))) {
       if (anAngle < -Precision::Confusion()*0.001)
@@ -246,9 +248,9 @@ const Handle(TopoDS_TShape)& VrmlData_IndexedFaceSet::TShape ()
         {
           if(mapPolyId.Contains(i)) // check to avoid previously skipped faces
           {
-            const Standard_Integer * anArrNodes;
+            const Standard_Integer * anArrNodes = nullptr;
             Polygon(i, anArrNodes);
-            const Standard_Integer * arrIndice;
+            const Standard_Integer * arrIndice = nullptr;
             int nbn = IndiceNormals(i, arrIndice);
             for (Standard_Integer j = 0; j < nbn; j++)
             {
index 7f15d7a66d0af3c0630ec70ee3ade30a3db314bd..6c8c880eb055b25b7d7a94ecce17f018fffefde5 100644 (file)
@@ -58,7 +58,7 @@ const Handle(TopoDS_TShape)& VrmlData_IndexedLineSet::TShape ()
   if (myNbPolygons == 0)
     myTShape.Nullify();
   else if (myIsModified) {
-    Standard_Integer i;
+    Standard_Integer i = 0;
     BRep_Builder aBuilder;
     const gp_XYZ * arrNodes = myCoords->Values();
 
@@ -66,7 +66,7 @@ const Handle(TopoDS_TShape)& VrmlData_IndexedLineSet::TShape ()
     TopoDS_Wire aWire;
     aBuilder.MakeWire(aWire);
     for (i = 0; i < (int)myNbPolygons; i++) {
-      const Standard_Integer * arrIndice;
+      const Standard_Integer * arrIndice = nullptr;
       const Standard_Integer nNodes = Polygon(i, arrIndice);
       TColgp_Array1OfPnt   arrPoint (1, nNodes);
       TColStd_Array1OfReal arrParam (1, nNodes);
index d4a85824aaa193a16368751cc7d344e7701191ed..ab26f89d353261bdd2f390f5d13b82858d5a284a 100644 (file)
@@ -200,8 +200,8 @@ VrmlData_ErrorStatus VrmlData_Node::ReadInteger (VrmlData_InBuffer& theBuffer,
 {
   VrmlData_ErrorStatus aStatus;
   if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
-    char * endptr;
-    long aResult;
+    char * endptr = nullptr;
+    long aResult = 0;
     aResult = strtol (theBuffer.LinePtr, &endptr, 10);
     if (endptr == theBuffer.LinePtr)
       aStatus = VrmlData_NumericInputError;
@@ -443,7 +443,7 @@ VrmlData_ErrorStatus VrmlData_UnknownNode::Read (VrmlData_InBuffer& theBuffer)
   while (aLevelCounter >= 0 &&
          OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
   {
-    int aChar;
+    int aChar = 0;
     while ((aChar = theBuffer.LinePtr[0]) != '\0') {
       theBuffer.LinePtr++;
       if        (aChar == '{') {
index fed5337283ebb51dae6f7726c21f8892a3d05136..535cb6e1730366b7bad0094be8cecac89add0bcb 100644 (file)
@@ -182,7 +182,7 @@ class VrmlData_Node : public Standard_Transient
   // ---------- PRIVATE FIELDS ----------
 
   const VrmlData_Scene  * myScene; 
-  const char            * myName;       ///< name of the node
+  const char            * myName{};       ///< name of the node
 #ifdef OCCT_DEBUG
   Standard_Integer      myLineCount;
 #endif
index 1c851aab428ec64275df11cba3156b13a2da125e..2a500708e0f1fa996417ec5607aa56eb6184a74e 100644 (file)
@@ -66,13 +66,13 @@ VrmlData_Scene::VrmlData_Scene
     myStatus          (VrmlData_StatusOK),
     myAllocator       (theAlloc.IsNull() ?
                        new NCollection_IncAllocator : theAlloc.operator->()),
-    myLineError       (0),
+    myWorldInfo(new VrmlData_WorldInfo (* this)), myLineError       (0),
     myOutput          (0L),
     myIndent          (2),
     myCurrentIndent   (0),
     myAutoNameCounter (0)
 {
-  myWorldInfo = new VrmlData_WorldInfo (* this);
+  
   Standard_CString anInfo = "Generated by Open CASCADE Technology " OCC_VERSION_STRING;
   myWorldInfo->AddInfo (anInfo);
   myLstNodes.Append (myWorldInfo);
@@ -565,7 +565,7 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
    // the counter. The loop terminates when the counter becomes negative.
             while (aLevelCounter >= 0 &&
                    (aStatus = ReadLine(theBuffer)) == VrmlData_StatusOK) {
-              int aChar;
+              int aChar = 0;
               while ((aChar = theBuffer.LinePtr[0]) != '\0') {
                 theBuffer.LinePtr++;
                 if        (aChar == '[') {
@@ -714,7 +714,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadReal
   Standard_Real aResult(0.);
   VrmlData_ErrorStatus aStatus;
   if (VrmlData_Node::OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
-    char * endptr;
+    char * endptr = nullptr;
     aResult = Strtod (theBuffer.LinePtr, &endptr);
     if (endptr == theBuffer.LinePtr)
       aStatus = VrmlData_NumericInputError;
@@ -744,7 +744,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadXYZ
   for (Standard_Integer i = 0; i < 3; i++) {
     if (!VrmlData_Node::OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
       break;
-    char * endptr;
+    char * endptr = nullptr;
     aVal[i] = Strtod (theBuffer.LinePtr, &endptr);
     if (endptr == theBuffer.LinePtr) {
       aStatus = VrmlData_NumericInputError;
@@ -786,7 +786,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadXY
   for (Standard_Integer i = 0; i < 2; i++) {
     if (!VrmlData_Node::OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
       break;
-    char * endptr;
+    char * endptr = nullptr;
     aVal[i] = Strtod (theBuffer.LinePtr, &endptr);
     if (endptr == theBuffer.LinePtr) {
       aStatus = VrmlData_NumericInputError;
@@ -829,7 +829,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadArrIndex
       NCollection_Vector<const Standard_Integer *> vecIndice;
       NCollection_Vector<Standard_Integer>         vecInt;
       Standard_Boolean isMore (Standard_True);
-      long             anIntValue;
+      long             anIntValue = 0;
 
       // Loop reading integers from the stream
       while (isMore && VrmlData_Node::OK(aStatus, ReadLine(theBuffer)))
@@ -1186,7 +1186,7 @@ void dumpNode (Standard_OStream&                theStream,
   else if (theNode->IsKind(STANDARD_TYPE(VrmlData_IndexedFaceSet))) {
     const Handle(VrmlData_IndexedFaceSet) aNode =
       Handle(VrmlData_IndexedFaceSet)::DownCast(theNode);
-    const Standard_Integer ** ppDummy; 
+    const Standard_Integer ** ppDummy = nullptr
     const Standard_Size nCoord = aNode->Coordinates()->Length();
     const Standard_Size nPoly  = aNode->Polygons (ppDummy);
     char buf[80];
@@ -1197,7 +1197,7 @@ void dumpNode (Standard_OStream&                theStream,
   } else if (theNode->IsKind(STANDARD_TYPE(VrmlData_IndexedLineSet))) {
     const Handle(VrmlData_IndexedLineSet) aNode =
       Handle(VrmlData_IndexedLineSet)::DownCast(theNode);
-    const Standard_Integer ** ppDummy; 
+    const Standard_Integer ** ppDummy = nullptr
     const Standard_Size nCoord = aNode->Coordinates()->Length();
     const Standard_Size nPoly  = aNode->Polygons (ppDummy);
 
index 6411c778ded45aeee4bf1aa8f866a296e234d20a..e61bb79fbdb1c03f5fad215f26503f8b12b8b5b4 100644 (file)
@@ -246,7 +246,7 @@ void VrmlData_ShapeConvert::Convert (const Standard_Boolean theExtractFaces,
 
   Standard_Boolean Extract[2] = {theExtractFaces, theExtractEdges};
   TopAbs_ShapeEnum ShapeType[2] = {TopAbs_FACE, TopAbs_EDGE};
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   const Handle(NCollection_IncAllocator) anAlloc = new NCollection_IncAllocator;
 
@@ -321,7 +321,7 @@ Handle(VrmlData_Geometry) VrmlData_ShapeConvert::triToIndexedFaceSet
                                    const TopoDS_Face&                theFace,
                                    const Handle(VrmlData_Coordinate)& theCoord)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   const Standard_Integer nNodes         (theTri->NbNodes());
   const Standard_Integer nTriangles     (theTri->NbTriangles());
 
@@ -480,7 +480,7 @@ Handle(VrmlData_Geometry) VrmlData_ShapeConvert::triToIndexedFaceSet
 Handle(VrmlData_Geometry) VrmlData_ShapeConvert::polToIndexedLineSet
                                         (const Handle(Poly_Polygon3D)& thePol)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   const Standard_Integer    nNodes (thePol->NbNodes());
   const TColgp_Array1OfPnt& arrPolyNodes = thePol->Nodes();
   const Handle(NCollection_IncAllocator)& anAlloc = myScene.Allocator();
index fb50dceef706d300770405f203d543eceecad810..2e2885d9de8cf97f6c8bfc361c81eda93b594789 100644 (file)
@@ -91,7 +91,7 @@ class VrmlData_WorldInfo : public VrmlData_Node
  private:
   // ---------- PRIVATE FIELDS ----------
 
-  const char                    * myTitle;
+  const char                    * myTitle{};
   NCollection_List <const char *> myInfo;
 
  public:
index 357f693e660701d7b6f180179c6e6f4addcbe05a..4c84c108ebf9a1fe1d22cf4c8457b59c73050b1f 100644 (file)
@@ -21,13 +21,13 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFDimTolObjects_DatumObject,Standard_Transient)
 //purpose  : 
 //=======================================================================
 
-XCAFDimTolObjects_DatumObject::XCAFDimTolObjects_DatumObject()
+XCAFDimTolObjects_DatumObject::XCAFDimTolObjects_DatumObject() : myIsDTarget(Standard_False), myIsValidDT(Standard_False), myHasPlane(Standard_False), myHasPnt(Standard_False), myHasPntText(Standard_False)
 {
-  myIsDTarget = Standard_False;
-  myIsValidDT = Standard_False;
-  myHasPlane = Standard_False;
-  myHasPnt = Standard_False;
-  myHasPntText = Standard_False;
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -35,30 +35,30 @@ XCAFDimTolObjects_DatumObject::XCAFDimTolObjects_DatumObject()
 //purpose  : 
 //=======================================================================
 
-XCAFDimTolObjects_DatumObject::XCAFDimTolObjects_DatumObject(const Handle(XCAFDimTolObjects_DatumObject)& theObj)
+XCAFDimTolObjects_DatumObject::XCAFDimTolObjects_DatumObject(const Handle(XCAFDimTolObjects_DatumObject)& theObj) : myName(theObj->myName), myModifiers(theObj->myModifiers), myModifierWithValue(theObj->myModifierWithValue), myValueOfModifier(theObj->myValueOfModifier), myDatumTarget(theObj->myDatumTarget), myPosition(theObj->myPosition), myIsDTarget(theObj->myIsDTarget), myIsValidDT(theObj->myIsValidDT), myDTargetType(theObj->myDTargetType), myLength(theObj->myLength), myWidth(theObj->myWidth), myDatumTargetNumber(theObj->myDatumTargetNumber), myAxis(theObj->myAxis), myPlane(theObj->myPlane), myPnt(theObj->myPnt), myPntText(theObj->myPntText), myHasPlane(theObj->myHasPlane), myHasPnt(theObj->myHasPnt), myHasPntText(theObj->myHasPntText), myPresentation(theObj->myPresentation), mySemanticName(theObj->mySemanticName), myPresentationName(theObj->myPresentationName)
 {
-  myName = theObj->myName;
-  myModifiers = theObj->myModifiers;
-  myModifierWithValue = theObj->myModifierWithValue;
-  myValueOfModifier = theObj->myValueOfModifier;
-  myDatumTarget = theObj->myDatumTarget;
-  myPosition = theObj->myPosition;
-  myIsDTarget = theObj->myIsDTarget;
-  myIsValidDT = theObj->myIsValidDT;
-  myDTargetType = theObj->myDTargetType;
-  myLength = theObj->myLength;
-  myWidth = theObj->myWidth;
-  myDatumTargetNumber = theObj->myDatumTargetNumber;
-  myAxis = theObj->myAxis;
-  myPlane = theObj->myPlane;
-  myPnt= theObj->myPnt;
-  myPntText= theObj->myPntText;
-  myHasPlane = theObj->myHasPlane;
-  myHasPnt = theObj->myHasPnt;
-  myHasPntText = theObj->myHasPntText;
-  myPresentation = theObj->myPresentation;
-  mySemanticName = theObj->mySemanticName;
-  myPresentationName = theObj->myPresentationName;
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index db29b20fa105070d61057c40f96f829439f72909..1a72c6d0793323a6456f79e241613ad19f3be46b 100644 (file)
@@ -209,15 +209,15 @@ private:
   Handle(TCollection_HAsciiString) myName;
   XCAFDimTolObjects_DatumModifiersSequence myModifiers;
   XCAFDimTolObjects_DatumModifWithValue myModifierWithValue;
-  Standard_Real myValueOfModifier;
+  Standard_Real myValueOfModifier{};
   TopoDS_Shape myDatumTarget;
-  Standard_Integer myPosition;
+  Standard_Integer myPosition{};
   Standard_Boolean myIsDTarget;
   Standard_Boolean myIsValidDT;
   XCAFDimTolObjects_DatumTargetType myDTargetType;
-  Standard_Real myLength;
-  Standard_Real myWidth;
-  Standard_Integer myDatumTargetNumber;
+  Standard_Real myLength{};
+  Standard_Real myWidth{};
+  Standard_Integer myDatumTargetNumber{};
   gp_Ax2 myAxis;
   gp_Ax2 myPlane;
   gp_Pnt myPnt;
index 6724e9414151958f39d703f675b61ab99b90036d..5fd657f6ab237102cc9b78d6d88c49abe144e7ef 100644 (file)
@@ -22,12 +22,12 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFDimTolObjects_DimensionObject,Standard_Transient)
 //purpose  : 
 //=======================================================================
 
-XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject()
+XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject() : myHasPlane(Standard_False), myHasPntText(Standard_False), myHasPoint1(Standard_False), myHasPoint2(Standard_False)
 {
-  myHasPlane = Standard_False;
-  myHasPntText = Standard_False;
-  myHasPoint1 = Standard_False;
-  myHasPoint2 = Standard_False;
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -35,31 +35,31 @@ XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject()
 //purpose  : 
 //=======================================================================
 
-XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject(const Handle(XCAFDimTolObjects_DimensionObject)& theObj)
-{
-  myType = theObj->myType;
-  myVal = theObj->myVal;
-  myQualifier = theObj->myQualifier;
-  myAngularQualifier = theObj->myAngularQualifier;
-  myIsHole = theObj->myIsHole;
-  myFormVariance = theObj->myFormVariance;
-  myGrade = theObj->myGrade;
-  myL = theObj->myL;
-  myR = theObj->myR;
-  myModifiers = theObj->myModifiers;
-  myPath = theObj->myPath;
-  myDir = theObj->myDir;
-  myHasPoint1 = theObj->myHasPoint1;
-  myPnt1 = theObj->myPnt1;
-  myHasPoint2 = theObj->myHasPoint2;
-  myPnt2 = theObj->myPnt2;
-  myPntText= theObj->myPntText;
-  myHasPlane = theObj->myHasPlane;
-  myPlane = theObj->myPlane;
-  myHasPntText = theObj->myHasPntText;
-  mySemanticName = theObj->mySemanticName;
-  myPresentation = theObj->myPresentation;
-  myPresentationName = theObj->myPresentationName;
+XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject(const Handle(XCAFDimTolObjects_DimensionObject)& theObj) : myType(theObj->myType), myVal(theObj->myVal), myQualifier(theObj->myQualifier), myAngularQualifier(theObj->myAngularQualifier), myIsHole(theObj->myIsHole), myFormVariance(theObj->myFormVariance), myGrade(theObj->myGrade), myL(theObj->myL), myR(theObj->myR), myModifiers(theObj->myModifiers), myPath(theObj->myPath), myDir(theObj->myDir), myHasPoint1(theObj->myHasPoint1), myPnt1(theObj->myPnt1), myHasPoint2(theObj->myHasPoint2), myPnt2(theObj->myPnt2), myPntText(theObj->myPntText), myHasPlane(theObj->myHasPlane), myPlane(theObj->myPlane), myHasPntText(theObj->myHasPntText), mySemanticName(theObj->mySemanticName), myPresentation(theObj->myPresentation), myPresentationName(theObj->myPresentationName)
+{
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
   for (int i = 0; i < theObj->myDescriptions.Length(); i++)
   {
     myDescriptions.Append(theObj->myDescriptions(i));
index c34f6b6165a2fb543087f83cd52aaa3ca4e5b20b..d421fe627bb17f53c398506ab2779e8d997a254c 100644 (file)
@@ -311,11 +311,11 @@ private:
   Handle(TColStd_HArray1OfReal) myVal;
   XCAFDimTolObjects_DimensionQualifier myQualifier;
   XCAFDimTolObjects_AngularQualifier myAngularQualifier;
-  Standard_Boolean myIsHole;
+  Standard_Boolean myIsHole{};
   XCAFDimTolObjects_DimensionFormVariance myFormVariance;
   XCAFDimTolObjects_DimensionGrade myGrade;
-  Standard_Integer myL;
-  Standard_Integer myR;
+  Standard_Integer myL{};
+  Standard_Integer myR{};
   XCAFDimTolObjects_DimensionModifiersSequence myModifiers;
   TopoDS_Edge myPath;
   gp_Dir myDir;
index c405b343d73474bdd142ed9fb8d6a8181662e8b0..743193a50069dea781bbebb721865e67256e04af 100644 (file)
@@ -20,13 +20,13 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFDimTolObjects_GeomToleranceObject,Standard_Transi
 //purpose  : 
 //=======================================================================
 
-XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject()
+XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject() : myHasAxis(Standard_False), myHasPlane(Standard_False), myHasPnt(Standard_False), myHasPntText(Standard_False), myAffectedPlaneType(XCAFDimTolObjects_ToleranceZoneAffectedPlane_None)
 {
-  myHasAxis = Standard_False;
-  myHasPlane = Standard_False;
-  myHasPnt = Standard_False;
-  myHasPntText = Standard_False;
-  myAffectedPlaneType = XCAFDimTolObjects_ToleranceZoneAffectedPlane_None;
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
@@ -34,29 +34,29 @@ XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject()
 //purpose  : 
 //=======================================================================
 
-XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj)
+XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj) : myType(theObj->myType), myTypeOfValue(theObj->myTypeOfValue), myValue(theObj->myValue), myMatReqModif(theObj->myMatReqModif), myZoneModif(theObj->myZoneModif), myValueOfZoneModif(theObj->myValueOfZoneModif), myModifiers(theObj->myModifiers), myMaxValueModif(theObj->myMaxValueModif), myAxis(theObj->myAxis), myHasAxis(theObj->myHasAxis), myPlane(theObj->myPlane), myPnt(theObj->myPnt), myPntText(theObj->myPntText), myHasPlane(theObj->myHasPlane), myHasPnt(theObj->myHasPnt), myHasPntText(theObj->myHasPntText), mySemanticName(theObj->mySemanticName), myAffectedPlaneType(theObj->myAffectedPlaneType), myAffectedPlane(theObj->myAffectedPlane), myPresentation(theObj->myPresentation), myPresentationName(theObj->myPresentationName)
 {
-  myType = theObj->myType;
-  myTypeOfValue = theObj->myTypeOfValue;
-  myValue = theObj->myValue;
-  myMatReqModif = theObj->myMatReqModif;
-  myZoneModif = theObj->myZoneModif;
-  myValueOfZoneModif = theObj->myValueOfZoneModif;
-  myModifiers = theObj->myModifiers;
-  myMaxValueModif = theObj->myMaxValueModif;
-  myAxis = theObj->myAxis;
-  myHasAxis = theObj->myHasAxis;
-  myPlane = theObj->myPlane;
-  myPnt= theObj->myPnt;
-  myPntText= theObj->myPntText;
-  myHasPlane = theObj->myHasPlane;
-  myHasPnt = theObj->myHasPnt;
-  myHasPntText = theObj->myHasPntText;
-  mySemanticName = theObj->mySemanticName;
-  myAffectedPlaneType = theObj->myAffectedPlaneType;
-  myAffectedPlane = theObj->myAffectedPlane;
-  myPresentation = theObj->myPresentation;
-  myPresentationName = theObj->myPresentationName;
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
index 0743736c615f2fc2e73ce44ad43c668aaac7fa27..f827c52d2ca2681fca46c3ee8a128ff07ceac59d 100644 (file)
@@ -220,12 +220,12 @@ private:
 
   XCAFDimTolObjects_GeomToleranceType myType;
   XCAFDimTolObjects_GeomToleranceTypeValue myTypeOfValue;
-  Standard_Real myValue;
+  Standard_Real myValue{};
   XCAFDimTolObjects_GeomToleranceMatReqModif myMatReqModif;
   XCAFDimTolObjects_GeomToleranceZoneModif myZoneModif;
-  Standard_Real myValueOfZoneModif;
+  Standard_Real myValueOfZoneModif{};
   XCAFDimTolObjects_GeomToleranceModifiersSequence myModifiers;
-  Standard_Real myMaxValueModif;
+  Standard_Real myMaxValueModif{};
   gp_Ax2 myAxis;
   Standard_Boolean myHasAxis;
   gp_Ax2 myPlane;
index 9faf73353ccced7a74487a7a0834ea95cf8ad8c5..e4f7bdfcecea3cfa99d56ae1531d9ac11a529147 100644 (file)
@@ -517,7 +517,7 @@ TCollection_AsciiString XCAFDoc::AttributeInfo (const Handle(TDF_Attribute)& the
     }
   }
   else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_GraphNode)) ) {
-    Standard_CString type;
+    Standard_CString type = nullptr;
     if ( theAtt->ID() == XCAFDoc::LayerRefGUID() ) {
       type = "Layer Instance Link";
     }
index b344faec96f280f4389e8b65fc0b27f58ee2c3f0..bba38fe03fab72cdea12be80f88f91f7e0fe4624 100644 (file)
@@ -260,11 +260,11 @@ Standard_Integer XCAFDoc_AssemblyGraph::addNode(const TDF_Label&       theLabel,
 // =======================================================================
 
 XCAFDoc_AssemblyGraph::Iterator::Iterator(const Handle(XCAFDoc_AssemblyGraph)& theGraph,
-                                          const Standard_Integer               theNode)
+                                          const Standard_Integer               theNode) : myGraph(theGraph), myCurrentIndex(theNode)
 {
   Standard_NullObject_Raise_if(theGraph.IsNull(), "Null assembly graph!");
   Standard_NullObject_Raise_if(theNode < 1, "Node ID must be positive one-based integer!");
 
-  myGraph = theGraph;
-  myCurrentIndex = theNode;
+  
+  
 }
index e0a23ed09faa660a4fae78142a639453789a0da0..0983319233305047f2c70202511735e0f8bc8080 100644 (file)
@@ -100,7 +100,7 @@ Standard_Boolean XCAFDoc_ClippingPlaneTool::GetClippingPlane(const TDF_Label& th
 //purpose  : 
 //=======================================================================
 
-TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const
+TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const
 {
   TDF_Label aLabel;
   TDF_LabelSequence aClippingPlanes;
@@ -108,7 +108,7 @@ TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, co
   for (Standard_Integer i = 1; i <= aClippingPlanes.Length(); i++) {
     gp_Pln aPlane;
     TCollection_ExtendedString aName;
-    Standard_Boolean aCapping;
+    Standard_Boolean aCapping = 0;
     GetClippingPlane(aClippingPlanes.Value(i), aPlane, aName, aCapping);
     if (!aName.IsEqual(theName))
       continue;
@@ -149,7 +149,7 @@ TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, co
 //purpose  : 
 //=======================================================================
 
-TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const
+TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName, const Standard_Boolean theCapping) const
 {
   TDF_Label aLabel = AddClippingPlane(thePlane, theName);
   Standard_Integer aCappingVal = (theCapping) ? 1 : 0;
@@ -206,7 +206,7 @@ void XCAFDoc_ClippingPlaneTool::GetClippingPlanes(TDF_LabelSequence& theLabels)
 //=======================================================================
 
 void XCAFDoc_ClippingPlaneTool::UpdateClippingPlane(const TDF_Label& theLabel,
-  const gp_Pln& thePlane, const TCollection_ExtendedString theName) const
+  const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const
 {
   if (theLabel.Father() != Label())
     return;
index 980fec6346d55e5c7d79ed65d2037230119bdb2b..f4f37ac8507be7710d58f90cb997a5bd35d2f34c 100644 (file)
@@ -60,7 +60,7 @@ public:
   //! Adds a clipping plane definition to a ClippingPlane table and returns
   //! its label (returns existing label if the same clipping plane
   //! is already defined)
-  Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const;
+  Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName, const Standard_Boolean theCapping) const;
 
   //! Adds a clipping plane definition to a ClippingPlane table and returns
   //! its label (returns existing label if the same clipping plane
@@ -70,7 +70,7 @@ public:
   //! Adds a clipping plane definition to a ClippingPlane table and returns
   //! its label (returns existing label if the same clipping plane
   //! is already defined)
-  Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const;
+  Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const;
 
   //! Adds a clipping plane definition to a ClippingPlane table and returns
   //! its label (returns existing label if the same clipping plane
@@ -87,7 +87,7 @@ public:
   
   //! Sets new value of plane and name to the given clipping plane label
   //! or do nothing, if the given label is not a clipping plane label
-  Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln& thePlane, const TCollection_ExtendedString theName) const;
+  Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const;
 
   //! Set new value of capping for given clipping plane label
   Standard_EXPORT void SetCapping(const TDF_Label& theClippingPlaneL, const Standard_Boolean theCapping);
index 83c9d7fd16f60a0cf351c9e3219bc2888cdb27ee..9f0a4293af0c769990572769a3c0525937fe9ee9 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <XCAFDoc_Datum.hxx>
 
 #include <Standard_Type.hxx>
@@ -201,7 +203,7 @@ void XCAFDoc_Datum::SetObject(const Handle(XCAFDimTolObjects_DatumObject)& theOb
   }
 
   XCAFDimTolObjects_DatumModifWithValue aM;
-  Standard_Real aV;
+  Standard_Real aV = NAN;
   theObject->GetModifierWithValue(aM, aV);
   if(aM != XCAFDimTolObjects_DatumModifWithValue_None)
   {
index b90728458637668ffa37301ecad9fd3b7529e20c..de7d7e07ffb1c125dd131af23dc467fa612b8847 100644 (file)
@@ -78,7 +78,7 @@ protected:
 private:
 
 
-  Standard_Integer myKind;
+  Standard_Integer myKind{};
   Handle(TColStd_HArray1OfReal) myVal;
   Handle(TCollection_HAsciiString) myName;
   Handle(TCollection_HAsciiString) myDescription;
index 1ba7bdd4a297f476a733de516679529481d124dc..906c0b5e21a4514bfb99a13229034379f3651173 100644 (file)
@@ -124,7 +124,7 @@ void XCAFDoc_Dimension::SetObject (const Handle(XCAFDimTolObjects_DimensionObjec
 
   Handle(TDataStd_Integer) anAngularQualifier = TDataStd_Integer::Set(Label().FindChild(ChildLab_AngularQualifier), theObject->GetAngularQualifier());
  
-  Standard_Boolean aH;
+  Standard_Boolean aH = 0;
   XCAFDimTolObjects_DimensionFormVariance aF;
   XCAFDimTolObjects_DimensionGrade aG;
   theObject->GetClassOfTolerance(aH,aF,aG);
@@ -140,7 +140,7 @@ void XCAFDoc_Dimension::SetObject (const Handle(XCAFDimTolObjects_DimensionObjec
       aClass->ChangeArray(anArrI);
   }
 
-  Standard_Integer aL, aR;
+  Standard_Integer aL = 0, aR = 0;
   theObject->GetNbOfDecimalPlaces(aL, aR);
   if (aL > 0 || aR > 0)
   {
index efa73c447d0abdf0602c972f52bd432dcb46fc08..e681257fbb5a248852d68b2a8ee9d615860b0a1a 100644 (file)
@@ -274,7 +274,7 @@ Standard_Integer XCAFDoc_GraphNode::FatherIndex(const Handle(XCAFDoc_GraphNode)&
 
  Standard_Integer XCAFDoc_GraphNode::ChildIndex(const Handle(XCAFDoc_GraphNode)& Ch) const
 {
-  Standard_Integer Chindex;
+  Standard_Integer Chindex = 0;
   if (NbChildren() != 0)
   {
     for (Chindex = 1; Chindex <= NbChildren(); Chindex++)
@@ -418,7 +418,7 @@ Handle(TDF_Attribute) XCAFDoc_GraphNode::NewEmpty() const
 
 void XCAFDoc_GraphNode::References(const Handle(TDF_DataSet)& aDataSet) const
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Handle(XCAFDoc_GraphNode) fct;
   for ( i = 1; i <= NbChildren(); i++ ) {
     fct = myChildren(i);
index d17fd092a4e75aa463ce8bdb6bc350aa91b5e11e..6f4c260ae78db95bb0cd395defeb2798165833d6 100644 (file)
@@ -81,7 +81,7 @@ private:
 
   Handle(TCollection_HAsciiString) myName;
   Handle(TCollection_HAsciiString) myDescription;
-  Standard_Real myDensity;
+  Standard_Real myDensity{};
   Handle(TCollection_HAsciiString) myDensName;
   Handle(TCollection_HAsciiString) myDensValType;
 
index 67b7691d5728ffebc3e55fe331efbb01db169c8d..e9888882eee666e08876660e4ad42ef2d845c0c6 100644 (file)
@@ -90,9 +90,9 @@ Handle(XCAFDoc_ShapeTool) XCAFDoc_ShapeTool::Set(const TDF_Label& L)
 //purpose  : 
 //=======================================================================
 
-XCAFDoc_ShapeTool::XCAFDoc_ShapeTool()
+XCAFDoc_ShapeTool::XCAFDoc_ShapeTool() : hasSimpleShapes(Standard_False)
 {
-  hasSimpleShapes = Standard_False;
+  
 }
 
 
@@ -598,7 +598,7 @@ static Standard_Boolean prepareAssembly (const TopoDS_Shape& theShape,
     for (; Iterator.More(); Iterator.Next())
       aSubShapeSeq.Append(Iterator.Value());
     for (Standard_Integer i = 1; i <= aSubShapeSeq.Length(); i++) {
-      TopoDS_Shape Scomp = aSubShapeSeq.Value(i);
+      const TopoDS_Shape& Scomp = aSubShapeSeq.Value(i);
       TopoDS_Shape aNewScomp;
       B.Remove(theOUTShape, Scomp);
       prepareAssembly( Scomp, aNewScomp );
@@ -1199,7 +1199,7 @@ Standard_Boolean XCAFDoc_ShapeTool::AddSubShape(const TDF_Label &shapeL,
       TDF_LabelSequence aShapeLSeq;
       for (TopoDS_Iterator it(GetShape(shapeL)); it.More() && !isDefined; it.Next())
       {
-        TopoDS_Shape aShape = it.Value();
+        const TopoDS_Shape& aShape = it.Value();
         if (sub.IsSame(aShape.Located(TopLoc_Location())))
         {
           isDefined = Standard_True;
@@ -1363,7 +1363,7 @@ Standard_OStream& XCAFDoc_ShapeTool::Dump(Standard_OStream& theDumpLog, const St
   GetShapes( SeqLabels);
 
   if (SeqLabels.Length()>0) theDumpLog<<std::endl;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i=1; i<=SeqLabels.Length(); i++) {
     DumpAssembly(theDumpLog, SeqLabels.Value(i), level, deep);
   }
@@ -1463,7 +1463,7 @@ void XCAFDoc_ShapeTool::SetExternRefs(const TDF_Label& L,
   TDataStd_UAttribute::Set(ShapeLabel,XCAFDoc::ExternRefGUID());
   for(Standard_Integer i=1; i<=SHAS.Length(); i++) {
     TDF_Label tmplbl = ShapeLabel.FindChild(i,Standard_True);
-    Handle(TCollection_HAsciiString) str = SHAS(i);
+    const Handle(TCollection_HAsciiString)& str = SHAS(i);
     TCollection_ExtendedString extstr(str->String());
     TDataStd_Name::Set(tmplbl,extstr);
   }
@@ -1483,7 +1483,7 @@ TDF_Label XCAFDoc_ShapeTool::SetExternRefs(const TColStd_SequenceOfHAsciiString&
   TDataStd_UAttribute::Set(ShapeLabel,XCAFDoc::ExternRefGUID());
   for(Standard_Integer i=1; i<=SHAS.Length(); i++) {
     TDF_Label tmplbl = ShapeLabel.FindChild(i,Standard_True);
-    Handle(TCollection_HAsciiString) str = SHAS(i);
+    const Handle(TCollection_HAsciiString)& str = SHAS(i);
     TCollection_ExtendedString extstr(str->String());
     TDataStd_Name::Set(tmplbl,extstr);
   }
@@ -1557,7 +1557,7 @@ Standard_Boolean XCAFDoc_ShapeTool::SetSHUO (const TDF_LabelSequence& labels,
   if (labels.Length() < 2)
     return Standard_False;
   // check is all labels contains components of any assemblyies 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= labels.Length(); i++)
     if ( !IsComponent(labels.Value(i)) )
       return Standard_False;
@@ -1828,7 +1828,7 @@ static Standard_Boolean getUsersShapesOfSHUO (TopLoc_IndexedMapOfLocation& aPrev
   // get previous set location
   aNewPrevLocMap.Add( loc );
   aNewPrevLocMap.Add( compLoc );
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= aPrevLocMap.Extent(); i++)
     aNewPrevLocMap.Add( aPrevLocMap.FindKey(i) );
   TDF_Label L = theUserL.Father();
@@ -2056,7 +2056,7 @@ void XCAFDoc_ShapeTool::makeSubShape (const TDF_Label& theMainShapeL,
       TDF_Label aSubLabel;
       // Identical location and empty location are not the same for ShapeTool, so try to process both
       // in case of aSubLoc is not identical, the second Add try will not affect algorithm.
-      Standard_Boolean isNewSubL;
+      Standard_Boolean isNewSubL = 0;
       isNewSubL = AddSubShape(thePart, aChildShape.Located(aSubLoc, Standard_False), aSubLabel);
       if (aSubLabel.IsNull())
       {
@@ -2253,7 +2253,7 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer
 
   for (XCAFDoc_DataMapOfShapeLabel::Iterator aShapeLabelIt (myShapeLabels); aShapeLabelIt.More(); aShapeLabelIt.Next())
   {
-    const TopoDS_Shape aShape = aShapeLabelIt.Key();
+    const TopoDS_Shape& aShape = aShapeLabelIt.Key();
     OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aShape)
 
     TCollection_AsciiString aShapeLabel;
@@ -2263,7 +2263,7 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer
 
   for (XCAFDoc_DataMapOfShapeLabel::Iterator aSubShapeIt (mySubShapes); aSubShapeIt.More(); aSubShapeIt.Next())
   {
-    const TopoDS_Shape aSubShape = aSubShapeIt.Key();
+    const TopoDS_Shape& aSubShape = aSubShapeIt.Key();
     OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSubShape)
 
     TCollection_AsciiString aSubShapeLabel;
@@ -2273,7 +2273,7 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer
 
   for (XCAFDoc_DataMapOfShapeLabel::Iterator aSimpleShapeIt (mySimpleShapes); aSimpleShapeIt.More(); aSimpleShapeIt.Next())
   {
-    const TopoDS_Shape aSimpleShape = aSimpleShapeIt.Key();
+    const TopoDS_Shape& aSimpleShape = aSimpleShapeIt.Key();
     OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSimpleShape)
 
     TCollection_AsciiString aSimpleShapeLabel;
index e8906659882d9c9e247583153eae7c277c3f9b3d..9ec3fa25a4bdd412a979b7d64db0c6f980b33013 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <XCAFPrs_AISObject.hxx>
 
 #include <BRep_Builder.hxx>
@@ -42,13 +44,13 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFPrs_AISObject,AIS_ColoredShape)
 
 XCAFPrs_AISObject::XCAFPrs_AISObject (const TDF_Label& theLabel)
 : AIS_ColoredShape(TopoDS_Shape()),
-  myToSyncStyles (Standard_True)
+  myLabel(theLabel), myToSyncStyles (Standard_True)
 {
   // define plastic material by default for proper color reproduction
   setMaterial (myDrawer, Graphic3d_NameOfMaterial_Plastified, Standard_False, Standard_False);
   hasOwnMaterial = Standard_True;
 
-  myLabel = theLabel;
+  
 }
 
 //=======================================================================
@@ -72,7 +74,7 @@ static void DisplayText (const TDF_Label& aLabel,
       BRepBndLib::Add (aShape, aBox);
       if ( ! aBox.IsVoid() ) 
       {
-       Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+       Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN;
        aBox.Get (aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
        gp_Pnt aPnt (0.5 * (aXmin + aXmax), 0.5 * (aYmin + aYmax), 0.5 * (aZmin + aZmax));
        Prs3d_Text::Draw (aPrs->CurrentGroup(), anAspect, aName->Get(), aPnt);
index bc1e06f1debb9f0b7557dc0769098b57199ba0b9..f52d19a3b63b4557a6a78bd8d7751d4a282ec473 100644 (file)
@@ -21,34 +21,34 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFView_Object,Standard_Transient)
 //function : XCAFView_Object
 //purpose  : 
 //=======================================================================
-XCAFView_Object::XCAFView_Object()
+XCAFView_Object::XCAFView_Object() : myClippingExpression(new TCollection_HAsciiString()), myFrontPlaneClipping(Standard_False), myBackPlaneClipping(Standard_False), myViewVolumeSidesClipping(Standard_False), myGDTPoints(NULL)
 {
-  myClippingExpression = new TCollection_HAsciiString();
-  myFrontPlaneClipping = Standard_False;
-  myBackPlaneClipping = Standard_False;
-  myViewVolumeSidesClipping = Standard_False;
-  myGDTPoints = NULL;
+  
+  
+  
+  
+  
 }
 
 //=======================================================================
 //function : XCAFView_Object
 //purpose  : 
 //=======================================================================
-XCAFView_Object::XCAFView_Object(const Handle(XCAFView_Object)& theObj)
+XCAFView_Object::XCAFView_Object(const Handle(XCAFView_Object)& theObj) : myType(theObj->myType), myProjectionPoint(theObj->myProjectionPoint), myViewDirection(theObj->myViewDirection), myUpDirection(theObj->myUpDirection), myZoomFactor(theObj->myZoomFactor), myWindowHorizontalSize(theObj->myWindowHorizontalSize), myWindowVerticalSize(theObj->myWindowVerticalSize), myClippingExpression(theObj->myClippingExpression), myFrontPlaneClipping(theObj->myFrontPlaneClipping), myFrontPlaneDistance(theObj->myFrontPlaneDistance), myBackPlaneClipping(theObj->myBackPlaneClipping), myBackPlaneDistance(theObj->myBackPlaneDistance), myViewVolumeSidesClipping(theObj->myViewVolumeSidesClipping), myGDTPoints(NULL)
 {
-  myType = theObj->myType;
-  myProjectionPoint = theObj->myProjectionPoint;
-  myViewDirection = theObj->myViewDirection;
-  myUpDirection = theObj->myUpDirection;
-  myZoomFactor = theObj->myZoomFactor;
-  myWindowHorizontalSize = theObj->myWindowHorizontalSize;
-  myWindowVerticalSize = theObj->myWindowVerticalSize;
-  myClippingExpression = theObj->myClippingExpression;
-  myFrontPlaneClipping = theObj->myFrontPlaneClipping;
-  myFrontPlaneDistance = theObj->myFrontPlaneDistance;
-  myBackPlaneClipping = theObj->myBackPlaneClipping;
-  myBackPlaneDistance = theObj->myBackPlaneDistance;
-  myViewVolumeSidesClipping = theObj->myViewVolumeSidesClipping;
-  myGDTPoints = NULL;
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 }
 
index b80b032acfc0501f1a8d8667a7d436e90e3e632b..18bdead3693fe2690f2992be6fd949085ad5df51 100644 (file)
@@ -226,14 +226,14 @@ private:
   gp_Pnt myProjectionPoint;
   gp_Dir myViewDirection;
   gp_Dir myUpDirection;
-  Standard_Real myZoomFactor;
-  Standard_Real myWindowHorizontalSize;
-  Standard_Real myWindowVerticalSize;
+  Standard_Real myZoomFactor{};
+  Standard_Real myWindowHorizontalSize{};
+  Standard_Real myWindowVerticalSize{};
   Handle(TCollection_HAsciiString) myClippingExpression;
   Standard_Boolean myFrontPlaneClipping;
-  Standard_Real myFrontPlaneDistance;
+  Standard_Real myFrontPlaneDistance{};
   Standard_Boolean myBackPlaneClipping;
-  Standard_Real myBackPlaneDistance;
+  Standard_Real myBackPlaneDistance{};
   Standard_Boolean myViewVolumeSidesClipping;
   Handle(TColgp_HArray1OfPnt) myGDTPoints; // Point for each GDT to describe position of GDT frame in View.
 };
index 5b9cd8b79cd2fd41b3be65fb249406b8b69e0012..28f5abdb1b120edcedb7754535475b9deee5eb32 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepBuilderAPI_MakeEdge.hxx>
@@ -65,9 +67,9 @@ IMPLEMENT_STANDARD_RTTIEXT(XSAlgo_AlgoContainer,Standard_Transient)
 //function : XSAlgo_AlgoContainer
 //purpose  : 
 //=======================================================================
-XSAlgo_AlgoContainer::XSAlgo_AlgoContainer()
+XSAlgo_AlgoContainer::XSAlgo_AlgoContainer() : myTC(new XSAlgo_ToolContainer)
 {
-  myTC = new XSAlgo_ToolContainer;
+  
 }
 
 //=======================================================================
@@ -284,13 +286,13 @@ TopoDS_Shape XSAlgo_AlgoContainer::PerformFixShape(const TopoDS_Shape& S,
 // Purpose : for CheckPCurve
 // ============================================================================
 
-static TopoDS_Edge MakeEdgeOnCurve(const TopoDS_Edge edge)
+static TopoDS_Edge MakeEdgeOnCurve(const TopoDS_Edge& edge)
 {
   TopoDS_Edge result;
   //BRep_Builder B; // B not used - see below (skl)
   Handle(Geom_Curve) C3d;
   ShapeAnalysis_Edge sae;
-  Standard_Real cf, cl;
+  Standard_Real cf = NAN, cl = NAN;
   if (!sae.Curve3d (edge, C3d, cf, cl, Standard_False )) 
     return result;
   gp_Pnt PV1 = C3d->Value(cf);
@@ -314,7 +316,7 @@ Standard_Boolean XSAlgo_AlgoContainer::CheckPCurve (const TopoDS_Edge& E,
                                                    const Standard_Real preci,
                                                    const Standard_Boolean isSeam) const
 {
-  Standard_Real w1, w2;  
+  Standard_Real w1 = NAN, w2 = NAN;  
   Handle(Geom2d_Curve) thePC;
   ShapeAnalysis_Edge sae;
   if ( ! sae.PCurve (E, face, thePC, w1, w2, Standard_False ) ) {
@@ -323,7 +325,7 @@ Standard_Boolean XSAlgo_AlgoContainer::CheckPCurve (const TopoDS_Edge& E,
 
   // Check for pcurve longer than surface
   Handle(Geom_Surface) surf = BRep_Tool::Surface(face);
-  Standard_Real UF,UL,VF,VL;
+  Standard_Real UF = NAN,UL = NAN,VF = NAN,VL = NAN;
   surf->Bounds (UF,UL,VF,VL);
   gp_Pnt2d PUV1, PUV2;
   PUV1 = thePC->Value(w1);
@@ -345,7 +347,7 @@ Standard_Boolean XSAlgo_AlgoContainer::CheckPCurve (const TopoDS_Edge& E,
   //  ex. : UVV en DEGRES sur une surface en RADIANS, recalee = 57 tours !
 
   Handle(Geom_Curve) C3d;
-  Standard_Real cf1, cl1;
+  Standard_Real cf1 = NAN, cl1 = NAN;
   sae.Curve3d (E, C3d, cf1, cl1, Standard_False );
 
   gp_Pnt P1 = surf->Value(PUV1.X(), PUV1.Y());
@@ -376,7 +378,7 @@ Standard_Boolean XSAlgo_AlgoContainer::CheckPCurve (const TopoDS_Edge& E,
   BRep_Builder B;
   Handle(Geom2d_Curve) seamPC;
   if ( isSeam ) {
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     TopoDS_Shape REdge = E.Reversed() ;
     if ( ! sae.PCurve ( TopoDS::Edge ( REdge ), 
                        face, seamPC, f, l, Standard_False ) ||
@@ -422,7 +424,7 @@ Standard_Boolean XSAlgo_AlgoContainer::CheckPCurve (const TopoDS_Edge& E,
   // get corrected pcurve from the temporary edge, and put to original
   sae.PCurve ( edge, face, thePC, w1, w2, Standard_False );
   if ( isSeam ) {
-    Standard_Real f, l;
+    Standard_Real f = NAN, l = NAN;
     TopoDS_Shape REdge = edge.Reversed();
     sae.PCurve ( TopoDS::Edge ( REdge ), face, seamPC, f, l, Standard_False );
     if ( E.Orientation() == TopAbs_REVERSED ) //:abv 14.11.01: coneEl.sat loop
index 1abd723766abe73f1157e6e9560fc5248b1bccec..bdf1bf6661a43535caf2234a8ddcd03da0123538 100644 (file)
@@ -64,7 +64,7 @@ XSControl_ConnectedShapes::XSControl_ConnectedShapes ()
    const TopAbs_ShapeEnum type)
 {
   Handle(TColStd_HSequenceOfTransient) li = new TColStd_HSequenceOfTransient();
-  Standard_Integer i, nb = TP->NbMapped();
+  Standard_Integer i = 0, nb = TP->NbMapped();
 //  TopTools_MapOfShape adj (nb);
   TopTools_MapOfShape vtx(20);
 
@@ -78,7 +78,7 @@ XSControl_ConnectedShapes::XSControl_ConnectedShapes ()
     if (sh.IsNull()) continue;
     if (sh.ShapeType() != type) continue;
     for (TopExp_Explorer vsh(sh,TopAbs_VERTEX); vsh.More(); vsh.Next()) {
-      TopoDS_Shape avtx = vsh.Current();
+      const TopoDS_Shape& avtx = vsh.Current();
       if (vtx.Contains(avtx)) {
        li->Append (TP->Mapped(i));
        break;  // break de ce for interieur, entite suivante
index 08ddcf2b2213d364199790f4d4b117317c4e39bf..3b08e576ac37a52103e6ff4626f5e94d68120763 100644 (file)
@@ -457,7 +457,7 @@ void XSControl_Controller::Customise (Handle(XSControl_WorkSession)& WS)
   }
 
   // Applied Modifiers
-  Standard_Integer i, nb = myAdaptorApplied.Length();
+  Standard_Integer i = 0, nb = myAdaptorApplied.Length();
   for (i = 1; i <= nb; i ++) {
     const Handle(Standard_Transient) &anitem = myAdaptorApplied.Value(i);
     Handle(TCollection_HAsciiString) name = WS->Name(anitem);
index d161a2c06476c8a1b85b924c4aafc179b999f750..faf6d00d1e5a2117fb67e2849cad6a58399700d9 100644 (file)
@@ -90,7 +90,7 @@ static IFSelect_ReturnStatus XSControl_tpdraw
   TopoDS_Shape sh;    char nomvar[40];
   //  Standard_Boolean moderoot =  (pilot->Word(0).Value(3) == 'r');
 
-  Standard_Integer n1, n2, i, max=0, index=0;
+  Standard_Integer n1 = 0, n2 = 0, i = 0, max=0, index=0;
   Handle(Interface_InterfaceModel) model = TP->Model();
   if (model.IsNull()) {
     if (mode == 0) {
@@ -391,7 +391,7 @@ static IFSelect_ReturnStatus XSControl_fromshape
        TopoDS_Shape S0 = Shape;
        TopLoc_Location L;
        S0.Location ( L );
-       Standard_Integer i, nb = TP->NbMapped();
+       Standard_Integer i = 0, nb = TP->NbMapped();
        if ( ! silent ) sout<<"searching in map among "<<nb<<" ...";
        for (i = 1; i <= nb; i ++) {
          ent = TP->Mapped(i);
@@ -423,7 +423,7 @@ static IFSelect_ReturnStatus XSControl_fromshape
         sout<<std::endl<<"Subshapes imported from entities:";
         TopoDS_Iterator Iter(Shape);
         for (; Iter.More(); Iter.Next()) {
-          TopoDS_Shape subsh = Iter.Value();
+          const TopoDS_Shape& subsh = Iter.Value();
           Standard_Integer submodrec = 1;
           Handle(Standard_Transient) subent = TR->EntityFromShapeResult(subsh,submodrec);
           if (subent.IsNull()) {
@@ -530,7 +530,7 @@ static IFSelect_ReturnStatus XSControl_trconnexentities
 
   Handle(TColStd_HSequenceOfTransient) list =
     XSControl_ConnectedShapes::AdjacentEntities (Shape,TP,TopAbs_FACE);
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   sout<<nb<<" Entities produced Connected Shapes :"<<std::endl;
   const Handle(Interface_InterfaceModel) &model = XSControl::Session(pilot)->Model();
   sout<<"(";
@@ -758,7 +758,7 @@ Standard_Integer  XSControl_FuncShape::MoreShapes
     list->Append (li);
     return li->Length();
   }
-  Standard_Integer i, paro = 0, parf = 0, moins = 0, n1 = 0, n2 = 0;
+  Standard_Integer i = 0, paro = 0, parf = 0, moins = 0, n1 = 0, n2 = 0;
   for (i = 0; name[i] != '\0'; i ++) {
     if (name[i] == '(') paro  = i;
     if (name[i] == '-') moins = i;
@@ -819,7 +819,7 @@ Standard_Boolean  XSControl_FuncShape::FileAndVar
     resvar.AssignCat (var);
   else if (resfile.Length() == 0) resvar.AssignCat (def);
   else {
-    Standard_Integer nomdeb, nomfin;
+    Standard_Integer nomdeb = 0, nomfin = 0;
     nomdeb = resfile.SearchFromEnd ("/");
     if (nomdeb <= 0) nomdeb = resfile.SearchFromEnd("\\");  // pour NT
     if (nomdeb <  0) nomdeb = 0;
index efe8bb8e3fc82265f6fda79c39d0daaeef291d8d..4836cbb1fd931c8de45ca2d01382e35d5e50b487 100644 (file)
@@ -304,7 +304,7 @@ static IFSelect_ReturnStatus XSControl_trstat(const Handle(IFSelect_SessionPilot
     if (!TR->IsRecorded(ent)) { sout<<" Entity "<<num<<" not recorded"<<std::endl; return IFSelect_RetError; }
     Handle(Transfer_ResultFromModel) RM = TR->FinalResult(ent);
     Handle(TColStd_HSequenceOfTransient) list = TR->CheckedList(ent);
-    Standard_Integer i, nb = list->Length();
+    Standard_Integer i = 0, nb = list->Length();
     if (nb > 0) sout<<" Entities implied by Check/Result :"<<nb<<" i.e.:";
     for (i = 1; i <= nb; i ++) { sout<<"  "; mdl->Print(list->Value(i), sout); }
     sout<<std::endl;
@@ -404,7 +404,7 @@ static IFSelect_ReturnStatus XSControl_twmode(const Handle(IFSelect_SessionPilot
   //        ****    twmode         ****
   Handle(XSControl_TransferWriter) TW = XSControl::Session(pilot)->TransferWriter();
   Handle(XSControl_Controller) control = XSControl::Session(pilot)->NormAdaptor();
-  Standard_Integer modemin,modemax;
+  Standard_Integer modemin = 0,modemax = 0;
   Message_Messenger::StreamBuffer sout = Message::SendInfo();
   if (control->ModeWriteBounds (modemin,modemax)) {
     sout<<"Write Mode : allowed values  "<<modemin<<" to "<<modemax<<std::endl;
index 02107b217682ecbe7dd351887b9071b29410e6cc..2a0f93c94cb45582728798cdc73dcf102d707d2b 100644 (file)
@@ -164,7 +164,7 @@ Handle(TColStd_HSequenceOfTransient)  XSControl_Reader::GiveList
   }
 
   Handle(TColStd_HSequenceOfTransient) list = new TColStd_HSequenceOfTransient();
-  Standard_Integer i,nbr = NbRootsForTransfer();
+  Standard_Integer i = 0,nbr = NbRootsForTransfer();
   for (i = 1; i <= nbr; i ++) list->Append (RootForTransfer(i));
   return list;
 }
@@ -192,7 +192,7 @@ Standard_Integer  XSControl_Reader::NbRootsForTransfer ()
   if (therootsta) return theroots.Length();
   therootsta = Standard_True;
   Interface_ShareFlags sf (thesession->Graph());
-  Standard_Integer i, nbr = sf.NbRoots();
+  Standard_Integer i = 0, nbr = sf.NbRoots();
   for (i = 1; i <= nbr; i ++) {
     //    on filtre les racines qu on sait transferer
     Handle(Standard_Transient) start = sf.Root(i);
@@ -276,7 +276,7 @@ Standard_Integer  XSControl_Reader::TransferList
 {
   if (list.IsNull()) return 0;
   Standard_Integer nbt = 0;
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   const Handle(XSControl_TransferReader) &TR = thesession->TransferReader();
   TR->BeginTransfer();
   ClearShapes();
@@ -303,7 +303,7 @@ Standard_Integer  XSControl_Reader::TransferRoots (const Message_ProgressRange&
 {
   NbRootsForTransfer();
   Standard_Integer nbt = 0;
-  Standard_Integer i, nb = theroots.Length();
+  Standard_Integer i = 0, nb = theroots.Length();
   const Handle(XSControl_TransferReader) &TR = thesession->TransferReader();
    
   TR->BeginTransfer();
@@ -374,7 +374,7 @@ TopoDS_Shape  XSControl_Reader::Shape (const Standard_Integer num) const
 TopoDS_Shape  XSControl_Reader::OneShape () const
 {
   TopoDS_Shape sh;
-  Standard_Integer i,nb = theshapes.Length();
+  Standard_Integer i = 0,nb = theshapes.Length();
   if (nb == 0) return sh;
   if (nb == 1) return theshapes.Value(1);
   TopoDS_Compound C;
@@ -468,9 +468,8 @@ void XSControl_Reader::GetStatsTransfer (const Handle(TColStd_HSequenceOfTransie
   nbMapped = nbWithFail = nbWithResult = 0;
   
   for (itrp.Start(); itrp.More(); itrp.Next()) {
-    Handle(Transfer_Binder) binder = itrp.Value();
-    Handle(Standard_Transient) ent = itrp.Starting();
-    nbMapped++;
+    const Handle(Transfer_Binder)& binder = itrp.Value();
+       nbMapped++;
     if (binder.IsNull())  nbWithFail++;
     else
       if(!binder->HasResult()) nbWithFail++;
index 99211cd72b23322690a63da4167870e204928ba5..ead55369f849c11bd7bfdb5d33e6dba435abd22e 100644 (file)
@@ -270,7 +270,7 @@ protected:
   Standard_EXPORT TopTools_SequenceOfShape& Shapes();
 
 
-  Standard_Boolean therootsta;
+  Standard_Boolean therootsta{};
   TColStd_SequenceOfTransient theroots;
 
 
index c1cfcba78d2f58b9dcf569bd181d8f680b7d694d..4cc0dea77b3ff9bc5433add00c68cbcf7e8f6a25 100644 (file)
@@ -25,8 +25,8 @@ IMPLEMENT_STANDARD_RTTIEXT(XSControl_SelectForTransfer,IFSelect_SelectExtract)
 XSControl_SelectForTransfer::XSControl_SelectForTransfer ()    {  }
 
     XSControl_SelectForTransfer::XSControl_SelectForTransfer
-  (const Handle(XSControl_TransferReader)& TR)
-      {  theTR = TR;  }
+  (const Handle(XSControl_TransferReader)& TR) : theTR(TR)
+      {   }
 
 
     void  XSControl_SelectForTransfer::SetReader
index d1f73102bba31ea8d363f7b5fc1f4377b8cca8b5..40ec8431b2f13749561824b775465094cd577709 100644 (file)
@@ -240,7 +240,7 @@ Handle(TColStd_HSequenceOfTransient) XSControl_TransferReader::RecordedList () c
 {
   Handle(TColStd_HSequenceOfTransient) li = new TColStd_HSequenceOfTransient();
   if (myModel.IsNull())   return li;
-  Standard_Integer i, nb = myModel->NbEntities();
+  Standard_Integer i = 0, nb = myModel->NbEntities();
   for (i = 1; i <= nb; i ++) {
     if(myResults.IsBound(i))
       if(!myResults.Find(i).IsNull()) li->Append (myModel->Value(i));
@@ -450,7 +450,7 @@ Handle(Standard_Transient) XSControl_TransferReader::EntityFromResult
 
   Handle(Transfer_Binder) abinder;
   DeclareAndCast(Transfer_Binder,binder,res);
-  Standard_Integer i,j,nb;
+  Standard_Integer i = 0,j = 0,nb = 0;
 
   if (mode == 0 || mode == 1) {
     //  on regarde dans le TransientProcess (Roots ou tous Mappeds)
@@ -481,7 +481,7 @@ Handle(Standard_Transient) XSControl_TransferReader::EntityFromResult
       Handle(Transfer_ResultFromModel) rec = ResultFromNumber (i);
       if (rec.IsNull()) return nulh;
       Handle(TColStd_HSequenceOfTransient) list = rec->Results (mode-2);
-      Standard_Integer ir,nr = list->Length();
+      Standard_Integer ir = 0,nr = list->Length();
       for (ir = 1; ir <= nr; ir ++) {
         DeclareAndCast(Transfer_ResultFromTransient,rft,list->Value(ir));
         if (rft.IsNull()) continue;
@@ -509,7 +509,7 @@ Handle(Standard_Transient) XSControl_TransferReader::EntityFromShapeResult
 {
   Handle(Standard_Transient) nulh, samesh, partner;
   if (res.IsNull()) return nulh;
-  Standard_Integer i,j,nb;
+  Standard_Integer i = 0,j = 0,nb = 0;
 
   XSControl_Utils xu;
   if (mode == 0 || mode == 1 || mode == -1) {
@@ -544,7 +544,7 @@ Handle(Standard_Transient) XSControl_TransferReader::EntityFromShapeResult
       if (rec.IsNull()) continue;
       
       Handle(TColStd_HSequenceOfTransient) list = rec->Results (mode-2);
-      Standard_Integer ir,nr = list->Length();
+      Standard_Integer ir = 0,nr = list->Length();
       for (ir = 1; ir <= nr; ir ++) {
         DeclareAndCast(Transfer_ResultFromTransient,rft,list->Value(ir));
         if (rft.IsNull()) continue;
@@ -573,7 +573,7 @@ Handle(TColStd_HSequenceOfTransient) XSControl_TransferReader::EntitiesFromShape
   TopTools_MapOfShape shapes;
 
   //  On convertit res en une map, pour test de presence rapide
-  Standard_Integer i, j, nb = res->Length();
+  Standard_Integer i = 0, j = 0, nb = res->Length();
   if (nb == 0) return lt;
   for (i = 1; i <= nb; i ++)  shapes.Add (res->Value(i));
 
@@ -605,7 +605,7 @@ Handle(TColStd_HSequenceOfTransient) XSControl_TransferReader::EntitiesFromShape
       if (rec.IsNull()) continue;
       
       Handle(TColStd_HSequenceOfTransient) list = rec->Results (mode-2);
-      Standard_Integer ir,nr = list->Length();
+      Standard_Integer ir = 0,nr = list->Length();
       for (ir = 1; ir <= nr; ir ++) {
         DeclareAndCast(Transfer_ResultFromTransient,rft,list->Value(i));
         if (rft.IsNull()) continue;
@@ -635,7 +635,7 @@ Interface_CheckIterator XSControl_TransferReader::CheckList
   if (myModel.IsNull() || ent.IsNull()) return chl;
   //  Check-List COMPLETE ... tout le Modele
   if (ent == myModel) {
-    Standard_Integer i,nb = myModel->NbEntities();
+    Standard_Integer i = 0,nb = myModel->NbEntities();
     for (i = 1; i <= nb; i ++) {
       Handle(Transfer_ResultFromModel) rec = ResultFromNumber (i);
       if (!rec.IsNull()) {
@@ -647,7 +647,7 @@ Interface_CheckIterator XSControl_TransferReader::CheckList
   //  Check-List sur une LISTE ...
   else if (ent->IsKind(STANDARD_TYPE(TColStd_HSequenceOfTransient))) {
     DeclareAndCast(TColStd_HSequenceOfTransient,list,ent);
-    Standard_Integer i,nb = list->Length();
+    Standard_Integer i = 0,nb = list->Length();
     for (i = 1; i <= nb; i ++) {
       Handle(Transfer_ResultFromModel) rec = FinalResult (list->Value(i));
       if (!rec.IsNull()) {
@@ -705,14 +705,14 @@ Handle(TColStd_HSequenceOfTransient)  XSControl_TransferReader::CheckedList
   if (ent.IsNull()) return res;
 
   if (ent == myModel) {
-    Standard_Integer i,nb = myModel->NbEntities();
+    Standard_Integer i = 0,nb = myModel->NbEntities();
     for (i = 1; i <= nb; i ++) {
       Handle(Transfer_ResultFromModel) rec = ResultFromNumber (i);
       if (!rec.IsNull()) res->Append (rec->CheckedList(withcheck,level));
     }
   } else if (ent->IsKind(STANDARD_TYPE(TColStd_HSequenceOfTransient))) {
     DeclareAndCast(TColStd_HSequenceOfTransient,list,ent);
-    Standard_Integer i,nb = list->Length();
+    Standard_Integer i = 0,nb = list->Length();
     for (i = 1; i <= nb; i ++) {
       Handle(Transfer_ResultFromModel) rec = FinalResult (list->Value(i));
       if (!rec.IsNull()) res->Append (rec->CheckedList(withcheck,level));
@@ -808,7 +808,7 @@ Standard_Integer XSControl_TransferReader::TransferOne
 
   //  seule difference entre TransferRoots et TransferOne
   Standard_Integer res = 0;
-  Handle(Standard_Transient) obj = ent;
+  const Handle(Standard_Transient)& obj = ent;
   TP.Transfer (obj, theProgress);
   if (theProgress.UserBreak())
     return res;
@@ -846,7 +846,7 @@ Standard_Integer XSControl_TransferReader::TransferList
   if (myGraph.IsNull()) myTP->SetModel(myModel);
   else                  myTP->SetGraph(myGraph);
 
-  Standard_Integer i,nb = list->Length();
+  Standard_Integer i = 0,nb = list->Length();
 
   //   Pour le log-file
   if (level > 0) {
@@ -925,7 +925,7 @@ Standard_Integer XSControl_TransferReader::TransferRoots(const Interface_Graph&
     return -1;
 
   //  Les entites transferees sont notees "asmain"
-  Standard_Integer i,n = myTP->NbMapped();
+  Standard_Integer i = 0,n = myTP->NbMapped();
   for (i = 1; i <= n; i ++) {
     Handle(Standard_Transient) ent = myTP->Mapped(i);
     Handle(Transfer_Binder)    bnd = myTP->MapItem(i);
@@ -980,7 +980,7 @@ void XSControl_TransferReader::PrintStats (Standard_OStream& sout,
   sout << "******        Final Results                                  ******"<<std::endl;
   if (myModel.IsNull())  {  sout<<"****    Model unknown"<<std::endl;  return;  }
   Handle(TColStd_HSequenceOfTransient) list = RecordedList();
-  Standard_Integer i, nb = list->Length();
+  Standard_Integer i = 0, nb = list->Length();
   Handle(IFSelect_SignatureList) counter;
   if (mode > 2) counter = new IFSelect_SignatureList (mode == 6);
   IFSelect_PrintCount pcm = IFSelect_CountByItem;
@@ -1032,7 +1032,7 @@ Handle(TColStd_HSequenceOfTransient) XSControl_TransferReader::LastTransferList
 {
   Handle(TColStd_HSequenceOfTransient) li = new TColStd_HSequenceOfTransient();
   if (myTP.IsNull()) return li;
-  Standard_Integer i,j,nb =
+  Standard_Integer i = 0,j = 0,nb =
     (roots ? myTP->NbRoots() : myTP->NbMapped());
   for (j = 1; j <= nb; j ++) {
     i = (roots ? myModel->Number (myTP->Root(j)) : j);
@@ -1061,7 +1061,7 @@ const Handle(TopTools_HSequenceOfShape) & XSControl_TransferReader::ShapeResultL
     if (myModel.IsNull()) return myShapeResult;
     Handle(TColStd_HSequenceOfTransient) li = RecordedList();
     myShapeResult = new TopTools_HSequenceOfShape();
-    Standard_Integer i, nb = myModel->NbEntities();
+    Standard_Integer i = 0, nb = myModel->NbEntities();
     TopoDS_Shape sh;
     for (i = 1; i <= nb; i ++) {
       sh = ShapeResult (myModel->Value(i));
@@ -1175,7 +1175,7 @@ void XSControl_TransferReader::PrintStatsOnList(const Handle(Transfer_TransientP
   Handle(Interface_InterfaceModel) model = TP->Model();
   if (what >= 1 && what <= 3) {
 
-    Standard_Integer stat;
+    Standard_Integer stat = 0;
     Standard_Integer nbv = 0, nbw = 0, nbf = 0, nbr = 0, nbrw = 0, nbrf = 0, nbnr = 0, nbi = 0;
     Transfer_IteratorOfProcessForTransient itrp(Standard_True);
     if (what == 1) itrp = TP->RootResult(Standard_True);
@@ -1197,8 +1197,8 @@ void XSControl_TransferReader::PrintStatsOnList(const Handle(Transfer_TransientP
 
     for (itrp.Start(); itrp.More(); itrp.Next()) {
       nbi ++;
-      Handle(Transfer_Binder) binder = itrp.Value();
-      Handle(Standard_Transient) ent = itrp.Starting();
+      const Handle(Transfer_Binder)& binder = itrp.Value();
+      const Handle(Standard_Transient)& ent = itrp.Starting();
       if (binder.IsNull())  {
        nbnr ++;
        if (notrec) counter->Add(ent,"(not recorded)");
@@ -1231,7 +1231,7 @@ void XSControl_TransferReader::PrintStatsOnList(const Handle(Transfer_TransientP
        if (mode == 1) continue;
 
        const Handle(Interface_Check)& ch = binder->Check();
-       Standard_Integer newi,newnbw = ch->NbWarnings(), newnbf = ch->NbFails();
+       Standard_Integer newi = 0,newnbw = ch->NbWarnings(), newnbf = ch->NbFails();
 
        if (newnbw > 0) {
          sout<<" - Warnings : "<<newnbw<<":\n";
index ec6871d8f7e809bc1a71ecf00b3bac24e069068e..a1ec9fd28b484591cfbb1aeb8b309513b3a96e87 100644 (file)
@@ -182,7 +182,7 @@ Interface_CheckIterator XSControl_TransferWriter::CheckList () const
 {
   Interface_CheckIterator  chl;
   if (myTransferWriter.IsNull()) return chl;
-  Standard_Integer i, nb = myTransferWriter->NbMapped();
+  Standard_Integer i = 0, nb = myTransferWriter->NbMapped();
   for (i = 1; i <= nb; i ++) {
     DeclareAndCast(Transfer_SimpleBinderOfTransient,tb,myTransferWriter->MapItem(i));
     if (tb.IsNull()) continue;
@@ -206,7 +206,7 @@ Interface_CheckIterator XSControl_TransferWriter::ResultCheckList
 {
   Interface_CheckIterator  chl;
   if (myTransferWriter.IsNull()) return chl;
-  Standard_Integer i, nb = myTransferWriter->NbMapped();
+  Standard_Integer i = 0, nb = myTransferWriter->NbMapped();
   for (i = 1; i <= nb; i ++) {
     DeclareAndCast(Transfer_SimpleBinderOfTransient,tb,myTransferWriter->MapItem(i));
     if (tb.IsNull()) continue;
index 2df8058d79b76a480930a8aa18e0461f7d7ca265..ed8dd2dc383460a30e16b72cde20d793659a6262 100644 (file)
@@ -60,7 +60,7 @@ static const Standard_ExtString   voidext = { 0 };
     void  XSControl_Utils::TraceLines (const Handle(Standard_Transient)& lines) const
 {
   Message_Messenger::StreamBuffer sout = Message::SendInfo();
-  Standard_Integer i,nb;
+  Standard_Integer i = 0,nb = 0;
   DeclareAndCast(TColStd_HSequenceOfHAsciiString,linha,lines);
   if (!linha.IsNull()) {
     nb = linha->Length();
@@ -229,7 +229,7 @@ static const Standard_ExtString   voidext = { 0 };
     Standard_CString  XSControl_Utils::ExtendedToAscii (const Standard_ExtString str) const
 {
   bufext.Clear();  bufext.AssignCat (str);  bufasc.Clear();
-  Standard_Integer i, nb = bufext.Length();
+  Standard_Integer i = 0, nb = bufext.Length();
   for (i = 1; i <= nb; i ++) {
     int unext = bufext.Value(i);
     unext = unext & 127;
@@ -340,7 +340,7 @@ static const Standard_ExtString   voidext = { 0 };
   BRep_Builder B;
   TopoDS_Compound C;
   B.MakeCompound(C);
-  Standard_Integer i,n = seqval->Length();
+  Standard_Integer i = 0,n = seqval->Length();
   for (i = 1; i <= n ; i ++)  B.Add(C,seqval->Value(i));
   return C;
 }
@@ -353,7 +353,7 @@ static const Standard_ExtString   voidext = { 0 };
   if (!compound || res != TopAbs_COMPOUND) return res;
   res = TopAbs_SHAPE;
   for (TopoDS_Iterator iter(shape); iter.More(); iter.Next()) {
-    TopoDS_Shape sh = iter.Value();
+    const TopoDS_Shape& sh = iter.Value();
     if (sh.IsNull()) continue;
     TopAbs_ShapeEnum typ = sh.ShapeType();
     if (typ == TopAbs_COMPOUND) typ = ShapeType (sh,compound);
@@ -522,7 +522,7 @@ static const Standard_ExtString   voidext = { 0 };
     Handle(Standard_Transient)  XSControl_Utils::SeqToArr
   (const Handle(Standard_Transient)& seqval, const Standard_Integer first) const
 {
-  Standard_Integer i,lng;
+  Standard_Integer i = 0,lng = 0;
   Handle(Standard_Transient) val;
   if (seqval.IsNull()) return val;
   DeclareAndCast(TColStd_HSequenceOfHAsciiString,seqs,seqval);
@@ -548,7 +548,7 @@ static const Standard_ExtString   voidext = { 0 };
     Handle(Standard_Transient)  XSControl_Utils::ArrToSeq
   (const Handle(Standard_Transient)& arrval) const
 {
-  Standard_Integer i,first,last;
+  Standard_Integer i = 0,first = 0,last = 0;
   Handle(Standard_Transient) val;
   if (arrval.IsNull()) return val;
   DeclareAndCast(Interface_HArray1OfHAsciiString,arrs,arrval);
index 07ff5ce3ebc35cbe38b929c942ba8836ae8ecf4f..f27664bda4c05c024b2a816cab52c718bf03400c 100644 (file)
@@ -250,7 +250,7 @@ Standard_Boolean  XSControl_WorkSession::PrintTransferStatus(const Standard_Inte
 //   ***   CHECK (commun READ+WRITE)   ***
   if (!binder.IsNull()) {
     const Handle(Interface_Check) ch = binder->Check();
-    Standard_Integer i,nbw = ch->NbWarnings(), nbf = ch->NbFails();
+    Standard_Integer i = 0,nbw = ch->NbWarnings(), nbf = ch->NbFails();
     if (nbw > 0) {
       S<<" - Warnings : "<<nbw<<" :\n";
       for (i = 1; i <= nbw; i ++) S<<ch->CWarning(i)<<std::endl;
@@ -288,13 +288,13 @@ void  XSControl_WorkSession::InitTransferReader(const Standard_Integer mode)
       TP->SetGraph (HGraph());
     }
     Handle(TColStd_HSequenceOfTransient) lis = myTransferReader->RecordedList();
-    Standard_Integer i, nb = lis->Length();
+    Standard_Integer i = 0, nb = lis->Length();
     for (i = 1; i <= nb; i ++) TP->SetRoot(lis->Value(i));
   }
   if (mode == 3) {
     Handle(Transfer_TransientProcess) TP = myTransferReader->TransientProcess();
     if (TP.IsNull()) return;
-    Standard_Integer i, nb = TP->NbRoots();
+    Standard_Integer i = 0, nb = TP->NbRoots();
     for (i = 1; i <= nb; i ++) myTransferReader->RecordResult(TP->Root(i));
   }
   if (mode == 4 || mode == 5) myTransferReader->BeginTransfer();
index 548767a4fe4046754c4f62ebeff4810ed820f84d..dfc457c66aff5d50ae016c9f067c07580b1c8c3b 100644 (file)
@@ -334,7 +334,7 @@ void Xw_Window::Position (Standard_Integer& theX1, Standard_Integer& theY1,
   XWindowAttributes anAttributes;
   memset (&anAttributes, 0, sizeof(anAttributes));
   XGetWindowAttributes (myDisplay->GetDisplay(), (Window )myXWindow, &anAttributes);
-  Window aChild;
+  Window aChild = 0;
   XTranslateCoordinates (myDisplay->GetDisplay(), anAttributes.root, (Window )myXWindow,
                          0, 0, &anAttributes.x, &anAttributes.y, &aChild);
 
index 18ecf6b2b14dc9e1da9b969652916b79143508d1..142e25f55e43a25be6032ee6557ab1b727350da8 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <Extrema_ExtElC.hxx>
 #include <Extrema_POnCurv.hxx>
 #include <gce_MakeCirc.hxx>
 //=========================================================================
 gce_MakeCirc::gce_MakeCirc(const gp_Pnt&  P1 ,
                           const gp_Pnt&  P2 ,
-                          const gp_Pnt&  P3) {
+                          const gp_Pnt&  P3) : gce_Root() {
 //=========================================================================
 //   Traitement.                                                          +
 //=========================================================================
-  Standard_Real dist1, dist2, dist3, aResolution;
+  Standard_Real dist1 = NAN, dist2 = NAN, dist3 = NAN, aResolution = NAN;
   //
   aResolution = gp::Resolution();
   //
@@ -70,7 +72,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt&  P1 ,
     return;
   }
   //
-  Standard_Real x1,y1,z1,x2,y2,z2,x3,y3,z3;
+  Standard_Real x1 = NAN,y1 = NAN,z1 = NAN,x2 = NAN,y2 = NAN,z2 = NAN,x3 = NAN,y3 = NAN,z3 = NAN;
   //
   P1.Coord(x1,y1,z1);
   P2.Coord(x2,y2,z2);
@@ -106,7 +108,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt&  P1 ,
     TheError = gce_IntersectionError; 
   }
   else {
-    Standard_Integer nbext;
+    Standard_Integer nbext = 0;
     //
     //
     if (distmin.IsParallel()) {
@@ -156,7 +158,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt&  P1 ,
 //purpose  : 
 //=======================================================================
 gce_MakeCirc::gce_MakeCirc(const gp_Ax2&       A2      ,
-                          const Standard_Real Radius  ) {
+                          const Standard_Real Radius  ) : gce_Root() {
   if (Radius < 0.) { 
     TheError = gce_NegativeRadius;
   }
@@ -171,7 +173,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Ax2&       A2      ,
 //=========================================================================
 gce_MakeCirc::gce_MakeCirc(const gp_Pnt&       Center  ,
                           const gp_Pln&       Plane   ,
-                          const Standard_Real Radius  ) {
+                          const Standard_Real Radius  ) : gce_Root() {
   gce_MakeCirc C = gce_MakeCirc(Center,Plane.Position().Direction(),Radius);
   TheCirc = C.Value();
   TheError = C.Status();
@@ -183,7 +185,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt&       Center  ,
 //=======================================================================
 gce_MakeCirc::gce_MakeCirc(const gp_Pnt&       Center  ,
                           const gp_Dir&       Norm    ,
-                          const Standard_Real Radius  ) {
+                          const Standard_Real Radius  ) : gce_Root() {
    if (Radius < 0.) { 
      TheError = gce_NegativeRadius;
    }
@@ -226,7 +228,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt&       Center  ,
 //=======================================================================
 gce_MakeCirc::gce_MakeCirc(const gp_Pnt&       Center  ,
                           const gp_Pnt&       Ptaxis  ,
-                          const Standard_Real Radius  ) {
+                          const Standard_Real Radius  ) : gce_Root() {
    if (Radius < 0.) { 
      TheError = gce_NegativeRadius;
    }
@@ -273,7 +275,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt&       Center  ,
 //purpose  : Creation d un gp_Circ par son axe <Axis> et son rayon <Radius>.  
 //=======================================================================
 gce_MakeCirc::gce_MakeCirc(const gp_Ax1&       Axis    ,
-                          const Standard_Real Radius  ) 
+                          const Standard_Real Radius  ) : gce_Root() 
 {
   if (Radius < 0.) { 
     TheError = gce_NegativeRadius;
@@ -318,7 +320,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Ax1&       Axis    ,
 //   donnee.                
 //=======================================================================
 gce_MakeCirc::gce_MakeCirc(const gp_Circ&      Circ    ,
-                          const Standard_Real Dist    )
+                          const Standard_Real Dist    ) : gce_Root()
 {
   Standard_Real Rad = Circ.Radius()+Dist;
   if (Rad < 0.) { 
@@ -335,7 +337,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Circ&      Circ    ,
 //   est egal a la distance de <Point> a l axe de <Circ>. 
 //=======================================================================
 gce_MakeCirc::gce_MakeCirc(const gp_Circ& Circ ,
-                          const gp_Pnt&  P    ) 
+                          const gp_Pnt&  P    ) : gce_Root() 
 {
   Standard_Real Rad = gp_Lin(Circ.Axis()).Distance(P);
   TheCirc = gp_Circ(Circ.Position(),Rad);
index be1ac73768d9f770f4c8198322a2a452a1adb70c..143b14f8cc0c656af2b4c9ff21a48002c3cf8334 100644 (file)
@@ -15,6 +15,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <ElCLib.hxx>
 #include <gce_MakeCirc2d.hxx>
 #include <gp.hxx>
@@ -47,7 +49,7 @@
 //=========================================================================
 gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&  P1 ,
                               const gp_Pnt2d&  P2 ,
-                              const gp_Pnt2d&  P3 )
+                              const gp_Pnt2d&  P3 ) : gce_Root()
 {
   gp_Dir2d dirx(1.0,0.0);
 
@@ -67,7 +69,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&  P1 ,
   else {
     gp_Lin2d L1;
     gp_Lin2d L2;
-    Standard_Real x1,y1,x2,y2,x3,y3;
+    Standard_Real x1 = NAN,y1 = NAN,x2 = NAN,y2 = NAN,x3 = NAN,y3 = NAN;
     P1.Coord(x1,y1);
     P2.Coord(x2,y2);
     P3.Coord(x3,y3);
@@ -95,7 +97,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&  P1 ,
        dist1 = P1.Distance(pInt);
        dist2 = P2.Distance(pInt);
        dist3 = P3.Distance(pInt);
-       Standard_Real xc,yc;
+       Standard_Real xc = NAN,yc = NAN;
        pInt.Coord(xc,yc);
        gp_Dir2d d1(x1-xc,y1-yc);
        gp_Dir2d d2(xc-x3,yc-y3);
@@ -121,7 +123,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&  P1 ,
 
 gce_MakeCirc2d::gce_MakeCirc2d(const gp_Ax2d&         XAxis   ,
                               const Standard_Real    Radius  ,
-                              const Standard_Boolean Sense   )
+                              const Standard_Boolean Sense   ) : gce_Root()
 {
   if (Radius >= 0.) {
     TheCirc2d = gp_Circ2d(XAxis,Radius,Sense);
@@ -137,7 +139,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Ax2d&         XAxis   ,
 //==========================================================================
 
 gce_MakeCirc2d::gce_MakeCirc2d(const gp_Ax22d&     Axis   ,
-                              const Standard_Real Radius  )
+                              const Standard_Real Radius  ) : gce_Root()
 {
   if (Radius >= 0.) {
     TheCirc2d = gp_Circ2d(Axis,Radius);
@@ -155,7 +157,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Ax22d&     Axis   ,
 
 gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&        Center  ,
                               const Standard_Real    Radius  ,
-                              const Standard_Boolean Sense   ) 
+                              const Standard_Boolean Sense   ) : gce_Root() 
 {
   if (Radius >= 0.) {
     TheCirc2d = gp_Circ2d(gp_Ax2d(Center,gp_Dir2d(1.0,0.0)),Radius,Sense);
@@ -173,7 +175,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&        Center  ,
 
 gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&        Center ,
                               const gp_Pnt2d&        Point  , 
-                              const Standard_Boolean Sense  ) 
+                              const Standard_Boolean Sense  ) : gce_Root() 
 {
   TheCirc2d = gp_Circ2d(gp_Ax2d(Center,gp_Dir2d(1.0,0.0)),
                        Point.Distance(Center),Sense);
@@ -186,7 +188,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&        Center ,
 //==========================================================================
 
 gce_MakeCirc2d::gce_MakeCirc2d(const gp_Circ2d& Circ  ,
-                              const gp_Pnt2d&  Point ) 
+                              const gp_Pnt2d&  Point ) : gce_Root() 
 {
   TheCirc2d = gp_Circ2d(Circ.Axis(),Point.Distance(Circ.Location()));
   TheError = gce_Done;
@@ -198,7 +200,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Circ2d& Circ  ,
 //==========================================================================
 
 gce_MakeCirc2d::gce_MakeCirc2d(const gp_Circ2d&    Circ  ,
-                              const Standard_Real Dist1 ) 
+                              const Standard_Real Dist1 ) : gce_Root() 
 {
   TheCirc2d = gp_Circ2d(Circ.Axis(),Abs(Circ.Radius()+Dist1));
   TheError = gce_Done;
index 27c5792c779da388552f123c8fd5add559aca548..8a38f53c9da8aa271b2530349616f02126dea053 100644 (file)
@@ -30,7 +30,7 @@
 //=========================================================================
 gce_MakeCone::gce_MakeCone(const gp_Ax2&       A2    ,
                           const Standard_Real Ang   ,
-                          const Standard_Real Radius)
+                          const Standard_Real Radius) : gce_Root()
 {
   if (Radius < 0.0) { TheError = gce_NegativeRadius; }
   else {
@@ -54,7 +54,7 @@ gce_MakeCone::gce_MakeCone(const gp_Ax2&       A2    ,
 gce_MakeCone::gce_MakeCone(const gp_Pnt& P1 ,
                           const gp_Pnt& P2 ,
                           const gp_Pnt& P3 ,
-                          const gp_Pnt& P4 ) 
+                          const gp_Pnt& P4 ) : gce_Root() 
 {
   if (P1.Distance(P2)<RealEpsilon() || P3.Distance(P4)<RealEpsilon()) { TheError = gce_ConfusedPoints; return;  }
 
@@ -102,7 +102,7 @@ gce_MakeCone::gce_MakeCone(const gp_Pnt& P1 ,
 
 gce_MakeCone::gce_MakeCone(const gp_Ax1&   Axis  ,
                           const gp_Pnt&   P1    ,
-                          const gp_Pnt&   P2    ) 
+                          const gp_Pnt&   P2    ) : gce_Root() 
 {
   gp_Pnt P3(Axis.Location());
   gp_Pnt P4(P3.XYZ()+Axis.Direction().XYZ());
@@ -124,7 +124,7 @@ gce_MakeCone::gce_MakeCone(const gp_Ax1&   Axis  ,
 //gce_MakeCone::gce_MakeCone(const gp_Cone&  cone ,
 //                        const gp_Pnt&   P    ) 
 gce_MakeCone::gce_MakeCone(const gp_Cone&   ,
-                          const gp_Pnt&       ) 
+                          const gp_Pnt&       ) : gce_Root() 
 {
   TheError = gce_ConfusedPoints;
 }
@@ -137,7 +137,7 @@ gce_MakeCone::gce_MakeCone(const gp_Cone&   ,
 //gce_MakeCone::gce_MakeCone(const gp_Cone&      cone ,
 //                        const Standard_Real Dist ) 
 gce_MakeCone::gce_MakeCone(const gp_Cone&       ,
-                          const Standard_Real  ) 
+                          const Standard_Real  ) : gce_Root() 
 {
   TheError = gce_Done;
 }
@@ -151,7 +151,7 @@ gce_MakeCone::gce_MakeCone(const gp_Cone&       ,
 
 gce_MakeCone::gce_MakeCone(const gp_Lin&   Axis  ,
                           const gp_Pnt&   P1    ,
-                          const gp_Pnt&   P2    ) 
+                          const gp_Pnt&   P2    ) : gce_Root() 
 {
   gp_Pnt P3(Axis.Location());
   gp_Pnt P4(P3.XYZ()+Axis.Direction().XYZ());
@@ -171,7 +171,7 @@ gce_MakeCone::gce_MakeCone(const gp_Lin&   Axis  ,
 gce_MakeCone::gce_MakeCone(const gp_Pnt&       P1   ,
                           const gp_Pnt&       P2   ,
                           const Standard_Real R1   ,
-                          const Standard_Real R2   ) 
+                          const Standard_Real R2   ) : gce_Root() 
 {
   Standard_Real dist = P1.Distance(P2);
   if (dist < RealEpsilon()) { TheError = gce_NullAxis; }
index 01f1ea7f63ed6baada3ac80ab440117f4ca3a153..5b63fe7e33158a8db72c030b913a63a4cf5693dc 100644 (file)
@@ -30,7 +30,7 @@
 //  Radius.                                                               +
 //=========================================================================
 gce_MakeCylinder::gce_MakeCylinder(const gp_Ax2&       A2     ,
-                                  const Standard_Real Radius ) 
+                                  const Standard_Real Radius ) : gce_Root() 
 {
   if (Radius < 0.0) { TheError = gce_NegativeRadius; }
   else {
@@ -45,7 +45,7 @@ gce_MakeCylinder::gce_MakeCylinder(const gp_Ax2&       A2     ,
 //=========================================================================
 
 gce_MakeCylinder::gce_MakeCylinder(const gp_Ax1&       Axis   ,
-                                  const Standard_Real Radius ) 
+                                  const Standard_Real Radius ) : gce_Root() 
 {
   if (Radius < 0.0) { TheError = gce_NegativeRadius; }
   else {
@@ -66,7 +66,7 @@ gce_MakeCylinder::gce_MakeCylinder(const gp_Ax1&       Axis   ,
 //  Constructions d un cylindre de gp par un cercle.                      +
 //=========================================================================
 
-gce_MakeCylinder::gce_MakeCylinder(const gp_Circ& Circ ) 
+gce_MakeCylinder::gce_MakeCylinder(const gp_Circ& Circ ) : gce_Root() 
 {
   TheCylinder = gp_Cylinder(Circ.Position(),Circ.Radius());
   TheError = gce_Done;
@@ -80,7 +80,7 @@ gce_MakeCylinder::gce_MakeCylinder(const gp_Circ& Circ )
 
 gce_MakeCylinder::gce_MakeCylinder(const gp_Pnt& P1 ,
                                   const gp_Pnt& P2 ,
-                                  const gp_Pnt& P3 ) 
+                                  const gp_Pnt& P3 ) : gce_Root() 
 {
   if (P1.Distance(P2) < gp::Resolution()) { TheError = gce_ConfusedPoints; }
   else {
@@ -103,7 +103,7 @@ gce_MakeCylinder::gce_MakeCylinder(const gp_Pnt& P1 ,
 //=========================================================================
 
 gce_MakeCylinder::gce_MakeCylinder(const gp_Cylinder&  Cyl  ,
-                                  const Standard_Real Dist ) 
+                                  const Standard_Real Dist ) : gce_Root() 
 {
   Standard_Real Rad = Cyl.Radius()+Dist;
   if (Rad < 0.) { TheError = gce_NegativeRadius; }
@@ -120,7 +120,7 @@ gce_MakeCylinder::gce_MakeCylinder(const gp_Cylinder&  Cyl  ,
 //=========================================================================
 
 gce_MakeCylinder::gce_MakeCylinder(const gp_Cylinder& Cyl ,
-                                  const gp_Pnt&      P   ) 
+                                  const gp_Pnt&      P   ) : gce_Root() 
 {
   gp_Lin L(Cyl.Axis());
   Standard_Real Rad = L.Distance(P);
index a406d85cb5603d3090556dafde0d032a81db4af7..34e379fea24c68fd529c8dbc203a5a952c378eef 100644 (file)
@@ -27,7 +27,7 @@
 //   Creation d une direction 3d (Dir) de gp a partir de 2 Pnt de gp.     +
 //=========================================================================
 gce_MakeDir::gce_MakeDir(const gp_Pnt& P1,
-                        const gp_Pnt& P2)
+                        const gp_Pnt& P2) : gce_Root()
 {
   if (P1.Distance(P2) <= gp::Resolution()) { TheError = gce_ConfusedPoints; }
   else {
@@ -36,7 +36,7 @@ gce_MakeDir::gce_MakeDir(const gp_Pnt& P1,
   }
 }
 
-gce_MakeDir::gce_MakeDir(const gp_XYZ& Coord)
+gce_MakeDir::gce_MakeDir(const gp_XYZ& Coord) : gce_Root()
 {
   if (Coord.Modulus() <= gp::Resolution()) { TheError = gce_NullVector; }
   else {
@@ -45,7 +45,7 @@ gce_MakeDir::gce_MakeDir(const gp_XYZ& Coord)
   }
 }
 
-gce_MakeDir::gce_MakeDir(const gp_Vec& V)
+gce_MakeDir::gce_MakeDir(const gp_Vec& V) : gce_Root()
 {
   if (V.Magnitude() <= gp::Resolution()) { TheError = gce_NullVector; }
   else {
@@ -56,7 +56,7 @@ gce_MakeDir::gce_MakeDir(const gp_Vec& V)
 
 gce_MakeDir::gce_MakeDir(const Standard_Real Xv,
                         const Standard_Real Yv,
-                        const Standard_Real Zv)
+                        const Standard_Real Zv) : gce_Root()
 {
   if (Xv*Xv+Yv*Yv+Zv*Zv <= gp::Resolution()) { TheError = gce_NullVector; }
   else {
index 4626cce79ecc7d1b34a9a4defa3124b0257190f1..55231eb94f5dcc5177221ffc924a7b6859b8279c 100644 (file)
@@ -27,7 +27,7 @@
 //   Creation d une direction 2d (Dir2d) de gp a partir de 2 Pnt2d de gp. +
 //=========================================================================
 gce_MakeDir2d::gce_MakeDir2d(const gp_Pnt2d& P1,
-                            const gp_Pnt2d& P2)
+                            const gp_Pnt2d& P2) : gce_Root()
 {
   if (P1.Distance(P2) <= gp::Resolution()) { TheError = gce_ConfusedPoints; }
   else {
@@ -36,7 +36,7 @@ gce_MakeDir2d::gce_MakeDir2d(const gp_Pnt2d& P1,
   }
 }
 
-gce_MakeDir2d::gce_MakeDir2d(const gp_XY& Coord)
+gce_MakeDir2d::gce_MakeDir2d(const gp_XY& Coord) : gce_Root()
 {
   if (Coord.Modulus() <= gp::Resolution()) { TheError = gce_NullVector; }
   else {
@@ -45,7 +45,7 @@ gce_MakeDir2d::gce_MakeDir2d(const gp_XY& Coord)
   }
 }
 
-gce_MakeDir2d::gce_MakeDir2d(const gp_Vec2d& V)
+gce_MakeDir2d::gce_MakeDir2d(const gp_Vec2d& V) : gce_Root()
 {
   if (V.Magnitude() <= gp::Resolution()) { TheError = gce_NullVector; }
   else {
@@ -55,7 +55,7 @@ gce_MakeDir2d::gce_MakeDir2d(const gp_Vec2d& V)
 }
 
 gce_MakeDir2d::gce_MakeDir2d(const Standard_Real Xv,
-                            const Standard_Real Yv)
+                            const Standard_Real Yv) : gce_Root()
 {
   if (Xv*Xv+Yv*Yv <= gp::Resolution()) { TheError = gce_NullVector; }
   else {
index 0aa76a0914c2215189d1c6abc4d9457d77efb0a7..eb5c0ec10a88bd7eaaacc5625af44f488b8cfe06 100644 (file)
@@ -29,7 +29,7 @@
 //=========================================================================
 gce_MakeElips::gce_MakeElips(const gp_Ax2&       A2          ,
                             const Standard_Real MajorRadius ,
-                            const Standard_Real MinorRadius ) 
+                            const Standard_Real MinorRadius ) : gce_Root() 
 {
   if (MajorRadius < MinorRadius ) { TheError = gce_InvertRadius;}
   else if (MinorRadius < 0.0) { TheError = gce_NegativeRadius; }
@@ -48,7 +48,7 @@ gce_MakeElips::gce_MakeElips(const gp_Ax2&       A2          ,
 
 gce_MakeElips::gce_MakeElips(const gp_Pnt&   S1     ,
                             const gp_Pnt&   S2     ,
-                            const gp_Pnt&   Center ) 
+                            const gp_Pnt&   Center ) : gce_Root() 
 {
   Standard_Real D1 = S1.Distance(Center);
   if (D1 < gp::Resolution()) { TheError = gce_NullAxis; }
index f8a2138dfd9be283107c23c850890ab8e6cb9430..7ee2fffba4b9f2389766d2de89e55b4f42ec3544 100644 (file)
@@ -32,7 +32,7 @@
 //=========================================================================
 gce_MakeElips2d::gce_MakeElips2d(const gp_Pnt2d&   S1     ,
                                 const gp_Pnt2d&   S2     ,
-                                const gp_Pnt2d&   Center ) 
+                                const gp_Pnt2d&   Center ) : gce_Root() 
 {
   Standard_Real D1 = S1.Distance(Center);
   gp_Dir2d XAxis(gp_XY(S1.XY()-Center.XY()));
@@ -49,7 +49,7 @@ gce_MakeElips2d::gce_MakeElips2d(const gp_Pnt2d&   S1     ,
 gce_MakeElips2d::gce_MakeElips2d(const gp_Ax2d&         MajorAxis   ,
                                 const Standard_Real    MajorRadius ,
                                 const Standard_Real    MinorRadius ,
-                                const Standard_Boolean Sense       ) 
+                                const Standard_Boolean Sense       ) : gce_Root() 
 {
   if (MajorRadius < 0.0) { TheError = gce_NegativeRadius; }
   else if (MajorRadius < MinorRadius) { TheError = gce_InvertRadius; }
@@ -61,7 +61,7 @@ gce_MakeElips2d::gce_MakeElips2d(const gp_Ax2d&         MajorAxis   ,
 
 gce_MakeElips2d::gce_MakeElips2d(const gp_Ax22d&     A           ,
                                 const Standard_Real MajorRadius ,
-                                const Standard_Real MinorRadius ) 
+                                const Standard_Real MinorRadius ) : gce_Root() 
 {
   if (MajorRadius < 0.0) { TheError = gce_NegativeRadius; }
   else if (MajorRadius < MinorRadius) { TheError = gce_InvertRadius; }
index d35d26a7db550e6aed38174783daf8c29517f83a..8dc0092a52ffaf4eafcedefc789aa4b170c29ce3 100644 (file)
@@ -30,7 +30,7 @@
 //=========================================================================
 gce_MakeHypr::gce_MakeHypr(const gp_Pnt&   S1     ,
                           const gp_Pnt&   S2     ,
-                          const gp_Pnt&   Center ) 
+                          const gp_Pnt&   Center ) : gce_Root() 
 {
   gp_Dir XAxis(gp_XYZ(S1.XYZ()-Center.XYZ()));
   gp_Lin L(Center,XAxis);
@@ -46,7 +46,7 @@ gce_MakeHypr::gce_MakeHypr(const gp_Pnt&   S1     ,
 
 gce_MakeHypr::gce_MakeHypr(const gp_Ax2&       A2          ,
                           const Standard_Real MajorRadius ,
-                          const Standard_Real MinorRadius ) 
+                          const Standard_Real MinorRadius ) : gce_Root() 
 {
   if (MajorRadius < MinorRadius) { TheError = gce_InvertRadius; }
   else if (MajorRadius < 0.0) { TheError = gce_NegativeRadius; }
index 3e5958be1eaebf1fbb218030a27e9e2dfb95fc23..e0ed5772c38963d90219fa9cdf13daaa93234d47 100644 (file)
@@ -31,7 +31,7 @@
 //=========================================================================
 gce_MakeHypr2d::gce_MakeHypr2d(const gp_Pnt2d&   S1     ,
                               const gp_Pnt2d&   S2     ,
-                              const gp_Pnt2d&   Center )
+                              const gp_Pnt2d&   Center ) : gce_Root()
 {
   gp_Dir2d XAxis(gp_XY(S1.XY()-Center.XY()));
   gp_Dir2d YAxis(gp_XY(S2.XY()-Center.XY()));
@@ -49,7 +49,7 @@ gce_MakeHypr2d::gce_MakeHypr2d(const gp_Pnt2d&   S1     ,
 gce_MakeHypr2d::gce_MakeHypr2d(const gp_Ax2d&         MajorAxis   ,
                               const Standard_Real    MajorRadius ,
                               const Standard_Real    MinorRadius ,
-                              const Standard_Boolean Sense       )
+                              const Standard_Boolean Sense       ) : gce_Root()
 {
   if (MajorRadius < 0.0 || MinorRadius < 0.0) { TheError = gce_NegativeRadius;}
   else {
@@ -60,7 +60,7 @@ gce_MakeHypr2d::gce_MakeHypr2d(const gp_Ax2d&         MajorAxis   ,
 
 gce_MakeHypr2d::gce_MakeHypr2d(const gp_Ax22d&     A           ,
                               const Standard_Real MajorRadius ,
-                              const Standard_Real MinorRadius )
+                              const Standard_Real MinorRadius ) : gce_Root()
 {
   if (MajorRadius < 0.0 || MinorRadius < 0.0) { TheError = gce_NegativeRadius;}
   else {
index 1a61773d1312a47083d285e7b928565a026f0355..e79a2b36f44e91a7e9ded5d54af16cbc24fce62c 100644 (file)
@@ -26,7 +26,7 @@
 //=========================================================================
 //   Creation d une ligne 3d de gp a partir d un Ax1 de gp.               +
 //=========================================================================
-gce_MakeLin::gce_MakeLin(const gp_Ax1& A1)
+gce_MakeLin::gce_MakeLin(const gp_Ax1& A1) : gce_Root()
 {
   TheLin = gp_Lin(A1);
   TheError = gce_Done;
@@ -38,7 +38,7 @@ gce_MakeLin::gce_MakeLin(const gp_Ax1& A1)
 //=========================================================================
 
 gce_MakeLin::gce_MakeLin(const gp_Pnt& P,
-                        const gp_Dir& V)
+                        const gp_Dir& V) : gce_Root()
 {
   TheLin = gp_Lin(P,V);
   TheError = gce_Done;
@@ -50,7 +50,7 @@ gce_MakeLin::gce_MakeLin(const gp_Pnt& P,
 //=========================================================================
 
 gce_MakeLin::gce_MakeLin(const gp_Pnt& P1 ,
-                        const gp_Pnt& P2 ) 
+                        const gp_Pnt& P2 ) : gce_Root() 
 {
   if (P1.Distance(P2) >= gp::Resolution()) {
     TheLin = gp_Lin(P1,gp_Dir(P2.XYZ()-P1.XYZ()));
@@ -65,7 +65,7 @@ gce_MakeLin::gce_MakeLin(const gp_Pnt& P1 ,
 //=========================================================================
 
 gce_MakeLin::gce_MakeLin(const gp_Lin& Lin ,
-                        const gp_Pnt& P   )
+                        const gp_Pnt& P   ) : gce_Root()
 {
   TheLin = gp_Lin(P,Lin.Direction());
   TheError = gce_Done;
index 363941314b5f1a034ecb826ec98e56da81af38f3..038d148774cf3a98a3163d5d7c5ff12bda76a0ae 100644 (file)
@@ -26,7 +26,7 @@
 //=========================================================================
 //   Creation d une ligne 2d de gp a partir d un Ax2d de gp.              +
 //=========================================================================
-gce_MakeLin2d::gce_MakeLin2d(const gp_Ax2d& A)
+gce_MakeLin2d::gce_MakeLin2d(const gp_Ax2d& A) : gce_Root()
 {
   TheLin2d = gp_Lin2d(A);
   TheError = gce_Done;
@@ -38,7 +38,7 @@ gce_MakeLin2d::gce_MakeLin2d(const gp_Ax2d& A)
 //=========================================================================
 
 gce_MakeLin2d::gce_MakeLin2d(const gp_Pnt2d& P,
-                            const gp_Dir2d& V)
+                            const gp_Dir2d& V) : gce_Root()
 {
   TheLin2d = gp_Lin2d(P,V);
   TheError = gce_Done;
@@ -51,7 +51,7 @@ gce_MakeLin2d::gce_MakeLin2d(const gp_Pnt2d& P,
 
 gce_MakeLin2d::gce_MakeLin2d(const Standard_Real A,
                             const Standard_Real B,
-                            const Standard_Real C)
+                            const Standard_Real C) : gce_Root()
 {
   if (A*A + B*B <= gp::Resolution()) {
     TheError = gce_NullAxis;
@@ -68,7 +68,7 @@ gce_MakeLin2d::gce_MakeLin2d(const Standard_Real A,
 //=========================================================================
 
 gce_MakeLin2d::gce_MakeLin2d(const gp_Pnt2d& P1,
-                            const gp_Pnt2d& P2)
+                            const gp_Pnt2d& P2) : gce_Root()
 {
   if (P1.Distance(P2) >= gp::Resolution()) {
     TheLin2d = gp_Lin2d(P1,gp_Dir2d(P2.XY()-P1.XY()));
@@ -85,7 +85,7 @@ gce_MakeLin2d::gce_MakeLin2d(const gp_Pnt2d& P1,
 //=========================================================================
 
 gce_MakeLin2d::gce_MakeLin2d(const gp_Lin2d& Line,
-                            const gp_Pnt2d& Point)
+                            const gp_Pnt2d& Point) : gce_Root()
 {
   TheLin2d = gp_Lin2d(Point,Line.Direction());
   TheError = gce_Done;
@@ -97,7 +97,7 @@ gce_MakeLin2d::gce_MakeLin2d(const gp_Lin2d& Line,
 //=========================================================================
 
 gce_MakeLin2d::gce_MakeLin2d(const gp_Lin2d&     Line,
-                            const Standard_Real Dist)
+                            const Standard_Real Dist) : gce_Root()
 {
   gp_Pnt2d Point(Line.Location().XY()+
                 Dist*gp_XY(-Line.Direction().Y(),Line.Direction().X()));
index 411aec2d3b7039036c34afc8bf2fc0eb2162bcc2..b599ad7bfdf67c9497561a3da8050dd0d72a62da 100644 (file)
@@ -23,7 +23,7 @@
 #include <StdFail_NotDone.hxx>
 
 gce_MakeParab::gce_MakeParab(const gp_Ax2&       A2    ,
-                            const Standard_Real Focal ) 
+                            const Standard_Real Focal ) : gce_Root() 
 {
   if (Focal < 0.0) { TheError = gce_NullFocusLength; }
   else {
@@ -33,7 +33,7 @@ gce_MakeParab::gce_MakeParab(const gp_Ax2&       A2    ,
 }
 
 gce_MakeParab::gce_MakeParab(const gp_Ax1& D ,
-                            const gp_Pnt& F )
+                            const gp_Pnt& F ) : gce_Root()
 {
   TheParab = gp_Parab(D,F);
   TheError = gce_Done;
index 680ff4156a3dc509475f8e75a5ea85e3024f6513..34affa1117e320906905106814f51aa0a45cfd87 100644 (file)
@@ -24,7 +24,7 @@
 #include <StdFail_NotDone.hxx>
 
 gce_MakeParab2d::gce_MakeParab2d(const gp_Ax22d&     A     ,
-                                const Standard_Real Focal ) 
+                                const Standard_Real Focal ) : gce_Root() 
 {
   if (Focal < 0.0) { TheError = gce_NullFocusLength; }
   else {
@@ -35,7 +35,7 @@ gce_MakeParab2d::gce_MakeParab2d(const gp_Ax22d&     A     ,
 
 gce_MakeParab2d::gce_MakeParab2d(const gp_Ax2d&         MirrorAxis ,
                                 const Standard_Real    Focal      ,
-                                const Standard_Boolean Sense      ) 
+                                const Standard_Boolean Sense      ) : gce_Root() 
 {
   if (Focal < 0.0) { TheError = gce_NullFocusLength; }
   else {
@@ -46,7 +46,7 @@ gce_MakeParab2d::gce_MakeParab2d(const gp_Ax2d&         MirrorAxis ,
 
 gce_MakeParab2d::gce_MakeParab2d(const gp_Ax2d&  D            ,
                                 const gp_Pnt2d& F            ,
-                                const Standard_Boolean Sense )
+                                const Standard_Boolean Sense ) : gce_Root()
 {
   TheParab2d = gp_Parab2d(D,F,Sense);
   TheError = gce_Done;
@@ -61,7 +61,7 @@ gce_MakeParab2d::gce_MakeParab2d(const gp_Ax2d&  D            ,
 
 gce_MakeParab2d::gce_MakeParab2d(const gp_Pnt2d&        S      ,
                                 const gp_Pnt2d&        Center ,
-                                const Standard_Boolean Sense  ) 
+                                const Standard_Boolean Sense  ) : gce_Root() 
 {
   if (S.Distance(Center) >= gp::Resolution()) {
     gp_Dir2d XAxis(gp_XY(S.XY()-Center.XY()));
index 41b724ab851306fcb681d15dac165b93d5e56c70..a3736315c615e5afa9f785335190df091bd446d9 100644 (file)
 #include <gp_Pnt.hxx>
 #include <StdFail_NotDone.hxx>
 
-gce_MakePln::gce_MakePln(const gp_Ax2& A2)
+gce_MakePln::gce_MakePln(const gp_Ax2& A2) : gce_Root()
 {
   ThePln = gp_Pln(gp_Ax3(A2));
   TheError = gce_Done;
 }
 
 gce_MakePln::gce_MakePln(const gp_Pnt& P,
-                        const gp_Dir& V)
+                        const gp_Dir& V) : gce_Root()
 {
   ThePln = gp_Pln(P,V);
   TheError = gce_Done;
 }
 
 gce_MakePln::gce_MakePln(const gp_Pnt& P1,
-                        const gp_Pnt& P2)
+                        const gp_Pnt& P2) : gce_Root()
 {
   if (P1.Distance(P2) <= gp::Resolution()) { TheError = gce_ConfusedPoints; }
   else {
@@ -52,7 +52,7 @@ gce_MakePln::gce_MakePln(const gp_Pnt& P1,
 gce_MakePln::gce_MakePln(const Standard_Real A,
                         const Standard_Real B,
                         const Standard_Real C,
-                        const Standard_Real D)
+                        const Standard_Real D) : gce_Root()
 {
   if (A*A + B*B + C*C <= gp::Resolution()) {
     TheError = gce_BadEquation;
@@ -69,7 +69,7 @@ gce_MakePln::gce_MakePln(const Standard_Real A,
 
 gce_MakePln::gce_MakePln(const gp_Pnt& P1 ,
                         const gp_Pnt& P2 ,
-                        const gp_Pnt& P3 ) 
+                        const gp_Pnt& P3 ) : gce_Root() 
 {
   gp_XYZ V1(P2.XYZ()-P1.XYZ());
   gp_XYZ V2(P3.XYZ()-P1.XYZ());
@@ -88,7 +88,7 @@ gce_MakePln::gce_MakePln(const gp_Pnt& P1 ,
 //=========================================================================
 
 gce_MakePln::gce_MakePln(const gp_Pln&       Pl   ,
-                        const Standard_Real Dist ) 
+                        const Standard_Real Dist ) : gce_Root() 
 {
   gp_Pnt Center(Pl.Location().XYZ()+Dist*gp_XYZ(Pl.Axis().Direction().XYZ()));
   ThePln=gp_Pln(gp_Ax3(Center,Pl.Axis().Direction(),Pl.XAxis().Direction()));
@@ -101,7 +101,7 @@ gce_MakePln::gce_MakePln(const gp_Pln&       Pl   ,
 //=========================================================================
 
 gce_MakePln::gce_MakePln(const gp_Pln& Pl    ,
-                        const gp_Pnt& Point ) 
+                        const gp_Pnt& Point ) : gce_Root() 
 {
   ThePln = gp_Pln(gp_Ax3(Point,Pl.Axis().Direction(),Pl.XAxis().Direction()));
   TheError = gce_Done;
@@ -111,7 +111,7 @@ gce_MakePln::gce_MakePln(const gp_Pln& Pl    ,
 //  Creation d un gp_pln a partir d un Ax1 (Point + Normale).             +
 //=========================================================================
 
-gce_MakePln::gce_MakePln(const gp_Ax1& Axis ) 
+gce_MakePln::gce_MakePln(const gp_Ax1& Axis ) : gce_Root() 
 {
   ThePln = gp_Pln(Axis.Location(),Axis.Direction());
   TheError = gce_Done;
index f5997d04ef437bcab41e2ba1ef340348a2a87307..b53111306d1fd39a3939b399f0bd84afa4960dd2 100644 (file)
@@ -14,6 +14,8 @@
 
 // JCV 07/12/90 Modifs suite a l'introduction des classes XYZ et Mat dans gp
 
+#include <math.h>
+
 #include <gp_Dir.hxx>
 
 #include <gp_Ax2.hxx>
@@ -46,7 +48,7 @@ Standard_Real gp_Dir::Angle (const gp_Dir& Other) const
 Standard_Real gp_Dir::AngleWithRef (const gp_Dir& Other,
                                    const gp_Dir& Vref) const
 {
-  Standard_Real Ang;
+  Standard_Real Ang = NAN;
   gp_XYZ XYZ = coord.Crossed (Other.coord);
   Standard_Real Cosinus = coord.Dot(Other.coord);
   Standard_Real Sinus   = XYZ.Modulus ();
index 3b53940ac33c43f9c96ac1a5518177349d5c793e..4601c2cc572a72acf3809887dc0c47edf4b18a34 100644 (file)
@@ -17,6 +17,8 @@
 // http://www.gamedev.ru/code/articles/?id=4215&page=3
 // and maths found in Wikipedia and elsewhere
 
+#include <math.h>
+
 #include <gp_Quaternion.hxx>
 
 #include <gp_Vec.hxx>
@@ -167,7 +169,7 @@ void gp_Quaternion::SetMatrix (const gp_Mat& theMat)
 
 gp_Mat gp_Quaternion::GetMatrix () const
 {
-  Standard_Real wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2;
+  Standard_Real wx = NAN, wy = NAN, wz = NAN, xx = NAN, yy = NAN, yz = NAN, xy = NAN, xz = NAN, zz = NAN, x2 = NAN, y2 = NAN, z2 = NAN;
   Standard_Real s  = 2.0 / SquareNorm(); 
   x2 = x * s;    y2 = y * s;    z2 = z * s;
   xx = x * x2;   xy = x * y2;   xz = x * z2;
index 3e1ff120db0c1c85023a1f1590ec85a6618fcc06..23bfda7665e2072c45f408366a772ca173e62797 100644 (file)
@@ -19,6 +19,8 @@
 
 #define No_Standard_OutOfRange
 
+#include <math.h>
+
 #include <gp_Trsf.hxx>
 
 #include <gp.hxx>
@@ -940,7 +942,7 @@ Standard_Boolean  gp_Trsf::InitFromJson (const Standard_SStream& theSStream, Sta
     }
   }
 
-  Standard_Real ashape;
+  Standard_Real ashape = NAN;
   OCCT_INIT_FIELD_VALUE_INTEGER (aStreamStr, aPos, ashape);
   shape = (gp_TrsfForm)((Standard_Integer)ashape);
 
index 6b9d06520ce68231a37dddad2e9025c3226f3f6c..ddc512ab1a12b3e1011525610797981dad321454 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <gp_XY.hxx>
 
 #include <Standard_OutOfRange.hxx>
@@ -19,7 +21,7 @@
 Standard_Boolean gp_XY::IsEqual (const gp_XY& Other,
                                 const Standard_Real Tolerance) const
 {
-  Standard_Real val;
+  Standard_Real val = NAN;
   val = x - Other.x;
   if (val < 0) val = - val;
   if (val > Tolerance) return Standard_False;
index bd0a6a196e9e3ebaca35c165e2dd8cc2b9b8016a..e1845cd84d28f16ad455386b5b9704e3a29f0abe 100644 (file)
@@ -12,6 +12,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <gp_XYZ.hxx>
 
 #include <gp_Mat.hxx>
@@ -21,7 +23,7 @@
 
 Standard_Boolean gp_XYZ::IsEqual (const gp_XYZ& Other,
                                  const Standard_Real Tolerance) const {
-  Standard_Real val;
+  Standard_Real val = NAN;
   val = x - Other.x;
   if (val < 0) val = - val;
   if (val > Tolerance) return Standard_False;
index 2fff3ae4ee2cb3c25b8d5bf4205bce8b5fc4d840..81f3c1377ff46e95408e4511fe003e0a7b78ef3f 100644 (file)
@@ -1964,7 +1964,7 @@ static const Standard_Real Weight[] = {
 
 void math::GaussPoints(const Standard_Integer Index, math_Vector& GPoint) {
   Standard_Integer Som = 0;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
   for ( i = 1; i < Index; i++) {
     Som += (i+1) >> 1;
   }
@@ -1979,7 +1979,7 @@ void math::GaussPoints(const Standard_Integer Index, math_Vector& GPoint) {
 
 void math::GaussWeights(const Standard_Integer Index, math_Vector& GWeight) {
   Standard_Integer Som = 0;
-  Standard_Integer i ;
+  Standard_Integer i = 0 ;
 
   for ( i = 1; i < Index; i++) {
     Som += (i+1) >> 1;
@@ -2011,7 +2011,7 @@ Standard_Boolean math::OrderedGaussPointsAndWeights(const Standard_Integer Index
 
   if (Index <= 61) {
     // Get points from the array.
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Integer aStartInd = 1;
 
     // Compute the index of starting point in the array.
index 6073c8b8015d59c60390ba8406fa6599d0c2b954..bcd4f6dc6c51e85b7ef5e7596a3e6045034e4243 100644 (file)
@@ -19,6 +19,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_BFGS.hxx>
 #include <math_BracketMinimum.hxx>
 #include <math_BrentMinimum.hxx>
@@ -70,8 +72,8 @@ public:
     Grad = *G;
   }
 
-  virtual Standard_Boolean Value(const Standard_Real x,
-                                 Standard_Real&      fval)
+  Standard_Boolean Value(const Standard_Real x,
+                                 Standard_Real&      fval) override
   {
     *P = *Dir;
     P->Multiply(x);
@@ -80,9 +82,9 @@ public:
     return F->Value(*P, fval);
   }
 
-  virtual Standard_Boolean Values(const Standard_Real x,
+  Standard_Boolean Values(const Standard_Real x,
                                   Standard_Real&      fval,
-                                  Standard_Real&      D)
+                                  Standard_Real&      D) override
   {
     *P = *Dir;
     P->Multiply(x);
@@ -96,13 +98,13 @@ public:
 
     return Standard_False;
   }
-  virtual Standard_Boolean Derivative(const Standard_Real x,
-                                      Standard_Real&      D)
+  Standard_Boolean Derivative(const Standard_Real x,
+                                      Standard_Real&      D) override
   {
     *P = *Dir;
     P->Multiply(x);
     P->Add(*P0);
-    Standard_Real fval;
+    Standard_Real fval = NAN;
     D = 0.;
     if (F->Values(*P, fval, *G))
     {
@@ -214,7 +216,7 @@ static Standard_Boolean MinimizeDirection(math_Vector&       P,
                                           const math_Vector& theLeft,
                                           const math_Vector& theRight)
 {
-  Standard_Real lambda;
+  Standard_Real lambda = NAN;
   if (!ComputeInitScale(F0, Dir, Gr, lambda))
     return Standard_False;
 
@@ -251,7 +253,7 @@ static Standard_Boolean MinimizeDirection(math_Vector&       P,
   }
 
   F.Initialize(P, Dir);
-  Standard_Real F1;
+  Standard_Real F1 = NAN;
   if (!F.Value(lambda, F1))
     return Standard_False;
 
@@ -264,7 +266,7 @@ static Standard_Boolean MinimizeDirection(math_Vector&       P,
   if (Bracket.IsDone())
   {
     // find minimum inside the bracket
-    Standard_Real ax, xx, bx, Fax, Fxx, Fbx;
+    Standard_Real ax = NAN, xx = NAN, bx = NAN, Fax = NAN, Fxx = NAN, Fbx = NAN;
     Bracket.Values(ax, xx, bx);
     Bracket.FunctionValues(Fax, Fxx, Fbx);
 
@@ -285,12 +287,12 @@ static Standard_Boolean MinimizeDirection(math_Vector&       P,
   {
     // Bracket definition is failure. If the bounds are defined then
     // set current point to intersection with bounds
-    Standard_Real aFMin, aFMax;
+    Standard_Real aFMin = NAN, aFMax = NAN;
     if (!F.Value(aMinLambda, aFMin))
       return Standard_False;
     if (!F.Value(aMaxLambda, aFMax))
       return Standard_False;
-    Standard_Real aBestLambda;
+    Standard_Real aBestLambda = NAN;
     if (aFMin < aFMax)
     {
       aBestLambda = aMinLambda;
@@ -317,8 +319,8 @@ void  math_BFGS::Perform(math_MultipleVarFunctionWithGradient& F,
 {
   const Standard_Integer n = TheLocation.Length();
   Standard_Boolean Good = Standard_True;
-  Standard_Integer j, i;
-  Standard_Real fae, fad, fac;
+  Standard_Integer j = 0, i = 0;
+  Standard_Real fae = NAN, fad = NAN, fac = NAN;
 
   math_Vector xi(1, n), dg(1, n), hdg(1, n);
   math_Matrix hessin(1, n, 1, n);
index 88eecc5a2eaf8f6012ddf1fa436622b39f242ea2..4a5f721eab3ce7475fe523238b0413b41434ae4c 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math_BissecNewton.hxx>
 #include <math_FunctionWithDerivative.hxx>
 #include <StdFail_NotDone.hxx>
@@ -49,10 +51,10 @@ void math_BissecNewton::Perform(math_FunctionWithDerivative& F,
                                 const Standard_Real    Bound2,
                                 const Standard_Integer NbIterations)
 {
-  Standard_Boolean GOOD;
-  Standard_Integer j;
-  Standard_Real dxold, fh, fl;
-  Standard_Real swap, temp, xh, xl;
+  Standard_Boolean GOOD = 0;
+  Standard_Integer j = 0;
+  Standard_Real dxold = NAN, fh = NAN, fl = NAN;
+  Standard_Real swap = NAN, temp = NAN, xh = NAN, xl = NAN;
   
   GOOD = F.Values(Bound1, fl, df);
   if(!GOOD) {
index 39e0c8a623160057c5eb898c297db3bbc655ee75..a9b8fdd9778aa74798804cec81b7c23b3d641502 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math_BracketMinimum.hxx>
 #include <math_Function.hxx>
 #include <StdFail_NotDone.hxx>
@@ -47,7 +49,7 @@ Standard_Boolean math_BracketMinimum::LimitAndMayBeSwap
   if ((theA - theB) * (theB - theC) < 0)
   {
     // swap B and C
-    Standard_Real dum;
+    Standard_Real dum = NAN;
     SHFT(dum, theB, theC, dum);
     SHFT(dum, theFB, theFC, dum);
   }
@@ -57,8 +59,8 @@ Standard_Boolean math_BracketMinimum::LimitAndMayBeSwap
     void math_BracketMinimum::Perform(math_Function& F)
     {
 
-     Standard_Boolean OK;
-     Standard_Real ulim, u, r, q, fu, dum;
+     Standard_Boolean OK = 0;
+     Standard_Real ulim = NAN, u = NAN, r = NAN, q = NAN, fu = NAN, dum = NAN;
 
      Done = Standard_False; 
      Standard_Real Lambda = GOLD;
index 29e9a6be0a4df945b2802ffa8eb6f2bd0c29256d..ddaf30dd8a1d614d6925eb3a0a158a9b4ab27979 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math_BracketedRoot.hxx>
 #include <math_Function.hxx>
 #include <StdFail_NotDone.hxx>
@@ -25,13 +27,13 @@ math_BracketedRoot::math_BracketedRoot (math_Function& F,
                                            const Standard_Real Bound2, 
                                            const Standard_Real Tolerance, 
                                            const Standard_Integer NbIterations,
-                                           const Standard_Real ZEPS ) {
+                                           const Standard_Real ZEPS ) : TheRoot(Bound2) {
 
-    Standard_Real Fa,Fc,a,c=0,d=0,e=0;
-    Standard_Real min1,min2,p,q,r,s,tol1,xm;
+    Standard_Real Fa = NAN,Fc = NAN,a = NAN,c=0,d=0,e=0;
+    Standard_Real min1 = NAN,min2 = NAN,p = NAN,q = NAN,r = NAN,s = NAN,tol1 = NAN,xm = NAN;
   
     a = Bound1;
-    TheRoot = Bound2;
+    
     F.Value(a,Fa);
     F.Value(TheRoot,TheError);
     if (Fa*TheError > 0.) { Done = Standard_False;}
index df6052783819829f5e09496b7cb53588ef978b16..720627c2b4bfc126d9db442bf62a9a2e8addcb58 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math_BrentMinimum.hxx>
 #include <math_Function.hxx>
 #include <StdFail_NotDone.hxx>
@@ -94,9 +96,9 @@ void math_BrentMinimum::Perform(math_Function& F,
                                 const Standard_Real    bx,
                                 const Standard_Real    cx)
 {
-  Standard_Boolean OK;  
-  Standard_Real etemp, fu, p, q, r;  
-  Standard_Real tol1, tol2, u, v, w, xm;
+  Standard_Boolean OK = 0;  
+  Standard_Real etemp = NAN, fu = NAN, p = NAN, q = NAN, r = NAN;  
+  Standard_Real tol1 = NAN, tol2 = NAN, u = NAN, v = NAN, w = NAN, xm = NAN;
   Standard_Real e = 0.0;
   Standard_Real d = RealLast();
 
index 46a4e0b9365715786067f2fb07019cd1469ff947..d675e21d0db1f3525202715e0254cc8076960b88 100644 (file)
 #include <Standard_ErrorHandler.hxx>
 
 #include <algorithm>
-math_ComputeGaussPointsAndWeights::math_ComputeGaussPointsAndWeights(const Standard_Integer Number)
+math_ComputeGaussPointsAndWeights::math_ComputeGaussPointsAndWeights(const Standard_Integer Number) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
 
   try {
     myPoints  = new TColStd_HArray1OfReal(1, Number);
     myWeights = new TColStd_HArray1OfReal(1, Number);
 
-    Standard_Integer i;
+    Standard_Integer i = 0;
 
     TColStd_Array1OfReal aDiag(1, Number);
     TColStd_Array1OfReal aSubDiag(1, Number);
index 339dc85f94949960ffc2a97ea6ddc0cf849d9952..6aee8a616e079451fe166ddd2170d174ac27de70 100644 (file)
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math_Array1OfValueAndWeight.hxx>
 #include <math_ComputeKronrodPointsAndWeights.hxx>
 #include <math_EigenValuesSearcher.hxx>
 #include <Standard_ErrorHandler.hxx>
 
 #include <algorithm>
-math_ComputeKronrodPointsAndWeights::math_ComputeKronrodPointsAndWeights(const Standard_Integer Number)
+math_ComputeKronrodPointsAndWeights::math_ComputeKronrodPointsAndWeights(const Standard_Integer Number) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
 
   try {
-    Standard_Integer i, j;
+    Standard_Integer i = 0, j = 0;
     Standard_Integer a2NP1 = 2*Number + 1;
   
     myPoints  = new TColStd_HArray1OfReal(1, a2NP1);
@@ -76,11 +78,11 @@ math_ComputeKronrodPointsAndWeights::math_ComputeKronrodPointsAndWeights(const S
       aa[i] = aDiag(i);
       bb[i] = aSubDiag(i);
     }
-    Standard_Real    *ptrtmp;
-    Standard_Real     u;
-    Standard_Integer  m;
-    Standard_Integer  k;
-    Standard_Integer  l;
+    Standard_Real    *ptrtmp = nullptr;
+    Standard_Real     u = NAN;
+    Standard_Integer  m = 0;
+    Standard_Integer  k = 0;
+    Standard_Integer  l = 0;
 
     Standard_Real *a = aa+1;
     Standard_Real *b = bb+1;
index 3123a9eb388556bb13802601fb62784c287f89ab..71cf913a4b1032abd19431bc7391b3805dfea9bf 100644 (file)
@@ -21,6 +21,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_Crout.hxx>
 #include <math_Matrix.hxx>
 #include <math_NotSquare.hxx>
 #include <StdFail_NotDone.hxx>
 
 math_Crout::math_Crout(const math_Matrix& A, const Standard_Real MinPivot):
-                       InvA(1, A.RowNumber(), 1, A.ColNumber()) 
+                       InvA(1, A.RowNumber(), 1, A.ColNumber()), Det(1) 
 {
-  Standard_Integer i,j,k;
+  Standard_Integer i = 0,j = 0,k = 0;
   Standard_Integer Nctl = A.RowNumber();
   Standard_Integer lowr = A.LowerRow(), lowc = A.LowerCol();
-  Standard_Real scale;
+  Standard_Real scale = NAN;
 
   math_Matrix L(1, Nctl, 1, Nctl);
   math_Vector Diag(1, Nctl);
@@ -43,7 +45,7 @@ math_Crout::math_Crout(const math_Matrix& A, const Standard_Real MinPivot):
   
   math_NotSquare_Raise_if(Nctl != A.ColNumber(), " ");
   
-  Det = 1;
+  
   for (i =1; i <= Nctl; i++) {
     for (j = 1; j <= i -1; j++) {
       scale = 0.0;
@@ -110,7 +112,7 @@ void math_Crout::Solve(const math_Vector& B, math_Vector& X) const
   
   Standard_Integer n = InvA.RowNumber();
   Standard_Integer lowb = B.Lower(), lowx = X.Lower();
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
 
   for (i = 1; i <= n; i++) {
     X(i+lowx-1) = InvA(i, 1)*B(1+lowb-1);
index d67db7e825cb604753ea91e58c65f81dd78467b1..c02f5731dd1d157754217ac04d72fe8194dccef0 100644 (file)
@@ -19,6 +19,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_DirectPolynomialRoots.hxx>
 #include <StdFail_InfiniteSolutions.hxx>
 
@@ -54,10 +56,10 @@ const Standard_Real ZERO = 1.0e-30;
 
     static Standard_Real Improve(const Standard_Integer N, Standard_Real *Poly, const Standard_Real IniSol) {
 
-        Standard_Real Val = 0., Der, Delta;
+        Standard_Real Val = 0., Der = NAN, Delta = NAN;
         Standard_Real Sol = IniSol;
         Standard_Real IniVal = Value(N, Poly, IniSol);
-        Standard_Integer Index;
+        Standard_Integer Index = 0;
 
 //      std::cout << "Improve\n";
         for(Index = 1; Index < 10; Index++) {
@@ -128,33 +130,33 @@ const Standard_Real ZERO = 1.0e-30;
                               const Standard_Real B,
                               const Standard_Real C,
                               const Standard_Real D,
-                              const Standard_Real E) {
-      InfiniteStatus = Standard_False;
-      Done = Standard_True;
+                              const Standard_Real E) : InfiniteStatus(Standard_False), Done(Standard_True) {
+      
+      
       Solve(A, B, C, D, E);
     }
 
 math_DirectPolynomialRoots::math_DirectPolynomialRoots(const Standard_Real A,
                                                       const Standard_Real B,
                                                       const Standard_Real C,
-                                                      const Standard_Real D) {
-  Done = Standard_True;
-  InfiniteStatus = Standard_False;
+                                                      const Standard_Real D) : Done(Standard_True), InfiniteStatus(Standard_False) {
+  
+  
   Solve(A, B, C, D);
 }
 
 math_DirectPolynomialRoots::math_DirectPolynomialRoots(const Standard_Real A,
                                                       const Standard_Real B,
-                                                      const Standard_Real C) {
-  Done = Standard_True;
-  InfiniteStatus = Standard_False;
+                                                      const Standard_Real C) : Done(Standard_True), InfiniteStatus(Standard_False) {
+  
+  
   Solve(A, B, C);
 }
 
 math_DirectPolynomialRoots::math_DirectPolynomialRoots(const Standard_Real A,
-                                                      const Standard_Real B) {
-  Done = Standard_True;
-  InfiniteStatus = Standard_False;
+                                                      const Standard_Real B) : Done(Standard_True), InfiniteStatus(Standard_False) {
+  
+  
   Solve(A, B);
 }
 
@@ -204,11 +206,11 @@ void math_DirectPolynomialRoots::Solve(const Standard_Real a,
   }        
   ///////////////////////////////////
 
-  Standard_Real A, B, C, D, R3, S3, T3, Q3, Y0, P0, Q0, P, Q, P1, Q1;
-  Standard_Real Discr, Sdiscr;
-  Standard_Integer Index;
-  Standard_Integer Exp;
-  Standard_Real PowRadix1,PowRadix2;
+  Standard_Real A = NAN, B = NAN, C = NAN, D = NAN, R3 = NAN, S3 = NAN, T3 = NAN, Q3 = NAN, Y0 = NAN, P0 = NAN, Q0 = NAN, P = NAN, Q = NAN, P1 = NAN, Q1 = NAN;
+  Standard_Real Discr = NAN, Sdiscr = NAN;
+  Standard_Integer Index = 0;
+  Standard_Integer Exp = 0;
+  Standard_Real PowRadix1 = NAN,PowRadix2 = NAN;
   
   A = b / a;
   B = c / a;
@@ -309,10 +311,10 @@ void math_DirectPolynomialRoots::Solve(const Standard_Real a,
         return;
       }
 
-      Standard_Real Beta, Gamma, Del, P1, P2, P, Ep, Q1, Q2, Q3, Q, Eq, A1, A2, Discr;
-      Standard_Real Sigma, Psi, D1, D2, Sb, Omega, Sp3, Y1, Dbg, Sdbg, Den1, Den2;
-      Standard_Real U, H, Sq;
-      Standard_Integer Exp;
+      Standard_Real Beta = NAN, Gamma = NAN, Del = NAN, P1 = NAN, P2 = NAN, P = NAN, Ep = NAN, Q1 = NAN, Q2 = NAN, Q3 = NAN, Q = NAN, Eq = NAN, A1 = NAN, A2 = NAN, Discr = NAN;
+      Standard_Real Sigma = NAN, Psi = NAN, D1 = NAN, D2 = NAN, Sb = NAN, Omega = NAN, Sp3 = NAN, Y1 = NAN, Dbg = NAN, Sdbg = NAN, Den1 = NAN, Den2 = NAN;
+      Standard_Real U = NAN, H = NAN, Sq = NAN;
+      Standard_Integer Exp = 0;
 
       Beta  = B / A;
       Gamma = C / A;
index 7a2160087a1f6952bb40315ebd7111bdccddb979..f5dda5a634012b0bceb5e71f29e249e5fbb411c7 100644 (file)
@@ -98,8 +98,8 @@ private:
 
   Standard_Boolean Done;
   Standard_Boolean InfiniteStatus;
-  Standard_Integer NbSol;
-  Standard_Real TheRoots[4];
+  Standard_Integer NbSol{};
+  Standard_Real TheRoots[4]{};
 
 
 };
index 1ab5e3682054776ef7bf6f8b672f216bca8c0af7..5250e43d9cd56a87fd7f2be24aa8cc661eedbd4e 100644 (file)
@@ -74,7 +74,7 @@ private:
 
 
   Standard_Address Addr;
-  Standard_Real Buf[16];
+  Standard_Real Buf[16]{};
   Standard_Boolean isAllocated;
   Standard_Integer LowR;
   Standard_Integer UppR;
index 5f965af747c1dd1b209f68ee8b0909ba10aa1c43..bd511522eded83668df344ff5a53da488efa6fdd 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math_EigenValuesSearcher.hxx>
 #include <StdFail_NotDone.hxx>
 
@@ -28,9 +30,9 @@ static inline Standard_Real pythag(const Standard_Real x,
 }
 
 math_EigenValuesSearcher::math_EigenValuesSearcher(const TColStd_Array1OfReal& Diagonal,
-                                                  const TColStd_Array1OfReal& Subdiagonal)
+                                                  const TColStd_Array1OfReal& Subdiagonal) : myIsDone(Standard_False)
 {
-  myIsDone = Standard_False;
+  
 
   Standard_Integer n = Diagonal.Length();
   if (Subdiagonal.Length() != n)
@@ -47,7 +49,7 @@ math_EigenValuesSearcher::math_EigenValuesSearcher(const TColStd_Array1OfReal& D
   Standard_Real* d  = new Standard_Real [n+1];
   Standard_Real* e  = new Standard_Real [n+1];
   Standard_Real** z = new Standard_Real* [n+1];
-  Standard_Integer i, j;
+  Standard_Integer i = 0, j = 0;
   for (i = 1; i <= n; i++)
     z[i] = new Standard_Real [n+1];
 
@@ -59,20 +61,20 @@ math_EigenValuesSearcher::math_EigenValuesSearcher(const TColStd_Array1OfReal& D
     for (j = 1; j <= n; j++)
       z[i][j] = (i == j)? 1. : 0.;
 
-  Standard_Boolean result;
-  Standard_Integer m;
-  Standard_Integer l;
-  Standard_Integer iter;
+  Standard_Boolean result = 0;
+  Standard_Integer m = 0;
+  Standard_Integer l = 0;
+  Standard_Integer iter = 0;
   //Standard_Integer i;
-  Standard_Integer k;
-  Standard_Real    s;
-  Standard_Real    r;
-  Standard_Real    p;
-  Standard_Real    g;
-  Standard_Real    f;
-  Standard_Real    dd;
-  Standard_Real    c;
-  Standard_Real    b;
+  Standard_Integer k = 0;
+  Standard_Real    s = NAN;
+  Standard_Real    r = NAN;
+  Standard_Real    p = NAN;
+  Standard_Real    g = NAN;
+  Standard_Real    f = NAN;
+  Standard_Real    dd = NAN;
+  Standard_Real    c = NAN;
+  Standard_Real    b = NAN;
 
   result = Standard_True;
 
@@ -191,7 +193,7 @@ math_Vector math_EigenValuesSearcher::EigenVector(const Standard_Integer Index)
 {
   math_Vector theVector(1, myN);
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = 1; i <= myN; i++)
     theVector(i) = myEigenVectors->Value(i, Index);
 
index 3adad8464380e5179874db95f9e99ace0073c183..830b705dac1d98ee7d8310aa8a42d7427a3f0143 100644 (file)
@@ -19,6 +19,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_BracketMinimum.hxx>
 #include <math_BrentMinimum.hxx>
 #include <math_FRPR.hxx>
@@ -45,18 +47,18 @@ public :
 
      void Initialize(const math_Vector& p0, const math_Vector& dir);
 
-     virtual Standard_Boolean Value(const Standard_Real x, Standard_Real& fval);
+     Standard_Boolean Value(const Standard_Real x, Standard_Real& fval) override;
 };
 
      DirFunctionTer::DirFunctionTer(math_Vector& V1, 
                               math_Vector& V2,
                               math_Vector& V3,
-                              math_MultipleVarFunction& f) {
+                              math_MultipleVarFunction& f) : P0(&V1), Dir(&V2), P(&V3), F(&f) {
+        
+        
+        
+        
         
-        P0  = &V1;
-        Dir = &V2;
-        P   = &V3;
-        F   = &f;
      }
 
      void DirFunctionTer::Initialize(const math_Vector& p0, 
@@ -80,7 +82,7 @@ static Standard_Boolean MinimizeDirection(math_Vector& P,
                                  Standard_Real& Result,
                                  DirFunctionTer& F) {
 
-     Standard_Real ax, xx, bx;
+     Standard_Real ax = NAN, xx = NAN, bx = NAN;
 
      F.Initialize(P, Dir);
      math_BracketMinimum Bracket(F, 0.0, 1.0);
@@ -138,10 +140,10 @@ math_FRPR::~math_FRPR()
 void  math_FRPR::Perform(math_MultipleVarFunctionWithGradient& F,
                          const math_Vector& StartingPoint)
 {
-       Standard_Boolean Good;
+       Standard_Boolean Good = 0;
        Standard_Integer n = TheLocation.Length();
-       Standard_Integer j, its;
-       Standard_Real gg, gam, dgg;
+       Standard_Integer j = 0, its = 0;
+       Standard_Real gg = NAN, gam = NAN, dgg = NAN;
 
        math_Vector g(1, n), h(1, n);
  
index b5c680b7f1a40984dcef45b6b968f540cbecb330..59a4047be14fe906a2e0ad51cdb8824f6de74a96 100644 (file)
@@ -19,6 +19,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_FunctionAllRoots.hxx>
 #include <math_FunctionRoots.hxx>
 #include <math_FunctionSample.hxx>
@@ -29,18 +31,18 @@ math_FunctionAllRoots::math_FunctionAllRoots (
                            math_FunctionWithDerivative& F,
                           const math_FunctionSample& S,
                           const Standard_Real EpsX, const Standard_Real EpsF,
-                          const Standard_Real EpsNul) {
+                          const Standard_Real EpsNul) : done(Standard_False) {
 
-    done=Standard_False;
+    
 
 
 
-    Standard_Boolean Nul, PNul, InterNul, Nuld, Nulf;
+    Standard_Boolean Nul = 0, PNul = 0, InterNul = 0, Nuld = 0, Nulf = 0;
     Standard_Real DebNul = 0., FinNul = 0.;
     Standard_Integer Indd = 0, Indf = 0;
-    Standard_Real cst,val,valsav=0,valbid;
-    Standard_Boolean fini;
-    Standard_Integer Nbp,i;
+    Standard_Real cst = NAN,val = NAN,valsav=0,valbid = NAN;
+    Standard_Boolean fini = 0;
+    Standard_Integer Nbp = 0,i = 0;
 
     Nbp=S.NbPoints();
     F.Value(S.GetParameter(1),val);
@@ -162,7 +164,7 @@ math_FunctionAllRoots::math_FunctionAllRoots (
     }
     else {
       Standard_Integer NbpMin = 3;
-      Standard_Integer Nbrpt;
+      Standard_Integer Nbrpt = 0;
       if (!Nuld) {          // Recherche des solutions entre S.GetParameter(1) 
                             // et le debut du 1er intervalle nul
 
index 397f06de7876e832dc5440b0125b8729f16624a1..8b1c96be86d8d02ebaec10d6cf2f00e1f4fc68ed 100644 (file)
@@ -33,17 +33,17 @@ class math_MyFunctionSetWithDerivatives : public math_FunctionSetWithDerivatives
 
     math_MyFunctionSetWithDerivatives (math_FunctionWithDerivative& F );
     
-    Standard_Integer NbVariables () const;
-    Standard_Integer NbEquations () const;
-    Standard_Boolean Value (const math_Vector& X, math_Vector& F) ;
-    Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) ;    
-    Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) ;    
+    Standard_Integer NbVariables () const override;
+    Standard_Integer NbEquations () const override;
+    Standard_Boolean Value (const math_Vector& X, math_Vector& F) override ;
+    Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) override ;    
+    Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) override ;    
 };
 
 
     math_MyFunctionSetWithDerivatives::math_MyFunctionSetWithDerivatives
-              (math_FunctionWithDerivative& F ) {
-                  Ff = &F ;
+              (math_FunctionWithDerivative& F ) : Ff(&F) {
+                  
      
              }
     
index 331e59119501e3ccd4b77b09f2bab5c27a71fbf4..16f8a5785a80aa85313bbe0d846683b469d9fe7b 100644 (file)
@@ -97,7 +97,7 @@ private:
 
   Standard_Boolean Done;
   Standard_Real TheRoot;
-  Standard_Real TheError;
+  Standard_Real TheError{};
   Standard_Real TheDerivative;
   Standard_Integer NbIter;
 
index 0f9b9ee8aa03f9c4040da2ccad24b0d08bd74a8c..baed50f0efe8ba3552d3fa16ba347b68867eacef 100644 (file)
@@ -19,6 +19,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_DirectPolynomialRoots.hxx>
 #include <math_FunctionRoots.hxx>
 #include <math_FunctionWithDerivative.hxx>
@@ -44,7 +46,7 @@ public:
     : myF (&theF)
   {}
 
-  virtual Standard_Boolean Value(const Standard_Real theX, Standard_Real& theFval)
+  Standard_Boolean Value(const Standard_Real theX, Standard_Real& theFval) override
   {
     return myF->Derivative(theX, theFval);
   }
@@ -59,7 +61,7 @@ static void  AppendRoot(TColStd_SequenceOfReal& Sol,
                        const Standard_Real dX) { 
 
   Standard_Integer n=Sol.Length();
-  Standard_Real t;
+  Standard_Real t = NAN;
 #ifdef OCCT_DEBUG
  if (myDebug) {
    std::cout << "   Ajout de la solution numero : " << n+1 << std::endl;
@@ -120,7 +122,7 @@ static void  Solve(math_FunctionWithDerivative& F,
 
   Standard_Integer iter=0;
   Standard_Real tols2 = 0.5*tol;
-  Standard_Real a,b,c,d=0,e=0,fa,fb,fc,p,q,r,s,tol1,xm,min1,min2;
+  Standard_Real a = NAN,b = NAN,c = NAN,d=0,e=0,fa = NAN,fb = NAN,fc = NAN,p = NAN,q = NAN,r = NAN,s = NAN,tol1 = NAN,xm = NAN,min1 = NAN,min2 = NAN;
   a=x1;b=c=x2;fa=y1; fb=fc=y2;
   for(iter=1;iter<=ITMAX;iter++) { 
     if((fb>0.0 && fc>0.0) || (fb<0.0 && fc<0.0)) { 
@@ -133,9 +135,9 @@ static void  Solve(math_FunctionWithDerivative& F,
     xm=0.5*(c-b);
     if(Abs(xm)<tol1 || fb==0) { 
       //-- On tente une iteration de newton
-      Standard_Real Xp,Yp,Dp;      
+      Standard_Real Xp = NAN,Yp = NAN,Dp = NAN;      
       Standard_Integer itern=5;
-      Standard_Boolean Ok;
+      Standard_Boolean Ok = 0;
       Xp=b;
       do { 
        Ok = F.Values(Xp,Yp,Dp);
@@ -261,9 +263,9 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
     //-- recherche d un intervalle ou F(xi) et F(xj) sont de signes differents
     //-- A .............................................................. B
     //-- X0   X1   X2 ........................................  Xn-1      Xn
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Real X=X0;
-    Standard_Boolean Ok;
+    Standard_Boolean Ok = 0;
     double dx = (XN-X0)/N;
     TColStd_Array1OfReal ptrval(0, N);
     Standard_Integer Nvalid = -1;
@@ -295,10 +297,10 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
     else { 
       //-- Il y a des points hors tolerance 
       //-- on detecte les changements de signes STRICTS 
-      Standard_Integer ip1;
+      Standard_Integer ip1 = 0;
 //      Standard_Boolean chgtsign=Standard_False;
       Standard_Real tol = EpsX;
-      Standard_Real X2;
+      Standard_Real X2 = NAN;
       for(i=0,ip1=1,X=X0;i<N; i++,ip1++,X+=dx) { 
         X2=X+dx;
         if(X2 > XN) X2 = XN;
@@ -328,14 +330,14 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
 //       Standard_Real Val,Deriv;
          X=X0+i*dx;
           if (X>XN) X=XN;
-         Standard_Real u0,u1;
+         Standard_Real u0 = NAN,u1 = NAN;
          u0=dx*0.5;      u1=X+u0;        u0+=X;
          if(u0<X0)  u0=X0;
          if(u0>XN)  u0=XN;
          if(u1<X0)  u1=X0;
          if(u1>XN)  u1=XN;
 
-         Standard_Real y0,y1;
+         Standard_Real y0 = NAN,y1 = NAN;
          F.Value(u0,y0); y0-=K;
          F.Value(u1,y1); y1-=K;
          if(y0*y1 < 0.0) { 
@@ -364,9 +366,9 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
       //-- On reprend une discretisation plus fine au voisinage de ces extremums
       //--
       //-- Recherche d un minima positif
-      Standard_Real xm,ym,dym,xm1,xp1;
+      Standard_Real xm = NAN,ym = NAN,dym = NAN,xm1 = NAN,xp1 = NAN;
       Standard_Real majdx = 5.0*dx;
-      Standard_Boolean Rediscr;
+      Standard_Boolean Rediscr = 0;
 //      Standard_Real ptrvalbis[MAXBIS];
       Standard_Integer im1=0;
       ip1=2;
@@ -460,7 +462,7 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
           //-- et |f(x0)| > |f(x1)|   et |f(x3)| > |f(x2)|
           //--
           //-- En entree : a=xm-dx  b=xm c=xm+dx
-          Standard_Real x1, x2, f0, f3;
+          Standard_Real x1 = NAN, x2 = NAN, f0 = NAN, f3 = NAN;
           Standard_Real R = 0.61803399;
           Standard_Real C = 1.0 - R;
           Standard_Real tolCR = NEpsX*10.0;
@@ -470,7 +472,7 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
 
           if (Abs(x3 - xm) > Abs(x0 - xm)) { x1 = xm; x2 = xm + C*(x3 - xm); }
           else                        { x2 = xm; x1 = xm - C*(xm - x0); }
-          Standard_Real f1, f2;
+          Standard_Real f1 = NAN, f2 = NAN;
           F.Value(x1, f1); f1 -= K;
           F.Value(x2, f2); f2 -= K;
           //-- printf("\n *************** RECHERCHE MINIMUM **********\n");
index 51801a43135aa04155d0017c5690659766fbfdc6..96e3a4658d7d825cc877698c4a80530061490143 100644 (file)
@@ -25,6 +25,8 @@
 //#endif
 //math_FunctionSetRoot.cxx
 
+#include <math.h>
+
 #include <math_BrentMinimum.hxx>
 #include <math_Function.hxx>
 #include <math_FunctionSetRoot.hxx>
@@ -91,7 +93,7 @@ public :
   //     Standard_Boolean MyDirFunction::Value(const math_Vector& Sol, math_Vector& FF,
   //                                      math_Matrix& DF, math_Vector& GH, 
   //                                      Standard_Real& F2, Standard_Real& Gnr1);
-  Standard_Boolean Value(const Standard_Real x, Standard_Real& fval) ;
+  Standard_Boolean Value(const Standard_Real x, Standard_Real& fval) override ;
 
 };
 
@@ -99,13 +101,13 @@ MyDirFunction::MyDirFunction(math_Vector& V1,
                              math_Vector& V2,
                              math_Vector& V3,
                              math_Vector& V4,
-                             math_FunctionSetWithDerivatives& f) {
+                             math_FunctionSetWithDerivatives& f) : P0(&V1), Dir(&V2), P(&V3), FV(&V4), F(&f) {
 
-                               P0  = &V1;
-                               Dir = &V2;
-                               P   = &V3;
-                               FV =  &V4;
-                               F   = &f;
+                               
+                               
+                               
+                               
+                               
 }
 
 void MyDirFunction::Initialize(const math_Vector& p0, 
@@ -119,7 +121,7 @@ void MyDirFunction::Initialize(const math_Vector& p0,
 Standard_Boolean MyDirFunction::Value(const Standard_Real x, 
                                       Standard_Real& fval) 
 {
-  Standard_Real p;
+  Standard_Real p = NAN;
   for(Standard_Integer i = P->Lower(); i <= P->Upper(); i++) {
     p = Dir->Value(i);
     P->Value(i) = p * x + P0->Value(i);
@@ -199,9 +201,9 @@ static Standard_Boolean MinimizeDirection(const math_Vector&   P0,
                                           //-------------------------------------------------------
 {
   // (1) Evaluation d'un tolerance parametrique 1D
-  Standard_Real tol1d = 2.1 , invnorme, tsol;
+  Standard_Real tol1d = 2.1 , invnorme = NAN, tsol = NAN;
   Standard_Real Eps = 1.e-16;
-  Standard_Real ax, bx, cx;
+  Standard_Real ax = NAN, bx = NAN, cx = NAN;
 
   for (Standard_Integer ii =1; ii<=Tol.Length(); ii++) {
     invnorme = Abs(Delta(ii));
@@ -211,8 +213,8 @@ static Standard_Boolean MinimizeDirection(const math_Vector&   P0,
   tol1d /= 3; 
 
   //JR/Hp :
-  math_Vector PP0 = P0 ;
-  math_Vector PP1 = P1 ;
+  const math_Vector& PP0 = P0 ;
+  const math_Vector& PP1 = P1 ;
   Delta = PP1 - PP0;
   //  Delta = P1 - P0;
   invnorme = Delta.Norm();
@@ -261,7 +263,7 @@ static Standard_Boolean MinimizeDirection(const math_Vector&   P,
   // (0) Evaluation d'un tolerance parametrique 1D
   Standard_Boolean good = Standard_False;
   Standard_Real Eps = 1.e-20;
-  Standard_Real tol1d = 1.1, Result = PValue, absdir;
+  Standard_Real tol1d = 1.1, Result = PValue, absdir = NAN;
 
   for (Standard_Integer ii =1; ii<=Tol.Length(); ii++) {
     absdir = Abs(Dir(ii));
@@ -270,7 +272,7 @@ static Standard_Boolean MinimizeDirection(const math_Vector&   P,
   if (tol1d > 0.9) return Standard_False;
 
   // (1) On realise une premiere interpolation quadratique
-  Standard_Real ax, bx, cx, df1, df2, Delta, tsol, fsol, tsolbis;
+  Standard_Real ax = NAN, bx = NAN, cx = NAN, df1 = NAN, df2 = NAN, Delta = NAN, tsol = NAN, fsol = NAN, tsolbis = NAN;
   FSR_DEBUG("     essai d interpolation");
 
   df1 = Gradient*Dir;
@@ -426,7 +428,7 @@ static void SearchDirection(const math_Matrix& DF,
 
   Standard_Real ratio = Abs( Direction(Direction.Lower())
     *InvLengthMax(Direction.Lower()) );
-  Standard_Integer i;
+  Standard_Integer i = 0;
   for (i = Direction.Lower()+1; i<=Direction.Upper(); i++) {
     ratio = Max(ratio,  Abs( Direction(i)*InvLengthMax(i)) );
   }
@@ -463,7 +465,7 @@ static void SearchDirection(const math_Matrix& DF,
                             //=====================================================================
 {
   Standard_Integer Ninc = DF.ColNumber(), Neq = DF.RowNumber();
-  Standard_Integer i, j, k, Cons = 0;
+  Standard_Integer i = 0, j = 0, k = 0, Cons = 0;
 
   // verification sur les bornes imposees:
 
@@ -540,7 +542,7 @@ Standard_Boolean Bounds(const math_Vector&  InfBound,
                         //======================================================
 {
   Standard_Boolean Out = Standard_False;
-  Standard_Integer i, Ninc = Sol.Length();
+  Standard_Integer i = 0, Ninc = Sol.Length();
   Standard_Real    monratio = 1;
 
   theIsNewSol = Standard_True;
@@ -710,13 +712,13 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F,
     (theInfBound.Length() != Ninc)     ||
     (theSupBound.Length() != Ninc))  { throw Standard_DimensionError(); }
 
-  Standard_Integer i;
+  Standard_Integer i = 0;
   Standard_Boolean ChangeDirection = Standard_False, Sort = Standard_False, isNewSol = Standard_False;
-  Standard_Boolean Good, Verif;
-  Standard_Boolean Stop;
+  Standard_Boolean Good = 0, Verif = 0;
+  Standard_Boolean Stop = 0;
   const Standard_Real EpsSqrt = 1.e-16, Eps = 1.e-32, Eps2 = 1.e-64, Progres = 0.005;
-  Standard_Real F2, PreviousMinimum, Dy, OldF;
-  Standard_Real Ambda, Ambda2, Gnr1, Oldgr;
+  Standard_Real F2 = NAN, PreviousMinimum = NAN, Dy = NAN, OldF = NAN;
+  Standard_Real Ambda = NAN, Ambda2 = NAN, Gnr1 = NAN, Oldgr = NAN;
   math_Vector InvLengthMax(1, Ninc); // Pour bloquer les pas a 1/4 du domaine
   math_IntegerVector aConstraints(1, Ninc); // Pour savoir sur quels bord on se trouve
   for (i = 1; i <= Ninc ; i++) {
@@ -726,7 +728,7 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F,
   }
 
   MyDirFunction F_Dir(Temp1, Temp2, Temp3, Temp4, F);
-  Standard_Integer  DescenteIter;
+  Standard_Integer  DescenteIter = 0;
 
   Done = Standard_False;
   Sol = StartingPoint;
@@ -863,7 +865,7 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F,
       Stop = Standard_False;
       Good = Standard_False;
       DescenteIter = 0;
-      Standard_Boolean Sortbis;
+      Standard_Boolean Sortbis = 0;
 
       // -------------------------------------------------
       // Traitement standard sans traitement des bords
index 7760db66f866e6714119cfc95c99e958f16db812..dd3c3f5be8d794fdf6e262401c473b8166d5d4ba 100644 (file)
 
 math_Gauss::math_Gauss(const math_Matrix& A, 
                        const Standard_Real MinPivot, 
-                       const Message_ProgressRange& theProgress) 
-                           : LU   (1, A.RowNumber(), 1, A.ColNumber()),
-  Index(1, A.RowNumber()),
+                       const Message_ProgressRange& theProgress) :
+  LU(A), Index(1, A.RowNumber()),
   D (0.0),
   Done (Standard_False)
 {
       math_NotSquare_Raise_if(A.RowNumber() != A.ColNumber(), " ");     
-      LU = A;
+      
       Standard_Integer Error = LU_Decompose(LU, 
                                   Index, 
                                   D,
@@ -88,7 +87,7 @@ math_Gauss::math_Gauss(const math_Matrix& A,
        Standard_Integer LowerCol = Inv.LowerCol();
        math_Vector Column(1, LU.UpperRow());
 
-       Standard_Integer I, J;
+       Standard_Integer I = 0, J = 0;
        for(J = 1; J <= LU.UpperRow(); J++) {
          for(I = 1; I <= LU.UpperRow(); I++) {
            Column(I) = 0.0;
index c1307290364e57193d5517096234b8d91513f0f2..ddf9c4b15079e8065f04765a6dd79f1f9030c510 100644 (file)
@@ -74,11 +74,11 @@ protected:
 
 
 
-  Standard_Boolean Singular;
+  Standard_Boolean Singular{};
   math_Matrix LU;
   math_Matrix A2;
   math_IntegerVector Index;
-  Standard_Real D;
+  Standard_Real D{};
 
 
 private:
index e45ee83243da8e2903569b8f872777a0024e4b76..badb42a158a539aaea833f85ad2cb9a7818f1862 100644 (file)
@@ -40,6 +40,8 @@ de Gauss.
 
 //#endif
 
+#include <math.h>
+
 #include <math.hxx>
 #include <math_GaussMultipleIntegration.hxx>
 #include <math_IntegerVector.hxx>
@@ -79,20 +81,20 @@ class IntegrationFunction {
                        const Standard_Integer maxsav, const Standard_Integer NVar,
                        const math_IntegerVector& Ord,
                        const math_Vector& Lowsav,const  math_Vector& Uppsav):
-                        Ordsav(1, NVar),
-                        xr(1, NVar),
+                        Fsav(&F), Ordsav(1, NVar),
+                        NVarsav(NVar), xr(1, NVar),
                         xm(1, NVar),
                         GaussPoint(1, NVar, 1, maxsav),
-                        GaussWeight(1, NVar, 1, maxsav)
+                        GaussWeight(1, NVar, 1, maxsav), Done(Standard_False)
 {
 
-Standard_Integer i, k;
+Standard_Integer i = 0, k = 0;
 math_IntegerVector inc(1, NVar);
 inc.Init(0);
-Fsav = &F;
-NVarsav = NVar;
-Ordsav = Ord;
-Done = Standard_False;
+
+
+
+
 
 //Recuperation des points et poids de Gauss dans le fichier GaussPoints 
   for (i =1; i<= NVarsav; i++) {
@@ -131,14 +133,14 @@ Standard_Boolean IntegrationFunction::recursive_iteration(Standard_Integer& n,
 
 // Termination criterium :
 // Calcul de la valeur de la fonction aux points de Gauss fixes:
-       int local;
+       int local = 0;
    if (n == (NVarsav+1)) {
      math_Vector dx(1, NVarsav);
-     Standard_Integer j ;
+     Standard_Integer j = 0 ;
      for ( j = 1; j <= NVarsav; j++) {
        dx(j) = xr(j)* GaussPoint(j, inc(j));
      }
-     Standard_Real F1;
+     Standard_Real F1 = NAN;
      Standard_Boolean Ok = Fsav->Value(xm + dx, F1);
      if (!Ok) {return Standard_False;}; 
      Standard_Real Interm = 1;
@@ -164,11 +166,11 @@ math_GaussMultipleIntegration::
                 math_GaussMultipleIntegration(math_MultipleVarFunction& F,
                                              const math_Vector& Lower,
                                              const math_Vector& Upper,
-                                             const math_IntegerVector& Order)
+                                             const math_IntegerVector& Order) : Done(Standard_False)
 {
   Standard_Integer MaxOrder = math::GaussPointsMax();
 
-  Standard_Integer i,  max =0;
+  Standard_Integer i = 0,  max =0;
   Standard_Integer NVar = F.NbVariables();  
   math_IntegerVector Ord(1, NVar);
   math_Vector Lowsav(1, NVar);
@@ -176,7 +178,7 @@ math_GaussMultipleIntegration::
   Lowsav = Lower;
   Uppsav = Upper;
 //  Ord = Order;
-  Done = Standard_False;
+  
   for (i = 1; i <= NVar; i++) {
     if (Order(i) > MaxOrder) {
       Ord(i) = MaxOrder;
index b51bfc8552164e87a496f9232fe0079b455e78b3..ed731e570e30d1d55f467220bec30b36860a138d 100644 (file)
@@ -19,6 +19,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math.hxx>
 #include <math_FunctionSet.hxx>
 #include <math_GaussSetIntegration.hxx>
@@ -30,11 +32,11 @@ math_GaussSetIntegration::math_GaussSetIntegration(math_FunctionSet& F,
                                                     const math_Vector& Lower,
                                                     const math_Vector& Upper,
                                                     const math_IntegerVector& Order)
-                          : Val(1, F.NbEquations()) {
+                          : Val(1, F.NbEquations()), Done(Standard_False) {
 
    Standard_Integer NbEqua = F.NbEquations() , NbVar = F.NbVariables();
-   Standard_Integer i;
-   Standard_Boolean IsOk;
+   Standard_Integer i = 0;
+   Standard_Boolean IsOk = 0;
    math_Vector FVal1(1, NbEqua), FVal2(1, NbEqua), Tval(1, NbVar); 
 
 
@@ -44,12 +46,12 @@ math_GaussSetIntegration::math_GaussSetIntegration(math_FunctionSet& F,
             "GaussSetIntegration ");
 
 // Initialisations
-   Done = Standard_False;
+   
 
    Standard_Real Xdeb = Lower.Value( Lower.Lower() );
    Standard_Real Xfin = Upper.Value( Upper.Lower() );
    Standard_Integer Ordre = Order.Value(Order.Lower());
-   Standard_Real Xm, Xr;
+   Standard_Real Xm = NAN, Xr = NAN;
    math_Vector GaussP(1, Ordre), GaussW(1, Ordre);
 
 // Recuperation des points de Gauss dans le fichier GaussPoints.
index f79c140f7f6d2ff85626d7f36259f0016dae70fa..c491d33b32f01d87b725a9b88a1fe02947c00d0b 100644 (file)
@@ -44,6 +44,8 @@ Etapes du calcul:
 
 //#endif
 
+#include <math.h>
+
 #include <math.hxx>
 #include <math_Function.hxx>
 #include <math_GaussSingleIntegration.hxx>
@@ -75,7 +77,7 @@ math_GaussSingleIntegration::
   const Standard_Integer IterMax = 13;   // Max number of iteration
   Standard_Integer NIter = 1;            // current number of iteration
   Standard_Integer NbInterval = 1;       // current number of subintervals
-  Standard_Real    dU,OldLen,Len;
+  Standard_Real    dU = NAN,OldLen = NAN,Len = NAN;
 
   Perform(F, Lower, Upper, theOrder);
   Len = Val;
@@ -101,10 +103,10 @@ void math_GaussSingleIntegration::Perform(math_Function& F,
                                          const Standard_Real Upper,
                                          const Standard_Integer Order)
 {
-  Standard_Real xr, xm, dx;
-  Standard_Integer j;
-  Standard_Real F1, F2;
-  Standard_Boolean Ok1;
+  Standard_Real xr = NAN, xm = NAN, dx = NAN;
+  Standard_Integer j = 0;
+  Standard_Real F1 = NAN, F2 = NAN;
+  Standard_Boolean Ok1 = 0;
   math_Vector GaussP(1, Order);
   math_Vector GaussW(1, Order);
   Done = Standard_False;
index 67a3bbe2cf76701c5d01747c6fa8f77515a9a162..87cbec146ae33d1de2fd1d785fbc5b14e31f1e7d 100644 (file)
@@ -74,8 +74,8 @@ private:
   Standard_EXPORT void Perform (math_Function& F, const Standard_Real Lower, const Standard_Real Upper, const Standard_Integer Order);
 
 
-  Standard_Real Val;
-  Standard_Boolean Done;
+  Standard_Real Val{};
+  Standard_Boolean Done{};
 
 
 };
index 83642409184d696b654e4f5ea53a7fb6411234ac..7eacd222d11bbaecd3aa733e7fec685346550204 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement
 
+#include <math.h>
+
 #include <math_GlobOptMin.hxx>
 
 #include <math_BFGS.hxx>
@@ -55,13 +57,13 @@ math_GlobOptMin::math_GlobOptMin(math_MultipleVarFunction* theFunc,
                                  const Standard_Real theC,
                                  const Standard_Real theDiscretizationTol,
                                  const Standard_Real theSameTol)
-: myN(theFunc->NbVariables()),
+: myFunc(theFunc), myN(theFunc->NbVariables()),
   myA(1, myN),
   myB(1, myN),
   myGlobA(1, myN),
   myGlobB(1, myN),
-  myIsConstLocked(Standard_False),
-  myX(1, myN),
+  myC(theC), myInitC(theC), myIsFindSingleSolution(Standard_False), myFunctionalMinimalValue(-Precision::Infinite()), myIsConstLocked(Standard_False),
+  myZ(-1), mySolCount(0), myX(1, myN),
   myTmp(1, myN),
   myV(1, myN),
   myMaxV(1, myN),
@@ -70,15 +72,15 @@ math_GlobOptMin::math_GlobOptMin(math_MultipleVarFunction* theFunc,
   myCont(2),
   myF(Precision::Infinite())
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
-  myFunc = theFunc;
-  myC = theC;
-  myInitC = theC;
-  myIsFindSingleSolution = Standard_False;
-  myFunctionalMinimalValue = -Precision::Infinite();
-  myZ = -1;
-  mySolCount = 0;
+  
+  
+  
+  
+  
+  
+  
 
   for(i = 1; i <= myN; i++)
   {
@@ -117,7 +119,7 @@ void math_GlobOptMin::SetGlobalParams(math_MultipleVarFunction* theFunc,
                                       const Standard_Real theDiscretizationTol,
                                       const Standard_Real theSameTol)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   myFunc = theFunc;
   myC = theC;
@@ -155,7 +157,7 @@ void math_GlobOptMin::SetGlobalParams(math_MultipleVarFunction* theFunc,
 void math_GlobOptMin::SetLocalParams(const math_Vector& theLocalA,
                                      const math_Vector& theLocalB)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   myZ = -1;
   for(i = 1; i <= myN; i++)
@@ -271,7 +273,7 @@ Standard_Boolean math_GlobOptMin::computeLocalExtremum(const math_Vector& thePnt
                                                        Standard_Real& theVal,
                                                        math_Vector& theOutPnt)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
   //Newton method
   if (myCont >= 2 &&
@@ -346,14 +348,14 @@ void math_GlobOptMin::computeInitialValues()
   const Standard_Real aMaxLC = 1000.;
   const Standard_Real aMinEps = 0.1;
   const Standard_Real aMaxEps = 100.;
-  Standard_Integer i;
+  Standard_Integer i = 0;
   math_Vector aCurrPnt(1, myN);
   math_Vector aBestPnt(1, myN);
   math_Vector aParamStep(1, myN);
   Standard_Real aCurrVal = RealLast();
 
   // Lipchitz const approximation.
-  Standard_Real aLipConst = 0.0, aPrevValDiag, aPrevValProj;
+  Standard_Real aLipConst = 0.0, aPrevValDiag = NAN, aPrevValProj = NAN;
   Standard_Integer aPntNb = 13;
   myFunc->Value(myA, aPrevValDiag);
   aPrevValProj = aPrevValDiag;
@@ -389,15 +391,15 @@ void math_GlobOptMin::computeInitialValues()
 //=======================================================================
 void math_GlobOptMin::computeGlobalExtremum(Standard_Integer j)
 {
-  Standard_Integer i;
-  Standard_Real d = RealLast(), aPrevVal; // Functional in original and moved points.
+  Standard_Integer i = 0;
+  Standard_Real d = RealLast(), aPrevVal = NAN; // Functional in original and moved points.
   Standard_Real val = RealLast(); // Local extrema computed in moved point.
   Standard_Real aStepBestValue = RealLast();
   math_Vector aStepBestPoint(1, myN);
   Standard_Boolean isInside = Standard_False,
                    isReached = Standard_False;
 
-  Standard_Real r1, r2, r;
+  Standard_Real r1 = NAN, r2 = NAN, r = NAN;
 
   for(myX(j) = myA(j) + myE1; !isReached; myX(j) += myV(j))
   {
@@ -479,7 +481,7 @@ void math_GlobOptMin::computeGlobalExtremum(Standard_Integer j)
 //=======================================================================
 Standard_Boolean math_GlobOptMin::isInside(const math_Vector& thePnt)
 {
-  Standard_Integer i;
+  Standard_Integer i = 0;
 
  for(i = 1; i <= myN; i++)
  {
@@ -495,7 +497,7 @@ Standard_Boolean math_GlobOptMin::isInside(const math_Vector& thePnt)
 //=======================================================================
 Standard_Boolean math_GlobOptMin::isStored(const math_Vector& thePnt)
 {
-  Standard_Integer i,j;
+  Standard_Integer i = 0,j = 0;
   Standard_Boolean isSame = Standard_True;
   math_Vector aTol(1, myN);
   aTol = (myB -  myA) * mySameTol;
@@ -559,7 +561,7 @@ Standard_Boolean math_GlobOptMin::isStored(const math_Vector& thePnt)
 //=======================================================================
 void math_GlobOptMin::Points(const Standard_Integer theIndex, math_Vector& theSol)
 {
-  Standard_Integer j;
+  Standard_Integer j = 0;
 
   for(j = 1; j <= myN; j++)
     theSol(j) = myY((theIndex - 1) * myN + j);
@@ -598,7 +600,7 @@ Standard_Boolean math_GlobOptMin::CheckFunctionalStopCriteria()
 //=======================================================================
 void math_GlobOptMin::ComputeInitSol()
 {
-  Standard_Real aVal;
+  Standard_Real aVal = NAN;
   math_Vector aPnt(1, myN);
 
   // Check functional value in midpoint. It is necessary since local optimization
index b2941e7caa9d2a4508b441fd5ff5fd3f9b9aa2f1..2ae21fe6761cb9700abd9a25f63fa952fbe06d99 100644 (file)
@@ -261,19 +261,19 @@ private:
 
   // Algorithm data.
   Standard_Real myZ;
-  Standard_Real myE1; // Border coefficient.
-  Standard_Real myE2; // Minimum step size.
-  Standard_Real myE3; // Local extrema starting parameter.
+  Standard_Real myE1{}; // Border coefficient.
+  Standard_Real myE2{}; // Minimum step size.
+  Standard_Real myE3{}; // Local extrema starting parameter.
 
   math_Vector myX; // Current modified solution.
   math_Vector myTmp; // Current modified solution.
   math_Vector myV; // Steps array.
   math_Vector myMaxV; // Max Steps array.
-  Standard_Real myLastStep; // Last step.
+  Standard_Real myLastStep{}; // Last step.
 
   NCollection_Array1<Standard_Real> myCellSize;
   Standard_Integer myMinCellFilterSol;
-  Standard_Boolean isFirstCellFilterInvoke;
+  Standard_Boolean isFirstCellFilterInvoke{};
   NCollection_CellFilter<NCollection_CellFilter_Inspector> myFilter;
 
   // Continuity of local borders.
index 152bdeccc13c582e70ee43da5ebe4c90447d5eac..60aecc6e4ed6202e14a209db0b2893b466768688 100644 (file)
@@ -19,6 +19,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_Householder.hxx>
 #include <math_Matrix.hxx>
 #include <Standard_DimensionError.hxx>
@@ -39,12 +41,12 @@ math_Householder::math_Householder(const math_Matrix& A, const math_Vector& B,
                                    const Standard_Real EPS):
                                    Sol(1, A.ColNumber(), 1, 1),
                                    Q(1, A.RowNumber(), 
-                                     1, A.ColNumber()) {
+                                     1, A.ColNumber()), mylowerArow(A.LowerRow()), mylowerAcol(A.LowerCol()), myupperArow(A.UpperRow()), myupperAcol(A.UpperCol()) {
 
-  mylowerArow = A.LowerRow();
-  mylowerAcol = A.LowerCol();
-  myupperArow = A.UpperRow();
-  myupperAcol = A.UpperCol();
+  
+  
+  
+  
   math_Matrix B1(1, B.Length(), 1, 1);
   B1.SetCol(1, B);
   Perform(A, B1, EPS);
@@ -57,12 +59,12 @@ math_Householder::math_Householder(const math_Matrix& A, const math_Matrix& B,
                                    Sol(1, A.ColNumber(), 
                                        1, B.ColNumber()),
                                    Q(1, A.RowNumber(), 
-                                     A.LowerCol(), A.UpperCol()) {
+                                     A.LowerCol(), A.UpperCol()), mylowerArow(A.LowerRow()), mylowerAcol(A.LowerCol()), myupperArow(A.UpperRow()), myupperAcol(A.UpperCol()) {
 
-  mylowerArow = A.LowerRow();
-  mylowerAcol = A.LowerCol();
-  myupperArow = A.UpperRow();
-  myupperAcol = A.UpperCol();
+  
+  
+  
+  
   Perform(A, B, EPS);
 }
 
@@ -76,11 +78,11 @@ math_Householder::math_Householder(const math_Matrix& A, const math_Matrix& B,
                                    Sol(1, upperAcol-lowerAcol+1, 
                                        1, B.ColNumber()),
                                    Q(1, upperArow-lowerArow+1, 
-                                     1, upperAcol-lowerAcol+1) {
-  mylowerArow = lowerArow;
-  myupperArow = upperArow;
-  mylowerAcol = lowerAcol;
-  myupperAcol = upperAcol;
+                                     1, upperAcol-lowerAcol+1), mylowerArow(lowerArow), myupperArow(upperArow), mylowerAcol(lowerAcol), myupperAcol(upperAcol) {
+  
+  
+  
+  
 
   Perform(A, B, EPS);
 }
@@ -89,10 +91,10 @@ math_Householder::math_Householder(const math_Matrix& A, const math_Matrix& B,
 void math_Householder::Perform(const math_Matrix& A, const math_Matrix& B, 
                                const Standard_Real EPS) {
 
-  Standard_Integer i, j, k, n, l, m;
-  Standard_Real scale, f, g, h = 0., alfaii;
-  Standard_Real qki;
-  Standard_Real cj;
+  Standard_Integer i = 0, j = 0, k = 0, n = 0, l = 0, m = 0;
+  Standard_Real scale = NAN, f = NAN, g = NAN, h = 0., alfaii = NAN;
+  Standard_Real qki = NAN;
+  Standard_Real cj = NAN;
   n = Q.ColNumber();
   l = Q.RowNumber();
   m = B.ColNumber();
index 8c5e4f6af50de041279076646a4ed6451b139e1a..e36666da67c5156bc33329f5a2b04bae3cbdbce1 100644 (file)
@@ -108,7 +108,7 @@ private:
 
   math_Matrix Sol;
   math_Matrix Q;
-  Standard_Boolean Done;
+  Standard_Boolean Done{};
   Standard_Integer mylowerArow;
   Standard_Integer myupperArow;
   Standard_Integer mylowerAcol;
index 60541a3e95a3306a78944182adf6ef65f08ac645..3674db4b431b3a835b758ca5fab2bae2c5833fee 100644 (file)
@@ -110,8 +110,8 @@ Standard_Integer math_IntegerVector::Min() const
 
 void math_IntegerVector::Invert()
 {
-  Standard_Integer J;
-  Standard_Integer Temp;
+  Standard_Integer J = 0;
+  Standard_Integer Temp = 0;
 
   for(Standard_Integer Index = Lower(); Index <= Lower() + Length() / 2 ; Index++)
   {
index e076b4b1fa64d4e74fc0acbccfdfbbfc73bd6cfa..d3b7c5ab7d60086416070f3cefcdf74b676f7ab0 100644 (file)
 #include <math_NotSquare.hxx>
 #include <math_Recipes.hxx>
 
-math_Jacobi::math_Jacobi(const math_Matrix& A) : AA(1, A.RowNumber(), 
-                                                    1, A.RowNumber()),
-                                                 EigenValues(1, A.RowNumber()),
+math_Jacobi::math_Jacobi(const math_Matrix& A) : AA(A), EigenValues(1, A.RowNumber()),
                                                  EigenVectors(1, A.RowNumber(),
                                                               1, A.RowNumber()) {
 
     math_NotSquare_Raise_if(A.RowNumber() != A.ColNumber(), " ");  
 
-    AA = A;
+    
     Standard_Integer Error = Jacobi(AA, EigenValues, EigenVectors, NbRotations);      
     if(!Error) {
       Done = Standard_True;
index 9133c2d99cd93afbf49732ee943b7c45af7bc98a..cd085ea0b22248e42ccb5a4ab972e18b3241f6f5 100644 (file)
@@ -84,7 +84,7 @@ private:
 
   Standard_Boolean Done;
   math_Matrix AA;
-  Standard_Integer NbRotations;
+  Standard_Integer NbRotations{};
   math_Vector EigenValues;
   math_Matrix EigenVectors;
 
index 3b11e029d4834ace700263e98b05559c88971a4a..07388f26b21f92fd70fdadf7b5708697cccd03e7 100644 (file)
@@ -3951,7 +3951,7 @@ Standard_Boolean math::KronrodPointsAndWeights(const Standard_Integer  Index,
 
   if (Index <= 123) {
     // Get points from the array.
-    Standard_Integer i;
+    Standard_Integer i = 0;
     Standard_Integer aStartInd = 0;
 
     // Compute the index of starting point in the array.
index 880e7137f24cbd2dfdc3860137adb6c59fa8f3b2..d4e0a4dc66b55d8e0fc605a93ea153a30f4c576a 100644 (file)
@@ -14,6 +14,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math.hxx>
 #include <math_Function.hxx>
 #include <math_KronrodSingleIntegration.hxx>
@@ -195,9 +197,9 @@ void math_KronrodSingleIntegration::Perform
   anErrors.Append(myAbsolutError);
   aValues.Append(myValue);
 
-  Standard_Integer i, nint, nbints;
+  Standard_Integer i = 0, nint = 0, nbints = 0;
 
-  Standard_Real maxerr;
+  Standard_Real maxerr = NAN;
   Standard_Integer count = 0;
 
   while(myErrorReached > theTolerance && myNbIterReached < theMaxNbIter) {
@@ -216,7 +218,7 @@ void math_KronrodSingleIntegration::Perform
     Standard_Real b = anIntervals(nint+1);
     Standard_Real c = 0.5*(a + b);
 
-    Standard_Real v1, v2, e1, e2;
+    Standard_Real v1 = NAN, v2 = NAN, e1 = NAN, e2 = NAN;
     
     myIsDone = GKRule(theFunction, a, c, aGaussP, aGaussW, aKronrodP, aKronrodW, 
                    v1, e1);
@@ -273,16 +275,16 @@ Standard_Boolean math_KronrodSingleIntegration::GKRule(
                                     Standard_Real&    theError)
 {
 
-  Standard_Boolean IsDone;
+  Standard_Boolean IsDone = 0;
   
   Standard_Integer aNKronrod = theKronrodP.Length();
 
-  Standard_Real    aGaussVal;
+  Standard_Real    aGaussVal = NAN;
   Standard_Integer aNPnt2 = (aNKronrod + 1)/2;
-  Standard_Integer i;
-  Standard_Real    aDx;
-  Standard_Real    aVal1;
-  Standard_Real    aVal2;
+  Standard_Integer i = 0;
+  Standard_Real    aDx = NAN;
+  Standard_Real    aVal1 = NAN;
+  Standard_Real    aVal2 = NAN;
 
   math_Vector      f1(1, aNPnt2-1);
   math_Vector      f2(1, aNPnt2-1);
index 072a406a86f69436b2c1eff40d3082b36e58c1b1..8ff4591ca1bf64d63c6b2e59dbc6066e009881f5 100644 (file)
@@ -103,9 +103,9 @@ private:
   Standard_Boolean myIsDone;
   Standard_Real myValue;
   Standard_Real myErrorReached;
-  Standard_Real myAbsolutError;
+  Standard_Real myAbsolutError{};
   Standard_Integer myNbPntsReached;
-  Standard_Integer myNbIterReached;
+  Standard_Integer myNbIterReached{};
 
 
 };
index 5fa865e74774edf60aedf1fec50caa446fb7e883..2ffb36a8878600696e7f2adc9136c7597dff6883 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math_Gauss.hxx>
 #include <math_Matrix.hxx>
 #include <math_NotSquare.hxx>
@@ -134,7 +136,7 @@ void math_Matrix::Transpose()
   Standard_Integer Row = LowerRowIndex;
   Standard_Integer Col = LowerColIndex;
   SetLowerCol(LowerRowIndex);
-  Standard_Real Temp;
+  Standard_Real Temp = NAN;
   for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
     for(Standard_Integer J = I; J <= UpperColIndex; J++) {
       Temp = Array(I, J);
@@ -392,7 +394,7 @@ math_Matrix  math_Matrix::Multiplied (const math_Matrix& Right) const
   math_Matrix Result(LowerRowIndex,       UpperRowIndex,
                     Right.LowerColIndex, Right.UpperColIndex);
   
-  Standard_Real Som;
+  Standard_Real Som = NAN;
   for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
     for(Standard_Integer J2 = Right.LowerColIndex; J2 <= Right.UpperColIndex; J2++) {
       Som = 0.0;
@@ -415,7 +417,7 @@ math_Matrix  math_Matrix::TMultiply (const math_Matrix& Right) const
   math_Matrix Result(LowerColIndex,       UpperColIndex,
                     Right.LowerColIndex, Right.UpperColIndex);
   
-  Standard_Real Som;
+  Standard_Real Som = NAN;
   for(Standard_Integer I = LowerColIndex; I <= UpperColIndex; I++) {
     for(Standard_Integer J2 = Right.LowerColIndex; J2 <= Right.UpperColIndex; J2++) {
       Som = 0.0;
@@ -508,7 +510,7 @@ void  math_Matrix::Multiply(const math_Matrix&  Left,
                                  || (ColNumber() != Right.ColNumber()),
                                     "math_Matrix::Multiply() - matrices have incompatible dimensions");
 
-  Standard_Real Som;
+  Standard_Real Som = NAN;
   Standard_Integer I1 = Left.LowerRowIndex;
   for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
     Standard_Integer J2 = Right.LowerColIndex;  
@@ -536,7 +538,7 @@ void math_Matrix::TMultiply(const math_Matrix& TLeft,
                                  || (ColNumber() != Right.ColNumber()),
                                     "math_Matrix::TMultiply() - matrices have incompatible dimensions");
   
-  Standard_Real Som;
+  Standard_Real Som = NAN;
   Standard_Integer I1 = TLeft.LowerColIndex;
   for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
     Standard_Integer J2 = Right.LowerColIndex;  
@@ -610,7 +612,7 @@ void math_Matrix::Multiply(const math_Matrix& Right)
   Standard_DimensionError_Raise_if (ColNumber() != Right.RowNumber(),
                                     "math_Matrix::Multiply() - input matrix has incompatible dimensions");
   
-  Standard_Real Som;
+  Standard_Real Som = NAN;
   for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
     for(Standard_Integer J2 = Right.LowerColIndex; J2 <= Right.UpperColIndex; J2++) {
       Som = 0.0;
index 233d0b822f90170fd33b20063d992d1415746882..96d03c0bd300926b1ef43f64a111271245c532aa 100644 (file)
@@ -13,6 +13,8 @@
 // commercial license or contractual agreement.
 
 
+#include <math.h>
+
 #include <math_FunctionWithDerivative.hxx>
 #include <math_NewtonFunctionRoot.hxx>
 #include <StdFail_NotDone.hxx>
@@ -23,17 +25,17 @@ math_NewtonFunctionRoot::math_NewtonFunctionRoot (math_FunctionWithDerivative& F
                                                  const Standard_Real EpsF , 
                                                  const Standard_Real A,
                                                  const Standard_Real B,
-                                                 const Standard_Integer NbIterations ){
-  EpsilonX = EpsX;
-  EpsilonF = EpsF;
-  Binf = A;
-  Bsup = B;
-  Itermax = NbIterations;
-  Done = Standard_False;
-  X = RealLast();
-  DFx = 0;
-  Fx = RealLast();
-  It = 0;
+                                                 const Standard_Integer NbIterations ) : EpsilonX(EpsX), EpsilonF(EpsF), Binf(A), Bsup(B), Itermax(NbIterations), Done(Standard_False), X(RealLast()), DFx(0), Fx(RealLast()), It(0){
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
   Perform(F, Guess);
 }
 
@@ -42,18 +44,18 @@ math_NewtonFunctionRoot::math_NewtonFunctionRoot (const Standard_Real A ,
                                                  const Standard_Real B, 
                                                  const Standard_Real EpsX , 
                                                  const Standard_Real EpsF , 
-                                                 const Standard_Integer NbIterations ){
-  
-  Binf = A;
-  Bsup = B;
-  EpsilonX = EpsX;
-  EpsilonF = EpsF;
-  Itermax = NbIterations;
-  Done = Standard_False;
-  X = RealLast();
-  DFx = 0;
-  Fx = RealLast();
-  It = 0;
+                                                 const Standard_Integer NbIterations ) : Binf(A), Bsup(B), EpsilonX(EpsX), EpsilonF(EpsF), Itermax(NbIterations), Done(Standard_False), X(RealLast()), DFx(0), Fx(RealLast()), It(0){
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 }
 
 
@@ -61,17 +63,17 @@ math_NewtonFunctionRoot::math_NewtonFunctionRoot (math_FunctionWithDerivative& F
                                                  const Standard_Real Guess, 
                                                  const Standard_Real EpsX , 
                                                  const Standard_Real EpsF , 
-                                                 const Standard_Integer NbIterations ){
-  EpsilonX = EpsX;
-  EpsilonF = EpsF;
-  Itermax = NbIterations;
-  Binf = RealFirst();
-  Bsup = RealLast();
-  Done = Standard_False;
-  X = RealLast();
-  DFx = 0;
-  Fx = RealLast();
-  It = 0;
+                                                 const Standard_Integer NbIterations ) : EpsilonX(EpsX), EpsilonF(EpsF), Itermax(NbIterations), Binf(RealFirst()), Bsup(RealLast()), Done(Standard_False), X(RealLast()), DFx(0), Fx(RealLast()), It(0){
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
   Perform(F, Guess);
 }
 
@@ -79,9 +81,9 @@ math_NewtonFunctionRoot::math_NewtonFunctionRoot (math_FunctionWithDerivative& F
 void   math_NewtonFunctionRoot::Perform(math_FunctionWithDerivative& F,
                                        const Standard_Real Guess) {
   
-  Standard_Real Dx;
-  Standard_Boolean Ok;
-  Standard_Real AA, BB;
+  Standard_Real Dx = NAN;
+  Standard_Boolean Ok = 0;
+  Standard_Real AA = NAN, BB = NAN;
   
   //--------------------------------------------------
   //-- lbr le 12 Nov 97
index 8c695f8853e88ace7bdcf50af548b5a738be726a..8db8b6b7c5d2f1d4871c627acd3d719e24f444a9 100644 (file)
@@ -19,6 +19,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_FunctionSetWithDerivatives.hxx>
 #include <math_NewtonFunctionSetRoot.hxx>
 #include <math_Recipes.hxx>
@@ -117,9 +119,9 @@ void math_NewtonFunctionSetRoot::Perform(
                            const math_Vector& SupBound) 
 {
 
-  Standard_Real d;
-  Standard_Boolean OK;
-  Standard_Integer Error;
+  Standard_Real d = NAN;
+  Standard_Boolean OK = 0;
+  Standard_Integer Error = 0;
   
   Done = Standard_False;
   Sol = StartingPoint;
index 89ae93f952c2543ad9289322232c990829b68d45..117faef876a80cfad526a248b8fc2415b334abd9 100644 (file)
@@ -21,6 +21,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_Gauss.hxx>
 #include <math_Jacobi.hxx>
 #include <math_MultipleVarFunctionWithHessian.hxx>
@@ -95,8 +97,8 @@ void math_NewtonMinimum::Perform(math_MultipleVarFunctionWithHessian& F,
   math_Vector* auxiliaire = precedent;
 
   Standard_Boolean Ok = Standard_True;
-  Standard_Integer NbConv = 0, ii, Nreduction;
-  Standard_Real    VPrecedent, VItere
+  Standard_Integer NbConv = 0, ii = 0, Nreduction = 0;
+  Standard_Real    VPrecedent = NAN, VItere = NAN
 
   Done = Standard_True;
   TheStatus = math_OK;
index b9e1323ec9b1370cd5f336c59f5eaf163df189e8..16408f0f8952aee5e5ec6c9f7f29fd6fadc41a7b 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <math.h>
+
 #include <math_PSO.hxx>
 
 #include <math_BullardGenerator.hxx>
@@ -30,19 +32,12 @@ math_PSO::math_PSO(math_MultipleVarFunction* theFunc,
                    const math_Vector& theSteps,
                    const Standard_Integer theNbParticles,
                    const Standard_Integer theNbIter)
-: myLowBorder(1, theFunc->NbVariables()),
-  myUppBorder(1, theFunc->NbVariables()),
-  mySteps(1, theFunc->NbVariables())
-{
-  myN = theFunc->NbVariables();
-  myNbParticles = theNbParticles;
-  myNbIter = theNbIter;
-  myFunc = theFunc;
-
-  myLowBorder = theLowBorder;
-  myUppBorder = theUppBorder;
-  mySteps     = theSteps;
-}
+: myFunc(theFunc),
+  myLowBorder(theLowBorder),
+  myUppBorder(theUppBorder), mySteps(theSteps),
+  myN(theFunc->NbVariables()), myNbParticles(theNbParticles),
+  myNbIter(theNbIter)
+{}
 
 //=======================================================================
 //function : math_PSO
@@ -78,7 +73,7 @@ void math_PSO::Perform(const math_Vector& theSteps,
 
   // Generate initial particles distribution.
   Standard_Boolean isRegularGridFinished = Standard_False;
-  Standard_Real aCurrValue;
+  Standard_Real aCurrValue = NAN;
   math_Vector   aCurrPoint(1, myN);
 
   PSO_Particle* aParticle = aPool.GetWorstParticle();
@@ -89,7 +84,7 @@ void math_PSO::Perform(const math_Vector& theSteps,
 
     if (aCurrValue < aParticle->Distance)
     {
-      Standard_Integer aDimIdx;
+      Standard_Integer aDimIdx = 0;
       for(aDimIdx = 0; aDimIdx < myN; ++aDimIdx)
       {
         aParticle->Position[aDimIdx] = aCurrPoint(aDimIdx + 1);
index 8fd5dc28cb0005fd9b3b541363f51b222cfe4bdd..fa436f6f980c67800a59fd5fdfff4d3234e17524 100644 (file)
@@ -27,13 +27,13 @@ math_PSOParticlesPool::math_PSOParticlesPool(const Standard_Integer theParticles
   myMemory(0, theParticlesCount * (theDimensionCount  // Position
                                  + theDimensionCount  // Velocity
                                  + theDimensionCount) // BestPosition
-                                 - 1) 
+                                 - 1), myParticlesCount(theParticlesCount), myDimensionCount(theDimensionCount) 
 {
-  myParticlesCount = theParticlesCount;
-  myDimensionCount = theDimensionCount;
+  
+  
   myMemory.Init(0.);
   // Pointers adjusting.
-  Standard_Integer aParIdx, aShiftIdx;
+  Standard_Integer aParIdx = 0, aShiftIdx = 0;
   for(aParIdx = 1; aParIdx <= myParticlesCount; ++aParIdx)
   {
     aShiftIdx = (theDimensionCount * 3) * (aParIdx - 1);
index 14b3dbd83abaf84194b97e0da886efe0066f7cef..fe23d915dc1239406a91fcb509ee3b8ac5abdd57 100644 (file)
@@ -19,6 +19,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_BracketMinimum.hxx>
 #include <math_BrentMinimum.hxx>
 #include <math_Function.hxx>
@@ -47,17 +49,17 @@ class DirFunctionBis : public math_Function {
 
     void Initialize(const math_Vector& p0, const math_Vector& dir);
 
-    virtual Standard_Boolean Value(const Standard_Real x, Standard_Real& fval);
+    Standard_Boolean Value(const Standard_Real x, Standard_Real& fval) override;
 };
 
  DirFunctionBis::DirFunctionBis(math_Vector& V1,
                          math_Vector& V2,
                          math_Vector& V3,
-                         math_MultipleVarFunction& f) {
-   P0 = &V1;
-   Dir = &V2;
-   P = &V3;
-   F = &f;
+                         math_MultipleVarFunction& f) : P0(&V1), Dir(&V2), P(&V3), F(&f) {
+   
+   
+   
+   
  }
 
 
@@ -83,9 +85,9 @@ static Standard_Boolean MinimizeDirection(math_Vector& P,
                                 Standard_Real& Result,
                                 DirFunctionBis& F) {
 
-  Standard_Real ax;
-  Standard_Real xx;
-  Standard_Real bx;
+  Standard_Real ax = NAN;
+  Standard_Real xx = NAN;
+  Standard_Real bx = NAN;
 
 
   F.Initialize(P, Dir);
@@ -146,8 +148,8 @@ void math_Powell::Perform(math_MultipleVarFunction& F,
                           const math_Matrix& StartingDirections)
 {
   Done = Standard_False;
-  Standard_Integer i, ibig, j;
-  Standard_Real t, fptt, del;
+  Standard_Integer i = 0, ibig = 0, j = 0;
+  Standard_Real t = NAN, fptt = NAN, del = NAN;
   Standard_Integer n = TheLocation.Length();
   math_Vector pt(1,n);
   math_Vector ptt(1,n);
index d8da2fd77f38a2006561e2a98ba1fd5387500a10..88edb7f0ecec0a0d7308980f34674ab7bc7afead 100644 (file)
@@ -18,6 +18,8 @@
 #define No_Standard_DimensionError
 //#endif
 
+#include <math.h>
+
 #include <cmath>
 
 #include <math_Recipes.hxx>
@@ -55,8 +57,8 @@ static inline Standard_Real PYTHAG (const Standard_Real a, const Standard_Real b
 
 static void EigenSort(math_Vector& d, math_Matrix& v) { // descending order
 
-      Standard_Integer k, i, j;
-      Standard_Real p;
+      Standard_Integer k = 0, i = 0, j = 0;
+      Standard_Real p = NAN;
       Standard_Integer n = d.Length();
 
       for(i = 1; i < n; i++) {
@@ -78,8 +80,8 @@ static void EigenSort(math_Vector& d, math_Matrix& v) { // descending order
 Standard_Integer Jacobi(math_Matrix& a, math_Vector& d, math_Matrix& v, Standard_Integer& nrot) {
 
       Standard_Integer n = a.RowNumber();
-      Standard_Integer j, iq, ip, i;
-      Standard_Real tresh, theta, tau, t, sm, s, h, g, c;
+      Standard_Integer j = 0, iq = 0, ip = 0, i = 0;
+      Standard_Real tresh = NAN, theta = NAN, tau = NAN, t = NAN, sm = NAN, s = NAN, h = NAN, g = NAN, c = NAN;
       math_Vector b(1, n);
       math_Vector z(1, n);
 
@@ -166,8 +168,8 @@ Standard_Integer LU_Decompose(math_Matrix& a,
                      Standard_Real    TINY,
                      const Message_ProgressRange& theProgress) { 
 
-     Standard_Integer i, imax=0, j, k;
-     Standard_Real big, dum, sum, temp;
+     Standard_Integer i = 0, imax=0, j = 0, k = 0;
+     Standard_Real big = NAN, dum = NAN, sum = NAN, temp = NAN;
 
      Standard_Integer n = a.RowNumber();
      d = 1.0;
@@ -247,8 +249,8 @@ void LU_Solve(const math_Matrix& a,
               const math_IntegerVector& indx, 
               math_Vector& b) {
 
-     Standard_Integer i, ii = 0, ip, j;
-     Standard_Real sum;
+     Standard_Integer i = 0, ii = 0, ip = 0, j = 0;
+     Standard_Real sum = NAN;
 
      Standard_Integer n=a.RowNumber();
      Standard_Integer nblow=b.Lower()-1;
@@ -276,8 +278,8 @@ Standard_Integer LU_Invert(math_Matrix& a) {
      math_Matrix inv(1, n, 1, n);
      math_Vector col(1, n);
      math_IntegerVector indx(1, n);
-     Standard_Real d;
-     Standard_Integer i, j;
+     Standard_Real d = NAN;
+     Standard_Integer i = 0, j = 0;
 
      Standard_Integer Error = LU_Decompose(a, indx, d);
      if(!Error) {
@@ -313,8 +315,8 @@ Standard_Integer SVD_Decompose(math_Matrix& a,
                      math_Matrix& v,
                      math_Vector& rv1) {
 
-     Standard_Integer flag, i, its, j, jj, k, l=0, nm=0;
-     Standard_Real ar, aw, aik, aki, c, f, h, s, x, y, z;
+     Standard_Integer flag = 0, i = 0, its = 0, j = 0, jj = 0, k = 0, l=0, nm=0;
+     Standard_Real ar = NAN, aw = NAN, aik = NAN, aki = NAN, c = NAN, f = NAN, h = NAN, s = NAN, x = NAN, y = NAN, z = NAN;
      Standard_Real anorm = 0.0, g = 0.0, scale = 0.0;
      Standard_Integer m = a.RowNumber();
      Standard_Integer n = a.ColNumber();
@@ -537,8 +539,8 @@ void SVD_Solve(const math_Matrix& u,
                const math_Vector& b,
                math_Vector& x) {
 
-     Standard_Integer jj, j, i;
-     Standard_Real s;
+     Standard_Integer jj = 0, j = 0, i = 0;
+     Standard_Real s = NAN;
 
      Standard_Integer m = u.RowNumber();
      Standard_Integer n = u.ColNumber();
@@ -565,11 +567,11 @@ Standard_Integer DACTCL_Decompose(math_Vector& a,
                        const math_IntegerVector& indx,
                         const Standard_Real MinPivot) {
 
-     Standard_Integer i, j, Neq = indx.Length();
-     Standard_Integer jr, jd, jh, is, ie, k, ir, id, ih, mh;
-     Standard_Integer idot, idot1, idot2;
-     Standard_Real aa, d, dot;
-     Standard_Boolean diag;
+     Standard_Integer i = 0, j = 0, Neq = indx.Length();
+     Standard_Integer jr = 0, jd = 0, jh = 0, is = 0, ie = 0, k = 0, ir = 0, id = 0, ih = 0, mh = 0;
+     Standard_Integer idot = 0, idot1 = 0, idot2 = 0;
+     Standard_Real aa = NAN, d = NAN, dot = NAN;
+     Standard_Boolean diag = 0;
 
      jr = 0;
      for (j = 1; j <= Neq; j++) {
@@ -633,10 +635,10 @@ Standard_Integer DACTCL_Solve(const math_Vector& a,
                    const math_IntegerVector& indx,
                     const Standard_Real MinPivot) {
 
-     Standard_Integer i, j, Neq = indx.Length();
-     Standard_Integer jr, jd, jh, is, k, id;
-     Standard_Integer jh1, idot, idot1, idot2;
-     Standard_Real aa, d, dot;
+     Standard_Integer i = 0, j = 0, Neq = indx.Length();
+     Standard_Integer jr = 0, jd = 0, jh = 0, is = 0, k = 0, id = 0;
+     Standard_Integer jh1 = 0, idot = 0, idot1 = 0, idot2 = 0;
+     Standard_Real aa = NAN, d = NAN, dot = NAN;
 
      jr = 0;
      for (j = 1; j <= Neq; j++) {
index 88c8d7d89955db03ab2cfb27188ec9a600933085..140d845ae51ce222acc6cb77a88c8fb28b138c8c 100644 (file)
 math_SVD::math_SVD (const math_Matrix& A) :
    U    (1, Max(A.RowNumber(),A.ColNumber()), 1, A.ColNumber()) ,
    V    (1, A.ColNumber(), 1, A.ColNumber()),
-   Diag (1, A.ColNumber())
+   Diag (1, A.ColNumber()), RowA(A.RowNumber())
 {
    U.Init(0.0);
-   RowA = A.RowNumber() ;
+   
    U.Set(1, A.RowNumber(), 1, A.ColNumber(), A) ;
    Standard_Integer Error = SVD_Decompose(U, Diag, V) ;
    Done = (!Error) ? Standard_True : Standard_False ;
@@ -60,7 +60,7 @@ void math_SVD::Solve (const math_Vector& B,
 void  math_SVD::PseudoInverse (math_Matrix& Result,
                               const Standard_Real Eps)
 {
-   Standard_Integer i, j ;
+   Standard_Integer i = 0, j = 0 ;
 
    StdFail_NotDone_Raise_if(!Done, " ");
 
index 692fa3153caea3a410cd58544cf3b6a232190448..f6ab9aaa932c96a941c3a35fb60a0f772986225d 100644 (file)
@@ -24,6 +24,8 @@
 #define No_Standard_DimensionError
 //#endif
 
+#include <math.h>
+
 #include <math_TrigonometricFunctionRoots.hxx>
 #include <math_TrigonometricEquationFunction.hxx>
 #include <math_DirectPolynomialRoots.hxx>
@@ -87,12 +89,12 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,
                                              const Standard_Real InfBound, 
                                              const Standard_Real SupBound) {
 
-  Standard_Integer i, j=0, k, l, NZer=0, Nit = 10;
-  Standard_Real Depi, Delta, Mod, AA, BB, CC, MyBorneInf;
-  Standard_Real Teta, X;
-  Standard_Real Eps, Tol1 = 1.e-15;
+  Standard_Integer i = 0, j=0, k = 0, l = 0, NZer=0, Nit = 10;
+  Standard_Real Depi = NAN, Delta = NAN, Mod = NAN, AA = NAN, BB = NAN, CC = NAN, MyBorneInf = NAN;
+  Standard_Real Teta = NAN, X = NAN;
+  Standard_Real Eps = NAN, Tol1 = 1.e-15;
   TColStd_Array1OfReal ko(1,5), Zer(1,4);
-  Standard_Boolean Flag4;
+  Standard_Boolean Flag4 = 0;
   InfiniteStatus = Standard_False;
   Done = Standard_True;
 
@@ -333,7 +335,7 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,
     ko(3) = 2.0*E-2.0*A;
     ko(4) = 4.0*B+2.0*D;
     ko(5) = A+C+E;
-    Standard_Boolean bko;
+    Standard_Boolean bko = 0;
     Standard_Integer nbko=0;
     do { 
       bko=Standard_False;
@@ -352,7 +354,7 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,
        InfiniteStatus = Standard_True;
        return;
       }
-      Standard_Boolean triok;
+      Standard_Boolean triok = 0;
       do { 
        triok=Standard_True;
        for(i=1;i<NZer;i++) { 
index f4d4c69e5ed53f91ef675e5bf8c9a69a8359c7c8..81e98f009881a6abcf6f941c4bd2eae37e4973fe 100644 (file)
@@ -30,6 +30,8 @@
 
 //#endif
 
+#include <math.h>
+
 #include <math_Crout.hxx>
 #include <math_Matrix.hxx>
 #include <math_Uzawa.hxx>
@@ -74,10 +76,10 @@ void math_Uzawa::Perform(const math_Matrix& Cont, const math_Vector& Secont,
                         const Standard_Real EpsLix, const Standard_Real EpsLic,
                         const Standard_Integer NbIterations)  {
 
-  Standard_Integer i,j, k;
-  Standard_Real scale;
-  Standard_Real Normat, Normli, Xian, Xmax=0, Xmuian;
-  Standard_Real Rho, Err, Err1, ErrMax=0, Coef = 1./Sqrt(2.);
+  Standard_Integer i = 0,j = 0, k = 0;
+  Standard_Real scale = NAN;
+  Standard_Real Normat = NAN, Normli = NAN, Xian = NAN, Xmax=0, Xmuian = NAN;
+  Standard_Real Rho = NAN, Err = NAN, Err1 = NAN, ErrMax=0, Coef = 1./Sqrt(2.);
   Standard_Integer Nlig = Cont.RowNumber();
   Standard_Integer Ncol = Cont.ColNumber();
 
index da914e1e94cb1866bcbd8dd2c49fd0f4a974536f..bee185521cf1143c5294014f20445cc4e80ebdb6 100644 (file)
@@ -123,8 +123,8 @@ private:
   math_Vector Errinit;
   math_Vector Vardua;
   math_Matrix CTCinv;
-  Standard_Integer NbIter;
-  Standard_Boolean Done;
+  Standard_Integer NbIter{};
+  Standard_Boolean Done{};
 
 
 };