]> OCCT Git - occt-copy.git/commitdiff
0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
authorDBV <>
Fri, 16 Dec 2011 08:50:03 +0000 (08:50 +0000)
committerbugmaster <bugmaster@opencascade.com>
Mon, 5 Mar 2012 15:31:33 +0000 (19:31 +0400)
438 files changed:
src/AIS/AIS.cxx
src/AIS/AIS_AngleDimension.cxx
src/AIS/AIS_Circle.cxx
src/AIS/AIS_ConcentricRelation.cxx
src/AIS/AIS_DiameterDimension.cxx
src/AIS/AIS_EllipseRadiusDimension.cxx
src/AIS/AIS_EqualDistanceRelation.cxx
src/AIS/AIS_EqualRadiusRelation.cxx
src/AIS/AIS_FixRelation.cxx
src/AIS/AIS_IdenticRelation.cxx
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_LengthDimension.cxx
src/AIS/AIS_MidPointRelation.cxx
src/AIS/AIS_RadiusDimension.cxx
src/AIS/AIS_TangentRelation.cxx
src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx
src/Adaptor3d/Adaptor3d_SurfaceOfRevolution.cxx
src/Adaptor3d/Adaptor3d_TopolTool.cxx
src/AppParCurves/AppParCurves_Variational.gxx
src/ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx
src/Aspect/Aspect_CircularGrid.cxx
src/Aspect/Aspect_MarkerStyle.cxx
src/Aspect/Aspect_RectangularGrid.cxx
src/BOP/BOP_WireSplitter.cxx
src/BOPTools/BOPTools_PaveFiller_3.cxx
src/BOPTools/BOPTools_Tools2D.cxx
src/BOPTools/BOPTools_Tools3D.cxx
src/BRepAlgo/BRepAlgo_DSAccess.cxx
src/BRepBlend/BRepBlend_RstRstConstRad.cxx
src/BRepBlend/BRepBlend_RstRstEvolRad.cxx
src/BRepBlend/BRepBlend_SurfRstConstRad.cxx
src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx
src/BRepCheck/BRepCheck_Wire.cxx
src/BRepFeat/BRepFeat.cxx
src/BRepFeat/BRepFeat_MakeLinearForm.cxx
src/BRepFeat/BRepFeat_MakeRevol.cxx
src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx
src/BRepFeat/BRepFeat_RibSlot.cxx
src/BRepFill/BRepFill.cxx
src/BRepFill/BRepFill_CompatibleWires.cxx
src/BRepFill/BRepFill_Draft.cxx
src/BRepFill/BRepFill_Evolved.cxx
src/BRepFill/BRepFill_Filling.cxx
src/BRepFill/BRepFill_MultiLine.cxx
src/BRepFill/BRepFill_OffsetWire.cxx
src/BRepFill/BRepFill_Sweep.cxx
src/BRepFill/BRepFill_TrimShellCorner.cxx
src/BRepFill/BRepFill_TrimSurfaceTool.cxx
src/BRepGProp/BRepGProp_Face.cxx
src/BRepLib/BRepLib.cxx
src/BRepMesh/BRepMesh_Classifier.cxx
src/BRepOffset/BRepOffset.cxx
src/BRepOffset/BRepOffset_MakeOffset.cxx
src/BRepOffset/BRepOffset_Offset.cxx
src/BRepOffset/BRepOffset_Tool.cxx
src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx
src/BRepPrim/BRepPrim_Cone.cxx
src/BRepPrim/BRepPrim_Sphere.cxx
src/BRepPrim/BRepPrim_Torus.cxx
src/BRepSweep/BRepSweep_Revol.cxx
src/BRepSweep/BRepSweep_Rotation.cxx
src/BRepTest/BRepTest_BasicCommands.cxx
src/BRepTest/BRepTest_ChamferCommands.cxx
src/BRepTest/BRepTest_CurveCommands.cxx
src/BRepTest/BRepTest_DraftAngleCommands.cxx
src/BRepTest/BRepTest_FeatureCommands.cxx
src/BRepTest/BRepTest_Fillet2DCommands.cxx
src/BRepTest/BRepTest_PrimitiveCommands.cxx
src/BRepTest/BRepTest_SurfaceCommands.cxx
src/BRepTest/BRepTest_SweepCommands.cxx
src/BRepToIGES/BRepToIGES_BRWire.cxx
src/BRepTools/BRepTools_WireExplorer.cxx
src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx
src/BiTgte/BiTgte_Blend.cxx
src/Bisector/Bisector_BisecAna.cxx
src/Bisector/Bisector_BisecCC.cxx
src/BlendFunc/BlendFunc.cxx
src/BlendFunc/BlendFunc_CSCircular.cxx
src/BlendFunc/BlendFunc_CSConstRad.cxx
src/BlendFunc/BlendFunc_ConstRad.cxx
src/BlendFunc/BlendFunc_EvolRad.cxx
src/BndLib/BndLib.cxx
src/BndLib/BndLib_AddSurface.cxx
src/BndLib/BndLib_Compute.gxx
src/CGM/CGM_Driver.cxx
src/CGM/cgmlib.hxx
src/CGM/cgmpar.h
src/CSLib/CSLib.cxx
src/ChFi2d/ChFi2d_Builder.cxx
src/ChFi3d/ChFi3d.cxx
src/ChFi3d/ChFi3d_Builder_0.cxx
src/ChFi3d/ChFi3d_Builder_1.cxx
src/ChFi3d/ChFi3d_Builder_2.cxx
src/ChFi3d/ChFi3d_Builder_C1.cxx
src/ChFi3d/ChFi3d_Builder_CnCrn.cxx
src/ChFi3d/ChFi3d_Builder_SpKP.cxx
src/ChFi3d/ChFi3d_ChBuilder.cxx
src/ChFi3d/ChFi3d_FilBuilder.cxx
src/ChFi3d/ChFi3d_FilBuilder_C2.cxx
src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCon.cxx
src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCyl.cxx
src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCon.cxx
src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCyl.cxx
src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.cxx
src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.cxx
src/ChFiKPart/ChFiKPart_ComputeData_Rotule.cxx
src/ChFiKPart/ChFiKPart_ComputeData_Sphere.cxx
src/Contap/Contap_ArcFunction.lxx
src/Contap/Contap_ContAna.cxx
src/Contap/Contap_ContourGen_2.gxx
src/Contap/Contap_SurfFunction.lxx
src/Convert/Convert_CircleToBSplineCurve.cxx
src/Convert/Convert_ConeToBSplineSurface.cxx
src/Convert/Convert_ConicToBSplineCurve.cxx
src/Convert/Convert_CylinderToBSplineSurface.cxx
src/Convert/Convert_EllipseToBSplineCurve.cxx
src/Convert/Convert_PolynomialCosAndSin.cxx
src/Convert/Convert_SphereToBSplineSurface.cxx
src/Convert/Convert_TorusToBSplineSurface.cxx
src/DBRep/DBRep.cxx
src/DDataStd/DDataStd.cxx
src/DDataStd/DDataStd_DatumCommands.cxx
src/DDataStd/DDataStd_DrawDriver.cxx
src/DDataStd/DDataStd_Sample.cxx
src/DNaming/DNaming_ModelingCommands.cxx
src/Draft/Draft_Modification.cxx
src/Draft/Draft_Modification_1.cxx
src/Draw/Draw_Display.cxx
src/Draw/Draw_GraphicCommands.cxx
src/Draw/Draw_VariableCommands.cxx
src/Draw/Draw_Viewer.cxx
src/DrawDim/DrawDim.cxx
src/DrawDim/DrawDim_PlanarAngle.cxx
src/DrawDim/DrawDim_PlanarDiameter.cxx
src/DrawFairCurve/DrawFairCurve_Batten.cxx
src/DrawTrSurf/DrawTrSurf.cxx
src/DsgPrs/DsgPrs.cxx
src/DsgPrs/DsgPrs_AnglePresentation.cxx
src/DsgPrs/DsgPrs_ConcentricPresentation.cxx
src/DsgPrs/DsgPrs_DiameterPresentation.cxx
src/DsgPrs/DsgPrs_EllipseRadiusPresentation.cxx
src/DsgPrs/DsgPrs_EqualDistancePresentation.cxx
src/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx
src/DsgPrs/DsgPrs_FixPresentation.cxx
src/DsgPrs/DsgPrs_IdenticPresentation.cxx
src/DsgPrs/DsgPrs_LengthPresentation.cxx
src/DsgPrs/DsgPrs_MidPointPresentation.cxx
src/DsgPrs/DsgPrs_RadiusPresentation.cxx
src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx
src/DsgPrs/DsgPrs_SymmetricPresentation.cxx
src/DsgPrs/DsgPrs_XYZAxisPresentation.cxx
src/ElCLib/ElCLib.cxx
src/ElSLib/ElSLib.cxx
src/Extrema/Extrema_ExtCS.cxx
src/Extrema/Extrema_ExtElC.cxx
src/Extrema/Extrema_ExtElC2d.cxx
src/Extrema/Extrema_ExtPElC.cxx
src/Extrema/Extrema_ExtPElC2d.cxx
src/Extrema/Extrema_ExtPElS.cxx
src/Extrema/Extrema_ExtPExtS.cxx
src/Extrema/Extrema_ExtPRevS.cxx
src/Extrema/Extrema_ExtPSOfRev.gxx
src/Extrema/Extrema_GExtCC2d.gxx
src/FairCurve/FairCurve_Batten.cxx
src/FairCurve/FairCurve_MinimalVariation.cxx
src/GC/GC_MakeConicalSurface.cxx
src/GC/GC_MakeTrimmedCone.cxx
src/GC/GC_MakeTrimmedCylinder.cxx
src/GProp/GProp_CelGProps.cxx
src/GccGeo/GccGeo_Circ2d2TanOn.gxx
src/GccGeo/GccGeo_Circ2d2TanRad.gxx
src/GccGeo/GccGeo_Circ2dTanOnRad.gxx
src/GccIter/GccIter_Circ2d2TanOn.gxx
src/GccIter/GccIter_Circ2d3Tan.gxx
src/GccIter/GccIter_Lin2dTanObl.gxx
src/Geom/Geom_Circle.cxx
src/Geom/Geom_ConicalSurface.cxx
src/Geom/Geom_CylindricalSurface.cxx
src/Geom/Geom_Ellipse.cxx
src/Geom/Geom_OffsetSurface.cxx
src/Geom/Geom_SphericalSurface.cxx
src/Geom/Geom_SurfaceOfRevolution.cxx
src/Geom/Geom_ToroidalSurface.cxx
src/Geom2d/Geom2d_Circle.cxx
src/Geom2d/Geom2d_Ellipse.cxx
src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx
src/Geom2dAdaptor/Geom2dAdaptor_Curve.lxx
src/GeomAdaptor/GeomAdaptor_Curve.cxx
src/GeomAdaptor/GeomAdaptor_Surface.cxx
src/GeomConvert/GeomConvert.cxx
src/GeomConvert/GeomConvert_1.cxx
src/GeomFill/GeomFill.cxx
src/GeomFill/GeomFill_CircularBlendFunc.cxx
src/GeomFill/GeomFill_ConstrainedFilling.cxx
src/GeomFill/GeomFill_CorrectedFrenet.cxx
src/GeomFill/GeomFill_DraftTrihedron.cxx
src/GeomFill/GeomFill_Frenet.cxx
src/GeomFill/GeomFill_GuideTrihedronPlan.cxx
src/GeomFill/GeomFill_LocationGuide.cxx
src/GeomFill/GeomFill_Pipe.cxx
src/GeomFill/GeomFill_QuasiAngularConvertor.cxx
src/GeomFill/GeomFill_SectionPlacement.cxx
src/GeomFill/GeomFill_Sweep.cxx
src/GeomFill/GeomFill_SweepSectionGenerator.cxx
src/GeomInt/GeomInt_IntSS_1.cxx
src/GeomInt/GeomInt_LineConstructor.cxx
src/GeomInt/GeomInt_LineTool.cxx
src/GeomLib/GeomLib_IsPlanarSurface.cxx
src/GeomPlate/GeomPlate_BuildAveragePlane.cxx
src/GeomPlate/GeomPlate_BuildPlateSurface.cxx
src/GeomPlate/GeomPlate_PlateG1Criterion.cxx
src/GeomToIGES/GeomToIGES_GeomCurve.cxx
src/GeomToIGES/GeomToIGES_GeomSurface.cxx
src/GeomToStep/GeomToStep_MakeConicalSurface.cxx
src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx
src/GeometryTest/GeometryTest_ConstraintCommands.cxx
src/GeometryTest/GeometryTest_FairCurveCommands.cxx
src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx
src/Graphic2d/Graphic2d_Circle.cxx
src/Graphic2d/Graphic2d_CircleMarker.cxx
src/Graphic2d/Graphic2d_Drawer.cxx
src/Graphic2d/Graphic2d_Ellips.cxx
src/Graphic2d/Graphic2d_EllipsMarker.cxx
src/Graphic2d/Graphic2d_HidingGraphicObject.cxx
src/Graphic2d/Graphic2d_Line.cxx
src/Graphic2d/Graphic2d_Paragraph.cxx
src/Graphic2d/Graphic2d_Primitive.pxx
src/Graphic2d/Graphic2d_Text.cxx
src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx
src/HLRAlgo/HLRAlgo.cxx
src/HLRBRep/HLRBRep.cxx
src/HLRBRep/HLRBRep_PolyAlgo.cxx
src/IGESDimen/IGESDimen_FlagNote.cxx
src/IGESDimen/IGESDimen_ToolDimensionDisplayData.cxx
src/IGESDimen/IGESDimen_ToolGeneralNote.cxx
src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx
src/IGESDimen/IGESDimen_ToolSectionedArea.cxx
src/IGESGeom/IGESGeom_CircularArc.cxx
src/IGESGeom/IGESGeom_ConicArc.cxx
src/IGESGeom/IGESGeom_ToolConicArc.cxx
src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx
src/IGESGraph/IGESGraph_Color.cxx
src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.cxx
src/IGESToBRep/IGESToBRep_BasicCurve.cxx
src/IGESToBRep/IGESToBRep_BasicSurface.cxx
src/IGESToBRep/IGESToBRep_TopoCurve.cxx
src/IGESToBRep/IGESToBRep_TopoSurface.cxx
src/IntAna/IntAna_Curve.cxx
src/IntAna/IntAna_IntConicQuad.cxx
src/IntAna/IntAna_IntQuadQuad.cxx
src/IntAna/IntAna_QuadQuadGeo.cxx
src/IntAna2d/IntAna2d_AnaIntersection_2.cxx
src/IntAna2d/IntAna2d_AnaIntersection_3.cxx
src/IntAna2d/IntAna2d_AnaIntersection_5.cxx
src/IntAna2d/IntAna2d_AnaIntersection_6.cxx
src/IntCurve/IntCurve_IConicTool.cxx
src/IntCurve/IntCurve_IntConicConic.cxx
src/IntCurve/IntCurve_IntConicConic_1.cxx
src/IntCurve/IntCurve_IntConicConic_Tool.hxx
src/IntCurve/IntCurve_IntConicCurveGen.gxx
src/IntCurve/IntCurve_IntConicCurveGen.lxx
src/IntCurve/IntCurve_IntCurveCurveGen.gxx
src/IntCurve/IntCurve_ProjectOnPConicTool.cxx
src/IntCurveSurface/IntCurveSurface_Inter.gxx
src/IntImpParGen/IntImpParGen_Intersector.gxx
src/IntPatch/IntPatch_ALine.cxx
src/IntPatch/IntPatch_ALineToWLine.cxx
src/IntPatch/IntPatch_GLine.cxx
src/IntPatch/IntPatch_ImpImpIntersection_0.gxx
src/IntPatch/IntPatch_ImpImpIntersection_2.gxx
src/IntPatch/IntPatch_ImpImpIntersection_4.gxx
src/IntPatch/IntPatch_ImpPrmIntersection.cxx
src/IntPatch/IntPatch_Intersection.cxx
src/IntPatch/IntPatch_LineConstructor.cxx
src/IntPatch/IntPatch_RstInt.cxx
src/IntTools/IntTools_FClass2d.cxx
src/IntTools/IntTools_FaceFace.cxx
src/IntTools/IntTools_LineConstructor.cxx
src/IntTools/IntTools_Tools.cxx
src/IntTools/IntTools_TopolTool.cxx
src/IntWalk/IntWalk_PWalking_1.gxx
src/IntWalk/IntWalk_PWalking_3.gxx
src/LProp/LProp_AnalyticCurInf.cxx
src/LocOpe/LocOpe.cxx
src/LocOpe/LocOpe_CSIntersector.cxx
src/LocOpe/LocOpe_CurveShapeIntersector.cxx
src/LocOpe/LocOpe_FindEdges.cxx
src/LocOpe/LocOpe_Generator.cxx
src/LocOpe/LocOpe_SplitShape.cxx
src/LocalAnalysis/LocalAnalysis_CurveContinuity.cxx
src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx
src/MAT2d/MAT2d_Tool2d.cxx
src/OpenGl/OpenGl_GraphicDriver_710.cxx
src/OpenGl/OpenGl_LightBox.cxx
src/OpenGl/OpenGl_tgl_all.hxx
src/OpenGl/OpenGl_triedron.cxx
src/PS/PS_Driver.cxx
src/Plate/Plate_FreeGtoCConstraint.cxx
src/PlotMgt/PlotMgt_PlotterDriver.cxx
src/PlotMgt/PlotMgt_fillpolyarc.cxx
src/Poly/Poly_MakeLoops.cxx
src/Primitives/Primitives_OneAxis.gxx
src/ProjLib/ProjLib_ComputeApprox.cxx
src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx
src/ProjLib/ProjLib_Cone.cxx
src/ProjLib/ProjLib_Cylinder.cxx
src/ProjLib/ProjLib_Sphere.cxx
src/ProjLib/ProjLib_Torus.cxx
src/Prs2d/Prs2d_Angle.cxx
src/Prs2d/Prs2d_Angle.lxx
src/Prs2d/Prs2d_Angularity.cxx
src/Prs2d/Prs2d_Arrow.cxx
src/Prs2d/Prs2d_Axis.cxx
src/Prs2d/Prs2d_Circularity.cxx
src/Prs2d/Prs2d_Concentric.cxx
src/Prs2d/Prs2d_Cylindric.cxx
src/Prs2d/Prs2d_Diameter.cxx
src/Prs2d/Prs2d_Diameter.lxx
src/Prs2d/Prs2d_DrawSymbol.cxx
src/Prs2d/Prs2d_Length.cxx
src/Prs2d/Prs2d_Length.lxx
src/Prs2d/Prs2d_LineProfile.cxx
src/Prs2d/Prs2d_Parallelism.cxx
src/Prs2d/Prs2d_Position.cxx
src/Prs2d/Prs2d_Radius.cxx
src/Prs2d/Prs2d_RadiusIndep.cxx
src/Prs2d/Prs2d_Repere.cxx
src/Prs2d/Prs2d_SurfProfile.cxx
src/Prs2d/Prs2d_SymCircular.cxx
src/Prs2d/Prs2d_SymTotal.cxx
src/Prs2d/Prs2d_Taper.cxx
src/Prs2d/Prs2d_ToleranceFrame.cxx
src/Prs3d/Prs3d_AnglePresentation.cxx
src/Prs3d/Prs3d_Arrow.cxx
src/Prs3d/Prs3d_ArrowAspect.cxx
src/Prs3d/Prs3d_Datum.gxx
src/Prs3d/Prs3d_Drawer.cxx
src/Prs3d/Prs3d_PlaneAspect.cxx
src/Prs3d/Prs3d_Vector.gxx
src/QABUC/QABUC.cxx
src/QAMitutoyoUK/QAMitutoyoUK.cxx
src/QAMitutoyoUS/QAMitutoyoUS.cxx
src/QANIC/QANIC.cxx
src/QAOCC/QAOCC.cxx
src/QAQuickPen/QAQuickPen.cxx
src/QARicardo/QARicardo.cxx
src/QASamtech/QASamtech.cxx
src/QAViewer2dTest/QAViewer2dTest.cxx
src/QAViewer2dTest/QAViewer2dTest_GeneralCommands.cxx
src/QAViewer2dTest/QAViewer2dTest_ObjectCommands.cxx
src/STEPConstruct/STEPConstruct_UnitContext.cxx
src/STEPControl/STEPControl_ActorRead.cxx
src/STEPControl/STEPControl_ActorWrite.cxx
src/SWDRAW/SWDRAW_ShapeFix.cxx
src/SWDRAW/SWDRAW_ShapeUpgrade.cxx
src/Select2D/Select2D_SensitiveArc.cxx
src/Select2D/Select2D_SensitiveSegment.cxx
src/Select3D/Select3D_SensitiveSegment.cxx
src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx
src/ShapeAnalysis/ShapeAnalysis_Curve.cxx
src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx
src/ShapeAnalysis/ShapeAnalysis_Surface.cxx
src/ShapeAnalysis/ShapeAnalysis_Wire.cxx
src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx
src/ShapeCustom/ShapeCustom_ConvertToRevolution.cxx
src/ShapeFix/ShapeFix_ComposeShell.cxx
src/ShapeFix/ShapeFix_Face.cxx
src/ShapeFix/ShapeFix_Wire_1.cxx
src/ShapeFix/ShapeFix_Wireframe.cxx
src/ShapeProcess/ShapeProcess_OperLibrary.cxx
src/Standard/Standard_Real.cxx
src/Standard/Standard_Real.hxx
src/Standard/Standard_math.hxx
src/StdSelect/StdSelect_BRepSelectionTool.cxx
src/StepToGeom/StepToGeom_MakeSurfaceOfRevolution.cxx
src/StepToGeom/StepToGeom_MakeTrimmedCurve.cxx
src/StepToGeom/StepToGeom_MakeTrimmedCurve2d.cxx
src/StlTransfer/StlTransfer.cxx
src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx
src/TopOpeBRep/TopOpeBRep_vprdeg.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx
src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx
src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx
src/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx
src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx
src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx
src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.cxx
src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx
src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx
src/V2d/V2d_CircularGraphicGrid.cxx
src/V2d/V2d_RectangularGrid.cxx
src/V3d/V3d.cxx
src/V3d/V3d_Camera.cxx
src/V3d/V3d_CircularGrid.cxx
src/V3d/V3d_DirectionalLight.cxx
src/V3d/V3d_PerspectiveView.cxx
src/V3d/V3d_PositionLight.cxx
src/V3d/V3d_PositionalLight.cxx
src/V3d/V3d_SpotLight.cxx
src/V3d/V3d_View.cxx
src/V3d/V3d_View_4.cxx
src/V3d/V3d_Viewer.cxx
src/Viewer2dTest/Viewer2dTest.cxx
src/Viewer2dTest/Viewer2dTest_DisplayCommands.cxx
src/Viewer2dTest/Viewer2dTest_GeneralCommands.cxx
src/Viewer2dTest/Viewer2dTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_RelationCommands.cxx
src/Visual3d/Visual3d_Light.cxx
src/Visual3d/Visual3d_ViewOrientation.cxx
src/VrmlData/VrmlData_ShapeConvert.hxx
src/WNT/WNT_DDriver.cxx
src/WNT/WNT_ImageManager.cxx
src/Xw/Xw_Extension.h
src/Xw/Xw_draw_buffer.cxx
src/Xw/Xw_draw_polytext.cxx
src/Xw/Xw_draw_text.cxx
src/gce/gce_MakeCone.cxx
src/gp/gp_Circ.lxx
src/gp/gp_Circ2d.lxx
src/gp/gp_Cone.lxx
src/gp/gp_Dir.cxx
src/gp/gp_Dir.lxx
src/gp/gp_Dir2d.cxx
src/gp/gp_Dir2d.lxx
src/gp/gp_Elips.lxx
src/gp/gp_Elips2d.lxx
src/gp/gp_Sphere.lxx
src/gp/gp_Torus.lxx
src/gp/gp_Vec.lxx
src/gp/gp_Vec2d.cxx
src/gp/gp_Vec2d.lxx
src/math/math_DirectPolynomialRoots.cxx
src/math/math_TrigonometricFunctionRoots.cxx

index 16e1e00950365c407d5f39917cdec08f2d2d80a3..115a6bc18673c80359837aa0162e8bcb486a129f 100755 (executable)
@@ -979,7 +979,7 @@ void AIS::ComputeAngleBetweenCurvilinearFaces( const TopoDS_Face &      FirstFac
       if (! Xdirection.IsEqual( ToFirstAttach, Precision::Angular() ) &&
           ! Xdirection.IsOpposite( ToFirstAttach, Precision::Angular() ) &&
           (Xdirection ^ ToFirstAttach) * Cone2->Cone().Axis().Direction() < 0.0e0)
-        SecondU = 2*PI - SecondU ;
+        SecondU = 2*M_PI - SecondU ;
       
       SecondLine = Handle( Geom_Line )::DownCast( Cone2->UIso( SecondU ) );
       
@@ -1233,18 +1233,18 @@ Standard_Boolean AIS::InDomain(const Standard_Real fpar,
     if(lpar > fpar)
       return ((para >= fpar) && (para <= lpar));
     else { // fpar > lpar
-      Standard_Real delta = 2*PI-fpar;
+      Standard_Real delta = 2*M_PI-fpar;
       Standard_Real lp, par, fp;
       lp = lpar + delta;
       par = para + delta;
-      while(lp > 2*PI) lp-=2*PI;
-      while(par > 2*PI) par-=2*PI;
+      while(lp > 2*M_PI) lp-=2*M_PI;
+      while(par > 2*M_PI) par-=2*M_PI;
       fp = 0.;
       return ((par >= fp) && (par <= lp));
     }
       
   }
-  if (para >= (fpar+2*PI)) return Standard_True;
+  if (para >= (fpar+2*M_PI)) return Standard_True;
   if (para <= lpar) return Standard_True;
   return Standard_False;
 }
@@ -1260,37 +1260,37 @@ Standard_Real AIS::DistanceFromApex(const gp_Elips & elips,
 {
   Standard_Real dist;
   Standard_Real parApex = ElCLib::Parameter ( elips, Apex );
-  if(parApex == 0.0 || parApex == PI) 
+  if(parApex == 0.0 || parApex == M_PI) 
     {//Major case
       if(parApex == 0.0) //pos Apex
-       dist = (par < PI) ? par : (2*PI - par);
+       dist = (par < M_PI) ? par : (2*M_PI - par);
       else //neg Apex
-       dist = (par < PI) ? ( PI - par) : ( par - PI );
+       dist = (par < M_PI) ? ( M_PI - par) : ( par - M_PI );
     }
   else 
     {// Minor case
-      if(parApex == PI / 2) //pos Apex
+      if(parApex == M_PI / 2) //pos Apex
        {
-         if(par <= parApex + PI && par > parApex) // 3/2*PI < par < PI/2
+         if(par <= parApex + M_PI && par > parApex) // 3/2*M_PI < par < M_PI/2
            dist = par - parApex;
          else 
            { 
-             if(par >  parApex + PI) // 3/2*PI < par < 2*PI
-               dist = 2*PI - par + parApex;
+             if(par >  parApex + M_PI) // 3/2*M_PI < par < 2*M_PI
+               dist = 2*M_PI - par + parApex;
              else
                dist = parApex - par; 
            }
          }
-      else //neg Apex == 3/2*PI
+      else //neg Apex == 3/2*M_PI
        {
-         if(par <= parApex && par >= PI/2) // PI/2 < par < 3/2*PI
+         if(par <= parApex && par >= M_PI/2) // M_PI/2 < par < 3/2*M_PI
            dist = parApex - par;
          else
            {
-             if(par >  parApex) // 3/2*PI < par < 2*PI
+             if(par >  parApex) // 3/2*M_PI < par < 2*M_PI
                dist = par - parApex;
              else
-               dist = par + PI/2; // 0 < par < PI/2
+               dist = par + M_PI/2; // 0 < par < M_PI/2
            }
        }
     }
index d1bbd95dd9a664cee90b7569cb9b6519b9f33b3e..d8344f7ac999788a5450af9e53630a66a4b737e3 100755 (executable)
@@ -592,7 +592,7 @@ void AIS_AngleDimension::ComputeConeAngle(const Handle(Prs3d_Presentation)& aPre
     aCurve =   aSurf->VIso(midV);
     myCircle = Handle(Geom_Circle)::DownCast(aCurve)->Circ();
 
-    myPosition = ElCLib::Value(Standard_PI/2.0, myCircle);
+    myPosition = ElCLib::Value(M_PI / 2.0, myCircle);
     myAutomaticPosition = Standard_False;
   }
   else {
@@ -678,7 +678,7 @@ void AIS_AngleDimension::ComputeTwoCurvilinearFacesAngle(const Handle(Prs3d_Pres
 #endif
       
 
-  if (myVal <= Precision::Angular() || Abs( PI-myVal ) <= Precision::Angular())
+  if (myVal <= Precision::Angular() || Abs( M_PI-myVal ) <= Precision::Angular())
     DsgPrs_AnglePresentation::Add(aPresentation,
                                  myDrawer,
                                  myVal,
@@ -931,7 +931,7 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
     Standard_Boolean In1(Standard_False);
     Standard_Boolean In2(Standard_False);
     if ( !(Abs(d1.Angle(d2) - Abs(myVal)) <= Precision::Confusion())
-        &&  (Abs(myVal) <  PI) ) {
+        &&  (Abs(myVal) <  M_PI) ) {
       Standard_Real parcent1 = ElCLib::Parameter(l1->Lin(), myCenter);
       Standard_Real par11 = ElCLib::Parameter(l1->Lin(), ptat11);
       Standard_Real par12 = ElCLib::Parameter(l1->Lin(), ptat12);
@@ -961,7 +961,7 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
   gp_Lin gpl2 = l2->Lin();
   theaxis = gp_Lin(myCenter,myFDir^mySDir);
 
-  if (myVal >  PI) {
+  if (myVal >  M_PI) {
     theaxis.Reverse();
   }
   
@@ -1022,7 +1022,7 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
        mySAttach = ElCLib::Value(par_p2_attach,gpl2);
       }
     }
-    if ( myVal < PI) curpos.SetXYZ(.5*(myFAttach.XYZ()+mySAttach.XYZ())); 
+    if ( myVal < M_PI) curpos.SetXYZ(.5*(myFAttach.XYZ()+mySAttach.XYZ())); 
     else {
       curpos.SetXYZ(.5*(myFAttach.XYZ()+mySAttach.XYZ())); 
       gp_Vec transl(curpos, myCenter);
@@ -1074,9 +1074,9 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
     Standard_Real udeb = uc1;
     Standard_Real ufin = uc2;
     if (uco > ufin) {
-      if (Abs(myVal)<PI) {
+      if (Abs(myVal)<M_PI) {
        // test if uco is in the opposite sector 
-       if (uco > udeb+PI && uco < ufin+PI){
+       if (uco > udeb+M_PI && uco < ufin+M_PI){
          dist = -dist;
        }
       }
@@ -1493,7 +1493,7 @@ void AIS_AngleDimension::Compute3DSelection( const Handle( SelectMgr_Selection )
   Standard_Real FirstParAngleCirc, LastParAngleCirc, FirstParAttachCirc, LastParAttachCirc;
   gp_Pnt EndOfArrow1, EndOfArrow2, ProjAttachPoint2;
   gp_Dir DirOfArrow1, DirOfArrow2;
-  gp_Dir axisdir = (myVal <= Precision::Angular() || Abs( PI-myVal ) <= Precision::Angular())?
+  gp_Dir axisdir = (myVal <= Precision::Angular() || Abs( M_PI-myVal ) <= Precision::Angular())?
                     myPlane->Pln().Axis().Direction() : (myFDir ^ mySDir);
   Standard_Boolean isPlane = (myFirstSurfType == AIS_KOS_Plane)? Standard_True : Standard_False;
 
@@ -1527,7 +1527,7 @@ void AIS_AngleDimension::Compute3DSelection( const Handle( SelectMgr_Selection )
   Handle( Select3D_SensitiveCurve ) SensCurve;
 
   // Angle's arc or line
-  if (myVal > Precision::Angular() && Abs( PI-myVal ) > Precision::Angular())
+  if (myVal > Precision::Angular() && Abs( M_PI-myVal ) > Precision::Angular())
     {
       curve = new Geom_TrimmedCurve( new Geom_Circle( AngleCirc ), FirstParAngleCirc, LastParAngleCirc );
       SensCurve = new Select3D_SensitiveCurve( own, curve );
@@ -1611,12 +1611,12 @@ void AIS_AngleDimension::Compute2DSelection(const Handle(SelectMgr_Selection)& a
   gp_Lin l2(cu2.Line());
 
   // it is patch!
-  if (Abs( myVal ) <= Precision::Angular() || Abs( PI - myVal ) <= Precision::Angular())
+  if (Abs( myVal ) <= Precision::Angular() || Abs( M_PI - myVal ) <= Precision::Angular())
 /*
   //---------------------------------------------------------
-  //    Cas de droites paralleles ( <=> angle nul a PI pres)
+  //    Cas de droites paralleles ( <=> angle nul a M_PI pres)
   if ((Abs(l1.Angle(l2)) < Precision::Angular()) ||
-      (Abs((l1.Angle(l2) - PI)) < Precision::Angular()) )
+      (Abs((l1.Angle(l2) - M_PI)) < Precision::Angular()) )
 */
     {
        
@@ -1677,19 +1677,19 @@ void AIS_AngleDimension::Compute2DSelection(const Handle(SelectMgr_Selection)& a
       Standard_Real ufin = uc2;
       
       if (uco > ufin) {
-       if (Abs(myVal)<PI) {
+       if (Abs(myVal)<M_PI) {
          // test if uco is in the opposing sector 
-         if (uco > udeb+PI && uco < ufin+PI){
-           udeb = udeb + PI;
-         ufin = ufin + PI;
+         if (uco > udeb+M_PI && uco < ufin+M_PI){
+           udeb = udeb + M_PI;
+         ufin = ufin + M_PI;
            uc1  = udeb;
            uc2  = ufin;
          }
       }
       }  
       if (uco > ufin) {
-       if ((uco-uc2) < (uc1-uco+(2*PI))) ufin = uco;
-       else udeb = uco - 2*PI;
+       if ((uco-uc2) < (uc1-uco+(2*M_PI))) ufin = uco;
+       else udeb = uco - 2*M_PI;
       }
       p1   = ElCLib::Value(udeb,cer);
       p2   = ElCLib::Value(ufin,cer);
@@ -1770,11 +1770,11 @@ void AIS_AngleDimension::ComputeNull2DSelection(
   Standard_Real ufin = uc2;
 
   if (uco > ufin) {
-    if (Abs(myVal)<PI) {
+    if (Abs(myVal)<M_PI) {
       // test if uco is in the opposing sector 
-      if (uco > udeb+PI && uco < ufin+PI){
-       udeb = udeb + PI;
-       ufin = ufin + PI;
+      if (uco > udeb+M_PI && uco < ufin+M_PI){
+       udeb = udeb + M_PI;
+       ufin = ufin + M_PI;
        uc1  = udeb;
        uc2  = ufin;
       }
@@ -1782,11 +1782,11 @@ void AIS_AngleDimension::ComputeNull2DSelection(
   }
 
   if (uco > ufin) {
-    if ((uco-uc2) < (uc1-uco+(2*PI))) {
+    if ((uco-uc2) < (uc1-uco+(2*M_PI))) {
       ufin = uco;
     }
     else {
-      udeb = uco - 2*PI;
+      udeb = uco - 2*M_PI;
     }
   }
 
@@ -1929,7 +1929,7 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
     aCurve =   aSurf->VIso(midV);
     myCircle = Handle(Geom_Circle)::DownCast(aCurve)->Circ();
 
-    myPosition = ElCLib::Value(Standard_PI / 2.0, myCircle);
+    myPosition = ElCLib::Value(M_PI / 2.0, myCircle);
     myAutomaticPosition = Standard_False;
   }
   else {
@@ -1966,7 +1966,7 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
 
   aPnt = Apex;
   gp_Pnt P1 = ElCLib::Value(0., myCircle);
-  gp_Pnt P2 = ElCLib::Value(Standard_PI, myCircle);
+  gp_Pnt P2 = ElCLib::Value(M_PI, myCircle);
 
   gce_MakePln mkPln(P1, P2,  aPnt);   // create a plane whitch defines plane for projection aPosition on it
 
@@ -1994,8 +1994,8 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
   Standard_Real AttParam = ElCLib::Parameter(aCircle2, AttachmentPnt);
   Standard_Real OppParam = ElCLib::Parameter(aCircle2, OppositePnt);
   
-  while ( AttParam >= 2*Standard_PI ) AttParam -= 2*Standard_PI;
-  while ( OppParam >= 2*Standard_PI ) OppParam -= 2*Standard_PI;
+  while ( AttParam >= 2 * M_PI ) AttParam -= 2 * M_PI;
+  while ( OppParam >= 2 * M_PI ) OppParam -= 2 * M_PI;
 
   if( myPosition.Distance( myCircle.Location() ) <= myCircle.Radius() )
     if( 2 * myCircle.Radius() > aCircle2.Radius() * 0.4 ) IsArrowOut = Standard_False;  //four times more than an arrow size
@@ -2006,10 +2006,10 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
   param = ElCLib::Parameter(aCircle2, tmpPnt);
 
   if(IsArrowOut) {
-    angle = OppParam - AttParam + Standard_PI/6; //An angle between AttParam and OppParam + 30 degrees
-    param = AttParam - Standard_PI/12;      //out parts of dimension line are 15 degrees
+    angle = OppParam - AttParam + M_PI / 6; //An angle between AttParam and OppParam + 30 degrees
+    param = AttParam - M_PI / 12;      //out parts of dimension line are 15 degrees
     
-    while ( angle > 2*Standard_PI ) angle -= 2*Standard_PI;
+    while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
     for( i = 0; i <= 11; i++ ) {       //calculating of arc             
       aPnt = ElCLib::Value(param + angle/11 * i, aCircle2);
       aPnt.Coord(X, Y, Z);
@@ -2020,7 +2020,7 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
   else {
     angle = OppParam - AttParam;
     param = AttParam;
-    while ( angle > 2*Standard_PI ) angle -= 2*Standard_PI;
+    while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
     for( i = 0; i <= 11; i++ ) {       //calculating of arc             
       aPnt = ElCLib::Value(param + angle/11 * i, aCircle2);
       aPnt.Coord(X, Y, Z);
index d5e6330423a0baa8f203c64beacfabab043da5a0..983eb90e8c2edad3a62692a304c6318ecbab4cef 100755 (executable)
@@ -34,7 +34,7 @@ AIS_Circle::AIS_Circle(const Handle(Geom_Circle)& aComponent):
 AIS_InteractiveObject(PrsMgr_TOP_AllView),
 myComponent(aComponent),
 myUStart(0.),
-myUEnd(2*PI),
+myUEnd(2*M_PI),
 myCircleIsArc(Standard_False)
 {
 }
index 83fa5dacb12c9221549f03066bc32dea11995602..4c13d605b61c7ef0cc06dd5a2f4112540ef860cf 100755 (executable)
@@ -266,8 +266,8 @@ void AIS_ConcentricRelation::ComputeSelection(const Handle(SelectMgr_Selection)&
   aSelection->Add(seg);
 
   gp_Ax1 RotateAxis(myCenter, myDir);
-  gp_Pnt FPnt = myCenter.Rotated(RotateAxis, PI/2);
-  gp_Pnt SPnt = myCenter.Rotated(RotateAxis, -PI/2);
+  gp_Pnt FPnt = myCenter.Rotated(RotateAxis, M_PI/2);
+  gp_Pnt SPnt = myCenter.Rotated(RotateAxis, -M_PI/2);
   seg = new Select3D_SensitiveSegment(own,
                                      FPnt,
                                      SPnt);
index 5ac2b4fe8a225a164928fc19baffe8b6ae38ca84..600164767f12a1e6dd025bd3e90e8a9847f4ee0f 100755 (executable)
@@ -242,17 +242,17 @@ void AIS_DiameterDimension::ComputeArcSelection(const Handle(SelectMgr_Selection
 
   Handle(SelectMgr_EntityOwner) own = new SelectMgr_EntityOwner(this,7);
   gp_Pnt theCenter = myCircle.Location();
-  while (lpara > 2*PI) {
-    fpara -= 2*PI;
-    lpara -= 2*PI;
+  while (lpara > 2*M_PI) {
+    fpara -= 2*M_PI;
+    lpara -= 2*M_PI;
   }
   Standard_Real parat = ElCLib::Parameter(myCircle,myPosition);
   Standard_Boolean otherside(Standard_False);
   gp_Pnt attpoint = myPosition;
 
   if (!AIS::InDomain(fpara,lpara,parat)) {
-    Standard_Real otherpar = parat + PI;
-    if (otherpar > 2*PI) otherpar -= 2*PI;
+    Standard_Real otherpar = parat + M_PI;
+    if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
     if (AIS::InDomain(fpara,lpara,otherpar)) {
       parat = otherpar;
       otherside = Standard_True;
@@ -530,7 +530,7 @@ void AIS_DiameterDimension::ComputeArcDiameter(
   myFirstPar = parfirst;
   myLastPar  = parend;
   if ( parfirst > parend) {
-    parfirst -= 2*PI;
+    parfirst -= 2*M_PI;
   }
   if (myAutomaticPosition) {
     Standard_Real pcurpos = (parfirst + parend)/2.;
@@ -667,7 +667,7 @@ void AIS_DiameterDimension::ComputeOnePlanarFaceDiameter(const Handle(Prs3d_Pres
       parfirst = ElCLib::Parameter(myCircle, ptfirst);
       parend   = ElCLib::Parameter(myCircle, ptend);
       if ( parfirst > parend) {
-       parfirst -= 2*PI;
+       parfirst -= 2*M_PI;
       }
       Standard_Real parcurPos = (parfirst + parend) * 0.5;
       curPos = ElCLib::Value(parcurPos, myCircle);
index 8e28e73feb80b7a122b68f9f373b5871d47090cb..6c4194997d8adec4c2369f96e00f81a84fa309bc 100755 (executable)
@@ -79,10 +79,10 @@ void AIS_EllipseRadiusDimension::ComputeGeometry()
   default:
     break;
   }
- while (myFirstPar > 2*PI) myFirstPar -= 2*PI;
- while (myLastPar > 2*PI)  myLastPar  -= 2*PI;
- while (myFirstPar < 0.0)  myFirstPar += 2*PI;
- while (myLastPar  < 0.0)  myLastPar  += 2*PI;
+ while (myFirstPar > 2*M_PI) myFirstPar -= 2*M_PI;
+ while (myLastPar > 2*M_PI)  myLastPar  -= 2*M_PI;
+ while (myFirstPar < 0.0)  myFirstPar += 2*M_PI;
+ while (myLastPar  < 0.0)  myLastPar  += 2*M_PI;
 }
 
 //=======================================================================
index 53962d471bf1eb2aa5a85a305138a5c132ac88f9..c1b63b6f9ca33d9941ed87dce000ae5b9de3b1b1 100755 (executable)
@@ -278,7 +278,7 @@ void AIS_EqualDistanceRelation::ComputeSelection( const Handle( SelectMgr_Select
       Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve());
       Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint1),
                     LastPar  = ElCLib::Parameter(aCircle->Circ(), myPoint1);
-      if (LastPar < FirstPar ) LastPar+=PI*2;
+      if (LastPar < FirstPar ) LastPar+=M_PI*2;
       //add sensetive arc
       Handle(Select3D_SensitiveCircle) circ = 
        new Select3D_SensitiveCircle( own, aCircle,  FirstPar, LastPar);
@@ -301,7 +301,7 @@ void AIS_EqualDistanceRelation::ComputeSelection( const Handle( SelectMgr_Select
       Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve());
       Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint2),
       LastPar  = ElCLib::Parameter(aCircle->Circ(), myPoint2);
-      if (LastPar < FirstPar ) LastPar+=PI*2;
+      if (LastPar < FirstPar ) LastPar+=M_PI*2;
       //add sensetive arc
       Handle(Select3D_SensitiveCircle) circ = 
        new Select3D_SensitiveCircle( own,aCircle,  FirstPar, LastPar);
@@ -324,7 +324,7 @@ void AIS_EqualDistanceRelation::ComputeSelection( const Handle( SelectMgr_Select
       Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve());
       Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint3),
       LastPar  = ElCLib::Parameter(aCircle->Circ(), myPoint3);
-      if (LastPar < FirstPar ) LastPar+=PI*2;
+      if (LastPar < FirstPar ) LastPar+=M_PI*2;
       Handle(Select3D_SensitiveCircle) circ = 
        new Select3D_SensitiveCircle( own, aCircle,  FirstPar, LastPar);
       aSelection->Add( circ );
@@ -350,7 +350,7 @@ void AIS_EqualDistanceRelation::ComputeSelection( const Handle( SelectMgr_Select
       Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve());
       Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint4),
       LastPar  = ElCLib::Parameter(aCircle->Circ(), myPoint4);
-      if (LastPar < FirstPar ) LastPar+=PI*2;
+      if (LastPar < FirstPar ) LastPar+=M_PI*2;
       //add sensetive arc
       Handle(Select3D_SensitiveCircle) circ = 
        new Select3D_SensitiveCircle( own,aCircle,  FirstPar, LastPar);
@@ -530,18 +530,18 @@ void AIS_EqualDistanceRelation::ComputeTwoEdgesLength( const Handle( Prs3d_Prese
       if (PrPnt12.Distance(PrCenter) >Precision::Confusion())
        {
          gp_Dir aDir1(PrPnt12.XYZ() - PrCenter.XYZ());
-         Standard_Real anAngle = aDir1.Angle(XDir); //Get the angle in range [0, PI]
+         Standard_Real anAngle = aDir1.Angle(XDir); //Get the angle in range [0, M_PI]
          if (aDir1.Dot(YDir) < 0)
-           anAngle = 2*Standard_PI - anAngle;
+           anAngle = 2 * M_PI - anAngle;
          par1 = anAngle;
        }
       
       if (PrPnt22.Distance(PrCenter) >Precision::Confusion())
        {
          gp_Dir aDir2(PrPnt22.XYZ() - PrCenter.XYZ());
-         Standard_Real anAngle = aDir2.Angle(XDir); //Get the angle in range [0, PI]
+         Standard_Real anAngle = aDir2.Angle(XDir); //Get the angle in range [0, M_PI]
          if (aDir2.Dot(YDir) < 0)
-           anAngle = 2*Standard_PI - anAngle;
+           anAngle = 2 * M_PI - anAngle;
          par2 = anAngle;
        }
       
@@ -627,7 +627,7 @@ void AIS_EqualDistanceRelation::ComputeTwoVerticesLength( const Handle( Prs3d_Pr
   else {
     if (!samePoint) {
       DirAttach.SetXYZ(SecondAttach.XYZ() - FirstAttach.XYZ());
-      DirAttach.Rotate(Plane->Pln().Axis(),PI/2.);
+      DirAttach.Rotate(Plane->Pln().Axis(),M_PI/2.);
     }
   }
   
index 95b03eaa61f4d09f7689f3d26f04f944c3e47e9b..8848275e2b35189a7e35ff14009be5e88e7d0962 100755 (executable)
@@ -84,8 +84,8 @@ void AIS_EqualRadiusRelation::Compute( const Handle( PrsMgr_PresentationManager3
     }
   else {
     Standard_Real aPar =  ElCLib::Parameter(FirstCirc, myFirstPoint);
-    if (IntegerPart(0.5*LastPar1/PI) != 0 &&  aPar < FirstPar1 )
-      aPar +=2*PI*IntegerPart(0.5*LastPar1/PI);
+    if (IntegerPart(0.5*LastPar1/M_PI) != 0 &&  aPar < FirstPar1 )
+      aPar +=2*M_PI*IntegerPart(0.5*LastPar1/M_PI);
     Standard_Real aRadius = FirstCirc.Radius();
 
     if (Abs(myFirstPoint.Distance(myFirstCenter) - aRadius) >= Precision::Confusion())
@@ -104,8 +104,8 @@ void AIS_EqualRadiusRelation::Compute( const Handle( PrsMgr_PresentationManager3
   
     
     aPar =  ElCLib::Parameter(SecondCirc, mySecondPoint);
-    if (IntegerPart(0.5*LastPar2/PI) != 0 &&  aPar < FirstPar2 )
-      aPar +=2*PI*IntegerPart(0.5*LastPar2/PI);
+    if (IntegerPart(0.5*LastPar2/M_PI) != 0 &&  aPar < FirstPar2 )
+      aPar +=2*M_PI*IntegerPart(0.5*LastPar2/M_PI);
     
     aRadius = SecondCirc.Radius();
     if (Abs(mySecondPoint.Distance(mySecondCenter) - aRadius) >= Precision::Confusion())
index 04d1fc326258ff8b9181f72ab931080b9a930c7e..6b08049aa0be3684c9e8fd6e3cd0b70298ba6696 100755 (executable)
@@ -61,7 +61,7 @@ static Standard_Boolean InDomain(const Standard_Real fpar,
   if (fpar >= 0.) {
     return ((para >= fpar) && (para <= lpar));
   }
-  if (para >= (fpar+2*PI)) return Standard_True;
+  if (para >= (fpar+2*M_PI)) return Standard_True;
   if (para <= lpar) return Standard_True;
   return Standard_False;
 }
@@ -270,7 +270,7 @@ void AIS_FixRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aSelec
   dirac.Normalize();
   gp_Vec norac = dirac.Crossed(gp_Vec(norm));
   gp_Ax1 ax(myPosition, norm);
-  norac.Rotate(ax, PI/8);
+  norac.Rotate(ax, M_PI/8);
 
   norac*=(myArrowSize/2);
   gp_Pnt P1 = myPosition.Translated(norac);
@@ -414,7 +414,7 @@ gp_Pnt AIS_FixRelation::ComputePosition(const Handle(Geom_Curve)& curv,
     gp_Vec transvec = vec*myArrowSize;
     curpos = myPntAttach.Translated(transvec);
     gp_Ax1 RotAx( myPntAttach, NormPln);
-    curpos.Rotate(RotAx, PI/10);
+    curpos.Rotate(RotAx, M_PI/10);
   }
 
   return curpos;
@@ -526,10 +526,10 @@ void AIS_FixRelation::ComputeCirclePosition(
        Standard_Real& plast)
 {
   // readjust parametres on the circle
-  if (plast > 2*PI ) {
-    Standard_Real nbtours = Floor(plast / (2*PI));
-    plast -= nbtours*2*PI;
-    pfirst -= nbtours*2*PI;
+  if (plast > 2*M_PI ) {
+    Standard_Real nbtours = Floor(plast / (2*M_PI));
+    plast -= nbtours*2*M_PI;
+    pfirst -= nbtours*2*M_PI;
   }
 
   if (myAutomaticPosition) {
@@ -539,8 +539,8 @@ void AIS_FixRelation::ComputeCirclePosition(
     Standard_Real circparam = (pfirst + plast)/2.;
 
     if ( !InDomain(pfirst,plast,circparam)) {
-      Standard_Real otherpar = circparam + PI;
-      if (otherpar > 2*PI) otherpar -= 2*PI;
+      Standard_Real otherpar = circparam + M_PI;
+      if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
       circparam = otherpar;
     }
 
@@ -563,8 +563,8 @@ void AIS_FixRelation::ComputeCirclePosition(
     Standard_Real circparam = ElCLib::Parameter(gcirc, pos);
 
     if ( !InDomain(pfirst,plast,circparam)) {
-      Standard_Real otherpar = circparam + PI;
-      if (otherpar > 2*PI) otherpar -= 2*PI;
+      Standard_Real otherpar = circparam + M_PI;
+      if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
       circparam = otherpar;
     }
     
index 9c5b3d8113e39511087a15017471cb0cb3ca304f..c5ebc2802be985ae5134f381d77a8a80c436af99 100755 (executable)
@@ -58,8 +58,8 @@
 
 static Standard_Real Modulo2PI(const Standard_Real ANGLE)
 {
-  if ( ANGLE < 0 )          return Modulo2PI(ANGLE + 2*PI);
-  else if ( ANGLE >= 2*PI ) return Modulo2PI(ANGLE - 2*PI);
+  if ( ANGLE < 0 )          return Modulo2PI(ANGLE + 2*M_PI);
+  else if ( ANGLE >= 2*M_PI ) return Modulo2PI(ANGLE - 2*M_PI);
   return ANGLE;
 }
 
@@ -68,7 +68,7 @@ static Standard_Boolean IsEqual2PI(const Standard_Real angle1,
 {
   Standard_Real diff = Abs(angle1-angle2);
   if ( diff < precision )                return Standard_True;
-  else if ( Abs(diff-2*PI) < precision ) return Standard_True;
+  else if ( Abs(diff-2*M_PI) < precision ) return Standard_True;
   return Standard_False;
 }
 // jfa 15/10/2000 end
@@ -187,18 +187,18 @@ static Standard_Boolean ComputeAttach(const gp_Circ& thecirc,
   Standard_Real deltap = pSAttachM - pFAttach;
   if ( deltap < 0 )
     {
-      deltap += 2*Standard_PI;
-      pSAttachM += 2*Standard_PI;
+      deltap += 2 * M_PI;
+      pSAttachM += 2 * M_PI;
     }
   pSAttachM -= pFAttach;
 
-  Standard_Real pmiddleout = pSAttachM/2.0 + Standard_PI;
+  Standard_Real pmiddleout = pSAttachM/2.0 + M_PI;
 
   Standard_Real pcurpos1 = pcurpos;
   // define where curpos lays
   if ( pcurpos1 < pFAttach )
     {
-      pcurpos1 = pcurpos1 + 2*Standard_PI - pFAttach;
+      pcurpos1 = pcurpos1 + 2 * M_PI - pFAttach;
       if ( pcurpos1 > pSAttachM ) // out
        {
          if ( pcurpos1 > pmiddleout ) pcurpos = pFAttach;
@@ -255,18 +255,18 @@ static Standard_Boolean ComputeAttach(const gp_Elips& theEll,
   Standard_Real deltap = pSAttachM - pFAttach;
   if ( deltap < 0 )
     {
-      deltap += 2*Standard_PI;
-      pSAttachM += 2*Standard_PI;
+      deltap += 2 * M_PI;
+      pSAttachM += 2 * M_PI;
     }
   pSAttachM -= pFAttach;
 
-  Standard_Real pmiddleout = pSAttachM/2.0 + Standard_PI;
+  Standard_Real pmiddleout = pSAttachM/2.0 + M_PI;
 
   Standard_Real pcurpos1 = pcurpos;
   // define where curpos lays
   if ( pcurpos1 < pFAttach )
     {
-      pcurpos1 = pcurpos1 + 2*Standard_PI - pFAttach;
+      pcurpos1 = pcurpos1 + 2 * M_PI - pFAttach;
       if ( pcurpos1 > pSAttachM ) // out
        {
          if ( pcurpos1 > pmiddleout ) pcurpos = pFAttach;
@@ -746,7 +746,7 @@ void AIS_IdenticRelation::ComputeTwoCirclesPresentation(const Handle(Prs3d_Prese
     
   myCenter = thecirc->Location();
   Standard_Real aSegSize = thecirc->Radius()/5.0;
-  Standard_Real rad = Standard_PI/5.0;
+  Standard_Real rad = M_PI / 5.0;
     
   // I. Case of 2 complete circles
   if ( circ1complete && circ2complete )
@@ -984,7 +984,7 @@ void AIS_IdenticRelation::ComputeAutoArcPresentation(const Handle(Geom_Circle)&
                                                     const Standard_Boolean isstatic)
 {
   Standard_Real aSegSize = thecirc->Radius()/5.0;
-  Standard_Real rad = Standard_PI/5.0;
+  Standard_Real rad = M_PI / 5.0;
 
   Standard_Real pFA = ElCLib::Parameter(thecirc->Circ(),firstp);
   Standard_Real pSA = ElCLib::Parameter(thecirc->Circ(),lastp);
@@ -1027,7 +1027,7 @@ void AIS_IdenticRelation::ComputeNotAutoCircPresentation(const Handle(Geom_Circl
       curpos.Translate(vprec*1e-5);
     }
   
-  Standard_Real rad = Standard_PI/5.0;
+  Standard_Real rad = M_PI / 5.0;
   Standard_Real pcurpos = ElCLib::Parameter(cirNotAuto->Circ(),curpos);
   Standard_Real pFAttach = pcurpos - rad;
   Standard_Real pSAttach = pcurpos + rad;
@@ -1055,7 +1055,7 @@ void AIS_IdenticRelation::ComputeNotAutoArcPresentation(const Handle(Geom_Circle
   Standard_Real pSPnt = ElCLib::Parameter(cirNotAuto, pntlast);
   Standard_Real deltap = Modulo2PI(pSPnt - pFPnt)/2.0;
 
-  Standard_Real rad = Standard_PI/5;
+  Standard_Real rad = M_PI / 5;
   if ( deltap < rad )
     {
       myFAttach = pntfirst;
@@ -1101,7 +1101,7 @@ void AIS_IdenticRelation::ComputeTwoEllipsesPresentation(const Handle(Prs3d_Pres
     
   myCenter = theEll->Location();
   Standard_Real aSegSize = theEll->MajorRadius()/5.0;
-  Standard_Real rad = Standard_PI/5.0;
+  Standard_Real rad = M_PI / 5.0;
     
   // I. Case of 2 complete ellipses
   if ( circ1complete && circ2complete )
@@ -1338,7 +1338,7 @@ void AIS_IdenticRelation::ComputeAutoArcPresentation(const Handle(Geom_Ellipse)&
                                                     const Standard_Boolean isstatic)
 {
   Standard_Real aSegSize = theEll->MajorRadius()/5.0;
-  Standard_Real rad = Standard_PI/5.0;
+  Standard_Real rad = M_PI / 5.0;
 
   gp_Elips anEll = theEll->Elips();
   
@@ -1383,7 +1383,7 @@ void AIS_IdenticRelation::ComputeNotAutoElipsPresentation(const Handle(Geom_Elli
       curpos.Translate(vprec*1e-5);
     }
   
-  Standard_Real rad = Standard_PI/5.0;
+  Standard_Real rad = M_PI / 5.0;
 //  Standard_Real pcurpos = ElCLib::Parameter(anEll,curpos);
   GeomAPI_ProjectPointOnCurve aProj (curpos, theEll);
   Standard_Real pcurpos  = aProj.LowerDistanceParameter();
@@ -1414,7 +1414,7 @@ void AIS_IdenticRelation::ComputeNotAutoArcPresentation(const Handle(Geom_Ellips
   Standard_Real pSPnt = ElCLib::Parameter(anEll, pntlast);
   Standard_Real deltap = Modulo2PI(pSPnt - pFPnt)/2.0;
 
-  Standard_Real rad = Standard_PI/5;
+  Standard_Real rad = M_PI / 5;
   if ( deltap < rad )
     {
       myFAttach = pntfirst;
index c3ef614a3d4998730507abaa4323ae824226c604..c20a674a05d08cf6a21637a9e54e30ce4bdd4e03 100755 (executable)
@@ -1650,7 +1650,7 @@ void AIS_InteractiveContext::SetDeviationAngle(const Standard_Real anAngle)
 
 Standard_Real AIS_InteractiveContext::DeviationAngle() const
 {
-  return PI/180.0e0 ;
+  return M_PI/180.0e0 ;
   //  return myDefaultDrawer->DeviationAngle();
 }
 
@@ -1963,7 +1963,7 @@ void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIOb
 //     gp_Dir D =Tr->Component()->XDirection();
 //     gp_Pnt O = Tr->Component()->Location();
 //     gp_Vec V(D);V*=Lx/5.;
-//     T.SetRotation(gp_Ax1(O,D),PI/6.);
+//     T.SetRotation(gp_Ax1(O,D),M_PI/6.);
 //     T.SetTranslationPart(V);
 //     TopLoc_Location L,IncLoc(T);
    
@@ -2128,7 +2128,7 @@ void AIS_InteractiveContext::SetAngleAndDeviation(
 {
 //  cout<<" Angle:"<< anAngle <<endl;
   if(anIObj.IsNull()) return ;
-//   Standard_Real anAngleRad = PI*anAngle/180; test rob...
+//   Standard_Real anAngleRad = M_PI*anAngle/180; test rob...
   if(!anIObj->HasInteractiveContext())
     anIObj->SetContext(this);
 
index d2af5e1440b363bbc44a6508c00b20445a111508..d990f8e256ab20b6771cee6ed781aa5e3566ef85 100755 (executable)
@@ -930,7 +930,7 @@ void AIS_LengthDimension::ComputeTwoVerticesLength( const Handle( Prs3d_Presenta
   else {
     if (!samePoint) {
       DirAttach = gce_MakeDir(FirstAttach,SecondAttach);
-      DirAttach.Rotate(Plane->Pln().Axis(),PI/2.);
+      DirAttach.Rotate(Plane->Pln().Axis(),M_PI/2.);
     }
   }
   
index cc5f44c8ae6d8766d40103dcf18a9d7cc5f5e5af..6984286f517886e6ecbac39683e770e42b93038a 100755 (executable)
@@ -487,7 +487,7 @@ void AIS_MidPointRelation::ComputePointsOnCirc(const gp_Circ& aCirc,
   
   Standard_Real pcurpos = ElCLib::Parameter(aCirc,curpos);
 
-  Standard_Real rad = Standard_PI/5.0;
+  Standard_Real rad = M_PI / 5.0;
   Standard_Real segm;
 
   Standard_Real pFPnt;
@@ -507,18 +507,18 @@ void AIS_MidPointRelation::ComputePointsOnCirc(const gp_Circ& aCirc,
       Standard_Real deltap = pSAttachM - pFAttach;
       if ( deltap < 0 )
        {
-         deltap += 2*Standard_PI;
-         pSAttachM += 2*Standard_PI;
+         deltap += 2 * M_PI;
+         pSAttachM += 2 * M_PI;
        }
       pSAttachM -= pFAttach;
 
-      Standard_Real pmiddleout = pSAttachM/2.0 + Standard_PI;
+      Standard_Real pmiddleout = pSAttachM/2.0 + M_PI;
 
       Standard_Real pcurpos1 = pcurpos;
       // define where curpos lays
       if ( pcurpos1 < pFAttach )
        {
-         pcurpos1 = pcurpos1 + 2*Standard_PI - pFAttach;
+         pcurpos1 = pcurpos1 + 2 * M_PI - pFAttach;
          if ( pcurpos1 > pSAttachM ) // out
            {
              segm = Min(rad,deltap*0.75);
@@ -614,7 +614,7 @@ void AIS_MidPointRelation::ComputePointsOnElips(const gp_Elips& anEll,
   
   Standard_Real pcurpos = ElCLib::Parameter(anEll,curpos);
 
-  Standard_Real rad = Standard_PI/5.0;
+  Standard_Real rad = M_PI / 5.0;
   Standard_Real segm;
 
   Standard_Real pFPnt;
@@ -634,18 +634,18 @@ void AIS_MidPointRelation::ComputePointsOnElips(const gp_Elips& anEll,
       Standard_Real deltap = pSAttachM - pFAttach;
       if ( deltap < 0 )
        {
-         deltap += 2*Standard_PI;
-         pSAttachM += 2*Standard_PI;
+         deltap += 2 * M_PI;
+         pSAttachM += 2 * M_PI;
        }
       pSAttachM -= pFAttach;
 
-      Standard_Real pmiddleout = pSAttachM/2.0 + Standard_PI;
+      Standard_Real pmiddleout = pSAttachM / 2.0 + M_PI;
 
       Standard_Real pcurpos1 = pcurpos;
       // define where curpos lays
       if ( pcurpos1 < pFAttach )
        {
-         pcurpos1 = pcurpos1 + 2*Standard_PI - pFAttach;
+         pcurpos1 = pcurpos1 + 2 * M_PI - pFAttach;
          if ( pcurpos1 > pSAttachM ) // out
            {
              segm = Min(rad,deltap*0.75);
index 544c0c9b3693c4157e95d03fbd8c6c66fed92b01..f38f2ceeded4b3ebcebcb45da6a0a384a989b019 100755 (executable)
@@ -232,10 +232,10 @@ void AIS_RadiusDimension::InitFirstShape()
 
   myCenter = myCircle.Location();
   myCircle.SetRadius(myVal);
-  while (myFirstPar > 2*PI) myFirstPar -= 2*PI;
-  while (myFirstPar < 0.0 ) myFirstPar += 2*PI;
-  while (myLastPar  > 2*PI) myLastPar  -= 2*PI;
-  while (myLastPar  < 0.0 ) myLastPar  += 2*PI;
+  while (myFirstPar > 2*M_PI) myFirstPar -= 2*M_PI;
+  while (myFirstPar < 0.0 ) myFirstPar += 2*M_PI;
+  while (myLastPar  > 2*M_PI) myLastPar  -= 2*M_PI;
+  while (myLastPar  < 0.0 ) myLastPar  += 2*M_PI;
   myPlane = new Geom_Plane(gp_Pln(gp_Ax3(myCircle.Position())));
   myFirstLine = gce_MakeLin( myCenter, ElCLib::Value( myFirstPar, myCircle ) );
   myLastLine  = gce_MakeLin( myCenter, ElCLib::Value( myLastPar, myCircle ) );
@@ -359,18 +359,18 @@ void AIS_RadiusDimension::ComputeRadius( const Handle( Prs3d_Presentation )& aPr
        Standard_Real PosPar = ElCLib::Parameter( myCircle, myPosition );
        if (!AIS::InDomain(myFirstPar, myLastPar, PosPar))
         { // not in domain
-          Standard_Real otherpar = PosPar + PI;
-          if (otherpar > 2*PI) otherpar -= 2*PI;
+          Standard_Real otherpar = PosPar + M_PI;
+          if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
           if (AIS::InDomain(myFirstPar, myLastPar, otherpar)){
             PosPar = otherpar;// parameter on circle
             myEndOfArrow = ElCLib::Value( PosPar, myCircle );
           }
           else {
             Standard_Real Teta1 = Abs( PosPar - myFirstPar ), Teta2 = Abs( PosPar - myLastPar );
-            if (Teta1 > PI)
-              Teta1 = 2.0*PI - Teta1; 
-            if (Teta2 > PI)
-              Teta2 = 2.0*PI - Teta2; 
+            if (Teta1 > M_PI)
+              Teta1 = 2.0*M_PI - Teta1; 
+            if (Teta2 > M_PI)
+              Teta2 = 2.0*M_PI - Teta2; 
             if (Teta1 < Teta2) 
               {
                 if(myFirstLine.Contains(myPosition,Precision::Confusion()))
index ea8f8a2289280be9663fadcc6042b1988250c4b9..a419723d17e0fd0b2c6ec00ac51b9a7112a7f0e2 100755 (executable)
@@ -227,7 +227,7 @@ static Standard_Boolean ComputeTangencyPoint(const Handle(Geom_Curve)& GC1,
              ElCLib::D1(par_inter,ellipse->Elips(),P2,aVector2);
            }
 //       if ( aVector1.IsParallel(aVector2, 100*Precision::Angular()) ) break;
-         if ( aVector1.IsParallel(aVector2, Standard_PI/360.0) ) break; // 0.5 graduce
+         if ( aVector1.IsParallel(aVector2, M_PI / 360.0) ) break; // 0.5 graduce
        }
     }
   aPoint = PC1;
index f1b6d0db7608c2e5cfb175d30062f800d5ab9373..c226db802bc635e615f1c41d174accb072a5a7d5 100755 (executable)
@@ -1323,7 +1323,7 @@ void Adaptor3d_CurveOnSurface::EvalKPart()
       if ( D.IsParallel(gp::DX2d(),Precision::Angular())) { // Iso V.
        if ( STy == GeomAbs_Sphere) {
          gp_Pnt2d  P    = myCurve->Line().Location();
-         if ( Abs( Abs(P.Y()) -PI/2. ) >= Precision::PConfusion()) {
+         if ( Abs( Abs(P.Y()) -M_PI/2. ) >= Precision::PConfusion()) {
            myType = GeomAbs_Circle;
            gp_Sphere Sph  =  mySurface->Sphere();
            gp_Ax3    Axis = Sph.Position();
index 1d2b2a5b8427c3fda78fef48979216e5dedce67e..03846c50dca7ca661437a95e4c468209f74eee0d 100755 (executable)
@@ -160,7 +160,7 @@ Standard_Real Adaptor3d_SurfaceOfRevolution::FirstUParameter() const
 
 Standard_Real Adaptor3d_SurfaceOfRevolution::LastUParameter() const 
 {
-  return 2*PI;
+  return 2*M_PI;
 }
 
 //=======================================================================
@@ -236,7 +236,7 @@ void Adaptor3d_SurfaceOfRevolution::UIntervals (TColStd_Array1OfReal& T,
                                              const GeomAbs_Shape ) const 
 {
   T(T.Lower()  ) = 0.;
-  T(T.Lower()+1) = 2*PI;
+  T(T.Lower()+1) = 2*M_PI;
 }
 
 
@@ -276,7 +276,7 @@ Handle(Adaptor3d_HSurface) Adaptor3d_SurfaceOfRevolution::UTrim
   Standard_Real Eps = Precision::PConfusion();
 #endif
   Standard_OutOfRange_Raise_if
-    (  Abs(First) > Eps || Abs(Last - 2.*PI) > Eps,
+    (  Abs(First) > Eps || Abs(Last - 2.*M_PI) > Eps,
      "Adaptor3d_SurfaceOfRevolution : UTrim : Parameters out of range");
 
   Handle(Adaptor3d_HSurfaceOfRevolution) HR =
@@ -341,7 +341,7 @@ Standard_Boolean Adaptor3d_SurfaceOfRevolution::IsUPeriodic() const
 
 Standard_Real Adaptor3d_SurfaceOfRevolution::UPeriod() const
 {
-  return 2*PI;
+  return 2*M_PI;
 }
 
 //=======================================================================
@@ -493,7 +493,7 @@ gp_Vec Adaptor3d_SurfaceOfRevolution::DN(const Standard_Real    U,
     }
     else {
       Standard_Real DNR = DNv * myAxeRev.XDirection();
-      gp_Vec DNu = ( myAxeRev.XDirection()).Rotated( myAxis, U + NU*PI/2);
+      gp_Vec DNu = ( myAxeRev.XDirection()).Rotated( myAxis, U + NU*M_PI/2);
       return ( DNR * DNu);
     }
   }   
index 7a73a38c0a7f56ff08dd5b307198726391d087eb..3c755986544b21c97a3a74227c30fc1c94f5bb59 100755 (executable)
@@ -30,7 +30,7 @@ static void GetConeApexParam(const gp_Cone& C, Standard_Real& U, Standard_Real&
   else {
     U = atan2(Ploc.Y(),Ploc.X());
   }
-  if      (U < -1.e-16)  U += (PI+PI);
+  if      (U < -1.e-16)  U += (M_PI+M_PI);
   else if (U < 0)        U = 0;
 
   V =  sin(SAngle) * ( Ploc.X() * cos(U) + Ploc.Y() * sin(U) - Radius)
index b562acb1aba81a05624cf65847a0666468b9d105..dcc3f096eebf361e093204599b06b7bcc0d0d92f 100755 (executable)
@@ -315,7 +315,7 @@ void AppParCurves_Variational::Init()
                                             Vt2d=TabV2d.Value(jp2d);
                                             Vt2d.Normalize();
                                             Vc2d=TabV2dcurv.Value(jp2d);
-                                            if (Abs(Abs(Vc2d.Angle(Vt2d)) - PI/2.) > Precision::Angular())
+                                            if (Abs(Abs(Vc2d.Angle(Vt2d)) - M_PI/2.) > Precision::Angular())
                                                  Standard_ConstructionError::Raise();
                                             myTabConstraints->SetValue(jndex++,Vt2d.X());
                                             myTabConstraints->SetValue(jndex++,Vt2d.Y());
@@ -373,7 +373,7 @@ void AppParCurves_Variational::Init()
                                             Vt2d=TabV2d.Value(jp2d);
                                             Vt2d.Normalize();
                                             Vc2d=TabV2dcurv.Value(jp2d);
-                                            if (Abs(Abs(Vc2d.Angle(Vt2d)) - PI/2.) > Precision::Angular())
+                                            if (Abs(Abs(Vc2d.Angle(Vt2d)) - M_PI/2.) > Precision::Angular())
                                                  Standard_ConstructionError::Raise();
                                             myTabConstraints->SetValue(jndex++,Vt2d.X());
                                             myTabConstraints->SetValue(jndex++,Vt2d.Y());
index a605b86fffcd1231cdaccf40f64b98e6a359cb1d..f33f1113f9dcfacf973f255f37121dc8566873ea 100755 (executable)
@@ -329,8 +329,8 @@ Standard_Boolean ApproxInt_ImpPrmSvSurfaces::Compute( Standard_Real& u1
        v2 = X(2)-TranslationV;
        ComputeParametersOnImplicitSurface(MyISurf,P,u1,v1);
        if(MyISurf.TypeQuadric() != GeomAbs_Plane) { 
-         while(u1-tu1>PI)  u1-=PI+PI;
-         while(tu1-u1>PI)  u1+=PI+PI;
+         while(u1-tu1>M_PI)  u1-=M_PI+M_PI;
+         while(tu1-u1>M_PI)  u1+=M_PI+M_PI;
        }
        MyParOnS1.SetCoord(tu1,tv1);
        MyParOnS2.SetCoord(tu2,tv2);
@@ -342,8 +342,8 @@ Standard_Boolean ApproxInt_ImpPrmSvSurfaces::Compute( Standard_Real& u1
        v1 = X(2)-TranslationV;
        ComputeParametersOnImplicitSurface(MyISurf,P,u2,v2);
        if(MyISurf.TypeQuadric() != GeomAbs_Plane) { 
-         while(u2-tu2>PI)  u2-=PI+PI;
-         while(tu2-u2>PI)  u2+=PI+PI;
+         while(u2-tu2>M_PI)  u2-=M_PI+M_PI;
+         while(tu2-u2>M_PI)  u2+=M_PI+M_PI;
        }
        MyParOnS1.SetCoord(tu1,tv1);
        MyParOnS2.SetCoord(tu2,tu2);
index 4f233becdf3cbdc3e0db149cb04bd78b78e1bd85..fcfd395a60a2dc0ab8a2426424e3001d726c7b33 100755 (executable)
@@ -71,7 +71,7 @@ void Aspect_CircularGrid::Compute(const Quantity_Length X,
   Standard_Real cosinus = (X-xo)/d;
   Standard_Real a = ACos(cosinus);
   Standard_Real ra = RotationAngle();
-  if ( Y < yo ) a = 2*Standard_PI - a;
+  if ( Y < yo ) a = 2 * M_PI - a;
 #ifdef OCC192_193
   n = (Standard_Integer ) ((a-ra)/myAlpha + Sign(0.5, a-ra)) ;
 #else
@@ -149,6 +149,6 @@ return myDivisionNumber;
 }
 
 void Aspect_CircularGrid::Init () {
-  myAlpha = Standard_PI /Standard_Real(myDivisionNumber);
+  myAlpha = M_PI / Standard_Real(myDivisionNumber);
   myA1 = Cos(myAlpha); myB1=Sin(myAlpha);
 }
index f2c6e8d89e9ecfcd5f13373015175b596c1e3fcb..249c39d7c8151c062032843ce7186e436b8e2ff4 100755 (executable)
@@ -252,7 +252,7 @@ void Aspect_MarkerStyle::SetPredefinedStyle() {
                MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+1) ;
 
                { Standard_Integer i;
-                 Standard_Real da = 2.*Standard_PI/MAX_O_POINT;
+                 Standard_Real da = 2. * M_PI / MAX_O_POINT;
                  Standard_Real a = 0.;
                  for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
                    MyXpoint->SetValue(i,(float ) Cos(a));
@@ -290,7 +290,7 @@ void Aspect_MarkerStyle::SetPredefinedStyle() {
                MyYpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+6) ;
                MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+6) ;
                { Standard_Integer i;
-                 Standard_Real da = 2.*Standard_PI/MAX_O_POINT;
+                 Standard_Real da = 2. * M_PI / MAX_O_POINT;
                  Standard_Real a = 0.;
                  for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
                    MyXpoint->SetValue(i,(float ) Cos(a));
@@ -328,7 +328,7 @@ void Aspect_MarkerStyle::SetPredefinedStyle() {
                MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+5) ;
 
                { Standard_Integer i;
-                 Standard_Real da = 2.*Standard_PI/MAX_O_POINT;
+                 Standard_Real da = 2. * M_PI / MAX_O_POINT;
                  Standard_Real a = 0.;
                  for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
                    MyXpoint->SetValue(i,(float ) Cos(a));
@@ -362,7 +362,7 @@ void Aspect_MarkerStyle::SetPredefinedStyle() {
                MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+9) ;
 
                { Standard_Integer i;
-                 Standard_Real da = 2.*Standard_PI/MAX_O_POINT;
+                 Standard_Real da = 2. * M_PI / MAX_O_POINT;
                  Standard_Real a = 0.;
                  for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
                    MyXpoint->SetValue(i,(float ) Cos(a));
@@ -412,7 +412,7 @@ void Aspect_MarkerStyle::SetPredefinedStyle() {
                MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+5) ;
 
                { Standard_Integer i;
-                 Standard_Real da = 2.*Standard_PI/MAX_O_POINT;
+                 Standard_Real da = 2. * M_PI / MAX_O_POINT;
                  Standard_Real a = 0.;
                  for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
                    MyXpoint->SetValue(i,(float ) Cos(a));
@@ -449,7 +449,7 @@ void Aspect_MarkerStyle::SetPredefinedStyle() {
                                                MAX_BALL_LINE*(MAX_O_POINT+1)) ;
 
                { Standard_Integer i,j,n = 0;
-                 Standard_Real da = 2.*Standard_PI/MAX_O_POINT;
+                 Standard_Real da = 2. * M_PI / MAX_O_POINT;
                  Standard_Real dr = 1./MAX_BALL_LINE;
                  Standard_Real a,r = 1.;
                  
@@ -476,7 +476,7 @@ void Aspect_MarkerStyle::SetPredefinedStyle() {
                                                (MAX_BALL_LINE/4)*(MAX_O_POINT+1)) ;
 
                { Standard_Integer i,j,n = 0;
-                 Standard_Real da = 2.*Standard_PI/MAX_O_POINT;
+                 Standard_Real da = 2. * M_PI / MAX_O_POINT;
                  Standard_Real dr = 1./MAX_BALL_LINE;
                  Standard_Real a,r = 1.;
                  
@@ -503,7 +503,7 @@ void Aspect_MarkerStyle::SetPredefinedStyle() {
                                                (MAX_BALL_LINE/3)*(MAX_O_POINT+1)) ;
 
                { Standard_Integer i,j,n = 0;
-                 Standard_Real da = 2.*Standard_PI/MAX_O_POINT;
+                 Standard_Real da = 2. * M_PI / MAX_O_POINT;
                  Standard_Real dr = 1./MAX_BALL_LINE;
                  Standard_Real a,r = 1.;
                  
@@ -530,7 +530,7 @@ void Aspect_MarkerStyle::SetPredefinedStyle() {
                                                (MAX_BALL_LINE)/2*(MAX_O_POINT+1)) ;
 
                { Standard_Integer i,j,n = 0;
-                 Standard_Real da = 2.*Standard_PI/MAX_O_POINT;
+                 Standard_Real da = 2. * M_PI / MAX_O_POINT;
                  Standard_Real dr = 1./MAX_BALL_LINE;
                  Standard_Real a,r = 1.;
                  
index 8c166c285578d811a1985a0e3c9d4a6e5cecba68..5c3f9e63cace1af55805de5f46e22c0f1a520683 100755 (executable)
@@ -126,8 +126,8 @@ void Aspect_RectangularGrid::Init () {
 //  b1 = Sin (myFirstAngle + RotationAngle() );
 //  c1 = XOrigin() * b1 - YOrigin() * a1;
 //
-//  a2 = Cos (mySecondAngle + RotationAngle() + Standard_PI/2.); 
-//  b2 = Sin (mySecondAngle + RotationAngle() + Standard_PI/2.);
+//  a2 = Cos (mySecondAngle + RotationAngle() + M_PI / 2.); 
+//  b2 = Sin (mySecondAngle + RotationAngle() + M_PI / 2.);
 //  c2 = XOrigin() * b2 - YOrigin() * a2;
 
 #ifdef CSR577
@@ -142,7 +142,7 @@ void Aspect_RectangularGrid::Init () {
   }
 
   if ( angle2 != 0. ) {
-    angle2 += Standard_PI/2.;
+    angle2 += M_PI / 2.;
     a2 = -Sin (angle2); 
     b2 = Cos (angle2);
     c2 = XOrigin() * b2 - YOrigin() * a2;
@@ -154,8 +154,8 @@ void Aspect_RectangularGrid::Init () {
   b1 = Cos (myFirstAngle + RotationAngle());
   c1 = XOrigin() * b1 - YOrigin() * a1;
 
-  a2 = -Sin (mySecondAngle + RotationAngle() + Standard_PI/2.); 
-  b2 = Cos (mySecondAngle + RotationAngle() + Standard_PI/2.);
+  a2 = -Sin (mySecondAngle + RotationAngle() + M_PI / 2.); 
+  b2 = Cos (mySecondAngle + RotationAngle() + M_PI / 2.);
   c2 = XOrigin() * b2 - YOrigin() * a2;
 #endif
 //-zov
@@ -163,7 +163,7 @@ void Aspect_RectangularGrid::Init () {
 
 Standard_Boolean Aspect_RectangularGrid::CheckAngle(const Standard_Real alpha,
                                             const Standard_Real beta) const {
-  return (Abs( Sin(alpha) * Cos(beta+Standard_PI/2.) - Cos(alpha) * Sin(beta+Standard_PI/2.)) != 0) ;
+  return (Abs( Sin(alpha) * Cos(beta + M_PI / 2.) - Cos(alpha) * Sin(beta + M_PI / 2.)) != 0) ;
 }
 
 
index 2ef11b42212b3a475021d3d76d8523ac107cb957..f520e1ccadc5a2773ccecddbad70bbb0252a5e56 100755 (executable)
@@ -715,7 +715,7 @@ Standard_Real AngleIn(const TopoDS_Edge& aEIn,
 Standard_Real ClockWiseAngle(const Standard_Real aAngleIn,
                              const Standard_Real aAngleOut)
 {
-  const Standard_Real aTwoPi=Standard_PI+Standard_PI;
+  const Standard_Real aTwoPi = M_PI + M_PI;
   Standard_Real dA, A1, A2, AIn, AOut ;
 
   AIn=aAngleIn;
@@ -728,7 +728,7 @@ Standard_Real ClockWiseAngle(const Standard_Real aAngleIn,
     AOut=AOut-aTwoPi;
   }
 
-  A1=AIn+Standard_PI;
+  A1 = AIn + M_PI;
   
   if (A1 >= aTwoPi) {
     A1=A1-aTwoPi;
@@ -815,7 +815,7 @@ Standard_Real Angle2D (const TopoDS_Vertex& aV,
 Standard_Real Angle (const gp_Dir2d& aDir2D)
 {
   const Standard_Real anAngle = gp_Dir2d(1.,0.).Angle(aDir2D);
-  return ((anAngle < 0.)? anAngle + Standard_PI + Standard_PI : anAngle);
+  return ((anAngle < 0.)? anAngle + M_PI + M_PI : anAngle);
 }
 
 //=======================================================================
@@ -974,7 +974,7 @@ Standard_Boolean RecomputeAngles(const BOP_ListOfEdgeInfo& aLEInfo,
          bIgnore = (aD > theTol2D);
        }
 
-       if(!bIgnore && (theTol2D > PI)) {
+       if(!bIgnore && (theTol2D > M_PI)) {
          Standard_Real udist = fabs(aP2Dx.X() - thePb.X());
          Standard_Real vdist = fabs(aP2Dx.Y() - thePb.Y());
          Standard_Real aTolU = 2. * UTolerance2D(theVb, theGAS);
index 3739680aeae38d64a086c3813d6411405fc0197e..2f2e0ba971965c86b230af7b10696a67e82f2fc1 100755 (executable)
@@ -3304,8 +3304,8 @@ void CorrectTolR3D(BOPTools_PaveFiller& aPF,
   //
   aA=aDN[0].Angle(aDN[1]);
   aA=fabs(aA);
-  if (aA>0.5*PI) {
-    aA=PI-aA;
+  if (aA>0.5*M_PI) {
+    aA=M_PI-aA;
   }
   //
   if (aA<aAmin || aA>aAmax) {
index 6bfffa79049fadaf1c8a89afa70ef078325d610e..0dbe8685538038bac7027bffecc431da5f182331 100755 (executable)
@@ -674,7 +674,7 @@ static
   Standard_Real BOPTools_Tools2D::IntermediatePoint (const Standard_Real aFirst,
                                                     const Standard_Real aLast)
 {
-  //define parameter division number as 10*e^(-PI) = 0.43213918
+  //define parameter division number as 10*e^(-M_PI) = 0.43213918
   const Standard_Real PAR_T = 0.43213918;
   Standard_Real aParm;
   aParm=(1.-PAR_T)*aFirst + PAR_T*aLast;
index dc22f7267e26b7432ff560d883cc80dc3ca92fd8..a0a33922eada793e7c7f4dea835bb7bc99c85de5 100755 (executable)
@@ -1022,7 +1022,7 @@ static void GetApproxNormalToFaceOnEdgeEx(const TopoDS_Edge& aE,
   {
     Standard_Real d12, d1, anAlfa12, anAlfa1, aTwoPI;
     
-    aTwoPI=Standard_PI+Standard_PI;
+    aTwoPI = M_PI + M_PI;
     
     gp_Vec aVx1(aPx, aPx1);
     gp_Dir aDBx1 (aVx1);
index ac58ca33e187e6b956b7272c07698b8d3eb3c35c..bf499b387c180a491a56d23b3309e2dbf47acf71 100755 (executable)
@@ -1408,7 +1408,7 @@ void BRepAlgo_DSAccess::PntVtxOnCurve
   if(iMother) igoodC = iMother;
 //#ifndef DEB
   TopOpeBRepDS_PointIterator PII = myHDS->CurvePoints(igoodC);
-  TopOpeBRepDS_PointIterator& PIt = PII; // skl : I change "PI" to "PIt"
+  TopOpeBRepDS_PointIterator& PIt = PII; // skl : I change "M_PI" to "PIt"
 //#else
 //  TopOpeBRepDS_PointIterator& PIt = myHDS->CurvePoints(igoodC);
 //#endif
index cd0c3d7b2fe39cb74f5158234029dcbbd5d258f6..69152647b5c9d56ab9bd20762c0afc77e7d72f10 100755 (executable)
@@ -290,7 +290,7 @@ Standard_Boolean BRepBlend_RstRstConstRad::IsSolution(const math_Vector&  Sol,
     
     Angle = ACos(Cosa);
     if (Sina < 0.) {
-      Angle = 2.*PI - Angle;
+      Angle = 2.*M_PI - Angle;
     }
     
     if (Angle > maxang) {maxang = Angle;}
@@ -609,7 +609,7 @@ void BRepBlend_RstRstConstRad::Section(const Standard_Real Param,
   Pfin = ElCLib::Parameter(C, ptrst2);
 
   // Test of angles negative and almost null : Special Case
-  if (Pfin > 1.5 * PI) {
+  if (Pfin > 1.5 * M_PI) {
     np.Reverse();
     C.SetPosition(gp_Ax2(Center, np, ns));
     Pfin = ElCLib::Parameter(C, ptrst2);
index 4a973e917259430495a7ebdbeb4cc45a8602c4f4..1c928ff7c21a93f6e6745d44c0a60f508c4463c9 100755 (executable)
@@ -361,7 +361,7 @@ Standard_Boolean BRepBlend_RstRstEvolRad::IsSolution(const math_Vector&  Sol,
     
     Angle = ACos(Cosa);
     if (Sina < 0.) {
-      Angle = 2.*PI - Angle;
+      Angle = 2.*M_PI - Angle;
     }
     
     if (Angle > maxang) {maxang = Angle;}
@@ -678,7 +678,7 @@ void BRepBlend_RstRstEvolRad::Section(const Standard_Real Param,
   Pfin = ElCLib::Parameter(C, ptrst2);
 
   // Test negative and quasi null angles: Special case
-  if (Pfin > 1.5 * PI) {
+  if (Pfin > 1.5 * M_PI) {
     np.Reverse();
     C.SetPosition(gp_Ax2(Center, np, ns));
     Pfin = ElCLib::Parameter(C, ptrst2);
index aa282295742316f59e62ed6a37a45449db8a07a1..db4e9e5089db9bb7403e8fccb235d4f044817a3b 100755 (executable)
@@ -406,7 +406,7 @@ Standard_Boolean BRepBlend_SurfRstConstRad::IsSolution(const math_Vector&  Sol,
     
     Angle = ACos(Cosa);
     if (Sina <0.) {
-      Angle = 2.*PI - Angle;
+      Angle = 2.*M_PI - Angle;
     }
     
     if (Angle>maxang) {maxang = Angle;}
@@ -663,7 +663,7 @@ void BRepBlend_SurfRstConstRad::Section(const Standard_Real Param,
   Pfin = ElCLib::Parameter(C,ptrst);
 
   // Test negative and almost null angles : Special case
-  if (Pfin>1.5*PI) {
+  if (Pfin>1.5*M_PI) {
     np.Reverse();
     C.SetPosition(gp_Ax2(Center,np,ns));
     Pfin = ElCLib::Parameter(C,ptrst);
index 8d6db066df77f1a58037a2d5713a0141956a951a..dc4ce52531bf8f9269b996051cf38f4c1f80c5ad 100755 (executable)
@@ -463,7 +463,7 @@ const Standard_Real Tol)
     
     Angle = ACos(Cosa);
     if (Sina <0.) {
-      Angle = 2.*PI - Angle;
+      Angle = 2.*M_PI - Angle;
     }
     
     if (Angle>maxang) {maxang = Angle;}
@@ -708,7 +708,7 @@ gp_Circ& C)
   Pfin = ElCLib::Parameter(C,ptrst);
 
   // Test negative and almost null angles : Single Case
-  if (Pfin>1.5*PI) {
+  if (Pfin>1.5*M_PI) {
     np.Reverse();
     C.SetPosition(gp_Ax2(Center,np,ns));
     Pfin = ElCLib::Parameter(C,ptrst);
index 6bb580eadf8ed96261f9a49afeabc5d062810fa6..763e6cbad7a16300cefe3b89018611615377747b 100755 (executable)
@@ -196,7 +196,7 @@ static Standard_Boolean IsClosedShape(const TopoDS_Shape& theshape,
   if (TotLength > 0.0) {
     gp_Pnt p1 = BRep_Tool::Pnt(TopoDS::Vertex(v1));
     gp_Pnt p2 = BRep_Tool::Pnt(TopoDS::Vertex(v2));
-    return (p1.Distance(p2) < TotLength/(1.2 * PI));
+    return (p1.Distance(p2) < TotLength/(1.2 * M_PI));
   }
   return Standard_False;
 }
@@ -983,7 +983,7 @@ void BRepBuilderAPI_Sewing::EvaluateAngulars(TopTools_SequenceOfShape& sequenceS
       else if ((n.Magnitude()>gp::Resolution()) && (normRef(j).Magnitude()>gp::Resolution())) {
        nbComputedAngle++;
        Standard_Real angular = n.Angle(normRef(j));
-       if (angular > PI/2.) angular = PI - angular;
+       if (angular > M_PI/2.) angular = M_PI - angular;
        cumulateAngular += angular;
       }
     }
index c2b8f4717a338374d59423fd239f407ad033efd4..1a4918551d0a8ef1bcaccdb892ec6ca0e2ebfba2 100755 (executable)
@@ -1549,7 +1549,7 @@ static TopAbs_Orientation GetOrientation(const TopTools_MapOfShape& mapE,
     angle = DerRef.Angle( Der );
     angle *= -1.;
     if (angle < 0.)
-      angle += 2.*PI;
+      angle += 2.*M_PI;
     
     if (F.Orientation() == TopAbs_FORWARD) { 
       if (angle < MinAngle) {
index fbb9c68a582b049c82e6813838a61fdd43c48a93..b492bfcd179cf986068d2aca7c6fc6b3c96ed814 100755 (executable)
@@ -511,11 +511,11 @@ void BRepFeat::FaceUntil(const TopoDS_Shape& Sbase,
   }
   else if (styp == STANDARD_TYPE(Geom_CylindricalSurface)) {
     str = new Geom_RectangularTrimmedSurface
-      (s, 0., 2.*PI, bnd, -bnd, Standard_True, Standard_True);
+      (s, 0., 2.*M_PI, bnd, -bnd, Standard_True, Standard_True);
   }
   else if (styp == STANDARD_TYPE(Geom_ConicalSurface)) {
     str = new Geom_RectangularTrimmedSurface
-      (s, 0., 2.*PI, bnd, -bnd, Standard_True, Standard_True);
+      (s, 0., 2.*M_PI, bnd, -bnd, Standard_True, Standard_True);
   }
   else {
     FUntil.Nullify();
index 3333096a875c180958a8e106bb7752c115734706..a5e932d4af7e50df6ad122937b4ec2dc8f43d926 100755 (executable)
@@ -199,7 +199,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
   gp_Vec nulldir(0, 0, 0);
   if(!myDir1.IsEqual(nulldir, myTol, myTol)) {
     Standard_Real ang = myDir1.Angle(myDir);
-    if(ang != PI) {
+    if(ang != M_PI) {
 #ifdef DEB
       if (trc) cout << " Directions must be opposite" << endl;
 #endif
index 83dbf759eb404e0b7a774f504ef678f3c5dcb298..5afdf52311ded6c0ceebb7a9e276269595c7982f 100755 (executable)
@@ -229,7 +229,7 @@ void BRepFeat_MakeRevol::Perform(const Standard_Real Angle)
   myGluedF.Clear();
   myPerfSelection = BRepFeat_NoSelection;
   PerfSelectionValid();
-  Standard_Boolean RevolComp = (2*PI-Abs(Angle) <= Precision::Angular());
+  Standard_Boolean RevolComp = (2*M_PI-Abs(Angle) <= Precision::Angular());
   LocOpe_Revol theRevol;
   Standard_Real angledec = 0.;
   TopExp_Explorer exp;
@@ -238,7 +238,7 @@ void BRepFeat_MakeRevol::Perform(const Standard_Real Angle)
     if (!mySkface.IsNull() || !mySlface.IsEmpty()) {
       for (exp.Init(mySbase,TopAbs_FACE); exp.More(); exp.Next()) {
        if (exp.Current().IsSame(mySkface)) {
-         angledec = PI/5; // pourquoi pas
+         angledec = M_PI/5; // pourquoi pas
          if (myFuse) angledec = -angledec;
          break;
        }
@@ -362,7 +362,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
     Standard_ConstructionError::Raise();
   }
   if (!mySkface.IsNull() && Until.IsSame(mySkface)) {
-    Angle = 2*PI;
+    Angle = 2*M_PI;
     TourComplet = Standard_True;
   }
   myGluedF.Clear();
@@ -375,10 +375,10 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
   ShapeUntilValid();
 
 // Do systematically almost complete revolution
-// BRepSweep_Revol theRevol(myPbase,myAxis,2.*PI-10.*Precision::Angular());
+// BRepSweep_Revol theRevol(myPbase,myAxis,2.*M_PI-10.*Precision::Angular());
   LocOpe_Revol theRevol;
   if(!TourComplet) {
-    Angle = 2.*PI- 3*PI/180.;
+    Angle = 2.*M_PI- 3*M_PI/180.;
 #ifdef DEB
     if (trc) cout << " No complete Revolution" << endl;
 #endif
@@ -565,7 +565,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& From,
   }
 
   LocOpe_Revol theRevol;
-  theRevol.Perform(myPbase, myAxis, 2*PI);
+  theRevol.Perform(myPbase, myAxis, 2*M_PI);
   TopoDS_Shape VraiRevol = theRevol.Shape();
 
   MajMap(myPbase,theRevol,myMap,myFShape,myLShape);
@@ -607,9 +607,9 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& From,
     }
     if (ASI2.IsDone() && ASI2.NbPoints(1) >=1) {
       Standard_Real pr1 = ASI2.Point(1,1).Parameter();
-      pr1 = ElCLib::InPeriod(pr1,PrU-2*PI,PrU);
+      pr1 = ElCLib::InPeriod(pr1,PrU-2*M_PI,PrU);
       Standard_Real pr2 = ASI2.Point(1,ASI2.NbPoints(1)).Parameter();
-      pr2 = ElCLib::InPeriod(pr2,PrU-2*PI,PrU);
+      pr2 = ElCLib::InPeriod(pr2,PrU-2*M_PI,PrU);
       OrF = OrU;
       FFrom = ASI2.Point(1,1).Face();
       PrF = Max(pr1, pr2);
@@ -689,7 +689,7 @@ void BRepFeat_MakeRevol::PerformThruAll()
   Standard_Boolean trc = BRepFeat_GettraceFEAT();
   if (trc) cout << "BRepFeat_MakeRevol::PerformThruAll()" << endl;
 #endif
-  Perform(2.*PI);
+  Perform(2.*M_PI);
 }
 
 //=======================================================================
@@ -728,7 +728,7 @@ void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until,
   ShapeUntilValid();
 
 // Produce systematicallt an almost complete revolution
-//  BRepSweep_Revol theRevol(myPbase,myAxis,2.*PI-10.*Precision::Angular());
+//  BRepSweep_Revol theRevol(myPbase,myAxis,2.*M_PI-10.*Precision::Angular());
   LocOpe_Revol theRevol;
   theRevol.Perform(myPbase, myAxis, Angle);
   TopoDS_Shape VraiRevol = theRevol.Shape();
index 4cac84ab7f81a2e8eebc84084166fc4630208a7e..8ee11985247d04363797819da3b564b26b595297 100755 (executable)
@@ -221,13 +221,13 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
   
   if(Rad <= height) Rad = height + 0.01*height;  
   
-  myAngle1 = asin(H1/Rad) + PI/10.;
-  myAngle2 = asin(H2/Rad) + PI/10.;
+  myAngle1 = asin(H1/Rad) + M_PI/10.;
+  myAngle2 = asin(H2/Rad) + M_PI/10.;
   
-  if((myAngle1 - PI/2) > Precision::Confusion())
-    myAngle1 = PI/2;
-  if((myAngle2 - PI/2) > Precision::Confusion())
-    myAngle2 = PI/2;
+  if((myAngle1 - M_PI/2) > Precision::Confusion())
+    myAngle1 = M_PI/2;
+  if((myAngle2 - M_PI/2) > Precision::Confusion())
+    myAngle2 = M_PI/2;
   
   mySkface.Nullify();
   myPbase.Nullify();
index f13bf3643adcef3d9627b79501a4130b03800b62..13f05648cf1a4c721e17adb7722d07c553575601 100755 (executable)
@@ -1023,7 +1023,7 @@ TopoDS_Face BRepFeat_RibSlot::ChoiceOfFaces(TopTools_ListOfShape& faces,
   gp_Ax1 Axe(pp, Pln->Position().Direction());
   for ( Standard_Integer i = 1; i <=8; i++) {
     Handle(Geom_Curve) L = 
-      Handle(Geom_Curve)::DownCast(l1->Rotated(Axe, i*PI/9.));
+      Handle(Geom_Curve)::DownCast(l1->Rotated(Axe, i*M_PI/9.));
     scur.Append(L);
     Counter++;
   }
index ca64d26d14747461c362c6049884a16a4a58dd57..846a6114c477a46f9fa909298561cdb178312600 100755 (executable)
@@ -912,8 +912,8 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
     Ve *= -1;
   }
   angle = Ve.Angle(Dir);
-  if (angle > PI) angle = 2*PI - angle;
-  forward = (angle <= PI/2);
+  if (angle > M_PI) angle = 2*M_PI - angle;
+  forward = (angle <= M_PI/2);
 
   // Reconstruction
   MakeWire( Edges, rangdeb, forward, W);
index 92b68db166d13bccffc88d64be5058626e432bde..812e5b6a98b54ecaddca01221fdccacea9687408 100755 (executable)
@@ -554,8 +554,8 @@ static void Transform (const Standard_Boolean WithRotation,
     gp_Ax1 Norm(Pos2,norm2);
     Standard_Real ang = axe1.AngleWithRef(axe2,norm2);
     if (!WithRotation) {
-      if (ang>PI/2) ang = ang - PI;
-      if (ang<-PI/2) ang = ang + PI;
+      if (ang>M_PI/2) ang = ang - M_PI;
+      if (ang<-M_PI/2) ang = ang + M_PI;
     }
     ang *= sign;
     Pnew = Pnew.Rotated (Norm,ang);
@@ -1742,7 +1742,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
        // recherche du vertex correspondant a la projection conique
        Standard_Real angmin, angV, eta = Precision::Angular();
        TopoDS_Vertex Vopti;
-       angmin = PI/2;
+       angmin = M_PI/2;
        distmini = Precision::Infinite();
        gp_Dir dir0(gp_Vec(Pnew,P.Location()));
        for (Standard_Integer ii=1;ii<=SeqV.Length();ii++) {
@@ -1755,7 +1755,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
            gp_Dir dir1(gp_Vec(Pnew,P1));
            angV = dir1.Angle(dir0);
          }
-         if (angV>PI/2) angV = PI - angV;
+         if (angV>M_PI/2) angV = M_PI - angV;
          if (angmin>angV+eta) {
            distmini = dist;
            angmin = angV;
@@ -2009,11 +2009,11 @@ void BRepFill_CompatibleWires::SearchOrigin()
        norm = vec1 ^ vec2;
        gp_Ax1 Norm(P.Location(),norm);
        Standard_Real ang = vec1.AngleWithRef(vec2,norm);
-       if (ang > PI/2.0)
-         ang = PI - ang;
-       if (ang < -PI/2.0)
-         ang = -PI - ang;
-       if (Abs(ang-PI/2.0)<Precision::Angular()) {
+       if (ang > M_PI/2.0)
+         ang = M_PI - ang;
+       if (ang < -M_PI/2.0)
+         ang = -M_PI - ang;
+       if (Abs(ang-M_PI/2.0)<Precision::Angular()) {
          // cas d'ambiguite
          gp_Vec Vtrans(P0.Location(),P.Location()),Vsign;
          Standard_Real alpha,beta,sign=1;
@@ -2037,7 +2037,7 @@ void BRepFill_CompatibleWires::SearchOrigin()
       };
       gp_Vec VDebFin0(P1o,P2o), VDebFin(P1,P2);
       Standard_Real AStraight = VDebFin0.Angle(VDebFin);
-      parcours = (AStraight < PI/2.0? Standard_True: Standard_False);
+      parcours = (AStraight < M_PI/2.0? Standard_True: Standard_False);
     }
     
     // reconstruction of the wire
index 5b240815472745f34a66b24ec87dace539ca0bbb..44c30f833522635eab81f7f756e8bd120e0ce4bb 100755 (executable)
@@ -479,7 +479,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
   gp_Dir BN(M.Column(2));
   
   Standard_Real ang = myDir.Angle(BN);
-  if (ang > PI/2) D.Reverse();    
+  if (ang > M_PI/2) D.Reverse();    
   Handle(Geom_Line) L = new (Geom_Line) (P, D);
 
   Handle(Geom_Curve) TC = new (Geom_TrimmedCurve) (L, 0, Length);
@@ -534,7 +534,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
     V = V1.Crossed(V2);
     if (F.Orientation() == TopAbs_REVERSED) V.Reverse();
     if (V.Magnitude() > 1.e-10) {
-      out = myDir.Angle(V) > PI/2;
+      out = myDir.Angle(V) > M_PI/2;
     }
     if (out == IsInternal) {
       myShell.Reverse();
@@ -705,7 +705,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
     }
 
     // Subtract State1
-    if (myDir.Angle(SP.Normal()) < PI/2)  State1 = TopAbs_IN;
+    if (myDir.Angle(SP.Normal()) < M_PI/2)  State1 = TopAbs_IN;
     else  State1 = TopAbs_OUT;
   }
 
index 60a7fc7415967ea3fbdda048fbffdd1985a74c6d..019d80b86749027f566eb43956691ef824982a3a 100755 (executable)
@@ -2189,7 +2189,7 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE,
 
   gp_Trsf trsf;
   if (Side(myProfile,BRepFill_Confusion()) > 3) { // side right 
-    trsf.SetRotation(gp::OZ(),PI);
+    trsf.SetRotation(gp::OZ(),M_PI);
   }
   TopLoc_Location DumLoc (trsf);
   TopoDS_Shape aLocalShape = myProfile.Moved(DumLoc);
@@ -2276,7 +2276,7 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge&   SE,
 
   gp_Trsf trsf;
   if (Side(myProfile,BRepFill_Confusion()) > 3) { // side right 
-    trsf.SetRotation(gp::OZ(),PI);
+    trsf.SetRotation(gp::OZ(),M_PI);
   }
   TopLoc_Location DumLoc (trsf);
   TopoDS_Shape aLocalShape = myProfile.Moved(DumLoc);
@@ -2294,7 +2294,7 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge&   SE,
   // Position of the sewing on the edge of the spine
   // so that the bissectrices didn't cross the sewings.
   gp_Trsf dummy;
-  dummy.SetRotation(AxeRev, 1.5*PI);
+  dummy.SetRotation(AxeRev, 1.5*M_PI);
   TopLoc_Location DummyLoc(dummy);
   GenProf.Move(DummyLoc);
   
index 018cef98638cfe775499132996bb7545aeb5eca5..1228172851ad7af99ce4533cbb0c560ae6835f1f 100755 (executable)
@@ -396,7 +396,7 @@ void BRepFill_Filling::FindExtremitiesOfHoles( TopTools_MapOfShape& WireMap, TCo
 #else
       Standard_Boolean IsLast ;
 #endif
-      Standard_Real MinAngle = PI;
+      Standard_Real MinAngle = M_PI;
       
       for (MapIt.Initialize( WireMap ); MapIt.More(); MapIt.Next())
        {
index 5d852b2c949f86be8e4c39f9d63b9a8363160254..e51bebbb468e6e8de2536d8221ee41021479d9b7 100755 (executable)
@@ -215,11 +215,11 @@ myKPart(0)
   }
   if (GAS1.GetType() == GeomAbs_Sphere) {
     if (myIsoU1)
-      ElCLib::AdjustPeriodic(-PI/2.,PI/2.,
+      ElCLib::AdjustPeriodic(-M_PI/2.,M_PI/2.,
                             Precision::PConfusion(),
                             Umin, Umax);
     else
-      ElCLib::AdjustPeriodic(-PI/2.,PI/2.,
+      ElCLib::AdjustPeriodic(-M_PI/2.,M_PI/2.,
                             Precision::PConfusion(),
                             Vmin, Vmax);
   }
@@ -331,11 +331,11 @@ myKPart(0)
   }
   if (GAS2.GetType() == GeomAbs_Sphere) {
     if (myIsoU2)
-      ElCLib::AdjustPeriodic(-PI/2.,PI/2.,
+      ElCLib::AdjustPeriodic(-M_PI/2.,M_PI/2.,
                             Precision::PConfusion(),
                             Umin, Umax);
     else
-      ElCLib::AdjustPeriodic(-PI/2.,PI/2.,
+      ElCLib::AdjustPeriodic(-M_PI/2.,M_PI/2.,
                             Precision::PConfusion(),
                             Vmin, Vmax);
   }
@@ -612,7 +612,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real        U,
        Standard_Real Ang = Axis.Angle(D12d);
        if ( !TheU.Circle().IsDirect()) Ang = -Ang;
        UU = ElCLib::InPeriod( Ang, TheU.FirstParameter(), 
-                                   TheU.FirstParameter() + 2*PI);
+                                   TheU.FirstParameter() + 2*M_PI);
        Dist = TheU.Circle().Radius();
       }
       else {
index dfb7fb1c2ee515dcee234f91b219869be20cc76f..079bf7e6039d6d8a7985503e59909cc8a150bdcd 100755 (executable)
@@ -1601,7 +1601,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
   //if (E.Orientation() == TopAbs_REVERSED) CT2d->Reverse();
 
   if (CT2d->BasisCurve()->IsKind(STANDARD_TYPE(Geom2d_Circle)) &&
-      ( Abs(f-l) >= PI) ) {
+      ( Abs(f-l) >= M_PI) ) {
     return 0;
     //---------------------------
     // Cut closed circle.
@@ -1844,7 +1844,7 @@ void MakeOffset (const TopoDS_Edge&        E,
       Adaptor3d_OffsetCurve   Off(AHC,-anOffset);
       Handle(Geom2d_Circle) CC = new Geom2d_Circle(Off.Circle());      
 
-      Standard_Real Delta = 2*PI - l + f;
+      Standard_Real Delta = 2*M_PI - l + f;
       f -= 0.2*Delta; l += 0.2*Delta;
 
       G2dOC = new Geom2d_TrimmedCurve(CC,f,l);
index 7076eec922f4f8434b9a4ff34fa03b4ffd2684e3..793f98cd3fa1c223f6b30aff0861457f709b5ffd 100755 (executable)
@@ -842,11 +842,11 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
   Standard_Boolean ToReverseResult = Standard_False;
   gp_Vec d1u;
   d1u = Surf->DN(0, (f1+l1)/2, 1, 0);
-  if (d1u.Angle(TangentOnPart1) > PI/2) { //Invert everything
+  if (d1u.Angle(TangentOnPart1) > M_PI/2) { //Invert everything
     ToReverseResult = Standard_True;
     /*
     axe.Reverse();
-    Angle = 2*PI - Angle;
+    Angle = 2*M_PI - Angle;
     Rev = new (Geom_SurfaceOfRevolution) (Prof1, axe);
     Surf = new (Geom_RectangularTrimmedSurface) 
            (Rev, 0, Angle, f1, l1);
@@ -1148,7 +1148,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
   AS->D1(P2d.X(), P2d.Y(), P, D1U, D1V);
   N2 = D1U^D1V;
   
-  if ( (F1.Orientation() == TopAbs_REVERSED) ^ (N1.Angle(N2)>PI/2) )
+  if ( (F1.Orientation() == TopAbs_REVERSED) ^ (N1.Angle(N2)>M_PI/2) )
     Result.Orientation(TopAbs_REVERSED);
   else  Result.Orientation(TopAbs_FORWARD);
 
index 65c65e8b6901394476cc617d81df544f790e7182..8809e4153f339bce3cb27de968bce2e78e3cd52f 100755 (executable)
@@ -2281,8 +2281,8 @@ static Standard_Boolean ChooseSection(const TopoDS_Shape& Comp,
                continue;
 
              Standard_Real Angle = aPln.Axis().Angle( bis.Axis() );
-             if (Angle > PI/2)
-               Angle = PI - Angle;
+             if (Angle > M_PI/2)
+               Angle = M_PI - Angle;
              
              if (Angle < MinAngle)
                {
@@ -2341,7 +2341,7 @@ static Standard_Boolean ChoosePlane(const TopoDS_Shape& Comp,
   TColgp_Array1OfPnt Origins( 0, NumberOfEdges*2-1 );
   TColgp_Array1OfDir Normals( 0, NumberOfEdges*2-1 );
   TColStd_Array1OfBoolean IsSingular( 0, NumberOfEdges*2-1 );
-  Standard_Real MinAngle = PI/2;
+  Standard_Real MinAngle = M_PI/2;
   Standard_Integer MinInd;
   for (ind = 0; ind < NumberOfEdges*2; ind++)
     {
@@ -2355,8 +2355,8 @@ static Standard_Boolean ChoosePlane(const TopoDS_Shape& Comp,
          Origins(ind) = Axe.Location();
          Normals(ind) = Axe.Direction();
          Standard_Real Angle = bis.Angle( Axe );
-         if (Angle > PI/2)
-           Angle = PI - Angle;
+         if (Angle > M_PI/2)
+           Angle = M_PI - Angle;
          if (Angle < MinAngle)
            {
              MinAngle = Angle;
@@ -2366,15 +2366,15 @@ static Standard_Boolean ChoosePlane(const TopoDS_Shape& Comp,
     }
 
   gp_Ax2 TheAxe( Origins(MinInd), Normals(MinInd) );
-  Standard_Real MaxAngleWithPln = PI/16;
+  Standard_Real MaxAngleWithPln = M_PI/16;
   TColStd_SequenceOfInteger iseq;
   TColgp_SequenceOfPnt Pseq;
   for (ind = 0; ind < NumberOfEdges*2; ind++)
     if (!IsSingular(ind))
       {
        Standard_Real Angle = Normals(ind).Angle( TheAxe.Direction() );
-         if (Angle > PI/2)
-           Angle = PI - Angle;
+         if (Angle > M_PI/2)
+           Angle = M_PI - Angle;
        if (Angle <= MaxAngleWithPln)
          {
            iseq.Append(ind);
index 0e3ce9b685d46440806b53a3aa31c2c42166fd50..eef2a6903829431533e3f02947f90256931e7546 100755 (executable)
@@ -166,7 +166,7 @@ static Standard_Real EvalPhase(const TopoDS_Edge& Edge,
   gp_Pnt P = GAS.Value(0., V);
   
   if ( gp_Vec(Axis.Location(), P).Dot(Axis.XDirection()) < 0.) 
-    return PI;
+    return M_PI;
   else
     return 0.;
 }
@@ -339,7 +339,7 @@ static void EvalParameters(const TopoDS_Edge&          Edge,
     case GeomAbs_Cone: {
       //----------------------------------------------------------
       // if myFace1 is not at the same side of the apex as the point
-      // of parameter 0 0 on the cone => phase = PI.
+      // of parameter 0 0 on the cone => phase = M_PI.
       //----------------------------------------------------------
       Axis = GAS.Cone().Position(); 
       Phase = EvalPhase(Edge,Face,GAS,Axis);
@@ -352,7 +352,7 @@ static void EvalParameters(const TopoDS_Edge&          Edge,
     case GeomAbs_SurfaceOfRevolution: {      
       //----------------------------------------------------------
       // if myFace1 is not at the same side of the apex as the point
-      // of parameter 0 0 on the cone => phase = PI.
+      // of parameter 0 0 on the cone => phase = M_PI.
       //----------------------------------------------------------
       Handle(Geom_SurfaceOfRevolution) GSRev = 
        Handle(Geom_SurfaceOfRevolution)::DownCast(GS);
@@ -373,7 +373,7 @@ static void EvalParameters(const TopoDS_Edge&          Edge,
     Standard_Real U = Axis.XDirection().
       AngleWithRef(D1,Axis.XDirection()^Axis.YDirection());
     U += Phase;
-    if ( U < 0.) U += 2*PI;
+    if ( U < 0.) U += 2*M_PI;
 
     P = gp_Pnt(Bis->FirstParameter(), U, 0.);
     Seq.Append(P);
index afb4dfb3d6bbdab389de1cf113ab91daa5f39981..9c48f441e1a2f278c631186f8620e90a4bacd926 100755 (executable)
@@ -318,7 +318,7 @@ void BRepGProp_Face::UKnots(TColStd_Array1OfReal& Knots) const
   case GeomAbs_Cone: 
   case GeomAbs_Sphere: 
   case GeomAbs_Torus:
-    Knots(1) = 0.0;  Knots(2) = PI*2.0/3.0;  Knots(3) = PI*4.0/3.0;  Knots(4) = PI*6.0/3.0;
+    Knots(1) = 0.0;  Knots(2) = M_PI*2.0/3.0;  Knots(3) = M_PI*4.0/3.0;  Knots(4) = M_PI*6.0/3.0;
     break;
   case GeomAbs_BSplineSurface: 
     (*((Handle(Geom_BSplineSurface)*)&((mySurface.Surface()).Surface())))->UKnots(Knots);
@@ -343,10 +343,10 @@ void BRepGProp_Face::VKnots(TColStd_Array1OfReal& Knots) const
     Knots(1) = mySurface.FirstUParameter();  Knots(2) = mySurface.LastUParameter();  
     break;
   case GeomAbs_Sphere: 
-    Knots(1) = -PI/2.0;  Knots(2) = 0.0;  Knots(3) = +PI/2.0;
+    Knots(1) = -M_PI/2.0;  Knots(2) = 0.0;  Knots(3) = +M_PI/2.0;
     break;
   case GeomAbs_Torus:
-    Knots(1) = 0.0;  Knots(2) = PI*2.0/3.0;  Knots(3) = PI*4.0/3.0;  Knots(4) = PI*6.0/3.0;
+    Knots(1) = 0.0;  Knots(2) = M_PI*2.0/3.0;  Knots(3) = M_PI*4.0/3.0;  Knots(4) = M_PI*6.0/3.0;
     break;
   case GeomAbs_BSplineSurface: 
     (*((Handle(Geom_BSplineSurface)*)&((mySurface.Surface()).Surface())))->VKnots(Knots);
@@ -450,7 +450,7 @@ void BRepGProp_Face::LKnots(TColStd_Array1OfReal& Knots) const
     break;
   case GeomAbs_Circle:
   case GeomAbs_Ellipse:
-    Knots(1) = 0.0;  Knots(2) = PI*2.0/3.0;  Knots(3) = PI*4.0/3.0;  Knots(2) = PI*6.0/3.0;
+    Knots(1) = 0.0;  Knots(2) = M_PI*2.0/3.0;  Knots(3) = M_PI*4.0/3.0;  Knots(2) = M_PI*6.0/3.0;
     break;
   case GeomAbs_Parabola:
   case GeomAbs_Hyperbola:
index d3a1b84bca3408fd2544e4a46f0ab732ef24a29e..314f9037c79f31fd23ab419af939bfead749da91 100755 (executable)
@@ -1511,7 +1511,7 @@ static Standard_Boolean tgtfaces(const TopoDS_Edge& Ed,
 
   Standard_Boolean rev1 = (F1.Orientation() == TopAbs_REVERSED);
   Standard_Boolean rev2 = (F2.Orientation() == TopAbs_REVERSED);
-  Standard_Real f,l,eps, angmax = -PI;
+  Standard_Real f,l,eps, angmax = -M_PI;
 #ifndef DEB
   Standard_Real ang =0.;
 #else
index c3587657b14c99c37feb6ad121d290f77ec355ba..48e61f2ab1a7200b3b1d9cc810758d89ff7d635d 100755 (executable)
@@ -48,7 +48,7 @@ static Standard_Integer debclass = 0;
 #endif
 static const Standard_Real MIN_DIST = 2.E-5; //EPA: real mesh is created in the grid 10E5x10E5, so intersection should be cheched
                                              //     with double of discretization.
-static const Standard_Real PARALL_COND = Sin(PI/3.0);
+static const Standard_Real PARALL_COND = Sin(M_PI/3.0);
 static const Standard_Real RESOLUTION = 1.0E-16; //OCC319
 
 
@@ -119,7 +119,7 @@ void BRepMesh_Classifier::AnalizeWire (const TColgp_SequenceOfPnt2d&  theSeqPnt2
       const Standard_Real a = A.Angle(B);
       const Standard_Real aa = Abs(a);
       // Check if vectors are opposite
-      if (aa > Precision::Angular() && (PI - aa) > Precision::Angular())
+      if (aa > Precision::Angular() && (M_PI - aa) > Precision::Angular())
       {
         theangle += a;
         p1 = p2;
@@ -340,7 +340,7 @@ static Standard_Boolean checkWiresIntersection(const Standard_Integer
         aLoopArea += triangle2Area(p2, p3); 
         aLoopArea += triangle2Area(p3, aStartPoint); // Last triangle area
 
-        if( Abs(aLoopArea)/2 > PI*MIN_DIST )
+        if( Abs(aLoopArea)/2 > M_PI*MIN_DIST )
         {
           if ( findNextIntersection )
           {
index 1df4c51aa445c5fe80aa517394f6c225c62c3d67..c3b1a435bfbc5fdcc4eef3a0d015089edda3a303 100755 (executable)
@@ -60,7 +60,7 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
       Result = new Geom_CylindricalSurface( Axis, Radius);
     }
     else if ( Radius <= -Tol ){
-      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),PI);
+      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
       Result = new Geom_CylindricalSurface( Axis, Abs(Radius));
       Status = BRepOffset_Reversed;
     }
@@ -84,7 +84,7 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
       gp_Vec Z( Axis.Direction());
       Z *= - Offset * Sin(Alpha);
       Axis.Translate(Z);
-      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),PI);
+      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
       Alpha = -Alpha; 
     }
     Result = new Geom_ConicalSurface(Axis, Alpha, Radius);
@@ -102,7 +102,7 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
       Result = new Geom_SphericalSurface(Axis, Radius);
     }
     else if ( Radius <= -Tol ) {
-      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),PI);
+      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
       Axis.ZReverse();
       Result = new Geom_SphericalSurface(Axis, -Radius);
       Status = BRepOffset_Reversed;
index 20b2ef7637ee816531aaf65963b481c1d4184953..524c8ce3237ab21e07695c7abeedd5330321de05 100755 (executable)
@@ -1946,7 +1946,7 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
        ElSLib::Parameters( theSphere, fPnt, Uf, Vf );
        ElSLib::Parameters( theSphere, lPnt, Ul, Vl );
        if (Abs(Ul) <= Precision::Confusion())
-         Ul = 2.*PI;
+         Ul = 2.*M_PI;
        Handle(Geom_Curve) aCurv = aSphSurf->VIso(Vf);
        /*
        if (!isFirstFace)
@@ -2078,11 +2078,11 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
     Standard_Real Vfirst, Vlast;
     if (p2d1.Y() > 0.)
       {
-       Vfirst = p2d1.Y(); Vlast = PI/2.;
+       Vfirst = p2d1.Y(); Vlast = M_PI/2.;
       }
     else
       {
-       Vfirst = -PI/2.; Vlast = p2d1.Y();
+       Vfirst = -M_PI/2.; Vlast = p2d1.Y();
       }
     TopoDS_Face NewSphericalFace = BRepLib_MakeFace(aSphSurf, Ufirst, Ulast, Vfirst, Vlast, Precision::Confusion());
     TopoDS_Edge OldEdge;
@@ -2154,12 +2154,12 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
            apex = OffSurf->Value( Uapex, Vapex );
 
          //Making new degenerated edge
-         Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*PI, Vapex ) );
+         Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*M_PI, Vapex ) );
          TopoDS_Edge NewEdge;
          BB.MakeEdge( NewEdge );
          NewEdge.Orientation(TopAbs_FORWARD);
          BB.UpdateEdge( NewEdge, theLine, Cone, Precision::Confusion() );
-         BB.Range( NewEdge, 0., 2.*PI );
+         BB.Range( NewEdge, 0., 2.*M_PI );
          BB.SameParameter( NewEdge, Standard_True );
          BB.SameRange( NewEdge, Standard_True );
          BB.Degenerated( NewEdge, Standard_True );
@@ -2250,12 +2250,12 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
                apex = OffSurf->Value( Uapex, Vapex );
              
              //Making new degenerated edge
-             Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*PI, Vapex ) );
+             Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*M_PI, Vapex ) );
              TopoDS_Edge NewEdge;
              BB.MakeEdge( NewEdge );
              NewEdge.Orientation(TopAbs_FORWARD);
              BB.UpdateEdge( NewEdge, theLine, Cone, BRep_Tool::Tolerance( Circ ) );
-             BB.Range( NewEdge, 0., 2.*PI );
+             BB.Range( NewEdge, 0., 2.*M_PI );
              BB.SameParameter( NewEdge, Standard_True );
              BB.SameRange( NewEdge, Standard_True );
              BB.Degenerated( NewEdge, Standard_True );
@@ -2358,9 +2358,9 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
                  ElSLib::Parameters( theSphere, OrPnt, Uor, Vor );
                  TopoDS_Face NewFace;
                  if (Vor > 0.)
-                   NewFace = BRepLib_MakeFace( theSphere, 0., 2.*PI, Vor, PI/2. );
+                   NewFace = BRepLib_MakeFace( theSphere, 0., 2.*M_PI, Vor, M_PI/2. );
                  else
-                   NewFace = BRepLib_MakeFace( theSphere, 0., 2.*PI, -PI/2., Vor );
+                   NewFace = BRepLib_MakeFace( theSphere, 0., 2.*M_PI, -M_PI/2., Vor );
                  
                  //Updating the bound of NewFace
                  TopoDS_Edge Bound;
@@ -2436,12 +2436,12 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
                    apex = OffSurf->Value( Uapex, Vapex );
                  
                  //Making new degenerated edge
-                 Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*PI, Vapex ) );
+                 Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*M_PI, Vapex ) );
                  TopoDS_Edge NewEdge;
                  BB.MakeEdge( NewEdge );
                  NewEdge.Orientation(TopAbs_FORWARD);
                  BB.UpdateEdge( NewEdge, theLine, Cone, BRep_Tool::Tolerance( Circ ) );
-                 BB.Range( NewEdge, 0., 2.*PI );
+                 BB.Range( NewEdge, 0., 2.*M_PI );
                  BB.SameParameter( NewEdge, Standard_True );
                  BB.SameRange( NewEdge, Standard_True );
                  BB.Degenerated( NewEdge, Standard_True );
index 54bb68357276659318b220aac6b00c83c0d5ad92..c67f9640beeb7accec2f15582e35496aabd85b11 100755 (executable)
@@ -203,7 +203,7 @@ static void ComputeCurve3d(TopoDS_Edge           Edge,
       if ( D.IsParallel(gp::DX2d(),Precision::Angular())) { // Iso V.
        if ( STy == GeomAbs_Sphere) {
          gp_Pnt2d  P    = C.Line().Location();
-         if ( Abs( Abs(P.Y()) -PI/2. ) < Precision::PConfusion()) {
+         if ( Abs( Abs(P.Y()) -M_PI/2. ) < Precision::PConfusion()) {
            TheBuilder.Degenerated(Edge, Standard_True);
          }
          else {
@@ -1391,18 +1391,18 @@ void BRepOffset_Offset::Init(const TopoDS_Vertex&        Vertex,
     //                         V` = +/- PI + 2 k` PI
     gp_Pnt2d P2d = PCurve->Value(f);
     Standard_Boolean IsToAdjust = Standard_False;
-    if ( P2d.Y() < -PI/2.) {
+    if ( P2d.Y() < -M_PI/2.) {
       IsToAdjust = Standard_True;
-      PCurve->Mirror(gp_Ax2d(gp_Pnt2d(0.,-PI/2.),gp::DX2d()));
+      PCurve->Mirror(gp_Ax2d(gp_Pnt2d(0.,-M_PI/2.),gp::DX2d()));
     }
-    else if ( P2d.Y() > PI/2.) {
+    else if ( P2d.Y() > M_PI/2.) {
       IsToAdjust = Standard_True;
-      PCurve->Mirror(gp_Ax2d(gp_Pnt2d(0., PI/2.),gp::DX2d()));
+      PCurve->Mirror(gp_Ax2d(gp_Pnt2d(0., M_PI/2.),gp::DX2d()));
     }
     if ( IsToAdjust) {
       // set the u firstpoint in [0,2*pi]
-      gp_Vec2d Tr( PI, 0.);
-      if ( P2d.X() > PI) Tr.Reverse();
+      gp_Vec2d Tr( M_PI, 0.);
+      if ( P2d.X() > M_PI) Tr.Reverse();
       PCurve->Translate(Tr);
     }
 
index e94d7b0f67d334dbf5138221ff6d10b321aae9bd..19e162296ba7756251e548e0d572035f1b0776fb 100755 (executable)
@@ -994,7 +994,7 @@ static Standard_Boolean BSplineEdges(const TopoDS_Edge& E1,
 
   if (Der1.Magnitude() <= gp::Resolution() ||
       Der2.Magnitude() <= gp::Resolution())
-    angle = PI/2.;
+    angle = M_PI/2.;
   else
     angle = Der1.Angle(Der2);
 
@@ -1031,7 +1031,7 @@ static Standard_Real AngleWireEdge(const TopoDS_Wire& aWire,
   if (V11.IsSame(CV) && V21.IsSame(CV))
     {
       BSplineEdges( FirstEdge, anEdge, 0, 0, Angle );
-      Angle = PI - Angle;
+      Angle = M_PI - Angle;
     }
   else if (V11.IsSame(CV) && V22.IsSame(CV))
     BSplineEdges( FirstEdge, anEdge, 0, 1, Angle );
@@ -1040,7 +1040,7 @@ static Standard_Real AngleWireEdge(const TopoDS_Wire& aWire,
   else
     {
       BSplineEdges( FirstEdge, anEdge, 1, 1, Angle );
-      Angle = PI - Angle;
+      Angle = M_PI - Angle;
     }
   return Angle;
 }
index 5f63240ba936d7feb91629edb137adc5ad60f88a..958932b061e3c89bca94ade788226c22c854a1ec 100755 (executable)
@@ -804,18 +804,18 @@ void BRepOffsetAPI_DraftAngle::CorrectWires()
              Pmid = bc2d.Value( (bc2d.FirstParameter()+bc2d.LastParameter())/2. );
              gp_Vec2d offset;
              Standard_Boolean translate = Standard_False;
-             if (Pfirst.X()-2.*PI > Precision::Confusion() ||
-                 Plast.X()-2.*PI > Precision::Confusion()  ||
-                 Pmid.X()-2.*PI > Precision::Confusion())
+             if (Pfirst.X()-2.*M_PI > Precision::Confusion() ||
+                 Plast.X()-2.*M_PI > Precision::Confusion()  ||
+                 Pmid.X()-2.*M_PI > Precision::Confusion())
                {
-                 offset.SetCoord( -2.*PI, 0 );
+                 offset.SetCoord( -2.*M_PI, 0 );
                  translate = Standard_True;
                }
              if (Pfirst.X() < -Precision::Confusion() ||
                  Plast.X() < -Precision::Confusion()  ||
                  Pmid.X() < -Precision::Confusion())
                {
-                 offset.SetCoord( 2.*PI, 0 );
+                 offset.SetCoord( 2.*M_PI, 0 );
                  translate = Standard_True;
                }
              if (translate)
index ae02c93e338608c70740935fbdd113efbfa9e5fa..25171422045f512682b0792394736941fc706ea1 100755 (executable)
@@ -31,7 +31,7 @@ BRepPrim_Cone::BRepPrim_Cone(const Standard_Real Angle,
     Standard_DomainError::Raise("cone with null height");
   if (myHalfAngle*Height < Precision::Confusion())
     Standard_DomainError::Raise("cone with null angle");
-  if ((PI/2 - myHalfAngle)*Height < Precision::Confusion())
+  if ((M_PI/2 - myHalfAngle)*Height < Precision::Confusion())
     Standard_DomainError::Raise("cone with angle > PI/2");
   
   // cut at top
@@ -50,7 +50,7 @@ BRepPrim_Cone::BRepPrim_Cone(const Standard_Real Angle) :
        myHalfAngle(Angle),
        myRadius(0.)
 {
-  if ((Angle < 0) || (Angle > PI/2)) 
+  if ((Angle < 0) || (Angle > M_PI/2)) 
     Standard_DomainError::Raise("cone with angle <0 or > PI/2");
   VMin(0.);
   SetMeridian();
@@ -68,7 +68,7 @@ BRepPrim_Cone::BRepPrim_Cone(const Standard_Real Angle,
        myHalfAngle(Angle),
        myRadius(0.)
 {
-  if ((Angle < 0) || (Angle > PI/2)) 
+  if ((Angle < 0) || (Angle > M_PI/2)) 
     Standard_DomainError::Raise("cone with angle <0 or > PI/2");
   VMin(0.);
   SetMeridian();
@@ -84,7 +84,7 @@ BRepPrim_Cone::BRepPrim_Cone(const Standard_Real Angle,
        BRepPrim_Revolution( Axes, 0,RealLast()),
        myHalfAngle(Angle)
 {
-  if ((Angle < 0) || (Angle > PI/2)) 
+  if ((Angle < 0) || (Angle > M_PI/2)) 
     Standard_DomainError::Raise("cone with angle <0 or > PI/2");
   VMin(0.);
   SetMeridian();
index 066a6b8bbdfa61430e2585edd7747c6417c22af3..f3bdb69dcd86337b9ee36de5ffd5897cb7bcc52c 100755 (executable)
@@ -16,8 +16,8 @@
 
 // parameters on the meridian
 
-#define PMIN (-0.5*PI)
-#define PMAX (0.5*PI)
+#define PMIN (-0.5*M_PI)
+#define PMAX (0.5*M_PI)
 
 //=======================================================================
 //function : BRepPrim_Sphere
@@ -82,7 +82,7 @@ void BRepPrim_Sphere::SetMeridian()
   // Offset the parameters on the meridian
   // to trim the edge in 3pi/2, 5pi/2
 
-  SetMeridianOffset(2*PI);
+  SetMeridianOffset(2*M_PI);
 
   gp_Dir D = Axes().YDirection();
   D.Reverse();
index 2da452a02046901832577e90b0a6cfa7da7c7167..c0f4e0e8ccdaf4e600be54732f96e457041fc0bd 100755 (executable)
@@ -24,7 +24,7 @@
 BRepPrim_Torus::BRepPrim_Torus(const gp_Ax2& Position, 
                               const Standard_Real Major, 
                               const Standard_Real Minor) :
-       BRepPrim_Revolution(Position,0,2*PI),
+       BRepPrim_Revolution(Position,0,2*M_PI),
        myMajor(Major),
        myMinor(Minor)
 {
@@ -38,7 +38,7 @@ BRepPrim_Torus::BRepPrim_Torus(const gp_Ax2& Position,
 
 BRepPrim_Torus::BRepPrim_Torus(const Standard_Real Major, 
                               const Standard_Real Minor) :
-       BRepPrim_Revolution(gp::XOY(),0,2*PI),
+       BRepPrim_Revolution(gp::XOY(),0,2*M_PI),
        myMajor(Major),
        myMinor(Minor)
 {
@@ -54,7 +54,7 @@ BRepPrim_Torus::BRepPrim_Torus(const gp_Pnt& Center,
                               const Standard_Real Major, 
                               const Standard_Real Minor) :
        BRepPrim_Revolution(gp_Ax2(Center,gp_Dir(0,0,1),gp_Dir(1,0,0)),
-                          0,2*PI),
+                          0,2*M_PI),
        myMajor(Major),
        myMinor(Minor)
 {
index 2a3257914904184d7641fae550ab5146cfc00695..fd77e0724e5c9e100bae9ed65e128552540c7d0b 100755 (executable)
@@ -41,10 +41,10 @@ BRepSweep_Revol::BRepSweep_Revol
    const gp_Ax1& Ax, 
    const Standard_Boolean C):
   myRotation(S.Oriented(TopAbs_FORWARD),
-            NumShape(2*PI),
-            Location(Ax,2*PI),
-            Axe(Ax,2*PI),
-            Angle(2*PI),
+            NumShape(2*M_PI),
+            Location(Ax,2*M_PI),
+            Axe(Ax,2*M_PI),
+            Angle(2*M_PI),
             C)
 
 {
@@ -125,7 +125,7 @@ TopoDS_Shape  BRepSweep_Revol::LastShape(const TopoDS_Shape& aGenS)
 Sweep_NumShape  BRepSweep_Revol::NumShape(const Standard_Real D)const 
 {
   Sweep_NumShape N;
-  if (Abs(Angle(D) - 2*PI)<=Precision::Angular()){
+  if (Abs(Angle(D) - 2*M_PI)<=Precision::Angular()){
     N.Init(2,TopAbs_EDGE,Standard_True,
           Standard_False,Standard_False);
   }
@@ -172,8 +172,8 @@ gp_Ax1  BRepSweep_Revol::Axe(const gp_Ax1& Ax, const Standard_Real D)const
 Standard_Real  BRepSweep_Revol::Angle(const Standard_Real D)const 
 {
   Standard_Real d = Abs(D);
-  while(d>(2*PI + Precision::Angular())){
-    d = d - 2*PI;
+  while(d>(2*M_PI + Precision::Angular())){
+    d = d - 2*M_PI;
   }
   return d;
 }
index 20848760ae1399b604f109f5c13f32379dd0b716..4d2a238c417209b3ed4bd138c17d33a804fb0d3c 100755 (executable)
@@ -454,7 +454,7 @@ void  BRepSweep_Rotation::SetGeneratingPCurve
     Standard_Real U = BC.FirstParameter();
     point = BC.Value(U);
     if (point.Distance(tor.Location()) < Precision::Confusion()) {
-      v = PI;
+      v = M_PI;
 //  modified by NIZHNY-EAP Wed Mar  1 17:49:29 2000 ___BEGIN___
       u = 0.;
     }
@@ -463,15 +463,15 @@ void  BRepSweep_Rotation::SetGeneratingPCurve
                              tor.MinorRadius(),point,u,v);
     }
 //    u = 0.;
-    v = ElCLib::InPeriod(v,0.,2*PI);
-    if((2*PI - v) <= Precision::PConfusion()) v -= 2*PI;
+    v = ElCLib::InPeriod(v,0.,2*M_PI);
+    if((2*M_PI - v) <= Precision::PConfusion()) v -= 2*M_PI;
     if (aDirV.Index() == 2) {
       Standard_Real uLeft = u-myAng;
-      ElCLib::AdjustPeriodic(-PI,PI,Precision::PConfusion(),uLeft,u);
+      ElCLib::AdjustPeriodic(-M_PI,M_PI,Precision::PConfusion(),uLeft,u);
     }
     else {
       Standard_Real uRight = u+myAng;
-      ElCLib::AdjustPeriodic(-PI,PI,Precision::PConfusion(),u,uRight);
+      ElCLib::AdjustPeriodic(-M_PI,M_PI,Precision::PConfusion(),u,uRight);
     }
 //  modified by NIZHNY-EAP Wed Mar  1 17:49:32 2000 ___END___
     pnt2d.SetCoord(u,v-U);
@@ -575,7 +575,7 @@ void  BRepSweep_Rotation::SetDirectingPCurve
       BRepAdaptor_Curve BC(TopoDS::Edge(aGenE));
       p1 = BC.Value(BC.FirstParameter());
       if (p1.Distance(tor.Location()) < Precision::Confusion()){
-       v1 = PI;
+       v1 = M_PI;
 //  modified by NIZHNY-EAP Thu Mar  2 09:43:26 2000 ___BEGIN___
        u1 = 0.;
 //  modified by NIZHNY-EAP Thu Mar  2 15:28:59 2000 ___END___
@@ -586,16 +586,16 @@ void  BRepSweep_Rotation::SetDirectingPCurve
       }
       p2 = BC.Value(BC.LastParameter());
       if (p2.Distance(tor.Location()) < Precision::Confusion()){
-       v2 = PI;
+       v2 = M_PI;
       }
       else {
        ElSLib::TorusParameters(tor.Position(),tor.MajorRadius(),
                                tor.MinorRadius(),p2,u2,v2);
       }
-      ElCLib::AdjustPeriodic(0.,2*PI,Precision::PConfusion(),v1,v2);
+      ElCLib::AdjustPeriodic(0.,2*M_PI,Precision::PConfusion(),v1,v2);
 //  modified by NIZHNY-EAP Thu Mar  2 15:29:04 2000 ___BEGIN___
       u2 = u1 + myAng;
-      ElCLib::AdjustPeriodic(-PI,PI,Precision::PConfusion(),u1,u2);
+      ElCLib::AdjustPeriodic(-M_PI,M_PI,Precision::PConfusion(),u1,u2);
       if (aGenV.Orientation()==TopAbs_FORWARD){
        p22d.SetCoord(u1,v1);
       }
@@ -747,7 +747,7 @@ Standard_Boolean BRepSweep_Rotation::GDDShapeIsToAdd
        aGenS.ShapeType() == TopAbs_FACE &&
        aDirS.Type() == TopAbs_EDGE &&
        aSubDirS.Type() == TopAbs_VERTEX ){
-    return ( Abs(myAng - 2 * PI) > Precision::Angular() );
+    return ( Abs(myAng - 2 * M_PI) > Precision::Angular() );
   }
   else if ( aNewShape.ShapeType() == TopAbs_FACE &&
        aNewSubShape.ShapeType() == TopAbs_EDGE &&
@@ -757,7 +757,7 @@ Standard_Boolean BRepSweep_Rotation::GDDShapeIsToAdd
     TopLoc_Location Loc;
     GeomAdaptor_Surface AS(BRep_Tool::Surface(TopoDS::Face(aNewShape),Loc));
     if (AS.GetType()==GeomAbs_Plane){
-      return ( Abs(myAng - 2 * PI) > Precision::Angular() );
+      return ( Abs(myAng - 2 * M_PI) > Precision::Angular() );
     }
     else {
       return Standard_True;
@@ -789,7 +789,7 @@ Standard_Boolean BRepSweep_Rotation::SeparatedWires
     TopLoc_Location Loc;
     GeomAdaptor_Surface AS(BRep_Tool::Surface(TopoDS::Face(aNewShape),Loc));
     if (AS.GetType()==GeomAbs_Plane){
-      return (Abs(myAng-2*PI) <= Precision::Angular());
+      return (Abs(myAng-2*M_PI) <= Precision::Angular());
     }
     else{
       return Standard_False;
index 3d1e00fcd63e767536bac23e718a6217f9e0d95f..016e6b466303876b217d9c5f282fbe53ac32f6d8 100755 (executable)
@@ -105,7 +105,7 @@ static Standard_Integer transform(Draw_Interpretor& di,Standard_Integer n,const
     if (n < 9) return 1;
     T.SetRotation(gp_Ax1(gp_Pnt(atof(a[n-7]),atof(a[n-6]),atof(a[n-5])),
                         gp_Vec(atof(a[n-4]),atof(a[n-3]),atof(a[n-2]))),
-                 atof(a[n-1])* PI180);
+                 atof(a[n-1])* (M_PI / 180.0));
     last = n-7;
   }
   else if (!strcmp(a[0],"tmirror")) {
index 08241205296a06f5fed33d0937bce52a9fd34549..48086486d6a1d3df3f738523970fb73423481101 100755 (executable)
@@ -103,11 +103,11 @@ static Standard_Integer chamfer(Draw_Interpretor& di,
         if (!E.IsNull() && !F.IsNull() && (aMCh.Contour(E) == 0) )  {
           d1     = atof(a[i + 3]);
           angle  = atof(a[i + 4]);
-          angle *= PI / 180.;
+          angle *= M_PI / 180.;
       
           if (   (d1 > Precision::Confusion())
              && (angle > Precision::Confusion())
-              && (PI /  2.-  angle > Precision::Confusion()) )
+              && (M_PI /  2.-  angle > Precision::Confusion()) )
            aMCh.AddDA(d1, angle, E, F);
         }
         i += 5;
index f4a3eed06bf4023b2077539112a5ad4ff3e4a3e8..7c0aedaa1f3deb549413798c291f544644c835de 100755 (executable)
@@ -700,7 +700,7 @@ static Standard_Integer profile(Draw_Interpretor& di,
     case 'r':
       i++;
       if (i >= n) goto badargs;
-      angle = atof(a[i]) * PI180;
+      angle = atof(a[i]) * (M_PI / 180.0);
       if ((a[i-1][1] == 'R') || (a[i-1][1] == 'r')) {
        dx = Cos(angle);
        dy = Sin(angle);
@@ -736,7 +736,7 @@ static Standard_Integer profile(Draw_Interpretor& di,
       if (i >= n) goto badargs;
       radius = atof(a[i-1]);
       if (Abs(radius) > Precision::Confusion()) {
-       angle = atof(a[i]) * PI180;
+       angle = atof(a[i]) * (M_PI / 180.0);
        move = circle;
       }
       break;
@@ -1288,7 +1288,7 @@ static Standard_Integer profile2d(Draw_Interpretor& di,
     case 'r':
       i++;
       if (i >= n) goto badargs;
-      angle = atof(a[i]) * PI180;
+      angle = atof(a[i]) * (M_PI / 180.0);
       if ((a[i-1][1] == 'R') || (a[i-1][1] == 'r')) {
        dx = Cos(angle);
        dy = Sin(angle);
@@ -1324,7 +1324,7 @@ static Standard_Integer profile2d(Draw_Interpretor& di,
       if (i >= n) goto badargs;
       radius = atof(a[i-1]);
       if (Abs(radius) > Precision::Confusion()) {
-       angle = atof(a[i]) * PI180;
+       angle = atof(a[i]) * (M_PI / 180.0);
        move = circle;
       }
       break;
index 4ec2a217c233314563234b1148a2fc9fd31e4f0a..7cd1f23eba641ef6f3ec24ab1a289378dd6c7b82 100755 (executable)
@@ -58,7 +58,7 @@ static Standard_Integer DEP(Draw_Interpretor& theCommands,
     TopoDS_Shape aLocalShape(DBRep::Get(a[8*ii+6],TopAbs_FACE));
     F = TopoDS::Face(aLocalShape);
 //    F = TopoDS::Face(DBRep::Get(a[8*ii+6],TopAbs_FACE));
-    Angle = atof(a[8*ii+7])*PI/180.;
+    Angle = atof(a[8*ii+7])*M_PI/180.;
     Pax.SetCoord(atof(a[8*ii+8]),atof(a[8*ii+9]),atof(a[8*ii+10]));
     Dax.SetCoord(atof(a[8*ii+11]),atof(a[8*ii+12]),atof(a[8*ii+13]));
     drft.Add(F,Dirextract,Angle,gp_Pln(Pax,Dax));
@@ -122,7 +122,7 @@ static Standard_Integer NDEP(Draw_Interpretor& theCommands,
 //#else
     Flag = (Standard_Boolean ) atof(a[9*ii+7]);
 //#endif
-    Angle = atof(a[9*ii+8])*PI/180.;
+    Angle = atof(a[9*ii+8])*M_PI/180.;
     Pax.SetCoord(atof(a[9*ii+9]),atof(a[9*ii+10]),atof(a[9*ii+11]));
     Dax.SetCoord(atof(a[9*ii+12]),atof(a[9*ii+13]),atof(a[9*ii+14]));
     drft.Add(F,Dirextract,Angle,gp_Pln(Pax,Dax), Flag);
index 26964eda81a26de21c74fa4a2cb41d1186321ad6..397f27c5d3578fc218aede3989ceae3f3b91bb09 100755 (executable)
@@ -1107,7 +1107,7 @@ static Standard_Integer ROW(Draw_Interpretor& theCommands,
   FFrom   = DBRep::Get(a[4],TopAbs_SHAPE);
   if (FFrom.IsNull()) {
     Angle = atof(a[4]);
-    Angle *=PI/180.;
+    Angle *=M_PI/180.;
     i = 5;
   }
   else {
@@ -1268,7 +1268,7 @@ static Standard_Integer ROF(Draw_Interpretor& theCommands,
   FFrom   = DBRep::Get(a[4],TopAbs_SHAPE);
   if (FFrom.IsNull()) {
     Angle = atof(a[4]);
-    Angle *=PI/180.;
+    Angle *=M_PI/180.;
     i = 5;
   }
   else {
@@ -1589,7 +1589,7 @@ static Standard_Integer DEFIN(Draw_Interpretor& theCommands,
        theCommands << "Invalid DPrism base";
        return 1;
       }
-      Standard_Real Angle = atof(a[4])*PI/360; 
+      Standard_Real Angle = atof(a[4])*M_PI/360; 
       dprdef = Standard_True;
       theDPrism.Init(Sbase,TopoDS::Face(Pbase),Skface,Angle,Fuse,Modify);
     }
@@ -1773,7 +1773,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
        thePrism.Perform(Val);
       }
       else if (Kas == 2) {
-       Val *=(PI/180.);
+       Val *=(M_PI/180.);
        theRevol.Perform(Val);
       }
       else if (Kas == 4) {
@@ -1795,7 +1795,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
        thePrism.PerformUntilHeight(FUntil, Val);
       }
       else if (Kas == 2) {
-       Val *=(PI/180.);
+       Val *=(M_PI/180.);
        theRevol.PerformUntilAngle(FUntil, Val);
       }
       else if (Kas == 4) {
index 53b2149ceb7ef7cbfa688035d984f7c6fe0d4a34..81ab84989827cace0d801095575f0b90c07d1238 100755 (executable)
@@ -106,7 +106,7 @@ static Standard_Integer chfi2d(Draw_Interpretor& di, Standard_Integer n, const c
        MF.AddChamfer(E1,E2,p1,p2);
       }
       else {
-       MF.AddChamfer(E1,V,p1,p2*PI180);
+       MF.AddChamfer(E1,V,p1,p2 * (M_PI / 180.0));
       }
     }
 
index bdf02680e9143164b0138b514cbcc49bd0222503..bacca07995df9a0090021345cedff1db8c982605 100755 (executable)
@@ -108,7 +108,7 @@ static Standard_Integer cylinder(Draw_Interpretor& , Standard_Integer n, const c
   }
   else if (n == 5) {
     if (P.IsNull())
-      S = BRepPrimAPI_MakeCylinder(atof(a[2]),atof(a[3]),atof(a[4]) * PI180);
+      S = BRepPrimAPI_MakeCylinder(atof(a[2]),atof(a[3]),atof(a[4]) * (M_PI / 180.0));
     else
       S = BRepPrimAPI_MakeCylinder(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]));
   }
@@ -116,7 +116,7 @@ static Standard_Integer cylinder(Draw_Interpretor& , Standard_Integer n, const c
     if (P.IsNull())
       return 1;
     else
-      S = BRepPrimAPI_MakeCylinder(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]) * PI180);
+      S = BRepPrimAPI_MakeCylinder(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]) * (M_PI / 180.0));
   }
   else
     return 1;
@@ -142,12 +142,12 @@ static Standard_Integer cone(Draw_Interpretor& , Standard_Integer n, const char*
   }
   else if (n == 6) {
     if (P.IsNull())
-      S = BRepPrimAPI_MakeCone(atof(a[2]),atof(a[3]),atof(a[4]),atof(a[5]) * PI180);
+      S = BRepPrimAPI_MakeCone(atof(a[2]),atof(a[3]),atof(a[4]),atof(a[5]) * (M_PI / 180.0));
     else
       S = BRepPrimAPI_MakeCone(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]));
   }
   else if (n == 7) {
-    S = BRepPrimAPI_MakeCone(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]),atof(a[6]) * PI180);
+    S = BRepPrimAPI_MakeCone(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]),atof(a[6]) * (M_PI / 180.0));
   }
   else
     return 1;
@@ -173,24 +173,24 @@ static Standard_Integer sphere(Draw_Interpretor& , Standard_Integer n, const cha
   }
   else if (n == 4) {
     if (P.IsNull())
-      S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * PI180);
+      S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * (M_PI / 180.0));
     else
       S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]));
   }
   else if (n == 5) {
     if (P.IsNull())
-      S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * PI180,atof(a[4]) * PI180);
+      S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * (M_PI / 180.0),atof(a[4]) * (M_PI / 180.0));
     else
-      S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * PI180);
+      S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * (M_PI / 180.0));
   }
   else if (n == 6) {
     if (P.IsNull())
-      S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * PI180,atof(a[4]) * PI180,atof(a[5]) * PI180);
+      S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * (M_PI / 180.0),atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0));
     else
-      S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * PI180,atof(a[5]) * PI180);
+      S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0));
   }
   else if (n == 7) {
-    S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * PI180,atof(a[5]) * PI180,atof(a[6]) * PI180);
+    S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0),atof(a[6]) * (M_PI / 180.0));
   }
   else
     return 1;
@@ -216,29 +216,29 @@ static Standard_Integer torus(Draw_Interpretor& , Standard_Integer n, const char
   }
   else if (n == 5) {
     if (P.IsNull())
-      S = BRepPrimAPI_MakeTorus(atof(a[2]),atof(a[3]),atof(a[4]) * PI180);
+      S = BRepPrimAPI_MakeTorus(atof(a[2]),atof(a[3]),atof(a[4]) * (M_PI / 180.0));
     else
       S = BRepPrimAPI_MakeTorus(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]));
   }
   else if (n == 6) {
     if (P.IsNull())
       S = BRepPrimAPI_MakeTorus(atof(a[2]),atof(a[3]),
-                           atof(a[4]) * PI180,atof(a[5]) * PI180);
+                           atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0));
     else
       S = BRepPrimAPI_MakeTorus(P->Pln().Position().Ax2(),
-                           atof(a[3]),atof(a[4]),atof(a[5]) * PI180);
+                           atof(a[3]),atof(a[4]),atof(a[5]) * (M_PI / 180.0));
   }
   else if (n == 7) {
     if (P.IsNull())
       S = BRepPrimAPI_MakeTorus(atof(a[2]),atof(a[3]),
-                           atof(a[4]) * PI180,atof(a[5]) * PI180,atof(a[6]) * PI180);
+                           atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0),atof(a[6]) * (M_PI / 180.0));
     else
       S = BRepPrimAPI_MakeTorus(P->Pln().Position().Ax2(),atof(a[3]),
-                           atof(a[4]),atof(a[5]) * PI180,atof(a[6]) * PI180);
+                           atof(a[4]),atof(a[5]) * (M_PI / 180.0),atof(a[6]) * (M_PI / 180.0));
   }
   else if (n == 8) {
     S = BRepPrimAPI_MakeTorus(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),
-                         atof(a[5]) * PI180,atof(a[6]) * PI180,atof(a[7]) * PI180);
+                         atof(a[5]) * (M_PI / 180.0),atof(a[6]) * (M_PI / 180.0),atof(a[7]) * (M_PI / 180.0));
   }
   else
     return 1;
index f51217975086f98a25ee3e32ab67298abe849b9c..e34582a052625bb866e9cd58720f60d7705076de 100755 (executable)
@@ -456,7 +456,7 @@ static Standard_Integer encoderegularity (Draw_Interpretor& ,
     BRepLib::EncodeRegularity(sh);
   else {
     Standard_Real Tol = atof(a[2]);
-    Tol *= PI/180.;
+    Tol *= M_PI/180.;
     BRepLib::EncodeRegularity(sh, Tol);
   }
   return 0;
index 93a16765f1e876b4b85c440422f0342ce44a8adb..118c3ae1f99aec0afa5647e4c2e49a41a15b20ad 100755 (executable)
@@ -100,7 +100,7 @@ static Standard_Integer revol(Draw_Interpretor& ,
   gp_Dir D(atof(a[6]),atof(a[7]),atof(a[8]));
   gp_Ax1 A(P,D);
 
-  Standard_Real angle = atof(a[9]) * PI180;
+  Standard_Real angle = atof(a[9]) * (M_PI / 180.0);
   
   Standard_Boolean copy = n > 10;
 
index ad7aefe7ac8a6e7b7b791fc7e5b9adb5f6c2f1c3..3bb75d77103f98060504f63e779ccf72e5640004 100755 (executable)
@@ -382,24 +382,24 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge&
       //#30 rln 19.10.98 transformation of pcurves for IGES Surface of Revolution
       Curve2d->Mirror (gp_Ax2d (gp::Origin2d(), gp_Dir2d (1.,1.)));
       Curve2d->Mirror (gp::OX2d());
-      Curve2d->Translate (gp_Vec2d (0, 2 * PI));
+      Curve2d->Translate (gp_Vec2d (0, 2 * M_PI));
     }
     
     if(Surf->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))||
        (Surf->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)))){
       Curve2d->Mirror (gp_Ax2d (gp::Origin2d(), gp_Dir2d (1.,1.)));
       Curve2d->Mirror (gp::OX2d());
-      Curve2d->Translate (gp_Vec2d (0, 2 * PI));
+      Curve2d->Translate (gp_Vec2d (0, 2 * M_PI));
     }
     
     if (analyticMode&&(Surf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
                       Surf->IsKind(STANDARD_TYPE(Geom_ConicalSurface))))
-      myLen = PI/180.;
+      myLen = M_PI/180.;
     
     if (analyticMode&&(Surf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
                       Surf->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)))) {
       gp_Trsf2d trans;
-      trans.SetScale(gp_Pnt2d(0,0),180./PI);
+      trans.SetScale(gp_Pnt2d(0,0),180./M_PI);
       Curve2d->Transform(trans);
       First = Curve2d->TransformedParameter(First,trans);
       Last  = Curve2d->TransformedParameter(Last, trans);
index 37b291192bcdc6dbcf315b83451eabf696c8db25..2202420916c476ef135dcfde0d1e145d3e6c7104 100755 (executable)
@@ -442,7 +442,7 @@ void  BRepTools_WireExplorer::Next()
        Standard_Integer k = 1, kMin = 0, iDone = 0;
        Standard_Boolean isDegenerated = Standard_True;
        Standard_Real dmin = RealLast();
-       Standard_Real dfMinAngle = 3.0*PI, dfCurAngle = 3.0*PI;
+       Standard_Real dfMinAngle = 3.0*M_PI, dfCurAngle = 3.0*M_PI;
 
        for(iDone = 0; iDone < 2; iDone++)
          {
index 324e2340c0fc15fe0058babd7297fd6ca6e40a8a..639604e84c35d3967f0b8f4bc825745d53f65e0b 100755 (executable)
@@ -358,19 +358,19 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const
         || surf->GetType()==GeomAbs_SurfaceOfRevolution)
        
        {
-         Standard_Real uuu=PI+PI-(Umax-Umin);
+         Standard_Real uuu=M_PI+M_PI-(Umax-Umin);
          if(uuu<0) uuu=0;
          U1 = 0.0;  // modified by NIZHNY-OFV  Thu May 31 14:24:10 2001 ---> //Umin-uuu*0.5;
-         U2 = 2*PI; // modified by NIZHNY-OFV  Thu May 31 14:24:35 2001 ---> //U1+PI+PI;
+         U2 = 2*M_PI; // modified by NIZHNY-OFV  Thu May 31 14:24:35 2001 ---> //U1+M_PI+M_PI;
        }
       else { U1=U2=0.0; } 
     
       if(surf->GetType()==GeomAbs_Torus)
        { 
-         Standard_Real uuu=PI+PI-(Vmax-Vmin);
+         Standard_Real uuu=M_PI+M_PI-(Vmax-Vmin);
          if(uuu<0) uuu=0;
          V1 = 0.0;  // modified by NIZHNY-OFV  Thu May 31 14:24:55 2001 ---> //Vmin-uuu*0.5;
-         V2 = 2*PI; // modified by NIZHNY-OFV  Thu May 31 14:24:59 2001 ---> //V1+PI+PI;
+         V2 = 2*M_PI; // modified by NIZHNY-OFV  Thu May 31 14:24:59 2001 ---> //V1+M_PI+M_PI;
        }
       else { V1=V2=0.0; }   
     }
index 1e5daa0efe58f3448a3c0144729c3abe53de4143..f26c9f42a991dc427da23275ff8356cd8609c101 100755 (executable)
@@ -236,7 +236,7 @@ static void KPartCurve3d(TopoDS_Edge           Edge,
       if ( D.IsParallel(gp::DX2d(),Precision::Angular())) { // Iso V.
        if ( STy == GeomAbs_Sphere) {
          gp_Pnt2d  P    = C.Line().Location();
-         if ( Abs( Abs(P.Y()) -PI/2. ) < Precision::PConfusion()) {
+         if ( Abs( Abs(P.Y()) -M_PI/2. ) < Precision::PConfusion()) {
            TheBuilder.Degenerated(Edge, Standard_True);
          }
          else {
index 4bd3f0361f05aa15668b22e27fb35874937290c7..f29b2c0f84a11d026e3859934e2ee29be4e07992 100755 (executable)
@@ -491,10 +491,10 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
          bisectorcurve = new Geom2d_Circle(TheSol->Circle());
          if (!thesense)
            thebisector = new Geom2d_TrimmedCurve
-             (bisectorcurve,firstparameter-2.0*PI,firstparameter,thesense);
+             (bisectorcurve,firstparameter-2.0*M_PI,firstparameter,thesense);
          else
            thebisector = new Geom2d_TrimmedCurve
-             (bisectorcurve,firstparameter,firstparameter+2.0*PI,thesense);
+             (bisectorcurve,firstparameter,firstparameter+2.0*M_PI,thesense);
        }
        else if (type == GccInt_Hpr) {
          bisectorcurve = new Geom2d_Hyperbola(TheSol->Hyperbola());
@@ -509,10 +509,10 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
          bisectorcurve = new Geom2d_Ellipse(TheSol->Ellipse());
          if (!thesense)
            thebisector = new Geom2d_TrimmedCurve
-             (bisectorcurve,firstparameter-2.0*PI,firstparameter,thesense);
+             (bisectorcurve,firstparameter-2.0*M_PI,firstparameter,thesense);
          else
            thebisector = new Geom2d_TrimmedCurve
-             (bisectorcurve,firstparameter,firstparameter+2.0*PI,thesense);
+             (bisectorcurve,firstparameter,firstparameter+2.0*M_PI,thesense);
        }
       }
     }
@@ -862,13 +862,13 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve  ,
            bisectorcurve = new Geom2d_Circle(TheSol->Circle());
            if (!thesense)
              thebisector = new Geom2d_TrimmedCurve(bisectorcurve,
-                                                   firstparameter-2.0*PI,
+                                                   firstparameter-2.0*M_PI,
                                                    firstparameter,
                                                    thesense);
            else
              thebisector = new Geom2d_TrimmedCurve(bisectorcurve,
                                                    firstparameter,
-                                                   firstparameter+2.0*PI,
+                                                   firstparameter+2.0*M_PI,
                                                    thesense);
          }
          else if (type == GccInt_Hpr) {
@@ -886,13 +886,13 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve  ,
            bisectorcurve = new Geom2d_Ellipse(TheSol->Ellipse());
            if (!thesense)
              thebisector = new Geom2d_TrimmedCurve(bisectorcurve,
-                                                   firstparameter-2.0*PI,
+                                                   firstparameter-2.0*M_PI,
                                                    firstparameter,
                                                    thesense);
            else
              thebisector = new Geom2d_TrimmedCurve(bisectorcurve,
                                                    firstparameter,
-                                                   firstparameter+2.0*PI,
+                                                   firstparameter+2.0*M_PI,
                                                    thesense);
          }
        }
@@ -1195,7 +1195,7 @@ void Bisector_BisecAna::SetTrim(const Handle(Geom2d_Curve)& )
                                 thebisector->Value(UB2), UB2, Tolerance);
 
   if (thebisector->BasisCurve()->IsPeriodic()) {
-    DomainBisector.SetEquivalentParameters(0.0,2.*PI);
+    DomainBisector.SetEquivalentParameters(0.0,2.*M_PI);
   }
   FirstPointBisector = thebisector->Value(UB1);
 
index 00ba746ad4137703361f3f00dc1c3100869bc265..2b71afb40fdb56aa766b6b5c1c5abcd331186561 100755 (executable)
@@ -200,7 +200,7 @@ void  Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
     //                - one of two curves is concave.
     //                - the curves have a common point at the beginning and/or the end
     //                - the angle of opening at the common point between two curves
-    //                  values PI.
+    //                  values M_PI.
     // the extension at the beginning  is taken into account if the origin is found above.
     // ie : the origin is not the in the polygon.
     //-----------------------------------------------------------------------------
index c79dbbfcad671bfbfe5c505e89b4d81624547175..10ffab0f7d546b43ffe40615353370c042056d7b 100755 (executable)
@@ -41,7 +41,7 @@ void BlendFunc::GetShape (const BlendFunc_SectionShape SShape,
   case BlendFunc_Rational:
     {
       Standard_Integer NbSpan =
-       (Standard_Integer)(Ceiling(3.*Abs(MaxAng)/2./PI));
+       (Standard_Integer)(Ceiling(3.*Abs(MaxAng)/2./M_PI));
       NbPoles = 2*NbSpan+1;
       NbKnots = NbSpan+1;
       Degree = 2;
index 2a325258e5fc766ef8773835bb2d06389feeef28..1a5ecbae8d56d370ad9c5ed5fbb2e583e500a678 100755 (executable)
@@ -237,7 +237,7 @@ Standard_Boolean BlendFunc_CSCircular::IsSolution(const math_Vector& Sol, const
 
     Angle = ACos(Cosa);
     if (Sina <0.) {
-      Angle = 2.*PI - Angle;
+      Angle = 2.*M_PI - Angle;
     }
 
     if (Angle>maxang) {maxang = Angle;}
@@ -686,7 +686,7 @@ Standard_Boolean BlendFunc_CSCircular::GetSection(const Standard_Real Param,
       Sina = nplan.Dot(ns.Crossed(ns2));
       Angle = ACos(Cosa);
       if (Sina <0.) {
-       Angle = 2.*PI - Angle;
+       Angle = 2.*M_PI - Angle;
       }
       Dangle = -(dnw.Dot(ns2) + ns.Dot(dn2w))/Sina;
       ncrn = nplan.Crossed(ns);
index e04080b0ec1368961970303f7321a61b5a170753..f706712aa0a4969d45dde8f69d20ff98e63d8cbc 100755 (executable)
@@ -207,7 +207,7 @@ Standard_Boolean BlendFunc_CSConstRad::IsSolution(const math_Vector& Sol, const
 
     Angle = ACos(Cosa);
     if (Sina <0.) {
-      Angle = 2.*PI - Angle;
+      Angle = 2.*M_PI - Angle;
     }
 
    if (Angle>maxang) {maxang = Angle;}
@@ -649,7 +649,7 @@ Standard_Boolean BlendFunc_CSConstRad::GetSection(const Standard_Real Param,
       Sina = nplan.Dot(ns.Crossed(ns2));
       Angle = ACos(Cosa);
       if (Sina <0.) {
-       Angle = 2.*PI - Angle;
+       Angle = 2.*M_PI - Angle;
       }
       Dangle = -(dnw.Dot(ns2) + ns.Dot(dn2w))/Sina;
       ncrn = nplan.Crossed(ns);
index 1e8b0d193b65e018a3ab9157382d0a23151c590f..6e2be786a18379c21d59950b21cab6e168bb0502 100755 (executable)
@@ -902,11 +902,11 @@ Standard_Boolean BlendFunc_ConstRad::IsSolution(const math_Vector& Sol, const St
  // Reframing on  ]-pi/2, 3pi/2]
     if (Sina <0.) {
       if (Cosa > 0.) Angle = -Angle;
-      else           Angle =  2.*PI - Angle;
+      else           Angle =  2.*M_PI - Angle;
     }
 
 //    cout << "Angle : " <<Angle << endl;
-//    if ((Angle < 0) || (Angle > PI)) {
+//    if ((Angle < 0) || (Angle > M_PI)) {
 //      cout << "t = " << param << endl;
 //    }
 
@@ -1176,7 +1176,7 @@ void BlendFunc_ConstRad::Section(const Standard_Real Param,
   Pdeb = 0.;
   Pfin = ElCLib::Parameter(C,pts2);
   // Test negative and almost null angles : Singular Case
-  if (Pfin>1.5*PI) {
+  if (Pfin>1.5*M_PI) {
     np.Reverse();
     C.SetPosition(gp_Ax2(Center,np,ns1));
     Pfin = ElCLib::Parameter(C,pts2);
index f686fffebca15c3ea8ca26894f6e3ec57dd58fd2..1e15e4ef4457967133d0c8aa1008690e18aabfbf 100755 (executable)
@@ -971,7 +971,7 @@ Standard_Boolean BlendFunc_EvolRad::IsSolution(const math_Vector& Sol,
     // Reframing on ]-pi/2, 3pi/2]
     if (Sina <0.) {
       if (Cosa > 0.) Angle = -Angle;
-      else           Angle =  2.*PI - Angle;
+      else           Angle =  2.*M_PI - Angle;
     }
 
     if (Abs(Angle)>maxang) {maxang = Abs(Angle);}
@@ -1160,7 +1160,7 @@ void BlendFunc_EvolRad::Section(const Standard_Real Param,
   Pdeb = 0.;
   Pfin = ElCLib::Parameter(C,pts2);
   // Test of negative and almost null angles : Single Case
-  if (Pfin>1.5*PI) {
+  if (Pfin>1.5*M_PI) {
     np.Reverse();
     C.SetPosition(gp_Ax2(Center,np,ns1));
     Pfin = ElCLib::Parameter(C,pts2);
index d8c3b38ed2bce6b7b09aadf42af3cc7681387acd..cfc2bd796b3c1779c30acf1cf16d4c27e60e9deb 100755 (executable)
@@ -517,7 +517,7 @@ void BndLib::Add( const gp_Cylinder& S,const Standard_Real UMin,
 void BndLib::Add( const gp_Cylinder& S,const Standard_Real VMin,
                 const Standard_Real VMax,const Standard_Real Tol, Bnd_Box& B) {
 
-  BndLib::Add(S,0.,2.*PI,VMin,VMax,Tol,B);
+  BndLib::Add(S,0.,2.*M_PI,VMin,VMax,Tol,B);
 }
 
 void BndLib::Add(const gp_Cone& S,const Standard_Real UMin,
@@ -594,7 +594,7 @@ void BndLib::Add(const gp_Cone& S,const Standard_Real UMin,
 void BndLib::Add( const gp_Cone& S,const Standard_Real VMin,
                 const Standard_Real VMax,const Standard_Real Tol, Bnd_Box& B) {
 
-  BndLib::Add(S,0.,2.*PI,VMin,VMax,Tol,B);
+  BndLib::Add(S,0.,2.*M_PI,VMin,VMax,Tol,B);
 }
 
 void BndLib::Add(const gp_Sphere& S,const Standard_Real UMin,
@@ -703,12 +703,12 @@ void BndLib::Add(const gp_Torus& S,const Standard_Real UMin,
   Standard_Integer Fi1;
   Standard_Integer Fi2;
   if (VMax<VMin) {
-    Fi1 = (Standard_Integer )( VMax/(PI/4.));
-    Fi2 = (Standard_Integer )( VMin/(PI/4.));
+    Fi1 = (Standard_Integer )( VMax/(M_PI/4.));
+    Fi2 = (Standard_Integer )( VMin/(M_PI/4.));
   }
   else {
-    Fi1 = (Standard_Integer )( VMin/(PI/4.));
-    Fi2 = (Standard_Integer )( VMax/(PI/4.));
+    Fi1 = (Standard_Integer )( VMin/(M_PI/4.));
+    Fi2 = (Standard_Integer )( VMax/(M_PI/4.));
   }
   Fi2++;
   
index d63b04cb35a23a8611443451a47524fdbbbba138..c3bd4d62a02589028199d2dbf2a37eaafc17faec 100755 (executable)
@@ -240,9 +240,9 @@ void BndLib_AddSurface::Add(const Adaptor3d_Surface& S,
   case GeomAbs_Sphere: 
     {
       if (Abs(UMin) < Precision::Angular() &&
-         Abs(UMax - 2.*PI) < Precision::Angular() &&
-         Abs(VMin + PI/2.) < Precision::Angular() &&
-         Abs(VMax - PI/2.) < Precision::Angular()) // a whole sphere
+         Abs(UMax - 2.*M_PI) < Precision::Angular() &&
+         Abs(VMin + M_PI/2.) < Precision::Angular() &&
+         Abs(VMax - M_PI/2.) < Precision::Angular()) // a whole sphere
        BndLib::Add(S.Sphere(),Tol,B);
       else
        BndLib::Add(S.Sphere(),UMin,UMax,VMin,VMax,Tol,B);
index b08756a3ecba86eed706c7bccd77017cab347f01..41e5ab20f3d529daf4dd2b9f2b6fb266d6725371 100755 (executable)
@@ -22,17 +22,17 @@ void Compute(const Standard_Real P1,
   }
   Standard_Real Delta =Abs(Teta2-Teta1); 
 
-  if (Delta > 2. * PI) {
+  if (Delta > 2. * M_PI) {
     Teta1 = 0.;
-    Teta2 = 2. * PI;
+    Teta2 = 2. * M_PI;
   }
   else {
  
     if (Teta1 < 0.) {
-      do { Teta1+=2.*PI;} while (Teta1< 0.);
+      do { Teta1+=2.*M_PI;} while (Teta1< 0.);
     }
-    else if (Teta1> 2.*PI) {
-      do { Teta1-=2.*PI;} while (Teta1> 2.*PI);
+    else if (Teta1> 2.*M_PI) {
+      do { Teta1-=2.*M_PI;} while (Teta1> 2.*M_PI);
     }
     Teta2 = Teta1 + Delta;
 
@@ -46,7 +46,7 @@ void Compute(const Standard_Real P1,
   B.Add(Point(O +Ra*Cn2*Xd +Rb*Sn2*Yd));  
   
   Standard_Real Ram,Rbm;
-  if (Delta > PI/8.) {
+  if (Delta > M_PI/8.) {
     // Main radiuses to take into account only 8 points (/cos(Pi/8.))
     Ram=Ra/0.92387953251128674;
     Rbm=Rb/0.92387953251128674;
@@ -61,7 +61,7 @@ void Compute(const Standard_Real P1,
   B.Add(Point(O +Ram*Cn2*Xd +Rbm*Sn2*Yd));  
   
 
-// cos or sin PI/4.
+// cos or sin M_PI/4.
 #define PI4 0.70710678118654746
 
 // 8 points of the polygon
@@ -74,8 +74,8 @@ void Compute(const Standard_Real P1,
 #define addP6 B.Add(Point(O -Rbm*Yd)); 
 #define addP7 B.Add(Point(O +Ram*PI4*Xd -Rbm*PI4*Yd))
 
-  Standard_Integer deb = (Standard_Integer )( Teta1/(PI/4.));
-  Standard_Integer fin = (Standard_Integer )( Teta2/(PI/4.));
+  Standard_Integer deb = (Standard_Integer )( Teta1/(M_PI/4.));
+  Standard_Integer fin = (Standard_Integer )( Teta2/(M_PI/4.));
   deb++;
 
   if (deb>fin) return;
index e8047222c618c2ebdd67d4150336c130a4561cd7..a44a8da3f503a308b93486046aa4e120655b5290 100755 (executable)
@@ -38,7 +38,7 @@ static Handle(Image_Image) myImage;
 #define TRANSFORMCOLOR(c) \
   { if (TypeOfCgm == CgmCharEncoding) c = (((c+1) << 2) - 1); }
 
-#define DRAD       (PI/180.)
+#define DRAD       (M_PI/180.)
 #define DEFPLOTTER "DIRECT_CGM"
 
 //-----------------------------------------------------------------
@@ -541,7 +541,7 @@ Standard_Boolean CGM_Driver::PlotArc (const Standard_ShortReal Xpos,
 {
   Standard_ShortReal san = sAngle;
   Standard_ShortReal fan = sAngle + oAngle;
-  if (oAngle >= 2*PI) {
+  if (oAngle >= 2*M_PI) {
     PlotPolyAttrib (myLineColorIndex, -1, Standard_True);
     if (aXradius == aYradius) {
       ptabreal[0] = (float)Xpos; ptabreal[1] = (float)Ypos;
@@ -582,7 +582,7 @@ Standard_Boolean CGM_Driver::PlotPolyArc (const Standard_ShortReal Xpos,
 {
   Standard_ShortReal san = sAngle;
   Standard_ShortReal fan = sAngle + oAngle;
-  if (oAngle >= 2.*PI) {
+  if (oAngle >= 2.*M_PI) {
     if (aXradius == aYradius) {
       ptabreal[0] = (float)Xpos; ptabreal[1] = (float)Ypos;
       ptabreal[2] = (float)aXradius;
index 0c5603f0c8aad5df71472e040fba105c1808e690..8d95aab2a19ff69759a6d76114b85a2dfcf5ca92 100755 (executable)
@@ -632,11 +632,6 @@ struct flags {
 #define LOG2        0.30103
 #define PARABIT        0x40
 
-#ifndef PI
-#define PI     3.1415926535
-#endif
-
-
 
 /*   All default values set within the control program  */
 /*   with Character encoding defaults    */
index 50996a8a56b723ed4441fa1ba2bce7a734be01b4..ea36a3206450dce341cf6a9410ac8cccc8bf5743 100755 (executable)
 #define LOG2        0.30103
 #define PARABIT        0x40
 
-#ifndef PI
-#define PI     3.1415926535
-#endif
-
 #endif  /*  end of cgmpar.h */
index c982961721247aea3fc8ef6dbdccc245637c5b0f..627d5322d770f967db9e46319e2c3448ada8d31b 100755 (executable)
@@ -239,8 +239,8 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
       {  //All lambda i exist
          Standard_Integer SP;
          Standard_Real inf,sup;
-         inf=0.0-Standard_PI;
-         sup=0.0+Standard_PI;
+         inf = 0.0 - M_PI;
+         sup = 0.0 + M_PI;
          Standard_Boolean FU,LU,FV,LV;
 
          //Creation of the domain of definition depending on the position
@@ -249,29 +249,41 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
          LU=(Abs(U-Umax) < Precision::PConfusion() );
          FV=(Abs(V-Vmin) < Precision::PConfusion() );
          LV=(Abs(V-Vmax) < Precision::PConfusion() );
-         if(LU)
+         if (LU)
          {
-            inf=Standard_PI/2;
-            sup=3*inf;
-            if(LV){inf=Standard_PI;}
-            if(FV){sup=Standard_PI;}
+            inf = M_PI / 2;
+            sup = 3 * inf;
+            if (LV)
+            {
+              inf = M_PI;
+            }
+            if (FV)
+            {
+              sup = M_PI;
+            }
          }
-         else if(FU)
+         else if (FU)
          {
-            sup=Standard_PI/2;
-           inf=-sup;
-           if(LV){sup=0;}
-           if(FV){inf=0;}
+            sup = M_PI / 2;
+           inf = -sup;
+           if (LV)
+            { 
+              sup = 0;
+            }
+           if (FV)
+            {
+              inf = 0;
+            }
         }
-        else if(LV)
+        else if (LV)
         {
-           inf=0.0-Standard_PI;
-           sup=0;
+           inf = 0.0 - M_PI;
+           sup = 0;
          }
-        else if(FV)
+        else if (FV)
         {
-            inf=0;
-           sup=Standard_PI;
+            inf = 0;
+           sup = M_PI;
         }
         Standard_Boolean CS=0;
         Standard_Real Vprec=0,Vsuiv;
index 36b350d7515c4750c9d38658b9836e38b8225b21..c57a6cc49c2b01e108b82891cbf80600d5390d14 100755 (executable)
@@ -975,13 +975,13 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V,
         inside = (PPU2<param3 && PPU2>param4) || (PPU2<param4 && PPU2>param3);
         //  case of arc of circle passing on the sewing
         if ( ( basisC2->DynamicType() == STANDARD_TYPE(Geom2d_Circle) ) && 
-            ( (2*PI<param3 && 2*PI>param4) || (2*PI<param4 && 2*PI>param3) ) ) {
+            ( (2*M_PI<param3 && 2*M_PI>param4) || (2*M_PI<param4 && 2*M_PI>param3) ) ) {
         //  cas param3<param4
-          inside = (param3<PPU2 && PPU2<2*PI) 
-                     || (0<=PPU2 && PPU2<param4-2*PI);
+          inside = (param3<PPU2 && PPU2<2*M_PI) 
+                     || (0<=PPU2 && PPU2<param4-2*M_PI);
         //  cas param4<param3
-          inside = inside || (param4<PPU2 && PPU2<2*PI) 
-                               || (0<=PPU2 && PPU2<param3-2*PI);
+          inside = inside || (param4<PPU2 && PPU2<2*M_PI) 
+                               || (0<=PPU2 && PPU2<param3-2*M_PI);
         }
        if ( inside && dist < dist1) {
          numsol = nsol;
@@ -1005,12 +1005,12 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V,
     inside = (U2 < param1 && U2 >= param2) || (U2 <= param2 && U2 > param1);
     /////////////////////////////////////////////////////
     if ( (basisC1->DynamicType() == STANDARD_TYPE(Geom2d_Circle))
-      &&  ( (2*PI<param1 && 2*PI>param2) || (2*PI<param2 && 2*PI>param1) ) ) {
+      &&  ( (2*M_PI<param1 && 2*M_PI>param2) || (2*M_PI<param2 && 2*M_PI>param1) ) ) {
       // arc of circle containing the circle origin
       //  case param1<param2
-      inside = (param1<U2 && U2<2*PI) || (0<=U2 && U2<param2-2*PI);
+      inside = (param1<U2 && U2<2*M_PI) || (0<=U2 && U2<param2-2*M_PI);
       //  case param2<param1
-      inside = inside || (param2<U2 && U2<2*PI) || (0<=U2 && U2<param1-2*PI);
+      inside = inside || (param2<U2 && U2<2*M_PI) || (0<=U2 && U2<param1-2*M_PI);
     }
     if (!inside) {
       status = ChFi2d_ComputationError;
@@ -1022,12 +1022,12 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V,
     inside = (Vv2 < param3 && Vv2 >= param4) || (Vv2 <= param4 && Vv2 > param3);
     /////////////////////////////////////////////////////
     if ( (basisC2->DynamicType() == STANDARD_TYPE(Geom2d_Circle))
-      &&  ( (2*PI<param3 && 2*PI>param4) || (2*PI<param4 && 2*PI>param3) ) ) {
+      &&  ( (2*M_PI<param3 && 2*M_PI>param4) || (2*M_PI<param4 && 2*M_PI>param3) ) ) {
     // arc of circle containing the circle origin
       //  cas param3<param4
-      inside = (param3<Vv2 && Vv2<2*PI) || (0<=Vv2 && Vv2<param4-2*PI);
+      inside = (param3<Vv2 && Vv2<2*M_PI) || (0<=Vv2 && Vv2<param4-2*M_PI);
       //  cas param4<param3
-      inside = inside || (param4<Vv2 && Vv2<2*PI) || (0<=Vv2 && Vv2<param3-2*PI);
+      inside = inside || (param4<Vv2 && Vv2<2*M_PI) || (0<=Vv2 && Vv2<param3-2*M_PI);
     }
     if (!inside) {
       status = ChFi2d_ComputationError;
@@ -1098,8 +1098,8 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V,
     } // if (OE1 ...
     Standard_Real cross = vec1*vec;
     Standard_Boolean Sense = cross > 0.;
-    if (U1 > Vv1 && U1 > 2.*PI) {
-      ElCLib::AdjustPeriodic(0.,2.*PI,Precision::Confusion(),U1,Vv1);
+    if (U1 > Vv1 && U1 > 2.*M_PI) {
+      ElCLib::AdjustPeriodic(0.,2.*M_PI,Precision::Confusion(),U1,Vv1);
     } // if (U1 ... 
     if (O1 == TopAbs_FORWARD && OE1 == TopAbs_FORWARD ||
        O1 == TopAbs_REVERSED && OE1 == TopAbs_REVERSED ) {
index 668ab722e44f365bdf2834f36fb1330b527ca11b..9f601184755c2ab16b4d2fbf2deb262932da521a 100755 (executable)
@@ -98,7 +98,7 @@ Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1,
   dint1 = ns1.Crossed(tgE1);
   dint2 = ns2.Crossed(tgE2);
   Standard_Real ang = ns1.CrossMagnitude(ns2);
-  if(ang > 0.0001*PI){
+  if(ang > 0.0001*M_PI){
     Standard_Real scal = ns2.Dot(dint1);
     if ( scal <= 0. ){
       ns2.Reverse();
@@ -129,7 +129,7 @@ Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1,
       dint1 = ns1.Crossed(tgE1);
       dint2 = ns2.Crossed(tgE2);
       ang = ns1.CrossMagnitude(ns2);
-      if(ang > 0.0001*PI){
+      if(ang > 0.0001*M_PI){
         Standard_Real scal = ns2.Dot(dint1);
         if ( scal <= 0. ){
           ns2.Reverse();
index c5178140daf571a68fae5bd36b26261f300d92ad..5c6715963483229556e9d30770edabcd5abeef8e 100755 (executable)
@@ -752,7 +752,7 @@ Handle(Geom_BezierCurve) ChFi3d_Spine(const gp_Pnt&       pd,
                                       const Standard_Real R)
 {     
   TColgp_Array1OfPnt pol(1,4);
-  const Standard_Real fac = 0.5 * tan((PI-vd.Angle(vf)) * 0.5);
+  const Standard_Real fac = 0.5 * tan((M_PI-vd.Angle(vf)) * 0.5);
   pol(1) = pd;
   vd.Multiply(fac*R);
   pol(2).SetCoord(pd.X()+vd.X(),pd.Y()+vd.Y(),pd.Z()+vd.Z());
@@ -3099,11 +3099,11 @@ Standard_Boolean ChFi3d_ComputeCurves(Handle(Adaptor3d_HSurface)&   S1,
          Ufin = -Ufin;
        }
        else{
-         Udeb = 2*PI - Udeb;
-         Ufin = 2*PI - Ufin;
+         Udeb = 2*M_PI - Udeb;
+         Ufin = 2*M_PI - Ufin;
        }
       }
-      if(!c1line) ElCLib::AdjustPeriodic(0.,2*PI,Precision::Angular(),Udeb,Ufin);
+      if(!c1line) ElCLib::AdjustPeriodic(0.,2*M_PI,Precision::Angular(),Udeb,Ufin);
       Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve();
       HC->ChangeCurve().Load(C3d,Udeb,Ufin);
       ChFi3d_ProjectPCurv(HC,S1,Pc1,tol3d,tolr1);
@@ -3629,7 +3629,7 @@ Handle(GeomAdaptor_HSurface) ChFi3d_BoundSurf(TopOpeBRepDS_DataStructure&    DSt
   //In the case of a torus or cone, it is not necessary that the bounds create a surface with period more than 2PI. 
   else if (styp == GeomAbs_Torus ||
           styp == GeomAbs_Cone) {
-    Du = Min(PI-0.5*Du,0.1*Du);
+    Du = Min(M_PI-0.5*Du,0.1*Du);
     Dv = 0.;
     S1.Load(DStr.Surface(Fd1->Surf()).Surface(),
            mu-Du,Mu+Du,mv,Mv);
@@ -4126,7 +4126,7 @@ Standard_EXPORT
   //
   caredeb = 0;
   carefin = 0;
-  Angle = PI*0.75;
+  Angle = M_PI*0.75;
   LocalWL = WL;
   LocalWF = WF;
   if (!ES.IsPeriodic() && !PDeb.IsEqual(BSpline->Pole(1), tol) ) {
@@ -4748,7 +4748,7 @@ Standard_Boolean ChFi3d_IsSmooth( const Handle(Geom_Curve)& C )
            LProp.CentreOfCurvature(P2);
            gp_Vec Vec(P1, P2);
            Standard_Real Angle = PrevVec.Angle( Vec );
-           if (Angle > PI/3.)
+           if (Angle > M_PI/3.)
              return Standard_False;
            Standard_Real Ratio = Vec.Magnitude() / PrevVec.Magnitude();
            if (Ratio < 1.)
index 877089b3f1315e657fb04bf6b8cce4adb8fc1a77..f1377a9beebc9e7c842bbcc13c6fc53f46508005 100755 (executable)
@@ -700,12 +700,12 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
            // there is no need of tolerance
            // to make a decision (PRO9486) the regularity is enough.
             // However, the abcense of turn-back is checked (PRO9810)
-           OnAjoute = ((!rev && av1v2 < PI/2) 
-                       ||(rev && av1v2 > PI/2));
+           OnAjoute = ((!rev && av1v2 < M_PI/2) 
+                       ||(rev && av1v2 > M_PI/2));
             // mate attention to the single case (cf CTS21610_1)
             if (OnAjoute && (degeneOnEc || 
                 TangentOnVertex(LVEc, Ev,myEFMap, ta)) )
-             OnAjoute=((!rev && av1v2 < ta) || (rev && (PI - av1v2) < ta));
+             OnAjoute=((!rev && av1v2 < ta) || (rev && (M_PI - av1v2) < ta));
          }
          if (OnAjoute) {
            Fini = Standard_False; // If this can be useful (Cf PRO14713)
@@ -729,7 +729,7 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
            for (Jt.Initialize(myEFMap(Ev)), Nbface= 0 ;Jt.More();Jt.Next(), 
                 Nbface++) {}
            if (Nbface> 1) CurSt = ChFiDS_BreakPoint;
-           Fini = ((!rev && av1v2 < ta) || (rev && (PI - av1v2) < ta)); 
+           Fini = ((!rev && av1v2 < ta) || (rev && (M_PI - av1v2) < ta)); 
          }
        } 
       } 
@@ -772,11 +772,11 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
            Standard_Boolean rev = (Or1 != curor);
             Standard_Boolean OnAjoute =  Standard_False;
            if (FaceTangency(Ec,Ev,LVEv)) {
-             OnAjoute = ((!rev && av1v2 < PI/2) 
-                       ||(rev && av1v2 > PI/2));
+             OnAjoute = ((!rev && av1v2 < M_PI/2) 
+                       ||(rev && av1v2 > M_PI/2));
             if (OnAjoute && (degeneOnEc || 
                 TangentOnVertex(FVEc, Ev,myEFMap, ta)) )
-             OnAjoute=((!rev && av1v2 < ta) || (rev && (PI-av1v2) < ta));
+             OnAjoute=((!rev && av1v2 < ta) || (rev && (M_PI-av1v2) < ta));
            }
            if  (OnAjoute) {
              Ec = Ev; 
@@ -791,7 +791,7 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
              for(Jt.Initialize(myEFMap(Ev)),Nbface= 0 ;Jt.More();Jt.Next(), 
                  Nbface++) {}
              if (Nbface> 1) CurSt = ChFiDS_BreakPoint;
-             Fini = ((!rev && av1v2 < ta) || (rev && (PI - av1v2) < ta));
+             Fini = ((!rev && av1v2 < ta) || (rev && (M_PI - av1v2) < ta));
            }
          } 
        } 
index 636a2843fb1dcdaedcc36710d70998a3513446c2..e479bad8d3b553ec6244f502be5ae80d69599083 100755 (executable)
@@ -853,7 +853,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)&      Stripe,
     // There are ponts on the border, and internal points are found
     if (derive.Magnitude() > Precision::PConfusion()) {
       derive.Normalized();
-      derive.Rotate(PI/2);
+      derive.Rotate(M_PI/2);
       AS.Initialize(f1);
       ResU = AS.UResolution(TolE);
       ResV = AS.VResolution(TolE);
index 656b68b6a4503e31520c3f85712932c799d4f084..b60991a2317f545fba67ea14e86b67a93ee33483 100755 (executable)
@@ -2041,7 +2041,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
         trouve=Standard_False;
         ChFi3d_cherche_vertex ( Edge[0],Edge[1],Vcom,trouve);
         if (Vcom.IsSame(Vtx)) ang1=ChFi3d_AngleEdge(Vtx,Edge[0],Edge[1]);
-       if (Abs(ang1-PI)<0.01) {
+       if (Abs(ang1-M_PI)<0.01) {
          oneintersection1=Standard_True;
          facesau=Face[0];
          edgesau=Edge[1];
@@ -2054,7 +2054,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
           trouve=Standard_False;
           ChFi3d_cherche_vertex ( Edge[1],Edge[2],Vcom,trouve);
           if (Vcom.IsSame(Vtx)) ang1=ChFi3d_AngleEdge(Vtx,Edge[1],Edge[2]);
-         if (Abs(ang1-PI)<0.01) {
+         if (Abs(ang1-M_PI)<0.01) {
            oneintersection2=Standard_True;
            facesau=Face[1];
            edgesau=Edge[1];
@@ -2414,17 +2414,17 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
 //       deb=pfildeb.X();
 //       xx1=pfil1.X();
 //       xx2=pfil2.X();
-//       moins2pi=Abs(deb)< Abs(Abs(deb)-2*PI);
-//       moins2pi1=Abs(xx1)< Abs(Abs(xx1)-2*PI);
-//       moins2pi2=Abs(xx2)< Abs(Abs(xx2)-2*PI);
+//       moins2pi=Abs(deb)< Abs(Abs(deb)-2*M_PI);
+//       moins2pi1=Abs(xx1)< Abs(Abs(xx1)-2*M_PI);
+//       moins2pi2=Abs(xx2)< Abs(Abs(xx2)-2*M_PI);
 //       if (moins2pi1!=moins2pi2) {
 //         if  (moins2pi) {
-//           if (!moins2pi1) xx1=xx1-2*PI;
-//           if (!moins2pi2) xx2=xx2-2*PI;
+//           if (!moins2pi1) xx1=xx1-2*M_PI;
+//           if (!moins2pi2) xx2=xx2-2*M_PI;
 //         }
 //         else {
-//           if (moins2pi1) xx1=xx1+2*PI;
-//           if (moins2pi2) xx2=xx2+2*PI;
+//           if (moins2pi1) xx1=xx1+2*M_PI;
+//           if (moins2pi2) xx2=xx2+2*M_PI;
 //         }
 //       }
 //       pfil1.SetX(xx1);
@@ -2437,17 +2437,17 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
 //       deb=ufmin;
 //       xx1=pfac1.X();
 //       xx2=pfac2.X();
-//       moins2pi=Abs(deb)< Abs(Abs(deb)-2*PI);
-//       moins2pi1=Abs(xx1)< Abs(Abs(xx1)-2*PI);
-//       moins2pi2=Abs(xx2)< Abs(Abs(xx2)-2*PI);
+//       moins2pi=Abs(deb)< Abs(Abs(deb)-2*M_PI);
+//       moins2pi1=Abs(xx1)< Abs(Abs(xx1)-2*M_PI);
+//       moins2pi2=Abs(xx2)< Abs(Abs(xx2)-2*M_PI);
 //       if (moins2pi1!=moins2pi2) {
 //         if  (moins2pi) {
-//           if (!moins2pi1) xx1=xx1-2*PI;
-//           if (!moins2pi2) xx2=xx2-2*PI;
+//           if (!moins2pi1) xx1=xx1-2*M_PI;
+//           if (!moins2pi2) xx2=xx2-2*M_PI;
 //         }
 //         else {
-//           if (moins2pi1) xx1=xx1+2*PI;
-//           if (moins2pi2) xx2=xx2+2*PI;
+//           if (moins2pi1) xx1=xx1+2*M_PI;
+//           if (moins2pi2) xx2=xx2+2*M_PI;
 //         }
 //       }
 //       pfac1.SetX(xx1);
index 70dd7385c663aaf3efcdbf1dfd8ee6f0da4c9be7..890914894a6e8e49840fbac9190daf16d20684ea 100755 (executable)
@@ -491,15 +491,15 @@ static void CalculBatten (const Handle (GeomAdaptor_HSurface) ASurf,
   Bat.SetFreeSliding (Standard_True);
   Standard_Real ang1,ang2;
   ang1=dir1.Angle(dir3);
-  if (dir1.Angle(dir4) >0 ) ang2=PI-dir1.Angle(dir4);
-  else ang2=-PI-dir1.Angle(dir4);
+  if (dir1.Angle(dir4) >0 ) ang2=M_PI-dir1.Angle(dir4);
+  else ang2=-M_PI-dir1.Angle(dir4);
   if (contraint1&&contraint2) 
   anglebig=(Abs(ang1)>1.2)|| (Abs(ang2)>1.2 );
   else if (contraint1) 
   anglebig=Abs(ang1)>1.2;
   else if (contraint2)
   anglebig=Abs(ang2)>1.2; 
-  if (isplane && (Abs(ang1)>PI/2 || Abs(ang2)>PI/2))
+  if (isplane && (Abs(ang1)>M_PI/2 || Abs(ang2)>M_PI/2))
   isplane=Standard_False;
   if (anglebig && !isplane) {
     CalculDroite(p2d1,xdir,ydir,pcurve);
@@ -994,7 +994,7 @@ void  ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
   Standard_Boolean droit=Standard_False;
   if (bordlibre) {nedge=(nedge-2)/2 +2;
      Standard_Real angedg=Abs(ChFi3d_AngleEdge(V1,edgelibre1,edgelibre2));
-     droit=Abs(angedg-PI)<0.01;   
+     droit=Abs(angedg-M_PI)<0.01;   
   }
   else  nedge=nedge/2;
   Standard_Integer size=nedge*2;
@@ -1248,7 +1248,7 @@ void  ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
        if (ind!=ic) {
          TopoDS_Edge ecur=TopoDS::Edge(Evive.Value(ind));
          Standard_Real ang=Abs(ChFi3d_AngleEdge(V1,ecur,ereg)); 
-         if (ang<0.01 || Abs(ang-PI) <0.01) {
+         if (ang<0.01 || Abs(ang-M_PI) <0.01) {
            regul.SetValue(ic,Standard_False);
            tangentregul.SetValue(ic,Standard_True);
            trouve=Standard_True;
@@ -1290,7 +1290,7 @@ void  ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
          if ( !E1.IsSame(edgelibre1) && !E1.IsSame(edgelibre2) &&
               !E2.IsSame(edgelibre1) && !E2.IsSame(edgelibre2)){ 
           Standard_Real ang=Abs(ChFi3d_AngleEdge(V1 ,E1,E2));
-          deuxconges=(ang<0.01 || Abs(ang-PI)<0.01);
+          deuxconges=(ang<0.01 || Abs(ang-M_PI)<0.01);
          }
        }
      }
@@ -1339,7 +1339,7 @@ void  ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
        Indices(nedge,ic,icplus,icmoins);
         TopoDS_Edge Arc=TopoDS::Edge(Evive.Value(ic));
        ChFiDS_CommonPoint cp1, cp2;
-        Standard_Real angedg=PI;
+        Standard_Real angedg=M_PI;
         TopoDS_Vertex Vcom;
        if (!sharp.Value(icplus)) {
          isfirst=(sens.Value(icplus)==1);
@@ -1349,7 +1349,7 @@ void  ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
          if (cp1.IsOnArc()){
             ChFi3d_cherche_vertex(Arc,cp1.Arc(),Vcom,trouve);
             if (trouve) angedg=Abs(ChFi3d_AngleEdge(Vcom,Arc,cp1.Arc()));
-           if (!cp1.Arc().IsSame(Arc) && Abs(angedg-PI)<0.01){
+           if (!cp1.Arc().IsSame(Arc) && Abs(angedg-M_PI)<0.01){
              Evive.SetValue(ic,cp1.Arc());
              ChFi3d_edge_common_faces(myEFMap(cp1.Arc()),F1,F2);
              if (!Fvive.Value(ic,icplus).IsSame(F1) && !Fvive.Value(ic,icplus).IsSame(F2)) {
@@ -1378,10 +1378,10 @@ void  ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
          cp2 = CD.Value(icmoins)->SetOfSurfData()->Value(Index.Value(icmoins))->
            ChangeVertex (isfirst,jf.Value(icmoins));
          if (cp2.IsOnArc()) {
-            angedg=PI;
+            angedg=M_PI;
             ChFi3d_cherche_vertex(Arc,cp2.Arc(),Vcom,trouve);
             if (trouve) angedg=Abs(ChFi3d_AngleEdge(Vcom,Arc,cp2.Arc()));
-           if (!cp2.Arc().IsSame(Arc)&&Abs(angedg-PI)<0.01) {
+           if (!cp2.Arc().IsSame(Arc)&&Abs(angedg-M_PI)<0.01) {
              Evive.SetValue(ic,cp2.Arc());
              ChFi3d_edge_common_faces(myEFMap(cp2.Arc()),F1,F2);
              if (!Fvive.Value(ic,icmoins).IsSame(F1) && !Fvive.Value(ic,icmoins).IsSame(F2)) {
@@ -1459,7 +1459,7 @@ void  ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
       Standard_Integer iface;
       // if two edges are tangent the intersection is not attempted (cts60046)
       angedg=Abs(ChFi3d_AngleEdge(V1,TopoDS::Edge(Evive.Value(ic)),TopoDS::Edge(Evive.Value(icplus))));
-      if (Abs(angedg-PI)>0.01)
+      if (Abs(angedg-M_PI)>0.01)
        ok = ChFi3d_SearchFD(DStr,CD.Value(ic),CD.Value(icplus),sens.Value(ic),sens.Value(icplus),
                                  i1,i2,pa1,pa2,
                                  Index.Value(ic),Index.Value(icplus),
@@ -2230,20 +2230,20 @@ void  ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
         if (couture) {
          Standard_Boolean PI1=Standard_False, PI2=Standard_False;
          Standard_Real xx;
-         PI1=0<=p2d1.X() && p2d1.X() <=PI;
-         PI2=0<=p2d2.X() && p2d2.X() <=PI;
+         PI1=0<=p2d1.X() && p2d1.X() <=M_PI;
+         PI2=0<=p2d2.X() && p2d2.X() <=M_PI;
          
          if (Evive.Value(ic).IsSame(edgecouture)){
            xx=p2d1.X();
-           if (PI2&&!PI1) xx=xx-2*PI;
-           if (!PI2&&PI1) xx=xx+2*PI;
+           if (PI2&&!PI1) xx=xx-2*M_PI;
+           if (!PI2&&PI1) xx=xx+2*M_PI;
            p2d1.SetX(xx);
               
          }
          if (Evive.Value(icplus).IsSame(edgecouture)){
            xx=p2d2.X();
-           if (PI2&&!PI1) xx=xx+2*PI;
-           if (!PI2&&PI1) xx=xx-2*PI;
+           if (PI2&&!PI1) xx=xx+2*M_PI;
+           if (!PI2&&PI1) xx=xx-2*M_PI;
            p2d2.SetX(xx); 
          }
         }
index 6d4ac674e5c37cdd41718e58ecc91e45fc1c93d4..f8ed8fbe2f48d336ad9f0113c68b510b428c3aff 100755 (executable)
@@ -363,7 +363,7 @@ void ChFi3d_Builder::Trunc(const Handle(ChFiDS_SurfData)&    SD,
   Standard_Real Ang = dsp.Angle(ded);
   Standard_Real dis1 = psp.Distance(ped);
   Standard_Real dis2 = p1.Distance(p2);
-  if(Ang > PI/18.) tron = Standard_True;
+  if(Ang > M_PI/18.) tron = Standard_True;
   if(dis1 >= 0.1*dis2) tron = Standard_True;
   Standard_Integer ivois;
   if(!tron && YaUnVoisin(Spine,iedge,ivois,isfirst)) {
index 49537439fdbdf2886e7ec55d491ddc076b147673..4423865635cdc697b3377b83b2bead45f8c5d7b1 100755 (executable)
@@ -746,9 +746,9 @@ void  ChFi3d_ChBuilder::SimulKPart(const Handle(ChFiDS_SurfData)& SD ) const
       gp_Cone Co = AS.Cone();
       Standard_Real rad = Co.RefRadius(), sang = Co.SemiAngle();
 //#ifndef DEB
-      Standard_Integer n = (Standard_Integer) (36.*ang/PI + 1);
+      Standard_Integer n = (Standard_Integer) (36.*ang/M_PI + 1);
 //#else
-//      Standard_Integer n = 36.*ang/PI + 1;
+//      Standard_Integer n = 36.*ang/M_PI + 1;
 //#endif
       if(n<2) n = 2;
       sec = new ChFiDS_SecHArray1(1, n);
@@ -2133,7 +2133,7 @@ void ChFi3d_ChBuilder::SetRegul()
   gp_Pnt p;
   gp_Vec n1,n2,du,dv;
   BRep_Builder B;
-  Standard_Real Seuil = PI/360.;
+  Standard_Real Seuil = M_PI/360.;
   Standard_Real Seuil2 = Seuil * Seuil;
   for (it.Initialize(myRegul); it.More(); it.Next()){
     const ChFiDS_Regul& reg = it.Value();
index de057d9fc3e1e5be2a9f666147e2c898e4c8e685..bfc53dc2e05b4094a84ac2139e9896f6ff16f435 100755 (executable)
@@ -542,9 +542,9 @@ void  ChFi3d_FilBuilder::SimulKPart(const Handle(ChFiDS_SurfData)& SD) const
       gp_Torus To = AS.Torus();
       Standard_Real majr = To.MajorRadius(), minr = To.MinorRadius();
 //#ifndef DEB
-      Standard_Integer n = (Standard_Integer) (36.*ang/PI + 1);
+      Standard_Integer n = (Standard_Integer) (36.*ang/M_PI + 1);
 //#else
-//      Standard_Integer n = 36.*ang/PI + 1;
+//      Standard_Integer n = 36.*ang/M_PI + 1;
 //#endif
       if(n<2) n = 2;
       sec = new ChFiDS_SecHArray1(1, n);
@@ -565,9 +565,9 @@ void  ChFi3d_FilBuilder::SimulKPart(const Handle(ChFiDS_SurfData)& SD) const
       gp_Sphere Sp = AS.Sphere();
       Standard_Real rad = Sp.Radius();
 //#ifndef DEB
-      Standard_Integer n = (Standard_Integer) (36.*ang/PI + 1);
+      Standard_Integer n = (Standard_Integer) (36.*ang/M_PI + 1);
 //#else
-//      Standard_Integer n = 36.*ang/PI + 1;
+//      Standard_Integer n = 36.*ang/M_PI + 1;
 //#endif
       if(n<2) n = 2;
       sec = new ChFiDS_SecHArray1(1, n);
index ba0032fba23091bddd5221e8bbd5941c5dfc5256..643dd3e61ccf2733c4645f1e935a8d18d1010ba9 100755 (executable)
@@ -220,7 +220,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
   if (Sens2==-1)  dir2.Reverse();
   Standard_Real ang1;
   ang1=Abs(dir1.Angle(dir2));
-  if (ang1<PI/180.) {
+  if (ang1<M_PI/180.) {
     PerformMoreThreeCorner(Index,2);
     done=1;
     return;
index c07194f37502a9819c98510885fb0845a0169d78..58130fa41cb77caf936aa2ced5f7253d8d5aa679 100755 (executable)
@@ -128,11 +128,11 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
 #endif
        return Standard_False;
       }
-      SemiAngl = PI / 2. - Angle;      
+      SemiAngl = M_PI / 2. - Angle;      
     }
     else {
       ChamfRad = Spine.Radius() + Dis;
-      SemiAngl = Angle - PI / 2.;
+      SemiAngl = Angle - M_PI / 2.;
     }
 
     if (ouvert) {
@@ -148,7 +148,7 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
     if (ouvert) {
       SemiAngl =  Abs(angCon) + Angle;
 
-      if ( (PI / 2. - SemiAngl) < Precision::Confusion() ) {
+      if ( (M_PI / 2. - SemiAngl) < Precision::Confusion() ) {
        cout <<"wrong choice of angle for the chamfer"<<endl;
        return Standard_False;
       }
@@ -328,10 +328,10 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
                Or.Z()+Rad*Dx.Z());
     ElSLib::Parameters(Con,Pt ,u,v);
     Standard_Real tol = Precision::PConfusion();
-    if(u >= 2*PI - tol && u <= 2*PI) u = 0.;
+    if(u >= 2*M_PI - tol && u <= 2*M_PI) u = 0.;
     if(u >= fu - tol && u < fu) u = fu;
     if(u <= lu + tol && u > lu) u = lu;
-    if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*PI);
+    if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*M_PI);
     ElSLib::D1(u,v,Con,Pt,deru,derv);
     gp_Pnt2d p2dCon(u,v);
     gp_Dir2d d2dCon;
@@ -505,10 +505,10 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
                Or.Z()+Rad*Dx.Z());
     ElSLib::Parameters(Con,Pt ,u,v);
     Standard_Real tol = Precision::PConfusion();
-    if (u >= 2*PI - tol && u <= 2*PI) u = 0.;
+    if (u >= 2*M_PI - tol && u <= 2*M_PI) u = 0.;
     if (u >= fu - tol && u < fu) u = fu;
     if (u <= lu + tol && u > lu) u = lu;
-    if (u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*PI);
+    if (u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*M_PI);
     ElSLib::D1(u,v,Con,Pt,deru,derv);
     gp_Pnt2d p2dCon(u,v);
     gp_Dir2d d2dCon;
index 88a5a48e73ab5e8658dac83d0b2276859d3dc2aa..540db6c419ebd493af6ae5ce2964ee2850453fbb 100755 (executable)
@@ -270,10 +270,10 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
   ElSLib::Parameters(Cyl, Pt ,u, v);
   Standard_Real tol = Precision::PConfusion();
   Standard_Boolean careaboutsens = 0;
-  if(Abs(lu - fu - 2 * PI) < tol) careaboutsens = 1;
+  if(Abs(lu - fu - 2 * M_PI) < tol) careaboutsens = 1;
   if(u >= fu - tol && u < fu) u = fu;
   if(u <= lu + tol && u > lu) u = lu;
-  if(u < fu || u > lu) u = ChFiKPart_InPeriod(u, fu, fu + 2 * PI, tol);
+  if(u < fu || u > lu) u = ChFiKPart_InPeriod(u, fu, fu + 2 * M_PI, tol);
 
   ElSLib::D1(u, v, Cyl, Pt, deru, derv);
   gp_Dir   norcyl = deru.Crossed(derv);
index 9c54a78eef0ac6c745d7bacf07fb1f75af102728..b6912cd2dd4e1547e46b25a2aab96db35bb78d68 100755 (executable)
@@ -327,10 +327,10 @@ Standard_Boolean ChFiKPart_MakeChamfer(TopOpeBRepDS_DataStructure& DStr,
              Or.Z()+Rad*Dx.Z());
   ElSLib::Parameters(Con,Pt ,u,v);
   Standard_Real tol = Precision::PConfusion();
-  if(u >= 2*PI - tol && u <= 2*PI) u = 0.;
+  if(u >= 2*M_PI - tol && u <= 2*M_PI) u = 0.;
   if(u >= fu - tol && u < fu) u = fu;
   if(u <= lu + tol && u > lu) u = lu;
-  if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*PI);
+  if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*M_PI);
   ElSLib::D1(u,v,Con,Pt,deru,derv);
   gp_Pnt2d p2dCon(u,v);
   gp_Dir2d d2dCon;
index 1404009eae2cb73f77f514b3b81cce444a354414..b1897980cb03a5bad681ab1e3b91bc5254faa08d 100755 (executable)
@@ -255,10 +255,10 @@ Standard_Boolean ChFiKPart_MakeChamfer(TopOpeBRepDS_DataStructure& DStr,
   ElSLib::Parameters(Cyl,Pt ,u,v);
   Standard_Real tol = Precision::PConfusion();
   Standard_Boolean careaboutsens = 0;
-  if(Abs(lu - fu - 2*PI) < tol) careaboutsens = 1;
+  if(Abs(lu - fu - 2*M_PI) < tol) careaboutsens = 1;
   if(u >= fu - tol && u < fu) u = fu;
   if(u <= lu + tol && u > lu) u = lu;
-  if(u < fu || u > lu) u = ChFiKPart_InPeriod(u,fu,fu + 2*PI,tol);
+  if(u < fu || u > lu) u = ChFiKPart_InPeriod(u,fu,fu + 2*M_PI,tol);
 
   ElSLib::D1(u,v,Cyl,Pt,deru,derv);
   gp_Dir norcyl = deru.Crossed(derv);
index 85685f577feb4933d2ec3d02692b27b599c4785e..3ac08243643cdf5f40fadc5b0d79411e37315f30 100755 (executable)
@@ -149,7 +149,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
   else{
     ElSLib::TorusParameters(FilAx3,Rad,Radius,P,u,v);
     ElSLib::TorusD1(u,v,FilAx3,Rad,Radius,PP,deru,derv);
-    if(!plandab && Ang < PI/2 && dedans) v = v + 2*PI;
+    if(!plandab && Ang < M_PI/2 && dedans) v = v + 2*M_PI;
   }  
   gp_Pnt2d p2dFil(0.,v);
   gp_Dir norFil(deru.Crossed(derv));
@@ -211,7 +211,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
   else{
     ElSLib::TorusParameters(FilAx3,Rad,Radius,P,u,v);
     ElSLib::TorusD1(u,v,FilAx3,Rad,Radius,PP,deru,derv);
-    if(plandab && Ang < PI/2 && dedans) v = v + 2*PI;
+    if(plandab && Ang < M_PI/2 && dedans) v = v + 2*M_PI;
   }  
   norFil = deru.Crossed(derv);
   p2dFil.SetCoord(0.,v);
@@ -220,10 +220,10 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
   ElSLib::Parameters(Con,P,u,v);
   Standard_Real tol = Precision::PConfusion();
   Standard_Boolean careaboutsens = 0;
-  if(Abs(lu - fu - 2*PI) < tol) careaboutsens = 1;
+  if(Abs(lu - fu - 2*M_PI) < tol) careaboutsens = 1;
   if(u >= fu - tol && u < fu) u = fu;
   if(u <= lu + tol && u > lu) u = lu;
-  if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*PI);
+  if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*M_PI);
   ElSLib::D1(u,v,Con,PP,deru,derv);
   gp_Dir norCon = deru.Crossed(derv);
   gp_Dir2d d2dCon = gp::DX2d();
index affc307819abdb043793fed6d896dbe6d2435777..466ff0f98b56afd162f50a4618e2cb767267defb 100755 (executable)
@@ -110,7 +110,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
   ElSLib::Parameters(Cyl,OrFillet,UOnCyl,VOnCyl);
   Standard_Real tesp = Precision::Confusion();
   if(UOnCyl < fu - tesp || UOnCyl > lu + tesp) 
-    UOnCyl = ElCLib::InPeriod(UOnCyl,fu,fu+2*PI);
+    UOnCyl = ElCLib::InPeriod(UOnCyl,fu,fu+2*M_PI);
   ElSLib::Parameters(Pln,OrFillet,UOnPln,VOnPln);
 
   gp_Vec XDir,OtherDir;
@@ -141,7 +141,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
   gp_Lin   C3d(POnPln,DirFillet);
   Standard_Real UOnFillet,V;
   ElSLib::CylinderParameters(AxFil,Radius,POnPln,UOnFillet,V);
-  if(UOnFillet > PI) UOnFillet = 0.;
+  if(UOnFillet > M_PI) UOnFillet = 0.;
   gp_Lin2d LOnFillet(gp_Pnt2d(UOnFillet,V),gp::DY2d());
   Handle(Geom_Line)   L3d  = new Geom_Line  (C3d);
   Handle(Geom2d_Line) LFac = new Geom2d_Line(Lin2dPln);
@@ -179,7 +179,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
   gp_Pnt POnCyl = ElSLib::Value(UOnCyl,VOnCyl,Cyl);
   C3d = gp_Lin(POnCyl,DirFillet);
   ElSLib::CylinderParameters(AxFil,Radius,POnCyl,UOnFillet,V);
-  if(UOnFillet > PI) UOnFillet = 0.;
+  if(UOnFillet > M_PI) UOnFillet = 0.;
   LOnFillet = gp_Lin2d(gp_Pnt2d(UOnFillet,V),gp::DY2d());
   L3d  = new Geom_Line  (C3d);
   LFac = new Geom2d_Line(Lin2dCyl);
@@ -254,12 +254,12 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
   Standard_Real acote = 1e-7;
   ElCLib::D1(First,Spine,PtSp,DSp);
   ElSLib::Parameters(Cyl,PtSp,u,v);
-  if ((Abs(u)<acote) || (Abs(u-(2*PI))<acote)){
+  if ((Abs(u)<acote) || (Abs(u-(2*M_PI))<acote)){
     ElCLib::D1(First+0.2,Spine,PtSp2,DSp2);
     Standard_Real u2,v2;
     ElSLib::Parameters(Cyl,PtSp2,u2,v2);
-    if (Abs(u2-u)>PI){
-      u = (2*PI)-u;
+    if (Abs(u2-u)>M_PI){
+      u = (2*M_PI)-u;
       PtSp = ElSLib::Value(u,v,Cyl);
       Standard_Real PR;
       PR = ElCLib::Parameter(Spine,PtSp);
@@ -315,10 +315,10 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
             cPln.Z()+Rad*Dx.Z());
   u = 0.;
   if ((dedans && plandab) || (!dedans && !plandab)){ 
-    if (c1sphere) { v = - PI / 2; }
-    else { v = 3 * PI / 2; }
+    if (c1sphere) { v = - M_PI / 2; }
+    else { v = 3 * M_PI / 2; }
   }
-  else { v = PI / 2; }
+  else { v = M_PI / 2; }
   gp_Dir norFil;
   if(c1sphere){
     ElSLib::SphereD1(u,v,FilAx3,cylrad,PP,deru,derv);
@@ -388,10 +388,10 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
             Or.Z()+cylrad*Dx.Z());
   u = 0.;
   if (dedans) {
-    if (plandab && !c1sphere) { v = 2 * PI; }
+    if (plandab && !c1sphere) { v = 2 * M_PI; }
     else { v = 0. ; }
   }
-  else { v = PI; }
+  else { v = M_PI; }
   p2dFil.SetCoord(u,v);
   if(c1sphere){
     ElSLib::SphereD1(u,v,FilAx3,cylrad,PP,deru,derv);
@@ -405,10 +405,10 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
   ElSLib::Parameters(Cyl,P,u,v);
   Standard_Real tol = Precision::PConfusion();
   Standard_Boolean careaboutsens = 0;
-  if(Abs(lu - fu - 2*PI) < tol) careaboutsens = 1;
+  if(Abs(lu - fu - 2*M_PI) < tol) careaboutsens = 1;
   if(u >= fu - tol && u < fu) u = fu;
   if(u <= lu + tol && u > lu) u = lu;
-  if(u < fu || u > lu) u = ChFiKPart_InPeriod(u,fu,fu + 2*PI,tol);
+  if(u < fu || u > lu) u = ChFiKPart_InPeriod(u,fu,fu + 2*M_PI,tol);
   ElSLib::D1(u,v,Cyl,PP,deru,derv);
   gp_Dir norcyl = deru.Crossed(derv);
   gp_Dir2d d2dCyl = gp::DX2d();
index 078eb13ab5e575b3f8be590ba9ce0c16681e6049..1ca5319128ae207a1e84450567f55f7025262270 100755 (executable)
@@ -89,7 +89,7 @@ Standard_Boolean ChFiKPart_MakeRotule(TopOpeBRepDS_DataStructure& DStr,
   //------------------------------------------------------------
   gp_Pnt pp;
   gp_Vec du,dv;
-  ElSLib::TorusD1(0.,PI/2,ppos,r,r,pp,du,dv);
+  ElSLib::TorusD1(0.,M_PI/2,ppos,r,r,pp,du,dv);
   gp_Dir drot(du.Crossed(dv));
   Standard_Boolean reversecur = ( drot.Dot(dplnat) <= 0. );
   Standard_Boolean reversefil = ( drot.Dot(dfpl) <= 0. );
@@ -113,7 +113,7 @@ Standard_Boolean ChFiKPart_MakeRotule(TopOpeBRepDS_DataStructure& DStr,
                ppos.YDirection().Dot(pl.Position().YDirection()));
   gp_Ax22d circ2dax(p2dcirc,dx2d,dy2d);
   Handle(Geom2d_Circle) GC2d = new Geom2d_Circle(circ2dax,r);
-  gp_Pnt2d p2dlin(0.,PI/2);
+  gp_Pnt2d p2dlin(0.,M_PI/2);
   Handle(Geom2d_Line) GL2d = new Geom2d_Line(p2dlin,gp::DX2d());
   TopAbs_Orientation trans = TopAbs_REVERSED; 
   if (reversecur) trans = TopAbs_FORWARD; 
@@ -124,7 +124,7 @@ Standard_Boolean ChFiKPart_MakeRotule(TopOpeBRepDS_DataStructure& DStr,
   //--------------
   Handle(Geom_Curve) bid;
   Handle(Geom2d_Curve) bid2d;
-  p2dlin.SetCoord(0.,PI);
+  p2dlin.SetCoord(0.,M_PI);
   Handle(Geom2d_Line) GL2dcoin = new Geom2d_Line(p2dlin,gp::DX2d());
   Data->ChangeInterferenceOnS2().
     SetInterference(ChFiKPart_IndexCurveInDS(bid,DStr),trans,bid2d,GL2dcoin);
@@ -132,7 +132,7 @@ Standard_Boolean ChFiKPart_MakeRotule(TopOpeBRepDS_DataStructure& DStr,
   //et les points
   //-------------
   Data->ChangeVertexFirstOnS1().SetPoint(pp);
-  ElSLib::TorusD0(alpha,PI/2,ppos,r,r,pp);
+  ElSLib::TorusD0(alpha,M_PI/2,ppos,r,r,pp);
   Data->ChangeVertexLastOnS1().SetPoint(pp);
   Data->ChangeInterferenceOnS1().SetFirstParameter(0.);
   Data->ChangeInterferenceOnS1().SetLastParameter(alpha);
index f5478e408efb59efe32d5e998f5540f3fa3d48fe..464eaa57ee8e80c564b2b183e2bd0ac05c4e4025 100755 (executable)
@@ -114,7 +114,7 @@ Standard_Boolean ChFiKPart_Sphere(TopOpeBRepDS_DataStructure& DStr,
   
   Handle(Geom_Curve) C;
   Handle(Geom2d_Curve) C2d;
-  gp_Pnt2d p2dFil(0.,-PI/2.);
+  gp_Pnt2d p2dFil(0.,-M_PI/2.);
   gp_Lin2d lin2dFil(p2dFil,gp::DX2d());
   Handle(Geom2d_Curve) C2dFil = new Geom2d_Line(lin2dFil);
   toreverse = ( ddz.Dot(dnat1) <= 0. );
index ab3e86ae6b26472df34b0503540f93d6c51431ea..ee1821ba16f21d6fcfdce7f00f987f1db47d1185 100755 (executable)
@@ -8,7 +8,7 @@ inline void Contap_ArcFunction::Set(const gp_Dir& Direction,
 {
   myType = Contap_DraftStd;
   myDir  = Direction;
-  myCosAng = Cos(PI/2.+Angle);
+  myCosAng = Cos(M_PI/2.+Angle);
 }
 
 inline void Contap_ArcFunction::Set(const gp_Pnt& Eye,
@@ -16,7 +16,7 @@ inline void Contap_ArcFunction::Set(const gp_Pnt& Eye,
 {
   myType = Contap_DraftPrs;
   myEye  = Eye;
-  myCosAng = Cos(PI/2.+Angle);
+  myCosAng = Cos(M_PI/2.+Angle);
 }
 
 inline void Contap_ArcFunction::Set(const gp_Dir& Direction)
index 357dd7eb78dbc14b7cb9b04dbee940c0f6677745..9fb47d7d3f7264cbf2fcaf0d67c4c7302b46ed70 100755 (executable)
@@ -114,7 +114,7 @@ void Contap_ContAna::Perform (const gp_Cylinder& C,
 
   Standard_Real Coefcos = D.Dot(C.Position().XDirection());
   Standard_Real Coefsin = D.Dot(C.Position().YDirection());
-  Standard_Real Coefcst = cos(PI*0.5 + Angle);
+  Standard_Real Coefcst = cos(M_PI*0.5 + Angle);
 
   Standard_Real norm1 = Coefcos*Coefcos + Coefsin*Coefsin;
   Standard_Real norm2 = sqrt(norm1);
@@ -266,7 +266,7 @@ void Contap_ContAna::Perform (const gp_Cone& C,
   Standard_Real Coefcos = D.Dot(C.Position().XDirection());
   Standard_Real Coefsin = D.Dot(C.Position().YDirection());
 
-  Standard_Real Coefcst1 = cos(PI*0.5 + Angle);
+  Standard_Real Coefcst1 = cos(M_PI*0.5 + Angle);
 
   Standard_Real norm1 = Coefcos*Coefcos + Coefsin*Coefsin;
   Standard_Real norm2 = Sqrt(norm1);
index 97330488c7af0622d1db077dce1f3c5cb006efd7..ad808b04bc907ef37a727036c24ffbeeeeb1338f 100755 (executable)
@@ -97,14 +97,14 @@ static void Recadre(const TheSurface& myHS1,
      }
   }
   if(myHS1IsUPeriodic) {
-    lmf = PI+PI; //-- myHS1->UPeriod();
+    lmf = M_PI+M_PI; //-- myHS1->UPeriod();
     f = myHS1->FirstUParameter();
     l = myHS1->LastUParameter();
     while(u1 < f) { u1+=lmf; } 
     while(u1 > l) { u1-=lmf; }
   }
   if(myHS1IsVPeriodic) {
-    lmf = PI+PI; //-- myHS1->VPeriod(); 
+    lmf = M_PI+M_PI; //-- myHS1->VPeriod(); 
     f = myHS1->FirstVParameter();
     l = myHS1->LastVParameter();
     while(v1 < f) { v1+=lmf; } 
@@ -205,7 +205,7 @@ static void LineConstructor(Contap_TheSequenceOfLine& slin,
     Standard_Boolean novtx = Standard_True;
     if(nbvtx) novtx=Standard_False;
     for(Standard_Integer i=1;i<nbvtx  || novtx;i++) { 
-      Standard_Real firstp=0,lastp=PI+PI;
+      Standard_Real firstp=0,lastp=M_PI+M_PI;
       if(novtx == Standard_False) { 
        firstp = L.Vertex(i).ParameterOnLine();
        lastp =  L.Vertex(i+1).ParameterOnLine();
@@ -248,7 +248,7 @@ static void LineConstructor(Contap_TheSequenceOfLine& slin,
     }
     if(nbvtx)  {
       Standard_Real firstp = L.Vertex(nbvtx).ParameterOnLine();
-      Standard_Real lastp =  L.Vertex(1).ParameterOnLine() + PI+PI;
+      Standard_Real lastp =  L.Vertex(1).ParameterOnLine() + M_PI+M_PI;
       if(Abs(firstp-lastp)>0.0000000001) {  
        Standard_Real pmid = (firstp+lastp)*0.5;
        gp_Pnt Pmid =  ElCLib::Value(pmid,L.Circle());
@@ -276,7 +276,7 @@ static void LineConstructor(Contap_TheSequenceOfLine& slin,
          Contap_ThePoint pvtx = L.Vertex(nbvtx);
          Line.Add(pvtx);
 
-         pvtx = L.Vertex(1);  pvtx.SetParameter(pvtx.ParameterOnLine()+PI+PI);
+         pvtx = L.Vertex(1);  pvtx.SetParameter(pvtx.ParameterOnLine()+M_PI+M_PI);
          Line.Add(pvtx);
          Line.SetTransitionOnS(L.TransitionOnS());
          slin.Append(Line);
index e8594fe073206f7e16f255cc42a114741b3e1bb2..963ba79dadaa857c9213d2d22894ddcc9b43f024 100755 (executable)
@@ -25,7 +25,7 @@ inline void Contap_SurfFunction::Set(const gp_Dir& Direction,
   myType = Contap_DraftStd; // Contour vu
   myDir = Direction;
   myAng = Angle;
-  myCosAng = Cos(PI/2.+Angle);
+  myCosAng = Cos(M_PI/2.+Angle);
 }
 
 inline void Contap_SurfFunction::Set(const gp_Pnt& Eye,
@@ -34,7 +34,7 @@ inline void Contap_SurfFunction::Set(const gp_Pnt& Eye,
   myType = Contap_DraftPrs; // Contour vu "conique"...
   myEye = Eye;
   myAng = Angle;
-  myCosAng = Cos(PI/2.+Angle);
+  myCosAng = Cos(M_PI/2.+Angle);
 }
 
 inline void Contap_SurfFunction::Set(const Standard_Real Tolerance)
index 4582647c237d6dc6f0483a96b5cedb8c7a5bcb18..c746e19447a91af51d4fcf33dd3e2ed054604afd 100755 (executable)
@@ -60,7 +60,7 @@ Convert_CircleToBSplineCurve::Convert_CircleToBSplineCurve
     isperiodic = Standard_False;
     Convert_ConicToBSplineCurve::
       BuildCosAndSin(Parameterisation,
-                    0, 2*PI,
+                    0, 2*M_PI,
                     CosNumeratorPtr,
                     SinNumeratorPtr,
                     weights,
@@ -124,7 +124,7 @@ Convert_CircleToBSplineCurve::Convert_CircleToBSplineCurve
   Standard_Real delta = ULast - UFirst ;
   Standard_Real Eps = Precision::PConfusion();
 
-  if ( (delta > (2*PI + Eps)) || (delta <= 0.0e0) ) {
+  if ( (delta > (2*M_PI + Eps)) || (delta <= 0.0e0) ) {
     Standard_DomainError::Raise( "Convert_CircleToBSplineCurve");
   }
 
index cbfa2a0142b86e608e721f4348911448535675ba..28170f750a489ad222ed52424c7460391427456d 100755 (executable)
@@ -28,7 +28,7 @@ static void ComputePoles( const Standard_Real R,
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
-    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
   Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
 
   Standard_Real x[TheNbVPoles];
@@ -78,7 +78,7 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
 {
   Standard_Real deltaU = U2 - U1;
   Standard_DomainError_Raise_if( (Abs(V2-V1) <= Abs(Epsilon(V1))) ||
-                                (deltaU  >  2*PI)                || 
+                                (deltaU  >  2*M_PI)                || 
                                 (deltaU  <  0.  ),
                                 "Convert_ConeToBSplineSurface");
 
@@ -90,7 +90,7 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
-    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
   Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
 
   nbUPoles = 2 * nbUSpans + 1;
@@ -156,7 +156,7 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
   Standard_Real R = C.RefRadius();
   Standard_Real A = C.SemiAngle();
   
-  ComputePoles( R, A, 0., 2.*PI, V1, V2, poles); 
+  ComputePoles( R, A, 0., 2.*M_PI, V1, V2, poles); 
 
   nbUPoles = 6;
   nbUKnots = 4;
@@ -164,7 +164,7 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
   nbVKnots = 2;
   
   for ( i = 1; i <= nbUKnots; i++) {
-    uknots(i) = ( i-1) * 2. * PI /3.;
+    uknots(i) = ( i-1) * 2. * M_PI /3.;
     umults(i) = 2;
   }
   vknots(1) = V1;  vmults(1) = 2;
index db15f5a23a2f96de16196d440da269d7ec6f16a8..bd7db1b6f9bad76c83c2dd5df18d820205379a09 100755 (executable)
@@ -347,20 +347,20 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
   switch (Parameterisation) {
   case Convert_TgtThetaOver2: 
     num_spans =
-      (Standard_Integer)IntegerPart( 1.2 * delta / PI) + 1;
+      (Standard_Integer)IntegerPart( 1.2 * delta / M_PI) + 1;
     
     tgt_theta_flag = 1 ;
     break ;
   case Convert_TgtThetaOver2_1:
     num_spans = 1 ;
-    if (delta > 0.9999 * PI) {
+    if (delta > 0.9999 * M_PI) {
       Standard_ConstructionError::Raise() ; 
       }
     tgt_theta_flag = 1 ;
     break ;
   case Convert_TgtThetaOver2_2:
     num_spans = 2 ;
-    if (delta > 1.9999 * PI) {
+    if (delta > 1.9999 * M_PI) {
       Standard_ConstructionError::Raise() ;
       }
     tgt_theta_flag = 1 ;
@@ -490,7 +490,7 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
       alpha_2 = alpha * 0.5e0 ;
       p_param = - 1.0e0 / (alpha_2 * alpha_2) ;
      
-      if (alpha_2 <  PI * 0.5e0) {
+      if (alpha_2 <  M_PI * 0.5e0) {
        tan_alpha_2 = Tan(alpha_2) ;
        value1 = 3.0e0 * (tan_alpha_2 - alpha_2) ;
         value1 = alpha_2 / value1 ;
@@ -624,7 +624,7 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
   if (Parameterisation == Convert_TgtThetaOver2) {
     BuildCosAndSin(Convert_TgtThetaOver2_3,
                   0.0e0,
-                  2 * PI,
+                  2 * M_PI,
                   temp_cos_ptr,
                   temp_sin_ptr,
                   temp_denominator_ptr,
@@ -649,7 +649,7 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
   else if (Parameterisation == Convert_RationalC1) 
     {
      first_param = 0.0e0 ;
-     last_param  = PI ;
+     last_param  = M_PI ;
      BuildCosAndSin(Convert_RationalC1,
                   first_param,
                   last_param,
@@ -675,7 +675,7 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
      DenominatorPtr = 
       new TColStd_HArray1OfReal(1,num_periodic_poles) ;
     
-     half_pi = PI * 0.5e0 ;
+     half_pi = M_PI * 0.5e0 ;
      index = 1 ;
      for (jj = 1 ; jj <= 2 ; jj++) {
         flat_knots(index) = -  half_pi  ;
@@ -690,7 +690,7 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
        }
      }
      for (jj = 1 ; jj <= 2 ; jj++) {
-        flat_knots(index) = 2 * PI +  half_pi  ;
+        flat_knots(index) = 2 * M_PI +  half_pi  ;
          index += 1 ;
        }
      KnotsPtr = 
@@ -712,9 +712,9 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
      inverse = 1.0e0 ;
      for (ii = parameters.Lower() ; ii <= parameters.Upper() ; ii++) {
        param = parameters(ii) ;
-       if (param > PI) {
+       if (param > M_PI) {
         inverse = -1.0e0 ;
-         param -= PI ;
+         param -= M_PI ;
        }
        BSplCLib::D0(param,
                    0,
index abff8bb791c596fc3ac8e876f70deb3cb1c1302e..84ed547382a604cd5be5a7d0d304ee83ebaf72c5 100755 (executable)
@@ -28,7 +28,7 @@ static void ComputePoles( const Standard_Real R,
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
-    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
   Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
 
   Standard_Real UStart = U1;
@@ -70,7 +70,7 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
 {
   Standard_Real deltaU = U2 - U1;
   Standard_DomainError_Raise_if( (Abs(V2-V1) <= Abs(Epsilon(V1))) ||
-                                (deltaU  >  2*PI)                || 
+                                (deltaU  >  2*M_PI)                || 
                                 (deltaU  <  0.  ),
                                 "Convert_CylinderToBSplineSurface");
 
@@ -82,7 +82,7 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
-    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
   Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
 
   nbUPoles = 2 * nbUSpans + 1;
@@ -146,7 +146,7 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
 
   Standard_Real R = Cyl.Radius();
   
-  ComputePoles( R, 0., 2.*PI, V1, V2, poles); 
+  ComputePoles( R, 0., 2.*M_PI, V1, V2, poles); 
 
   nbUPoles = 6;
   nbUKnots = 4;
@@ -154,7 +154,7 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
   nbVKnots = 2;
   
   for ( i = 1; i <= nbUKnots; i++) {
-    uknots(i) = ( i-1) * 2. * PI /3.;
+    uknots(i) = ( i-1) * 2. * M_PI /3.;
     umults(i) = 2;
   }
   vknots(1) = V1;  vmults(1) = 2;
index e3e87fcf32a6c4dbc8a851bdb602cf875d5dbbcf..04f276ae29bf39517de269de3ffd6bf29f929778 100755 (executable)
@@ -67,7 +67,7 @@ Convert_EllipseToBSplineCurve::Convert_EllipseToBSplineCurve
     isperiodic = Standard_False;
     Convert_ConicToBSplineCurve::
       BuildCosAndSin(Parameterisation,
-                    0, 2*PI,
+                    0, 2*M_PI,
                     CosNumeratorPtr,
                     SinNumeratorPtr,
                     weights,
@@ -131,7 +131,7 @@ Convert_EllipseToBSplineCurve::Convert_EllipseToBSplineCurve
   Standard_Real Tol = Precision::PConfusion();
   Standard_Real delta = ULast - UFirst;
 #endif
-  Standard_DomainError_Raise_if( (delta > (2*PI+Tol)) || (delta <= 0.0e0),
+  Standard_DomainError_Raise_if( (delta > (2*M_PI+Tol)) || (delta <= 0.0e0),
                                "Convert_EllipseToBSplineCurve");
   Standard_Integer ii;
   Standard_Real R, r, value;
index 13fa9317828907daed8e3beec9cb756bcc0b0e53..5180ed34b4e4ff1fbb6468258623da5665e0bbf7 100755 (executable)
@@ -34,7 +34,7 @@ static Standard_Real Locate(const Standard_Real Angfin,
     BSplCLib::D0(ptest,TPoles,BSplCLib::NoWeights(),valP);
     Standard_Real theta = ATan2(valP.Y(),valP.X());
     if (theta < 0.) {
-      theta +=2.*PI;
+      theta +=2.*M_PI;
     }
     if (Abs(theta - Angfin) < Ptol) {
       return ptest;
@@ -69,7 +69,7 @@ void BuildPolynomialCosAndSin
   trim_max,
   middle,
   Angle,
-  PI2 = 2*PI ;
+  PI2 = 2*M_PI ;
   Standard_Integer ii, degree = num_poles -1 ;
   locUFirst = UFirst ;
 
@@ -91,7 +91,7 @@ void BuildPolynomialCosAndSin
   // parametre 1/2 of Bezier was exactly a point of the bissectrice 
   // of the required angular sector.
   //
-  Angle = middle - PI ;
+  Angle = middle - M_PI ;
   //
   // Circle of radius 1. See Euclid
   //
@@ -113,10 +113,10 @@ void BuildPolynomialCosAndSin
   }
 
 
-  t_min = 1.0e0 - (Delta * 1.3e0 / PI) ;
+  t_min = 1.0e0 - (Delta * 1.3e0 / M_PI) ;
   t_min *= 0.5e0 ;
   t_min = Max(t_min,0.0e0) ;
-  t_max = 1.0e0 + (Delta * 1.3e0 / PI) ;
+  t_max = 1.0e0 + (Delta * 1.3e0 / M_PI) ;
   t_max *= 0.5e0 ;
   t_max = Min(t_max,1.0e0) ;
   trim_max = Locate(Delta,
index ff9fe06d9f391c0513b4ec9996a068943dd23273..74a9a057ac5a0942365a47869ffed7b19523a46a 100755 (executable)
@@ -28,9 +28,9 @@ static void ComputePoles ( const Standard_Real R,
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
-    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
   Standard_Integer  
-    nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / PI) + 1;
+    nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / M_PI) + 1;
   Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
   Standard_Real AlfaV = deltaV / ( nbVSpans * 2);
 
@@ -86,8 +86,8 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
 {
   Standard_Real deltaU = U2 - U1;
   Standard_Real deltaV = V2 - V1;
-  Standard_DomainError_Raise_if( (deltaU>2*PI) || (deltaU<0.) ||
-                                (V1 < -PI/2.0) || (V2 > PI/2),
+  Standard_DomainError_Raise_if( (deltaU>2*M_PI) || (deltaU<0.) ||
+                                (V1 < -M_PI/2.0) || (V2 > M_PI/2),
                                "Convert_SphereToBSplineSurface");
 
   isuperiodic = Standard_False;
@@ -98,9 +98,9 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
-    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
   Standard_Integer  
-    nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / PI) + 1;
+    nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / M_PI) + 1;
   Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
   Standard_Real AlfaV = deltaV / ( nbVSpans * 2);
 
@@ -163,7 +163,7 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
 #ifndef No_Exception
   Standard_Real delta = Param2 - Param1;
 #endif
-  Standard_DomainError_Raise_if( (delta>2*PI) || (delta<0.),
+  Standard_DomainError_Raise_if( (delta>2*M_PI) || (delta<0.),
                                "Convert_SphereToBSplineSurface");
 
   Standard_Integer i, j;
@@ -177,20 +177,20 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
   Standard_Real W1, W2, CosU, CosV;
   
   if ( isuperiodic) {
-    ComputePoles(R, 0., 2.*PI, Param1, Param2, poles);
+    ComputePoles(R, 0., 2.*M_PI, Param1, Param2, poles);
     
     nbUPoles = 6;
     nbUKnots = 4;
     
     deltaV = Param2 - Param1;
     Standard_Integer  
-      nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / PI) + 1;
+      nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / M_PI) + 1;
     Standard_Real AlfaV = deltaV / ( nbVSpans * 2);
     nbVPoles = 2 * nbVSpans + 1;
     nbVKnots = nbVSpans + 1;
     
     for ( i = 1; i <= nbUKnots; i++) {
-      uknots(i) = ( i-1) * 2. * PI /3.;
+      uknots(i) = ( i-1) * 2. * M_PI /3.;
       umults(i) = 2;
     }
     for ( i = 1; i <= nbVKnots; i++) {
@@ -203,21 +203,21 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
     CosV = Cos(AlfaV);
   }
   else {
-    ComputePoles(R, Param1, Param2, -PI/2., PI/2., poles);
+    ComputePoles(R, Param1, Param2, -M_PI/2., M_PI/2., poles);
     
     nbVPoles = 5;
     nbVKnots = 3;
     
     deltaU = Param2 - Param1;
     Standard_Integer  
-      nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+      nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
     Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
     nbUPoles = 2 * nbUSpans + 1;
     nbUKnots = nbUSpans + 1;
     
-    vknots(1) = -PI/2.;  vmults(1) = 3;
+    vknots(1) = -M_PI/2.;  vmults(1) = 3;
     vknots(2) =     0.;  vmults(2) = 2;
-    vknots(3) =  PI/2.;  vmults(3) = 3;
+    vknots(3) =  M_PI/2.;  vmults(3) = 3;
     for ( i = 1; i <= nbUKnots; i++) {
       uknots(i) = Param1 + (i-1) * 2 * AlfaU;
       umults(i) = 2;
@@ -274,15 +274,15 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
   
   Standard_Real R = Sph.Radius();
 
-  ComputePoles( R, 0., 2.*PI, -PI/2., PI/2., poles);
+  ComputePoles( R, 0., 2.*M_PI, -M_PI/2., M_PI/2., poles);
 
   uknots( 1) = 0.;
-  uknots( 2) = 2. * PI / 3.;
-  uknots( 3) = 4. * PI / 3.;
-  uknots( 4) = 2. * PI;
-  vknots( 1) = -PI/2.;
+  uknots( 2) = 2. * M_PI / 3.;
+  uknots( 3) = 4. * M_PI / 3.;
+  uknots( 4) = 2. * M_PI;
+  vknots( 1) = -M_PI/2.;
   vknots( 2) =     0.;
-  vknots( 3) =  PI/2.;
+  vknots( 3) =  M_PI/2.;
   for ( i = 1; i <= 4; i++) {
     umults( i) = 2;
   }
index d8df101f02afa78883b3c103d67a83b877437559..49a2051beefc4231ce917359a8ac869b3b02b369 100755 (executable)
@@ -29,9 +29,9 @@ static void ComputePoles ( const Standard_Real R,
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
-    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
   Standard_Integer  
-    nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / PI) + 1;
+    nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / M_PI) + 1;
   Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
   Standard_Real AlfaV = deltaV / ( nbVSpans * 2);
 
@@ -88,8 +88,8 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
 {
   Standard_Real deltaU = U2 - U1;
   Standard_Real deltaV = V2 - V1;
-  Standard_DomainError_Raise_if( (deltaU>2*PI) || (deltaU<0.) ||
-                                (deltaV>2*PI) || (deltaV<0.),
+  Standard_DomainError_Raise_if( (deltaU>2*M_PI) || (deltaU<0.) ||
+                                (deltaV>2*M_PI) || (deltaV<0.),
                                "Convert_TorusToBSplineSurface");
 
   isuperiodic = Standard_False;
@@ -100,9 +100,9 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
 
   // Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
   Standard_Integer 
-    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+    nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
   Standard_Integer  
-    nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / PI) + 1;
+    nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / M_PI) + 1;
   Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
   Standard_Real AlfaV = deltaV / ( nbVSpans * 2);
 
@@ -166,7 +166,7 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
 #ifndef No_Exception
   Standard_Real delta = Param2 - Param1;
 #endif
-  Standard_DomainError_Raise_if( (delta>2*PI) || (delta<0.),
+  Standard_DomainError_Raise_if( (delta>2*M_PI) || (delta<0.),
                                "Convert_TorusToBSplineSurface");
 
   Standard_Integer i, j;
@@ -181,20 +181,20 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
   Standard_Real W1, W2, CosU, CosV;
   
   if ( isuperiodic) {
-    ComputePoles(R, r, 0, 2.*PI, Param1, Param2, poles);
+    ComputePoles(R, r, 0, 2.*M_PI, Param1, Param2, poles);
     
     nbUPoles = 6;
     nbUKnots = 4;
     
     deltaV = Param2 - Param1;
     Standard_Integer  
-      nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / PI) + 1;
+      nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / M_PI) + 1;
     Standard_Real AlfaV = deltaV / ( nbVSpans * 2);
     nbVPoles = 2 * nbVSpans + 1;
     nbVKnots = nbVSpans + 1;
     
     for ( i = 1; i <= nbUKnots; i++) {
-      uknots(i) = ( i-1) * 2. * PI /3.;
+      uknots(i) = ( i-1) * 2. * M_PI /3.;
       umults(i) = 2;
     }
     for ( i = 1; i <= nbVKnots; i++) {
@@ -207,20 +207,20 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
     CosV = Cos(AlfaV);
   }
   else {
-    ComputePoles(R, r, Param1, Param2, 0., 2.*PI, poles);
+    ComputePoles(R, r, Param1, Param2, 0., 2.*M_PI, poles);
     
     nbVPoles = 6;
     nbVKnots = 4;
     
     deltaU = Param2 - Param1;
     Standard_Integer  
-      nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
+      nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
     Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
     nbUPoles = 2 * nbUSpans + 1;
     nbUKnots = nbUSpans + 1;
     
     for ( i = 1; i <= nbVKnots; i++) {
-      vknots(i) = ( i-1) * 2. * PI /3.;
+      vknots(i) = ( i-1) * 2. * M_PI /3.;
       vmults(i) = 2;
     }
     for ( i = 1; i <= nbUKnots; i++) {
@@ -281,12 +281,12 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
   Standard_Real R = T.MajorRadius();
   Standard_Real r = T.MinorRadius();
 
-  ComputePoles( R, r, 0., 2.*PI, 0., 2.*PI, poles);
+  ComputePoles( R, r, 0., 2.*M_PI, 0., 2.*M_PI, poles);
 
   uknots( 1) = vknots( 1) = 0.;
-  uknots( 2) = vknots( 2) = 2. * PI / 3.;
-  uknots( 3) = vknots( 3) = 4. * PI / 3.;
-  uknots( 4) = vknots( 4) = 2. * PI;
+  uknots( 2) = vknots( 2) = 2. * M_PI / 3.;
+  uknots( 3) = vknots( 3) = 4. * M_PI / 3.;
+  uknots( 4) = vknots( 4) = 2. * M_PI;
   for ( i = 1; i <= 4; i++) {
     umults( i) = vmults( i) = 2;
   }
index 4df1225f0db37e14a3ef11bba546b4b9ecb19aef..5bdb9a9cbaad081d8a0f12aea06357d1d49e9f6c 100755 (executable)
@@ -97,9 +97,9 @@ static Standard_Real    size    = 100.;
 static Standard_Integer discret = 30;
 static Standard_Boolean disptriangles = Standard_False;
 static Standard_Boolean disppolygons = Standard_False;
-static Standard_Real    anglHLR = 35 * PI / 180;
-static Standard_Real    HAngMin =  1 * PI / 180;
-static Standard_Real    HAngMax = 35 * PI / 180;
+static Standard_Real    anglHLR = 35 * M_PI / 180;
+static Standard_Real    HAngMin =  1 * M_PI / 180;
+static Standard_Real    HAngMax = 35 * M_PI / 180;
 static Standard_Boolean withHLR = Standard_False;
 static Standard_Boolean withRg1 = Standard_True;
 static Standard_Boolean withRgN = Standard_False;
@@ -172,7 +172,7 @@ static Standard_Integer hlr (Draw_Interpretor& di,
       di << "\n";
       if (withHLR) {
        di << "Angle of discretization : ";
-       di << anglHLR * 180 / PI << " degrees" << "\n";
+       di << anglHLR * 180 / M_PI << " degrees" << "\n";
       }
     }
     else di << " wireframe";
@@ -207,7 +207,7 @@ static Standard_Integer hlr (Draw_Interpretor& di,
     }
     else if (!strcasecmp(a[1],"ang"  )) {
       di << "Angle de discretisation : ";
-      di << anglHLR * 180 / PI << " degres" << "\n";
+      di << anglHLR * 180 / M_PI << " degres" << "\n";
     }
     else return 1;
   }
@@ -218,12 +218,12 @@ static Standard_Integer hlr (Draw_Interpretor& di,
     nFirst = 3;
     if (n == 3) {
       Standard_Real ang = atof(a[2]);
-      anglHLR = ang * PI / 180;
+      anglHLR = ang * M_PI / 180;
       if (anglHLR < HAngMin) anglHLR = HAngMin;
       if (anglHLR > HAngMax) anglHLR = HAngMax;
     }
     di << "Angle of discretization : ";
-    di << anglHLR * 180 / PI << " degrees" << "\n";
+    di << anglHLR * 180 / M_PI << " degrees" << "\n";
   }
 
   if (n >= nFirst + 1) {
@@ -264,7 +264,7 @@ static Standard_Integer hlr (Draw_Interpretor& di,
          }
          else if (!strcasecmp(a[1],"ang"  )) {
            Standard_Real ang = atof(a[2]);
-           localAng = ang * PI / 180;
+           localAng = ang * M_PI / 180;
          }
          else return 1;
          S->DisplayHLR(localHLR, localRg1, localRgN, localHid,
index bbdd18378b0592cb06ee07aab7f124914c8a3744..fde44d1b8400c2684d61cde0403f62315b034e68 100755 (executable)
@@ -60,7 +60,7 @@ void DDataStd::DumpConstraint (const Handle(TDataXtd_Constraint)& CTR, Standard_
     TDataStd_RealEnum t = CTR->GetValue()->GetDimension();  
     TDataStd::Print(t,anOS); 
     Standard_Real val = CTR->GetValue()->Get();
-    if (t == TDataStd_ANGULAR) val = (180.*val)/PI;
+    if (t == TDataStd_ANGULAR) val = (180.*val)/M_PI;
     anOS << " ";
     anOS << val;
   }
index 78bb2f8147630b1892d571c2f5d582db860c61f4..c69aa0a901225f38af078342d0474af1fc7d04b5 100755 (executable)
@@ -192,7 +192,7 @@ static Standard_Integer DDataStd_SetPlane (Draw_Interpretor& di,
 //       Standard_Real ang = atof(arg[9]);
 //       T.SetRotation(gp_Ax1(gp_Pnt(x,y,z),
 //                         gp_Vec(dx,dy,dz)),
-//                  ang * PI180);
+//                  ang * (M_PI / 180.0));
 //     }
 //     Loc = T;
 //   }
index ead2555d59430f8d91b59c9a6ed12d14c93bc62d..84b863ab6ed3b165f75fad9d0a52bd2b68de0989 100755 (executable)
@@ -355,7 +355,7 @@ Handle(Draw_Drawable3D) DDataStd_DrawDriver::DrawableConstraint (const Handle(TD
   if (!D.IsNull()) {
     if (!A->GetValue().IsNull()) {
       Standard_Real val = A->GetValue()->Get();
-      if (A->GetValue()->GetDimension() == TDataStd_ANGULAR) val = (180.*val)/PI;
+      if (A->GetValue()->GetDimension() == TDataStd_ANGULAR) val = (180.*val)/M_PI;
       D->SetValue(val);
     }
     // unverified constraints are red (default is white)
index 9251e51715a5e570684416574c9d65b90b68e953..c06c6141b0f06b76ca338d945c29cf74aaa9c2a7 100755 (executable)
@@ -79,7 +79,7 @@ static void Sample()
   // Filling array
 
   for(Standard_Integer j = realarray->Lower(); j<= realarray->Upper(); j++) {
-    realarray->SetValue(j, Standard_PI*j); 
+    realarray->SetValue(j, M_PI * j); 
   }
 
   // Getting length of array
index 1ce98cc4614f2b9befae5b7760a9669e53247625..6fa4b5427b8e8f97694598e2619131189a9632f8 100644 (file)
@@ -1103,7 +1103,7 @@ static Standard_Integer DNaming_PRotateLine(Draw_Interpretor& di,
 
     Standard_Real anAngle = 0.;
     anAngle =  atof(a[4]);
-    Standard_Real aK = 2*PI/360;
+    Standard_Real aK = 2*M_PI/360;
     anAngle = anAngle * aK;
     DNaming::GetReal(aFun,PTRANSF_ANG)->Set(anAngle);
 
@@ -1265,7 +1265,7 @@ static Standard_Integer DNaming_AddRevol (Draw_Interpretor& theDI,
 
   if(theNb > 4 ) {  
     Standard_Real angle = atof(theArg[4]);
-    Standard_Real aK = 2*PI/360;
+    Standard_Real aK = 2*M_PI/360;
     angle = angle * aK;
     DNaming::GetReal(aFun,REVOL_ANGLE)->Set(angle);
     if( theNb == 6) {
index 73ccdbf0a9a7ade78c594a1c3aa24645938f8b44..8d925964f613952cc0e76ce33dde3b4e3da2129f 100755 (executable)
@@ -409,7 +409,7 @@ Standard_Boolean Draft_Modification::NewCurve2d(const TopoDS_Edge& E,
     gp_Pnt2d PF,PL;
     BRep_Tool::UVPoints(E,F,PF,PL);
     gp_Pnt2d NewPF = C->Value(Fp);
-    gp_Vec2d vectra(2.*PI,0.);
+    gp_Vec2d vectra(2.*M_PI,0.);
 
     if (NewPF.Translated(vectra).SquareDistance(PF) 
        < NewPF.SquareDistance(PF)) {
index 5bf0d35faffec71f85d4f03442881c2218c8cbb0..832a9df01aaf558246262aa29d2768c5ef6cf71d 100755 (executable)
@@ -263,7 +263,7 @@ Standard_Boolean Draft_Modification::InternalAdd(const TopoDS_Face& F,
            }
          }
        }
-       NewS = new Geom_RectangularTrimmedSurface(NewS,0.,2.*PI,vmin,vmax);
+       NewS = new Geom_RectangularTrimmedSurface(NewS,0.,2.*M_PI,vmin,vmax);
       }
     }
   }
@@ -513,7 +513,7 @@ Standard_Boolean Draft_Modification::Propagate ()
            vmin = vmin - deltav;
            vmax = vmax + deltav;
            NewS = 
-             new Geom_RectangularTrimmedSurface(NewS,0.,2.*PI,vmin,vmax);
+             new Geom_RectangularTrimmedSurface(NewS,0.,2.*M_PI,vmin,vmax);
          }
        }
        
@@ -779,7 +779,7 @@ void Draft_Modification::Perform ()
          vmin = -300;
        }
 
-       NewS = new Geom_RectangularTrimmedSurface(NewS,0.,1.9*PI,vmin,vmax);
+       NewS = new Geom_RectangularTrimmedSurface(NewS,0.,1.9*M_PI,vmin,vmax);
        Finf.ChangeGeometry() = NewS;
       }
       itf.Next();
@@ -1096,14 +1096,14 @@ void Draft_Modification::Perform ()
                        GeomAPI_ProjectPointOnSurf projector( Pnt, S1, Precision::Confusion() );
                        Standard_Real U, V;
                        projector.LowerDistanceParameters( U, V );
-                       if (Abs(U) <= Precision::Confusion() || Abs(U-2.*PI) <= Precision::Confusion())
+                       if (Abs(U) <= Precision::Confusion() || Abs(U-2.*M_PI) <= Precision::Confusion())
                          Candidates.Append( aCurve );
                        else
                          {
                            Pnt = aCurve->Value( aCurve->LastParameter() );
                            projector.Init( Pnt, S1, Precision::Confusion() );
                            projector.LowerDistanceParameters( U, V );
-                           if (Abs(U) <= Precision::Confusion() || Abs(U-2.*PI) <= Precision::Confusion())
+                           if (Abs(U) <= Precision::Confusion() || Abs(U-2.*M_PI) <= Precision::Confusion())
                              {
                                aCurve->Reverse();
                                Candidates.Append( aCurve );
@@ -1943,13 +1943,13 @@ static Standard_Real Parameter(const Handle(Geom_Curve)& C,
   }
   else if (ctyp == STANDARD_TYPE(Geom_Circle)) {
     param = ElCLib::Parameter(Handle(Geom_Circle)::DownCast(cbase)->Circ(),P);
-    if (Abs(2.*PI-param) <=Epsilon(2.*PI)) {
+    if (Abs(2.*M_PI-param) <=Epsilon(2.*M_PI)) {
       param = 0.;
     }
   }
   else if (ctyp == STANDARD_TYPE(Geom_Ellipse)) {
     param = ElCLib::Parameter(Handle(Geom_Ellipse)::DownCast(cbase)->Elips(),P);
-    if (Abs(2.*PI-param) <=Epsilon(2.*PI)) {
+    if (Abs(2.*M_PI-param) <=Epsilon(2.*M_PI)) {
       param = 0.;
     }
   }
@@ -2164,8 +2164,8 @@ static Standard_Boolean FindRotation(const gp_Pln& Pl,
          theta = -theta0 -phi;
        }
        //  modified by NIZHNY-EAP Tue Nov 16 15:51:38 1999 ___BEGIN___
-       while (Abs(theta)>PI) {
-         theta = theta + PI*(theta<0 ? 1 : -1);
+       while (Abs(theta)>M_PI) {
+         theta = theta + M_PI*(theta<0 ? 1 : -1);
        }
        //  modified by NIZHNY-EAP Tue Nov 16 15:53:32 1999 ___END___
        Axe = li.Position();
index e37c9449c0aadf43af6c3876bf7e4f198f082ba1..a1cc1bd1a1689060aa04787e49dbfbbbf8f76de0 100755 (executable)
@@ -89,7 +89,7 @@ void Draw_Display::DrawMarker (const gp_Pnt2d& pt,
 //    gp_Circ2d C;
     C.SetRadius(ISize);
     C.SetLocation(pt);
-    Draw(C, 0, 2*PI, Standard_False);
+    Draw(C, 0, 2*M_PI, Standard_False);
     break;
 #ifndef DEB
   default:
@@ -144,7 +144,7 @@ void Draw_Display::DrawMarker (const gp_Pnt2d& pt,
     // if the circus is too small, a "plus" is drawn to mark the point 
     Standard_Boolean b = (R * Zoom()) > 2;
     if(b)
-      Draw(C, 0, 2*PI);
+      Draw(C, 0, 2*M_PI);
     else
       DrawMarker(pt, Draw_Plus);
   }
@@ -164,7 +164,7 @@ void Draw_Display::Draw(const gp_Circ& C, const Standard_Real A1,const Standard_
                        const Standard_Boolean ModifyWithZoom)
 {
   Standard_Real A2 = A3;
-  while (A2 < A1) A2 += 2*PI;
+  while (A2 < A1) A2 += 2*M_PI;
   
   Standard_Real angle = DEFLECTION / (C.Radius() * Zoom());
   Standard_Integer n = (Standard_Integer )( (A2 - A1) / angle);
@@ -213,7 +213,7 @@ void Draw_Display::Draw(const gp_Circ2d& C, const Standard_Real A1, const Standa
                        const Standard_Boolean ModifyWithZoom)
 {
   Standard_Real A2 = A3;
-  while (A2 < A1) A2 += 2*PI;
+  while (A2 < A1) A2 += 2*M_PI;
   
   Standard_Real angle = DEFLECTION / (C.Radius() * Zoom());
   Standard_Integer n = (Standard_Integer )( (A2 - A1) / angle);
index d2dbae2c93400547d940d0110d87164b3ad0274b..f82782afdb3edabee3610d608f630896655f47d5 100755 (executable)
@@ -33,7 +33,7 @@ extern Standard_Boolean Draw_Batch;
 extern Standard_Boolean Draw_BlackBackGround;
 
 
-#define DEFROTATE (5 * PI/ 180.)
+#define DEFROTATE (5 * M_PI/ 180.)
 #define DEFMAGNIFY 1.1
 #define DEFPANNING 0.1
 #define DEFFOCAL 1.1
index 7d5343c3aaca3dd6a3c991922f73c8582e3022bf..f2def5a0a74cdfe40edda138c5ffda3ac507acda 100755 (executable)
@@ -1193,7 +1193,7 @@ void  Draw::VariableCommands(Draw_Interpretor& theCommands)
   theAxes2d->Protected(Standard_True);
 
   n = "pi";
-  Draw::Set(n,PI);
+  Draw::Set(n,M_PI);
   Draw::Get(n)->Protected(Standard_True);
 
   n = "pinf";
index b165bd95a592673f032523e7ca99b9ff564c8321..d27270514e63fcca403b20400ad2ee39dc282fc8 100755 (executable)
@@ -180,135 +180,135 @@ Standard_Boolean Draw_View::Init (const char* typ)
     }
   else if (!strcmp("-Y+X",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),M_PI/2);
     }
   else if (!strcmp("-X-Y",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),PI);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),M_PI);
     }
   else if (!strcmp("+Y-X",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/2);
     }
   else if (!strcmp("+Y+X",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI);
       Matrix.Multiply(T);
     }
   else if (!strcmp("-X+Y",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI);
     }
   else if (!strcmp("-Y-X",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI);
       Matrix.Multiply(T);
     }
   else if (!strcmp("+X-Y",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI);
     }
   else if (!strcmp("+X+Z",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
     }
   else if (!strcmp("-Z+X",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
       Matrix.Multiply(T);
     }
   else if (!strcmp("-X-Z",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI);
       Matrix.Multiply(T);
     }
   else if (!strcmp("+Z-X",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
       Matrix.Multiply(T);
     }
   else if (!strcmp("+Z+X",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
       Matrix.Multiply(T);
     }
   else if (!strcmp("-X+Z",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI);
       Matrix.Multiply(T);
     }
   else if (!strcmp("-Z-X",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
       Matrix.Multiply(T);
     }
   else if (!strcmp("+X-Z",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
     }
   else if (!strcmp("+Y+Z",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
       Matrix.Multiply(T);
     }
   else if (!strcmp("-Z+Y",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
     }
   else if (!strcmp("-Y-Z",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
       Matrix.Multiply(T);
     }
   else if (!strcmp("+Z-Y",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI);
       Matrix.Multiply(T);
     }
   else if (!strcmp("+Z+Y",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
     }
   else if (!strcmp("-Y+Z",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
       Matrix.Multiply(T);
     }
   else if (!strcmp("-Z-Y",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI);
       Matrix.Multiply(T);
     }
   else if (!strcmp("+Y-Z",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
       Matrix.Multiply(T);
     }
   else if (!strcmp("AXON",typ))
     {
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/4);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/4);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/4);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/4);
       Matrix.Multiply(T);
     }
   else if (!strcmp("PERS",typ))
     {
       FlagPers =1;
-      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/4);
-      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/4);
+      Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/4);
+      T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/4);
       Matrix.Multiply(T);
     }
   else {
index b064bdaa17fa1b5eaba96281ef4b5b707ef4626b..2bec010f4e95db4cf93e7e8e59e2b1ecfce09113 100755 (executable)
@@ -59,7 +59,7 @@ void DrawDim::DrawShapeName (const TopoDS_Shape& ashape,
       }
       else if (curve->IsKind(STANDARD_TYPE(Geom_Circle))) {
        parameter  = (f+l)/2.;
-       if (f > l) parameter = parameter + PI;  
+       if (f > l) parameter = parameter + M_PI;  
        position = ElCLib::Value(parameter,Handle(Geom_Circle)::DownCast(curve)->Circ());
       }
     }
index e033d026b3b5cc85389691e21b45200dcc590a93..c1f24e92e97ade131893e15c9c3f098615590983 100755 (executable)
@@ -148,15 +148,15 @@ void DrawDim_PlanarAngle::DrawOn(Draw_Display& dis) const
   }
   if (!parallel && !clockwise) {
     p1 = angle;
-    p2 = PI;
+    p2 = M_PI;
   }
   if (parallel && clockwise) {
-    p1 = PI;
-    p2 = PI+angle;
+    p1 = M_PI;
+    p2 = M_PI+angle;
   }
   if (!parallel && clockwise) {
-    p1 = PI+angle;
-    p2 = 2*PI;
+    p1 = M_PI+angle;
+    p2 = 2*M_PI;
   }
   // affichage
   dis.Draw(circle,p1,p2);
index c6d3b9cfd7e038f076238c500e0ce4b77e9860e3..a022074a6bdf2fa672532c99d22f34b02e71acd7 100755 (executable)
@@ -57,7 +57,7 @@ void DrawDim_PlanarDiameter::DrawOn(Draw_Display& dis) const
       TopExp::Vertices(TopoDS::Edge(myCircle),vf,vl);
       const gp_Pnt first = BRep_Tool::Pnt(vf);
       Standard_Real parfirst = ElCLib::Parameter(circle,first);
-      Standard_Real parlast = (parfirst + PI);
+      Standard_Real parlast = (parfirst + M_PI);
       gp_Pnt last = ElCLib::Value(parlast,circle);
       //
       dis.Draw (first,last);
index cf23436d5b6e8effbbbc7b4a69280066858fea49..58a310eccd159db8d7f643065d47eca1ef1d4377 100755 (executable)
@@ -42,14 +42,14 @@ void DrawFairCurve_Batten::SetPoint(const Standard_Integer Side, const gp_Pnt2d&
 void DrawFairCurve_Batten::SetAngle(const Standard_Integer Side, const Standard_Real Angle)
 {
   if (Side == 1) {
-     ((FairCurve_Batten*)MyBatten)->SetAngle1(Angle*PI/180);
+     ((FairCurve_Batten*)MyBatten)->SetAngle1(Angle*M_PI/180);
      if ( ((FairCurve_Batten*)MyBatten)->GetConstraintOrder1() == 0 ) 
      {
        ((FairCurve_Batten*)MyBatten)->SetConstraintOrder1(1);
      }
    }
   else {
-     ((FairCurve_Batten*)MyBatten)->SetAngle2(Angle*PI/180);
+     ((FairCurve_Batten*)MyBatten)->SetAngle2(Angle*M_PI/180);
      if ( ((FairCurve_Batten*)MyBatten)->GetConstraintOrder2() == 0 ) 
      {
      ((FairCurve_Batten*)MyBatten)->SetConstraintOrder2(1);
index ec7a5aa322c677f5fe5fc3d9c145ec86eedfc94f..e4d9d3011cac743614a4bc767ecba08ee5d71568 100755 (executable)
@@ -445,7 +445,7 @@ static Standard_Integer transform (Draw_Interpretor& di, Standard_Integer n, con
 
   else if (!strcmp(a[0],"rotate")) {
     if (last < 8) return 1;
-    Standard_Real ang = atof(a[last]) * PI180;
+    Standard_Real ang = atof(a[last]) * (M_PI / 180.0);
     last --;
     gp_Dir D(atof(a[last-2]),atof(a[last-1]),atof(a[last]));
     last -= 3;
@@ -515,7 +515,7 @@ static Standard_Integer d2transform (Draw_Interpretor& di, Standard_Integer n, c
 
   else if (!strcmp(a[0],"2drotate")) {
     if (last < 4) return 1;
-    Standard_Real ang = atof(a[last]) * PI180;
+    Standard_Real ang = atof(a[last]) * (M_PI / 180.0);
     last --;
     gp_Pnt2d P(atof(a[last-1]),atof(a[last]));
     last -= 2;
index 6778b3c17fe22d430ba8594eb1ce414db6f1b870..50d5d9a7601e0cba4b2ea841015a9807f8a41535 100755 (executable)
@@ -439,7 +439,7 @@ void DsgPrs::ComputeFacesAnglePresentation( const Standard_Real ArrowLength,
                                            Standard_Real & FirstParAttachCirc,
                                            Standard_Real & LastParAttachCirc )
 {
-  if (Value > Precision::Angular() && Abs( PI-Value ) > Precision::Angular())
+  if (Value > Precision::Angular() && Abs( M_PI-Value ) > Precision::Angular())
     {
       // Computing presentation of angle's arc
       gp_Ax2 ax( CenterPoint, axisdir, dir1 );
@@ -475,8 +475,8 @@ void DsgPrs::ComputeFacesAnglePresentation( const Standard_Real ArrowLength,
        }
       else if (Sign1 == -1 && Sign2 == 1)
        {
-         Par1 += PI;
-         Par2 += PI;
+         Par1 += M_PI;
+         Par2 += M_PI;
          FirstParAngleCirc = Par1;
          LastParAngleCirc  = Par2;
        }
@@ -541,7 +541,7 @@ void DsgPrs::ComputeFacesAnglePresentation( const Standard_Real ArrowLength,
          Intersection.NearestPoints( ProjAttachPoint2, ProjAttachPoint2 );
          
          Standard_Real U2 = ElCLib::Parameter( AttachCirc, ProjAttachPoint2 );
-         if (U2 <= PI)
+         if (U2 <= M_PI)
            {
              FirstParAttachCirc = 0;
              LastParAttachCirc  = U2;
@@ -549,7 +549,7 @@ void DsgPrs::ComputeFacesAnglePresentation( const Standard_Real ArrowLength,
          else
            {
              FirstParAttachCirc = U2;
-             LastParAttachCirc  = 2*PI;
+             LastParAttachCirc  = 2*M_PI;
            }
        }
     }
@@ -577,7 +577,7 @@ void DsgPrs::ComputeFilletRadiusPresentation( const Standard_Real ArrowLength,
   gp_Dir dir1(gp_Vec(Center, FirstPoint));
   gp_Dir dir2(gp_Vec(Center, SecondPoint));
   Standard_Real Angle = dir1.Angle(dir2);
-  if(Angle <= Precision::Angular() || ( PI - Angle ) <= Precision::Angular() ||
+  if(Angle <= Precision::Angular() || ( M_PI - Angle ) <= Precision::Angular() ||
      Value <= Precision::Confusion()) SpecCase = Standard_True;
   else SpecCase = Standard_False;
   if ( !SpecCase )
@@ -616,7 +616,7 @@ void DsgPrs::ComputeFilletRadiusPresentation( const Standard_Real ArrowLength,
          gp_Dir direction(PosVec) ;
          Standard_Real angle = dir1.Angle(direction) ;
           if (( dir1 ^ direction) * NormalDir < 0.0e0)   angle = -angle ;
-         if(Sign1 == -1) angle += PI;
+         if(Sign1 == -1) angle += M_PI;
          EndOfArrow = ElCLib::Value(angle, FilletCirc); //***
                   
        }
@@ -712,37 +712,37 @@ Standard_Real DsgPrs::DistanceFromApex(const gp_Elips & elips,
 {
   Standard_Real dist;
   Standard_Real parApex = ElCLib::Parameter ( elips, Apex );
-  if(parApex == 0.0 || parApex == PI) 
+  if(parApex == 0.0 || parApex == M_PI) 
     {//Major case
       if(parApex == 0.0) //pos Apex
-       dist = (par < PI) ? par : (2*PI - par);
+       dist = (par < M_PI) ? par : (2*M_PI - par);
       else //neg Apex
-       dist = (par < PI) ? ( PI - par) : ( par - PI );
+       dist = (par < M_PI) ? ( M_PI - par) : ( par - M_PI );
     }
   else 
     {// Minor case
-      if(parApex == PI / 2) //pos Apex
+      if(parApex == M_PI / 2) //pos Apex
        {
-         if(par <= parApex + PI && par > parApex )
+         if(par <= parApex + M_PI && par > parApex )
            dist = par - parApex;
          else 
            { 
-             if(par >  parApex + PI)
-               dist = 2*PI - par + parApex;
+             if(par >  parApex + M_PI)
+               dist = 2*M_PI - par + parApex;
              else
-               dist = parApex - par; // 0 < par < PI/2
+               dist = parApex - par; // 0 < par < M_PI/2
            }
        }
       else //neg Apex == 3/2 PI
        {
-         if(par <= parApex && par >= PI/2) 
+         if(par <= parApex && par >= M_PI/2) 
            dist = parApex - par;
          else
            {
              if(par >  parApex) 
                dist = par - parApex;
              else
-               dist = par + PI/2; // 0 < par < PI/2
+               dist = par + M_PI/2; // 0 < par < PI/2
            }
        }
     }
index 63c9864b13c1a7a6972344c13ffb8d0ee8d8d974..20ade242160062a70255b286409b23ddda072462 100755 (executable)
@@ -96,7 +96,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
  
   aPnt = Apex;
   gp_Pnt P1 = ElCLib::Value(0., myCircle);
-  gp_Pnt P2 = ElCLib::Value(Standard_PI, myCircle);
+  gp_Pnt P2 = ElCLib::Value(M_PI, myCircle);
 
   gce_MakePln mkPln(P1, P2,  aPnt);   // create a plane whitch defines plane for projection aPosition on it
 
@@ -130,8 +130,8 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Standard_Real OppParam = ElCLib::Parameter(aCircle2, OppositePnt);    
   gp_Dir aDir, aDir2;
   
-  while ( AttParam >= 2*Standard_PI ) AttParam -= 2*Standard_PI;
-  while ( OppParam >= 2*Standard_PI ) OppParam -= 2*Standard_PI;
+  while ( AttParam >= 2 * M_PI ) AttParam -= 2 * M_PI;
+  while ( OppParam >= 2 * M_PI ) OppParam -= 2 * M_PI;
 
   //-------------------------- Compute angle ------------------------
    if( txt.Length() == 0 ) {
@@ -157,15 +157,15 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   param = AttParam;
 
   if(IsArrowOut) {
-    aDir = gp_Dir( ( gp_Vec( ElCLib::Value( AttParam - Standard_PI/12, aCircle2 ), AttachmentPnt) ) );
-    aDir2 = gp_Dir( ( gp_Vec( ElCLib::Value( OppParam + Standard_PI/12, aCircle2 ), OppositePnt) ) );
+    aDir = gp_Dir( ( gp_Vec( ElCLib::Value( AttParam - M_PI / 12, aCircle2 ), AttachmentPnt) ) );
+    aDir2 = gp_Dir( ( gp_Vec( ElCLib::Value( OppParam + M_PI / 12, aCircle2 ), OppositePnt) ) );
   }
   else {
-    aDir = gp_Dir( ( gp_Vec( ElCLib::Value( AttParam + Standard_PI/12, aCircle2 ), AttachmentPnt ) ) );
-    aDir2 = gp_Dir( ( gp_Vec( ElCLib::Value( OppParam - Standard_PI/12, aCircle2 ),  OppositePnt ) ) );
+    aDir = gp_Dir( ( gp_Vec( ElCLib::Value( AttParam + M_PI / 12, aCircle2 ), AttachmentPnt ) ) );
+    aDir2 = gp_Dir( ( gp_Vec( ElCLib::Value( OppParam - M_PI / 12, aCircle2 ),  OppositePnt ) ) );
   }
   
-  while ( angle > 2*Standard_PI ) angle -= 2*Standard_PI;
+  while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
   for( i = 0; i <= 11; i++ ) {                                            //calculating of arc             
     ( ElCLib::Value(param + angle/11 * i, aCircle2) ).Coord(X, Y, Z);
     V(i+1).SetCoord(X, Y, Z);
@@ -183,9 +183,9 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   tmpPnt =  tmpPnt.Translated(gp_Vec(0, 0, -1)*2);
   Prs3d_Text::Draw(aPresentation,aLengthAspect->TextAspect(), txt, tmpPnt);   //add the TCollection_ExtendedString
 
-  angle = 2*Standard_PI - param ; 
+  angle = 2 * M_PI - param ; 
   if( param > OppParam ) {
-    while ( angle > 2*Standard_PI ) angle -= 2*Standard_PI;
+    while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
     for( i = 11; i >= 0; i-- ) {       //calculating of arc             
       ( ElCLib::Value(-angle/11 * i, aCircle2) ).Coord(X, Y, Z);
       V(i+1).SetCoord(X, Y, Z);
@@ -210,7 +210,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
     if ( AboveInBelowCone( VmaxCircle, VminCircle, myCircle ) == 0 ) return;
     Graphic3d_Array1OfVertex V3(1,2);
     gp_Pnt P11 = ElCLib::Value( 0., VmaxCircle );
-    gp_Pnt P12 = ElCLib::Value( Standard_PI, VmaxCircle );
+    gp_Pnt P12 = ElCLib::Value( M_PI, VmaxCircle );
   
     AttachmentPnt.Coord(X, Y, Z);
     V3(1).SetCoord(X, Y, Z);
@@ -293,11 +293,11 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Standard_Real ufin = uc2;
 
   if (uco > ufin) {
-    if (Abs(theval)<PI) {
+    if (Abs(theval)<M_PI) {
       // test if uco is in the opposite sector 
-      if (uco > udeb+PI && uco < ufin+PI){
-       udeb = udeb + PI;
-       ufin = ufin + PI;
+      if (uco > udeb+M_PI && uco < ufin+M_PI){
+       udeb = udeb + M_PI;
+       ufin = ufin + M_PI;
        uc1  = udeb;
        uc2  = ufin;
       }
@@ -305,16 +305,16 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   }
 
   if (uco > ufin) {
-    if ((uco-uc2) < (uc1-uco+(2*PI))) {
+    if ((uco-uc2) < (uc1-uco+(2*M_PI))) {
       ufin = uco;
     }
     else {
-      udeb = uco - 2*PI;
+      udeb = uco - 2*M_PI;
     }
   }
 
   Standard_Real alpha = Abs(ufin-udeb);
-  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / PI));
+  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / M_PI));
   Graphic3d_Array1OfVertex V(1,nbp);
   Standard_Real dteta = alpha/(nbp-1);
   gp_Pnt ptcur;
@@ -429,10 +429,10 @@ void DsgPrs_AnglePresentation::Add( const Handle(Prs3d_Presentation)& aPresentat
   Graphic3d_Array1OfVertex Vrap(1,2);
 
   // Creating the angle's arc or line if null angle
-  if (theval > Precision::Angular() && Abs( PI-theval ) > Precision::Angular())
+  if (theval > Precision::Angular() && Abs( M_PI-theval ) > Precision::Angular())
     {
       Standard_Real Alpha  = Abs( LastParAngleCirc - FirstParAngleCirc );
-      Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / PI));
+      Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / M_PI));
       Graphic3d_Array1OfVertex ApproxArc( 0, NodeNumber-1 );
       Standard_Real delta = Alpha / (Standard_Real)( NodeNumber - 1 );
       gp_Pnt CurPnt;
@@ -484,7 +484,7 @@ void DsgPrs_AnglePresentation::Add( const Handle(Prs3d_Presentation)& aPresentat
        {
          // Creating the arc from AttachmentPoint2 to its projection
          Standard_Real Alpha  = Abs( LastParAttachCirc - FirstParAttachCirc );
-         Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / PI));
+         Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / M_PI));
          Graphic3d_Array1OfVertex ApproxArc( 0, NodeNumber-1 );
          Standard_Real delta = Alpha / (Standard_Real)( NodeNumber - 1 );
          gp_Pnt CurPnt;
@@ -536,7 +536,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
     Norm = dir1.Crossed(dir2B);
   }
 
-  if (Abs(theval) > PI) Norm.Reverse();
+  if (Abs(theval) > M_PI) Norm.Reverse();
 
   gp_Ax2 ax(CenterPoint,Norm,dir1);
   gp_Circ cer(ax,CenterPoint.Distance(OffsetPoint));
@@ -558,11 +558,11 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Standard_Real ufin = uc2;
 
   if (uco > ufin) {
-    if (Abs(theval)<PI) {
+    if (Abs(theval)<M_PI) {
       // test if uco is in the opposite sector 
-      if (uco > udeb+PI && uco < ufin+PI){
-       udeb = udeb + PI;
-       ufin = ufin + PI;
+      if (uco > udeb+M_PI && uco < ufin+M_PI){
+       udeb = udeb + M_PI;
+       ufin = ufin + M_PI;
        uc1  = udeb;
        uc2  = ufin;
       }
@@ -570,16 +570,16 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   }
 
   if (uco > ufin) {
-    if ((uco-uc2) < (uc1-uco+(2*PI))) {
+    if ((uco-uc2) < (uc1-uco+(2*M_PI))) {
       ufin = uco;
     }
     else {
-      udeb = uco - 2*PI;
+      udeb = uco - 2*M_PI;
     }
   }
 
   Standard_Real alpha = Abs(ufin-udeb);
-  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / PI));
+  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / M_PI));
   Graphic3d_Array1OfVertex V(1,nbp);
   Standard_Real dteta = alpha/(nbp-1);
   gp_Pnt ptcur;
@@ -660,7 +660,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   gp_Dir Norm = dir1.Crossed(dir2);
 
-  if (Abs(theval) > PI) Norm.Reverse();
+  if (Abs(theval) > M_PI) Norm.Reverse();
 
   gp_Ax2 ax(CenterPoint,Norm,dir1);
   gp_Circ cer(ax,CenterPoint.Distance(OffsetPoint));
@@ -682,11 +682,11 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Standard_Real ufin = uc2;
 
   if (uco > ufin) {
-    if (Abs(theval)<PI) {
+    if (Abs(theval)<M_PI) {
       // test if uco is in the opposite sector 
-      if (uco > udeb+PI && uco < ufin+PI){
-       udeb = udeb + PI;
-       ufin = ufin + PI;
+      if (uco > udeb+M_PI && uco < ufin+M_PI){
+       udeb = udeb + M_PI;
+       ufin = ufin + M_PI;
        uc1  = udeb;
        uc2  = ufin;
       }
@@ -694,16 +694,16 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   }
 
   if (uco > ufin) {
-    if ((uco-uc2) < (uc1-uco+(2*PI))) {
+    if ((uco-uc2) < (uc1-uco+(2*M_PI))) {
       ufin = uco;
     }
     else {
-      udeb = uco - 2*PI;
+      udeb = uco - 2*M_PI;
     }
   }
 
   Standard_Real alpha = Abs(ufin-udeb);
-  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / PI));
+  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / M_PI));
   Graphic3d_Array1OfVertex V(1,nbp);
   Standard_Real dteta = alpha/(nbp-1);
   gp_Pnt ptcur;
@@ -788,7 +788,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   gp_Dir Norm = dir1.Crossed(dir2);
 
-  if (Abs(theval) > PI) Norm.Reverse();
+  if (Abs(theval) > M_PI) Norm.Reverse();
 
   gp_Ax2 ax(CenterPoint,Norm,dir1);
   gp_Circ cer(ax,CenterPoint.Distance(OffsetPoint));
@@ -810,11 +810,11 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Standard_Real ufin = uc2;
 
   if (uco > ufin) {
-    if (Abs(theval)<PI) {
+    if (Abs(theval)<M_PI) {
       // test if uco is in the opposite sector 
-      if (uco > udeb+PI && uco < ufin+PI){
-       udeb = udeb + PI;
-       ufin = ufin + PI;
+      if (uco > udeb+M_PI && uco < ufin+M_PI){
+       udeb = udeb + M_PI;
+       ufin = ufin + M_PI;
        uc1  = udeb;
        uc2  = ufin;
       }
@@ -822,16 +822,16 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   }
 
   if (uco > ufin) {
-    if ((uco-uc2) < (uc1-uco+(2*PI))) {
+    if ((uco-uc2) < (uc1-uco+(2*M_PI))) {
       ufin = uco;
     }
     else {
-      udeb = uco - 2*PI;
+      udeb = uco - 2*M_PI;
     }
   }
 
   Standard_Real alpha = Abs(ufin-udeb);
-  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / PI));
+  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / M_PI));
   Graphic3d_Array1OfVertex V(1,nbp);
   Standard_Real dteta = alpha/(nbp-1);
   gp_Pnt ptcur;
@@ -904,7 +904,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   gp_Ax2 ax(CenterPoint,theAxe.Direction(),dir1);
   gp_Circ cer(ax,CenterPoint.Distance(AttachmentPoint1));
 
-  Standard_Integer nbp = Max (4 , Standard_Integer (50. * theval / PI));
+  Standard_Integer nbp = Max (4 , Standard_Integer (50. * theval / M_PI));
   Graphic3d_Array1OfVertex V(1,nbp);
   Standard_Real dteta = theval/(nbp-1);
   gp_Pnt ptcur;
index 3683698a31a6c576aeab02ed0f9c328701825ab4..f051b026251b5c69b12296c7460bd31030e46532 100755 (executable)
@@ -32,7 +32,7 @@ void DsgPrs_ConcentricPresentation::Add(
   //Creation et discretisation du plus gros cercle
   gp_Circ Circ(gp_Ax2(aCenter,aNorm), aRadius);
   Standard_Integer nbp = 50;
-  Standard_Real dteta = (2 * PI)/nbp;
+  Standard_Real dteta = (2 * M_PI)/nbp;
   Graphic3d_Array1OfVertex V(1,nbp+1);
   gp_Pnt ptcur;
   Standard_Real ucur = 0;
index 68f42bdda6a1dce90f4d64acc43e3af885287460..e0e99bc5d6894410a3d69019fc408ec8912e8de2 100755 (executable)
@@ -114,18 +114,18 @@ static Standard_Boolean DsgPrs_InDomain(const Standard_Real fpar,
     if(lpar > fpar)
       return ((para >= fpar) && (para <= lpar));
     else { // fpar > lpar
-      Standard_Real delta = 2*PI-fpar;
+      Standard_Real delta = 2*M_PI-fpar;
       Standard_Real lp, par, fp;
       lp = lpar + delta;
       par = para + delta;
-      while(lp > 2*PI) lp-=2*PI;
-      while(par > 2*PI) par-=2*PI;
+      while(lp > 2*M_PI) lp-=2*M_PI;
+      while(par > 2*M_PI) par-=2*M_PI;
       fp = 0.;
       return ((par >= fp) && (par <= lp));
     }
       
   }
-  if (para >= (fpar+2*PI)) return Standard_True;
+  if (para >= (fpar+2*M_PI)) return Standard_True;
   if (para <= lpar) return Standard_True;
   return Standard_False;
 }
@@ -148,9 +148,9 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
 {
   Standard_Real fpara = uFirst;
   Standard_Real lpara = uLast;
-  while (lpara > 2*PI) {
-    fpara -= 2*PI;
-    lpara -= 2*PI;
+  while (lpara > 2*M_PI) {
+    fpara -= 2*M_PI;
+    lpara -= 2*M_PI;
   }
 
   Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
@@ -167,8 +167,8 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   gp_Pnt SecondPoint = ElCLib::Value(uLast, aCircle);
 
   if ( !DsgPrs_InDomain(fpara,lpara,parEndOfArrow)) {
-    Standard_Real otherpar = parEndOfArrow + PI;// not in domain
-    if (otherpar > 2*PI) otherpar -= 2*PI;
+    Standard_Real otherpar = parEndOfArrow + M_PI;// not in domain
+    if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
     if (DsgPrs_InDomain(fpara,lpara,otherpar)) {
       parEndOfArrow = otherpar; // parameter on circle
       EndOfArrow = ElCLib::Value(parEndOfArrow, aCircle);
index db67478fba41490b2189f61b6aede80088fad1be..a8663e187e731794864ece51846d9bae508deb24 100755 (executable)
@@ -122,7 +122,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
        parFirst = uLast;
       else
        parFirst = uFirst;
-      Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / PI));
+      Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / M_PI));
       Graphic3d_Array1OfVertex ApproxArc( 0, NodeNumber-1 );
       Standard_Real delta = Alpha / ( NodeNumber - 1 );
       gp_Pnt CurPnt;
@@ -181,7 +181,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
        parFirst = uLast;
       else
        parFirst = uFirst;
-      Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / PI));
+      Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / M_PI));
       Graphic3d_Array1OfVertex ApproxArc( 0, NodeNumber-1 );
       Standard_Real delta = Alpha / ( NodeNumber - 1 );
       gp_Pnt CurPnt;
index 1070a6e8d76b91015c916d8ed374f250304d56a7..10596b99c90c2dbb5fde4c4a5d644c35c956ca51 100755 (executable)
@@ -190,16 +190,16 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
     aPar12 = ElCLib::Parameter(aCirc1, aPoint2);
   }
   else {
-    aPar11 = PI;
-    aPar12 = PI;
+    aPar11 = M_PI;
+    aPar12 = M_PI;
   }
   if (aCirc2.Radius() > Precision::Confusion()){
     aPar21 = ElCLib::Parameter(aCirc2, aPoint3 );
     aPar22 = ElCLib::Parameter(aCirc2, aPoint4);
   }
   else {
-    aPar21 = PI;
-    aPar22 = PI;
+    aPar21 = M_PI;
+    aPar22 = M_PI;
   }
 
   Graphic3d_Array1OfVertex V(1,2);
@@ -209,9 +209,9 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
 
   Standard_Integer aNodeNb; 
   Standard_Real aDelta, aCurPar;
-  if(aPar12 < aPar11 ) aPar12 +=2*PI;
+  if(aPar12 < aPar11 ) aPar12 +=2*M_PI;
   if (Abs(aPar12 - aPar11) > Precision::Confusion()) {
-    aNodeNb = Standard_Integer(Max(Abs(aPar12 - aPar11)*50./PI + 0.5, 4.));
+    aNodeNb = Standard_Integer(Max(Abs(aPar12 - aPar11)*50./M_PI + 0.5, 4.));
     Graphic3d_Array1OfVertex ApproxArc1( 1, aNodeNb+1);
     aDelta = (aPar12 - aPar11)/aNodeNb;
     aCurPar= aPar11;
@@ -224,9 +224,9 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
 
     Prs3d_Root::CurrentGroup( aPresentation )->Polyline( ApproxArc1 );
   }
-  if (aPar22 < aPar21) aPar22 += 2*PI;
+  if (aPar22 < aPar21) aPar22 += 2*M_PI;
   if ( Abs(aPar22 - aPar21) > Precision::Confusion()){
-    aNodeNb = Standard_Integer(Max(Abs(aPar22 - aPar21)*50./PI + 0.5, 4.));
+    aNodeNb = Standard_Integer(Max(Abs(aPar22 - aPar21)*50./M_PI + 0.5, 4.));
     Graphic3d_Array1OfVertex ApproxArc2( 1, aNodeNb+1);
     aDelta = (aPar22 - aPar21)/aNodeNb;
     aCurPar= aPar21;
index 9e001cbd731952257bee3ebf5c32c54206ad2af9..76618f6bb74793966f9617def3dfc68fbc019204 100755 (executable)
@@ -92,7 +92,7 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
   if( !SpecCase )
     {
       Standard_Real Alpha = Abs(LastParCirc - FirstParCirc);
-      Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / PI));
+      Standard_Integer NodeNumber = Max (4 , Standard_Integer (50. * Alpha / M_PI));
       Graphic3d_Array1OfVertex ApproxArc( 0, NodeNumber-1 );
       Standard_Real delta = Alpha / ( NodeNumber - 1 );
       gp_Pnt CurPnt;
index a15666f2421f8c39129651a80b7010178f10d53a..0982476e87d015218276cdd5d5be2d7f8cf2f3b1 100755 (executable)
@@ -62,7 +62,7 @@ void DsgPrs_FixPresentation::Add(
   dirac.Normalize();
   gp_Vec norac = dirac.Crossed(gp_Vec(aNormPln));
   gp_Ax1 ax(aPntEnd, aNormPln);
-  norac.Rotate(ax, PI/8);
+  norac.Rotate(ax, M_PI/8);
                                   // vecteur normal au seg. de raccord
   norac*=(symbsize/2);
   gp_Pnt P1 = aPntEnd.Translated(norac);
index 22f34758c7e1627b67c30cb48f58f5699311ff86..7026ff14678f6f396570757e8c6e2a55b82e64dd 100755 (executable)
@@ -118,8 +118,8 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   Standard_Real pFAttach =  ElCLib::Parameter(CC, aFAttach);
   Standard_Real pSAttach =  ElCLib::Parameter(CC, aSAttach);
   Standard_Real alpha = pSAttach - pFAttach;
-  if ( alpha < 0 ) alpha += 2*Standard_PI;
-  Standard_Integer nb = (Standard_Integer )( 50. * alpha / PI);
+  if ( alpha < 0 ) alpha += 2 * M_PI;
+  Standard_Integer nb = (Standard_Integer )( 50. * alpha / M_PI);
   Standard_Integer nbp = Max (4 , nb);
   Graphic3d_Array1OfVertex V(1,nbp);
   Standard_Real dteta = alpha/(nbp-1);
@@ -170,8 +170,8 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   Standard_Real pFAttach =  ElCLib::Parameter(CC, aFAttach);
   Standard_Real pSAttach =  ElCLib::Parameter(CC, aSAttach);
   Standard_Real alpha = pSAttach - pFAttach;
-  if ( alpha < 0 ) alpha += 2*Standard_PI;
-  Standard_Integer nb = (Standard_Integer )( 50. * alpha / PI);
+  if ( alpha < 0 ) alpha += 2 * M_PI;
+  Standard_Integer nb = (Standard_Integer )( 50. * alpha / M_PI);
   Standard_Integer nbp = Max (4 , nb);
   Graphic3d_Array1OfVertex V(1,nbp);
   Standard_Real dteta = alpha/(nbp-1);
@@ -217,8 +217,8 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   Standard_Real pFAttach =  ElCLib::Parameter(anEllipse, aFAttach);
   Standard_Real pSAttach =  ElCLib::Parameter(anEllipse, aSAttach);
   Standard_Real alpha = pSAttach - pFAttach;
-  if ( alpha < 0 ) alpha += 2*Standard_PI;
-  Standard_Integer nb = (Standard_Integer)(50.0*alpha/PI);
+  if ( alpha < 0 ) alpha += 2 * M_PI;
+  Standard_Integer nb = (Standard_Integer)(50.0*alpha/M_PI);
   Standard_Integer nbp = Max (4 , nb);
   Graphic3d_Array1OfVertex V(1,nbp);
   Standard_Real dteta = alpha/(nbp-1);
index f5f00e4df7dda091143bd186952a8dd56ffac0fa..58341cedb775d022e5177ca78e98e3842d455d0e 100755 (executable)
@@ -384,7 +384,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   Alpha  = Abs( deltaU );
   if (Alpha > Precision::Angular() && Alpha<Precision::Infinite())
     {
-      NodeNumber = Max( 4 , Standard_Integer (50. * Alpha / PI) );
+      NodeNumber = Max( 4 , Standard_Integer (50. * Alpha / M_PI) );
       Graphic3d_Array1OfVertex ApproxCurve( 1, NodeNumber );
       delta = deltaU / (Standard_Real)( NodeNumber - 1 );
       gp_Pnt CurPnt;
@@ -399,7 +399,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   Alpha  = Abs( deltaV );
   if (Alpha > Precision::Angular() && Alpha<Precision::Infinite())
     {
-      NodeNumber = Max( 4 , Standard_Integer (50. * Alpha / PI) );
+      NodeNumber = Max( 4 , Standard_Integer (50. * Alpha / M_PI) );
       Graphic3d_Array1OfVertex ApproxCurve( 1, NodeNumber );
       delta = deltaV / (Standard_Real)( NodeNumber - 1 );
       gp_Pnt CurPnt;
index 6472dd9063152bef5422ef1ce2aafde27baf420f..102ad837d3fc083523111c9abb4ff30e70043490 100755 (executable)
@@ -56,7 +56,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
       // center of the symmetry - circle around the MidPoint
       Prs3d_Root::NewGroup(aPresentation);
       Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
-      Standard_Real alpha = 2*Standard_PI;
+      Standard_Real alpha = 2 * M_PI;
       Standard_Integer nbp = 100;
       Graphic3d_Array1OfVertex VC(1,nbp);
       Standard_Real dteta = alpha/(nbp-1);
@@ -131,7 +131,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
       // center of the symmetry - circle around the MidPoint
       Prs3d_Root::NewGroup(aPresentation);
       Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
-      Standard_Real alpha = 2*Standard_PI;
+      Standard_Real alpha = 2 * M_PI;
       Standard_Integer nbp = 100;
       Graphic3d_Array1OfVertex VC(1,nbp);
       Standard_Real dteta = alpha/(nbp-1);
@@ -213,7 +213,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
       // center of the symmetry - circle around the MidPoint
       Prs3d_Root::NewGroup(aPresentation);
       Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
-      Standard_Real alpha = 2*Standard_PI;
+      Standard_Real alpha = 2 * M_PI;
       Standard_Integer nbp = 100;
       Graphic3d_Array1OfVertex VC(1,nbp);
       Standard_Real dteta = alpha/(nbp-1);
@@ -259,8 +259,8 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   Standard_Real pf = ElCLib::Parameter(aCircle,Point1);
   Standard_Real pl = ElCLib::Parameter(aCircle,Point2);
   Standard_Real alpha = pl - pf;
-  if ( alpha < 0 ) alpha += 2*Standard_PI;
-  Standard_Integer nb = (Standard_Integer)(50.0*alpha/PI);
+  if ( alpha < 0 ) alpha += 2 * M_PI;
+  Standard_Integer nb = (Standard_Integer)(50.0*alpha/M_PI);
   Standard_Integer nbp = Max(4,nb);
   Graphic3d_Array1OfVertex VC1(1,nbp);
   Standard_Real dteta = alpha/(nbp-1);
@@ -306,7 +306,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
       // center of the symmetry - circle around the MidPoint
       Prs3d_Root::NewGroup(aPresentation);
       Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
-      Standard_Real alpha = 2*Standard_PI;
+      Standard_Real alpha = 2 * M_PI;
       Standard_Integer nbp = 100;
       Graphic3d_Array1OfVertex VC(1,nbp);
       Standard_Real dteta = alpha/(nbp-1);
@@ -352,8 +352,8 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   Standard_Real pf = ElCLib::Parameter(aCircle,Point1);
   Standard_Real pl = ElCLib::Parameter(aCircle,Point2);
   Standard_Real alpha = pl - pf;
-  if ( alpha < 0 ) alpha += 2*Standard_PI;
-  Standard_Integer nb = (Standard_Integer)(50.0*alpha/PI);
+  if ( alpha < 0 ) alpha += 2 * M_PI;
+  Standard_Integer nb = (Standard_Integer)(50.0*alpha/M_PI);
   Standard_Integer nbp = Max(4,nb);
   Graphic3d_Array1OfVertex VC1(1,nbp);
   Standard_Real dteta = alpha/(nbp-1);
index 0206bfb598abc793584ca9a5cdb7851381a4b495..44d8be4de5061f4197399d0a60ed88478e27188d 100755 (executable)
@@ -38,7 +38,7 @@ static Standard_Boolean DsgPrs_InDomain(const Standard_Real fpar,
   if (fpar >= 0.) {
     return ((para >= fpar) && (para <= lpar));
   }
-  if (para >= (fpar+2*PI)) return Standard_True;
+  if (para >= (fpar+2*M_PI)) return Standard_True;
   if (para <= lpar) return Standard_True;
   return Standard_False;
 }
@@ -60,9 +60,9 @@ void DsgPrs_RadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
 {
   Standard_Real fpara = firstparam;
   Standard_Real lpara = lastparam;
-  while (lpara > 2*PI) {
-    fpara -= 2*PI;
-    lpara -= 2*PI;
+  while (lpara > 2*M_PI) {
+    fpara -= 2*M_PI;
+    lpara -= 2*M_PI;
   }
   Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
   Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
@@ -70,8 +70,8 @@ void DsgPrs_RadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   gp_Pnt attpoint = AttachmentPoint;
   Standard_Boolean otherside = Standard_False;
   if ( !DsgPrs_InDomain(fpara,lpara,parat)) {
-    Standard_Real otherpar = parat + PI;
-    if (otherpar > 2*PI) otherpar -= 2*PI;
+    Standard_Real otherpar = parat + M_PI;
+    if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
     if (DsgPrs_InDomain(fpara,lpara,otherpar)) {
       parat = otherpar;
       otherside = Standard_True;
index 18e374adf180207fbc126e46c51ed3baba34a760..dbce5f5e630b6dd7dba862d6dd98d21a7e0f2382 100755 (executable)
@@ -268,7 +268,7 @@ void DsgPrs_ShapeDirPresentation::Add(const Handle(Prs3d_Presentation)& prs,
   Prs3d_Root::CurrentGroup(prs)->SetPrimitivesAspect(drawer->LineAspect()->Aspect());
   Prs3d_Root::CurrentGroup(prs)->Polyline(line);
 
-  Prs3d_Arrow::Draw(prs, pt2, dir, PI/180.*10., leng*0.3);
+  Prs3d_Arrow::Draw(prs, pt2, dir, M_PI/180.*10., leng*0.3);
 }
 
 
index 99b8bcb975fb89d5bb3f71df0852a700878eeb87..7aa453ebea4488d146776958d15c94d665006bfb 100755 (executable)
@@ -577,8 +577,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
 
   alpha = fabs(ParamP1 - ParamPAttach1);
   if(ParamP1 < ParamPAttach1){
-    if(alpha > PI){
-      alpha  = (2*PI) - alpha;
+    if(alpha > M_PI){
+      alpha  = (2*M_PI) - alpha;
       nbp    = (Standard_Integer ) IntegerPart(alpha/(alpha*.02));
       Dalpha = alpha/(nbp - 1);
     }
@@ -588,8 +588,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     }
   }
   else{
-    if(alpha > PI){
-      alpha  = (2*PI) - alpha;
+    if(alpha > M_PI){
+      alpha  = (2*M_PI) - alpha;
       nbp    = (Standard_Integer ) IntegerPart(alpha/(alpha*.02));
       Dalpha = -alpha/(nbp - 1);
     }
@@ -630,8 +630,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   alpha = fabs(ParamP2 - ParamPAttach2);
   if (alpha <= Precision::Confusion()) alpha = 1.e-5;
   if(ParamP2 < ParamPAttach2){
-    if(alpha > PI){
-      alpha  = (2*PI) - alpha;
+    if(alpha > M_PI){
+      alpha  = (2*M_PI) - alpha;
       nbp    = (Standard_Integer ) IntegerPart(alpha/(alpha*.02));
       Dalpha = alpha/(nbp - 1);
     }
@@ -641,8 +641,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     }
   }
   else{
-    if(alpha > PI){
-      alpha  = (2*PI) - alpha;
+    if(alpha > M_PI){
+      alpha  = (2*M_PI) - alpha;
       nbp    = (Standard_Integer ) IntegerPart(alpha/(alpha*.02));
       Dalpha = -alpha/(nbp - 1);
     }
index d517e366134ae85fa0340750fec01101238190da..004c2276983ce14248cb144409fbde0c24f11e59 100755 (executable)
@@ -43,7 +43,7 @@ void DsgPrs_XYZAxisPresentation::Add(
  
  G->SetPrimitivesAspect(aLineAspect->Aspect());
  G->Polyline(A);
- Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),aDir,PI/180.*10.,aVal/10.);
+ Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),aDir,M_PI/180.*10.,aVal/10.);
  Prs3d_Root::CurrentGroup(aPresentation)->Text(aText,A(2),1./81.);
 
 }
@@ -79,7 +79,7 @@ void DsgPrs_XYZAxisPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   G->SetPrimitivesAspect(aLineAspect->Aspect());
   G->Polyline(A);
   G->SetPrimitivesAspect( anArrowAspect->Aspect() );
-  Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),aDir,PI/180.*10.,aVal/10.);
+  Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),aDir,M_PI/180.*10.,aVal/10.);
   G->SetPrimitivesAspect(aTextAspect->Aspect());
   Prs3d_Root::CurrentGroup(aPresentation)->Text(aText,A(2),1./81.);
 #endif
index e9d32f6d70ef53e79461b416d733eabf0786ef9a..ffb8106827aea14ac0903dfc99559e62962d3005 100755 (executable)
@@ -10,7 +10,7 @@
 #include <ElCLib.ixx>
 #include <gp.hxx>
 
-static Standard_Real PIPI = PI + PI;
+static Standard_Real PIPI = M_PI + M_PI;
 
 //=======================================================================
 //function : InPeriod
index 80bee3639e8490a77c9848a12281a201f1365894..c0d429056230379aa929b80deb9a1f5146d7a10a 100755 (executable)
@@ -14,7 +14,7 @@
 #include <gp_XYZ.hxx>
 #include <gp_Trsf.hxx>
 
-static Standard_Real PIPI = PI + PI;
+static Standard_Real PIPI = M_PI + M_PI;
 
 gp_Pnt ElSLib::PlaneValue (const Standard_Real U,
                           const Standard_Real V,
@@ -147,7 +147,7 @@ gp_Vec ElSLib::ConeDN (const Standard_Real    U,
 {
    gp_XYZ Xdir = Pos.XDirection().XYZ();
    gp_XYZ Ydir = Pos.YDirection().XYZ(); 
-   Standard_Real Um = U + Nu * M_PI_2;  // PI * 0.5
+   Standard_Real Um = U + Nu * M_PI_2;  // M_PI * 0.5
    Xdir.Multiply(cos(Um));
    Ydir.Multiply(sin(Um));
    Xdir.Add(Ydir);
@@ -1450,7 +1450,7 @@ void ElSLib::TorusParameters(const gp_Ax3& Pos,
     if (AD1 < 0) AD1 = - AD1;
     Standard_Real AD2 = D2;
     if (AD2 < 0) AD2 = - AD2;
-    if (AD2 < AD1) U += PI;
+    if (AD2 < AD1) U += M_PI;
   }
   if      (U < -1.e-16)  U += PIPI;
   else if (U < 0)        U = 0;
index cba4ff969ecba92e2365d13577b0371c6a88ea1c..7c17e0391557e93c65d47c1d4c19f28df039e352 100755 (executable)
@@ -297,7 +297,7 @@ void Extrema_ExtCS::Perform(const Adaptor3d_Curve& C,
        PS.Parameter(U, V);
 
        if((myStype == GeomAbs_Sphere) || (myStype == GeomAbs_Cylinder)) {
-         U = ElCLib::InPeriod(U, myuinf, myuinf+2.*PI);
+         U = ElCLib::InPeriod(U, myuinf, myuinf+2.*M_PI);
        }
 
        if ((myuinf-U) <= mytolS && (U-myusup) <= mytolS &&
index 169dc72c6c92f3f27c718cb8a2c1907ae4aee9c5..1e29282473220db0612650003f48ed209eff0e22 100755 (executable)
@@ -57,7 +57,7 @@ class ExtremaExtElC_TrigonometricRoots {
     Standard_Real PIpPI, aEps;
     //
     aEps=RealEpsilon();
-    PIpPI=Standard_PI+Standard_PI;
+    PIpPI = M_PI + M_PI;
     for(Standard_Integer i=0 ; i<NbRoots; i++) {
       if(Abs(u - Roots[i])<=aEps) {
        return Standard_True ;
@@ -127,7 +127,7 @@ ExtremaExtElC_TrigonometricRoots::
        Standard_Integer j, SvNbRoots;
        Standard_Real aTwoPI, aMaxCoef, aPrecision;
        //
-       aTwoPI=PI+PI;
+       aTwoPI=M_PI+M_PI;
        NbRoots=MTFR.NbSolutions();
        for(i=0;i<NbRoots;++i) {
          Roots[i]=MTFR.Value(i+1);
@@ -410,7 +410,7 @@ Method:
     A4 = 0.;
   }
   //
-  ExtremaExtElC_TrigonometricRoots Sol(A1,A2,A3,A4,A5,0.,PI+PI);
+  ExtremaExtElC_TrigonometricRoots Sol(A1,A2,A3,A4,A5,0.,M_PI+M_PI);
   if (!Sol.IsDone()) { 
     return; 
   }
@@ -520,7 +520,7 @@ Method:
   if(fabs(A4) <= aEps) A4 = 0.;
   //modified by NIZNHY-PKV Thu Feb 03 14:51:08 2011t
   //
-  ExtremaExtElC_TrigonometricRoots Sol(A1,A2,A3,A4,A5,0.,PI+PI);
+  ExtremaExtElC_TrigonometricRoots Sol(A1,A2,A3,A4,A5,0.,M_PI+M_PI);
   if (!Sol.IsDone()) { return; }
 
 // Storage of solutions ...
index 5508bdd33646018e3e9874e47948f357dfe8a601..5185c656f62b1b78b09530202587d323455b7d39 100755 (executable)
@@ -93,11 +93,11 @@ Method:
 #endif
   
   if (Abs(Dy) <= RealEpsilon()) {
-    teta[0] = PI/2.0;
+    teta[0] = M_PI/2.0;
   }
   else  teta[0] = ATan(-Dx/Dy);
-  teta[1] = teta[0]+ PI;
-  if (teta[0] < 0.0) teta[0] = teta[0] + 2.0*PI;
+  teta[1] = teta[0]+ M_PI;
+  if (teta[0] < 0.0) teta[0] = teta[0] + 2.0*M_PI;
 
   P2 = ElCLib::Value(teta[0], C2);
   U1 = (gp_Vec2d(O1, P2)).Dot(D);
@@ -143,12 +143,12 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1,
 #endif
   
   if (Abs(Dy) <= RealEpsilon()) {
-    teta[0] = PI/2.0;
+    teta[0] = M_PI/2.0;
   }
   else  teta[0] = ATan(-Dx*r2/(Dy*r1));
 
-  teta[1] = teta[0] + PI;
-  if (teta[0] < 0.0) teta[0] += 2.0*PI;
+  teta[1] = teta[0] + M_PI;
+  if (teta[0] < 0.0) teta[0] += 2.0*M_PI;
   P2 = ElCLib::Value(teta[0], C2);
   U1 = (gp_Vec2d(O1, P2)).Dot(D);
   P1 = ElCLib::Value(U1, C1);
@@ -296,12 +296,12 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Elips2d& C2)
   Standard_Integer i, j;
 
   Extrema_ExtPElC2d ExtElip(C1.Location(), C2, 
-                           Precision::Confusion(), 0.0, 2.0*PI);
+                           Precision::Confusion(), 0.0, 2.0*M_PI);
   
   if (ExtElip.IsDone()) {
     for (i = 1; i <= ExtElip.NbExt(); i++) {
       Extrema_ExtPElC2d ExtCirc(ExtElip.Point(i).Value(), C1, 
-                               Precision::Confusion(), 0.0, 2.0*PI);
+                               Precision::Confusion(), 0.0, 2.0*M_PI);
       if (ExtCirc.IsDone()) {
        for (j = 1; j <= ExtCirc.NbExt(); j++) {
          mySqDist[myNbExt] = ExtCirc.SquareDistance(j);
@@ -330,7 +330,7 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Hypr2d& C2)
   if (ExtHyp.IsDone()) {
     for (i = 1; i <= ExtHyp.NbExt(); i++) {
       Extrema_ExtPElC2d ExtCirc(ExtHyp.Point(i).Value(), C1, 
-                               Precision::Confusion(), 0.0, 2.0*PI);
+                               Precision::Confusion(), 0.0, 2.0*M_PI);
       if (ExtCirc.IsDone()) {
        for (j = 1; j <= ExtCirc.NbExt(); j++) {
          mySqDist[myNbExt] = ExtCirc.SquareDistance(j);
@@ -359,7 +359,7 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Circ2d& C1, const gp_Parab2d& C2)
   if (ExtParab.IsDone()) {
     for (i = 1; i <= ExtParab.NbExt(); i++) {
       Extrema_ExtPElC2d ExtCirc(ExtParab.Point(i).Value(), 
-                               C1, Precision::Confusion(), 0.0, 2.0*PI);
+                               C1, Precision::Confusion(), 0.0, 2.0*M_PI);
       if (ExtCirc.IsDone()) {
        for (j = 1; j <= ExtCirc.NbExt(); j++) {
          mySqDist[myNbExt] = ExtCirc.SquareDistance(j);
index 2bffeaa5ce70374f49b4c06a566ad68cfc1ee534..e7fb74c8dd32bfc691b38d0751a7d14d5ab7dbbc 100755 (executable)
@@ -73,7 +73,7 @@ Function:
 Method:
   Pass 3 stages:
   1- Projection of point P in the plane of the circle,
-  2- Calculation of u solutions in [0.,2.*PI]:
+  2- Calculation of u solutions in [0.,2.*M_PI]:
       Let Pp, the projected point and 
            O, the center of the circle;
      2 cases:
@@ -81,8 +81,8 @@ Method:
        IsDone() renvoie Standard_False.
      - otherwise, 2 points are solutions for the complete circle:
        . Us1 = angle(OPp,OX) corresponds to the minimum,
-       . let Us2 = ( Us1 + PI if Us1 < PI,
-                    ( Us1 - PI otherwise;
+       . let Us2 = ( Us1 + M_PI if Us1 < M_PI,
+                    ( Us1 - M_PI otherwise;
          Us2 corresponds to the maximum.
   3- Calculate the extrema in [Uinf,Usup].
 -----------------------------------------------------------------------------*/
@@ -102,8 +102,8 @@ Method:
   gp_Vec OPp (O,Pp);
   if (OPp.Magnitude() < Tol) { return; }
   Standard_Real Usol[2];
-  Usol[0] = C.XAxis().Direction().AngleWithRef(OPp,Axe); // -PI<U1<PI
-  Usol[1] = Usol[0] + PI;
+  Usol[0] = C.XAxis().Direction().AngleWithRef(OPp,Axe); // -M_PI<U1<M_PI
+  Usol[1] = Usol[0] + M_PI;
 
   Standard_Real myuinf = Uinf;
   //modified by NIZNHY-PKV Fri Apr 20 15:03:28 2001 f
@@ -115,10 +115,10 @@ Method:
     TolU= Tol/aR;
   }
   //modified by NIZNHY-PKV Fri Apr 20 15:03:32 2001 t
-  ElCLib::AdjustPeriodic(Uinf, Uinf+2*PI, TolU, myuinf, Usol[0]);
-  ElCLib::AdjustPeriodic(Uinf, Uinf+2*PI, TolU, myuinf, Usol[1]);
-  if (((Usol[0]-2*PI-Uinf) < TolU) && ((Usol[0]-2*PI-Uinf) > -TolU)) Usol[0] = Uinf;
-  if (((Usol[1]-2*PI-Uinf) < TolU) && ((Usol[1]-2*PI-Uinf) > -TolU)) Usol[1] = Uinf;
+  ElCLib::AdjustPeriodic(Uinf, Uinf+2*M_PI, TolU, myuinf, Usol[0]);
+  ElCLib::AdjustPeriodic(Uinf, Uinf+2*M_PI, TolU, myuinf, Usol[1]);
+  if (((Usol[0]-2*M_PI-Uinf) < TolU) && ((Usol[0]-2*M_PI-Uinf) > -TolU)) Usol[0] = Uinf;
+  if (((Usol[1]-2*M_PI-Uinf) < TolU) && ((Usol[1]-2*M_PI-Uinf) > -TolU)) Usol[1] = Uinf;
 
 
 // 3- Calculate extrema in [Umin,Umax] ...
index d735a28da403b44db0abe7d4a01603624f7254f8..abff2fb5b59305ee054e30a5bd3793e9f4955fdf 100755 (executable)
@@ -84,13 +84,13 @@ void Extrema_ExtPElC2d::Perform(const gp_Pnt2d&     P,
     radius = C.Radius();
     P1 = OC.Translated(radius*V);
     U1 = ElCLib::Parameter(C, P1);
-    U2 = U1 + PI;
+    U2 = U1 + M_PI;
     P2 = OC.Translated(-radius*V);
     Standard_Real myuinf = Uinf;
-    ElCLib::AdjustPeriodic(Uinf, Uinf+2*PI, Precision::PConfusion(), myuinf, U1);
-    ElCLib::AdjustPeriodic(Uinf, Uinf+2*PI, Precision::PConfusion(), myuinf, U2);
-    if (((U1-2*PI-Uinf) < Tol) && ((U1-2*PI-Uinf) > -Tol)) U1 = Uinf;
-    if (((U2-2*PI-Uinf) < Tol) && ((U2-2*PI-Uinf) > -Tol)) U2 = Uinf;
+    ElCLib::AdjustPeriodic(Uinf, Uinf+2*M_PI, Precision::PConfusion(), myuinf, U1);
+    ElCLib::AdjustPeriodic(Uinf, Uinf+2*M_PI, Precision::PConfusion(), myuinf, U2);
+    if (((U1-2*M_PI-Uinf) < Tol) && ((U1-2*M_PI-Uinf) > -Tol)) U1 = Uinf;
+    if (((U2-2*M_PI-Uinf) < Tol) && ((U2-2*M_PI-Uinf) > -Tol)) U2 = Uinf;
 
     if (((Uinf-U1) < Tol) && ((U1-Usup) < Tol)) {
       Extrema_POnCurv2d MyPOnCurve(U1, P1);
index de973f37e0c5bdec59094fae99d017b240d0a3b5..49b48289fc61fe0349141d373ea37a78eadeb8e7 100755 (executable)
@@ -27,8 +27,8 @@ Method:
      There are infinite solutions; IsDone() = Standard_False.
   2- distance(Pp,O) > Tol:
      let V = OP.OZ,
-          U1 = angle(OX,OPp) with 0 < U1 < 2.*PI
-         U2 = U1 + PI with 0 < U2 < 2.*PI;
+          U1 = angle(OX,OPp) with 0 < U1 < 2.*M_PI
+         U2 = U1 + M_PI with 0 < U2 < 2.*M_PI;
      then (U1,V) corresponds to the min distance.
      and  (U2,V) corresponds to the max distance.
 -----------------------------------------------------------------------------*/
@@ -51,9 +51,9 @@ void Extrema_ExtPElS::Perform(const gp_Pnt&       P,
   gp_Vec OPp (O,Pp);
   if (OPp.Magnitude() < Tol) { return; }
   gp_Vec myZ = Pos.XDirection()^Pos.YDirection();
-  Standard_Real U1 = gp_Vec(Pos.XDirection()).AngleWithRef(OPp,myZ); //-PI<U1<PI
-  Standard_Real U2 = U1 + PI;
-  if (U1 < 0.) { U1 += 2. * PI; }
+  Standard_Real U1 = gp_Vec(Pos.XDirection()).AngleWithRef(OPp,myZ); //-M_PI<U1<M_PI
+  Standard_Real U2 = U1 + M_PI;
+  if (U1 < 0.) { U1 += 2. * M_PI; }
 
   gp_Pnt Ps;
   Ps = ElSLib::Value(U1,V,S);
@@ -93,11 +93,11 @@ Method:
         Let Vm = value of v for point M,
              Vp = value of v for point P,
              U1 = angle(OX,OPp) if Vp > Vm )
-                -angle(OX,OPp) otherwise      ) with 0. < U1 < 2*PI,
-             U2 = U1 + PI with 0. < U2 < 2*PI;
+                -angle(OX,OPp) otherwise      ) with 0. < U1 < 2*M_PI,
+             U2 = U1 + M_PI with 0. < U2 < 2*M_PI;
         We are in plane PpOZ.
        Let A the angle of the cone,
-             B = angle(MP,MO) with 0. < B < PI,
+             B = angle(MP,MO) with 0. < B < M_PI,
             L = longueur(MP),
             V1 = (L * cos(B-A)) + Vm,
             V2 = (L * cos(B+A)) + Vm;
@@ -150,17 +150,17 @@ void Extrema_ExtPElS::Perform(const gp_Pnt&       P,
   if (OPp.SquareMagnitude() < Tol * Tol) return;
   Standard_Real B, U1, V1, U2, V2;
   Standard_Boolean Same = DirZ.Dot(MP) >= 0.0;
-  U1 = gp_Vec(Pos.XDirection()).AngleWithRef(OPp,myZ); //-PI<U1<PI
+  U1 = gp_Vec(Pos.XDirection()).AngleWithRef(OPp,myZ); //-M_PI<U1<M_PI
   B = MP.Angle(DirZ);
-  if (!Same) { U1 += PI; }
-  U2 = U1 + PI;
-  if (U1 < 0.) { U1 += 2. * PI; }
-  if (U2 > 2.*PI) { U2 -= 2. * PI; }
+  if (!Same) { U1 += M_PI; }
+  U2 = U1 + M_PI;
+  if (U1 < 0.) { U1 += 2. * M_PI; }
+  if (U2 > 2.*M_PI) { U2 -= 2. * M_PI; }
   B = MP.Angle(DirZ);
   A = Abs(A);
   Standard_Real L = sqrt(L2);
   if (!Same) {
-    B = PI-B;
+    B = M_PI-B;
     V1 = -L*cos(B-A);
     V2 = -L*cos(B+A);
   }
@@ -204,11 +204,11 @@ Method:
      Let Pp be the projection of point P in the plane XOY of the sphere;
      2 cases are considered:
      1- distance(Pp,O) < Tol:
-        2 solutions are: (0,-PI/2.) and (0.,PI/2.)
+        2 solutions are: (0,-M_PI/2.) and (0.,M_PI/2.)
      2- distance(Pp,O) > Tol:
-        Let U1 = angle(OX,OPp) with 0. < U1 < 2.*PI,
-            U2 = U1 + PI avec 0. < U2 < 2*PI,
-            V1 = angle(OPp,OP) with -PI/2. < V1 < PI/2. ,
+        Let U1 = angle(OX,OPp) with 0. < U1 < 2.*M_PI,
+            U2 = U1 + M_PI avec 0. < U2 < 2*M_PI,
+            V1 = angle(OPp,OP) with -M_PI/2. < V1 < M_PI/2. ,
        then (U1, V1) corresponds to the min distance
        and  (U2,-V1) corresponds to the max distance.
 -----------------------------------------------------------------------------*/
@@ -238,14 +238,14 @@ void Extrema_ExtPElS::Perform(const gp_Pnt&       P,
   if (OPp.SquareMagnitude() < Tol * Tol) {
     U1 = 0.;
     U2 = 0.;
-    if (Zp < 0.) { V = -PI / 2.; }
-    else { V = PI / 2.; }
+    if (Zp < 0.) { V = -M_PI / 2.; }
+    else { V = M_PI / 2.; }
   }
   else {
     gp_Vec myZ = Pos.XDirection()^Pos.YDirection();
     U1 = gp_Vec(Pos.XDirection()).AngleWithRef(OPp,myZ);
-    U2 = U1 + PI;
-    if (U1 < 0.) { U1 += 2. * PI; }
+    U2 = U1 + M_PI;
+    if (U1 < 0.) { U1 += 2. * M_PI; }
     V = OP.Angle(OPp);
     if (Zp < 0.) { V = -V; }
   }
@@ -280,8 +280,8 @@ Function:
      There is an infinite number of solutions; IsDone() = Standard_False.
   2- distance(Pp,O) > Tol:
      One is located in plane PpOZ;
-     Let V1 = angle(OX,OPp) with 0. < V1 < 2.*PI,
-        V2 = V1 + PI with 0. < V2 < 2.*PI,
+     Let V1 = angle(OX,OPp) with 0. < V1 < 2.*M_PI,
+        V2 = V1 + M_PI with 0. < V2 < 2.*M_PI,
         O1 and O2 centers of circles (O1 on coord. posit.)
          U1 = angle(OPp,O1P),
         U2 = angle(OPp,PO2);
@@ -308,8 +308,8 @@ void Extrema_ExtPElS::Perform(const gp_Pnt&       P,
  
   gp_Vec myZ = Pos.XDirection()^Pos.YDirection();
   Standard_Real U1 = gp_Vec(Pos.XDirection()).AngleWithRef(OPp,myZ);
-  Standard_Real U2 = U1 + PI;
-  if (U1 < 0.) { U1 += 2. * PI; }
+  Standard_Real U2 = U1 + M_PI;
+  if (U1 < 0.) { U1 += 2. * M_PI; }
   Standard_Real R = sqrt(R2);
   gp_Vec OO1 = OPp.Divided(R).Multiplied(S.MajorRadius());
   gp_Vec OO2 = OO1.Multiplied(-1.);
@@ -321,25 +321,25 @@ void Extrema_ExtPElS::Perform(const gp_Pnt&       P,
 
   Standard_Real V1 = OO1.AngleWithRef(gp_Vec(O1,P),OO1.Crossed(OZ));
   Standard_Real V2 = OO2.AngleWithRef(gp_Vec(P,O2),OO2.Crossed(OZ));
-  if (V1 < 0.) { V1 += 2. * PI; }
-  if (V2 < 0.) { V2 += 2. * PI; }
+  if (V1 < 0.) { V1 += 2. * M_PI; }
+  if (V2 < 0.) { V2 += 2. * M_PI; }
 
   gp_Pnt Ps;
   Ps = ElSLib::Value(U1,V1,S);
   mySqDist[0] = Ps.SquareDistance(P);
   myPoint[0] = Extrema_POnSurf(U1,V1,Ps);
 
-  Ps = ElSLib::Value(U1,V1+PI,S);
+  Ps = ElSLib::Value(U1,V1+M_PI,S);
   mySqDist[1] = Ps.SquareDistance(P);
-  myPoint[1] = Extrema_POnSurf(U1,V1+PI,Ps);
+  myPoint[1] = Extrema_POnSurf(U1,V1+M_PI,Ps);
 
   Ps = ElSLib::Value(U2,V2,S);
   mySqDist[2] = Ps.SquareDistance(P);
   myPoint[2] = Extrema_POnSurf(U2,V2,Ps);
 
-  Ps = ElSLib::Value(U2,V2+PI,S);
+  Ps = ElSLib::Value(U2,V2+M_PI,S);
   mySqDist[3] = Ps.SquareDistance(P);
-  myPoint[3] = Extrema_POnSurf(U2,V2+PI,Ps);
+  myPoint[3] = Extrema_POnSurf(U2,V2+M_PI,Ps);
 
   myNbExt = 4;
   myDone = Standard_True;
index fa48fb2f65defa7d7dc3736a8967bd0b820d814b..dee406bd9db34925ee1731f6d5d100cfeaa10afb 100755 (executable)
@@ -247,7 +247,7 @@ void Extrema_ExtPExtS::Perform (const gp_Pnt& P)
     if (myC->IsPeriodic())
       {
        Standard_Real U2 = U;
-       ElCLib::AdjustPeriodic(myuinf, myuinf + 2.*PI, Precision::PConfusion(), U, U2);
+       ElCLib::AdjustPeriodic(myuinf, myuinf + 2.*M_PI, Precision::PConfusion(), U, U2);
       }
     //////////////////////////////////////////////////
     gp_Pnt E = POC.Value();
@@ -398,10 +398,10 @@ static void PerformExtPElC (Extrema_ExtPElC& E,
     E.Perform(P, C->Line(), Tol, -Precision::Infinite(),Precision::Infinite());
     return;
   case GeomAbs_Circle:
-    E.Perform(P, C->Circle(), Tol, 0.0, 2.0 * PI);
+    E.Perform(P, C->Circle(), Tol, 0.0, 2.0 * M_PI);
     return;
   case GeomAbs_Ellipse:
-    E.Perform(P, C->Ellipse(), Tol, 0.0, 2.0 * PI);
+    E.Perform(P, C->Ellipse(), Tol, 0.0, 2.0 * M_PI);
     return;
   case GeomAbs_Parabola:
     E.Perform(P, C->Parabola(), Tol, -Precision::Infinite(),Precision::Infinite());
index 32ea418f05adeca2266386e1c6c6751cb82e072a..bbda10dcfc3afd023d81e62b7b34294039fcf9fa 100755 (executable)
@@ -96,10 +96,10 @@ static void PerformExtPElC (Extrema_ExtPElC& E,
     E.Perform(P, C->Line(), Tol, -Precision::Infinite(),Precision::Infinite());
     return;
   case GeomAbs_Circle:
-    E.Perform(P, C->Circle(), Tol, 0.0, 2.0 * PI);
+    E.Perform(P, C->Circle(), Tol, 0.0, 2.0 * M_PI);
     return;
   case GeomAbs_Ellipse:
-    E.Perform(P, C->Ellipse(), Tol, 0.0, 2.0 * PI);
+    E.Perform(P, C->Ellipse(), Tol, 0.0, 2.0 * M_PI);
     return;
   case GeomAbs_Parabola:
     E.Perform(P, C->Parabola(), Tol, -Precision::Infinite(),Precision::Infinite());
@@ -309,18 +309,18 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
   else {
     Ppp = Pp.Translated(Z.Multiplied(-OPpz));
     if (O.IsEqual(Ppp,Precision::Confusion())) 
-      U = PI/2;
+      U = M_PI/2;
     else {
       U = gp_Vec(O,Ppp).AngleWithRef(gp_Vec(O,Pp),Dir);
     }
   }
 
-  gp_Vec OPpp (O,Ppp), OPq (O, myS->Value(PI/2,0));
-  if (U != PI/2) {
+  gp_Vec OPpp (O,Ppp), OPq (O, myS->Value(M_PI/2,0));
+  if (U != M_PI/2) {
     if (Abs(OPq.Magnitude()) <= gp::Resolution()) 
-      OPq = gp_Vec(O, myS->Value(PI/2,anACurve->LastParameter()/10));
+      OPq = gp_Vec(O, myS->Value(M_PI/2,anACurve->LastParameter()/10));
     if (OPpp.AngleWithRef(OPq,Dir) < 0)
-      U += PI;
+      U += M_PI;
   }
   
   gp_Trsf T;
@@ -346,7 +346,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
 
        if((anACurve->GetType() == GeomAbs_Circle) || 
           (anACurve->GetType() == GeomAbs_Ellipse)) {
-         newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * PI);
+         newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * M_PI);
 
          if (newV > myvsup) {
            newV = myvsup;
@@ -366,7 +366,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
 
        if((anACurve->GetType() == GeomAbs_Circle) || 
           (anACurve->GetType() == GeomAbs_Ellipse)) {
-         newV = ElCLib::InPeriod(V, myvsup - 2. * PI, myvsup);
+         newV = ElCLib::InPeriod(V, myvsup - 2. * M_PI, myvsup);
          
          if(newV < myvinf)
            newV = myvinf;
@@ -385,14 +385,14 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
       }
     }
   }
-  T.SetRotation(Ax, PI);
+  T.SetRotation(Ax, M_PI);
   P1.Transform(T);
   
   PerformExtPElC(anExt, P1, anACurve, mytolv);
   if (anExt.IsDone()) {
     myDone = Standard_True;
 
-    U += PI;
+    U += M_PI;
     
     for (i=1; i<=anExt.NbExt(); i++) {
       Extrema_POnCurv POC=anExt.Point(i);
@@ -405,7 +405,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
 
        if((anACurve->GetType() == GeomAbs_Circle) || 
           (anACurve->GetType() == GeomAbs_Ellipse)) {
-         newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * PI);
+         newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * M_PI);
 
          if (newV > myvsup) {
            newV = myvsup;
@@ -422,7 +422,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
 
        if((anACurve->GetType() == GeomAbs_Circle) || 
           (anACurve->GetType() == GeomAbs_Ellipse)) {
-         newV = ElCLib::InPeriod(V, myvsup - 2. * PI, myvsup);
+         newV = ElCLib::InPeriod(V, myvsup - 2. * M_PI, myvsup);
          
          if(newV < myvinf)
            newV = myvinf;
index 647708a70e84b4edf56680ceff18be8aea35f531..97fa0983173550567ad5d55e5a4fa27fd7274dd5 100755 (executable)
@@ -17,8 +17,8 @@ Methode:
   1- distance(Pp,O) < Tol:
      Il existe 0 ou une infinite de solutions; IsDone() = Standard_False;
   2- distance(Pp,O) > Tol:
-     Soit U1 = angle(OX,OPp) avec 0. < U1 < 2.*PI,
-          U2 = U1 + PI       avec 0. < U2 < 2.*PI,
+     Soit U1 = angle(OX,OPp) avec 0. < U1 < 2.*M_PI,
+          U2 = U1 + M_PI       avec 0. < U2 < 2.*M_PI,
           M1 le meridien S(U1),
          M2 le meridien S(U2);
      On recherche les distances minimales entre P et M1 et les distances
@@ -38,8 +38,8 @@ Methode:
   if (OPp.Magnitude() < Tol) { return; }
 
   Standard_Real U1 = gp_Vec(Pos.XDirection()).AngleWithRef(OPp,OZ);
-  Standard_Real U2 = U1 + PI;
-  if (U1 < 0.) { U1 += 2. * PI; }
+  Standard_Real U2 = U1 + M_PI;
+  if (U1 < 0.) { U1 += 2. * M_PI; }
   Curve M1 = Tool::Meridian(S, U1);
   Curve M2 = Tool::Meridian(S, U2);
   TheExtPC ExtPM1 (P,M1,NbV,TolV,Tol);
index 9e77906a18dd6f88214fb88683b44cad7bb30123..01397e47d8111456eaa8fa69037dd54f74075cab 100755 (executable)
@@ -99,22 +99,22 @@ void Extrema_GExtCC2d::Perform (const Curve1&       C1,
     switch(type2) {
       case GeomAbs_Circle: {
        Extrema_ExtElC2d Xtrem(Tool1::Circle(C1), Tool2::Circle(*((Curve2*)myC)));
-       Results(Xtrem, U11, U12, U21, U22, 2*PI, 2*PI);
+       Results(Xtrem, U11, U12, U21, U22, 2*M_PI, 2*M_PI);
         }
        break;
       case GeomAbs_Ellipse: {
        Extrema_ExtElC2d Xtrem(Tool1::Circle(C1), Tool2::Ellipse(*((Curve2*)myC)));
-       Results(Xtrem, U11, U12, U21, U22, 2*PI, 2*PI );
+       Results(Xtrem, U11, U12, U21, U22, 2*M_PI, 2*M_PI );
         }
        break;
       case GeomAbs_Parabola: {
        Extrema_ExtElC2d Xtrem(Tool1::Circle(C1), Tool2::Parabola(*((Curve2*)myC)));
-       Results(Xtrem, U11, U12, U21, U22, 2*PI, 0.);
+       Results(Xtrem, U11, U12, U21, U22, 2*M_PI, 0.);
       }
        break;
       case GeomAbs_Hyperbola: {
        Extrema_ExtElC2d Xtrem(Tool1::Circle(C1), Tool2::Hyperbola(*((Curve2*)myC)));
-       Results(Xtrem, U11, U12, U21, U22, 2*PI, 0. );
+       Results(Xtrem, U11, U12, U21, U22, 2*M_PI, 0. );
       }
        break;
       case GeomAbs_BezierCurve:
@@ -124,13 +124,13 @@ void Extrema_GExtCC2d::Perform (const Curve1&       C1,
                            NbU, NbV, mytolc1, mytolc2);
        Standard_Real Period2 = 0.;
        if (Tool2::IsPeriodic(*((Curve2*)myC))) Period2 = Tool2::Period(*((Curve2*)myC));
-       Results(Xtrem, C1, U11, U12, U21, U22, 2*PI,Period2);
+       Results(Xtrem, C1, U11, U12, U21, U22, 2*M_PI,Period2);
         }
        break;
       case GeomAbs_Line: {
        inverse = Standard_True;
        Extrema_ExtElC2d Xtrem(Tool2::Line(*((Curve2*)myC)), Tool1::Circle(C1), Tol);
-       Results(Xtrem, U11, U12, U21, U22, 2*PI, 0.);
+       Results(Xtrem, U11, U12, U21, U22, 2*M_PI, 0.);
         }
        break;
       };  // switch(type2)
@@ -146,28 +146,28 @@ void Extrema_GExtCC2d::Perform (const Curve1&       C1,
       case GeomAbs_Circle: {
        inverse = Standard_True;
        Extrema_ExtElC2d Xtrem(Tool2::Circle(*((Curve2*)myC)), Tool1::Ellipse(C1));
-       Results(Xtrem, U11, U12, U21, U22, 2*PI, 2*PI);
+       Results(Xtrem, U11, U12, U21, U22, 2*M_PI, 2*M_PI);
         }
        break;
       case GeomAbs_Ellipse: {
        //Extrema_ExtElC2d Xtrem(Tool1::Ellipse(C1), Tool2::Ellipse(*((Curve2*)myC)));
        Extrema_ECC2d Xtrem(C1, *((Curve2*)myC), 
                            NbU, NbV, mytolc1, mytolc2);
-       Results(Xtrem, C1, U11, U12, U21, U22,2*PI, 2*PI);
+       Results(Xtrem, C1, U11, U12, U21, U22,2*M_PI, 2*M_PI);
         }
        break;
       case GeomAbs_Parabola: {
        //Extrema_ExtElC2d Xtrem(Tool1::Ellipse(C1), Tool2::Parabola(*((Curve2*)myC)));
        Extrema_ECC2d Xtrem(C1, *((Curve2*)myC), 
                            NbU, NbV, mytolc1, mytolc2);
-       Results(Xtrem, C1, U11, U12, U21, U22, 2*PI, 0.);
+       Results(Xtrem, C1, U11, U12, U21, U22, 2*M_PI, 0.);
       }
        break;
       case GeomAbs_Hyperbola: {
        //Extrema_ExtElC2d Xtrem(Tool1::Ellipse(C1), Tool2::Hyperbola(*((Curve2*)myC)));
        Extrema_ECC2d Xtrem(C1, *((Curve2*)myC), 
                            NbU, NbV, mytolc1, mytolc2);
-       Results(Xtrem, C1, U11, U12, U21, U22, 2*PI, 0.);
+       Results(Xtrem, C1, U11, U12, U21, U22, 2*M_PI, 0.);
       }
        break;
       case GeomAbs_BezierCurve:
@@ -177,13 +177,13 @@ void Extrema_GExtCC2d::Perform (const Curve1&       C1,
                            NbU, NbV, mytolc1, mytolc2);        
        Standard_Real Period2 = 0.;
        if (Tool2::IsPeriodic(*((Curve2*)myC))) Period2 = Tool2::Period(*((Curve2*)myC));
-       Results(Xtrem, C1, U11, U12, U21, U22, 2*PI,Period2);
+       Results(Xtrem, C1, U11, U12, U21, U22, 2*M_PI,Period2);
         }
        break;
       case GeomAbs_Line: {
         inverse = Standard_True;
        Extrema_ExtElC2d Xtrem(Tool2::Line(*((Curve2*)myC)), Tool1::Ellipse(C1));
-       Results(Xtrem, U11, U12, U21, U22, 2*PI, 0.);
+       Results(Xtrem, U11, U12, U21, U22, 2*M_PI, 0.);
         }
        break;
       };  // switch(type2)
@@ -199,7 +199,7 @@ void Extrema_GExtCC2d::Perform (const Curve1&       C1,
       case GeomAbs_Circle: {
        inverse = Standard_True;
        Extrema_ExtElC2d Xtrem(Tool2::Circle(*((Curve2*)myC)), Tool1::Parabola(C1));
-       Results(Xtrem, U11, U12, U21, U22, 0., 2*PI);
+       Results(Xtrem, U11, U12, U21, U22, 0., 2*M_PI);
         }
        break;
       case GeomAbs_Ellipse: {
@@ -207,7 +207,7 @@ void Extrema_GExtCC2d::Perform (const Curve1&       C1,
        //Extrema_ExtElC2d Xtrem(Tool2::Ellipse(*((Curve2*)myC)), Tool1::Parabola(C1));
        Extrema_ECC2d Xtrem(C1, *((Curve2*)myC), 
                            NbU, NbV, mytolc1, mytolc2);
-       Results(Xtrem, C1, U11, U12, U21, U22, 0., 2*PI);
+       Results(Xtrem, C1, U11, U12, U21, U22, 0., 2*M_PI);
         }
        break;
       case GeomAbs_Parabola: {
@@ -254,7 +254,7 @@ void Extrema_GExtCC2d::Perform (const Curve1&       C1,
       case GeomAbs_Circle: {
        inverse = Standard_True;
        Extrema_ExtElC2d Xtrem(Tool2::Circle(*((Curve2*)myC)), Tool1::Hyperbola(C1));
-       Results(Xtrem, U11, U12, U21, U22, 0., 2*PI);
+       Results(Xtrem, U11, U12, U21, U22, 0., 2*M_PI);
         }
        break;
       case GeomAbs_Ellipse: {
@@ -262,7 +262,7 @@ void Extrema_GExtCC2d::Perform (const Curve1&       C1,
        //Extrema_ExtElC2d Xtrem(Tool2::Ellipse(*((Curve2*)myC)), Tool1::Hyperbola(C1));
        Extrema_ECC2d Xtrem(C1, *((Curve2*)myC), 
                            NbU, NbV, mytolc1, mytolc2);
-       Results(Xtrem, C1, U11, U12, U21, U22, 0., 2*PI );
+       Results(Xtrem, C1, U11, U12, U21, U22, 0., 2*M_PI );
         }
        break;
       case GeomAbs_Parabola: {
@@ -323,12 +323,12 @@ void Extrema_GExtCC2d::Perform (const Curve1&       C1,
     switch(type2) {
       case GeomAbs_Circle: {
        Extrema_ExtElC2d Xtrem(Tool1::Line(C1), Tool2::Circle(*((Curve2*)myC)), Tol);
-       Results(Xtrem, U11, U12, U21, U22, 0., 2*PI);
+       Results(Xtrem, U11, U12, U21, U22, 0., 2*M_PI);
         }
        break;
       case GeomAbs_Ellipse: {
        Extrema_ExtElC2d Xtrem(Tool1::Line(C1), Tool2::Ellipse(*((Curve2*)myC)));
-       Results(Xtrem, U11, U12, U21, U22, 0., 2*PI);
+       Results(Xtrem, U11, U12, U21, U22, 0., 2*M_PI);
         }
        break;
       case GeomAbs_Parabola: {
index 3b9ce1acdd259bf1faadf9c3d035b12b74ceffe5..47e121bfbcfb3d6bb2cbbd72cc40153671d64090 100755 (executable)
@@ -145,7 +145,7 @@ Standard_Boolean FairCurve_Batten::Compute(FairCurve_AnalysisCode& ACode,
 {
   Standard_Boolean Ok=Standard_True, End=Standard_False;
   Standard_Real AngleMax = 0.7;      // parameter ruling the function of increment ( 40 degrees )
-  Standard_Real AngleMin = 2*PI/100; // parameter ruling the function of increment 
+  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;
@@ -451,10 +451,10 @@ Standard_Real FairCurve_Batten::SlidingOfReference(const Standard_Real Dist,
 // case of angle without constraints
  if ( (NewConstraintOrder1 == 0) && (NewConstraintOrder2 == 0)) return Dist;
 
- if (NewConstraintOrder1 == 0) a1 = Abs( Abs(NewAngle2)<PI ? Angle2/2 : PI/2);
+ if (NewConstraintOrder1 == 0) a1 = Abs( Abs(NewAngle2)<M_PI ? Angle2/2 : M_PI/2);
  else a1 = Abs(Angle1);
 
- if (NewConstraintOrder2 == 0) a2 = Abs( Abs(NewAngle1)<PI ? Angle1/2 : PI/2);
+ if (NewConstraintOrder2 == 0) a2 = Abs( Abs(NewAngle1)<M_PI ? Angle1/2 : M_PI/2);
  else a2 = Abs(Angle2);
 
 // case of angle of the same sign 
@@ -466,7 +466,7 @@ Standard_Real FairCurve_Batten::SlidingOfReference(const Standard_Real Dist,
  else {
     Standard_Real Ratio = a1 / ( a1 + a2 );
     Standard_Real AngleMilieu = pow(1-Ratio,2) * a1 + pow(Ratio,2) * a2;
-    if (AngleMilieu > PI/2) AngleMilieu = PI/2;
+    if (AngleMilieu > M_PI/2) AngleMilieu = M_PI/2;
 
     return   Ratio     * Compute(Dist, a1,  AngleMilieu )
            + (1-Ratio) * Compute(Dist, a2,  AngleMilieu );
@@ -496,8 +496,8 @@ Standard_Real FairCurve_Batten::Compute(const Standard_Real Dist,
 // ==================================================================
 {
   if (Angle < Precision::Angular() ) { return Dist; } // length of segment P1P2
-  if (Angle < PI/2) { return Angle*Dist / sin(Angle); } // length of circle P1P2 respecting ANGLE
-  if (Angle > PI) { return Sqrt(Angle*PI) * Dist;}
+  if (Angle < M_PI/2) { return Angle*Dist / sin(Angle); } // length of circle P1P2 respecting ANGLE
+  if (Angle > M_PI) { return Sqrt(Angle*M_PI) * Dist;}
   else  { return Angle * Dist; }                      // linear interpolation
 }
 
index 3452ece64a0c6803c6b5a7d4587d8c43a34ea39a..25a5a95f437085308563da3b114043abb0e37140 100755 (executable)
@@ -45,7 +45,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(FairCurve_AnalysisCode& ACo
 {
   Standard_Boolean Ok=Standard_True, End=Standard_False;
   Standard_Real AngleMax = 0.7;      // parameter regulating the function of increment ( 40 degrees )
-  Standard_Real AngleMin = 2*PI/100; // parameter regulating the function of increment 
+  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;
@@ -182,7 +182,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1,
                     /  pow (Knots->Value(Knots->Lower()+1)-Knots->Value(Knots->Lower()), 2);
          Standard_Real CPrim = OldDerive.Magnitude();
          ADelta(kk) = ( OldSeconde.Rotated(DAngle1) -  OldSeconde 
-                     + DeltaCurvature1*CPrim*OldDerive.Rotated(PI/2+DAngle1) ).XY();
+                     + DeltaCurvature1*CPrim*OldDerive.Rotated(M_PI/2+DAngle1) ).XY();
          kk += 1;
       }
    }
@@ -202,7 +202,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1,
                     /  pow (Knots->Value(Knots->Upper())-Knots->Value(Knots->Upper()-1), 2);
          Standard_Real CPrim = OldDerive.Magnitude();
          ADelta(kk) = ( OldSeconde.Rotated(DAngle2) -  OldSeconde 
-                     + DeltaCurvature2*CPrim*OldDerive.Rotated(PI/2+DAngle2) ).XY();
+                     + DeltaCurvature2*CPrim*OldDerive.Rotated(M_PI/2+DAngle2) ).XY();
          kk += 1;
       }
    }
index a4efe588a1b4ee832b47ebe42b1143fc58295377..4a5a6cdd54f4710bd43652bee99cf79a802772d7 100755 (executable)
@@ -14,7 +14,7 @@ GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Ax2&       A2    ,
                                               const Standard_Real Radius)
 {
   if (Radius < 0.) { TheError = gce_NegativeRadius; }
-  else if (Ang <= gp::Resolution() || Ang >= PI/2. - gp::Resolution()) {
+  else if (Ang <= gp::Resolution() || Ang >= M_PI/2. - gp::Resolution()) {
     TheError = gce_BadAngle;
   }
   else {
index a1597f0f14b4df0e47be8f06f67bd7d418404336..e85ed9265e9f83907764c81274259872974e7864 100755 (executable)
@@ -34,7 +34,7 @@ GC_MakeTrimmedCone::GC_MakeTrimmedCone(const gp_Pnt& P1 ,
     gp_Pnt P5 = ext1.Point(1).Value();
     gp_Pnt P6 = ext2.Point(1).Value();
     Standard_Real D = P6.Distance(P5)/cos((Cone.Value())->SemiAngle());
-    TheCone=new Geom_RectangularTrimmedSurface(Cone.Value(),0.,2.*PI,0.,D,Standard_True,Standard_True);
+    TheCone=new Geom_RectangularTrimmedSurface(Cone.Value(),0.,2.*M_PI,0.,D,Standard_True,Standard_True);
   }
 }
 
@@ -50,7 +50,7 @@ GC_MakeTrimmedCone::GC_MakeTrimmedCone(const gp_Pnt&       P1 ,
   TheError = Cone.Status();
   if (TheError == gce_Done) {
     Standard_Real D = (P2.Distance(P1))/cos((Cone.Value())->SemiAngle());
-    TheCone=new Geom_RectangularTrimmedSurface(Cone.Value(),0.,2.*PI,0.,D,Standard_True,Standard_True);
+    TheCone=new Geom_RectangularTrimmedSurface(Cone.Value(),0.,2.*M_PI,0.,D,Standard_True,Standard_True);
   }
 }
 
index a28933e5aeef194d6c45e1d709fb57a57c960e82..e51a32ca035894492340d53cc4b06e586827de09 100755 (executable)
@@ -21,7 +21,7 @@ GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Pnt& P1 ,
   GC_MakeCylindricalSurface Cyl(P1,P2,P3);
   TheError = Cyl.Status();
   if (TheError == gce_Done) {
-    TheCyl = new Geom_RectangularTrimmedSurface(Cyl.Value(),0.,2.*PI,0.,
+    TheCyl = new Geom_RectangularTrimmedSurface(Cyl.Value(),0.,2.*M_PI,0.,
                                  P2.Distance(P1),Standard_True,Standard_True);
   }
 }
@@ -35,7 +35,7 @@ GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Circ&      Circ   ,
   GC_MakeCylindricalSurface Cyl(Circ);
   TheError = Cyl.Status();
   if (TheError == gce_Done) {
-    TheCyl = new Geom_RectangularTrimmedSurface(Cyl.Value(),0.,2.*PI,0.,
+    TheCyl = new Geom_RectangularTrimmedSurface(Cyl.Value(),0.,2.*M_PI,0.,
                                           Height,Standard_True,Standard_True);
   }
 }
@@ -49,7 +49,7 @@ GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Ax1&       A1     ,
   GC_MakeCylindricalSurface Cyl(A1,Radius);
   TheError = Cyl.Status();
   if (TheError == gce_Done) {
-    TheCyl = new Geom_RectangularTrimmedSurface(Cyl.Value(),0.,2.*PI,0.,
+    TheCyl = new Geom_RectangularTrimmedSurface(Cyl.Value(),0.,2.*M_PI,0.,
                                        Height,Standard_True,Standard_True);
   }
 }
index dcedbf8be74610050c4b43a222e8dd7267ca31f6..52768c475058f94782a3b2280a003b669181dac6 100755 (executable)
@@ -120,7 +120,7 @@ void GProp_CelGProps::Perform(const gp_Lin& C,
 GProp_CelGProps::GProp_CelGProps (const gp_Circ& C, const gp_Pnt& CLocation) 
 {
   SetLocation(CLocation);
-  Perform(C,0.,2.*PI);
+  Perform(C,0.,2.*M_PI);
 }
 
 GProp_CelGProps::GProp_CelGProps (const gp_Circ& C, 
index 4fe7b908b0d12433a4c091b98bb51c3de1c612b4..70a7f9293b90177185aa1de7becdf1970dabff19 100755 (executable)
@@ -100,8 +100,8 @@ GccGeo_Circ2d2TanOn::
        {
          gp_Circ2d Circ(Sol->Circle());
          IntRes2d_Domain D1(ElCLib::Value(0.,Circ),   0.,Tol1,
-                            ElCLib::Value(2.*PI,Circ),2.*PI,Tol2);
-         D1.SetEquivalentParameters(0.,2.*PI);
+                            ElCLib::Value(2.*M_PI,Circ),2.*M_PI,Tol2);
+         D1.SetEquivalentParameters(0.,2.*M_PI);
          Intp.Perform(Circ,D1,Cu2,D2,Tol1,Tol2);
        }
        break;
@@ -109,8 +109,8 @@ GccGeo_Circ2d2TanOn::
        {
          gp_Elips2d Elips(Sol->Ellipse());
          IntRes2d_Domain D1(ElCLib::Value(0.,Elips),   0.,Tol1,
-                            ElCLib::Value(2.*PI,Elips),2.*PI,Tol2);
-         D1.SetEquivalentParameters(0.,2.*PI);
+                            ElCLib::Value(2.*M_PI,Elips),2.*M_PI,Tol2);
+         D1.SetEquivalentParameters(0.,2.*M_PI);
          Intp.Perform(Elips,D1,Cu2,D2,Tol1,Tol2);
        }
        break;
@@ -657,8 +657,8 @@ GccGeo_Circ2d2TanOn::
        {
          gp_Circ2d Circ(Sol->Circle());
          IntRes2d_Domain D1(ElCLib::Value(0.,Circ),   0.,Tol1,
-                            ElCLib::Value(2.*PI,Circ),2.*PI,Tol2);
-         D1.SetEquivalentParameters(0.,2.*PI);
+                            ElCLib::Value(2.*M_PI,Circ),2.*M_PI,Tol2);
+         D1.SetEquivalentParameters(0.,2.*M_PI);
          Intp.Perform(Circ,D1,C2,D2,Tol1,Tol2);
        }
        break;
@@ -673,8 +673,8 @@ GccGeo_Circ2d2TanOn::
        {
          gp_Elips2d Elips(Sol->Ellipse());
          IntRes2d_Domain D1(ElCLib::Value(0.,Elips),   0.,Tol1,
-                            ElCLib::Value(2.*PI,Elips),2.*PI,Tol2);
-         D1.SetEquivalentParameters(0.,2.*PI);
+                            ElCLib::Value(2.*M_PI,Elips),2.*M_PI,Tol2);
+         D1.SetEquivalentParameters(0.,2.*M_PI);
          Intp.Perform(Elips,D1,C2,D2,Tol1,Tol2);
        }
        break;
index 74eb5f691a34bcfc141f05958ea9018aed4e4257..f2e6b906420b4a785668a68ecacbc3c078cb4cc4 100755 (executable)
@@ -339,8 +339,8 @@ GccGeo_Circ2d2TanRad::
      for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
        gp_Circ2d Circ(C1.XAxis(),R1+cote1(jcote1));
        IntRes2d_Domain D1(ElCLib::Value(0.,Circ),   0.,Tol,
-                         ElCLib::Value(2.*PI,Circ),2.*PI,Tol);
-       D1.SetEquivalentParameters(0.,2.*PI);
+                         ElCLib::Value(2.*M_PI,Circ),2.*M_PI,Tol);
+       D1.SetEquivalentParameters(0.,2.*M_PI);
        for (Standard_Integer jcote2 = 1 ; jcote2 <= nbrcote2 ; jcote2++) {
         Handle(TheHParGenCurve) HCu2 = new TheHParGenCurve(Cu2);
         TheParGenCurve C2(HCu2,cote2(jcote2));
@@ -470,8 +470,8 @@ GccGeo_Circ2d2TanRad::
      }
      gp_Circ2d Circ(gp_Ax2d(Point2,gp_Dir2d(1.,0.)),Radius);
      IntRes2d_Domain D1(ElCLib::Value(0.,Circ),   0.,Tol,
-                       ElCLib::Value(PI+PI,Circ),PI+PI,Tol);
-     D1.SetEquivalentParameters(0.,PI+PI);
+                       ElCLib::Value(M_PI+M_PI,Circ),M_PI+M_PI,Tol);
+     D1.SetEquivalentParameters(0.,M_PI+M_PI);
      TheIntConicCurve Intp;
      for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
        Handle(TheHParGenCurve) HCu1 = new TheHParGenCurve(Cu1);
index fc3b7a77d1ca6ebf4be570b790255aac3d8232fd..a37b959828a8605b95d2b75fb6b9103908ee78a3 100755 (executable)
@@ -208,8 +208,8 @@ GccGeo_Circ2dTanOnRad::
        cote1(2) = -Radius;
      }
      IntRes2d_Domain D1(ElCLib::Value(0.,OnCirc),   0.,Tol,
-                       ElCLib::Value(2.*PI,OnCirc),2.*PI,Tol);
-     D1.SetEquivalentParameters(0.,2.*PI);
+                       ElCLib::Value(2.*M_PI,OnCirc),2.*M_PI,Tol);
+     D1.SetEquivalentParameters(0.,2.*M_PI);
      TheIntConicCurve Intp;
      for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
        Handle(TheHParGenCurve) HCu1 = new TheHParGenCurve(Cu1);
@@ -326,8 +326,8 @@ GccGeo_Circ2dTanOnRad::
      for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
        gp_Circ2d Circ(C1.XAxis(),R1 + cote1(jcote1));
        IntRes2d_Domain D1(ElCLib::Value(0.,Circ),   0.,Tol,
-                         ElCLib::Value(2.*PI,Circ),2.*PI,Tol);
-       D1.SetEquivalentParameters(0.,2.*PI);
+                         ElCLib::Value(2.*M_PI,Circ),2.*M_PI,Tol);
+       D1.SetEquivalentParameters(0.,2.*M_PI);
        firstparam = Max(TheTool::FirstParameter(OnCurv),thefirst);
        lastparam  = Min(TheTool::LastParameter(OnCurv),thelast);
        IntRes2d_Domain D2(TheTool::Value(OnCurv,firstparam),firstparam,Tol,
@@ -672,8 +672,8 @@ GccGeo_Circ2dTanOnRad::
 //     gp_Dir2d Dir(-y1dir,x1dir);
      gp_Circ2d Circ(gp_Ax2d(Point1,gp_Dir2d(1.,0.)),Radius);
      IntRes2d_Domain D1(ElCLib::Value(0.,Circ),   0.,Tol,
-                       ElCLib::Value(2.*PI,Circ),2*PI,Tol);
-     D1.SetEquivalentParameters(0.,2.*PI);
+                       ElCLib::Value(2.*M_PI,Circ),2*M_PI,Tol);
+     D1.SetEquivalentParameters(0.,2.*M_PI);
      firstparam = Max(TheTool::FirstParameter(OnCurv),thefirst);
      lastparam  = Min(TheTool::LastParameter(OnCurv),thelast);
      IntRes2d_Domain D2(TheTool::Value(OnCurv,firstparam),firstparam,Tol,
index 3d49d1f678d4c59bb2ef0453cb15ee357523bdfc..1ce82f9c5c8689d57e8b54d3f14e55004d5a427d 100755 (executable)
@@ -374,7 +374,7 @@ GccIter_Circ2d2TanOn::
    Ufirst(1) = Param1;
    Ufirst(2) = Param2;
    Ufirst(3) = Param3;
-   tol(1) = 2.e-15*PI;
+   tol(1) = 2.e-15*M_PI;
    tol(2) = TheCurveTool::EpsX(Cu2,Abs(Tolerance));
    tol(3) = 1.e-15;
    tol(4) = Tol/10.;
@@ -491,9 +491,9 @@ GccIter_Circ2d2TanOn::
    Ufirst(1) = Param1;
    Ufirst(2) = Param2;
    Ufirst(3) = Param3;
-   tol(1) = 2.e-15*PI;
+   tol(1) = 2.e-15*M_PI;
    tol(2) = TheCurveTool::EpsX(Cu2,Abs(Tolerance));
-   tol(3) = 2.e-15*PI;
+   tol(3) = 2.e-15*M_PI;
    tol(4) = Tol/10.;
    gp_Pnt2d point1 = ElCLib::Value(Param1,C1);
    gp_Pnt2d point2 = TheCurveTool::Value(Cu2,Param2);
@@ -607,7 +607,7 @@ GccIter_Circ2d2TanOn::
    Ufirst(3) = Param3;
    tol(1) = 1.e-15;
    tol(2) = TheCurveTool::EpsX(Cu2,Abs(Tolerance));
-   tol(3) = 2.e-15*PI;
+   tol(3) = 2.e-15*M_PI;
    tol(4) = Tol/10.;
    gp_Pnt2d point1 = ElCLib::Value(Param1,L1);
    gp_Pnt2d point2 = TheCurveTool::Value(Cu2,Param2);
@@ -720,7 +720,7 @@ GccIter_Circ2d2TanOn::
    Ufirst(3) = Param3;
    tol(1) = TheCurveTool::EpsX(Cu1,Abs(Tolerance));
    tol(2) = TheCurveTool::EpsX(Cu2,Abs(Tolerance));
-   tol(3) = 2.e-15*PI;
+   tol(3) = 2.e-15*M_PI;
    tol(4) = Tol/10.;
    gp_Pnt2d point1 = TheCurveTool::Value(Cu1,Param1);
    gp_Pnt2d point2 = TheCurveTool::Value(Cu2,Param2);
@@ -826,7 +826,7 @@ GccIter_Circ2d2TanOn::
    Ufirst(1) = Param1;
    Ufirst(2) = Param2;
    tol(1) = TheCurveTool::EpsX(Cu1,Abs(Tolerance));
-   tol(2) = 2.e-15*PI;
+   tol(2) = 2.e-15*M_PI;
    tol(3) = Tol/10.;
    gp_Pnt2d point1 = TheCurveTool::Value(Cu1,Param1);
    gp_Pnt2d point3 = ElCLib::Value(Param2,OnCirc);
@@ -1029,7 +1029,7 @@ GccIter_Circ2d2TanOn::
    Ufirst(1) = Param1;
    Ufirst(2) = Param2;
    Ufirst(3) = ParamOn;
-   tol(1) = 2.e-15*PI;
+   tol(1) = 2.e-15*M_PI;
    tol(2) = TheCurveTool::EpsX(Cu2,Abs(Tolerance));
    tol(3) = TheCurveTool::EpsX(OnCurv,Abs(Tolerance));
    tol(4) = Tol/10.;;
index 051ff7cb2c750881e073684b9218e85ac38e3a83..54c3fbce196d775952c55d8e57aba0236e38a1f4 100755 (executable)
@@ -191,13 +191,13 @@ GccIter_Circ2d3Tan::
    Umin(1) = 0.;
    Umin(2) = TheCurveTool::FirstParameter(Cu2);
    Umin(3) = TheCurveTool::FirstParameter(Cu3);
-   Umax(1) = 2*PI;
+   Umax(1) = 2*M_PI;
    Umax(2) = TheCurveTool::LastParameter(Cu2);
    Umax(3) = TheCurveTool::LastParameter(Cu3);
    Ufirst(1) = Param1;
    Ufirst(2) = Param2;
    Ufirst(3) = Param3;
-   tol(1) = 2.e-15*PI;
+   tol(1) = 2.e-15*M_PI;
    tol(2) = TheCurveTool::EpsX(Cu2,Abs(Tolerance));
    tol(3) = TheCurveTool::EpsX(Cu3,Abs(Tolerance));   
    math_FunctionSetRoot Root(Func,Ufirst,tol,Umin,Umax);
@@ -323,14 +323,14 @@ GccIter_Circ2d3Tan::
    Umin(1) = 0.;
    Umin(2) = 0.;
    Umin(3) = TheCurveTool::FirstParameter(Cu3);
-   Umax(1) = 2*PI;
-   Umax(2) = 2*PI;
+   Umax(1) = 2*M_PI;
+   Umax(2) = 2*M_PI;
    Umax(3) = TheCurveTool::LastParameter(Cu3);
    Ufirst(1) = Param1;
    Ufirst(2) = Param2;
    Ufirst(3) = Param3;
-   tol(1) = 2.e-15*PI;
-   tol(2) = 2.e-15*PI;
+   tol(1) = 2.e-15*M_PI;
+   tol(2) = 2.e-15*M_PI;
    tol(3) = TheCurveTool::EpsX(Cu3,Abs(Tolerance));   
    math_FunctionSetRoot Root(Func,Ufirst,tol,Umin,Umax);
    if (Root.IsDone()) {
@@ -721,13 +721,13 @@ GccIter_Circ2d3Tan::
    Umin(1) = 0.;
    Umin(2) = TheCurveTool::FirstParameter(Cu1);
    Umin(3) = TheCurveTool::FirstParameter(Cu2);
-   Umax(1) = 2*PI;
+   Umax(1) = 2*M_PI;
    Umax(2) = TheCurveTool::LastParameter(Cu1);
    Umax(3) = TheCurveTool::LastParameter(Cu2);
-   Ufirst(1) = PI;
+   Ufirst(1) = M_PI;
    Ufirst(2) = Param1;
    Ufirst(3) = Param2;
-   tol(1) = 2.e-15*PI;
+   tol(1) = 2.e-15*M_PI;
    tol(2) = TheCurveTool::EpsX(Cu1,Abs(Tolerance));
    tol(3) = TheCurveTool::EpsX(Cu2,Abs(Tolerance));
    math_FunctionSetRoot Root(Func,Ufirst,tol,Umin,Umax);
@@ -838,14 +838,14 @@ GccIter_Circ2d3Tan::
    Umin(1) = 0.;
    Umin(2) = 0.;
    Umin(3) = TheCurveTool::FirstParameter(Cu1);
-   Umax(1) = 2*PI;
-   Umax(2) = 2*PI;
+   Umax(1) = 2*M_PI;
+   Umax(2) = 2*M_PI;
    Umax(3) = TheCurveTool::LastParameter(Cu1);
-   Ufirst(1) = PI;
-   Ufirst(2) = PI;
+   Ufirst(1) = M_PI;
+   Ufirst(2) = M_PI;
    Ufirst(3) = Param1;
-   tol(1) = 2.e-15*PI;
-   tol(2) = 2.e-15*PI;
+   tol(1) = 2.e-15*M_PI;
+   tol(2) = 2.e-15*M_PI;
    tol(3) = TheCurveTool::EpsX(Cu1,Abs(Tolerance));
    math_FunctionSetRoot Root(Func,Ufirst,tol,Umin,Umax);
    if (Root.IsDone()) {
@@ -954,10 +954,10 @@ GccIter_Circ2d3Tan::
    Umin(1) = 0.;
    Umax(2) = RealLast();
    Umax(3) = TheCurveTool::LastParameter(Cu2);
-   Umax(1) = 2*PI;
+   Umax(1) = 2*M_PI;
    Ufirst(2) = Param1;
    Ufirst(3) = Param2;
-   Ufirst(1) = PI;
+   Ufirst(1) = M_PI;
    tol(1) = 2.e-15;
    tol(2) = 1.e-15;
    tol(3) = TheCurveTool::EpsX(Cu2,Abs(Tolerance));
@@ -1075,13 +1075,13 @@ GccIter_Circ2d3Tan::
    Umin(1) = 0.;
    Umin(2) = RealFirst();
    Umin(3) = TheCurveTool::FirstParameter(Cu3);
-   Umax(1) = 2*PI;
+   Umax(1) = 2*M_PI;
    Umax(2) = RealLast();
    Umax(3) = TheCurveTool::LastParameter(Cu3);
    Ufirst(1) = Param1;
    Ufirst(2) = Param2;
    Ufirst(3) = Param3;
-   tol(1) = 2.e-15*PI;
+   tol(1) = 2.e-15*M_PI;
    tol(2) = 1.e-15;
    tol(3) = TheCurveTool::EpsX(Cu3,Abs(Tolerance));
    math_FunctionSetRoot Root(Func,Ufirst,tol,Umin,Umax);
@@ -1206,14 +1206,14 @@ GccIter_Circ2d3Tan::
    Umin(1) = 0.;
    Umin(3) = TheCurveTool::FirstParameter(Cu2);
    Umin(2) = 0.;
-   Umax(1) = 2*PI;
+   Umax(1) = 2*M_PI;
    Umax(3) = TheCurveTool::LastParameter(Cu2);
-   Umax(2) = 2*PI;
+   Umax(2) = 2*M_PI;
    Ufirst(1) = Param1;
-   Ufirst(2) = PI;
+   Ufirst(2) = M_PI;
    Ufirst(3) = Param2;
-   tol(1) = 2.e-15*PI;
-   tol(2) = 2.e-15*PI;
+   tol(1) = 2.e-15*M_PI;
+   tol(2) = 2.e-15*M_PI;
    tol(3) = TheCurveTool::EpsX(Cu2,Abs(Tolerance));
    math_FunctionSetRoot Root(Func,Ufirst,tol,Umin,Umax);
    if (Root.IsDone()) {
index c6ae864852d5084179f832075da9f7b39a7557ff..1dcce061d938f7f4d60479e231f2353a1f3a3472 100755 (executable)
@@ -42,12 +42,12 @@ GccIter_Lin2dTanObl::
    Standard_Real B = Dir.Y();
    gp_Dir2d TheDirection(Dir);
    if (Abs(Angle) > Abs(TolAng)) {
-     if (Abs(Abs(Angle)-PI) <= Abs(TolAng)) {
+     if (Abs(Abs(Angle)-M_PI) <= Abs(TolAng)) {
        Paral2 = Standard_True;
        TheDirection = Dir.Reversed();
      }
-     else if (Abs(Angle-PI/2) <= Abs(TolAng)) { TheDirection=gp_Dir2d(-B,A); }
-     else if (Abs(Angle+PI/2) <= Abs(TolAng)) { TheDirection=gp_Dir2d(B,-A); }
+     else if (Abs(Angle-M_PI/2) <= Abs(TolAng)) { TheDirection=gp_Dir2d(-B,A); }
+     else if (Abs(Angle+M_PI/2) <= Abs(TolAng)) { TheDirection=gp_Dir2d(B,-A); }
      else {
        TheDirection=gp_Dir2d(A*Cos(Angle)-B*Sin(Angle),
                             A*Sin(Angle)+B*Cos(Angle));
index c14ed944034cdc34347a13c58612917c44fc1249..36d61f1c67d1a7505248a79d5d480703a0f838ed 100755 (executable)
@@ -82,7 +82,7 @@ Standard_Boolean Geom_Circle::IsPeriodic () const      { return Standard_True; }
 
 Standard_Real Geom_Circle::ReversedParameter( const Standard_Real U) const 
 {
-  return ( 2. * PI - U);
+  return ( 2. * M_PI - U);
 }
 
 //=======================================================================
@@ -106,7 +106,7 @@ Standard_Real Geom_Circle::FirstParameter () const     { return 0.0; }
 //purpose  : 
 //=======================================================================
 
-Standard_Real Geom_Circle::LastParameter () const      { return 2.0 * PI; }
+Standard_Real Geom_Circle::LastParameter () const      { return 2.0 * M_PI; }
 
 
 //=======================================================================
index 71959c2cfa6f8487b8d96d9d5e2e18992f022387..15c965355293a684285bc333613d7a9bd2357e9a 100755 (executable)
@@ -63,7 +63,7 @@ Geom_ConicalSurface::Geom_ConicalSurface ( const Ax3& A3 ,
        radius(R), semiAngle (Ang) 
 {
 
-  if (R < 0.0 || Abs(Ang) <= gp::Resolution() || Abs(Ang) >= PI/2.0 - gp::Resolution()) 
+  if (R < 0.0 || Abs(Ang) <= gp::Resolution() || Abs(Ang) >= M_PI/2.0 - gp::Resolution()) 
     Standard_ConstructionError::Raise();
   
   pos = A3;
@@ -89,7 +89,7 @@ Geom_ConicalSurface::Geom_ConicalSurface ( const gp_Cone& C )
 
 Standard_Real Geom_ConicalSurface::UReversedParameter( const Standard_Real U) const
 {
-  return ( 2.*PI - U);
+  return ( 2.*M_PI - U);
 }
 
 
@@ -205,7 +205,7 @@ void Geom_ConicalSurface::SetRadius (const Standard_Real R) {
 
 void Geom_ConicalSurface::SetSemiAngle (const Standard_Real Ang) {
 
-  if (Abs(Ang) <= gp::Resolution() || Abs(Ang) >= PI/2.0 - gp::Resolution()) {
+  if (Abs(Ang) <= gp::Resolution() || Abs(Ang) >= M_PI/2.0 - gp::Resolution()) {
     Standard_ConstructionError::Raise();
   }
   semiAngle = Ang;
@@ -235,7 +235,7 @@ Pnt Geom_ConicalSurface::Apex () const
 void Geom_ConicalSurface::Bounds (Standard_Real& U1, Standard_Real& U2, 
                                  Standard_Real& V1, Standard_Real& V2) const {
 
-   U1 = 0.0;  U2 = 2.0 * PI;  
+   U1 = 0.0;  U2 = 2.0 * M_PI;  
    V1 = -Precision::Infinite();  V2 = Precision::Infinite();
 }
 
index fde3e489b8e702d90ab48cd399ff059fbf745ab3..7bc531144585bda148250e4b56076d5dc3ae7765 100755 (executable)
@@ -84,7 +84,7 @@ Geom_CylindricalSurface::Geom_CylindricalSurface ( const Ax3& A3,
 
 Standard_Real Geom_CylindricalSurface::UReversedParameter( const Standard_Real U) const
 {
-  return (2.*PI - U);
+  return (2.*M_PI - U);
 }
 
 //=======================================================================
@@ -164,7 +164,7 @@ void Geom_CylindricalSurface::SetRadius (const Standard_Real R) {
 void Geom_CylindricalSurface::Bounds (Standard_Real& U1, Standard_Real& U2, 
                                      Standard_Real& V1, Standard_Real& V2) const {
 
-   U1 = 0.0;  U2 = 2.0 * PI;
+   U1 = 0.0;  U2 = 2.0 * M_PI;
    V1 = - Precision::Infinite();   V2 = Precision::Infinite();
 }
 
index 51f46ebbc25dc08ef056be061da7be6b8d260715..4d43d8f4e44952fd573218ab9057b5866522398d 100755 (executable)
@@ -95,7 +95,7 @@ Standard_Real Geom_Ellipse::FirstParameter () const   { return 0.0; }
 //purpose  : 
 //=======================================================================
 
-Standard_Real Geom_Ellipse::LastParameter () const    { return 2.0 * PI; }
+Standard_Real Geom_Ellipse::LastParameter () const    { return 2.0 * M_PI; }
 
 //=======================================================================
 //function : MajorRadius
@@ -168,7 +168,7 @@ gp_Elips Geom_Ellipse::Elips () const {
 
 Standard_Real Geom_Ellipse::ReversedParameter( const Standard_Real U) const 
 {
-  return ( 2. * PI - U);
+  return ( 2. * M_PI - U);
 }
 
 
index 81fee45c9a1771d1d1985a8e6c3fe68566cde067..a0df5944b056ef604cad23565c0f30316f9861d1 100755 (executable)
@@ -1497,7 +1497,7 @@ Handle(Geom_Surface) Geom_OffsetSurface::Surface() const
       Result = new Geom_CylindricalSurface( Axis, Radius);
     }
     else if ( Radius <= -Tol ){
-      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),PI);
+      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
       Result = new Geom_CylindricalSurface( Axis, Abs(Radius));
       Result->UReverse();
     }
@@ -1537,7 +1537,7 @@ Handle(Geom_Surface) Geom_OffsetSurface::Surface() const
       Result = new Geom_SphericalSurface(Axis, Radius);
     }
     else if ( Radius <= -Tol ) {
-      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),PI);
+      Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
       Axis.ZReverse();
       Result = new Geom_SphericalSurface(Axis, -Radius);
       Result->UReverse();
index 4863e78cfd4be4ba26c02ef13867291527568b82..3993730787feac526c2dc30666f27e2ff8914653 100755 (executable)
@@ -80,7 +80,7 @@ Geom_SphericalSurface::Geom_SphericalSurface (const gp_Sphere& S)
 
 Standard_Real Geom_SphericalSurface::UReversedParameter( const Standard_Real U) const
 {
-  return (2.*PI - U);
+  return (2.*M_PI - U);
 }
 
 //=======================================================================
@@ -100,7 +100,7 @@ Standard_Real Geom_SphericalSurface::VReversedParameter( const Standard_Real V)
 //=======================================================================
 
 Standard_Real Geom_SphericalSurface::Area () const 
-{return 4.0 * PI * radius * radius;}
+{return 4.0 * M_PI * radius * radius;}
 
 //=======================================================================
 //function : Radius
@@ -175,9 +175,9 @@ void Geom_SphericalSurface::Bounds (Standard_Real& U1, Standard_Real& U2,
                                    Standard_Real& V1, Standard_Real& V2) const {
 
   U1 =       0.0;  
-  U2 =  PI * 2.0; 
-  V1 = -PI / 2.0;
-  V2 =  PI / 2.0;
+  U2 =  M_PI * 2.0; 
+  V1 = -M_PI / 2.0;
+  V2 =  M_PI / 2.0;
 }
 
 
@@ -308,7 +308,7 @@ gp_Sphere Geom_SphericalSurface::Sphere () const {
 Handle(Curve) Geom_SphericalSurface::UIso (const Standard_Real U) const 
 {
   Handle(Geom_Circle) GC = new Geom_Circle(ElSLib::SphereUIso(pos,radius,U));
-  Handle(Geom_TrimmedCurve) iso = new Geom_TrimmedCurve(GC,-PI/2.,PI/2);
+  Handle(Geom_TrimmedCurve) iso = new Geom_TrimmedCurve(GC,-M_PI/2.,M_PI/2);
   return iso;
 }
 
@@ -333,7 +333,7 @@ Handle(Curve) Geom_SphericalSurface::VIso (const Standard_Real V) const
 
 Standard_Real Geom_SphericalSurface::Volume () const {
 
-   return (4.0 * PI * radius * radius * radius)/3.0;
+   return (4.0 * M_PI * radius * radius * radius)/3.0;
 }
 
 
index 41cc1fc03b0fc97aefebe6cacedc894872bff50b..72410b1f23a875005a6f117a9e82b9c6bc24ec4c 100755 (executable)
@@ -155,7 +155,7 @@ void Geom_SurfaceOfRevolution::UReverse () {
 
 Standard_Real Geom_SurfaceOfRevolution::UReversedParameter (const Standard_Real U) const {
 
-  return ( 2.*PI - U);
+  return ( 2.*M_PI - U);
 }
 
 
@@ -322,7 +322,7 @@ void Geom_SurfaceOfRevolution::Bounds ( Standard_Real& U1,
                                        Standard_Real& V2 ) const {
 
   U1 = 0.0; 
-  U2 = 2.0 * PI; 
+  U2 = 2.0 * M_PI; 
   V1 = basisCurve->FirstParameter();  
   V2 = basisCurve->LastParameter();
 }
index 362e43cb1f48341bcf468363396fd18d11b5a750..6b4c0011f96e56c3617b52f9a2d44e2d76ab8bbf 100755 (executable)
@@ -112,7 +112,7 @@ Standard_Real Geom_ToroidalSurface::MinorRadius () const {
 
 Standard_Real Geom_ToroidalSurface::UReversedParameter( const Standard_Real U) const {
 
-  return (2.*PI - U);
+  return (2.*M_PI - U);
 }
 
 
@@ -123,7 +123,7 @@ Standard_Real Geom_ToroidalSurface::UReversedParameter( const Standard_Real U) c
 
 Standard_Real Geom_ToroidalSurface::VReversedParameter( const Standard_Real V) const {
 
-  return (2.*PI - V);
+  return (2.*M_PI - V);
 }
 
 
@@ -215,7 +215,7 @@ void Geom_ToroidalSurface::SetTorus (const gp_Torus& T) {
 //=======================================================================
 
 Standard_Real Geom_ToroidalSurface::Area () const {
-  return 4.0 * PI * PI * minorRadius * majorRadius;
+  return 4.0 * M_PI * M_PI * minorRadius * majorRadius;
 }
 
 
@@ -231,8 +231,8 @@ void Geom_ToroidalSurface::Bounds (Standard_Real& U1,
  
   U1 = 0.0;  
   V1 = 0.0;  
-  U2 = 2*PI;  
-  V2 = 2*PI;
+  U2 = 2*M_PI;  
+  V2 = 2*M_PI;
 }
 
 
@@ -366,7 +366,7 @@ Handle(Geom_Curve) Geom_ToroidalSurface::VIso (const Standard_Real V) const
 
 Standard_Real Geom_ToroidalSurface::Volume () const {
 
-  return (PI * minorRadius * minorRadius) * (2.0 * PI * majorRadius);
+  return (M_PI * minorRadius * minorRadius) * (2.0 * M_PI * majorRadius);
 }
 
 
index 263aeddfc3a01b6161e9859964d59792c63a6d6c..b946217fe44df5d8760e9f4c5a6fdfa6e1cc7714 100755 (executable)
@@ -130,7 +130,7 @@ gp_Circ2d Geom2d_Circle::Circ2d () const
 
 Standard_Real Geom2d_Circle::ReversedParameter( const Standard_Real U) const 
 {
-  return (2. * PI - U);
+  return (2. * M_PI - U);
 }
 
 //=======================================================================
@@ -160,7 +160,7 @@ Standard_Real Geom2d_Circle::FirstParameter () const
 
 Standard_Real Geom2d_Circle::LastParameter () const      
 {
-  return 2.0 * PI; 
+  return 2.0 * M_PI; 
 }
 
 //=======================================================================
index 6c501f1c79e3596277daa8c7ad7ce09e80e0a600..af23aede9d8a62d8a2bb5650db545c1e006801e2 100755 (executable)
@@ -149,7 +149,7 @@ gp_Elips2d Geom2d_Ellipse::Elips2d () const
 
 Standard_Real Geom2d_Ellipse::ReversedParameter( const Standard_Real U) const 
 {
-  return (2. * PI - U);
+  return (2. * M_PI - U);
 }
 
 //=======================================================================
@@ -279,7 +279,7 @@ Standard_Real Geom2d_Ellipse::FirstParameter () const
 
 Standard_Real Geom2d_Ellipse::LastParameter () const     
 {
-  return 2.0 * PI; 
+  return 2.0 * M_PI; 
 }
 
 //=======================================================================
index c95302ff333b297a2c8fb59eac7d1c9570edf490..d6ffca822990c8e5393c43509cddbb592b130bd3 100755 (executable)
@@ -685,7 +685,7 @@ Standard_Real Geom2dAdaptor_Curve::Resolution(const Standard_Real Ruv) const {
     if ( R > Ruv/2.)
       return 2*ASin(Ruv/(2*R));
     else
-      return 2*PI;
+      return 2*M_PI;
   }
   case GeomAbs_Ellipse: {
     return Ruv / (*((Handle(Geom2d_Ellipse)*)&myCurve))->MajorRadius();
index 7a044593cdc595205cb845349fe01eaef7eeb58b..b1c601d70039bbbf7a7e9203c00a1f12fd6c27bc 100755 (executable)
@@ -75,4 +75,4 @@ inline void Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C,
   if ( UFirst > ULast) Standard_ConstructionError::Raise();
   
   load(C,UFirst,ULast);
-}
\ No newline at end of file
+}
index 3c65a4998c6d29352132438ae814754ae04efeb7..902f1018c351bda80af9faa5e0c668d293da4f5b 100755 (executable)
@@ -673,7 +673,7 @@ Standard_Real GeomAdaptor_Curve::Resolution(const Standard_Real R3D) const
     if ( R > R3D/2. )
       return 2*ASin(R3D/(2*R));
     else
-      return 2*PI;
+      return 2*M_PI;
   }
   case GeomAbs_Ellipse: {
     return R3D / (*((Handle(Geom_Ellipse)*)&myCurve))->MajorRadius();
index 595637dc312a19828f0f071bdb94aca03ec0c493..22815fb4ea865c5842f0a8cf1fa3b51aa04a4af2 100755 (executable)
@@ -858,7 +858,7 @@ Standard_Real GeomAdaptor_Surface::UResolution(const Standard_Real R3d) const
   if ( Res <= 1.)  
     return 2.*ASin(Res);
   
-  return 2.*PI;
+  return 2.*M_PI;
 }
 
 //=======================================================================
@@ -925,7 +925,7 @@ Standard_Real GeomAdaptor_Surface::VResolution(const Standard_Real R3d) const
   if ( Res <= 1.) 
     return 2.*ASin(Res);
 
-  return 2.*PI;
+  return 2.*M_PI;
 }
 
 //=======================================================================
index 1c3755efedfd54c6bf7bd8ad677bd0353443498f..836b4b164f6d20ced530098b3cde25d250c1f93f 100755 (executable)
@@ -393,7 +393,7 @@ Handle(Geom_BSplineCurve)  GeomConvert::CurveToBSplineCurve
       else if ( Parameterisation == Convert_QuasiAngular) {
        Convert_EllipseToBSplineCurve Convert (E2d,
                                               0.0e0,
-                                              2.0e0 * PI,
+                                              2.0e0 * M_PI,
                                               Parameterisation);
 
        TheCurve = BSplineCurveBuilder (TheConic, Convert);
@@ -417,7 +417,7 @@ Handle(Geom_BSplineCurve)  GeomConvert::CurveToBSplineCurve
       else if ( Parameterisation == Convert_QuasiAngular) {
        Convert_CircleToBSplineCurve Convert (C2d,
                                              0.0e0,
-                                             2.0e0 * PI,
+                                             2.0e0 * M_PI,
                                              Parameterisation);
        
        TheCurve = BSplineCurveBuilder (TheConic, Convert);                                  
index 1b91a5c30437fbd3cb5e703211447f5a8559eb6b..ee59edc70d39b24c889bb8c8853d23dd67f451e9 100755 (executable)
@@ -525,14 +525,14 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
       if (Strim->IsUPeriodic()) {
        NbUKnots = 4;
        nbUSpans = 3;
-       AlfaU    = PI / 3.;
+       AlfaU    = M_PI / 3.;
        NbUPoles = 6;
        periodic = Standard_True;
       }
       else {
        // Nombre de spans : ouverture maximale = 150 degres ( = PI / 1.2 rds)
        nbUSpans = 
-         (Standard_Integer)IntegerPart( 1.2 * (ULast - UFirst) / PI) + 1;
+         (Standard_Integer)IntegerPart( 1.2 * (ULast - UFirst) / M_PI) + 1;
        AlfaU = (ULast - UFirst) / ( nbUSpans * 2);
        NbUPoles = 2 * nbUSpans + 1;
        NbUKnots = nbUSpans + 1;
@@ -756,7 +756,7 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
       Standard_Real AlfaU;
       NbUKnots = 4;
       nbUSpans = 3;
-      AlfaU    = PI / 3.;
+      AlfaU    = M_PI / 3.;
       NbUPoles = 6;
 
       // Compute Knots and Mults
index 44cf0e0712f67732a7db5e0fa834956a8a6fdd02..25d4a6db60dd551c76c3bc481aa5528653337953 100755 (executable)
@@ -203,7 +203,7 @@ void GeomFill::GetShape (const Standard_Real MaxAng,
   default:
     {
       Standard_Integer NbSpan =
-       (Standard_Integer)(Ceiling(3.*Abs(MaxAng)/2./PI));
+       (Standard_Integer)(Ceiling(3.*Abs(MaxAng)/2./M_PI));
       NbPoles = 2*NbSpan+1;
       NbKnots = NbSpan+1;
       Degree = 2;
@@ -380,7 +380,7 @@ void GeomFill::GetCircle( const Convert_ParameterisationType  TConv,
   // Recadrage sur ]-pi/2, 3pi/2]
   if (Sina <0.) {
     if (Cosa > 0.) Angle = -Angle;
-    else           Angle =  2.*PI - Angle;
+    else           Angle =  2.*M_PI - Angle;
   }
 
   switch (TConv) {
@@ -466,7 +466,7 @@ Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType  TConv,
   // Recadrage sur ]-pi/2, 3pi/2]
   if (Sina <0.) {
     if (Cosa > 0.) Angle = -Angle;
-    else           Angle =  2.*PI - Angle;
+    else           Angle =  2.*M_PI - Angle;
   }
 
   if (Abs(Sina)>Abs(Cosa)) {
@@ -606,7 +606,7 @@ Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType  TConv,
   // Recadrage sur ]-pi/2, 3pi/2]
   if (Sina <0.) {
     if (Cosa > 0.) Angle = -Angle;
-    else           Angle =  2.*PI - Angle;
+    else           Angle =  2.*M_PI - Angle;
   }
 
   if (Abs(Sina)>Abs(Cosa)) {
index 7eeadeeb429151b1a8cd6d4cbcbb170c86c70885..e90ce2204914891b7ccb95f52211eb210480403d 100755 (executable)
@@ -112,7 +112,7 @@ GeomFill_CircularBlendFunc(const Handle(Adaptor3d_HCurve)& Path,
 
   // Type de convertion ?
   if (Polynomial) myTConv=Convert_Polynomial;
-  else if(maxang > 0.65*PI) 
+  else if(maxang > 0.65*M_PI) 
     myTConv=Convert_QuasiAngular; //car c'est Continue
   else   myTConv = Convert_TgtThetaOver2; 
                   //car c'est le plus performant 
index ad83294d25e8db38cc3b2cf2258f4745569a21b3..2b54af83bb8ecd9eea1b0cb35aba3e7319014ff8 100755 (executable)
@@ -155,7 +155,7 @@ static void sortbounds(const Standard_Integer     nb,
     else bound[next]->Bounds(ln,fn);
     bound[next]->D1(fn,pbid,tgn);
     if(rev[next]) tgn.Reverse();
-    Standard_Real ang = PI - tgi.Angle(tgn);
+    Standard_Real ang = M_PI - tgi.Angle(tgn);
     stat[next].TgtAng(ang);
     if(bound[i]->HasNormals() && bound[next]->HasNormals()){
       stat[next].Constraint();
@@ -183,7 +183,7 @@ static void coonscnd(const Standard_Integer     nb,
       Standard_Real tolang = Min(bound[ip]->Tolang(),bound[i]->Tolang());
       Standard_Real an = stat[i].NorAng();
       Standard_Boolean twist = Standard_False;
-      if(an >= 0.5*PI) { twist = Standard_True; an = PI-an; }
+      if(an >= 0.5*M_PI) { twist = Standard_True; an = M_PI-an; }
       if(an > tolang) stat[i].DoKill(0.);
       else{
        Standard_Real fact = 0.5*27./4;
@@ -1312,7 +1312,7 @@ void GeomFill_ConstrainedFilling::CheckTgteField(const Standard_Integer I)
     dout << seg;
 #endif
     if(vnor.Magnitude() > 1.e-15 && vtg.Magnitude() > 1.e-15){
-      Standard_Real alpha = Abs(PI/2.-Abs(vnor.Angle(vtg)));
+      Standard_Real alpha = Abs(M_PI/2.-Abs(vnor.Angle(vtg)));
       if(Abs(alpha) > maxang) maxang = Abs(alpha);
     }
   }
@@ -1346,7 +1346,7 @@ void GeomFill_ConstrainedFilling::CheckApprox(const Standard_Integer I)
       vapp.SetXYZ(pbid.XYZ());
       vbound = bou->Norm(uu);
       if(vapp.Magnitude() > 1.e-15 && vbound.Magnitude() > 1.e-15){
-       Standard_Real alpha = Abs(PI/2.-Abs(vbound.Angle(vapp)));
+       Standard_Real alpha = Abs(M_PI/2.-Abs(vbound.Angle(vapp)));
        if(Abs(alpha) > maxang) maxang = Abs(alpha);
       }
 #ifdef DRAW
@@ -1365,7 +1365,7 @@ void GeomFill_ConstrainedFilling::CheckApprox(const Standard_Integer I)
   cout<<"Controle approx/contrainte sur bord "<<I<<" : "<<endl;
   cout<<"Distance max : "<<maxdist<<endl;
   if (donor) {
-    maxang = maxang*180./PI;
+    maxang = maxang*180./M_PI;
     cout<<"Angle max    : "<<maxang<<" deg"<<endl;
   }
 }
@@ -1424,7 +1424,7 @@ void GeomFill_ConstrainedFilling::CheckResult(const Standard_Integer I)
       vres[k] = V1.Crossed(V2);
       if(vres[k].Magnitude() > 1.e-15 && vbound[k].Magnitude() > 1.e-15){
        Standard_Real alpha = Abs(vres[k].Angle(vbound[k]));
-       alpha = Min(alpha,Abs(PI-alpha));
+       alpha = Min(alpha,Abs(M_PI-alpha));
        if(alpha > maxang) maxang = alpha;
        ang[k] = alpha;
        hasang[k] = 1;
@@ -1439,7 +1439,7 @@ void GeomFill_ConstrainedFilling::CheckResult(const Standard_Integer I)
   cout<<"Controle resultat/contrainte sur bord "<<I<<" : "<<endl;
   cout<<"Distance max : "<<maxdist<<endl;
   if (donor) {
-    Standard_Real angdeg = maxang*180./PI;
+    Standard_Real angdeg = maxang*180./M_PI;
     cout<<"Angle max    : "<<angdeg<<" deg"<<endl;
   }
 #ifdef DRAW
index b20ba17d829af54c7638029a1dc6a092c1c4ceaf..3636945c939d7a5441121455ebdcf56288490d73 100755 (executable)
@@ -445,7 +445,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const
       currParam = Last;
 
     frenet->D0(currParam, Tangent, Normal, BN);
-    if (prevTangent.Angle(Tangent) < PI/3 || i == 1) {
+    if (prevTangent.Angle(Tangent) < M_PI/3 || i == 1) {
       parameters.Append(currParam);
       //OCC78
       SeqPoles.Append(Param);      
@@ -556,7 +556,7 @@ Standard_Real GeomFill_CorrectedFrenet::CalcAngleAT(const gp_Vec& Tangent, const
   else
     Normal_rot = Normal;
   Standard_Real angleAT = Normal_rot.Angle(prevNormal);
-  if(angleAT > Precision::Angular() && PI - angleAT > Precision::Angular())
+  if(angleAT > Precision::Angular() && M_PI - angleAT > Precision::Angular())
     if (Normal_rot.Crossed(prevNormal).IsOpposite(prevTangent, Precision::Angular())) 
       angleAT = -angleAT;
   return angleAT;
@@ -566,13 +566,13 @@ Standard_Real GeomFill_CorrectedFrenet::CalcAngleAT(const gp_Vec& Tangent, const
 // Purpose : This family of functions produce conversion of angle utility
 //===============================================================
 static Standard_Real corrPI_2PI(Standard_Real Ang){
-  return Ang = (Ang >= 0.0? Ang: 2*PI+Ang);
+  return Ang = (Ang >= 0.0? Ang: 2*M_PI+Ang);
 };
 static Standard_Real corr2PI_PI(Standard_Real Ang){
-  return Ang = (Ang < PI? Ang: Ang-2*PI);
+  return Ang = (Ang < M_PI? Ang: Ang-2*M_PI);
 };
 static Standard_Real diffAng(Standard_Real A, Standard_Real Ao){
-  Standard_Real dA = (A-Ao) - Floor((A-Ao)/2.0/PI)*2.0*PI;
+  Standard_Real dA = (A-Ao) - Floor((A-Ao)/2.0/M_PI)*2.0*M_PI;
   return dA = dA >= 0? corr2PI_PI(dA): -corr2PI_PI(-dA);
 };
 //===============================================================
@@ -603,7 +603,7 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
   Standard_Real DAng = CalcAngleAT(Tangent, Normal, HArrTangent->Value(iC), HArrNormal->Value(iC));
   Standard_Real DA = diffAng(DAng,dAng);
   // The correction (there is core of OCC78 bug)
-  if(Abs(DA) > PI/2.0){
+  if(Abs(DA) > M_PI/2.0){
     AngP = AngPo + DAng;
   };
   return AngP;
index 361e69ef382500d7567f8993539511b239f219e4..f8bff6ad7522d6942d8a778cdd6d943ce7b92df1 100755 (executable)
@@ -47,7 +47,7 @@ static gp_Vec DDeriv(const gp_Vec& F, const gp_Vec& DF, const gp_Vec& D2F)
 //=======================================================================
  void GeomFill_DraftTrihedron::SetAngle(const Standard_Real Angle)
 {
-  myAngle = PI/2 + Angle;
+  myAngle = M_PI/2 + Angle;
   myCos = Cos(myAngle);
 }
 
@@ -229,7 +229,7 @@ Standard_Boolean GeomFill_DraftTrihedron::D2(const Standard_Real Param,
  Handle(GeomFill_TrihedronLaw) GeomFill_DraftTrihedron::Copy() const
 {
  Handle(GeomFill_DraftTrihedron) copy = 
-   new (GeomFill_DraftTrihedron) (B,myAngle-PI/2);
+   new (GeomFill_DraftTrihedron) (B,myAngle-M_PI/2);
  copy->SetCurve(myCurve);
  return copy;
 } 
index 43912f07eb6013ea6e1d59be63b8e4187ea97f2f..eb8dfb57eb3407f85a8d33719303680b513645c2 100755 (executable)
@@ -631,8 +631,8 @@ Standard_Boolean GeomFill_Frenet::DoSingular(const Standard_Real U,
 
   D0(U + h, T, N, BN);
 
-  if(Tangent.Angle(T) > PI/2) TFlag = -1;
-  if(BiNormal.Angle(BN) > PI/2) BNFlag = -1;  
+  if(Tangent.Angle(T) > M_PI/2) TFlag = -1;
+  if(BiNormal.Angle(BN) > M_PI/2) BNFlag = -1;  
 
   return Standard_True;
 }
index fc894683bc6b5be2cf4c3e442d7a52b36c58df74..3b0568b56e14b9607f0ec82ed0154ce257f155b2 100755 (executable)
@@ -558,7 +558,7 @@ void GeomFill_GuideTrihedronPlan::SetInterval(const Standard_Real First,
       (myGuide->GetType() == GeomAbs_Line)) {
     Standard_Real Angle;
     Angle = myCurve->Line().Angle(myGuide->Line());
-    if ((Angle<1.e-12) || ((2*PI-Angle)<1.e-12) )
+    if ((Angle<1.e-12) || ((2*M_PI-Angle)<1.e-12) )
       return Standard_True;
   }
 
index cb50d9d6ad0ec81e2897b8224d11c2a3c1d85725..607b38ed5fa3cf930c96d72155b48fd32601e69f 100755 (executable)
@@ -264,8 +264,8 @@ static void InGoodPeriod(const Standard_Real Prec,
   Inf(1) =  myGuide->FirstParameter() - Delta/10;
   Sup(1) =  myGuide->LastParameter() + Delta/10; 
 
-  Inf(2) = -PI;
-  Sup(2) = 3*PI;
+  Inf(2) = -M_PI;
+  Sup(2) = 3*M_PI;
  
   Delta =  Ul - Uf;
   Inf(3) = Uf - Delta/10;
@@ -371,11 +371,11 @@ static void InGoodPeriod(const Standard_Real Prec,
       // d'angle le plus proche de P
       PInt = Int.Point(1);
       a1 = PInt.U();
-      InGoodPeriod (CurAngle, 2*PI, a1);
+      InGoodPeriod (CurAngle, 2*M_PI, a1);
       Standard_Real Dmin = Abs(a1-CurAngle);
       for (Standard_Integer jj=2;jj<=Int.NbPoints();jj++) {
        a2 = Int.Point(jj).U();
-       InGoodPeriod (CurAngle, 2*PI, a2);
+       InGoodPeriod (CurAngle, 2*M_PI, a2);
        if (Abs(a2-CurAngle) < Dmin) {
          PInt = Int.Point(jj);
          Dmin = Abs(a2-CurAngle);
@@ -406,12 +406,12 @@ static void InGoodPeriod(const Standard_Real Prec,
     Angle = PInt.U();
     if (ii > 1) {
       Diff = Angle - OldAngle;
-       if (Abs(Diff) > PI) {
-         InGoodPeriod (OldAngle, 2*PI, Angle);
+       if (Abs(Diff) > M_PI) {
+         InGoodPeriod (OldAngle, 2*M_PI, Angle);
          Diff = Angle - OldAngle;
        }
 #if DEB
-      if (Abs(Diff) > PI/4) {
+      if (Abs(Diff) > M_PI/4) {
        cout << "Diff d'angle trop grand !!" << endl;
       } 
 #endif
@@ -1419,7 +1419,7 @@ void GeomFill_LocationGuide::InitX(const Standard_Real Param) const
     X(1) = ElCLib::InPeriod(X(1), myGuide->FirstParameter(), 
                                  myGuide->LastParameter());
   }
-  X(2) = ElCLib::InPeriod(X(2), 0, 2*PI);
+  X(2) = ElCLib::InPeriod(X(2), 0, 2*M_PI);
   if (mySec->IsUPeriodic()) {
     X(3) = ElCLib::InPeriod(X(3), Uf, Ul);
   } 
index f4040aba2050dcd89c5587ea826dbba38db48d5d..ff622968eb8b43812edfe6cec5c191205a9b743f 100755 (executable)
@@ -446,7 +446,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path,
 // Nouvelle methode
   myAdpPath = new (GeomAdaptor_HCurve) (Path);
   Handle(Geom_Circle) C = new (Geom_Circle) (gp::XOY(), Radius);
-  C->Rotate(gp::OZ(),PI/2.);
+  C->Rotate(gp::OZ(),M_PI/2.);
   
   mySec = new (GeomFill_UniformSection) (C, Path->FirstParameter(), 
                                            Path->LastParameter());
@@ -964,14 +964,14 @@ Standard_Boolean GeomFill_Pipe::KPartT4()
        Axis.YReverse();
 
      // rotate the surface to set the iso U = 0 not in the result.
-     Axis.Rotate(gp_Ax1(P0,ZRef),-PI/2.);
+     Axis.Rotate(gp_Ax1(P0,ZRef),-M_PI/2.);
       
      mySurface = new Geom_CylindricalSurface( Axis, myRadius);
      Standard_Real Alpha = V1.AngleWithRef(V2,ZRef);
      mySurface = 
        new Geom_RectangularTrimmedSurface(mySurface,
-                                         PI/2. , 
-                                         PI/2. + Alpha,
+                                         M_PI/2. , 
+                                         M_PI/2. + Alpha,
                                          myAdpPath->FirstParameter(),
                                          myAdpPath->LastParameter());
      Ok = Standard_True; //C'est bien un cylindre
@@ -1030,7 +1030,7 @@ Standard_Boolean GeomFill_Pipe::KPartT4()
    if (deltaV < 0.) {
      T.VReverse();
      VV1 = -VV1;
-     VV2 = 2*PI + VV1 - deltaV;
+     VV2 = 2*M_PI + VV1 - deltaV;
    }
    mySurface = new Geom_RectangularTrimmedSurface
      (new Geom_ToroidalSurface(T),
index e50201f73265f58acdbb26bd89599aec014b989a..dd31696679577da883dadf41264b18d411c41ad0 100755 (executable)
@@ -145,7 +145,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
   beta5 = beta3*beta2;
   beta6 = beta3*beta3; 
  
-  if  ((PI/2 - beta)> NullAngle) {
+  if  ((M_PI/2 - beta)> NullAngle) {
     if (Abs(beta) < NullAngle) {
      Standard_Real cf = 2.0/(3*5*7);
      b = - (0.2+cf*beta2) / (1+ 0.2*beta2);
@@ -273,7 +273,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
   else {
     b = ((Standard_Real) -1)/beta2;
     bpr = (2*betaprim) / beta3;  
-    if  ((PI/2 - beta)> NullAngle) {
+    if  ((M_PI/2 - beta)> NullAngle) {
       tan_b = Tan(beta);
       dtan_b = betaprim * (1 + tan_b*tan_b);
       b2 = tan_b - beta;
@@ -473,7 +473,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
     b = ((Standard_Real) -1)/beta2;
     bpr = (2*betaprim) / beta3;
     bsc = (2*betasecn - 6*betaprim*(betaprim/beta)) / beta3; 
-    if  ((PI/2 - beta)> NullAngle) {
+    if  ((M_PI/2 - beta)> NullAngle) {
       tan_b = Tan(beta);
       dtan_b = betaprim * (1 + tan_b*tan_b);
       d2tan_b = betasecn * (1 + tan_b*tan_b)
index f55a8c2af291b3cc28c06295fa037a6277abdf15..af5963b8ecbb8f220283fc66a67dc334a245bffd 100755 (executable)
@@ -72,7 +72,7 @@ static Standard_Real Penalite(const Standard_Real angle,
     penal = dist + 2;
 
   if (angle > 1.e-3) {
-    penal += 1./angle -2./PI;
+    penal += 1./angle -2./M_PI;
   }
   else {
     penal += 1.e3;
@@ -86,7 +86,7 @@ static Standard_Real EvalAngle(const gp_Vec& V1,
 {
  Standard_Real angle;
  angle = V1.Angle(V2);
- if (angle > PI/2) angle = PI - angle;
+ if (angle > M_PI/2) angle = M_PI - angle;
  return angle;
 }
 
@@ -393,7 +393,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
     {
       Extrema_ExtPC Projector(myPoint, Path->Curve(), Precision::Confusion());
       DistMini( Projector, Path->Curve(), Dist, PathParam );
-      AngleMax = PI/2;
+      AngleMax = M_PI/2;
     }
   else
     {
@@ -416,7 +416,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
        }
       }
       AngleMax = EvalAngle(VRef, dp1);
-      if (isplan) AngleMax = PI/2 - AngleMax;
+      if (isplan) AngleMax = M_PI/2 - AngleMax;
       
       Standard_Boolean Trouve = Standard_False; 
       Standard_Integer ii;
@@ -498,7 +498,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
                  }
                }
                AngleMax = EvalAngle(VRef, dp1);
-               AngleMax = PI/2 - AngleMax;
+               AngleMax = M_PI/2 - AngleMax;
              }
          }
     
@@ -513,7 +513,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
           Tangente(Path->Curve(), Path->LastParameter(), P, dp1);
           V1.SetXYZ(TheAxe.Location().XYZ()-P.XYZ());
           if  (Abs(V1.Dot(VRef)) <= DistPlan ) { // On prend l'autre extremite
-          alpha =  PI/2 - EvalAngle(VRef, dp1);
+          alpha =  M_PI/2 - EvalAngle(VRef, dp1);
           distaux =  PonPath.Distance(PonSec);
           if (distaux > Tol) {
           myExt.Perform(P);  
@@ -545,7 +545,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
           w = Intersector.Point(ii).W();
           //(1.3) test d'angle
           Tangente( Path->Curve(), w, P, V);
-          alpha = PI/2 - EvalAngle(V, VRef);
+          alpha = M_PI/2 - EvalAngle(V, VRef);
           //(1.4) Test de distance Point-Courbe
           myExt.Perform(P);  
           if ( myExt.IsDone() ) {
@@ -683,7 +683,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param,
     {
       gp_Pnt PonPath = Path->Value( PathParam );
       Dist = PonPath.Distance(myPoint);
-      AngleMax = PI/2;
+      AngleMax = M_PI/2;
     }
   else
     {
@@ -706,7 +706,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param,
        }
       }
       AngleMax = EvalAngle(VRef, dp1);
-      if (isplan) AngleMax = PI/2 - AngleMax;
+      if (isplan) AngleMax = M_PI/2 - AngleMax;
     }
 
   done = Standard_True;
index 4d357c7afa0e999b24828f4e7d7bc594233f030e..4cc94cb44350ae9bd75939090ba7aee7f1e7a5ce 100755 (executable)
@@ -596,8 +596,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
                IsOpposite(axe.Direction(), 0.1) ) {
              Standard_Real f, l;
              // L'orientation parametrique est inversee
-             l = 2*PI - UFirst;
-             f = 2*PI - ULast;
+             l = 2*M_PI - UFirst;
+             f = 2*M_PI - ULast;
              UFirst = f;
              ULast  = l;
              isUReversed = Standard_True;
@@ -665,7 +665,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
      gp_Vec  L(P1, P2), Dir(Centre1,Centre2);
 
      Angle = L.Angle(Dir);
-     if ((Angle > 0.01) && (Angle < PI/2-0.01)) {
+     if ((Angle > 0.01) && (Angle < M_PI/2-0.01)) {
        if (R2<R1) Angle = -Angle;
        SError = error;
        gp_Ax3 Axis(Centre0, Dir, N);
@@ -686,8 +686,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
        if (isUReversed ) {
         Standard_Real f, l;
         // L'orientation parametrique est inversee
-        l = 2*PI - UFirst;
-        f = 2*PI - ULast;
+        l = 2*M_PI - UFirst;
+        f = 2*M_PI - ULast;
         UFirst = f;
         ULast  = l;
        } 
@@ -703,7 +703,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
     if (mySec->IsConstant(error)) {
       // La trajectoire
       gp_Pnt Centre;
-      isVPeriodic = (Abs(Last-First -2*PI) < 1.e-15);
+      isVPeriodic = (Abs(Last-First -2*M_PI) < 1.e-15);
       Standard_Real RotRadius;
       gp_Vec DP, DS, DN;
       myLoc->D0(0.1, M, DS);
@@ -784,8 +784,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
            if (C.Position().Direction().
                IsOpposite(AxisOfSphere.YDirection(), 0.1) ) {
              // L'orientation parametrique est inversee
-             l = 2*PI - UFirst;
-             f = 2*PI - ULast;
+             l = 2*M_PI - UFirst;
+             f = 2*M_PI - ULast;
              isUReversed = Standard_True;
            }
            // On calcul le "glissement" parametrique.
@@ -795,7 +795,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
            f -= rot;
            l  -= rot;
 
-           if ( (f >= -PI/2) && (l <= PI/2)) {
+           if ( (f >= -M_PI/2) && (l <= M_PI/2)) {
              Ok = Standard_True;
              myExchUV = Standard_True;
              UFirst = f;
@@ -823,8 +823,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
                IsOpposite(axeiso.Direction(), 0.1) ) {
              Standard_Real f, l;
              // L'orientation parametrique est inversee
-             l = 2*PI - UFirst;
-             f = 2*PI - ULast;
+             l = 2*M_PI - UFirst;
+             f = 2*M_PI - ULast;
              UFirst = f;
              ULast  = l;
              isUReversed = Standard_True;
@@ -887,13 +887,13 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
          else {
            // On evalue l'angle du cone
            Standard_Real Angle = Abs(Dir.Angle(L));
-           if (Angle > PI/2) Angle = PI -Angle;
+           if (Angle > M_PI/2) Angle = M_PI -Angle;
             if (reverse) Angle = -Angle;
            aux = DS.Dot(DL);
            if (aux < 0) {
              Angle = - Angle;
            }
-           if (Abs(Abs(Angle) - PI/2) > 0.01) {
+           if (Abs(Abs(Angle) - M_PI/2) > 0.01) {
              // (2.2.b) Cone
              // si les 2 droites ne sont pas orthogonales
              Standard_Real Radius = CentreOfSurf.Distance(L.Location());
index f745050873c048bb3fb2bfa7c793f3e40ea3c27a..25892e3ce75ce204586e89043ad822a113779692 100755 (executable)
@@ -319,11 +319,11 @@ void GeomFill_SweepSectionGenerator::Perform(const Standard_Boolean Polynomial)
     myFirstSect = GeomConvert::CurveToBSplineCurve(Circ);
     // le cercle est segmente car AppBlend_AppSurf ne gere
     // pas les courbes periodiques.
-    myFirstSect->Segment(0., 2.*PI);
+    myFirstSect->Segment(0., 2.*M_PI);
 */
     Handle(Geom_TrimmedCurve) Circ = 
       new Geom_TrimmedCurve(new Geom_Circle( CircleAxis, myRadius), 
-                           0., 2.*PI); 
+                           0., 2.*M_PI); 
     
     myFirstSect = GeomConvert::CurveToBSplineCurve(Circ,Convert_QuasiAngular);
   }
@@ -414,7 +414,7 @@ void GeomFill_SweepSectionGenerator::Knots(TColStd_Array1OfReal& TKnots) const
 {
 /*
   if (myType == 1) {
-    Standard_Real U = 2.*PI/3.;
+    Standard_Real U = 2.*M_PI/3.;
     for ( Standard_Integer i = 1; i <= 4; i++) 
       TKnots(i) = ( i-1) * U;
   }
index 4b0f978e32791d590ef5e6f83543d9716c4be69f..15fc28f71384edfd49738348af63c977b69c29d7 100755 (executable)
@@ -395,7 +395,7 @@ Standard_Real ProjectPointOnSurf::LowerDistance() const
     //
     aRealEpsilon=RealEpsilon();
     aNul=0.;
-    aPeriod=PI+PI;
+    aPeriod=M_PI+M_PI;
     //
     aNbParts=myLConstruct.NbParts();
     //
@@ -435,12 +435,12 @@ Standard_Real ProjectPointOnSurf::LowerDistance() const
          slineS2.Append(H1);  
        }
        //==============================================        
-      } //if (Abs(fprm) > RealEpsilon() || Abs(lprm-2.*PI) > RealEpsilon())
+      } //if (Abs(fprm) > RealEpsilon() || Abs(lprm-2.*M_PI) > RealEpsilon())
       //
       else {//  on regarde si on garde
        //
        if (aNbParts==1) {
-         if (Abs(fprm) < RealEpsilon() &&  Abs(lprm-2.*PI) < RealEpsilon()) {
+         if (Abs(fprm) < RealEpsilon() &&  Abs(lprm-2.*M_PI) < RealEpsilon()) {
            Handle(Geom_TrimmedCurve) aTC3D=new Geom_TrimmedCurve(newc,fprm,lprm);
            //
            sline.Append(aTC3D);
@@ -476,7 +476,7 @@ Standard_Real ProjectPointOnSurf::LowerDistance() const
        //
        Standard_Real aTwoPIdiv17, u1, v1, u2, v2, TolX;
        //
-       aTwoPIdiv17=2.*PI/17.;
+       aTwoPIdiv17=2.*M_PI/17.;
        //
        for (j=0; j<=17; j++) {
          gp_Pnt ptref (newc->Value (j*aTwoPIdiv17));
@@ -1518,7 +1518,7 @@ Standard_Boolean DecompositionOfWLine(const Handle(IntPatch_WLine)& theWLine,
                else {
                  Standard_Real anAngle = aNewVec.Angle(aVecOld);
 
-                 if((fabs(anAngle) < (Standard_PI * 0.25)) && (aNewVec.Dot(aVecOld) > 0.)) {
+                 if((fabs(anAngle) < (M_PI * 0.25)) && (aNewVec.Dot(aVecOld) > 0.)) {
 
                    if(bCheckAngle1) {
                      Standard_Real U1, U2, V1, V2;
index ba3af3751f5e681192b228bb863a4ff6b4431cd8..3b16da1fb9b4e0b000ec77a05171608f71036e8a 100755 (executable)
@@ -88,28 +88,28 @@ static void Recadre(const Handle(GeomAdaptor_HSurface)& myHS1,
     }
   }
   if(myHS1IsUPeriodic) {
-    const Standard_Real lmf = PI+PI; //-- myHS1->UPeriod();
+    const Standard_Real lmf = M_PI+M_PI; //-- myHS1->UPeriod();
     const Standard_Real f = myHS1->FirstUParameter();
     const Standard_Real l = myHS1->LastUParameter();
     while(u1 < f) { u1+=lmf; } 
     while(u1 > l) { u1-=lmf; }
   }
   if(myHS1IsVPeriodic) {
-    const Standard_Real lmf = PI+PI; //-- myHS1->VPeriod(); 
+    const Standard_Real lmf = M_PI+M_PI; //-- myHS1->VPeriod(); 
     const Standard_Real f = myHS1->FirstVParameter();
     const Standard_Real l = myHS1->LastVParameter();
     while(v1 < f) { v1+=lmf; } 
     while(v1 > l) { v1-=lmf; }
   }
   if(myHS2IsUPeriodic) { 
-    const Standard_Real lmf = PI+PI; //-- myHS2->UPeriod();
+    const Standard_Real lmf = M_PI+M_PI; //-- myHS2->UPeriod();
     const Standard_Real f = myHS2->FirstUParameter();
     const Standard_Real l = myHS2->LastUParameter();
     while(u2 < f) { u2+=lmf; } 
     while(u2 > l) { u2-=lmf; }
   }
   if(myHS2IsVPeriodic) { 
-    const Standard_Real lmf = PI+PI; //-- myHS2->VPeriod();
+    const Standard_Real lmf = M_PI+M_PI; //-- myHS2->VPeriod();
     const Standard_Real f = myHS2->FirstVParameter();
     const Standard_Real l = myHS2->LastVParameter();
     while(v2 < f) { v2+=lmf; } 
@@ -260,12 +260,12 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
     if(typl == IntPatch_Circle || typl == IntPatch_Ellipse)
     { 
       firstp = GeomInt_LineTool::Vertex(L,nbvtx).ParameterOnLine();
-      lastp  = PI + PI + GeomInt_LineTool::Vertex(L,1).ParameterOnLine();
+      lastp  = M_PI + M_PI + GeomInt_LineTool::Vertex(L,1).ParameterOnLine();
       const Standard_Real cadrinf = GeomInt_LineTool::FirstParameter(L);
       const Standard_Real cadrsup = GeomInt_LineTool::LastParameter(L);
       Standard_Real acadr = (firstp+lastp)*0.5;
-      while(acadr < cadrinf) { acadr+=PI+PI; }
-      while(acadr > cadrsup) { acadr-=PI+PI; } 
+      while(acadr < cadrinf) { acadr+=M_PI+M_PI; }
+      while(acadr > cadrsup) { acadr-=M_PI+M_PI; } 
       if(acadr>=cadrinf && acadr<=cadrsup)
       { 
         if(Abs(firstp-lastp)>Precision::PConfusion())
@@ -605,7 +605,7 @@ void GeomInt_LineConstructor::PeriodicLine (const Handle(IntPatch_Line)& L) cons
       }
     }
     if (changevtx) {
-      thevtx.SetParameter(prm + 2.*PI);
+      thevtx.SetParameter(prm + 2.*M_PI);
       glin->Replace(i,thevtx);
     }
   }
index 57fe27b7202873d3bd2d4b023ae7e0d5599a8ade..d74631dd8724a835cf86d0248aba181101ee2fe5 100755 (executable)
@@ -145,7 +145,7 @@ Standard_Real GeomInt_LineTool::LastParameter (const Handle(IntPatch_Line)& L)
           return Precision::Infinite();
         case IntPatch_Circle:
         case IntPatch_Ellipse:
-          return 2.*PI;
+          return 2.*M_PI;
         default: break;
       }
     }
index 017fafadbe2f3c19525729f02523b484bcaf3162..331428f5bd9fbe2767d971ce9ff515a2ed2c4c8e 100755 (executable)
@@ -74,13 +74,13 @@ static Standard_Boolean Controle(const TColgp_Array1OfPnt& Poles,
       gp_Dir du(DU);
       Standard_Real Angle1 = du.Angle(DX);
       Standard_Real Angle2 = du.Angle(DY);
-      if (Angle1 > PI/2) Angle1 = PI-Angle1;
-      if (Angle2 > PI/2) Angle2 = PI-Angle2;
+      if (Angle1 > M_PI/2) Angle1 = M_PI-Angle1;
+      if (Angle2 > M_PI/2) Angle2 = M_PI-Angle2;
       if (Angle2 < Angle1) {
        du = DY; DY = DX; DX = du;
       }
-      if (DX.Angle(DU) > PI/2) DX.Reverse();
-      if (DY.Angle(DV) > PI/2) DY.Reverse();      
+      if (DX.Angle(DU) > M_PI/2) DX.Reverse();
+      if (DY.Angle(DV) > M_PI/2) DY.Reverse();      
 
       gp_Ax3 axe(Bary, DX^DY, DX);
       Plan.SetPosition(axe);
@@ -227,8 +227,8 @@ GeomLib_IsPlanarSurface::GeomLib_IsPlanarSurface(const Handle(Geom_Surface)& S,
       Dn = DU^DV;
       if (Dn.Magnitude() > 1.e-7) {
        Standard_Real angle = Dir.Angle(Dn);
-       if (angle > PI/2) {
-         angle = PI - angle;
+       if (angle > M_PI/2) {
+         angle = M_PI - angle;
          Dir.Reverse();
        }
        Essai = (angle < 0.1);
index 9c0023c3e192196fcf99de28373bec897ce95c98..9ccf5b9fb64d199be094f96da23af2fa54dcc00c 100755 (executable)
@@ -288,9 +288,9 @@ gp_Vec GeomPlate_BuildAveragePlane::DefPlan(const Standard_Integer NOption)
          }
        gp_Vec OZ1 = A;
        Standard_Real theAngle = OZ.Angle( OZ1 );
-       if (theAngle > PI/2)
-         theAngle = PI - theAngle;
-       if (theAngle > PI/3)
+       if (theAngle > M_PI/2)
+         theAngle = M_PI - theAngle;
+       if (theAngle > M_PI/3)
          OZ = OZ1;
       }
   }
index 72a5b6f049f306ab2b16f07f1ec4d02971cd8bd9..6c55b42e91a334d0f316055f2fecc585e996cb45 100755 (executable)
@@ -752,8 +752,8 @@ EcartContraintesMil  ( const Standard_Integer c,
            d->ChangeValue(i) = Pf.Distance(Pi);
            v3i = v1i^v2i; v3f=v1f^v2f;
            Standard_Real angle=v3f.Angle(v3i);
-           if (angle>(PI/2))
-             an->ChangeValue(i) = PI -angle;
+           if (angle>(M_PI/2))
+             an->ChangeValue(i) = M_PI -angle;
            else
              an->ChangeValue(i) = angle;
            courb->Init(0);
@@ -1791,8 +1791,8 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
                          myLinCont->Value(j)->D2( int2d.ParamOnSecond(), P2, v21, v22, v23, v24, v25 ); 
                          v16=v11^v12;v26=v21^v22;
                          Standard_Real ant=v16.Angle(v26);      
-                         if (ant>(PI/2))
-                           ant= PI -ant;
+                         if (ant>(M_PI/2))
+                           ant= M_PI -ant;
                          if ((Abs(v16*v15-v16*v25)>(myTol3d/1000))
                              ||(Abs(ant)>myTol3d/1000))  
                            // Pas compatible ==> on enleve une zone en 
@@ -1806,12 +1806,12 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
                              myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1, V1);
                              myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2, V2);
                              A1 = V1.Angle(V2);
-                             if (A1>(PI/2))
-                               A1= PI - A1;
-                             if (Abs(Abs(A1)-PI)<myTolAng) Tol = 100000 * myTol3d;
+                             if (A1>(M_PI/2))
+                               A1= M_PI - A1;
+                             if (Abs(Abs(A1)-M_PI)<myTolAng) Tol = 100000 * myTol3d;
 #if PLATE_DEB
                              if (Affich) cout <<"Angle entre Courbe "<<i<<","<<j
-                               <<" "<<Abs(Abs(A1)-PI)<<endl;
+                               <<" "<<Abs(Abs(A1)-M_PI)<<endl;
 #endif
                              
                              coin = Ci.Resolution(Tol);
@@ -1847,7 +1847,7 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
                            }
                          N = vecU ^ vecV;
                          Standard_Real Angle = vec.Angle( N );
-                         Angle = Abs( PI/2-Angle ); 
+                         Angle = Abs( M_PI/2-Angle ); 
                          if (Angle > myTolAng/10.) //????????? //if (Abs( scal ) > myTol3d/100)
                            { // Pas compatible ==> on enleve une zone en 
                              // contrainte G0 et G1 correspondant
@@ -1860,12 +1860,12 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
                              myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1, V1);
                              myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2, V2);
                              A1 = V1.Angle( V2 );
-                             if (A1 > PI/2)
-                               A1= PI - A1;
-                             if (Abs(Abs(A1) - PI) < myTolAng) Tol = 100000 * myTol3d;
+                             if (A1 > M_PI/2)
+                               A1= M_PI - A1;
+                             if (Abs(Abs(A1) - M_PI) < myTolAng) Tol = 100000 * myTol3d;
 #if PLATE_DEB
                              if (Affich) cout <<"Angle entre Courbe "<<i<<","<<j
-                               <<" "<<Abs(Abs(A1)-PI)<<endl;
+                               <<" "<<Abs(Abs(A1)-M_PI)<<endl;
 #endif
                              if (myLinCont->Value(i)->Order() == 1)
                                {
@@ -1998,7 +1998,7 @@ Discretise(const Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
         
       tabP2d(Nbint+1).SetX(Length2d);
       for (ii = 2;  ii<= Nbint; ii++) {
-       U = Uinit + (Ufinal-Uinit)*((1-Cos((ii-1)*PI/(Nbint)))/2);
+       U = Uinit + (Ufinal-Uinit)*((1-Cos((ii-1)*M_PI/(Nbint)))/2);
        tabP2d(ii).SetY(U);
 /*        if (!HC2d.IsNull()) {
              Standard_Real L = GCPnts_AbscissaPoint::Length(HC2d->Curve2d(), Uinit, U);
@@ -2024,15 +2024,15 @@ Discretise(const Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
     for (Standard_Integer j=1; j<=NbPnt_i; j++)  
       { // repartition des points en cosinus selon l'ACR 2d
         // Afin d'eviter les points d'acumulation dans le 2d
-       //Inter=Uinit+(Uif)*((-cos(PI*((j-1)/(NbPnt_i-1)))+1)/2);
+       //Inter=Uinit+(Uif)*((-cos(M_PI*((j-1)/(NbPnt_i-1)))+1)/2);
        if (j==NbPnt_i)
          Inter=Ufinal;//pour parer au bug sur sun
        else if (ACR) {
-          CurLength = Length2d*(1-Cos((j-1)*PI/(NbPnt_i-1)))/2;
+          CurLength = Length2d*(1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2;
          Inter =  acrlaw->Value(CurLength);
        }
        else {
-         Inter=Uinit+(Ufinal-Uinit)*((1-Cos((j-1)*PI/(NbPnt_i-1)))/2);
+         Inter=Uinit+(Ufinal-Uinit)*((1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2);
        }
        myParCont->ChangeValue(i).Append(Inter);// on ajoute le point
        if (NbPtInter!=0) 
@@ -2509,8 +2509,8 @@ void GeomPlate_BuildPlateSurface::
          Dist = Pf.Distance(Pi);
          v3i = v1i^v2i; v3f=v1f^v2f;
          Ang=v3f.Angle(v3i);
-         if (Ang>(PI/2))
-           Ang = PI -Ang;
+         if (Ang>(M_PI/2))
+           Ang = M_PI -Ang;
          break;
        case 2 :
          Handle(Geom_Surface) Splate;
index af880cf8504f55994333b1f9134e0cf2c2407706..2743297dbba02fe8f67ca7bf6571172025abf658 100755 (executable)
@@ -120,9 +120,9 @@ void GeomPlate_PlateG1Criterion::Value(AdvApp2Var_Patch& P,
        v2s.SetCoord(3,Digit[2]);
 
        v3s=v1s^v2s;
-       if( v3s.Angle(v3h)>(PI/2)) {
-         if ((PI-v3s.Angle(v3h))>ang) {
-            ang=(PI-v3s.Angle(v3h));
+       if( v3s.Angle(v3h)>(M_PI/2)) {
+         if ((M_PI-v3s.Angle(v3h))>ang) {
+            ang=(M_PI-v3s.Angle(v3h));
           }
        }
        else {
index 123aec1c37931e4d1bbfdc1c0c0dd1864dbc0cac..8271e87c92829210be3791c3056caeb81e1e39a6 100755 (executable)
@@ -522,7 +522,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomCurve::TransferCurve
   //gka BUG 6542 1.09.04 BSpline curve was written in the IGES instead circle.
   gp_Pnt pfirst,plast;
   start->D0(U1,pfirst);
-  if(Abs (Ufin - Udeb - 2 * PI) <= Precision::PConfusion())
+  if(Abs (Ufin - Udeb - 2 * M_PI) <= Precision::PConfusion())
     plast = pfirst;
   else
     start->D0(U2,plast);
@@ -568,12 +568,12 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomCurve::TransferCurve
 
   //#35 rln 22.10.98 BUC60391 face 9
   //Closed Conic Arc is incorrectly oriented when reading back to CAS.CADE
-  if (Abs (Ufin - Udeb - 2 * PI) <= Precision::PConfusion()) {
+  if (Abs (Ufin - Udeb - 2 * M_PI) <= Precision::PConfusion()) {
     //#53 rln 24.12.98 CCI60005
     //Trimmed ellipse. To avoid huge weights in B-Spline first rotate it and then convert
     Handle(Geom_Ellipse) copystart = Handle(Geom_Ellipse)::DownCast (start->Copy());
     gp_Ax2 pos = copystart->Position();
-    copystart->SetPosition (pos.Rotated (pos.Axis(), gp_Ax3 (pos).Direct() ? Udeb : 2 * PI - Udeb));
+    copystart->SetPosition (pos.Rotated (pos.Axis(), gp_Ax3 (pos).Direct() ? Udeb : 2 * M_PI - Udeb));
     Handle(Geom_BSplineCurve) Bspline;
     //:q3 abv 17 Mar 99: use GeomConvert_ApproxCurve for precise conversion
     GeomConvert_ApproxCurve approx (copystart, Precision::Approximation(), 
@@ -583,7 +583,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomCurve::TransferCurve
       GeomConvert::CurveToBSplineCurve (copystart, Convert_QuasiAngular);
     TColStd_Array1OfReal Knots(1, Bspline->NbKnots());
     Bspline->Knots (Knots);
-    BSplCLib::Reparametrize (Udeb, Udeb + 2 * PI, Knots);
+    BSplCLib::Reparametrize (Udeb, Udeb + 2 * M_PI, Knots);
     Bspline->SetKnots (Knots);
     return TransferCurve (Bspline, Udeb, Ufin);
   }
index c0169feeb03c669711628bd903af03880785377a..6bc784971697a7985cc6d068a93e91e6b3cdaa29 100755 (executable)
@@ -582,7 +582,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomSurface::TransferSurface
   //Axis->Init(gp_XYZ(0.0, 0.0, 0.0), gp_XYZ(0.0, 0.0, 1.0/GetUnit()));
   //Surf->Init (Axis, Generatrix, U1, U2);
   Axis->Init(gp_XYZ (0, 0, 1. / GetUnit()), gp_XYZ (0, 0, 0));  
-  Surf->Init (Axis, Generatrix, 2 * PI - U2, 2 * PI - U1);
+  Surf->Init (Axis, Generatrix, 2 * M_PI - U2, 2 * M_PI - U1);
 
 
   // creation de la Trsf (#124)
@@ -660,7 +660,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomSurface::TransferSurface
   //Axis->Init(gp_XYZ(0.0, 0.0, 0.0), gp_XYZ(0.0, 0.0, 1.0/GetUnit()));
   //Surf->Init (Axis, Generatrix, U1, U2);
   Axis->Init(gp_XYZ (0, 0, 1. / GetUnit()), gp_XYZ (0, 0, 0));  
-  Surf->Init (Axis, Generatrix, 2 * PI - U2, 2 * PI - U1);
+  Surf->Init (Axis, Generatrix, 2 * M_PI - U2, 2 * M_PI - U1);
 
 
   // creation de la Trsf (#124)
@@ -735,7 +735,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomSurface::TransferSurface
 
   if ( Gen->IsKind(STANDARD_TYPE(IGESGeom_CircularArc))) {
     //#30 rln 19.10.98 Surf->Init (Axis, Gen, U1, U2);
-    Surf->Init (Axis, Gen, 2 * PI - U2, 2 * PI - U1);
+    Surf->Init (Axis, Gen, 2 * M_PI - U2, 2 * M_PI - U1);
     IGESConvGeom_GeomBuilder Build;
     Standard_Real xloc,yloc,zloc;
     start->Sphere().Location().Coord(xloc,yloc,zloc);
@@ -807,7 +807,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomSurface::TransferSurface
 
 //:l6 abv: CTS22022: writing full tori:  if ( Gen->IsKind(STANDARD_TYPE(IGESGeom_CircularArc))) {
     //#30 rln 19.10.98 Surf->Init (Axis, Gen, U1, U2);
-    Surf->Init (Axis, Gen, 2 * PI - U2, 2 * PI - U1);
+    Surf->Init (Axis, Gen, 2 * M_PI - U2, 2 * M_PI - U1);
     IGESConvGeom_GeomBuilder Build;
 /* //:l6: useless
     Standard_Real xloc,yloc,zloc;
@@ -994,7 +994,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomSurface::TransferSurface
   Axis->Init(gp_XYZ(X1/GetUnit(),Y1/GetUnit(),Z1/GetUnit()),
             gp_XYZ( (X1 - X2) / GetUnit(), (Y1 - Y2) / GetUnit(), (Z1 - Z2) / GetUnit()));
 
-  Surf->Init (Axis, Generatrix, 2 * PI - U2, 2 * PI - U1);
+  Surf->Init (Axis, Generatrix, 2 * M_PI - U2, 2 * M_PI - U1);
   res = Surf;
   return res;
 
@@ -1178,7 +1178,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomSurface::TransferConicalSurface(const
   Handle(Geom_Direction) rdir = new Geom_Direction(XDir);//XAxe.Direction()); 
   Handle(IGESGeom_Direction) refdir = GV.TransferVector(rdir);
 
-  ConSurf->Init (aLocation, Axis, radius, angle*180./PI, refdir);
+  ConSurf->Init (aLocation, Axis, radius, angle*180./M_PI, refdir);
   res = ConSurf;
   return res;
 }
index b40e67e9c4bb5a0ba295b14b7dd018a013f247b7..bf18831158fae933bb19bc03c7a439e15d514d45 100755 (executable)
@@ -31,7 +31,7 @@ GeomToStep_MakeConicalSurface::GeomToStep_MakeConicalSurface
   aPosition = MkAxis.Value();
   aRadius = CS->RefRadius();
   aSemiAngle = CS->SemiAngle();
-  if (aSemiAngle < 0. || aSemiAngle > PI/2.) {
+  if (aSemiAngle < 0. || aSemiAngle > M_PI/2.) {
     Standard_DomainError::Raise("Conicalsurface not STEP conformant");
   }
   
index fe70c89ccbdf9d37aba172ef5d3aea82794795ff..07af5a27efabd2168565c4e38b1481ac96636625 100755 (executable)
@@ -47,7 +47,7 @@ GeomToStep_MakeRectangularTrimmedSurface::
   // Modification of the Trimming Parameters ?
   // -----------------------------------------
 
-  Standard_Real AngleFact = 180./PI;
+  Standard_Real AngleFact = 180./M_PI;
   Standard_Real uFact = 1.;
   Standard_Real vFact = 1.;
   Standard_Real LengthFact  = UnitsMethods::LengthFactor();
index 00c1c184f038c42df9001b497367da98d279e5aa..d537aa96a169d7346e8b34f4d17a3c480413c32f 100755 (executable)
@@ -395,7 +395,7 @@ static Standard_Integer lintang (Draw_Interpretor& di,Standard_Integer n, const
       di << "Second argument must be a line";
       return 1;
     }
-    Standard_Real ang = atof(a[4]) * PI180;
+    Standard_Real ang = atof(a[4]) * (M_PI / 180.0);
     Geom2dGcc_Lin2dTanObl ct3(Geom2dGcc::Unqualified(C1),
                              L->Lin2d(),
                              Precision::Angular(),
index 64c89ba81cc2b44992d368b1ccd9cce4a3f0b2b2..50a9c82cd523a0dd5bc70f59ca994fbae64890e1 100755 (executable)
@@ -58,8 +58,8 @@ BattenCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
   if (! DrawTrSurf::GetPoint2d(cp2, P2) ) return 1;
 
   FairCurve_Batten* Bat = new FairCurve_Batten (P1, P2, h);
-  Bat->SetAngle1(a1*PI/180);
-  Bat->SetAngle2(a2*PI/180);
+  Bat->SetAngle1(a1*M_PI/180);
+  Bat->SetAngle2(a2*M_PI/180);
   
   Ok = Bat->Compute(Iana);
   
@@ -102,8 +102,8 @@ MVCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
   if (! DrawTrSurf::GetPoint2d(cp2, P2) ) return 1;
 
   FairCurve_MinimalVariation* MVC = new  FairCurve_MinimalVariation (P1, P2, h);
-  MVC->SetAngle1(a1*PI/180);
-  MVC->SetAngle2(a2*PI/180);
+  MVC->SetAngle1(a1*M_PI/180);
+  MVC->SetAngle2(a2*M_PI/180);
   
   Ok = MVC->Compute(Iana);
   
index 0d134c1708bc4ddd11b2a70ef356914b9b7f0e73..34d1e67896a2c1bf8314fe319b4ba6127fa3a328 100755 (executable)
@@ -206,7 +206,7 @@ static Standard_Integer anasurface (Draw_Interpretor& ,
       Standard_Real par2 = atof(a[i+1]);
       
       if (!strcasecmp(a[0],"cone")) {
-       par1 *= PI180;
+       par1 *= (M_PI / 180.0);
        Handle(Geom_ConicalSurface) C =
          new Geom_ConicalSurface(loc,par1,par2);
        result = C;
index 30c9c318fa8597055170699354d65c127bbc6ca3..062fbbaec2d3d16c936b929e5b481d4599cd006a 100755 (executable)
@@ -39,7 +39,7 @@ Graphic2d_Circle::Graphic2d_Circle
 
     DoMinMax();
     myFirstAngle = 0.;
-    mySecondAngle = Standard_ShortReal(2.*Standard_PI);
+    mySecondAngle = Standard_ShortReal(2. * M_PI);
     myisArc = Standard_False;
     myNumOfElem = MAXPOINTS + 1;
     myNumOfVert = 3;
@@ -61,13 +61,13 @@ Graphic2d_Circle::Graphic2d_Circle
     myNumOfElem = MAXPOINTS + 1;
     myNumOfVert = 3;
 #ifdef PRO3730
-       Standard_ShortReal TwoPI = Standard_ShortReal(2.*Standard_PI);
+       Standard_ShortReal TwoPI = Standard_ShortReal(2. * M_PI);
        myFirstAngle    = Standard_ShortReal (Alpha);
     mySecondAngle      = Standard_ShortReal (Beta);
        while( myFirstAngle < 0. ) myFirstAngle += TwoPI;
-       while( myFirstAngle > 2.*Standard_PI ) myFirstAngle -= TwoPI;
+       while( myFirstAngle > 2. * M_PI ) myFirstAngle -= TwoPI;
        while( mySecondAngle < 0. ) mySecondAngle += TwoPI;
-       while( mySecondAngle > 2.*Standard_PI ) mySecondAngle -= TwoPI;
+       while( mySecondAngle > 2. * M_PI ) mySecondAngle -= TwoPI;
        if( mySecondAngle < myFirstAngle ) mySecondAngle += TwoPI;
        if ( (mySecondAngle - myFirstAngle < ShortRealEpsilon()) || 
                        (mySecondAngle - myFirstAngle >= TwoPI) ) {
@@ -86,7 +86,7 @@ Graphic2d_Circle::Graphic2d_Circle
           myMaxY = myMaxY < Ycur ? Ycur : myMaxY;
 
           for( Acur = 0.,Xcur = 1.,Ycur = 0.; 
-                      Acur < mySecondAngle; Acur += Standard_ShortReal(Standard_PI/2.) ) {
+                      Acur < mySecondAngle; Acur += Standard_ShortReal(M_PI / 2.) ) {
                if( Acur > myFirstAngle ) {
               myMinX = ( myMinX < Xcur ? myMinX : Xcur );
               myMaxX = ( myMaxX < Xcur ? Xcur : myMaxX );
@@ -177,7 +177,7 @@ void Graphic2d_Circle::Draw (const Handle(Graphic2d_Drawer)& aDrawer) {
           E = Standard_Real (e); F = Standard_Real (f);
           aTrsf.Transforms (A, B);
           a = Standard_ShortReal (A); b = Standard_ShortReal (B);
-          if( Abs(f-e) < Standard_ShortReal(2.*Standard_PI) ) {
+          if( Abs(f-e) < Standard_ShortReal(2. * M_PI) ) {
          // To calculate new aperture angles 
          // the calculation is done on the trigonometric circle
          // and in this case the translation is not taken into account
index 12245d4cdaee1d2357cd3fafa32eeb9f83de4503..f9f02d51467784450cc9001665cb3c78a502a449 100755 (executable)
@@ -24,7 +24,7 @@ Graphic2d_CircleMarker::Graphic2d_CircleMarker (
         myY (Standard_ShortReal (Y)),
         myRadius (Standard_ShortReal (Radius)),
         myFirstAngle (0.0),
-        mySecondAngle (Standard_ShortReal (2.*Standard_PI)) {
+        mySecondAngle (Standard_ShortReal (2. * M_PI)) {
 
        if (myRadius <= RealEpsilon ())
                Graphic2d_CircleDefinitionError::Raise ("The radius = 0.");
index 2a9a515c4bb6b0d436fd523cf6d7a867b63f0b17..1b90a16287c51bdd54d407e773bd80dc59537f82 100755 (executable)
@@ -868,14 +868,14 @@ void Graphic2d_Drawer::DrawArc(
         Standard_ShortReal mx,my,a1,a2,da;
         mx = Standard_ShortReal(aDeltaX);
         my = Standard_ShortReal(aDeltaY);
-        a1 = (Angle1 >= 0.) ? Angle1 : Angle1 + Standard_ShortReal(2.*Standard_PI);
-        a2 = (Angle2 >= 0.) ? Angle2 : Angle2 + Standard_ShortReal(2.*Standard_PI);
+        a1 = (Angle1 >= 0.) ? Angle1 : Angle1 + Standard_ShortReal(2. * M_PI);
+        a2 = (Angle2 >= 0.) ? Angle2 : Angle2 + Standard_ShortReal(2. * M_PI);
         if( a2 > a1 ) {
           da = a2 - a1;
         } else if( a2 < a1 ) {
-          da = Standard_ShortReal(2.*Standard_PI + a2 - a1);
+          da = Standard_ShortReal(2. * M_PI + a2 - a1);
         } else {
-          a1 = 0.; da = Standard_ShortReal(2.*Standard_PI);
+          a1 = 0.; da = Standard_ShortReal(2. * M_PI);
         }
         
         if( aRadius > 0. ) {    // Try to use hardware first
@@ -959,14 +959,14 @@ void Graphic2d_Drawer::DrawPolyArc(
         Standard_ShortReal mx,my,a1,a2,da;
         mx = Standard_ShortReal(aDeltaX);
         my = Standard_ShortReal(aDeltaY);
-        a1 = (Angle1 >= 0.) ? Angle1 : Angle1 + Standard_ShortReal(2.*Standard_PI);
-        a2 = (Angle2 >= 0.) ? Angle2 : Angle2 + Standard_ShortReal(2.*Standard_PI);
+        a1 = (Angle1 >= 0.) ? Angle1 : Angle1 + Standard_ShortReal(2. * M_PI);
+        a2 = (Angle2 >= 0.) ? Angle2 : Angle2 + Standard_ShortReal(2. * M_PI);
         if( a2 > a1 ) {
           da = a2 - a1;
         } else if( a2 < a1 ) {
-          da = Standard_ShortReal(2.*Standard_PI + a2 - a1);
+          da = Standard_ShortReal(2. * M_PI + a2 - a1);
         } else {
-          a1 = 0.; da = Standard_ShortReal(2.*Standard_PI);
+          a1 = 0.; da = Standard_ShortReal(2. * M_PI);
         }
         
         if( aRadius > 0. ) {    // Try to use hardware first
index 25e219f946d451a798db1c2771541bff490e00bf..20aa8ab5dfd95d601ee2d0f9931d8ab68708e425 100755 (executable)
@@ -61,7 +61,7 @@ Graphic2d_Ellips::Graphic2d_Ellips
       else {
           Standard_ShortReal X1, Y1, X2, Y2;
           Standard_Integer nbpoints = 360; // fobenselitmiter
-          Standard_ShortReal teta = Standard_ShortReal(2 * Standard_PI / nbpoints);
+          Standard_ShortReal teta = Standard_ShortReal(2 * M_PI / nbpoints);
           Standard_ShortReal x1 = Standard_ShortReal(myMajorRadius * Cos (myAngle));
           Standard_ShortReal y1 = Standard_ShortReal(myMajorRadius * Sin (myAngle));
           Standard_ShortReal x2, y2;
@@ -126,10 +126,10 @@ Standard_Boolean IsIn = Standard_False;
       val = Max( 0.0044 , Min (0.7854 , 2. * ACos(1.-Def/myMajorRadius)));
     else
       val = 0.7854;  // = PI/4.
-    Standard_Integer nbpoints = Min(MAXPOINTS,Standard_Integer(2*Standard_PI/val)+2);
+    Standard_Integer nbpoints = Min(MAXPOINTS,Standard_Integer(2 * M_PI / val) + 2);
 
 //    Standard_Integer nbpoints = Max ( 8 ,Standard_Integer ( myMajorRadius / Def));
-    Standard_ShortReal teta = Standard_ShortReal(2*Standard_PI /nbpoints);
+    Standard_ShortReal teta = Standard_ShortReal(2 * M_PI / nbpoints);
     Standard_ShortReal x1 = Standard_ShortReal(myMajorRadius *Cos (myAngle)),
     y1 = Standard_ShortReal(myMajorRadius *Sin (myAngle));
     Standard_ShortReal x2,y2;
index 3fda9668b82e3f8b14cbdec4a10cc56ba5ed72b0..ca2262460725a2afe1e24b46e88919e0db78f251 100755 (executable)
@@ -71,11 +71,11 @@ void Graphic2d_EllipsMarker::Draw (const Handle(Graphic2d_Drawer)& aDrawer) {
     if(myMajorRadius > Def) 
       val = Max( 0.0044 , Min (0.7854 , 2. * ACos(1.-Def/myMajorRadius)));
     else
-      val = 0.7854;  // = Standard_PI/4.
-    Standard_Integer nbpoints = Min(MAXPOINTS,Standard_Integer(2*Standard_PI/val)+2);
+      val = 0.7854;  // = PI/4.
+    Standard_Integer nbpoints = Min(MAXPOINTS,Standard_Integer(2 * M_PI / val)+2);
 
 //    Standard_Integer nbpoints = Max ( 8 ,Standard_Integer ( myMajorRadius / Def));
-    Standard_ShortReal teta = Standard_ShortReal( 2*Standard_PI /nbpoints);
+    Standard_ShortReal teta = Standard_ShortReal(2 * M_PI / nbpoints);
     Standard_ShortReal x1 = Standard_ShortReal( myMajorRadius *Cos (myAngle)),
                        y1 = Standard_ShortReal( myMajorRadius *Sin (myAngle));
     Standard_ShortReal x2,y2;
index 69ee6a7023db8d198f5b1e8d5bd29c364c76ed25..7dc0a8958c94a6cb0c06be59cf32d1a327e08e5d 100755 (executable)
@@ -146,13 +146,13 @@ void Graphic2d_HidingGraphicObject::Draw (const Handle(Graphic2d_Drawer)& aDrawe
                 if( type == Aspect_TOD_RELATIVE) {
                   precis = radius * coef;
                 }
-                Standard_ShortReal value = Standard_ShortReal(Standard_PI/4.);
+                Standard_ShortReal value = Standard_ShortReal(M_PI / 4.);
                 if( radius > precis )
                   value = Standard_ShortReal(Max( 0.0044 ,
                                 Min (0.7854 , 2. * ACos(1.-precis/radius))));
                 Standard_Integer n = Min(MAX_POINTS,
-                                Standard_Integer(2.*Standard_PI/value)+2);
-                Standard_ShortReal da = Standard_ShortReal(2.*Standard_PI/n);
+                                Standard_Integer(2. * M_PI / value)+2);
+                Standard_ShortReal da = Standard_ShortReal(2. * M_PI / n);
                 Standard_ShortReal cosin = Standard_ShortReal(Cos(da));
                 Standard_ShortReal x1 = radius;
                 Standard_ShortReal y1 = 0.;
index 54ae7737bf20c38d4512f67a64aa910d852d776f..9935c87c691e35020a492497de313e97ebf75a3d 100755 (executable)
@@ -154,7 +154,7 @@ Standard_Boolean Graphic2d_Line::IsIn ( const Standard_ShortReal aX,
     cosin = prosca / norme1 / norme2;
     if ( cosin >= 1 ) angle = 0.;
     else {
-      if ( cosin <= -1) angle = - Standard_PI;
+      if ( cosin <= -1) angle = - M_PI;
       else
        angle = Sign ( ACos ( cosin ) , provec );
        }
index 4a6346ba0a7856a197666a8708a90db75ff3d0dc..d55991d1b955fcae908a313969b2e71a6146586f 100755 (executable)
@@ -84,8 +84,8 @@ Graphic2d_Paragraph::Graphic2d_Paragraph
       myTextHScaleList(),
       myTextWScaleList() {
 
-      while (myAngle < 0.) myAngle += Standard_ShortReal( 2.*Standard_PI );
-      while (myAngle >= 2.*Standard_PI) myAngle -= Standard_ShortReal( 2.*Standard_PI );
+      while (myAngle < 0.) myAngle += Standard_ShortReal( 2. * M_PI );
+      while (myAngle >= 2. * M_PI) myAngle -= Standard_ShortReal( 2. * M_PI );
 
       SetZoomable() ;
       SetSlant() ;
@@ -148,8 +148,8 @@ void Graphic2d_Paragraph::SetCurrentUnderline (const Standard_Boolean isUnderlin
 void Graphic2d_Paragraph::SetSlant (const Quantity_PlaneAngle aSlant) {
 
         mySlant = Standard_ShortReal( aSlant );
-        while (mySlant < 0.) mySlant += Standard_ShortReal( 2.*Standard_PI );
-        while (mySlant >= 2.*Standard_PI) mySlant -= Standard_ShortReal( 2.*Standard_PI );
+        while (mySlant < 0.) mySlant += Standard_ShortReal( 2. * M_PI );
+        while (mySlant >= 2. * M_PI) mySlant -= Standard_ShortReal( 2. * M_PI );
 }
 
 void Graphic2d_Paragraph::SetSpacing (const Quantity_Ratio aSpacing) {
index bdb0793d18947c2706be9f483a3564c0b4828f5f..8848799f3d7e64bf4eacff27d1a277029ad59d00 100755 (executable)
@@ -3,8 +3,8 @@
 #define PRIMITIVE_PXX_INCLUDED
 
 #define NEW_ANGLE(a)  { \
-       int quot = (int) (a/(2.*Standard_PI)); \
-       if (Abs(quot) >= 1) a = a - 2.*Standard_PI*quot; \
+       int quot = (int) (a/(2. * M_PI)); \
+       if (Abs(quot) >= 1) a = a - 2. * M_PI * quot; \
 }
 
 #define REALEPSILON()  (0.0001)
@@ -20,17 +20,17 @@ double a; \
                if (y < 0.) \
                        if (-y <= REALEPSILON ()) y = 0.; \
                if (x == 0.) { \
-                       if (y > 0.) z = Standard_PI/2.; \
-                       else z = - Standard_PI/2.; \
+                       if (y > 0.) z = M_PI / 2.; \
+                       else z = - M_PI / 2.; \
                } \
                if (y == 0.) { \
                        if (x > 0.) z = 0.; \
-                       else z = Standard_PI; \
+                       else z = M_PI; \
                } \
                if ((x < 0.) && (y > 0.)) { \
                        a = acos (x); \
-                       if ((a >= Standard_PI/2.-REALEPSILON ()) && \
-                           (a <= Standard_PI+REALEPSILON ())) \
+                       if ((a >= M_PI / 2.-REALEPSILON ()) && \
+                           (a <= M_PI + REALEPSILON ())) \
                                z = a; \
                        else \
                                z = - a; \
@@ -38,7 +38,7 @@ double a; \
                if ((x >= 0.) && (y > 0.)) { \
                        a = acos (x); \
                        if ((a >= 0.) && \
-                           (a <= Standard_PI/2.+REALEPSILON ())) \
+                           (a <= M_PI / 2. + REALEPSILON ())) \
                                z = a; \
                        else \
                                z = - a; \
@@ -50,7 +50,7 @@ double a; \
                if ((x > 0.) && (y < 0.)) { \
                        a = acos (x); \
                        if ((a >= 0.) && \
-                           (a <= Standard_PI/2.+REALEPSILON ())) \
+                           (a <= M_PI / 2. + REALEPSILON ())) \
                                z = - a; \
                        else \
                                z = a; \
index dceef76117132619cc705c3ee501634eba7002ff..fd22dc9949dcda5b418fb4e77feca6e87a907b1d 100755 (executable)
@@ -43,8 +43,8 @@ Graphic2d_Text::Graphic2d_Text
 
       SetFamily(Graphic2d_TOP_TEXT);
 
-      while (myAngle < 0.) myAngle += Standard_ShortReal(2.*Standard_PI);
-      while (myAngle >= 2.*Standard_PI) myAngle -= Standard_ShortReal(2.*Standard_PI);
+      while (myAngle < 0.) myAngle += Standard_ShortReal(2. * M_PI);
+      while (myAngle >= 2. * M_PI) myAngle -= Standard_ShortReal(2. * M_PI);
 
 #ifndef PERF
       this->ComputeMinMax();
@@ -68,8 +68,8 @@ void Graphic2d_Text::SetFontIndex (const Standard_Integer anIndex) {
 void Graphic2d_Text::SetSlant (const Quantity_PlaneAngle aSlant) {
 
        mySlant = Standard_ShortReal(aSlant);
-        while (mySlant < 0.) mySlant += Standard_ShortReal(2.*Standard_PI);
-        while (mySlant >= 2.*Standard_PI) mySlant -= Standard_ShortReal(2.*Standard_PI);
+        while (mySlant < 0.) mySlant += Standard_ShortReal(2. * M_PI);
+        while (mySlant >= 2. * M_PI) mySlant -= Standard_ShortReal(2. * M_PI);
 #ifdef PERF
        myMinX = myMinY = ShortRealLast ();
        myMaxX = myMaxY = ShortRealFirst ();
index dac65a32839b24cc6a3408f43357ecc8f2d7216c..cec6f296cb48345c60cf9b95db80adcd5acc7377 100755 (executable)
@@ -419,7 +419,7 @@ Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(
                   myPrimitiveArray->vertices[i3].xyz[1],
                   myPrimitiveArray->vertices[i3].xyz[2]);
         gp_Vec v21(p1,p2),v31(p1,p3),fn = v21.Crossed(v31);
-        if( aNormal.IsOpposite(fn,Standard_PI/4.) ) {
+        if( aNormal.IsOpposite(fn, M_PI / 4.) ) {
           Standard_Integer e; char v;
           for( i=0,j=k-1 ; i<k/2 ; i++,j-- ) {
             e = myPrimitiveArray->edges[n+i];
@@ -436,7 +436,7 @@ Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(
               y = myPrimitiveArray->vnormals[e].xyz[1];
               z = myPrimitiveArray->vnormals[e].xyz[2];
               gp_Vec vn(x,y,z);
-              if( aNormal.IsOpposite(vn,Standard_PI/4.) ) {
+              if( aNormal.IsOpposite(vn, M_PI / 4.) ) {
                 myPrimitiveArray->vnormals[e].xyz[0] = -x;
                 myPrimitiveArray->vnormals[e].xyz[1] = -y;
                 myPrimitiveArray->vnormals[e].xyz[2] = -z;
@@ -462,7 +462,7 @@ Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(
                   myPrimitiveArray->vertices[n+2].xyz[1],
                   myPrimitiveArray->vertices[n+2].xyz[2]);
       gp_Vec v21(p1,p2),v31(p1,p3),fn = v21.Crossed(v31);
-      if( aNormal.IsOpposite(fn,Standard_PI/4.) ) {
+      if( aNormal.IsOpposite(fn, M_PI / 4.) ) {
         for( i=0,j=k-1 ; i<k/2 ; i++,j-- ) {
           x = myPrimitiveArray->vertices[n+i].xyz[0];
           y = myPrimitiveArray->vertices[n+i].xyz[1];
@@ -488,7 +488,7 @@ Standard_Boolean Graphic3d_ArrayOfPrimitives::Orientate(
             y = myPrimitiveArray->vnormals[n+i].xyz[1];
             z = myPrimitiveArray->vnormals[n+i].xyz[2];
             gp_Vec vn(x,y,z);
-            if( aNormal.IsOpposite(vn,Standard_PI/4.) ) {
+            if( aNormal.IsOpposite(vn, M_PI / 4.) ) {
               myPrimitiveArray->vnormals[n+i].xyz[0] = -x;
               myPrimitiveArray->vnormals[n+i].xyz[1] = -y;
               myPrimitiveArray->vnormals[n+i].xyz[2] = -z;
index 727edc2bcf26775219c98c1ce25fd795c6e5c2d0..a5e7ddaa016c27ce7a6e01353bd0132dfff828e2 100755 (executable)
@@ -5,20 +5,20 @@
 
 #include <HLRAlgo.ixx>
 
-static const Standard_Real cosu0 = cos(0.*PI/14.);
-static const Standard_Real sinu0 = sin(0.*PI/14.);
-static const Standard_Real cosu1 = cos(1.*PI/14.);
-static const Standard_Real sinu1 = sin(1.*PI/14.);
-static const Standard_Real cosu2 = cos(2.*PI/14.);
-static const Standard_Real sinu2 = sin(2.*PI/14.);
-static const Standard_Real cosu3 = cos(3.*PI/14.);
-static const Standard_Real sinu3 = sin(3.*PI/14.);
-static const Standard_Real cosu4 = cos(4.*PI/14.);
-static const Standard_Real sinu4 = sin(4.*PI/14.);
-static const Standard_Real cosu5 = cos(5.*PI/14.);
-static const Standard_Real sinu5 = sin(5.*PI/14.);
-static const Standard_Real cosu6 = cos(6.*PI/14.);
-static const Standard_Real sinu6 = sin(6.*PI/14.);
+static const Standard_Real cosu0 = cos(0.*M_PI/14.);
+static const Standard_Real sinu0 = sin(0.*M_PI/14.);
+static const Standard_Real cosu1 = cos(1.*M_PI/14.);
+static const Standard_Real sinu1 = sin(1.*M_PI/14.);
+static const Standard_Real cosu2 = cos(2.*M_PI/14.);
+static const Standard_Real sinu2 = sin(2.*M_PI/14.);
+static const Standard_Real cosu3 = cos(3.*M_PI/14.);
+static const Standard_Real sinu3 = sin(3.*M_PI/14.);
+static const Standard_Real cosu4 = cos(4.*M_PI/14.);
+static const Standard_Real sinu4 = sin(4.*M_PI/14.);
+static const Standard_Real cosu5 = cos(5.*M_PI/14.);
+static const Standard_Real sinu5 = sin(5.*M_PI/14.);
+static const Standard_Real cosu6 = cos(6.*M_PI/14.);
+static const Standard_Real sinu6 = sin(6.*M_PI/14.);
 
 //=======================================================================
 //function : UpdateMinMax
index cb5f4fddd052b2c57a8c552776c510778797f1aa..44b9cdb45a863935eb6d9131779a8a2c2ffd4d04 100755 (executable)
@@ -105,9 +105,9 @@ HLRBRep::PolyHLRAngleAndDeflection (const Standard_Real InAngl,
                                    Standard_Real& OutAngl,
                                    Standard_Real& OutDefl)
 {
-  static Standard_Real HAngMin =  1*PI/180;
-  static Standard_Real HAngLim =  5*PI/180;
-  static Standard_Real HAngMax = 35*PI/180;
+  static Standard_Real HAngMin =  1*M_PI/180;
+  static Standard_Real HAngLim =  5*M_PI/180;
+  static Standard_Real HAngMax = 35*M_PI/180;
 
   OutAngl = InAngl;
   if (OutAngl < HAngMin) OutAngl = HAngMin;
index efaeedb27ae916653da8b2a4ba136137c0e92985..356877b41b2e1a88db42ddefe21e35dc3308ce4a 100755 (executable)
@@ -439,7 +439,7 @@ static Standard_Integer IndexPlusOnePerCentThree [] = { 1 , 2 , 0 };
 
 HLRBRep_PolyAlgo::HLRBRep_PolyAlgo () :
 myDebug     (Standard_False),
-myAngle     (5 * PI / 180.),
+myAngle     (5 * M_PI / 180.),
 myTolSta    (0.1),
 myTolEnd    (0.9),
 myTolAngular(0.001)
@@ -475,7 +475,7 @@ HLRBRep_PolyAlgo::HLRBRep_PolyAlgo (const Handle(HLRBRep_PolyAlgo)& A)
 
 HLRBRep_PolyAlgo::HLRBRep_PolyAlgo (const TopoDS_Shape& S) :
 myDebug     (Standard_False),
-myAngle     (5 * PI / 180.),
+myAngle     (5 * M_PI / 180.),
 myTolSta    (0.1),
 myTolEnd    (0.9),
 myTolAngular(0.001)
index b4d849fbcb13f341f2f92ddaccf3b58702f0d31b..81b64c6a4c0fd54747cd8b0f598cb86ec9081722 100755 (executable)
@@ -94,5 +94,5 @@
 
     Standard_Real  IGESDimen_FlagNote::TipLength () const 
 {
-  return (0.5 * (Height()/Tan((35./180.)*PI)));
+  return (0.5 * (Height()/Tan((35./180.)*M_PI)));
 }
index 491c2bccb0fcdea4366785b0df4d9d266e47e00d..5850da4c50e98a5cd250b0a08f12fdf1052a12be 100755 (executable)
@@ -54,7 +54,7 @@ void  IGESDimen_ToolDimensionDisplayData::ReadOwnParams
   if (PR.DefinedElseSkip())
     PR.ReadReal(PR.Current(),"Witness Line Angle",tempWitLineAng); //szv#4:S4163:12Mar99 `st=` not needed
   else
-    tempWitLineAng = PI / 2;
+    tempWitLineAng = M_PI / 2;
 
   PR.ReadInteger(PR.Current(),"Text Alignment",tempTextAlign); //szv#4:S4163:12Mar99 `st=` not needed
   if (PR.DefinedElseSkip())
index 79844be0b41dcc58c46cea33907bc341f76f54ea..d9be15391316d83c293cada92b6eca1443a563d8 100755 (executable)
@@ -116,7 +116,7 @@ void  IGESDimen_ToolGeneralNote::ReadOwnParams
                slantAngles->SetValue(i, slantAngle);
            }
           else
-              slantAngles->SetValue(i, PI/2);
+              slantAngles->SetValue(i, M_PI/2);
 
           //st = PR.ReadReal(PR.Current(), "Rotation Angle", rotationAngle); //szv#4:S4163:12Mar99 moved in if
          if (PR.ReadReal(PR.Current(), "Rotation Angle", rotationAngle))
index 9aaf830838a6cc599065ea4c419a0a794e18e886..f0f95b9b00459be957e53b98a572fcb56eabd748 100755 (executable)
@@ -187,7 +187,7 @@ void  IGESDimen_ToolNewGeneralNote::ReadOwnParams
              slantAngles->SetValue(i, slantAngle);
           }
        else
-         slantAngles->SetValue(i, PI/2);
+         slantAngles->SetValue(i, M_PI/2);
 
        //st = PR.ReadReal(PR.Current(), "Rotation Angle", rotationAngle); //szv#4:S4163:12Mar99 moved in if
        if (PR.ReadReal(PR.Current(), "Rotation Angle", rotationAngle))
index db035fd9d4bb2c9916e07db388706c4e98e443f0..836cf7d0dbcba653cc36deb55debb1693b2d01fb 100755 (executable)
@@ -41,7 +41,7 @@ void IGESDimen_ToolSectionedArea::ReadOwnParams
   if (PR.DefinedElseSkip())
     PR.ReadReal(PR.Current(), "Angle between line and X axis", tempAngle); //szv#4:S4163:12Mar99 `st=` not needed
   else
-    tempAngle = PI / 4.0;
+    tempAngle = M_PI / 4.0;
 
   Standard_Boolean st = PR.ReadInteger(PR.Current(), "Number of island curves", nbislands);
   if (st && nbislands > 0)
index eae86196460dc15c3e4428e5937ad721541972e8..19d463e22afe76147cf4b877eb5b781faa97c56a 100755 (executable)
@@ -99,7 +99,7 @@
   gp_Dir2d dir2(x2-xc, y2-yc);   // After shifting the centre of
   // arc to the origin
   Standard_Real t = dir1.Angle(dir2);
-  return t + (t > 0 ? 0 : 2*PI);
+  return t + (t > 0 ? 0 : 2*M_PI);
 }
 
     gp_Dir IGESGeom_CircularArc::Axis () const
index 45bcea61416405cc301963042d3f06d4cb039285..410730e61e404320751cc7959e4033184e1ea426 100755 (executable)
       Xcen = ( cc*ee + f*b) / dn;
       Ycen = (-cc*dd - f*a) / dn;
 
-      Standard_Real teta = PI/2.;
+      Standard_Real teta = M_PI/2.;
       if (Abs(b) > eps) teta = ATan (-a/b);
-      if (fc < 0) teta += PI;
+      if (fc < 0) teta += M_PI;
       Xax  = Cos(teta);
       Yax  = Sin(teta);
 
index d8af477b2b24cf061ae18f25f0cfbad125cf60c0..0e80ee5c533d6e4a68c09aa2f7fa9c354f355e1a 100755 (executable)
@@ -230,10 +230,10 @@ void IGESGeom_ToolConicArc::OwnCheck(const Handle(IGESGeom_ConicArc)& ent,
       gp_Dir2d d2(ent->EndPoint().X()   - xc, ent->EndPoint().Y()   - yc);
       Standard_Real t1 = d0.Angle(d1);
       Standard_Real t2 = d0.Angle(d2);
-      t1 += (t1  >  0 ? 0 : 2*PI);
-      t2 += (t2  >  0 ? 0 : 2*PI);
-      t2 += (t1 <= t2 ? 0 : 2*PI);
-      if ( !(0 <= t1 && t1 <= 2*PI) || !(0 <= t2-t1 && t2-t1 <= 2*PI) )
+      t1 += (t1  >  0 ? 0 : 2*M_PI);
+      t2 += (t2  >  0 ? 0 : 2*M_PI);
+      t2 += (t1 <= t2 ? 0 : 2*M_PI);
+      if ( !(0 <= t1 && t1 <= 2*M_PI) || !(0 <= t2-t1 && t2-t1 <= 2*M_PI) )
        ach.AddFail("Parameter Error for Hyperbola");
     }
   else if (ent->FormNumber() == 3)
@@ -245,7 +245,7 @@ void IGESGeom_ToolConicArc::OwnCheck(const Handle(IGESGeom_ConicArc)& ent,
       gp_Dir2d d2(ent->EndPoint().X()   - xc, ent->EndPoint().Y()   - yc);
       Standard_Real t1 = d0.Angle(d1);
       Standard_Real t2 = d0.Angle(d2);
-      if ( !(-PI/2 < t1 && t1 < PI/2) || !(-PI/2 < t2 && t2 < PI/2) )
+      if ( !(-M_PI/2 < t1 && t1 < M_PI/2) || !(-M_PI/2 < t2 && t2 < M_PI/2) )
        ach.AddFail("Parameter Error for Parabola");
     }
 */
index 8824eadb1f9d384a37dc07d403c86179da5480e8..469e4833974ff1ab4ef04213111ec85e0962b65f 100755 (executable)
@@ -139,7 +139,7 @@ void IGESGeom_ToolSurfaceOfRevolution::OwnCheck
    const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/)  const
 {
 //  Standard_Real diffang = ent->EndAngle() - ent->StartAngle();
-//  if (diffang <= 0.0 || diffang > 2.0 * PI)
+//  if (diffang <= 0.0 || diffang > 2.0 * M_PI)
 //    ach.AddFail("0 < TA - SA <=  2Pi is not satisfied");
 }
 
index 6e3134d710068cf56d208645043d0db6183679ae..394558ddee3275400c158826b1d514b49e1368bf 100755 (executable)
@@ -47,7 +47,7 @@
     void IGESGraph_Color::HLSPercentage
   (Standard_Real& Hue, Standard_Real& Lightness, Standard_Real& Saturation) const
 {
-  Hue        = ((1.0 / (2.0 * PI)) *
+  Hue        = ((1.0 / (2.0 * M_PI)) *
                (ATan(((2 * theRed) - theGreen - theBlue) /
                      (Sqrt(3) * (theGreen - theBlue)))));
   Lightness  = ((1.0 / 3.0) * (theRed + theGreen + theBlue));
index 092dd67c689e43dcbca1c78628f8f6325a3a1b94..550e0c8919aa8ade7afed9206e41c651f761aaa0 100755 (executable)
@@ -60,7 +60,7 @@ void IGESGraph_ToolTextDisplayTemplate::ReadOwnParams
     // Reading slantAngle(Real)
     PR.ReadReal (PR.Current(), "Slant Angle", slantAngle); //szv#4:S4163:12Mar99 `st=` not needed
   else
-    slantAngle = PI/2.0; // Default Value
+    slantAngle = M_PI/2.0; // Default Value
 
   // Reading rotationAngle(Real)
   PR.ReadReal (PR.Current(), "Rotation Angle", rotationAngle); //szv#4:S4163:12Mar99 `st=` not needed
index da4ca00c2c645b3933ae2400331998394374799e..b5acf6e4cd0ba9d4bddedaaf662ea558af1a2813 100755 (executable)
@@ -365,7 +365,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferConicArc
 
         t1 = ElCLib::Parameter(circ, startPoint);
         t2 = ElCLib::Parameter(circ, endPoint);
-       if (t1 > t2 && (t1 - t2) > Precision::Confusion()) t2 += 2.*PI;
+       if (t1 > t2 && (t1 - t2) > Precision::Confusion()) t2 += 2.*M_PI;
        if (Abs(t1 - t2) <= Precision::Confusion())  { // t1 = t2
          Message_Msg msg1160("IGES_1160");
          SendWarning(st, msg1160);      
@@ -422,7 +422,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferConicArc
       
       t1 = ElCLib::Parameter(elips, startPoint);
       t2 = ElCLib::Parameter(elips, endPoint);
-      if (t2 < t1 && (t1 -t2) > Precision::Confusion()) t2 += 2.*PI;
+      if (t2 < t1 && (t1 -t2) > Precision::Confusion()) t2 += 2.*M_PI;
       if (Abs(t1 - t2) <= Precision::Confusion()) { // t1 = t2   
        Message_Msg msg1160("IGES_1160");
        SendWarning(st, msg1160);  
@@ -538,7 +538,7 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dConicArc
         t1 = ElCLib::Parameter(circ, startPoint);
         t2 = ElCLib::Parameter(circ, endPoint);
        
-       if (t2 < t1 && (t1 -t2) > Precision::PConfusion()) t2 += 2.*PI;
+       if (t2 < t1 && (t1 -t2) > Precision::PConfusion()) t2 += 2.*M_PI;
        if (Abs(t1 - t2) <= Precision::PConfusion()) { // t1 = t2
          Message_Msg msg1160("IGES_1160");
          SendWarning(st, msg1160); 
@@ -600,7 +600,7 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dConicArc
       
       t1  = ElCLib::Parameter(elips, startPoint);
       t2  = ElCLib::Parameter(elips, endPoint);
-      if (t2 < t1 && (t1 - t2) > Precision::PConfusion()) t2 += 2.*PI;
+      if (t2 < t1 && (t1 - t2) > Precision::PConfusion()) t2 += 2.*M_PI;
       if (Abs(t1 - t2) <= Precision::PConfusion())  { // t1 = t2   
        Message_Msg msg1160("IGES_1160");
        SendWarning(st, msg1160);  
@@ -690,14 +690,14 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferCircularArc
   t1 = ElCLib::Parameter(circ, startPoint);
   t2 = ElCLib::Parameter(circ, endPoint);
 
-  if ( st->IsClosed() && t1>=GetEpsGeom()) t2 = t1 + 2.*PI;
+  if ( st->IsClosed() && t1>=GetEpsGeom()) t2 = t1 + 2.*M_PI;
   if (!st->IsClosed() && fabs(t1 - t2) <=Precision::PConfusion()) {    
     // micro-arc
     // cky 27 Aout 1996 : t2-t1 vaut distance(start,end)/rayon
     t2 = t1 + startPoint.Distance(endPoint)/st->Radius();
   }
   if (!st->IsClosed() || t1>=GetEpsGeom()) {
-    if (t2 < t1) t2 += 2.*PI;
+    if (t2 < t1) t2 += 2.*M_PI;
     res = new Geom_TrimmedCurve(res, t1, t2);
   }
 
@@ -763,14 +763,14 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dCircularArc
   t1 = ElCLib::Parameter(circ, startPoint);
   t2 = ElCLib::Parameter(circ, endPoint);
     
-  if ( st->IsClosed() && t1>=GetEpsGeom()) t2 = t1 + 2.*PI;
+  if ( st->IsClosed() && t1>=GetEpsGeom()) t2 = t1 + 2.*M_PI;
   if (!st->IsClosed() && fabs(t1 -t2) <= Precision::PConfusion()) { 
     // micro-arc
     // cky 27 Aout 1996 : t2-t1 vaut distance(start,end)/rayon
     t2 = t1 + startPoint.Distance(endPoint)/st->Radius();
   }
   if (!st->IsClosed() || t1>= GetEpsGeom()) {
-    if (t2 < t1) t2 += 2.*PI;
+    if (t2 < t1) t2 += 2.*M_PI;
     res     = new Geom2d_TrimmedCurve(res, t1, t2);
   }
   return res;
index 74121df3f1394c461cfd9deb3668909e9b1ce43a..3bf08a4e7b7e184c37e1b435902d626dfaccde71 100755 (executable)
@@ -345,7 +345,7 @@ Handle(Geom_ConicalSurface) IGESToBRep_BasicSurface::TransferRigthConicalSurface
   Handle(IGESGeom_Point) Point = start->LocationPoint();
   Handle(IGESGeom_Direction) Axis = start->Axis();
   Standard_Real radius = start->Radius();
-  Standard_Real angle  = start->SemiAngle()/180.*PI;
+  Standard_Real angle  = start->SemiAngle()/180.*M_PI;
   
   if (Point.IsNull()) {
     Message_Msg msg174("XSTEP_174");   
@@ -359,7 +359,7 @@ Handle(Geom_ConicalSurface) IGESToBRep_BasicSurface::TransferRigthConicalSurface
     // Direction Reading Error : Null IGESEntity
     return res;
   }
-  if (angle < Precision::Confusion()||angle > PI/2.) {
+  if (angle < Precision::Confusion()||angle > M_PI/2.) {
     return res;
   }
   if (radius < 0) {
index 652cab03f966a48f1bf66f372517eda1f6ef58c6..b89fa053cfe5b0c70bbb37fe5fbb56a95a089a4a 100755 (executable)
@@ -1122,7 +1122,7 @@ TopoDS_Shape  IGESToBRep_TopoCurve::Transfer2dTopoBasicCurve
     //(taken from Compute2d3d and Compute2d)
 /*    if (isrev) {
       //#30 rln 19.10.98 transformation of pcurves for IGES Surface of Revolution
-      mycurve2d ->Translate (gp_Vec2d (0, -2 * PI));
+      mycurve2d ->Translate (gp_Vec2d (0, -2 * M_PI));
       mycurve2d->Mirror (gp::OX2d());
       mycurve2d->Mirror (gp_Ax2d (gp::Origin2d(), gp_Dir2d (1.,1.)));
       
index 647953f4aa160298508b9dbe2790fe2334a973c2..1c4a8bbe4bea36911dd90c86acdc5630ecb13f0c 100755 (executable)
@@ -733,11 +733,11 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferSurfaceOfRevolution
   //Standard_Real startAngle = st->StartAngle();
   //Standard_Real endAngle = st->EndAngle();
   gp_Ax1 revolAxis(pt1, gp_Dir( gp_Vec (pt2, pt1)));
-  Standard_Real startAngle = 2 * PI - st->EndAngle();
-  Standard_Real endAngle = 2 * PI - st->StartAngle();
+  Standard_Real startAngle = 2 * M_PI - st->EndAngle();
+  Standard_Real endAngle = 2 * M_PI - st->StartAngle();
   Standard_Real deltaAngle = endAngle - startAngle;
-  Standard_Boolean IsFullAngle = ( deltaAngle > 2.*PI-Precision::PConfusion() );
-  if (IsFullAngle) deltaAngle = 2.*PI;  // ** CKY 18-SEP-1996
+  Standard_Boolean IsFullAngle = ( deltaAngle > 2.*M_PI-Precision::PConfusion() );
+  if (IsFullAngle) deltaAngle = 2.*M_PI;  // ** CKY 18-SEP-1996
   // il faudra translater les courbes 2d de startAngle pour 
   // etre en phase IGES et BRep
   startLoc.SetRotation(revolAxis, startAngle);
@@ -890,7 +890,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferTabulatedCylinder
         tmpF = aBasisCurve->FirstParameter();
         tmpL = aBasisCurve->LastParameter();
         tmpToler = Precision::PConfusion();
-        if ( (fabs(tmpF) >= tmpToler) && (fabs(tmpL - 2*PI) >= tmpToler) )
+        if ( (fabs(tmpF) >= tmpToler) && (fabs(tmpL - 2*M_PI) >= tmpToler) )
           reparamBSpline (aBasisCurve, tmpF, tmpL);
       }
       gp_Vec dir (pt1, pt2);
@@ -1736,9 +1736,9 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const Handle(IGESData_IGESEnti
        gp_Pnt2d startpoint = circ->StartPoint();
        paramv -= ElCLib::Parameter (gp_Circ2d (gp_Ax2d (circ->Center(), gp_Dir2d(1,0)), circ->Radius()), startpoint);
        if (Surf->IsKind (STANDARD_TYPE(Geom_SphericalSurface)))
-         paramv += ShapeAnalysis::AdjustToPeriod(paramv, - PI, PI);
+         paramv += ShapeAnalysis::AdjustToPeriod(paramv, - M_PI, M_PI);
        else if (Surf->IsKind (STANDARD_TYPE(Geom_ToroidalSurface)))
-         paramv += ShapeAnalysis::AdjustToPeriod(paramv, 0, PI * 2);
+         paramv += ShapeAnalysis::AdjustToPeriod(paramv, 0, M_PI * 2);
       }
     }
     else if (st->IsKind (STANDARD_TYPE (IGESGeom_TabulatedCylinder))) {
@@ -1748,7 +1748,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const Handle(IGESData_IGESEnti
        DeclareAndCast (IGESGeom_CircularArc, circ, directrix);
        gp_Pnt2d startpoint = circ->StartPoint();
        paramu -= ElCLib::Parameter (gp_Circ2d (gp_Ax2d (circ->Center(), gp_Dir2d(1,0)), circ->Radius()), startpoint);
-       paramu += ShapeAnalysis::AdjustToPeriod(paramu, 0, PI * 2);
+       paramu += ShapeAnalysis::AdjustToPeriod(paramu, 0, M_PI * 2);
       }
     }
 
@@ -1768,7 +1768,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const Handle(IGESData_IGESEnti
     DeclareAndCast(IGESGeom_SurfaceOfRevolution, st120, isrf);
     //S4181 pdn 19.04.99 defining transformation matrix
     gp_Trsf2d tmp;
-    tmp.SetTranslation(gp_Vec2d (0, -2 * PI));
+    tmp.SetTranslation(gp_Vec2d (0, -2 * M_PI));
     trans.PreMultiply(tmp);
     tmp.SetMirror(gp::OX2d());
     trans.PreMultiply(tmp);
@@ -1778,7 +1778,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const Handle(IGESData_IGESEnti
     //#30 rln 19.10.98
     //CAS.CADE SA = 2*PI - IGES TA
     //paramu = st120->StartAngle();
-    paramu = -(2 * PI - st120->EndAngle());
+    paramu = -(2 * M_PI - st120->EndAngle());
   }
   else
     paramu = 0.;
@@ -1805,11 +1805,11 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const Handle(IGESData_IGESEnti
   
   if (isrf->IsKind(STANDARD_TYPE(IGESSolid_CylindricalSurface))||
       isrf->IsKind(STANDARD_TYPE(IGESSolid_ConicalSurface))) {
-    uscale = PI/180.;
+    uscale = M_PI/180.;
   }
   
   if (isrf->IsKind(STANDARD_TYPE(IGESSolid_SphericalSurface))) {
-    cscale = PI/180.;
+    cscale = M_PI/180.;
     uscale = 1.;
   }
       
@@ -1822,8 +1822,8 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const Handle(IGESData_IGESEnti
     tmp.SetMirror(gp_Ax2d (gp::Origin2d(), gp_Dir2d (1.,1.)));
     trans.PreMultiply(tmp);
     if(paramv > 0)
-      paramv = paramv*180./PI;
-    cscale = PI/180.;
+      paramv = paramv*180./M_PI;
+    cscale = M_PI/180.;
     uscale = 1.;
   } 
     
index db6ac274d4913aded3e5d36ca4df690bfed7ed08..d565c2e92999c1359461851156a42b1bd4a27f2e 100755 (executable)
                                                Standard_Real& Para) const
 {
   Standard_Real theta,z, aTolPrecision=0.0001;
-  Standard_Real PIpPI = Standard_PI+Standard_PI;
+  Standard_Real PIpPI = M_PI + M_PI;
   //
   switch (typequadric) {
 
index ee39720892c162cb89d869363c09cabdeee4f6f3..d78d4a747d8cf2534a40d68c38925fb35cd16277 100755 (executable)
@@ -31,7 +31,7 @@
 #include <ElCLib.hxx>
 
 
-static Standard_Real PIpPI = Standard_PI+Standard_PI;
+static Standard_Real PIpPI = M_PI + M_PI;
 //=============================================================================
 //==                                          E m p t y   C o n s t r u c t o r
 //== 
index b8ef2bfb6a1ec3a58901ef80f3882b7176a95e42..b8402cdb4f2abb3a4a1ee83837e0164805f3ca0b 100755 (executable)
@@ -55,7 +55,7 @@ class TrigonometricRoots {
   Standard_Boolean IsARoot(Standard_Real u) {
     Standard_Integer i;
     Standard_Real aEps=RealEpsilon();
-    Standard_Real PIpPI = Standard_PI+Standard_PI;
+    Standard_Real PIpPI = M_PI + M_PI;
     //
     for(i=0 ; i<NbRoots; ++i) {
       if(Abs(u - Roots[i])<=aEps) {
@@ -103,7 +103,7 @@ TrigonometricRoots::TrigonometricRoots(const Standard_Real CC,
 {
   Standard_Integer i, j, SvNbRoots;
   Standard_Boolean Triee;
-  Standard_Real PIpPI = Standard_PI+Standard_PI;
+  Standard_Real PIpPI = M_PI + M_PI;
   //
   done=Standard_False;
   //
@@ -269,7 +269,7 @@ void IntAna_IntQuadQuad::Perform(const gp_Cylinder& Cyl,
   Z_NEGATIF=Standard_False;
   //
   Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,Q1, aRealEpsilon, RCyl, R2;
-  Standard_Real PIpPI = Standard_PI+Standard_PI;
+  Standard_Real PIpPI = M_PI + M_PI;
   //
   for(Standard_Integer raz = 0 ; raz < myNbMaxCurves ; raz++) {
     previouscurve[raz] = nextcurve[raz] = 0;
@@ -370,7 +370,7 @@ void IntAna_IntQuadQuad::Perform(const gp_Cylinder& Cyl,
        //-- Si Positif  ---> 2 Courbes
        //-- Sinon       ---> Pas de solution
        //--------------------------------------------------------------
-       if(MTF.Value(PI) >= -aRealEpsilon) {
+       if(MTF.Value(M_PI) >= -aRealEpsilon) {
 
          TheCurve[0].SetCylinderQuadValues(Cyl,Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,Q1,
                                            myEpsilon,0.0,PIpPI,
@@ -404,7 +404,7 @@ void IntAna_IntQuadQuad::Perform(const gp_Cylinder& Cyl,
          //--       entre les 2 racines ( Ici Tout le domaine )
          //-- Sinon Seulement un point Tangent
          //------------------------------------------------------------
-         if(MTF.Value(PolDIS.Value(1)+PI) >= -aRealEpsilon ) {
+         if(MTF.Value(PolDIS.Value(1)+M_PI) >= -aRealEpsilon ) {
            //------------------------------------------------------------
            //-- On a Un Point de Tangence + Une Courbe Solution
            //------------------------------------------------------------
@@ -582,7 +582,7 @@ void IntAna_IntQuadQuad::Perform(const gp_Cone& Cone,
   Standard_Integer i;
   Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,Q1;
   Standard_Real Theta1, Theta2, TgAngle;
-  Standard_Real PIpPI = Standard_PI+Standard_PI;
+  Standard_Real PIpPI = M_PI + M_PI;
   //
   done=Standard_True;
   identical = Standard_False;
@@ -745,7 +745,7 @@ void IntAna_IntQuadQuad::Perform(const gp_Cone& Cone,
   //                     2
   //        f(z,t)=A(t)*z + B(t)*z + C(t)      Discriminant(t) != 0 
   //
-  if(!nbsol && (MTF.Value(PI)<0.) ) {
+  if(!nbsol && (MTF.Value(M_PI)<0.) ) {
     //-- Discriminant signe constant negatif
     return;
   }
index 21c2304b3680d09cf76f3fe48edee0b5ae300bc9..c065453d9bfb649fbf4e2b17ee1dfb0ccaaf479b 100755 (executable)
@@ -387,9 +387,9 @@ gp_Ax2 DirToAx2(const gp_Pnt& P,const gp_Dir& D)
   gp_Vec ldv( axec.Direction() );
   gp_Vec npv( normp );
   Standard_Real dA = Abs( ldv.Angle( npv ) );
-  if( dA > (PI/4.) )
+  if( dA > (M_PI/4.) )
     {
-      Standard_Real dang = Abs( ldv.Angle( npv ) ) - PI/2.;
+      Standard_Real dang = Abs( ldv.Angle( npv ) ) - M_PI/2.;
       Standard_Real dangle = Abs( dang );
       if( dangle > Tolang )
        {
@@ -947,7 +947,7 @@ gp_Ax2 DirToAx2(const gp_Pnt& P,const gp_Dir& D)
       
       Standard_Real A=DirCyl1.Angle(DirCyl2);
       Standard_Real B;
-      B=Abs(Sin(0.5*(PI-A)));
+      B=Abs(Sin(0.5*(M_PI-A)));
       A=Abs(Sin(0.5*A));
       
       if(A==0.0 || B==0.0) {
@@ -1308,7 +1308,7 @@ gp_Ax2 DirToAx2(const gp_Pnt& P,const gp_Dir& D)
     // Preliminary analysis. Determination of iRet
     //
     iRet=0;
-    aHalfPI=0.5*PI;
+    aHalfPI=0.5*M_PI;
     aD1=1.;
     aPA1.SetCoord(aD1, 0.);
     aP0.SetCoord(0., 0.);
@@ -1317,7 +1317,7 @@ gp_Ax2 DirToAx2(const gp_Pnt& P,const gp_Dir& D)
     aAx2=Con2.Axis();
     aGamma=aAx1.Angle(aAx2);
     if (aGamma>aHalfPI){
-      aGamma=PI-aGamma;
+      aGamma=M_PI-aGamma;
     }
     aCosGamma=Cos(aGamma);
     aSinGamma=Sin(aGamma);
@@ -1485,8 +1485,8 @@ gp_Ax2 DirToAx2(const gp_Pnt& P,const gp_Dir& D)
 
 
     //Other generatrixes of cones laying in maximal plane
-    gp_Lin aGen1 = aGen.Rotated(Con1.Axis(), Standard_PI); 
-    gp_Lin aGen2 = aGen.Rotated(Con2.Axis(), Standard_PI); 
+    gp_Lin aGen1 = aGen.Rotated(Con1.Axis(), M_PI); 
+    gp_Lin aGen2 = aGen.Rotated(Con2.Axis(), M_PI); 
     //
     //Intersection point of generatrixes
     gp_Dir aN; //solution plane normal
index 5fc149a26b59446cd018afdf7b4c9b28a5e66955..272690893e366d55833c691547b0211d43450e00 100755 (executable)
@@ -44,8 +44,8 @@ void IntAna2d_AnaIntersection::Perform (const gp_Circ2d& C1,
     Standard_Real XS = ( C1.Location().X()*R2 + C2.Location().X()*R1 ) / sum;
     Standard_Real YS = ( C1.Location().Y()*R2 + C2.Location().Y()*R1 ) / sum;
     Standard_Real ang1=Ox1.Angle(ax);                     // Resultat entre -PI et +PI
-    Standard_Real ang2=Ox2.Angle(ax) + PI;
-    if (ang1<0) {ang1=2*PI+ang1;}                // On revient entre 0 et 2PI
+    Standard_Real ang2=Ox2.Angle(ax) + M_PI;
+    if (ang1<0) {ang1=2*M_PI+ang1;}                // On revient entre 0 et 2PI
     lpnt[0].SetValue(XS,YS,ang1,ang2);
   }
   else if (((sum-d)>Epsilon(d)) && ((d-dif)>Epsilon(d))) {
@@ -85,42 +85,42 @@ void IntAna2d_AnaIntersection::Perform (const gp_Circ2d& C1,
     }
     else {
       ang1=ASin(sint1);
-      if (cost1<0.0) {ang1=PI-ang1;}
+      if (cost1<0.0) {ang1=M_PI-ang1;}
     }
     if (Abs(cost2)<=0.707) {
       ang2=ACos(cost2);
     }
     else {
       ang2=ASin(sint2);
-      if (cost2<0.0) {ang2=PI-ang2;}
+      if (cost2<0.0) {ang2=M_PI-ang2;}
     }
     Standard_Real ang11=ref1+ang1;
     Standard_Real ang21=ref2+ang2;
     Standard_Real ang12=ref1-ang1;
     Standard_Real ang22=ref2-ang2;
     if (ang11<0.) {
-      ang11=2*PI+ang11;
+      ang11=2*M_PI+ang11;
     }
-    else if (ang11>=2*PI) {
-      ang11=ang11-2*PI;
+    else if (ang11>=2*M_PI) {
+      ang11=ang11-2*M_PI;
     }
     if (ang21<0.) {
-      ang21=2*PI+ang21;
+      ang21=2*M_PI+ang21;
     }
-    else if (ang21>=2*PI) {
-      ang21=ang21-2*PI;
+    else if (ang21>=2*M_PI) {
+      ang21=ang21-2*M_PI;
     }
     if (ang12<0.) {
-      ang12=2*PI+ang12;
+      ang12=2*M_PI+ang12;
     }
-    else if (ang12>=2*PI) {
-      ang12=ang12-2*PI;
+    else if (ang12>=2*M_PI) {
+      ang12=ang12-2*M_PI;
     }
     if (ang22<0.) {
-      ang22=2*PI+ang22;
+      ang22=2*M_PI+ang22;
     }
-    else if (ang22>=2*PI) {
-      ang22=ang22-2*PI;
+    else if (ang22>=2*M_PI) {
+      ang22=ang22-2*M_PI;
     }
     lpnt[0].SetValue(XS1,YS1,ang11,ang21);
     lpnt[1].SetValue(XS2,YS2,ang12,ang22);
@@ -135,8 +135,8 @@ void IntAna2d_AnaIntersection::Perform (const gp_Circ2d& C1,
     gp_Vec2d Ox2(C2.XAxis().Direction());
     Standard_Real ang1=Ox1.Angle(ax);                       // Resultat entre -PI et +PI
     Standard_Real ang2=Ox2.Angle(ax);
-    if (ang1<0) {ang1=2*PI+ang1;}                  // On revient entre 0 et 2PI
-    if (ang2<0) {ang2=2*PI+ang2;}                  // On revient entre 0 et 2PI
+    if (ang1<0) {ang1=2*M_PI+ang1;}                  // On revient entre 0 et 2PI
+    if (ang2<0) {ang2=2*M_PI+ang2;}                  // On revient entre 0 et 2PI
     Standard_Real XS = ( C1.Location().X()*R2 - C2.Location().X()*R1 ) / (R2 - R1);
     Standard_Real YS = ( C1.Location().Y()*R2 - C2.Location().Y()*R1 ) / (R2 - R1);
     lpnt[0].SetValue(XS,YS,ang1,ang2);
index 8977a67da937557dec09266c8b8235aab02e918b..287dcbba1f696cdb7dcaff22600c97abf24e48c8 100755 (executable)
@@ -30,7 +30,7 @@ void IntAna2d_AnaIntersection::Perform(const gp_Lin2d& L,
     //modified by NIZNHY-PKV Fri Jun 15 09:55:00 2007f
     //Standard_Real ang;
     //ang = C.XAxis().Direction().Angle(L.Direction());
-    //ang = ang + PI / 2.0;
+    //ang = ang + M_PI / 2.0;
     //modified by NIZNHY-PKV Fri Jun 15 09:55:29 2007t
     if (Abs(Abs(d)-C.Radius())<=Epsilon(C.Radius())) {    // Cas de tangence
       
@@ -47,12 +47,12 @@ void IntAna2d_AnaIntersection::Perform(const gp_Lin2d& L,
       /*
       u=B*(L.Location().X()-C.Location().X()) -
        A*(L.Location().Y()-C.Location().Y());
-      if (d<0.0) {ang=ang+PI;}
-      if (ang>=2.0*PI) {
-       ang=ang-2.0*PI;
+      if (d<0.0) {ang=ang+M_PI;}
+      if (ang>=2.0*M_PI) {
+       ang=ang-2.0*M_PI;
       }
       else if (ang<0.0) {
-       ang=ang+2.0*PI;
+       ang=ang+2.0*M_PI;
       }
       */
       //modified by NIZNHY-PKV Fri Jun 15 09:55:41 2007t
@@ -85,22 +85,22 @@ void IntAna2d_AnaIntersection::Perform(const gp_Lin2d& L,
       }
       else {
        angt=ASin(sint);
-       if (cost<0) {angt=PI-angt;}
+       if (cost<0) {angt=M_PI-angt;}
       }
       
       ang1=ang-angt;
       ang2=ang+angt;
       if (ang1<0.0) {
-       ang1=ang1+2.0*PI;
+       ang1=ang1+2.0*M_PI;
       }
-      else if (ang1>=2.0*PI) {
-       ang1=ang1-2.0*PI;
+      else if (ang1>=2.0*M_PI) {
+       ang1=ang1-2.0*M_PI;
       }
       if (ang2<0.0) {
-       ang2=ang2+2.0*PI;
+       ang2=ang2+2.0*M_PI;
       }
-      else if (ang2>=2.0*PI) {
-       ang2=ang2-2.0*PI;
+      else if (ang2>=2.0*M_PI) {
+       ang2=ang2-2.0*M_PI;
       }
 
       u1=B*(L.Location().X()-C.Location().X()) -
index 4d682845d61cf1686c3c3417cf94ca4f3f9bbe17..9b023191d1b70ecb4a51475b646cd94d9489d7b9 100755 (executable)
@@ -35,7 +35,7 @@ void IntAna2d_AnaIntersection::Perform(const gp_Circ2d& Circle,
    ps  = 2.0*E*radius;                                 // SIN
    pcte= F + pss;                                      // 1
 
-   math_TrigonometricFunctionRoots Sol(pcc,p2sc,pc,ps,pcte,0.0,2.0*PI);
+   math_TrigonometricFunctionRoots Sol(pcc,p2sc,pc,ps,pcte,0.0,2.0*M_PI);
 
    if(!Sol.IsDone()) {
      cout << "\n\nmath_TrigonometricFunctionRoots -> NotDone\n\n"<<endl;
@@ -55,7 +55,7 @@ void IntAna2d_AnaIntersection::Perform(const gp_Circ2d& Circle,
        ty= radius*Sin(S); 
        Coord_Ancien_Repere(tx,ty,Axe_rep);
        if(!CIsDirect) 
-        S = PI+PI-S;
+        S = M_PI+M_PI-S;
        lpnt[i-1].SetValue(tx,ty,S);
      }        
      Traitement_Points_Confondus(nbp,lpnt);
index 09bee5c5247cb1f3b462a70fe37291ac5dc8d528..49275a72d2658d0ecf4ef940989da7b1dc94e6a5 100755 (executable)
@@ -36,7 +36,7 @@ void IntAna2d_AnaIntersection::Perform(const gp_Elips2d& Elips,
   ps= 2.0*E*minor_radius;                             // SIN
   pcte=F+pss;                                         // 1
   
-  math_TrigonometricFunctionRoots Sol(pcc,p2sc,pc,ps,pcte,0.0,2.0*PI);
+  math_TrigonometricFunctionRoots Sol(pcc,p2sc,pc,ps,pcte,0.0,2.0*M_PI);
 
   if (!Sol.IsDone()) {
     done=Standard_False;
@@ -55,7 +55,7 @@ void IntAna2d_AnaIntersection::Perform(const gp_Elips2d& Elips,
       ty=minor_radius*Sin(S);
       Coord_Ancien_Repere(tx,ty,Axe_rep);
       if(!EIsDirect) 
-       S = PI+PI-S;
+       S = M_PI+M_PI-S;
       lpnt[i-1].SetValue(tx,ty,S);
     }
     Traitement_Points_Confondus(nbp,lpnt);
index d473569dcee2ff47db7b7869d78ef441961c8f12..b2f8df19b9d57160d928f0b94b8df7d2147f6736 100755 (executable)
@@ -287,7 +287,7 @@ Standard_Real IntCurve_IConicTool::FindParameter(const gp_Pnt2d& P) const {
     
   case GeomAbs_Circle:
     Param=ElCLib::CircleParameter(Axis,P);
-    if(Param<0.0) { Param+=PI+PI; }
+    if(Param<0.0) { Param+=M_PI+M_PI; }
     break;
     
   case GeomAbs_Ellipse: {
@@ -295,7 +295,7 @@ Standard_Real IntCurve_IConicTool::FindParameter(const gp_Pnt2d& P) const {
                                   ,Elips_a
                                   ,Elips_b
                                   ,P);
-    if (Param < 0.0) { Param+=PI+PI; }
+    if (Param < 0.0) { Param+=M_PI+M_PI; }
     break;
   }
     
index 4c7da47a2cada8c72fb14e4a90197e33b83f256b..fa515d1631ecc50343d734286802bf145b1cff1e 100755 (executable)
@@ -196,7 +196,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d&        L,
   Inter.SetReversedParameters(ReversedParameters());
   if(! DE.IsClosed()) {
     IntRes2d_Domain D(DE);
-    D.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
+    D.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
     Inter.Perform(ITool,DL,PCurve,D,TolConf,Tol);
     }
   else { 
@@ -298,7 +298,7 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d&       C,
 
   IntRes2d_Domain D(DC);
   if(! DC.IsClosed()) {
-    D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+PI+PI);
+    D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+M_PI+M_PI);
   }
   
   Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
@@ -374,10 +374,10 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d&       C,
 
   if(! DC.IsClosed()) {
     IntRes2d_Domain D1(DC);
-    D1.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+PI+PI);
+    D1.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+M_PI+M_PI);
     if(! DE.IsClosed()) {
       IntRes2d_Domain D2(DE);
-      D2.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
+      D2.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
       Inter.Perform(ITool,D1,PCurve,D2,TolConf,Tol);
     }
     else { 
@@ -387,7 +387,7 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d&       C,
   else { 
     if(! DE.IsClosed()) {
       IntRes2d_Domain D2(DE);
-      D2.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
+      D2.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
       Inter.Perform(ITool,DC,PCurve,D2,TolConf,Tol);
     }
     else { 
@@ -416,7 +416,7 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d&       C,
   IntRes2d_Domain D(DC);
 
   if(! DC.IsClosed()) {
-    D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+PI+PI); 
+    D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+M_PI+M_PI); 
   }
   Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
   gp_Pnt2d Pntinf,Pntsup;
@@ -562,7 +562,7 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d&      E,
 
   IntRes2d_Domain D(DE);
   if(! DE.IsClosed()) {
-    D.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
+    D.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
   }  
 
   //-- cout<<" Parab Elips "<<endl;
@@ -720,10 +720,10 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d&      E1,
 
   if(! DE1.IsClosed()) {
     IntRes2d_Domain D1(DE1);
-    D1.SetEquivalentParameters(DE1.FirstParameter(),DE1.FirstParameter()+PI+PI);
+    D1.SetEquivalentParameters(DE1.FirstParameter(),DE1.FirstParameter()+M_PI+M_PI);
     if(! DE2.IsClosed()) {
       IntRes2d_Domain D2(DE2);
-      D2.SetEquivalentParameters(DE2.FirstParameter(),DE2.FirstParameter()+PI+PI);
+      D2.SetEquivalentParameters(DE2.FirstParameter(),DE2.FirstParameter()+M_PI+M_PI);
       Inter.Perform(ITool,D1,PCurve,D2,TolConf,Tol);
     }
     else { 
@@ -733,7 +733,7 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d&      E1,
   else { 
     if(! DE2.IsClosed()) {
       IntRes2d_Domain D2(DE2);
-      D2.SetEquivalentParameters(DE2.FirstParameter(),DE2.FirstParameter()+PI+PI);
+      D2.SetEquivalentParameters(DE2.FirstParameter(),DE2.FirstParameter()+M_PI+M_PI);
       Inter.Perform(ITool,DE1,PCurve,D2,TolConf,Tol);
     }
     else { 
@@ -762,7 +762,7 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d&      E,
   IntRes2d_Domain DEModif(DE);
 
   if(! DE.IsClosed()) {
-    DEModif.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
+    DEModif.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
   }
   
   Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
index d3348c5775b41c788faaf8f4ae5b5014b21aaddd..6c5875118b36f75982b055f3b073d990f270c68b 100755 (executable)
@@ -30,7 +30,7 @@ Standard_Boolean AffichageGraph=Standard_True;
 #define TOLERANCE_ANGULAIRE 1.e-15 //the reason is at least to make an accordance between transition and position computation.
 //modified by NIZHNY-MKK  Tue Feb 15 10:53:45 2000.END
 
-const Standard_Real PIsur2 = 0.5*PI;
+const Standard_Real PIsur2 = 0.5*M_PI;
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 IntRes2d_Position FindPositionLL(Standard_Real&,const IntRes2d_Domain&);
@@ -69,7 +69,7 @@ void ProjectOnC2AndIntersectWithC2Domain(const gp_Circ2d& Circle1
   PeriodicInterval C2Inter(C2inf,C2sup);
 
   if(!IdentCircles) {
-    if(C2Inter.Length() > PI)
+    if(C2Inter.Length() > M_PI)
       C2Inter.Complement();
   }
   else {
@@ -102,7 +102,7 @@ void ProjectOnC2AndIntersectWithC2Domain(const gp_Circ2d& Circle1
 
       SolutionC1[NbSolTotal]=PeriodicInterval(C1inf,C1sup);
       if(!IdentCircles) {
-       if(SolutionC1[NbSolTotal].Length() > PI)
+       if(SolutionC1[NbSolTotal].Length() > M_PI)
          SolutionC1[NbSolTotal].Complement();
       }
       else {
@@ -282,12 +282,12 @@ void CircleCircleGeometricIntersection(const gp_Circ2d& C1
   //-- (permet de ne pas gerer trop de cas differents)
 
   C1_Res1.SetValues(C1_binf1,C1_bsup1);
-  if(C1_Res1.Length() > PI) C1_Res1.Complement();
+  if(C1_Res1.Length() > M_PI) C1_Res1.Complement();
 
   if(nbsol==2) {
     C1_binf2+=dAngle1;  C1_bsup2+=dAngle1;
     C1_Res2.SetValues(C1_binf2,C1_bsup2);
-    if(C1_Res2.Length() > PI) C1_Res2.Complement();
+    if(C1_Res2.Length() > M_PI) C1_Res2.Complement();
   }
   else {
     C1_Res2.SetNull(); 
@@ -371,7 +371,7 @@ void ProjectOnLAndIntersectWithLDomain(const gp_Circ2d& Circle
 #endif
     if(Cinf>=Csup) { Cinf = CDomainAndRes.Binf; Csup = CDomainAndRes.Bsup; } 
     CircleSolution[NbSolTotal]=PeriodicInterval(Cinf,Csup);
-    if(CircleSolution[NbSolTotal].Length() > PI)
+    if(CircleSolution[NbSolTotal].Length() > M_PI)
       CircleSolution[NbSolTotal].Complement();
     
     LineSolution[NbSolTotal]=LInterAndDomain;
@@ -514,7 +514,7 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
 
 
   CInt1.SetValues(binf1,bsup1);
-  if(CInt1.Length() > PI) CInt1.Complement();
+  if(CInt1.Length() > M_PI) CInt1.Complement();
   
 
   if(nbsol==2) {
@@ -527,7 +527,7 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
     }
 
     CInt2.SetValues(binf2,bsup2);
-    if(CInt2.Length() > PI) CInt2.Complement();
+    if(CInt2.Length() > M_PI) CInt2.Complement();
   }
 //  Modified by Sergey KHROMOV - Thu Oct 26 17:51:05 2000 Begin
   else {
@@ -537,9 +537,9 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
       bsup2 = PIpPI;
       binf1 = 0.;
       CInt1.SetValues(binf1,CInt1.Bsup - PIpPI);
-      if(CInt1.Length() > PI) CInt1.Complement();
+      if(CInt1.Length() > M_PI) CInt1.Complement();
       CInt2.SetValues(binf2,bsup2);
-      if(CInt2.Length() > PI) CInt2.Complement();
+      if(CInt2.Length() > M_PI) CInt2.Complement();
     }
   }
 //  Modified by Sergey KHROMOV - Thu Oct 26 17:51:13 2000 End
index 6e598168ea3abe28794372c4742b465df871373b..c705b6ab8364aa79e9f102d2dfc0c4417aad71ea 100755 (executable)
@@ -20,7 +20,7 @@
 #include <gp.hxx>
 
 
-static Standard_Real PIpPI = Standard_PI+Standard_PI;
+static Standard_Real PIpPI = M_PI + M_PI;
 
 //======================================================================
 //==========          P R O T O T Y P E S                   ============
index 02581b28035a794ad01864a12f6c782f40c7106c..4720fae4cfbaee9dbac8d6bfc59b6d6f233aa007 100755 (executable)
@@ -17,7 +17,7 @@ IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen (const gp_Circ2d& C,
                                                      const Standard_Real Tol) {
   if(!D1.IsClosed()) {
     IntRes2d_Domain D(D1);
-    D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+PI+PI);
+    D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
     Perform(IntCurve_IConicTool(C),D,PCurve,D2,TolConf,Tol);
     //-- Standard_ConstructionError::Raise("Domaine incorrect");
   }
@@ -34,7 +34,7 @@ IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen (const gp_Elips2d& E,
                                                      const Standard_Real Tol) {
   if(!D1.IsClosed()) {
     IntRes2d_Domain D(D1);
-    D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+PI+PI);
+    D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
     Perform(IntCurve_IConicTool(E),D,PCurve,D2,TolConf,Tol);
     //-- Standard_ConstructionError::Raise("Domaine incorrect");
   }
index 463eea81f79fc6ea70117eca3450de6d48b837db..e6d068f2d6b7a854f1d913e80db8f1c44692e38d 100755 (executable)
@@ -50,7 +50,7 @@ inline void IntCurve_IntConicCurveGen::Perform (const gp_Circ2d& C,
                                                const Standard_Real Tol) {
   if(!D1.IsClosed()) {
     IntRes2d_Domain D(D1);
-    D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+PI+PI);
+    D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
     Perform(IntCurve_IConicTool(C),D,PCurve,D2,TolConf,Tol);
     //-- Standard_ConstructionError::Raise("Domaine incorrect");
   }
@@ -67,7 +67,7 @@ inline void IntCurve_IntConicCurveGen::Perform (const gp_Elips2d& E,
                                                const Standard_Real Tol) {
   if(!D1.IsClosed()) {
     IntRes2d_Domain D(D1);
-    D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+PI+PI);
+    D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
     Perform(IntCurve_IConicTool(E),D,PCurve,D2,TolConf,Tol);
   }
   else { 
index ac4b1275560d3fda448d719e59efb1845906bac5..d63e5024da6a5fe78e0018fd8adcefc92ab81f72 100755 (executable)
@@ -125,7 +125,7 @@ IntRes2d_Domain IntCurve_IntCurveCurveGen::ComputeDomain(const TheCurve& C1,
     gp_Pnt2d P2(TheCurveTool::Value(C1,lastparameter));
     D1.SetValues(P1,firstparameter  ,TolDomain,
                 P2,lastparameter   ,TolDomain);
-    D1.SetEquivalentParameters(firstparameter,firstparameter+PI+PI);
+    D1.SetEquivalentParameters(firstparameter,firstparameter+M_PI+M_PI);
     break; 
   }
   default: { 
index 9dcb9dbdad1b7176e3315da90a0ac6d0df3f7012..6a72a59e94f23ee597fa736046797c59d0cbc4c9 100755 (executable)
@@ -32,7 +32,7 @@ Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
 
   case GeomAbs_Circle:
     Param=ElCLib::CircleParameter(ThePConic.Axis2(),P);
-    if(Param<0.0) { Param+=PI+PI; }
+    if(Param<0.0) { Param+=M_PI+M_PI; }
     break;
 
   case GeomAbs_Ellipse: {
@@ -40,7 +40,7 @@ Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
                           ,ThePConic.Param1()
                           ,ThePConic.Param2()
                           ,P);
-    if (Param < 0.0) { Param+=PI+PI; }
+    if (Param < 0.0) { Param+=M_PI+M_PI; }
     break;
   }
 
@@ -84,7 +84,7 @@ Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
     
   case GeomAbs_Circle:
     Param=ElCLib::CircleParameter(ThePConic.Axis2(),P);
-    if(Param<0.0) { Param+=PI+PI; }
+    if(Param<0.0) { Param+=M_PI+M_PI; }
     break;
 
   case GeomAbs_Ellipse: {
@@ -92,7 +92,7 @@ Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
                           ,ThePConic.Param1()
                           ,ThePConic.Param2()
                           ,P);
-    if (Param < 0.0) { Param+=PI+PI; }
+    if (Param < 0.0) { Param+=M_PI+M_PI; }
     break;
   }
 
index 1e7fe2a960d4b8436e7df0ff9977f84fb2145252..3c1a7d74b0e2345c22a972c02dea45d96a0f5694 100755 (executable)
@@ -1197,7 +1197,7 @@ void IntCurveSurface_Inter::PerformConicSurf(const gp_Lin&   Line,
       //OCC516(apo)->
       static Standard_Real correction = 1.E+5*Precision::Angular();
       gp_Cone cn = TheSurfaceTool::Cone(surface);
-      if(Abs(cn.SemiAngle()) < PI/2.0 - correction){
+      if(Abs(cn.SemiAngle()) < M_PI/2.0 - correction){
        IntAna_IntConicQuad LinCone(Line,cn);
        AppendIntAna(curve,surface,LinCone);
        break;
@@ -2009,7 +2009,7 @@ static void EstLimForInfRevl(const gp_Lin&   Line,
     if (U1inf)
       U1new = Max (0., U1new);
     else
-      U2new = Min (2 * PI, U2new);
+      U2new = Min (2 * M_PI, U2new);
     if (! V1inf && !V2inf) return;
   }
 
@@ -2065,7 +2065,7 @@ static void EstLimForInfRevl(const gp_Lin&   Line,
   aPln  = gp_Pln (gp_Ax3 (O, aNVec ,aXVec));
 
   // make a second plane perpendicular to the first one, rotated around aXVec
-  gp_Pln aPlnPrp = aPln.Rotated (gp_Ax1 (O,aXVec), PI/2.);
+  gp_Pln aPlnPrp = aPln.Rotated (gp_Ax1 (O,aXVec), M_PI/2.);
   
   // project Line and it's X-axe symmetric one to plane and intersect
   // resulting curve with projection of Basic Curev
@@ -2154,7 +2154,7 @@ static void EstLimForInfOffs(const gp_Lin&   Line,
       aCyl.SetRadius(aR);
     }
     else if ( aR <= -TOLTANGENCY ){
-      anA.Rotate(gp_Ax1(anA.Location(), anA.Direction()), PI);
+      anA.Rotate(gp_Ax1(anA.Location(), anA.Direction()), M_PI);
       aCyl.SetPosition(anA);
 // modified by NIZHNY-MKK  Mon Oct  3 17:37:54 2005
 //       aCyl.SetRadius(Abs(aR));
index 5154df32be97c327ef7ce935b669a64bd5dce465..28e1c12be078f961791a0e098fefe10f7d1c1852 100755 (executable)
@@ -29,7 +29,7 @@
 #define EPSX    ParTool::EpsX(TheParCurve)
 #define NB_ECHANTILLONS 
 
-static Standard_Real PIpPI = Standard_PI+Standard_PI;
+static Standard_Real PIpPI = M_PI + M_PI;
 
 
 
index 1a84e89297a1f056ef7936cada2b75a7046f2dd1..35da104491cf3db3f2c2e0551a88c1f076454b7d 100755 (executable)
@@ -240,7 +240,7 @@ void IntPatch_ALine::ComputeVertexParameters(const Standard_Real Tol) {
   for(i=1; i<=nbvtx; i++) { 
     IntPatch_Point& VTX   = svtx.ChangeValue(i); 
     Standard_Real p=VTX.ParameterOnLine();
-    Standard_Real pmpimpi=p-PI-PI;
+    Standard_Real pmpimpi=p-M_PI-M_PI;
     if(pmpimpi >= ParamMinOnLine) { 
       gp_Pnt P1 = Value(pmpimpi);
       Standard_Real d1 = P1.Distance(VTX.Value());
@@ -250,7 +250,7 @@ void IntPatch_ALine::ComputeVertexParameters(const Standard_Real Tol) {
        svtx.Append(OVTX);
       }
     }
-    pmpimpi=p+PI+PI;
+    pmpimpi=p+M_PI+M_PI;
     if(pmpimpi <= ParamMaxOnLine) { 
       gp_Pnt P1 = Value(pmpimpi);
       Standard_Real d1 = P1.Distance(VTX.Value());
index 3454d260a1a20f5eb233cfcf2ddbbe838adc1360..730cce1bdce06cabeea78aed3205377d2f7ef1b4 100755 (executable)
@@ -845,7 +845,7 @@ static
   case GeomAbs_Cylinder:
   case GeomAbs_Cone:
   case GeomAbs_Sphere:
-    pu1=PI+PI;
+    pu1=M_PI+M_PI;
     break;
   default:
     break;
@@ -854,7 +854,7 @@ static
   case GeomAbs_Cylinder:
   case GeomAbs_Cone:
   case GeomAbs_Sphere:
-    pu2=PI+PI;
+    pu2=M_PI+M_PI;
     break;
   default:
     break;
@@ -928,7 +928,7 @@ void RecadreMemePeriode(const IntSurf_Quadric aQuad1,
   bBothCylinders=(aType1==GeomAbs_Cylinder && aType2==GeomAbs_Cylinder);
   //
   while(anu1-u1 > 5.0) {
-    u1+=PI+PI;
+    u1+=M_PI+M_PI;
   }
   while(u1-anu1 > 5.0) { 
     //
@@ -942,28 +942,28 @@ void RecadreMemePeriode(const IntSurf_Quadric aQuad1,
       //
       // In any case the pb does not deal with apex problem. 
       //
-      if (u1-PI-PI<0.) {
+      if (u1-M_PI-M_PI<0.) {
        break;
       }
     }
     */
     //
-    u1-=PI+PI;
+    u1-=M_PI+M_PI;
   }
   while(anu2-u2 > 5.0) { 
-    u2+=PI+PI;
+    u2+=M_PI+M_PI;
   }
   while(u2-anu2 > 5.0) {
     //
     /*
     if (!bBothCylinders) {//cfe900/H6
-      if (u2-PI-PI<0.) {
+      if (u2-M_PI-M_PI<0.) {
        break;
       }
     }
     */
     //
-    u2-=PI+PI;
+    u2-=M_PI+M_PI;
   }
 }
 
@@ -1028,7 +1028,7 @@ Standard_Boolean IsApex(const IntSurf_Quadric& aQuadric,
   //
   // apex on the Sphere
   if(aType==GeomAbs_Sphere) {
-    aHalfPi=0.5*PI;
+    aHalfPi=0.5*M_PI;
     if (fabs(aVx-aHalfPi)<aEpsilon) {
       bFlag=!bFlag;
     }
@@ -1112,7 +1112,7 @@ void RefineParameters(const Handle(IntPatch_ALine)& aALine,
   //
   // apex on the Sphere
   if(aType==GeomAbs_Sphere) {
-    aHalfPi=0.5*PI;
+    aHalfPi=0.5*M_PI;
     //
     if (fabs(aVx-aHalfPi)<aEpsilon) {
       aLimV=aHalfPi;
@@ -1122,7 +1122,7 @@ void RefineParameters(const Handle(IntPatch_ALine)& aALine,
     }
     else {
       //Check: aUx must be 0 or 2*pi
-      if(fabs(aUx) < aEpsilon || fabs(aUx - 2.*PI) < aEpsilon) {
+      if(fabs(aUx) < aEpsilon || fabs(aUx - 2.*M_PI) < aEpsilon) {
        //aUx = 0 or 2*pi, but may be it must be 2*pi or 0?
        bFound=FindNearParameter(aALine, aTx, iDir, aTol3D, aT1);
        if(!bFound) {
@@ -1136,8 +1136,8 @@ void RefineParameters(const Handle(IntPatch_ALine)& aALine,
        aP1=aALine->Value(aT1);
        aQuadric.Parameters(aP1, aU1, aV1);
 
-       if(fabs(aU1) > fabs(aU1 - 2.*PI)) {
-         aUx = 2.*PI;
+       if(fabs(aU1) > fabs(aU1 - 2.*M_PI)) {
+         aUx = 2.*M_PI;
        }
        else {
          aUx = 0.;
index d231a3829dc8faed13b44f6d4ad5dc58526de6a2..dafa6b498a8098c696bc3c95fa6231807b445672 100755 (executable)
@@ -327,8 +327,8 @@ void IntPatch_GLine::AddVertex (const IntPatch_Point& Pnt)
     if(ArcType()==IntPatch_Circle || ArcType()==IntPatch_Ellipse)
     {
       if(fipt && lapt) {
-        while(par<pf) par+=PI+PI;
-        while(par>pl) par-=PI+PI;
+        while(par<pf) par+=M_PI+M_PI;
+        while(par>pl) par-=M_PI+M_PI;
         if(par<pf) { 
           const Standard_Real PrecisionPConfusion ( Precision::PConfusion()*1000.0 );
           if((pf-par)>PrecisionPConfusion) {
@@ -640,7 +640,7 @@ void IntPatch_GLine::ComputeVertexParameters(const Standard_Real /*Tol*/)
              Standard_Real ponline = VTX.ParameterOnLine();
              // eap, =>>
              Standard_Real newParam = ponline;
-             const Standard_Real PiPi = PI+PI;
+             const Standard_Real PiPi = M_PI+M_PI;
              Standard_Boolean is2PI = ( Abs(ponline-PiPi) <= PrecisionPConfusion );
 
              if (nbvtx > 2 && // do this check if seam edge only gives vertices 
@@ -654,7 +654,7 @@ void IntPatch_GLine::ComputeVertexParameters(const Standard_Real /*Tol*/)
              else 
                newParam -= PiPi;
 //           if(  (Abs(ponline)<=PrecisionPConfusion)
-//                ||(Abs(ponline-PI-PI) <=PrecisionPConfusion)) 
+//                ||(Abs(ponline-M_PI-M_PI) <=PrecisionPConfusion)) 
              // eap, <<=
                Standard_Real u1a,v1a,u2a,v2a,u1b,v1b,u2b,v2b; 
                VTXM1.Parameters(u1a,v1a,u2a,v2a);
@@ -701,7 +701,7 @@ void IntPatch_GLine::ComputeVertexParameters(const Standard_Real /*Tol*/)
                    ///////////////////////////////////////////////
                    // eap, =>>
 //                   if (Abs(ponline) <= PrecisionPConfusion) { 
-//                   const Standard_Real PiPi = PI+PI;
+//                   const Standard_Real PiPi = M_PI+M_PI;
                      if(newParam >= ParamMinOnLine && newParam <= ParamMaxOnLine
                         /*PiPi >= ParamMinOnLine && PiPi<=ParamMaxOnLine*/) { 
                        SortAgain = Standard_True;
@@ -743,7 +743,7 @@ void IntPatch_GLine::ComputeVertexParameters(const Standard_Real /*Tol*/)
                    ///////////////////////////////////////////////
                    // eap, =>>
 //                 if (Abs(ponline) <= PrecisionPConfusion) { 
-//                   const Standard_Real PiPi = PI+PI;
+//                   const Standard_Real PiPi = M_PI+M_PI;
                      if(newParam >= ParamMinOnLine && newParam <= ParamMaxOnLine
                         /*PiPi >= ParamMinOnLine && PiPi<=ParamMaxOnLine*/) {
                        SortAgain = Standard_True;
index 76773ff36d173d3c112a0cbac39480cbbcb1fc5d..32705947f44d64ae9465eb2f8785e2025ab7ccc7 100755 (executable)
@@ -300,7 +300,7 @@ static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1,
      }
   }
   if(myHS1IsUPeriodic) {
-    lmf = PI+PI; //-- myHS1->UPeriod();
+    lmf = M_PI+M_PI; //-- myHS1->UPeriod();
     f = myHS1->FirstUParameter();
     l = myHS1->LastUParameter();
     fpls2=0.5*(f+l);
@@ -309,7 +309,7 @@ static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1,
     
   }
   if(myHS1IsVPeriodic) {
-    lmf = PI+PI; //-- myHS1->VPeriod(); 
+    lmf = M_PI+M_PI; //-- myHS1->VPeriod(); 
     f = myHS1->FirstVParameter();
     l = myHS1->LastVParameter();
     fpls2=0.5*(f+l);
@@ -319,7 +319,7 @@ static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1,
     //--    while(v1 > l) { v1-=lmf; }
   }
   if(myHS2IsUPeriodic) { 
-    lmf = PI+PI; //-- myHS2->UPeriod();
+    lmf = M_PI+M_PI; //-- myHS2->UPeriod();
     f = myHS2->FirstUParameter();
     l = myHS2->LastUParameter();
     fpls2=0.5*(f+l);
@@ -329,7 +329,7 @@ static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1,
     //-- while(u2 > l) { u2-=lmf; }
   }
   if(myHS2IsVPeriodic) { 
-    lmf = PI+PI; //-- myHS2->VPeriod();
+    lmf = M_PI+M_PI; //-- myHS2->VPeriod();
     f = myHS2->FirstVParameter();
     l = myHS2->LastVParameter();
     fpls2=0.5*(f+l);
@@ -957,8 +957,8 @@ Standard_Boolean FindLine (gp_Pnt& Psurf,
       {
        para = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Circle(),Psurf);
        if ((para <= upper && para >= lower) ||
-           (para + 2.*PI <=upper && para + 2.*PI >= lower) ||
-           (para - 2.*PI <=upper && para - 2.*PI >= lower)) {
+           (para + 2.*M_PI <=upper && para + 2.*M_PI >= lower) ||
+           (para - 2.*M_PI <=upper && para - 2.*M_PI >= lower)) {
          pt = ElCLib::Value(para,(*((Handle(IntPatch_GLine)*)&lin))->Circle());
          dist = Psurf.Distance(pt);
          if (dist< distmin) {
@@ -973,8 +973,8 @@ Standard_Boolean FindLine (gp_Pnt& Psurf,
       {
        para = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Ellipse(),Psurf);
        if ((para <= upper && para >= lower) ||
-           (para + 2.*PI <=upper && para + 2.*PI >= lower) ||
-           (para - 2.*PI <=upper && para - 2.*PI >= lower)) {
+           (para + 2.*M_PI <=upper && para + 2.*M_PI >= lower) ||
+           (para - 2.*M_PI <=upper && para - 2.*M_PI >= lower)) {
          pt = ElCLib::Value(para,(*((Handle(IntPatch_GLine)*)&lin))->Ellipse());
          dist = Psurf.Distance(pt);
          if (dist< distmin) {
index da1aac68c8d32ee97cb193f56c1cdecff573f56a..c5801c2bf137b9c945fecc34a82da90932dc406e 100755 (executable)
@@ -432,7 +432,7 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)&  S1,
     }
       break;
     case GeomAbs_Sphere:      {
-      Ptreference = ElSLib::Value(PI/4.,PI/4.,S1->Sphere());
+      Ptreference = ElSLib::Value(M_PI/4.,M_PI/4.,S1->Sphere());
     }
       break;
     case GeomAbs_Cone:      {
@@ -558,7 +558,7 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)&  S1,
        quad2.Parameters(P,u2,v2);
        point.SetValue(P,TolArc,Standard_False);
        point.SetParameters(u1,v1,u2,v2);
-       point.SetParameter(PI+PI);
+       point.SetParameter(M_PI+M_PI);
        glin->AddVertex(point);
       }
     }
@@ -581,7 +581,7 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)&  S1,
        quad2.Parameters(P,u2,v2);
        point.SetValue(P,TolArc,Standard_False);
        point.SetParameters(u1,v1,u2,v2);
-       point.SetParameter(PI+PI);
+       point.SetParameter(M_PI+M_PI);
        glin->AddVertex(point);
       }
     }
index bedbf7f6d90f1c3c9f9e0cbc3044102d9e831a4d..e496d03a10069c2fedbc85d098f1620101fb3a29 100755 (executable)
@@ -311,8 +311,8 @@ Standard_Boolean IntCyCy(const IntSurf_Quadric& Quad1,
       IntPatch_Point pmult1;
       IntPatch_Point pmult2;
       elipsol = inter.Ellipse(1);
-      gp_Pnt pttang1(ElCLib::Value(PI*0.5,elipsol));
-      gp_Pnt pttang2(ElCLib::Value(1.5*PI,elipsol));
+      gp_Pnt pttang1(ElCLib::Value(M_PI*0.5,elipsol));
+      gp_Pnt pttang2(ElCLib::Value(1.5*M_PI,elipsol));
       
       Multpoint = Standard_True;
       pmult1.SetValue(pttang1,Tol,Standard_True);
@@ -349,17 +349,17 @@ Standard_Boolean IntCyCy(const IntSurf_Quadric& Quad1,
       //-- Transition calculee au point 0 -> Trans2 , Trans1 
       //-- car ici, on devarit calculer en PI
       Handle(IntPatch_GLine) glig = new IntPatch_GLine(elipsol,Standard_False,trans2,trans1);
-      pmult1.SetParameter(PI/2.);
+      pmult1.SetParameter(M_PI/2.);
       glig->AddVertex(pmult1);
       glig->SetFirstPoint(1);
-      pmult2.SetParameter(1.5*PI);
+      pmult2.SetParameter(1.5*M_PI);
       glig->AddVertex(pmult2);
       glig->SetLastPoint(2);
       slin.Append(glig);
       
       //-- Transitions calculee au point 0    OK
       glig = new IntPatch_GLine(elipsol,Standard_False,trans1,trans2);
-      pmult2.SetParameter(-PI/2.);
+      pmult2.SetParameter(-M_PI/2.);
       glig->AddVertex(pmult2);
       glig->SetFirstPoint(1);
       glig->AddVertex(pmult1);
@@ -375,13 +375,13 @@ Standard_Boolean IntCyCy(const IntSurf_Quadric& Quad1,
       Standard_Real param2 = ElCLib::Parameter(elipsol,pttang2);
       Standard_Real parampourtransition;
       if (param1 < param2) {
-       pmult1.SetParameter(PI*0.5);
-       pmult2.SetParameter(1.5*PI);
-       parampourtransition = PI;
+       pmult1.SetParameter(M_PI*0.5);
+       pmult2.SetParameter(1.5*M_PI);
+       parampourtransition = M_PI;
       }
       else {
-       pmult1.SetParameter(-PI*0.5);
-       pmult2.SetParameter(PI*0.5);
+       pmult1.SetParameter(-M_PI*0.5);
+       pmult2.SetParameter(M_PI*0.5);
        parampourtransition = 0.0;
       }
       
@@ -408,10 +408,10 @@ Standard_Boolean IntCyCy(const IntSurf_Quadric& Quad1,
       slin.Append(glig);
       
       if (param1 < param2) {
-       pmult2.SetParameter(-PI*0.5);
+       pmult2.SetParameter(-M_PI*0.5);
       }
       else {
-       pmult1.SetParameter(1.5*PI);
+       pmult1.SetParameter(1.5*M_PI);
       }
       
       //-- Sur l'autre ligne, on invertse la transition
index 2d83c180939dfd164a02dc82a88b74a08ef8375e..3d2e28bd93a4fd409d5dbbf9bb39e980806fcf50 100755 (executable)
@@ -352,24 +352,24 @@ void Recadre(const Standard_Boolean ,
   switch(typeS1)
   {
     case GeomAbs_Torus:
-      while(V1<(V1p-1.5*PI)) V1+=PI+PI;
-      while(V1>(V1p+1.5*PI)) V1-=PI+PI;
+      while(V1<(V1p-1.5*M_PI)) V1+=M_PI+M_PI;
+      while(V1>(V1p+1.5*M_PI)) V1-=M_PI+M_PI;
     case GeomAbs_Cylinder:
     case GeomAbs_Cone:
     case GeomAbs_Sphere:
-      while(U1<(U1p-1.5*PI)) U1+=PI+PI;
-      while(U1>(U1p+1.5*PI)) U1-=PI+PI;
+      while(U1<(U1p-1.5*M_PI)) U1+=M_PI+M_PI;
+      while(U1>(U1p+1.5*M_PI)) U1-=M_PI+M_PI;
   }
   switch(typeS2)
   { 
     case GeomAbs_Torus:
-      while(V2<(V2p-1.5*PI)) V2+=PI+PI;
-      while(V2>(V2p+1.5*PI)) V2-=PI+PI;
+      while(V2<(V2p-1.5*M_PI)) V2+=M_PI+M_PI;
+      while(V2>(V2p+1.5*M_PI)) V2-=M_PI+M_PI;
     case GeomAbs_Cylinder:
     case GeomAbs_Cone:
     case GeomAbs_Sphere:
-      while(U2<(U2p-1.5*PI)) U2+=PI+PI;
-      while(U2>(U2p+1.5*PI)) U2-=PI+PI;
+      while(U2<(U2p-1.5*M_PI)) U2+=M_PI+M_PI;
+      while(U2>(U2p+1.5*M_PI)) U2-=M_PI+M_PI;
   }
   pt.SetParameters(U1,V1,U2,V2);
 }
@@ -629,26 +629,26 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
            Standard_Real aCf, aTwoPI;
            //
            aCf=0.;
-           aTwoPI=PI+PI;
-           if ((U1-AnU1) >  1.5*PI) { 
-             while ((U1-AnU1) > (1.5*PI+aCf*aTwoPI)) {
+           aTwoPI=M_PI+M_PI;
+           if ((U1-AnU1) >  1.5*M_PI) { 
+             while ((U1-AnU1) > (1.5*M_PI+aCf*aTwoPI)) {
                aCf=aCf+1.;
              }
              U1=U1-aCf*aTwoPI;
            } 
            //
            else {
-             while ((U1-AnU1) < (-1.5*PI-aCf*aTwoPI)) {
+             while ((U1-AnU1) < (-1.5*M_PI-aCf*aTwoPI)) {
                aCf=aCf+1.;
              }
              U1=U1+aCf*aTwoPI;
            }
            // was:
-           //if ((U1-AnU1) >  1.5*PI) { 
-           //  U1-=PI+PI;
+           //if ((U1-AnU1) >  1.5*M_PI) { 
+           //  U1-=M_PI+M_PI;
            //}
-           //else if ((U1-AnU1) < -1.5*PI) { 
-           //  U1+=PI+PI; 
+           //else if ((U1-AnU1) < -1.5*M_PI) { 
+           //  U1+=M_PI+M_PI; 
            //}
            //modified by NIZNHY-PKV Fri Mar 28 15:06:11 2008t
          }
@@ -662,15 +662,15 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
            case GeomAbs_Cone:
            case GeomAbs_Sphere:
            case GeomAbs_Torus:
-             while(U2<(AnU2-1.5*PI)) U2+=PI+PI;
-             while(U2>(AnU2+1.5*PI)) U2-=PI+PI;
+             while(U2<(AnU2-1.5*M_PI)) U2+=M_PI+M_PI;
+             while(U2>(AnU2+1.5*M_PI)) U2-=M_PI+M_PI;
              break;
            default: 
              break;
            }
            if(typeS2==GeomAbs_Torus) { 
-             while(V2<(AnV2-1.5*PI)) V2+=PI+PI;
-             while(V2>(AnV2+1.5*PI)) V2-=PI+PI;
+             while(V2<(AnV2-1.5*M_PI)) V2+=M_PI+M_PI;
+             while(V2>(AnV2+1.5*M_PI)) V2-=M_PI+M_PI;
            }
            thelin->SetUV(k,Standard_True,U2,V2);
          }
@@ -683,15 +683,15 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
            case GeomAbs_Cone:
            case GeomAbs_Sphere:
            case GeomAbs_Torus:
-             while(U2<(AnU2-1.5*PI)) U2+=PI+PI;
-             while(U2>(AnU2+1.5*PI)) U2-=PI+PI;
+             while(U2<(AnU2-1.5*M_PI)) U2+=M_PI+M_PI;
+             while(U2>(AnU2+1.5*M_PI)) U2-=M_PI+M_PI;
              break;
            default: 
              break;
            }
            if(typeS2==GeomAbs_Torus) { 
-             while(V2<(AnV2-1.5*PI)) V2+=PI+PI;
-             while(V2>(AnV2+1.5*PI)) V2-=PI+PI;
+             while(V2<(AnV2-1.5*M_PI)) V2+=M_PI+M_PI;
+             while(V2>(AnV2+1.5*M_PI)) V2-=M_PI+M_PI;
            }
            thelin->SetUV(k,Standard_False,U2,V2);
 
@@ -1333,49 +1333,49 @@ static Standard_Real AdjustUFirst(Standard_Real U1,Standard_Real U2)
   Standard_Real u = U1;
 
   // case: no adjustment
-  if( U1 > 0. && U1 < (2.*PI) )
+  if( U1 > 0. && U1 < (2.*M_PI) )
     return u;
 
   // case: near '0'
   if( U1 == 0. || fabs(U1) <= 1.e-9 ) {
-    if( U2 > 0. && U2 < (2.*PI) )
-      u = ( U2 < ((2.*PI)-U2) ) ? 0. : (2.*PI);
+    if( U2 > 0. && U2 < (2.*M_PI) )
+      u = ( U2 < ((2.*M_PI)-U2) ) ? 0. : (2.*M_PI);
     else {
       Standard_Real uu = U2;
-      if( U2 > (2.*PI) )
-       while( uu > (2.*PI) )
-         uu -= (2.*PI);
+      if( U2 > (2.*M_PI) )
+       while( uu > (2.*M_PI) )
+         uu -= (2.*M_PI);
       else 
        while( uu < 0.)
-         uu += (2.*PI);
+         uu += (2.*M_PI);
       
-      u = ( uu < ((2.*PI)-uu) ) ? 0. : (2.*PI);
+      u = ( uu < ((2.*M_PI)-uu) ) ? 0. : (2.*M_PI);
     }
   }
   // case: near '2PI'
-  else if( U1 == (2.*PI) || fabs((2.*PI)-fabs(U1)) <= 1.e-9 ) {
-    if( U2 > 0. && U2 < (2.*PI) )
-      u = ( U2 < ((2.*PI)-U2) ) ? 0. : (2.*PI);
+  else if( U1 == (2.*M_PI) || fabs((2.*M_PI)-fabs(U1)) <= 1.e-9 ) {
+    if( U2 > 0. && U2 < (2.*M_PI) )
+      u = ( U2 < ((2.*M_PI)-U2) ) ? 0. : (2.*M_PI);
     else {
       Standard_Real uu = U2;
-      if( U2 > (2.*PI) )
-       while( uu > (2.*PI) )
-         uu -= (2.*PI);
+      if( U2 > (2.*M_PI) )
+       while( uu > (2.*M_PI) )
+         uu -= (2.*M_PI);
       else 
        while( uu < 0.)
-         uu += (2.*PI);
+         uu += (2.*M_PI);
       
-      u = ( uu < ((2.*PI)-uu) ) ? 0. : (2.*PI);
+      u = ( uu < ((2.*M_PI)-uu) ) ? 0. : (2.*M_PI);
     }
   }
   // case: '<0. || >2PI'
   else {
     if(U1 < 0.)
       while(u < 0.)
-       u += 2.*PI;
-    if(U1 > (2.*PI))
-      while(u > (2.*PI))
-       u -= (2.*PI);
+       u += 2.*M_PI;
+    if(U1 > (2.*M_PI))
+      while(u > (2.*M_PI))
+       u -= (2.*M_PI);
   }
 
   return u;
@@ -1387,15 +1387,15 @@ static Standard_Real AdjustUNext(Standard_Real Un,Standard_Real Up)
   Standard_Real u = Un;
   if( Un < 0. )
     while(u < 0.)
-      u += (2.*PI);
-  else if( Un > (2.*PI) )
-    while( u > (2.*PI) )
-      u -= (2.*PI);
+      u += (2.*M_PI);
+  else if( Un > (2.*M_PI) )
+    while( u > (2.*M_PI) )
+      u -= (2.*M_PI);
   else if(Un == 0. || fabs(Un) <= 1.e-9)
-    u = (fabs(Up) < fabs(2.*PI-Up)) ? 0. : (2.*PI);
-  else if(Un == (2.*PI) || fabs(Un-(2.*PI)) <= 1.e-9)
-    u = (fabs(Up) < fabs(2.*PI-Up)) ? 0. : (2.*PI);
-  else //( Un > 0. && Un < (2.*PI) )
+    u = (fabs(Up) < fabs(2.*M_PI-Up)) ? 0. : (2.*M_PI);
+  else if(Un == (2.*M_PI) || fabs(Un-(2.*M_PI)) <= 1.e-9)
+    u = (fabs(Up) < fabs(2.*M_PI-Up)) ? 0. : (2.*M_PI);
+  else //( Un > 0. && Un < (2.*M_PI) )
     return u;
   return u;
 }
@@ -1514,7 +1514,7 @@ static void ForcedPurgePoints(Handle(IntSurf_LineOn2S)& Result,
   }
 
   if(Quad.TypeQuadric() == GeomAbs_Sphere) {
-    Standard_Real Vapx1 = PI/2., Vapx2 = -PI/2.;
+    Standard_Real Vapx1 = M_PI/2., Vapx2 = -M_PI/2.;
     Standard_Real U1 = 0., V1 = 0., U2 = 0., V2 = 0.;
     if(IsReversed) {
       Result->Value(1).ParametersOnS2(U1,V1);
@@ -1588,12 +1588,12 @@ static void SearchVertices(const Handle(IntSurf_LineOn2S)& Line,
 static inline Standard_Boolean IsSeamParameter(const Standard_Real U,
                                               const Standard_Real TOL2D)
 {
-  return (fabs(U) <= TOL2D || fabs(2.*PI - U) <= TOL2D);
+  return (fabs(U) <= TOL2D || fabs(2.*M_PI - U) <= TOL2D);
 }
 
 static inline Standard_Real AdjustU(const Standard_Real U)
 {
-  Standard_Real u = U, DBLPI = 2.*PI;
+  Standard_Real u = U, DBLPI = 2.*M_PI;
   if(u < 0. || u > DBLPI) {
     if(u < 0.)
       while(u < 0.)
@@ -1679,7 +1679,7 @@ static Standard_Boolean InsertSeamVertices(Handle(IntSurf_LineOn2S)&       Line,
          else
            Line->Value(ipp).ParametersOnS1(U1,V1); // S1 - quadric
          Standard_Real u = AdjustUFirst(U,U1);
-         if(fabs(u-U) >= 1.5*PI) {
+         if(fabs(u-U) >= 1.5*M_PI) {
            Standard_Real U2 = 0., V2 = 0.;
            if(IsReversed) {
              Line->Value(ip).ParametersOnS1(U2,V2); // prm
@@ -1707,11 +1707,11 @@ static Standard_Boolean InsertSeamVertices(Handle(IntSurf_LineOn2S)&       Line,
          }
          U1 = AdjustU(U1);
          U2 = AdjustU(U2);
-         Standard_Boolean pnearZero = (fabs(U1) < fabs(2.*PI-U1)) ? Standard_True : Standard_False;
-         Standard_Boolean cnearZero = (fabs(U) < fabs(2.*PI-U)) ? Standard_True : Standard_False;
+         Standard_Boolean pnearZero = (fabs(U1) < fabs(2.*M_PI-U1)) ? Standard_True : Standard_False;
+         Standard_Boolean cnearZero = (fabs(U) < fabs(2.*M_PI-U)) ? Standard_True : Standard_False;
          if(pnearZero == cnearZero) {
            if(!IsSeamParameter(U2,TOL2D) && !IsSeamParameter(U1,TOL2D)) {
-             Standard_Real nU = (cnearZero) ? (2.*PI) : 0.;
+             Standard_Real nU = (cnearZero) ? (2.*M_PI) : 0.;
              IntSurf_PntOn2S nP;
              nP.SetValue(aP.Value());
              Standard_Real U3 = 0., V3 = 0.;
@@ -1733,7 +1733,7 @@ static Standard_Boolean InsertSeamVertices(Handle(IntSurf_LineOn2S)&       Line,
          }
          else {
            if(!IsSeamParameter(U2,TOL2D) && !IsSeamParameter(U1,TOL2D)) {
-             Standard_Real nU = (cnearZero) ? (2.*PI) : 0.;
+             Standard_Real nU = (cnearZero) ? (2.*M_PI) : 0.;
              IntSurf_PntOn2S nP;
              nP.SetValue(aP.Value());
              Standard_Real U3 = 0., V3 = 0.;
@@ -1829,10 +1829,10 @@ static void ToSmooth(Handle(IntSurf_LineOn2S)& Line,
   }
 
   if(!doU && Quad.TypeQuadric() == GeomAbs_Sphere) {
-    if(fabs(fabs(U1)-fabs(U2)) > (PI/16.)) doU = Standard_True;
+    if(fabs(fabs(U1)-fabs(U2)) > (M_PI/16.)) doU = Standard_True;
     
-    if(doU && (fabs(U1) <= 1.e-9 || fabs(U1-2.*PI) <= 1.e-9)) {
-      if(fabs(V1-PI/2.) <= 1.e-9 || fabs(V1+PI/2.) <= 1.e-9) {}
+    if(doU && (fabs(U1) <= 1.e-9 || fabs(U1-2.*M_PI) <= 1.e-9)) {
+      if(fabs(V1-M_PI/2.) <= 1.e-9 || fabs(V1+M_PI/2.) <= 1.e-9) {}
       else {
        doU = Standard_False;
       }
@@ -1843,9 +1843,9 @@ static void ToSmooth(Handle(IntSurf_LineOn2S)& Line,
     Standard_Real Uapx = 0., Vapx = 0.;
     Quad.Parameters(Quad.Cone().Apex(),Uapx,Vapx);
 
-    if(fabs(fabs(U1)-fabs(U2)) > PI/32.) doU = Standard_True;
+    if(fabs(fabs(U1)-fabs(U2)) > M_PI/32.) doU = Standard_True;
 
-    if(doU && (fabs(U1) <= 1.e-9 || fabs(U1-2.*PI) <= 1.e-9)) {
+    if(doU && (fabs(U1) <= 1.e-9 || fabs(U1-2.*M_PI) <= 1.e-9)) {
       if(fabs(V1-Vapx) <= 1.e-9) {}
       else {
        doU = Standard_False;
@@ -1957,7 +1957,7 @@ static void VerifyVertices(Handle(IntSurf_LineOn2S)& Line,
           FConjugated = 0;
       }
       if(IsSeamParameter(Uv,TOL2D)) {
-        Standard_Real Ucv = (fabs(Uv) < fabs(2.*PI-Uv)) ? (2.*PI) : 0.;
+        Standard_Real Ucv = (fabs(Uv) < fabs(2.*M_PI-Uv)) ? (2.*M_PI) : 0.;
         gp_Pnt2d a2DCV(Ucv,Vv);
         Standard_Real CDist = a2DCV.Distance(a2DPF);
         if(CDist < DistMinF) {
@@ -1990,7 +1990,7 @@ static void VerifyVertices(Handle(IntSurf_LineOn2S)& Line,
           LConjugated = 0;
       }
       if(IsSeamParameter(Uv,TOL2D)) {
-        Standard_Real Ucv = (fabs(Uv) < fabs(2.*PI-Uv)) ? (2.*PI) : 0.;
+        Standard_Real Ucv = (fabs(Uv) < fabs(2.*M_PI-Uv)) ? (2.*M_PI) : 0.;
         gp_Pnt2d a2DCV(Ucv,Vv);
         Standard_Real CDist = a2DCV.Distance(a2DPL);
         if(CDist < DistMinL) {
@@ -2014,7 +2014,7 @@ static void VerifyVertices(Handle(IntSurf_LineOn2S)& Line,
       else
         aV.ParametersOnS1(Uv,Vv);
       if(IsSeamParameter(Uv,TOL2D)) {
-        Standard_Real Ucv = (fabs(Uv) < fabs(2.*PI-Uv)) ? (2.*PI) : 0.;
+        Standard_Real Ucv = (fabs(Uv) < fabs(2.*M_PI-Uv)) ? (2.*M_PI) : 0.;
         Standard_Boolean test = TestMiddleOnPrm(aPF,aV,IsReversed,ArcTol,PDomain);
         if(test) {
           VrtF.SetValue(aV.Value());
@@ -2057,7 +2057,7 @@ static void VerifyVertices(Handle(IntSurf_LineOn2S)& Line,
       else
         aV.ParametersOnS1(Uv,Vv);
       if(IsSeamParameter(Uv,TOL2D)) {
-        Standard_Real Ucv = (fabs(Uv) < fabs(2.*PI-Uv)) ? (2.*PI) : 0.;
+        Standard_Real Ucv = (fabs(Uv) < fabs(2.*M_PI-Uv)) ? (2.*M_PI) : 0.;
         Standard_Boolean test = TestMiddleOnPrm(aPL,aV,IsReversed,ArcTol,PDomain);
         if(test) {
           VrtL.SetValue(aV.Value());
@@ -2334,8 +2334,8 @@ void DecomposeResult(Handle(IntPatch_Line)&   Line,
 
   Standard_Integer NbPnts = SSLine->NbPoints();
 
-  Standard_Real BSEAM = 1.5*PI; // delta U crossing seam
-  Standard_Real BAPEX = PI/16.;  // delta U crossing apex
+  Standard_Real BSEAM = 1.5*M_PI; // delta U crossing seam
+  Standard_Real BAPEX = M_PI/16.;  // delta U crossing apex
   
   Standard_Integer i = 0, k = 0;
   Standard_Real U1 = 0., U2 = 0., V1 = 0., V2 = 0., AnU1 = 0., AnV1 = 0., DU1 = 0., DV1 = 0.;
index 43b5c04f925755b3e8b20cb230b72bc15f4b742e..c647e5813682c8454a8f833ea2ac0d551ea72b97 100755 (executable)
@@ -285,7 +285,7 @@ static void FUN_GetUiso(const Handle(Geom_Surface)& GS,
   if(T !=  GeomAbs_OffsetSurface)
   {
     Handle(Geom_Curve) gc = GS->UIso(U);
-    if(IsVP && (FirstV == 0.0 && LastV == (2.*PI))) I = gc;
+    if(IsVP && (FirstV == 0.0 && LastV == (2.*M_PI))) I = gc;
     else
        {
          Handle(Geom_TrimmedCurve) gtc = new Geom_TrimmedCurve(gc,FirstV,LastV);
@@ -303,7 +303,7 @@ static void FUN_GetUiso(const Handle(Geom_Surface)& GS,
     if(IsVP || IsVC || GACT == GeomAbs_BSplineCurve || GACT == GeomAbs_BezierCurve || Abs(LastV - FirstV) < 1.e+5)
        {
          Handle(Geom_Curve) gc = gos->UIso(U);
-         if(IsVP && (FirstV == 0.0 && LastV == (2*PI))) I = gc;
+         if(IsVP && (FirstV == 0.0 && LastV == (2*M_PI))) I = gc;
          else
       {
            Handle(Geom_TrimmedCurve) gtc = new Geom_TrimmedCurve(gc,FirstV,LastV);
@@ -355,7 +355,7 @@ static void FUN_GetViso(const Handle(Geom_Surface)& GS,
   if(T !=  GeomAbs_OffsetSurface)
   {
     Handle(Geom_Curve) gc = GS->VIso(V);
-    if(IsUP && (FirstU == 0.0 && LastU == (2*PI))) I = gc;
+    if(IsUP && (FirstU == 0.0 && LastU == (2*M_PI))) I = gc;
     else
        {
          Handle(Geom_TrimmedCurve) gtc = new Geom_TrimmedCurve(gc,FirstU,LastU);
@@ -373,7 +373,7 @@ static void FUN_GetViso(const Handle(Geom_Surface)& GS,
     if(IsUP || IsUC || GACT == GeomAbs_BSplineCurve || GACT == GeomAbs_BezierCurve || Abs(LastU - FirstU) < 1.e+5)
        {
          Handle(Geom_Curve) gc = gos->VIso(V);
-         if(IsUP && (FirstU == 0.0 && LastU == (2*PI))) I = gc;
+         if(IsUP && (FirstU == 0.0 && LastU == (2*M_PI))) I = gc;
          else
          {
            Handle(Geom_TrimmedCurve) gtc = new Geom_TrimmedCurve(gc,FirstU,LastU);
index c152abc4d38a2b973cdefae2e1950f80127ffac7..b24e020dd307ba7328fa85ab2eb115a3f34486f0 100755 (executable)
@@ -88,28 +88,28 @@ static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1,
      }
   }
   if(myHS1IsUPeriodic) {
-    lmf = PI+PI; //-- myHS1->UPeriod();
+    lmf = M_PI+M_PI; //-- myHS1->UPeriod();
     f = myHS1->FirstUParameter();
     l = myHS1->LastUParameter();
     while(u1 < f) { u1+=lmf; } 
     while(u1 > l) { u1-=lmf; }
   }
   if(myHS1IsVPeriodic) {
-    lmf = PI+PI; //-- myHS1->VPeriod(); 
+    lmf = M_PI+M_PI; //-- myHS1->VPeriod(); 
     f = myHS1->FirstVParameter();
     l = myHS1->LastVParameter();
     while(v1 < f) { v1+=lmf; } 
     while(v1 > l) { v1-=lmf; }
   }
   if(myHS2IsUPeriodic) { 
-    lmf = PI+PI; //-- myHS2->UPeriod();
+    lmf = M_PI+M_PI; //-- myHS2->UPeriod();
     f = myHS2->FirstUParameter();
     l = myHS2->LastUParameter();
     while(u2 < f) { u2+=lmf; } 
     while(u2 > l) { u2-=lmf; }
   }
   if(myHS2IsVPeriodic) { 
-    lmf = PI+PI; //-- myHS2->VPeriod();
+    lmf = M_PI+M_PI; //-- myHS2->VPeriod();
     f = myHS2->FirstVParameter();
     l = myHS2->LastVParameter();
     while(v2 < f) { v2+=lmf; } 
@@ -318,7 +318,7 @@ static Standard_Real LocalLastParameter (const Handle(IntPatch_Line)& L)
 
        case IntPatch_Circle:
        case IntPatch_Ellipse:
-         lastp = PI+PI;
+         lastp = M_PI+M_PI;
          break;
        default:
          {
@@ -694,9 +694,9 @@ static void AddLine(const Handle(IntPatch_Line)& L,
       if(i!=j) { 
        if ((typl == IntPatch_Circle || typl == IntPatch_Ellipse) && i>j) {
          IntPatch_Point Vtx=GLine->Vertex(j);
-         Vtx.SetParameter(GLine->Vertex(j).ParameterOnLine()+PI+PI);
+         Vtx.SetParameter(GLine->Vertex(j).ParameterOnLine()+M_PI+M_PI);
          glig->AddVertex(Vtx);
-         IndexLastVertex+=AppendSameVertexG(glig,GLine,j,PI+PI,TabIndex);
+         IndexLastVertex+=AppendSameVertexG(glig,GLine,j,M_PI+M_PI,TabIndex);
        }
        else {
          glig->AddVertex(GLine->Vertex(j));
@@ -1468,12 +1468,12 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
     }
     if(typl == IntPatch_Circle || typl == IntPatch_Ellipse) { 
       firstp = GLine->Vertex(nbvtx).ParameterOnLine();
-      lastp  = PI + PI + GLine->Vertex(1).ParameterOnLine();
+      lastp  = M_PI + M_PI + GLine->Vertex(1).ParameterOnLine();
       Standard_Real cadrinf = LocalFirstParameter(L);
       Standard_Real cadrsup = LocalLastParameter(L);
       Standard_Real acadr = (firstp+lastp)*0.5;
-      while(acadr < cadrinf) { acadr+=PI+PI; }
-      while(acadr > cadrsup) { acadr-=PI+PI; } 
+      while(acadr < cadrinf) { acadr+=M_PI+M_PI; }
+      while(acadr > cadrsup) { acadr-=M_PI+M_PI; } 
       if(acadr>=cadrinf && acadr<=cadrsup) { 
        if(Abs(firstp-lastp)>Precision::PConfusion()) {
          intrvtested = Standard_True;
index c480bb8b8f4fe817f3644bf96a365389b8c564af..a90b6af1fc271ada0da54a77c7420e3ba377e1d8 100755 (executable)
@@ -56,15 +56,15 @@ static void Recadre(GeomAbs_SurfaceType typeS1,
   case GeomAbs_Cone:
   case GeomAbs_Sphere:
   case GeomAbs_Torus:
-    while(U1<(U1p-1.5*PI)) U1+=PI+PI;
-    while(U1>(U1p+1.5*PI)) U1-=PI+PI;
+    while(U1<(U1p-1.5*M_PI)) U1+=M_PI+M_PI;
+    while(U1>(U1p+1.5*M_PI)) U1-=M_PI+M_PI;
     break;
   default: 
     break;
   }
   if(typeS1==GeomAbs_Torus) { 
-    while(V1<(V1p-1.5*PI)) V1+=PI+PI;
-    while(V1>(V1p+1.5*PI)) V1-=PI+PI;
+    while(V1<(V1p-1.5*M_PI)) V1+=M_PI+M_PI;
+    while(V1>(V1p+1.5*M_PI)) V1-=M_PI+M_PI;
   }
   
   switch(typeS2) { 
@@ -72,15 +72,15 @@ static void Recadre(GeomAbs_SurfaceType typeS1,
   case GeomAbs_Cone:
   case GeomAbs_Sphere:
   case GeomAbs_Torus:
-    while(U2<(U2p-1.5*PI)) U2+=PI+PI;
-    while(U2>(U2p+1.5*PI)) U2-=PI+PI;
+    while(U2<(U2p-1.5*M_PI)) U2+=M_PI+M_PI;
+    while(U2>(U2p+1.5*M_PI)) U2-=M_PI+M_PI;
     break;
   default: 
     break;
   }
   if(typeS2==GeomAbs_Torus) { 
-    while(V2<(V1p-1.5*PI)) V2+=PI+PI;
-    while(V2>(V2p+1.5*PI)) V2-=PI+PI;
+    while(V2<(V1p-1.5*M_PI)) V2+=M_PI+M_PI;
+    while(V2>(V2p+1.5*M_PI)) V2-=M_PI+M_PI;
   }
 }
 
@@ -579,8 +579,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
       BPLin.Get(xmin,ymin,xmax,ymax);
       g = BPLin.GetGap();
       BPLin.SetVoid();
-      BPLin.Update(xmin-PI-PI,ymin,
-                  xmax+PI+PI,ymax);
+      BPLin.Update(xmin-M_PI-M_PI,ymin,
+                  xmax+M_PI+M_PI,ymax);
       BPLin.SetGap(g);
     }
     if(SurfaceIsBiPeriodic) { 
@@ -588,8 +588,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
       BPLin.Get(xmin,ymin,xmax,ymax);
       g = BPLin.GetGap();
       BPLin.SetVoid();
-      BPLin.Update(xmin,ymin-PI-PI,
-                  xmax,ymax+PI+PI);
+      BPLin.Update(xmin,ymin-M_PI-M_PI,
+                  xmax,ymax+M_PI+M_PI);
       BPLin.SetGap(g);
     }
 
@@ -627,15 +627,15 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
     
     do { 
       if(IndiceOffsetBiPeriodic == 1) 
-       OffsetV = -PI-PI;
+       OffsetV = -M_PI-M_PI;
       else if(IndiceOffsetBiPeriodic == 2) 
-       OffsetV = PI+PI;
+       OffsetV = M_PI+M_PI;
       
       do { 
        if(IndiceOffsetPeriodic == 1) 
-         OffsetU = -PI-PI;
+         OffsetU = -M_PI-M_PI;
        else if(IndiceOffsetPeriodic == 2) 
-         OffsetU = PI+PI;
+         OffsetU = M_PI+M_PI;
        
        Brise.SetOffset(OffsetU,OffsetV);
        
@@ -1134,10 +1134,10 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
     case GeomAbs_Cylinder:
     case GeomAbs_Cone:
     case GeomAbs_Sphere:
-      pu1=PI+PI;
+      pu1=M_PI+M_PI;
       break;
     case GeomAbs_Torus:
-      pu1=pv1=PI+PI;
+      pu1=pv1=M_PI+M_PI;
       break;
     default:
       {
@@ -1165,10 +1165,10 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
     case GeomAbs_Cone:
     case GeomAbs_Sphere:
 
-      pu2=PI+PI;
+      pu2=M_PI+M_PI;
       break;
     case GeomAbs_Torus:
-      pu2=pv2=PI+PI;
+      pu2=pv2=M_PI+M_PI;
       break;
     default:
       { 
index 59e8dcb8b20b8b5e2e7c35fbce0f1c4351f08564..9c3d67c06dedd32d6a8318c6dc61cc081cc60349 100755 (executable)
        || surf->GetType()==GeomAbs_Torus
        || surf->GetType()==GeomAbs_Sphere
        || surf->GetType()==GeomAbs_SurfaceOfRevolution) { 
-      Standard_Real uuu=PI+PI-(Umax-Umin);
+      Standard_Real uuu=M_PI+M_PI-(Umax-Umin);
       if(uuu<0) uuu=0;
       U1 = Umin-uuu*0.5;
-      U2 = U1+PI+PI;
+      U2 = U1+M_PI+M_PI;
     }
     else { 
       U1=U2=0.0; 
     } 
     
     if(surf->GetType()==GeomAbs_Torus) { 
-      Standard_Real uuu=PI+PI-(Vmax-Vmin);
+      Standard_Real uuu=M_PI+M_PI-(Vmax-Vmin);
       if(uuu<0) uuu=0;
       
       V1 = Vmin-uuu*0.5;
-      V2 = V1+PI+PI;
+      V2 = V1+M_PI+M_PI;
     }
     else { 
       V1=V2=0.0; 
index a70db802c377a593feb67bbeb25e6750c61ae89c..3ceb05ffda515bb5921c04b16e577c4cf358cab4 100755 (executable)
@@ -756,8 +756,8 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
        Standard_Real eps = 1.e-14;
        if(!aPlDir.IsEqual(aCirDir, eps)) {
          Standard_Integer aNbP = 11;
-         Standard_Real dt = 2.*PI / (aNbP - 1), t;
-         for(t = 0.; t < 2.*PI; t += dt) {
+         Standard_Real dt = 2.*M_PI / (aNbP - 1), t;
+         for(t = 0.; t < 2.*M_PI; t += dt) {
            Standard_Real d = aPln.Distance(ElCLib::Value(t, aCir)); 
            if(myTolReached3d < d) myTolReached3d = d;
          }
@@ -1134,7 +1134,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
     TColStd_SequenceOfReal aSeqFprm,  aSeqLprm;
     
     aNul=0.;
-    aPeriod=PI+PI;
+    aPeriod=M_PI+M_PI;
 
     for (i=1; i<=aNbParts; i++) {
       myLConstruct.Part(i, fprm, lprm);
@@ -1201,7 +1201,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
       lprm=aSeqLprm(i);
       //
       Standard_Real aRealEpsilon=RealEpsilon();
-      if (Abs(fprm) > aRealEpsilon || Abs(lprm-2.*PI) > aRealEpsilon) {
+      if (Abs(fprm) > aRealEpsilon || Abs(lprm-2.*M_PI) > aRealEpsilon) {
        //==============================================
        ////
        IntTools_Curve aCurve;
@@ -1248,14 +1248,14 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
        }
        mySeqOfCurve.Append(aCurve);
          //==============================================      
-      } //if (Abs(fprm) > RealEpsilon() || Abs(lprm-2.*PI) > RealEpsilon())
+      } //if (Abs(fprm) > RealEpsilon() || Abs(lprm-2.*M_PI) > RealEpsilon())
 
       else {
        //  on regarde si on garde
        //
        if (aNbParts==1) {
-//       if (Abs(fprm) < RealEpsilon() &&  Abs(lprm-2.*PI) < RealEpsilon()) {
-         if (Abs(fprm) <= aRealEpsilon && Abs(lprm-2.*PI) <= aRealEpsilon) {
+//       if (Abs(fprm) < RealEpsilon() &&  Abs(lprm-2.*M_PI) < RealEpsilon()) {
+         if (Abs(fprm) <= aRealEpsilon && Abs(lprm-2.*M_PI) <= aRealEpsilon) {
            IntTools_Curve aCurve;
            Handle(Geom_TrimmedCurve) aTC3D=new Geom_TrimmedCurve(newc,fprm,lprm);
            aCurve.SetCurve(aTC3D);
@@ -1296,7 +1296,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
        //
        Standard_Real aTwoPIdiv17, u1, v1, u2, v2, Tol;
 
-       aTwoPIdiv17=2.*PI/17.;
+       aTwoPIdiv17=2.*M_PI/17.;
 
        for (j=0; j<=17; j++) {
          gp_Pnt ptref (newc->Value (j*aTwoPIdiv17));
@@ -3125,7 +3125,7 @@ Standard_Integer ComputeTangentZones( const Handle(GeomAdaptor_HSurface)& theSur
 
     GeomAdaptor_Curve aC1( new Geom_Circle(aCircle1) );
     GeomAdaptor_Curve aC2( new Geom_Circle(aCircle2) );
-    Extrema_ExtCC anExtrema(aC1, aC2, 0, 2.*Standard_PI, 0, 2.*Standard_PI, 
+    Extrema_ExtCC anExtrema(aC1, aC2, 0, 2. * M_PI, 0, 2. * M_PI, 
                            Precision::PConfusion(), Precision::PConfusion());
        
     if ( anExtrema.IsDone() ) {
@@ -3170,7 +3170,7 @@ Standard_Integer ComputeTangentZones( const Handle(GeomAdaptor_HSurface)& theSur
          aSeqResultRad.Append( aCriteria );
 
          // torus is u and v periodic
-         const Standard_Real twoPI = Standard_PI + Standard_PI;
+         const Standard_Real twoPI = M_PI + M_PI;
          Standard_Real arr1tmp[2] = {pr1.X(), pr1.Y()};
          Standard_Real arr2tmp[2] = {pr2.X(), pr2.Y()};
 
@@ -3622,7 +3622,7 @@ Standard_Boolean DecompositionOfWLine(const Handle(IntPatch_WLine)& theWLine,
                else {
                  Standard_Real anAngle = aNewVec.Angle(aVecOld);
 
-                 if((fabs(anAngle) < (Standard_PI * 0.25)) && (aNewVec.Dot(aVecOld) > 0.)) {
+                 if((fabs(anAngle) < (M_PI * 0.25)) && (aNewVec.Dot(aVecOld) > 0.)) {
 
                    if(bCheckAngle1) {
                      Standard_Real U1, U2, V1, V2;
index 302485f7111a8b08676d0c4523f8325354939961..d61733cfa120a06e25239e5bb86a1277da5d1121 100755 (executable)
@@ -93,28 +93,28 @@ static void Recadre(const Handle(GeomAdaptor_HSurface)& myHS1,
     }
   }
   if(myHS1IsUPeriodic) {
-    const Standard_Real lmf = PI+PI; //-- myHS1->UPeriod();
+    const Standard_Real lmf = M_PI+M_PI; //-- myHS1->UPeriod();
     const Standard_Real f = myHS1->FirstUParameter();
     const Standard_Real l = myHS1->LastUParameter();
     while(u1 < f) { u1+=lmf; } 
     while(u1 > l) { u1-=lmf; }
   }
   if(myHS1IsVPeriodic) {
-    const Standard_Real lmf = PI+PI; //-- myHS1->VPeriod(); 
+    const Standard_Real lmf = M_PI+M_PI; //-- myHS1->VPeriod(); 
     const Standard_Real f = myHS1->FirstVParameter();
     const Standard_Real l = myHS1->LastVParameter();
     while(v1 < f) { v1+=lmf; } 
     while(v1 > l) { v1-=lmf; }
   }
   if(myHS2IsUPeriodic) { 
-    const Standard_Real lmf = PI+PI; //-- myHS2->UPeriod();
+    const Standard_Real lmf = M_PI+M_PI; //-- myHS2->UPeriod();
     const Standard_Real f = myHS2->FirstUParameter();
     const Standard_Real l = myHS2->LastUParameter();
     while(u2 < f) { u2+=lmf; } 
     while(u2 > l) { u2-=lmf; }
   }
   if(myHS2IsVPeriodic) { 
-    const Standard_Real lmf = PI+PI; //-- myHS2->VPeriod();
+    const Standard_Real lmf = M_PI+M_PI; //-- myHS2->VPeriod();
     const Standard_Real f = myHS2->FirstVParameter();
     const Standard_Real l = myHS2->LastVParameter();
     while(v2 < f) { v2+=lmf; } 
@@ -340,12 +340,12 @@ void IntTools_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
     if(typl == IntPatch_Circle || typl == IntPatch_Ellipse)
     { 
       firstp = GeomInt_LineTool::Vertex(L,nbvtx).ParameterOnLine();
-      lastp  = PI + PI + GeomInt_LineTool::Vertex(L,1).ParameterOnLine();
+      lastp  = M_PI + M_PI + GeomInt_LineTool::Vertex(L,1).ParameterOnLine();
       const Standard_Real cadrinf = GeomInt_LineTool::FirstParameter(L);
       const Standard_Real cadrsup = GeomInt_LineTool::LastParameter(L);
       Standard_Real acadr = (firstp+lastp)*0.5;
-      while(acadr < cadrinf) { acadr+=PI+PI; }
-      while(acadr > cadrsup) { acadr-=PI+PI; } 
+      while(acadr < cadrinf) { acadr+=M_PI+M_PI; }
+      while(acadr > cadrsup) { acadr-=M_PI+M_PI; } 
       if(acadr>=cadrinf && acadr<=cadrsup)
       { 
        if(Abs(firstp-lastp)>Precision::PConfusion())
@@ -747,7 +747,7 @@ void IntTools_LineConstructor::PeriodicLine (const Handle(IntPatch_Line)& L) con
       }
     }
     if (changevtx) {
-      thevtx.SetParameter(prm + 2.*PI);
+      thevtx.SetParameter(prm + 2.*M_PI);
       glin->Replace(i,thevtx);
     }
   }
index d416fc9e127472bcebf5ae4f57aa42497c8853c0..aad794629ec5d97ac8649e4ec9af62ec220eeb24 100755 (executable)
@@ -270,7 +270,7 @@ static
   Standard_Real IntTools_Tools::IntermediatePoint (const Standard_Real aFirst,
                                                   const Standard_Real aLast)
 {
-  //define parameter division number as 10*e^(-PI) = 0.43213918
+  //define parameter division number as 10*e^(-M_PI) = 0.43213918
   const Standard_Real PAR_T = 0.43213918;
   Standard_Real aParm;
   aParm=(1.-PAR_T)*aFirst + PAR_T*aLast;
index 51c01d70efb1df80b7920900e2b0b537ad67576f..beb68cbff41e7fe610c7aa50f59dbab2d6cd6fe8 100755 (executable)
@@ -104,7 +104,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
     break;
   case GeomAbs_Cylinder: {
     Standard_Real aRadius = myS->Cylinder().Radius();
-    Standard_Real aMaxAngle = Standard_PI * 0.5;
+    Standard_Real aMaxAngle = M_PI * 0.5;
     Standard_Real aDeflection = 1.e-02;
 
     if(aRadius > aDeflection) {
@@ -133,7 +133,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
 
     if(aRadius < aCircle.Radius())
       aRadius = aCircle.Radius();
-    Standard_Real aMaxAngle = Standard_PI * 0.5;
+    Standard_Real aMaxAngle = M_PI * 0.5;
     Standard_Real aDeflection = 1.e-02;
 
     if(aRadius > aDeflection) {
@@ -177,7 +177,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
       aRadius1 = aSphere.Radius();
       aRadius2 = aSphere.Radius();
     }
-    Standard_Real aMaxAngle = Standard_PI * 0.5;
+    Standard_Real aMaxAngle = M_PI * 0.5;
     Standard_Real aDeflection = 1.e-02;
     
     if(aRadius1 > aDeflection) {
@@ -187,7 +187,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
     if(aMaxAngle > Precision::Angular()) {
       nbsu = Standard_Integer((usup - uinf) / aMaxAngle);
     }
-    aMaxAngle = Standard_PI * 0.5;
+    aMaxAngle = M_PI * 0.5;
 
     if(aRadius2 > aDeflection) {
       aMaxAngle = ACos(1. - aDeflection / aRadius2) * 2.;
index 6e9913923a231b670755370faeeafa6e73725fad..8cb1a631511108a241e252cc032447426182f760 100755 (executable)
@@ -1359,7 +1359,7 @@ Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(const IntImp_ConstIsop
          anIsoDir = gp_Dir2d(1, 0);
 
        if(aTangentZoneDir.SquareMagnitude() > gp::Resolution()) {
-         Standard_Real piquota = PI*0.25;
+         Standard_Real piquota = M_PI*0.25;
 
          if(fabs(aTangentZoneDir.Angle(anIsoDir)) > piquota) {
            Standard_Integer ii = 1, nextii = 2;
index f4ea8e701504e3c8aa8c98c2ebfc6942f7d15dbe..be205011a596823a7851773ca3a46b7e7d56424a 100755 (executable)
   }
   //==================================================================================
   //OCC431(apo): modified ->
-  static Standard_Real CosRef2D =  Cos(PI/9.0),  AngRef2D = PI/2.0; 
+  static Standard_Real CosRef2D =  Cos(M_PI/9.0),  AngRef2D = M_PI/2.0; 
 
   static Standard_Real /*tolArea = 100.0,*/ d = 7.0;
   Standard_Real tolArea = 100.0;
index 9957754e3a9a86fbb9a5896a12e63d0ad4463377..1f50ff8fef201e053f48c515608a8c2c9d40a121 100755 (executable)
@@ -35,12 +35,12 @@ void LProp_AnalyticCurInf::Perform (const GeomAbs_CurveType  CType,
   case GeomAbs_Ellipse: 
     {
       Standard_Real U1,U2,U3,U4;
-      Standard_Real UFPlus2PI = UFirst + 2*PI;
+      Standard_Real UFPlus2PI = UFirst + 2*M_PI;
       
       U1 = ElCLib::InPeriod(0.0     ,UFirst,UFPlus2PI);
-      U2 = ElCLib::InPeriod(PI/2.   ,UFirst,UFPlus2PI);
-      U3 = ElCLib::InPeriod(PI      ,UFirst,UFPlus2PI);
-      U4 = ElCLib::InPeriod(3.*PI/2.,UFirst,UFPlus2PI);
+      U2 = ElCLib::InPeriod(M_PI/2.   ,UFirst,UFPlus2PI);
+      U3 = ElCLib::InPeriod(M_PI      ,UFirst,UFPlus2PI);
+      U4 = ElCLib::InPeriod(3.*M_PI/2.,UFirst,UFPlus2PI);
       
       if (UFirst <= U1 && U1 <= ULast) {Result.AddExtCur(U1, IsMin);}
       if (UFirst <= U2 && U2 <= ULast) {Result.AddExtCur(U2, IsMax);}
index 6e68ef76b2c4f43a13a2eea7f3e0b5571b405ef3..7ca861b3c3425645f2050484bfc558a8535d49c1 100755 (executable)
@@ -143,7 +143,7 @@ Standard_Boolean LocOpe::TgtFaces(const TopoDS_Edge& E,
 
   Standard_Boolean rev1 = (F1.Orientation() == TopAbs_REVERSED);
   Standard_Boolean rev2 = (F2.Orientation() == TopAbs_REVERSED);
-  Standard_Real f,l,eps,angmin = PI,angmax = -PI,ang;
+  Standard_Real f,l,eps,angmin = M_PI,angmax = -M_PI,ang;
   BRep_Tool::Range(e,f,l);
 
   eps = (l - f)/100.;
index 8737a311bd0d7ec5f43b5156969945edf5e6cea5..3b3e8e9a1c64ce07003cbb55058287cc10927e59 100755 (executable)
@@ -131,7 +131,7 @@ void LocOpe_CSIntersector::Perform(const LocOpe_SequenceOfCirc& Scir)
   TopExp_Explorer exp(myShape,TopAbs_FACE);
   Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve ();
   Standard_Real binf = 0.;
-  Standard_Real bsup = 2.*PI;
+  Standard_Real bsup = 2.*M_PI;
 
 
   for (; exp.More(); exp.Next()) {
index 19626d1c1cd94bf38c97e84a0287a30301325192..fecfa8181e89e34c0c97b181801c02b5fd959f9a 100755 (executable)
@@ -57,7 +57,7 @@ void LocOpe_CurveShapeIntersector::Init(const gp_Circ& C,
   Standard_Real Tol = Precision::Confusion();
 
   Handle(Geom_Circle) GC = new Geom_Circle(C);
-  GeomAdaptor_Curve AC(GC,0.,2.*PI);
+  GeomAdaptor_Curve AC(GC,0.,2.*M_PI);
 
   BRepIntCurveSurface_Inter theInt;
   theInt.Init(S,AC,Tol);
index 1ccfc40c7d3968ba9a5b5b92c7cbb164c16fc54d..5f531b46b5fb138f4253ca2b26b3214c87d1f75f 100755 (executable)
@@ -116,21 +116,21 @@ void LocOpe_FindEdges::Set(const TopoDS_Shape& FFrom,
          Standard_Real prm1 = ElCLib::Parameter(cit,p1);
          Standard_Real Tol2d = Precision::PConfusion();
          if (Abs(prm1-ft) <= Tol2d) prm1 = ft;
-         prm1 = ElCLib::InPeriod(prm1,ft,ft+2.*PI);
+         prm1 = ElCLib::InPeriod(prm1,ft,ft+2.*M_PI);
          ElCLib::D1(prm1,cit,p1,tgt);
 
          Standard_Real prm2 = ElCLib::Parameter(cit,p2);
          if (tgt.Dot(tgf) > 0.) { // meme sens
            while (prm2 <= prm1) {
-             prm2 += 2.*PI;
+             prm2 += 2.*M_PI;
            }
          }
          else {
            if (Abs(prm1-ft) <= Precision::Angular()) {
-             prm1 += 2.*PI;
+             prm1 += 2.*M_PI;
            }
            while (prm2 >= prm1) {
-             prm2 -= 2.*PI;
+             prm2 -= 2.*M_PI;
            }
          }
 
@@ -168,21 +168,21 @@ void LocOpe_FindEdges::Set(const TopoDS_Shape& FFrom,
          p2 = ElCLib::Value(lf,cif);
 
          Standard_Real prm1 = ElCLib::Parameter(cit,p1);
-         prm1 = ElCLib::InPeriod(prm1,ft,ft+2.*PI);
+         prm1 = ElCLib::InPeriod(prm1,ft,ft+2.*M_PI);
          ElCLib::D1(prm1,cit,p1,tgt);
 
          Standard_Real prm2 = ElCLib::Parameter(cit,p2);
          if (tgt.Dot(tgf) > 0.) { // meme sens
            while (prm2 <= prm1) {
-             prm2 += 2.*PI;
+             prm2 += 2.*M_PI;
            }
          }
          else {
            if (Abs(prm1-ft) <= Precision::Angular()) {
-             prm1 += 2.*PI;
+             prm1 += 2.*M_PI;
            }
            while (prm2 >= prm1) {
-             prm2 -= 2.*PI;
+             prm2 -= 2.*M_PI;
            }
          }
 
index 15986e21f3b1ef2f7c6e61cb7ca56a85c3918df9..6838b8ae7dbd21baf199ca867b877c9e55813b50 100755 (executable)
@@ -558,13 +558,13 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G)
                    pl = C2d->Value(l);
                    Standard_Real tttol = Precision::Angular();
                    while (Min(pf.X(),pl.X()) >= Umaxc-tttol) {
-                     C2d->Translate(gp_Vec2d(-2.*PI,0));
+                     C2d->Translate(gp_Vec2d(-2.*M_PI,0));
                      pf = C2d->Value(f);
                      pl = C2d->Value(l);
                    }
 
                    while (Max(pf.X(),pl.X()) <= Uminc+tttol) {
-                     C2d->Translate(gp_Vec2d(2.*PI,0));
+                     C2d->Translate(gp_Vec2d(2.*M_PI,0));
                      pf = C2d->Value(f);
                      pl = C2d->Value(l);
                    }
@@ -880,13 +880,13 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G)
                  pl = C2d->Value(l);
                  Standard_Real tttol = Precision::Angular();
                  while (Min(pf.X(),pl.X()) >= Umaxc - tttol) {
-                   C2d->Translate(gp_Vec2d(-2.*PI,0));
+                   C2d->Translate(gp_Vec2d(-2.*M_PI,0));
                    pf = C2d->Value(f);
                    pl = C2d->Value(l);
                  }
                  
                  while (Max(pf.X(),pl.X()) <= Uminc + tttol) {
-                   C2d->Translate(gp_Vec2d(2.*PI,0));
+                   C2d->Translate(gp_Vec2d(2.*M_PI,0));
                    pf = C2d->Value(f);
                    pl = C2d->Value(l);
                  }
@@ -1251,12 +1251,12 @@ Standard_Real NewParameter(const TopoDS_Edge& Edg,
       if (exp.More()) {
        Standard_Real prmmax = BRep_Tool::Parameter
          (TopoDS::Vertex(exp.Current()),NewEdg);
-       if (Abs(prmmax - prm) <= Epsilon(2.*PI)) {
+       if (Abs(prmmax - prm) <= Epsilon(2.*M_PI)) {
          if (orient == TopAbs_REVERSED) {
-           prm -= 2.*PI;
+           prm -= 2.*M_PI;
          }
          else {
-           prm += 2.*PI;
+           prm += 2.*M_PI;
          }
        }
       }
index d6c8a9e1effffe1ad64d401345b9fec8be1ba786..8b26897e673f11e5bc0ec303df92ed8c476d26c6 100755 (executable)
@@ -1095,7 +1095,7 @@ static void ChoixUV(const TopoDS_Edge& Last,
   Handle(Geom2d_Curve) C2d;
 
   Standard_Integer index = 0, imin=0;
-  Standard_Real  angmax = -PI, dist, ang;
+  Standard_Real  angmax = -M_PI, dist, ang;
 
 
   for (It.Initialize(Poss); It.More(); It.Next()) {
@@ -1139,7 +1139,7 @@ static void ChoixUV(const TopoDS_Edge& Last,
       ang = ref2d.Angle(gp_Dir2d(v2d));
     }
     else {
-      ang = -PI;
+      ang = -M_PI;
     }
 
     //if ((dist < dmin - tol) ||
index fbf89d6cdd8f2964b4cbcc25242e78ea548f8530..b6bd22e88fb4d734e3bd5f61634a81a79e473fa6 100755 (executable)
@@ -30,7 +30,7 @@ void LocalAnalysis_CurveContinuity::CurvC1(  GeomLProp_CLProps& Curv1,
        { myLambda1 = norm2 / norm1;}   
        else { myLambda1  = norm1 / norm2;} 
        ang= V1.Angle(V2);
-       if (ang>PI/2)   myContC1=PI-ang;
+       if (ang>M_PI/2)   myContC1=M_PI-ang;
        else  myContC1=ang;
    }
    else  {myIsDone= Standard_False;
@@ -62,7 +62,7 @@ void LocalAnalysis_CurveContinuity::CurvC2(GeomLProp_CLProps& Curv1,
             else {myLambda1  = norm1 / norm2; 
                  myLambda2 = norm12 / norm22;}
             ang=V12.Angle(V22);
-            if (ang>PI/2)  myContC2=PI-ang;
+            if (ang>M_PI/2)  myContC2=M_PI-ang;
            else myContC2=ang; }
     
         else{myIsDone= Standard_False ;
@@ -82,7 +82,7 @@ void LocalAnalysis_CurveContinuity::CurvG1 (   GeomLProp_CLProps& Curv1,
      {   Curv1.Tangent(Tang1);
          Curv2.Tangent(Tang2);
          ang=Tang1.Angle(Tang2);
-         if (ang>PI/2)  myContG1=PI-ang;
+         if (ang>M_PI/2)  myContG1=M_PI-ang;
          else myContG1=ang;
      } 
    else {myIsDone= Standard_False ;
@@ -107,7 +107,7 @@ void LocalAnalysis_CurveContinuity::CurvG2( GeomLProp_CLProps& Curv1,
             Curv1.Normal(D1);
             Curv2.Normal(D2);
             ang =D1.Angle(D2);
-           if (ang>PI/2)  myContG2=PI-ang;
+           if (ang>M_PI/2)  myContG2=M_PI-ang;
            else myContG2=ang;
             myCourbC1= Curv1.Curvature();
             myCourbC2 = Curv2.Curvature();
@@ -197,7 +197,7 @@ Standard_Boolean LocalAnalysis_CurveContinuity::IsC0() const
 Standard_Boolean LocalAnalysis_CurveContinuity::IsC1() const  
 {
   if (!myIsDone) { StdFail_NotDone::Raise();}
-  if ( IsC0() && ( (myContC1 <= myepsC1)||(Abs(myContC1-PI)<=myepsC1)))
+  if ( IsC0() && ( (myContC1 <= myepsC1)||(Abs(myContC1-M_PI)<=myepsC1)))
      return Standard_True;
      else return Standard_False;       
 }
@@ -209,7 +209,7 @@ Standard_Boolean LocalAnalysis_CurveContinuity::IsC2() const
 
   if (!myIsDone) { StdFail_NotDone::Raise();}
   if ( IsC1())
-    { if ((myContC2 <= myepsC2)||(Abs(myContC2-PI)<=myepsC2))
+    { if ((myContC2 <= myepsC2)||(Abs(myContC2-M_PI)<=myepsC2))
       { epsil1 = 0.5*myepsC1*myepsC1*myLambda1;
         epsil2 = 0.5*myepsC2*myepsC2*myLambda2;
        if ( (Abs(myLambda1*myLambda1-myLambda2)) <= (epsil1*epsil1+epsil2))
@@ -226,7 +226,7 @@ Standard_Boolean LocalAnalysis_CurveContinuity::IsC2() const
 Standard_Boolean LocalAnalysis_CurveContinuity::IsG1() const  
 {
   if (!myIsDone) { StdFail_NotDone::Raise();}
- if ( IsC0() && (( myContG1 <= myepsG1||(Abs(myContG1-PI)<=myepsG1))))
+ if ( IsC0() && (( myContG1 <= myepsG1||(Abs(myContG1-M_PI)<=myepsG1))))
      return Standard_True;
      else return Standard_False;       
 }
@@ -253,7 +253,7 @@ Standard_Boolean LocalAnalysis_CurveContinuity::IsG2()const
                  else IETA2=1;
        if (IETA1 == IETA2)
          { if (IETA1 == 1)
-               { Standard_Real eps= RealPart( (myContG2+myepsG2)/PI) * PI;
+               { Standard_Real eps= RealPart( (myContG2+myepsG2)/M_PI) * M_PI;
                  if (Abs( eps - myepsG2) < myepsG2)
                     {if (myG2Variation < myperce )
                       return Standard_True;
index ac1ddb67c947c625af0874761c752010c8cafbac..2bfb74a808ab271ef265ac76d5ccf11d1a5dddb8 100755 (executable)
@@ -51,10 +51,10 @@ void LocalAnalysis_SurfaceContinuity::SurfC1(  GeomLProp_SLProps& Surf1,
          myLambda1V= norm2v / norm1v;
       else myLambda1V = norm2v / norm1v;
       angu= V1u.Angle(V2u);
-      if (angu>PI/2) myContC1U=PI-angu;
+      if (angu>M_PI/2) myContC1U=M_PI-angu;
       else myContC1U=angu;
       angv= V1v.Angle(V2v);
-      if (angv>PI/2) myContC1V=PI-angv;
+      if (angv>M_PI/2) myContC1V=M_PI-angv;
        else myContC1V=angv;   }
   else {myIsDone = Standard_False;  
         myErrorStatus=LocalAnalysis_NullFirstDerivative;}
@@ -85,7 +85,7 @@ void LocalAnalysis_SurfaceContinuity::SurfC2(  GeomLProp_SLProps& Surf1,
             else {myLambda1U = norm11u / norm12u;
                  myLambda2U = norm21u / norm22u;}
             ang=V21u.Angle(V22u);
-            if(ang>PI/2) myContC2U=PI-ang;
+            if(ang>M_PI/2) myContC2U=M_PI-ang;
             else myContC2U=ang; }
        else
          {  myIsDone=Standard_False;
@@ -112,7 +112,7 @@ void LocalAnalysis_SurfaceContinuity::SurfC2(  GeomLProp_SLProps& Surf1,
           else{ myLambda1V = norm11v / norm12v;
                myLambda2V = norm21v / norm22v;}
           ang= V21v.Angle(V22v);
-          if (ang>PI/2)  myContC2V=PI-ang;
+          if (ang>M_PI/2)  myContC2V=M_PI-ang;
           else myContC2V=ang;
          }
       else{ myIsDone= Standard_False;
@@ -129,7 +129,7 @@ void LocalAnalysis_SurfaceContinuity::SurfG1(  GeomLProp_SLProps& Surf1,
   { gp_Dir D1 = Surf1.Normal();
     gp_Dir D2 = Surf2.Normal();
     Standard_Real ang=D1.Angle(D2);
-    if (ang>PI/2)  myContG1= PI-ang;
+    if (ang>M_PI/2)  myContG1= M_PI-ang;
     else  myContG1=ang; 
   }
   else{ myIsDone=Standard_False;
index 019dad58f4a0c4f06364cc09bae337051273496d..85ed625b240a3dd93e9aee41544d1be30902f1d4 100755 (executable)
@@ -469,7 +469,7 @@ Standard_Boolean MAT2d_Tool2d::TrimBisector
       ::DownCast(ChangeGeomBis(abisector->BisectorNumber()).ChangeValue());
   
   if(bisector->BasisCurve()->IsPeriodic() && param == Precision::Infinite()) {
-    param = bisector->FirstParameter() + 2*PI;
+    param = bisector->FirstParameter() + 2*M_PI;
   }
   if (param > bisector->BasisCurve()->LastParameter()) {
    param = bisector->BasisCurve()->LastParameter(); 
@@ -500,7 +500,7 @@ Standard_Boolean MAT2d_Tool2d::TrimBisector
   Param = Bis->Parameter(GeomPnt (apoint));
 
   if (Bisector->BasisCurve()->IsPeriodic()) {
-    if (Bisector->FirstParameter() > Param) Param = Param + 2*PI;
+    if (Bisector->FirstParameter() > Param) Param = Param + 2*M_PI;
   }
   if(Bisector->FirstParameter() >= Param)return Standard_False;
   if(Bisector->LastParameter()  <  Param)return Standard_False;
@@ -552,7 +552,7 @@ Standard_Boolean MAT2d_Tool2d::Projection (const Standard_Integer IEdge   ,
     if (theCircuit->ConnexionOn(INext)) {
       ParamMax = theCircuit->Connexion(INext)->ParameterOnFirst(); 
       if (Curve->BasisCurve()->IsPeriodic()){
-       ElCLib::AdjustPeriodic(0.,2*PI,Eps,ParamMin,ParamMax);
+       ElCLib::AdjustPeriodic(0.,2*M_PI,Eps,ParamMin,ParamMax);
       }
     }
     //---------------------------------------------------------------------
@@ -564,7 +564,7 @@ Standard_Boolean MAT2d_Tool2d::Projection (const Standard_Integer IEdge   ,
       Standard_Real R       = C1.Circle().Radius();
       Standard_Real EpsCirc = Eps;
       if ( R < 1.)  EpsCirc = Eps/R;
-      if (!((ParamMax - ParamMin + 2*EpsCirc) < 2*PI)) {
+      if (!((ParamMax - ParamMin + 2*EpsCirc) < 2*M_PI)) {
        ParamMax = ParamMax + EpsCirc; ParamMin = ParamMin - EpsCirc;
       }
     }
@@ -1186,7 +1186,7 @@ IntRes2d_Domain  Domain(const Handle(Geom2d_TrimmedCurve)& Bisector1,
   IntRes2d_Domain Domain1(Bisector1->Value(Param1),Param1,Tolerance,
                          Bisector1->Value(Param2),Param2,Tolerance);
   if(Bisector1->BasisCurve()->IsPeriodic()) {
-    Domain1.SetEquivalentParameters(0.,2.*PI);
+    Domain1.SetEquivalentParameters(0.,2.*M_PI);
   }
   return Domain1;
 }
index e7dcf0941d5be0b4d288297723d9a6d24f590144..cac27443c7e0a25c01a15665ae1c4f71dcbd8c03 100755 (executable)
@@ -122,7 +122,7 @@ void OpenGl_GraphicDriver::Text
   atext.Height    = float (AHeight);
   if (atext.Height < 0)
     atext.Height = DefaultTextHeight();
-  atext.Angle   = float (Standard_PI / 2.);
+  atext.Angle   = float (M_PI / 2.);
   atext.Path    = int (Graphic3d_TP_RIGHT);
   atext.HAlign    = int (Graphic3d_HTA_LEFT);
   atext.VAlign    = int (Graphic3d_VTA_BOTTOM);
index eb45de9b78c8ced4ebf86baea32d3358ee65cc74..630d815ffbe5df2a6126ee4647551b3d269779f2 100755 (executable)
@@ -65,10 +65,6 @@ HISTORIQUE DES MODIFICATIONS   :
 #define GROW_SIZE_WKS 10
 #define GROW_SIZE_LIGHT 8
 
-#ifndef M_PI
-# define M_PI          3.14159265358979323846
-#endif
-
 /*----------------------------------------------------------------------*/
 /*
 * Types definis
index 2b3c8408d3c36c8a4b68bcd3c0d77b40d051e891..6bad6c5a437d9ef493e10b988c194098dbb251d3 100755 (executable)
@@ -34,12 +34,6 @@ xx-xx-xx : xxx ; Creation.
 #include <InterfaceGraphic_tgl_all.hxx>
 #include <InterfaceGraphic_telem.hxx>
 
-
-#ifdef WNT
-// CAL : pas trouve de definition de PI dans les includes WNT
-#define M_PI 3.14159265358979323846
-#endif
-
 #include <GL/gl.h>
 #include <GL/glu.h>
 
index 23b05d836cbe61376016394fcbeadbfd1c437549..6860bfce92f15908d1c703c0f75afd9d4f9f7639 100755 (executable)
@@ -79,10 +79,6 @@ from higher API */
 #define NO_PRINT
 #define NO_PRINT_MATRIX
 
-#ifndef M_PI
-# define M_PI          3.14159265358979323846
-#endif
-
 /* on trouve que 10 vues sera suffisant */
 #define GROW_SIZE_NZ_WKS   10
 
index 92f11255eaac547c491d24d6b8400b9724e6062a..e5e37051f39f30d291b0cab6ffd09aea80cd70ee 100755 (executable)
@@ -924,7 +924,7 @@ Standard_Boolean PS_Driver::PlotArc (const Standard_ShortReal Xpos,
               << Ypos + aYradius*Sin(san) << " " << MOVETO;
     (*Cout()) << GSAVE << Xpos << " " << Ypos << " " << aXradius << " ";
 
-    if (Abs(fan)-Abs(san) >= 2.*PI) {
+    if (Abs(fan)-Abs(san) >= 2.*M_PI) {
       (*Cout()) << " 0 360 " << ARC << STROKE << GRESTORE << endl;
     } else {
       Standard_Real a1 = san/DRAD;
@@ -949,14 +949,14 @@ Standard_Boolean PS_Driver::PlotPolyArc (const Standard_ShortReal Xpos,
 
   if (Abs(aXradius-aYradius) <= 1.) {
     PLOT_PCOLOR (myPolyColorIndex);
-    if (Abs(oAngle) < 2.*PI)
+    if (Abs(oAngle) < 2.*M_PI)
       (*Cout()) << Xpos << " " << Ypos << " " << MOVETO;
     else
       (*Cout()) << Xpos + aXradius*Cos(san) << " "
                 << Ypos + aXradius*Sin(san) << " " << MOVETO;
     (*Cout())  << GSAVE << Xpos << " " << Ypos << " " << aXradius << " ";
 
-    if (Abs(fan) - Abs(san) >= 2.*PI) {
+    if (Abs(fan) - Abs(san) >= 2.*M_PI) {
       (*Cout()) << " 0 360 " << ARC << FILL << GRESTORE << endl;
     } else {
       Standard_Real a1 = san/DRAD;
index 0c266cd6521607051e38c626d07619e803c70a0e..d5969c27f4aadf26a5f045df8a22daddce36434f 100755 (executable)
@@ -53,7 +53,7 @@ Plate_FreeGtoCConstraint::Plate_FreeGtoCConstraint(const gp_XY& point2d,const Pl
       Standard_Real s =  N0.CrossMagnitude(N1);
       if((s < 1.e-2)&&(c<0.)) return;
       Standard_Real angle = atan2(c,s);
-      //if (angle < 0.) angle += PI;
+      //if (angle < 0.) angle += M_PI;
       
       gp_XYZ d = N0^N1;
       d.Normalize();
index b71692c7b86424661d2c8bfd6cbade440d8b88dd..d6dee95f9e68157d597989182dd4e9752b163691 100755 (executable)
@@ -624,10 +624,10 @@ Standard_Boolean PlotMgt_PlotterDriver::DrawArc (const Standard_ShortReal X,
 {
   Standard_Boolean Done = Standard_False;
   float san, oan;
-  if (anOpenAngle == 0.F || anOpenAngle > 2*PI) {
-    san = 0.F;  oan = 2.*PI;
+  if (anOpenAngle == 0.F || anOpenAngle > 2*M_PI) {
+    san = 0.F;  oan = 2.*M_PI;
   } else if (anOpenAngle < 0.F) {
-    san = 2.*PI + aStartAngle + anOpenAngle;
+    san = 2.*M_PI + aStartAngle + anOpenAngle;
     oan = -anOpenAngle;
   } else {
     san = aStartAngle; oan = anOpenAngle;
@@ -646,7 +646,7 @@ Standard_Boolean PlotMgt_PlotterDriver::DrawArc (const Standard_ShortReal X,
     if (aRadius > precis)
       value = Max (0.0044, Min (0.7854, 2. * ACos(1.-precis/aRadius)));
     else
-      value = PI/4.;
+      value = M_PI/4.;
     Standard_Integer nbpoints = Min(MAXPOINT,
                         Standard_Integer(Abs(oan)/value)+2);
 
@@ -675,10 +675,10 @@ Standard_Boolean PlotMgt_PlotterDriver::DrawPolyArc (const Standard_ShortReal X,
 {
   Standard_Boolean Done = Standard_False;
   float san, oan;
-  if (anOpenAngle == 0.F || anOpenAngle > 2*PI) {
-    san = 0.F;  oan = 2.*PI;
+  if (anOpenAngle == 0.F || anOpenAngle > 2*M_PI) {
+    san = 0.F;  oan = 2.*M_PI;
   } else if (anOpenAngle < 0.F) {
-    san = 2.*PI + aStartAngle + anOpenAngle;
+    san = 2.*M_PI + aStartAngle + anOpenAngle;
     oan = -anOpenAngle;
   } else {
     san = aStartAngle; oan = anOpenAngle;
@@ -698,7 +698,7 @@ Standard_Boolean PlotMgt_PlotterDriver::DrawPolyArc (const Standard_ShortReal X,
     if (aRadius > precis)
       value = Max (0.0044, Min (0.7854, 2. * ACos(1.-precis/aRadius)));
     else
-      value = PI/4.;
+      value = M_PI/4.;
     Standard_Integer nbpoints = Min(MAXPOINT,
                         Standard_Integer(Abs(oan)/value)+2);
 
@@ -741,8 +741,8 @@ void PlotMgt_PlotterDriver::DrawMarker (const Standard_Integer aMarker,
       const TColStd_Array1OfBoolean&  ams =
         MarkMap ()->Entry(aMarker+1).Style().SValues();
       Standard_Integer i, sl, su;
-      Standard_ShortReal Ca = (float)Cos((3*Standard_PI)/2+Angle),
-                         Sa = (float)Sin((3*Standard_PI)/2+Angle);
+      Standard_ShortReal Ca = (float)Cos((3 * M_PI) / 2 + Angle),
+                         Sa = (float)Sin((3 * M_PI) / 2 + Angle);
       Standard_ShortReal dx, dy, Cx, Cy;
 
       // Remember the old attributes
index 8b21898fbad4bdef42b7ca99be1e71bf8dc769c3..4dad00d1d225df4f69459fec4774eec3b53ca41e 100755 (executable)
 //--------------------------------------------------------
 #include <math.h>
 #include <stdlib.h>
+#ifndef __MATH_WNT_H
+# include <Standard_math.hxx>
+#endif  /* __MATH_WNT_H */
 #include <Standard_Stream.hxx>
 #include <PlotMgt_fill.hxx>
-#define Standard_PI (3.14159)
 #define maxDouble ((double)1.E+30)
 //--------------------------------------------------------
 
@@ -109,12 +111,12 @@ double fsqrt(double a)
 // Determine is angle a is between b and b+c (c>0)
 int mpo_inside(double a, double b, double c)
 {
-  while (b<0) {b += 2*Standard_PI;}; b -= 2*Standard_PI*ftrunc(b/(2*Standard_PI));
-  c -= 2*Standard_PI*ftrunc(c/(2*Standard_PI));
-  while (a<0) {a+=2*Standard_PI;}; a -= 2*Standard_PI*ftrunc(a/(2*Standard_PI));
-//  while(c<0) {c+=2*Standard_PI;}; c-=2*Standard_PI*ftrunc(c/(2*Standard_PI));
+  while (b<0) {b += 2*M_PI;}; b -= 2*M_PI*ftrunc(b/(2*M_PI));
+  c -= 2*M_PI*ftrunc(c/(2*M_PI));
+  while (a<0) {a+=2*M_PI;}; a -= 2*M_PI*ftrunc(a/(2*M_PI));
+//  while(c<0) {c+=2*M_PI;}; c-=2*M_PI*ftrunc(c/(2*M_PI));
   if ((a > b) && (a < b+c)) return 1;
-  else if ((2*Standard_PI+a > b) && (2*Standard_PI+a < b+c)) return 1;
+  else if ((2*M_PI+a > b) && (2*M_PI+a < b+c)) return 1;
   return 0;
 }
 
@@ -122,7 +124,7 @@ int __InitFillArc(double X,  double Y, double a, double b, double alpha,
                   double beta, double gamma, double delta, double step)
 {
   int i ;
-  alpha -= 2*Standard_PI*ftrunc(alpha/(2*Standard_PI)); beta -= 2*Standard_PI*ftrunc(beta/(2*Standard_PI));
+  alpha -= 2*M_PI*ftrunc(alpha/(2*M_PI)); beta -= 2*M_PI*ftrunc(beta/(2*M_PI));
   if (beta < 0.0) 
     {
       alpha += beta; beta = -beta;
@@ -137,16 +139,16 @@ int __InitFillArc(double X,  double Y, double a, double b, double alpha,
   int size = int( ftrunc(2*Ys/step) + 1 );
 //  cout << "Ysize = " << Ys << endl << flush;
 //  cout << "Size  = " << size << endl << flush;
-//  cout << "Alpha = " << alpha*180/Standard_PI << endl << flush;
-//  cout << "Beta  = " << beta*180/Standard_PI << endl << flush;
+//  cout << "Alpha = " << alpha*180/M_PI << endl << flush;
+//  cout << "Beta  = " << beta*180/M_PI << endl << flush;
   mpo_lines = (mpo_one_line*)malloc(sizeof(mpo_one_line)*size);
   for ( i = 0; i < size; i++)
     {
       double Yt = Ys - i*step;
       (mpo_lines+i)->X1 = (-C2*Yt - fsqrt(C2*C2*Yt*Yt - C1*(C3*Yt*Yt - a*a*b*b)))/C1;
       (mpo_lines+i)->X2 = (-C2*Yt + fsqrt(C2*C2*Yt*Yt - C1*(C3*Yt*Yt - a*a*b*b)))/C1;
-//    cout << "alpha = " << alpha*180/Standard_PI << "    alpha+beta = " << (alpha+beta)*180/Standard_PI << endl << flush;
-//    cout << "" << fatan2(Yt, (mpo_lines+i)->X2)*180/Standard_PI << "     type " << (mpo_lines+i)->type << endl << flush;;
+//    cout << "alpha = " << alpha*180/M_PI << "    alpha+beta = " << (alpha+beta)*180/M_PI << endl << flush;
+//    cout << "" << fatan2(Yt, (mpo_lines+i)->X2)*180/M_PI << "     type " << (mpo_lines+i)->type << endl << flush;;
 //    cout << "Xleft = " << (mpo_lines+i)->X1 << "     Xright = " << (mpo_lines+i)->X2 << endl << flush;
 //    cout << "C2*C2 - C1*(C3*Yt*Yt - a*a*b*b) = " << C2*C2 - C1*(C3*Yt*Yt - a*a*b*b) << endl << flush;
 //    cout << "C1*(C3*Yt*Yt - a*a*b*b) = " << C1*(C3*Yt*Yt - a*a*b*b) << endl << flush;
index dae17d882ff3535424fa9aeacc336d1637100862..c80a65bf322e919f668fd2449a5c0373be69de13 100755 (executable)
@@ -584,7 +584,7 @@ Standard_Integer Poly_MakeLoops3D::chooseLeftWay
                     const Standard_Integer theSegIndex,
                     const NCollection_List<Standard_Integer>& theLstIndS) const
 {
-  Standard_Real aAngleMin = ::PI * 2;
+  Standard_Real aAngleMin = M_PI * 2;
   gp_Dir aNormal;
   const Helper* aHelper = getHelper();
   if (!aHelper->GetNormal (theNode, aNormal))
@@ -623,8 +623,8 @@ Standard_Integer Poly_MakeLoops3D::chooseLeftWay
     aTgt = aTgtXYZ;
 
     Standard_Real aAngle = aTgt.AngleWithRef(aTgtRef, aNormal);
-    if (aAngle < 1e-4 - ::PI)
-      aAngle = ::PI;
+    if (aAngle < 1e-4 - M_PI)
+      aAngle = M_PI;
     if (aAngle < aAngleMin)
     {
       aAngleMin = aAngle;
@@ -657,7 +657,7 @@ Standard_Integer Poly_MakeLoops2D::chooseLeftWay
                     const Standard_Integer theSegIndex,
                     const NCollection_List<Standard_Integer>& theLstIndS) const
 {
-  Standard_Real aAngleMin = ::PI * 2;
+  Standard_Real aAngleMin = M_PI * 2;
   const Helper* aHelper = getHelper();
   Link aLink = getLink(theSegIndex);
   gp_Dir2d aTgtRef;
@@ -682,8 +682,8 @@ Standard_Integer Poly_MakeLoops2D::chooseLeftWay
     Standard_Real aAngle = aTgt.Angle(aTgtRef);
     if (myRightWay)
       aAngle = -aAngle;
-    if (aAngle < 1e-4 - ::PI)
-      aAngle = ::PI;
+    if (aAngle < 1e-4 - M_PI)
+      aAngle = M_PI;
     if (aAngle < aAngleMin)
     {
       aAngleMin = aAngle;
index 3f329b03c8b910e2b540fcd7a2590fd18ec6810a..40aa8ec2075bece386112038660f3640950e6379 100755 (executable)
@@ -88,7 +88,7 @@ Primitives_OneAxis::Primitives_OneAxis(const TheBuilder& B,
                                       const Standard_Real VMax) :
        myBuilder(B),
        myAxes(A),
-       myAngle(2*PI),
+       myAngle(2*M_PI),
        myVMin(VMin),
        myVMax(VMax),
        myMeridianOffset(0)
@@ -247,7 +247,7 @@ Standard_Boolean Primitives_OneAxis::HasBottom() const
 
 Standard_Boolean Primitives_OneAxis::HasSides() const
 {
-  return 2*PI - myAngle > Precision::Angular();
+  return 2*M_PI - myAngle > Precision::Angular();
 }
 
 //=======================================================================
index 5c131d73a4b07d06724c281231f0b36cc714a7e2..bfe23b84aeb15a5256b77ada9713ac4d1483289a 100755 (executable)
@@ -122,9 +122,9 @@ static gp_Pnt2d Function_Value(const Standard_Real U,
  
   if ( VCouture) {
     if(SType == GeomAbs_Sphere) {
-      if ( Abs( S - U1 ) > PI ) {
-       T = PI - T;
-       S = PI + S;
+      if ( Abs( S - U1 ) > M_PI ) {
+       T = M_PI - T;
+       S = M_PI + S;
       }
       S = ElCLib::InPeriod(S, U1, U2);
     }
@@ -236,7 +236,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       }      
       else {
        UCouture = Standard_True;
-       myU2 = myU1 + 2*PI;
+       myU2 = myU1 + 2*M_PI;
       }
       
     }
@@ -257,17 +257,17 @@ static void Function_SetUVBounds(Standard_Real& myU1,
        ElSLib::Parameters( Cone, P, U, V);
        U += Delta;
        d = U - U1;
-       if(d > PI)  {
-         if( ( (IsEqual(U,(2*PI),1.e-10) && (U1 >= 0. && U1 <= PI)) && 
+       if(d > M_PI)  {
+         if( ( (IsEqual(U,(2*M_PI),1.e-10) && (U1 >= 0. && U1 <= M_PI)) && 
               (IsEqual(U,Ul,1.e-10) && !IsEqual(Uf,0.,1.e-10)) ) && isclandper ) U = 0.;
-         else Delta -= 2*PI;
+         else Delta -= 2*M_PI;
          U += Delta;
          d = U - U1;
        }
-       else if(d < -PI)          {
-         if( ( (IsEqual(U,0.,1.e-10) && (U1 >= PI && U1 <= (2*PI))) &&
-              (IsEqual(U,Ul,1.e-10) && !IsEqual(Uf,(2*PI),1.e-10)) ) && isclandper ) U = 2*PI;
-         else Delta += 2*PI;
+       else if(d < -M_PI)        {
+         if( ( (IsEqual(U,0.,1.e-10) && (U1 >= M_PI && U1 <= (2*M_PI))) &&
+              (IsEqual(U,Ul,1.e-10) && !IsEqual(Uf,(2*M_PI),1.e-10)) ) && isclandper ) U = 2*M_PI;
+         else Delta += 2*M_PI;
          U += Delta;
          d = U - U1;
        }
@@ -280,11 +280,11 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       if(!(Abs(pmin - W1) <= Precision::PConfusion() || Abs(pmin - W2) <= Precision::PConfusion()) ) myU1 -= dmax*.5;
       if(!(Abs(pmax - W1) <= Precision::PConfusion() || Abs(pmax - W2) <= Precision::PConfusion()) ) myU2 += dmax*.5;
 
-      if((myU1 >=0. && myU1 <= 2*PI) && (myU2 >=0. && myU2 <= 2*PI) ) UCouture = Standard_False;
+      if((myU1 >=0. && myU1 <= 2*M_PI) && (myU2 >=0. && myU2 <= 2*M_PI) ) UCouture = Standard_False;
       else{
        U = ( myU1 + myU2 ) /2.;
-       myU1 = U - PI;
-       myU2 = U + PI;
+       myU1 = U - M_PI;
+       myU2 = U + M_PI;
        UCouture = Standard_True;
       }
     }
@@ -309,18 +309,18 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       if ( !myCurve->IsClosed()) {
        if ( myU1 < U && U < myU2) {
          U = ( myU1 + myU2 ) /2.;
-         myU1 = U - PI;
-         myU2 = U + PI;
+         myU1 = U - M_PI;
+         myU2 = U + M_PI;
        }
        else {
          U = ( myU1 + myU2 ) /2.;
          if ( myU1 < U) {
-           myU1 = U - 2*PI;
+           myU1 = U - 2*M_PI;
            myU2 = U;
          }
          else {
            myU1 = U;
-           myU2 = U + 2*PI;
+           myU2 = U + 2*M_PI;
          }
        }
        UCouture = Standard_True;
@@ -335,11 +335,11 @@ static void Function_SetUVBounds(Standard_Real& myU1,
        
        UCouture = Standard_True;
        if ( dU > 0.) {
-         myU2 = myU1 + 2*PI;
+         myU2 = myU1 + 2*M_PI;
        }
        else {
          myU2 = myU1;
-         myU1 -= 2*PI;
+         myU1 -= 2*M_PI;
        }
       }
     }
@@ -347,7 +347,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       Standard_Real U1, V1, U , V;
       ElSLib::Parameters( Cylinder, P1, U1, V1);
       Standard_Real Step = .1, Delta = 0.;
-      Standard_Real eps = PI, dmax = 0., d = 0.;
+      Standard_Real eps = M_PI, dmax = 0., d = 0.;
       Standard_Integer nbp = (Standard_Integer)((W2 - W1) / Step + 1);
       nbp = Max(nbp, 3);
       Step = (W2 - W1) / (nbp - 1);
@@ -360,13 +360,13 @@ static void Function_SetUVBounds(Standard_Real& myU1,
        d = U - U1;
        if(d > eps) {
          U -= Delta;
-         Delta -= 2*PI;
+         Delta -= 2*M_PI;
          U += Delta;
          d = U - U1;
          }
        else if(d < -eps) {
          U -= Delta;
-         Delta += 2*PI;
+         Delta += 2*M_PI;
          U += Delta;
          d = U - U1;
        }
@@ -381,14 +381,14 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       if(!(Abs(pmax - W1) <= Precision::PConfusion() ||
           Abs(pmax - W2) <= Precision::PConfusion())  ) myU2 += dmax*.5;
       
-      if((myU1 >=0. && myU1 <= 2*PI) &&
-        (myU2 >=0. && myU2 <= 2*PI)    ) {
+      if((myU1 >=0. && myU1 <= 2*M_PI) &&
+        (myU2 >=0. && myU2 <= 2*M_PI)    ) {
        UCouture = Standard_False;
       }
       else {
        U = ( myU1 + myU2 ) /2.;
-       myU1 = U - PI;
-       myU2 = U + PI;
+       myU1 = U - M_PI;
+       myU2 = U + M_PI;
        UCouture = Standard_True;
       }
     }
@@ -465,7 +465,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       ElSLib::Parameters(SP, P, UU, V1);
       Standard_Real UUmi = Min(Min(U1,UU),Min(UU,U2));
       Standard_Real UUma = Max(Max(U1,UU),Max(UU,U2));
-      Standard_Boolean reCalc = ((UUmi >= 0. && UUmi <= PI) && (UUma >= 0. && UUma <= PI));
+      Standard_Boolean reCalc = ((UUmi >= 0. && UUmi <= M_PI) && (UUma >= 0. && UUma <= M_PI));
       // box+sphere <<
       
       ElSLib::Parameters(SP, P1, U1, V1);//*
@@ -473,28 +473,28 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       Parameters(myCurve, mySurface, P1, 1, aTPC, U1, V1);
       //
       //
-      P2 = myCurve->Value(W1+PI/8);
+      P2 = myCurve->Value(W1+M_PI/8);
       ElSLib::Parameters(SP,P2,U2,V2);
       //
       if ( NbSolutions == 1) {
-       if ( Abs(U1-U2) > PI) { // on traverse la couture
-         if ( U1 > PI) {
+       if ( Abs(U1-U2) > M_PI) { // on traverse la couture
+         if ( U1 > M_PI) {
            myU1 = U1;
-           myU2 = U1+2*PI;
+           myU2 = U1+2*M_PI;
          }
          else {
            myU2 = U1;
-           myU1 = U1-2*PI;
+           myU1 = U1-2*M_PI;
          }
        }
        else { // on ne traverse pas la couture
          if ( U1 > U2) {
            myU2 = U1;
-           myU1 = U1-2*PI;
+           myU1 = U1-2*M_PI;
          }
          else {
            myU1 = U1;
-           myU2 = U1+2*PI;
+           myU2 = U1+2*M_PI;
          }
        }
       }
@@ -502,8 +502,8 @@ static void Function_SetUVBounds(Standard_Real& myU1,
        gp_Pnt Center = Circle.Location();
        Standard_Real U,V;
        ElSLib::SphereParameters(gp_Ax3(gp::XOY()),1,Center, U, V);
-       myU1 = U-PI;
-       myU2 = U+PI;
+       myU1 = U-M_PI;
+       myU2 = U+M_PI;
       }
       //
       // eval the VCouture.
@@ -515,12 +515,12 @@ static void Function_SetUVBounds(Standard_Real& myU1,
        UCouture = Standard_True;
        
        if ( D/C < 0.) {
-         myV1 =   - PI / 2.;
-         myV2 = 3 * PI / 2.;
+         myV1 =   - M_PI / 2.;
+         myV2 = 3 * M_PI / 2.;
        }
        else {
-         myV1 = -3 * PI / 2.;
-         myV2 =      PI / 2.;
+         myV1 = -3 * M_PI / 2.;
+         myV2 =      M_PI / 2.;
        }
        
        // si P1.Z() vaut +/- R on est sur le sommet : pas significatif.
@@ -530,8 +530,8 @@ static void Function_SetUVBounds(Standard_Real& myU1,
          gp_Pnt Center = Circle.Location();
          Standard_Real U,V;
          ElSLib::SphereParameters(gp_Ax3(gp::XOY()),1,Center, U, V);
-         myU1 = U-PI;
-         myU2 = U+PI;
+         myU1 = U-M_PI;
+         myU2 = U+M_PI;
          VCouture = Standard_False;
        }
        else {
@@ -539,27 +539,27 @@ static void Function_SetUVBounds(Standard_Real& myU1,
          //
          Parameters(myCurve, mySurface, P1, 1, aTPC, U1, V1);
          //
-         P2 = myCurve->Value(W1+PI/8);
+         P2 = myCurve->Value(W1+M_PI/8);
          ElSLib::Parameters(SP,P2,U2,V2);
          
-         if ( Abs(U1-U2) > PI) { // on traverse la couture
-           if ( U1 > PI) {
+         if ( Abs(U1-U2) > M_PI) { // on traverse la couture
+           if ( U1 > M_PI) {
              myU1 = U1;
-             myU2 = U1+2*PI;
+             myU2 = U1+2*M_PI;
            }
            else {
              myU2 = U1;
-             myU1 = U1-2*PI;
+             myU1 = U1-2*M_PI;
            }
          }
          else { // on ne traverse pas la couture
            if ( U1 > U2) {
              myU2 = U1;
-             myU1 = U1-2*PI;
+             myU1 = U1-2*M_PI;
            }
            else {
              myU1 = U1;
-             myU2 = U1+2*PI;
+             myU2 = U1+2*M_PI;
            }
          }
        }
@@ -568,12 +568,12 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       // box+sphere >>
       myV1 = -1.e+100; myV2 = 1.e+100;
       Standard_Real UU1 = myU1, UU2 = myU2;
-      if((Abs(UU1) <= (2.*PI) && Abs(UU2) <= (2.*PI)) && NbSolutions == 1 && reCalc) {
+      if((Abs(UU1) <= (2.*M_PI) && Abs(UU2) <= (2.*M_PI)) && NbSolutions == 1 && reCalc) {
        gp_Pnt Center = Circle.Location();
        Standard_Real U,V;
        ElSLib::SphereParameters(gp_Ax3(gp::XOY()),1,Center, U, V);
-       myU1 = U-PI;
-       myU2 = U+PI;
+       myU1 = U-M_PI;
+       myU2 = U+M_PI;
        myU1 = Min(UU1,myU1);
        myU2 = Max(UU2,myU2);
       }
@@ -585,7 +585,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       Standard_Real U1, V1, U , V;
       ElSLib::Parameters( SP, P1, U1, V1);
       Standard_Real Step = .1, Delta = 0.;
-      Standard_Real eps = PI, dmax = 0., d = 0.;
+      Standard_Real eps = M_PI, dmax = 0., d = 0.;
       Standard_Integer nbp = (Standard_Integer)((W2 - W1) / Step + 1);
       nbp = Max(nbp, 3);
       Step = (W2 - W1) / (nbp - 1);
@@ -598,13 +598,13 @@ static void Function_SetUVBounds(Standard_Real& myU1,
        d = U - U1;
        if(d > eps) {
          U -= Delta;
-         Delta -= 2*PI;
+         Delta -= 2*M_PI;
          U += Delta;
          d = U - U1;
        }
        else if(d < -eps) {
          U -= Delta;
-         Delta += 2*PI;
+         Delta += 2*M_PI;
          U += Delta;
          d = U - U1;
          }
@@ -619,16 +619,16 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       if(!(Abs(pmax - W1) <= Precision::PConfusion() ||
           Abs(pmax - W2) <= Precision::PConfusion())  ) myU2 += dmax*.5;
       
-      if((myU1 >=0. && myU1 <= 2*PI) &&
-        (myU2 >=0. && myU2 <= 2*PI)    ) {
+      if((myU1 >=0. && myU1 <= 2*M_PI) &&
+        (myU2 >=0. && myU2 <= 2*M_PI)    ) {
        myU1 = 0.;
-       myU2 = 2.*PI;
+       myU2 = 2.*M_PI;
        UCouture = Standard_False;
       }
       else {
        U = ( myU1 + myU2 ) /2.;
-       myU1 = U - PI;
-       myU2 = U + PI;
+       myU1 = U - M_PI;
+       myU2 = U + M_PI;
        UCouture = Standard_True;
       }
       
@@ -642,7 +642,7 @@ static void Function_SetUVBounds(Standard_Real& myU1,
     Standard_Real U1, V1, U , V;
     ElSLib::Parameters( TR, P1, U1, V1);
     Standard_Real Step = .1, DeltaU = 0., DeltaV = 0.;
-    Standard_Real eps = PI, dmaxU = 0., dU = 0., dmaxV = 0., dV = 0.;
+    Standard_Real eps = M_PI, dmaxU = 0., dU = 0., dmaxV = 0., dV = 0.;
     Standard_Integer nbp = (Standard_Integer)((W2 - W1) / Step + 1);
     nbp = Max(nbp, 3);
     Step = (W2 - W1) / (nbp - 1);
@@ -659,25 +659,25 @@ static void Function_SetUVBounds(Standard_Real& myU1,
       dV = V - V1;
       if(dU > eps) {
        U -= DeltaU;
-       DeltaU -= 2*PI;
+       DeltaU -= 2*M_PI;
        U += DeltaU;
        dU = U - U1;
       }
       else if(dU < -eps) {
        U -= DeltaU;
-       DeltaU += 2*PI;
+       DeltaU += 2*M_PI;
        U += DeltaU;
        dU = U - U1;
       }
       if(dV > eps) {
        V -= DeltaV;
-       DeltaV -= 2*PI;
+       DeltaV -= 2*M_PI;
        V += DeltaV;
        dV = V - V1;
       }
       else if(dV < -eps) {
        V -= DeltaV;
-       DeltaV += 2*PI;
+       DeltaV += 2*M_PI;
        V += DeltaV;
        dV = V - V1;
       }
@@ -700,26 +700,26 @@ static void Function_SetUVBounds(Standard_Real& myU1,
     if(!(Abs(pmaxV - W1) <= Precision::PConfusion() ||
         Abs(pmaxV - W2) <= Precision::PConfusion())  ) myV2 += dmaxV*.5;
     
-    if((myU1 >=0. && myU1 <= 2*PI) &&
-       (myU2 >=0. && myU2 <= 2*PI)    ) {
+    if((myU1 >=0. && myU1 <= 2*M_PI) &&
+       (myU2 >=0. && myU2 <= 2*M_PI)    ) {
       myU1 = 0.;
-      myU2 = 2.*PI;
+      myU2 = 2.*M_PI;
       UCouture = Standard_False;
     }
     else {
       U = ( myU1 + myU2 ) /2.;
-      myU1 = U - PI;
-      myU2 = U + PI;
+      myU1 = U - M_PI;
+      myU2 = U + M_PI;
       UCouture = Standard_True;
     }
-    if((myV1 >=0. && myV1 <= 2*PI) &&
-       (myV2 >=0. && myV2 <= 2*PI)    ) {
+    if((myV1 >=0. && myV1 <= 2*M_PI) &&
+       (myV2 >=0. && myV2 <= 2*M_PI)    ) {
       VCouture = Standard_False;
     }
     else {
       V = ( myV1 + myV2 ) /2.;
-      myV1 = V - PI;
-      myV2 = V + PI;
+      myV1 = V - M_PI;
+      myV2 = V + M_PI;
          VCouture = Standard_True;
     }
     
@@ -753,7 +753,7 @@ void Parameters(const Handle(Adaptor3d_HCurve)&   myCurve,
   GeomAbs_CurveType aCType;
   gp_Pnt aP2;
   //
-  aTwoPI=2.*PI;
+  aTwoPI=2.*M_PI;
   //
   aSType=mySurface->GetType();
   aCType=myCurve->GetType();
@@ -779,7 +779,7 @@ void Parameters(const Handle(Adaptor3d_HCurve)&   myCurve,
       ElSLib::Parameters(aSp, aP2, aU2, aV2);
       //
       aU1=0.;
-      if (aU2>PI) {
+      if (aU2>M_PI) {
        aU1=aTwoPI;
       }
     }
@@ -1097,11 +1097,11 @@ ProjLib_ComputeApprox::ProjLib_ComputeApprox
     Standard_Integer number;
     if (F.VCouture)
       { 
-       if (SType == GeomAbs_Sphere && Abs(u-F.myU1) > PI)
+       if (SType == GeomAbs_Sphere && Abs(u-F.myU1) > M_PI)
          {
            ToMirror = Standard_True;
-           dv = -PI;
-           v = PI - v;
+           dv = -M_PI;
+           v = M_PI - v;
          }
        Standard_Real newV = ElCLib::InPeriod( v, F.myV1, F.myV2 );
        number = (Standard_Integer) (Floor((newV-v)/(F.myV2-F.myV1)));
@@ -1110,8 +1110,8 @@ ProjLib_ComputeApprox::ProjLib_ComputeApprox
     if (F.UCouture || F.VCouture && SType == GeomAbs_Sphere)
       {
        gp_Pnt2d P2d = F.Value( UFirst );
-       number = (Standard_Integer) (Floor((P2d.X()-u)/PI + Epsilon(PI)));
-       du = -number*PI;
+       number = (Standard_Integer) (Floor((P2d.X()-u)/M_PI + Epsilon(M_PI)));
+       du = -number*M_PI;
       }
 
     if (!myBSpline.IsNull())
index 989f262c5e5c7c6e7bb18cf86ae8237c39238eff..c6c33a8b8bd7803a71a366b9d1298593e3eff85a 100755 (executable)
@@ -114,36 +114,36 @@ static gp_Pnt2d Function_Value(const Standard_Real U,
       {
        gp_Cylinder Cylinder = Surf->Cylinder();
        ElSLib::Parameters( Cylinder, p, S, T);
-       if(U0 < Uinf) decalU = -int((Uinf - U0)/(2*PI))-1;
-       if(U0 > Usup) decalU =  int((U0 - Usup)/(2*PI))+1;
-       S += decalU*2*PI;
+       if(U0 < Uinf) decalU = -int((Uinf - U0)/(2*M_PI))-1;
+       if(U0 > Usup) decalU =  int((U0 - Usup)/(2*M_PI))+1;
+       S += decalU*2*M_PI;
        break;
       }
     case GeomAbs_Cone:
       {
        gp_Cone Cone = Surf->Cone();
        ElSLib::Parameters( Cone, p, S, T);
-       if(U0 < Uinf) decalU = -int((Uinf - U0)/(2*PI))-1;
-       if(U0 > Usup) decalU =  int((U0 - Usup)/(2*PI))+1;
-       S += decalU*2*PI;
+       if(U0 < Uinf) decalU = -int((Uinf - U0)/(2*M_PI))-1;
+       if(U0 > Usup) decalU =  int((U0 - Usup)/(2*M_PI))+1;
+       S += decalU*2*M_PI;
        break;
       }
     case GeomAbs_Sphere:
       {
        gp_Sphere Sphere = Surf->Sphere();
        ElSLib::Parameters( Sphere, p, S, T);
-       if(U0 < Uinf) decalU = -int((Uinf - U0)/(2*PI))-1;
-       if(U0 > Usup) decalU =  int((U0 - Usup)/(2*PI))+1;
-       S += decalU*2*PI;
-       if(V0 < Vinf) decalV = -int((Vinf - V0)/(2*PI))-1;
-       if(V0 > (Vsup+(Vsup-Vinf))) decalV =  int((V0 - Vsup+(Vsup-Vinf))/(2*PI))+1;
-       T += decalV*2*PI;
-       if(0.4*PI < Abs(U0 - S) && Abs(U0 - S) < 1.6*PI) {
-         T = PI - T;
+       if(U0 < Uinf) decalU = -int((Uinf - U0)/(2*M_PI))-1;
+       if(U0 > Usup) decalU =  int((U0 - Usup)/(2*M_PI))+1;
+       S += decalU*2*M_PI;
+       if(V0 < Vinf) decalV = -int((Vinf - V0)/(2*M_PI))-1;
+       if(V0 > (Vsup+(Vsup-Vinf))) decalV =  int((V0 - Vsup+(Vsup-Vinf))/(2*M_PI))+1;
+       T += decalV*2*M_PI;
+       if(0.4*M_PI < Abs(U0 - S) && Abs(U0 - S) < 1.6*M_PI) {
+         T = M_PI - T;
          if(U0 < S)
-           S -= PI;
+           S -= M_PI;
          else
-           S += PI;
+           S += M_PI;
        }
        break;
       }
@@ -151,11 +151,11 @@ static gp_Pnt2d Function_Value(const Standard_Real U,
       {
        gp_Torus Torus = Surf->Torus();
        ElSLib::Parameters( Torus, p, S, T);
-       if(U0 < Uinf) decalU = -int((Uinf - U0)/(2*PI))-1;
-       if(U0 > Usup) decalU =  int((U0 - Usup)/(2*PI))+1;
-       if(V0 < Vinf) decalV = -int((Vinf - V0)/(2*PI))-1;
-       if(V0 > Vsup) decalV =  int((V0 - Vsup)/(2*PI))+1;
-       S += decalU*2*PI; T += decalV*2*PI;
+       if(U0 < Uinf) decalU = -int((Uinf - U0)/(2*M_PI))-1;
+       if(U0 > Usup) decalU =  int((U0 - Usup)/(2*M_PI))+1;
+       if(V0 < Vinf) decalV = -int((Vinf - V0)/(2*M_PI))-1;
+       if(V0 > Vsup) decalV =  int((V0 - Vsup)/(2*M_PI))+1;
+       S += decalU*2*M_PI; T += decalV*2*M_PI;
        break;
       }
     default:
@@ -740,12 +740,12 @@ Handle(Adaptor2d_HCurve2d)
        for ( i = 2 ; i <= NbOfPnts ; i++) { 
          Sloc = S;
          ElSLib::Parameters( Cylinder, Pts(i), S, T);
-         if(Abs(Sloc - S) > PI)
+         if(Abs(Sloc - S) > M_PI)
            if(Sloc > S)
              usens++;
            else
              usens--;
-         Pts2d(i).SetCoord(S+usens*2*PI,T);
+         Pts2d(i).SetCoord(S+usens*2*M_PI,T);
        }
        myProjIsDone = Standard_True;
        break;
@@ -761,12 +761,12 @@ Handle(Adaptor2d_HCurve2d)
        for ( i = 2 ; i <= NbOfPnts ; i++) { 
          Sloc = S;
          ElSLib::Parameters( Cone, Pts(i), S, T);
-         if(Abs(Sloc - S) > PI)
+         if(Abs(Sloc - S) > M_PI)
            if(Sloc > S)
              usens++;
            else
              usens--;
-         Pts2d(i).SetCoord(S+usens*2*PI,T);
+         Pts2d(i).SetCoord(S+usens*2*M_PI,T);
        }
        myProjIsDone = Standard_True;
        break;
@@ -782,12 +782,12 @@ Handle(Adaptor2d_HCurve2d)
        for ( i = 2 ; i <= NbOfPnts ; i++) { 
          Sloc = S;Tloc = T;
          ElSLib::Parameters( Sphere, Pts(i), S, T);
-         if(1.6*PI < Abs(Sloc - S))
+         if(1.6*M_PI < Abs(Sloc - S))
            if(Sloc > S)
              usens += 2;
            else
              usens -= 2;
-         if(1.6*PI > Abs(Sloc - S) && Abs(Sloc - S) > 0.4*PI) {
+         if(1.6*M_PI > Abs(Sloc - S) && Abs(Sloc - S) > 0.4*M_PI) {
            vparit = !vparit;
            if(Sloc > S)
              usens++;
@@ -799,10 +799,10 @@ Handle(Adaptor2d_HCurve2d)
              vsens--;
          }
          if(vparit) {
-           Pts2d(i).SetCoord(S+usens*PI,(PI - T)*(vsens-1));
+           Pts2d(i).SetCoord(S+usens*M_PI,(M_PI - T)*(vsens-1));
          }       
          else {
-           Pts2d(i).SetCoord(S+usens*PI,T+vsens*PI);
+           Pts2d(i).SetCoord(S+usens*M_PI,T+vsens*M_PI);
            
          }
        }
@@ -819,17 +819,17 @@ Handle(Adaptor2d_HCurve2d)
        for ( i = 2 ; i <= NbOfPnts ; i++) { 
          Sloc = S; Tloc = T;
          ElSLib::Parameters( Torus, Pts(i), S, T);
-         if(Abs(Sloc - S) > PI)
+         if(Abs(Sloc - S) > M_PI)
            if(Sloc > S)
              usens++;
            else
              usens--;
-         if(Abs(Tloc - T) > PI)
+         if(Abs(Tloc - T) > M_PI)
            if(Tloc > T)
              vsens++;
            else
              vsens--;
-         Pts2d(i).SetCoord(S+usens*2*PI,T+vsens*2*PI);
+         Pts2d(i).SetCoord(S+usens*2*M_PI,T+vsens*2*M_PI);
        }
        myProjIsDone = Standard_True;
        break;
@@ -1259,8 +1259,8 @@ Handle(Geom2d_BSplineCurve)
       gp_Pnt p22 = BSS->Pole(2,2);
       gp_Vec V1(p11,p12);
       gp_Vec V2(p21,p22);
-      if(V1.IsEqual(V2,Tol3d,Tol3d/(p11.Distance(p12)*180/PI))){  //OCC217
-      //if(V1.IsEqual(V2,myTolerance,myTolerance/(p11.Distance(p12)*180/PI))){
+      if(V1.IsEqual(V2,Tol3d,Tol3d/(p11.Distance(p12)*180/M_PI))){  //OCC217
+      //if(V1.IsEqual(V2,myTolerance,myTolerance/(p11.Distance(p12)*180/M_PI))){
        //  so the polar surface is plane
        //  and if it is enough to projet the  poles of Curve
        Standard_Integer Dist2Min = IntegerLast();
@@ -1360,8 +1360,8 @@ Handle(Geom2d_BSplineCurve)
       gp_Pnt p22 = BS->Pole(2,2);
       gp_Vec V1(p11,p12);
       gp_Vec V2(p21,p22);
-      if(V1.IsEqual(V2,Tol3d,Tol3d/(p11.Distance(p12)*180/PI))){ //OCC217
-      //if (V1.IsEqual(V2,myTolerance,myTolerance/(p11.Distance(p12)*180/PI))){ 
+      if(V1.IsEqual(V2,Tol3d,Tol3d/(p11.Distance(p12)*180/M_PI))){ //OCC217
+      //if (V1.IsEqual(V2,myTolerance,myTolerance/(p11.Distance(p12)*180/M_PI))){ 
        //    and if it is enough to project the poles of Curve
        Standard_Integer Dist2Min = IntegerLast();
        Standard_Real u,v;
index 5864723c471c592fbf392424cf426530f17c9af0..59dbed57e7eb392edeaa6995ca4ca1b2f9b919db 100755 (executable)
@@ -136,9 +136,9 @@ void  ProjLib_Cone::Project(const gp_Lin& L)
     (ZCone.IsEqual(CPos.Direction(), Precision::Angular())) ? 1 : -1;
   Standard_Integer a2 = 
     (myCone.SemiAngle() > 0) ? 1 : -1;
-  if ( ( a1 * a2) == -1) U -= PI;
+  if ( ( a1 * a2) == -1) U -= M_PI;
 
-  if ( U < 0.) U += 2.*PI;
+  if ( U < 0.) U += 2.*M_PI;
 
   gp_Pnt P;
   gp_Vec Vu, Vv;
@@ -196,7 +196,7 @@ void  ProjLib_Cone::Project(const gp_Circ& C)
   else {
     U = ATan2( y, x);
   }
-  if ( U < 0.) U += 2*PI;
+  if ( U < 0.) U += 2*M_PI;
 
   V = z / Cos(myCone.SemiAngle());
 
index fff6f4b616de3551774d54b948222c1110ed7abe..65c31307bd7e8ead9f6c668bc0b71db3e9e943e7 100755 (executable)
@@ -122,7 +122,7 @@ void  ProjLib_Cylinder::Project(const gp_Lin& L)
 
   gp_Pnt2d P2d = EvalPnt2d(L.Location(),myCylinder);
   if ( P2d.X() < 0.) {
-    P2d.SetX(P2d.X()+2*PI);
+    P2d.SetX(P2d.X()+2*M_PI);
   }
   Standard_Real Signe 
     = L.Direction().Dot(myCylinder.Position().Direction());
index a8f6d6458c2ed73684b1f64b47a3f98494e8475c..31ad63d80f85d5eb0da4efa8e507cbbf9168f4a3 100755 (executable)
@@ -88,7 +88,7 @@ static gp_Pnt2d EvalPnt2d( const gp_Vec P, const gp_Sphere& Sp)
   if ( Abs(X) > Precision::PConfusion() ||
        Abs(Y) > Precision::PConfusion() ) {
     Standard_Real UU = ATan2(Y,X);
-    U = ElCLib::InPeriod(UU, 0., 2*PI);
+    U = ElCLib::InPeriod(UU, 0., 2*M_PI);
   }
   else {
     U = 0.;
@@ -142,21 +142,21 @@ void  ProjLib_Sphere::Project(const gp_Circ& C)
     P2d1 = EvalPnt2d(gp_Vec(Xc),mySphere);
     P2d2 = EvalPnt2d(gp_Vec(Yc),mySphere);
     
-    if (isIsoU && (Abs(P2d1.Y()-PI/2.) < Precision::PConfusion() ||
-                  Abs(P2d1.Y()+PI/2.) < Precision::PConfusion()   )) {
+    if (isIsoU && (Abs(P2d1.Y()-M_PI/2.) < Precision::PConfusion() ||
+                  Abs(P2d1.Y()+M_PI/2.) < Precision::PConfusion()   )) {
       // then P1 is on the apex of the sphere and U is undefined
       // The value of U is given by P2d2.Y() .
       P2d1.SetX(P2d2.X());
     }
-    else if ( Abs( Abs(P2d1.X()-P2d2.X()) - PI) < Precision::PConfusion()) {
+    else if ( Abs( Abs(P2d1.X()-P2d2.X()) - M_PI) < Precision::PConfusion()) {
       // then we have U2 = U1 + PI; V2;
       // we have to assume that U1 = U2 
       //   so V2 = PI - V2;
       P2d2.SetX( P2d1.X());
       if (P2d2.Y() < 0.) 
-       P2d2.SetY( -PI - P2d2.Y());
+       P2d2.SetY( -M_PI - P2d2.Y());
       else
-       P2d2.SetY(  PI - P2d2.Y());
+       P2d2.SetY(  M_PI - P2d2.Y());
     }
     else {
       P2d2.SetX( P2d1.X());
@@ -171,7 +171,7 @@ void  ProjLib_Sphere::Project(const gp_Circ& C)
     //P2d(U,V) :first point of the PCurve.
     Standard_Real U = Xs.AngleWithRef(Xc, Xs^Ys);
     if (U<0) 
-      U += 2*PI;
+      U += 2*M_PI;
     Standard_Real Z = gp_Vec(O,C.Location()).Dot(Zs);
     Standard_Real V = ASin(Z/mySphere.Radius());
     P2d1 = gp_Pnt2d(U,V);
@@ -214,7 +214,7 @@ void ProjLib_Sphere::SetInBounds(const Standard_Real U)
   
   // first set the y of the first point in -pi/2 pi/2
   Standard_Real newY, Y = ElCLib::Value(U,myLin).Y();
-  newY = ElCLib::InPeriod( Y, -PI, PI);
+  newY = ElCLib::InPeriod( Y, -M_PI, M_PI);
   
   myLin.Translate(gp_Vec2d(0.,newY-Y));
 
@@ -224,18 +224,18 @@ void ProjLib_Sphere::SetInBounds(const Standard_Real U)
   Standard_Real Tol = 1.e-7;
   gp_Dir2d D2d = myLin.Direction();
 //  Modified by skv - Tue Aug  1 16:29:59 2006 OCC13116 Begin
-//   if ((P.Y() > PI/2) || 
-  if ((P.Y() - PI/2 > Tol) || 
+//   if ((P.Y() > M_PI/2) || 
+  if ((P.Y() - M_PI/2 > Tol) || 
 //  Modified by skv - Tue Aug  1 16:29:59 2006 OCC13116 End
-      (Abs(P.Y()-PI/2)<Tol && D2d.IsEqual(gp::DY2d(),Tol))) {
-    Axis = gp_Ax2d( gp_Pnt2d( 0., PI/2.), gp::DX2d());
+      (Abs(P.Y()-M_PI/2)<Tol && D2d.IsEqual(gp::DY2d(),Tol))) {
+    Axis = gp_Ax2d( gp_Pnt2d( 0., M_PI/2.), gp::DX2d());
   }
 //  Modified by skv - Tue Aug  1 16:29:59 2006 OCC13116 Begin
-//   else if ((P.Y() < -PI/2) || 
-  else if ((P.Y() + PI/2 < -Tol) || 
+//   else if ((P.Y() < -M_PI/2) || 
+  else if ((P.Y() + M_PI/2 < -Tol) || 
 //  Modified by skv - Tue Aug  1 16:29:59 2006 OCC13116 End
-          (Abs(P.Y()+PI/2)<Tol && D2d.IsOpposite(gp::DY2d(),Tol))) {
-    Axis = gp_Ax2d( gp_Pnt2d( 0., -PI/2.), gp::DX2d());
+          (Abs(P.Y()+M_PI/2)<Tol && D2d.IsOpposite(gp::DY2d(),Tol))) {
+    Axis = gp_Ax2d( gp_Pnt2d( 0., -M_PI/2.), gp::DX2d());
   }
   else 
     return;
@@ -243,10 +243,10 @@ void ProjLib_Sphere::SetInBounds(const Standard_Real U)
   Trsf.SetMirror(Axis);
   myLin.Transform(Trsf);
 
-  myLin.Translate(gp_Vec2d(PI,0.));
+  myLin.Translate(gp_Vec2d(M_PI,0.));
 
   // il faut maintenant recadrer en U
   Standard_Real newX, X = ElCLib::Value(U,myLin).X();
-  newX = ElCLib::InPeriod( X, 0., 2.*PI);
+  newX = ElCLib::InPeriod( X, 0., 2.*M_PI);
   myLin.Translate(gp_Vec2d(newX-X,0.));
 }
index deba95b34f26c63b41d67d75a714aaa697ec8ab6..ec8063bf6d5ca13ede9fae008876830daa9651fe 100755 (executable)
@@ -125,43 +125,43 @@ void  ProjLib_Torus::Project(const gp_Circ& C)
     Standard_Real V;
 
     if ( Z > 1.) {         
-      V = PI/2.;          // protection stupide 
+      V = M_PI/2.;          // protection stupide 
     }                     // contre les erreurs de calcul
     else if ( Z < -1.) {  // il arrive que Z soit legerement 
-      V = -PI/2;          // superieur a 1.
+      V = -M_PI/2;          // superieur a 1.
     }
     else {
       V = ASin(Z);
     }
 
     if (C.Radius() < myTorus.MajorRadius()) {
-      V = PI - V;
+      V = M_PI - V;
     }
     else if ( V < 0.) {
-      V += 2*PI;
+      V += 2*M_PI;
     }
     P1.SetY(V);
     P2.SetY(V);
     gp_Vec2d V2d ( P1, P2);
     // Normalement Abs( P1.X() - P2.X()) = PI/2
     // Si != PI/2, on a traverse la periode => On reverse la Direction
-    if ( Abs( P1.X() - P2.X()) > PI) V2d.Reverse();
+    if ( Abs( P1.X() - P2.X()) > M_PI) V2d.Reverse();
     
     gp_Dir2d D2( V2d);
     if ( P1.X() < 0) 
-      P1.SetX( 2*PI + P1.X());
+      P1.SetX( 2*M_PI + P1.X());
     myLin = gp_Lin2d( P1, D2);
   }
   else {
     // Iso U  -> U = angle( Xt, OC)
     Standard_Real U = Xt.AngleWithRef( OC, Xt^Yt);
     if ( U < 0.) 
-      U += 2*PI;
+      U += 2*M_PI;
     
     // Origine de la droite
     Standard_Real V1 = OC.AngleWithRef(Xc, OC^Zt);
     if ( V1 < 0.)
-      V1 += 2*PI;
+      V1 += 2*M_PI;
 
     gp_Pnt2d P1( U, V1);
     
index 1c05f32c6f00f52c5f5cef47ed59895dcb6a4e80..39871aa76c2ed94b6577fa9c8b952bd3a89b2a18 100755 (executable)
@@ -38,11 +38,11 @@ Prs2d_Angle::Prs2d_Angle( const Handle(Graphic2d_GraphicObject)& aGO,
   if ( myRad <= ShortRealEpsilon ())
      Graphic2d_CircleDefinitionError::Raise ("The radius = 0." );
 
-  Standard_ShortReal TwoPI = Standard_ShortReal(2.* Standard_PI);
+  Standard_ShortReal TwoPI = Standard_ShortReal(2. * M_PI);
   while( myFAngle < 0. ) myFAngle += TwoPI;
-  while( myFAngle > 2.* Standard_PI ) myFAngle -= TwoPI;
+  while( myFAngle > 2. * M_PI ) myFAngle -= TwoPI;
   while( mySAngle < 0. ) mySAngle += TwoPI;
-  while( mySAngle > 2.* Standard_PI ) mySAngle -= TwoPI;
+  while( mySAngle > 2. * M_PI ) mySAngle -= TwoPI;
   if ( mySAngle < myFAngle ) mySAngle += TwoPI;
 
   if ( ( mySAngle - myFAngle < ShortRealEpsilon() ) || 
@@ -65,7 +65,7 @@ Prs2d_Angle::Prs2d_Angle( const Handle(Graphic2d_GraphicObject)& aGO,
          myMaxY = myMaxY > Ycur ? myMaxY : Ycur;
 
      for ( Acur = 0., Xcur = 1., Ycur = 0.; 
-          Acur < mySAngle; Acur += Standard_ShortReal(Standard_PI/2.)) {
+          Acur < mySAngle; Acur += Standard_ShortReal(M_PI / 2.)) {
           if ( Acur > myFAngle ) {
            myMinX = ( myMinX < Xcur ? myMinX : Xcur );
            myMaxX = ( myMaxX < Xcur ? Xcur : myMaxX );
@@ -82,7 +82,7 @@ Prs2d_Angle::Prs2d_Angle( const Handle(Graphic2d_GraphicObject)& aGO,
 
   // Arrows
 
-  Standard_Real ArrAngle = PI/180.*anArrAngle;
+  Standard_Real ArrAngle = M_PI/180.*anArrAngle;
      
   gp_Pnt2d theOrigine(0.,0.);
   gp_Pnt2d P1, P2, P3;
@@ -96,7 +96,7 @@ Prs2d_Angle::Prs2d_Angle( const Handle(Graphic2d_GraphicObject)& aGO,
     P2 = gp_Pnt2d( anArrLength,  anArrLength*Tan( ArrAngle/2. ) );
     P3 = gp_Pnt2d( anArrLength, -anArrLength*Tan( ArrAngle/2. ) );
   
-    VDir = V1.Rotated(PI/2);
+    VDir = V1.Rotated(M_PI/2);
     theAngle = VX.Angle( VDir );
     P2.Rotate( theOrigine, theAngle );
     P3.Rotate( theOrigine, theAngle );
@@ -127,7 +127,7 @@ Prs2d_Angle::Prs2d_Angle( const Handle(Graphic2d_GraphicObject)& aGO,
     P2 = gp_Pnt2d( anArrLength,  anArrLength*Tan( ArrAngle/2. ) );
     P3 = gp_Pnt2d( anArrLength, -anArrLength*Tan( ArrAngle/2. ) );
   
-    VDir = V2.Rotated(-PI/2);
+    VDir = V2.Rotated(-M_PI/2);
     theAngle = VX.Angle( VDir );
 
     P2.Rotate( theOrigine, theAngle );
@@ -206,7 +206,7 @@ void Prs2d_Angle::Draw( const Handle(Graphic2d_Drawer)& aDrawer ) {
     gp_Pnt2d pntText = theCent.Translated(textV1);
     Standard_Real txtX, txtY;
     pntText.Coord(txtX, txtY);
-    Standard_ShortReal txtAngle = Standard_ShortReal( theAngle + 3*PI/2);
+    Standard_ShortReal txtAngle = Standard_ShortReal( theAngle + 3*M_PI/2);
     
     Standard_ShortReal ws, hs;
     aDrawer->GetTextSize( myText, ws, hs );
@@ -279,7 +279,7 @@ void Prs2d_Angle::Draw( const Handle(Graphic2d_Drawer)& aDrawer ) {
       ts1 = Standard_ShortReal( A );
       ts2 = Standard_ShortReal( B );
 
-         if ( Abs(f-e) < Standard_ShortReal(2.*Standard_PI) ) {
+         if ( Abs(f-e) < Standard_ShortReal(2. * M_PI) ) {
            aTrsf.SetValue( 1, 3, 0.0 );
            aTrsf.SetValue( 2, 3, 0.0 );
 
@@ -384,7 +384,7 @@ void Prs2d_Angle::DrawElement( const Handle(Graphic2d_Drawer)& aDrawer,
     gp_Pnt2d pntText = theCent.Translated(textV1);
     Standard_Real txtX, txtY;
     pntText.Coord(txtX, txtY);
-    Standard_ShortReal txtAngle = Standard_ShortReal( theAngle + 3*PI/2);*/
+    Standard_ShortReal txtAngle = Standard_ShortReal( theAngle + 3*M_PI/2);*/
     //correct by enk Mon Dec 2 11:39 2002
     
     
@@ -440,7 +440,7 @@ void Prs2d_Angle::DrawElement( const Handle(Graphic2d_Drawer)& aDrawer,
           a = Standard_ShortReal( A ); 
           b = Standard_ShortReal( B );
       
-             if ( Abs(f-e) < Standard_ShortReal(2.*Standard_PI) ) {
+             if ( Abs(f-e) < Standard_ShortReal(2. * M_PI) ) {
                aTrsf.SetValue( 1, 3, 0.0 );
                aTrsf.SetValue( 2, 3, 0.0 );
                X1 = Cos(E); 
@@ -617,7 +617,7 @@ Standard_Boolean Prs2d_Angle::Pick( const Standard_ShortReal X,
     gp_Pnt2d pntText = theCent.Translated(textV1);
     Standard_Real txtX, txtY;
     pntText.Coord(txtX, txtY);
-    Standard_ShortReal txtAngle = Standard_ShortReal( theAngle + 3*PI/2);*/
+    Standard_ShortReal txtAngle = Standard_ShortReal( theAngle + 3*M_PI/2);*/
     //correct by enk Mon Dec 2 11:41 2002
 
     /////////////////////////////////////////
index 868b2cfe82936946943dfcc14b9753598ba6802f..369ada4446f2e8d0bdf31bf7ee8f1817ae15bff4 100755 (executable)
@@ -15,7 +15,7 @@ inline void Prs2d_Angle::CalcTxtPos(const Standard_Boolean theFromAbs) {
     gp_Vec2d textV1 = V1.Rotated( delta/2 );
 
     theVecJ = textV1/myRad;
-    theVecI = textV1.Rotated(-PI/2.)/myRad;
+    theVecI = textV1.Rotated(-M_PI/2.)/myRad;
         
    
     gp_Pnt2d pntText = 
index e2a054d2f443fd7e00f6841a1e958f4dda95acc7..f24c6cdb23d7c3b78041d23970db53b9464ae867 100755 (executable)
@@ -30,7 +30,7 @@ void Prs2d_Angularity::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
                        Y1 = Standard_ShortReal( myY - myLength/2 ), 
                        X2 = Standard_ShortReal( myX + myLength/2 ), 
                        Y2 = Y1, 
-                       X3 = Standard_ShortReal( X1 + myLength  * Cos( Standard_PI / 4 ) ), 
+                       X3 = Standard_ShortReal( X1 + myLength  * Cos( M_PI / 4 ) ), 
                        Y3 = Standard_ShortReal( myY + myLength/2 );
                        
      gp_Pnt2d P1( X1, Y1 ),
index c53d6060f3c55658465c23ad73215102031a2d09..d56af6721b90a63d3cac90232173a7000e178bb5 100755 (executable)
@@ -20,7 +20,7 @@ Prs2d_Arrow::Prs2d_Arrow( const Handle(Graphic2d_GraphicObject)& aGraphicObject,
      gp_Pnt2d P1( aLocation.Location() );
      gp_Dir2d AxeX( 1., 0. );
      Standard_Real theAngle = AxeX.Angle( aLocation.Direction() );        
-     theAngle += Standard_PI;
+     theAngle += M_PI;
      gp_Pnt2d P2( aLength,  aLength*Tan( anAngle/2. ) );
      gp_Pnt2d P3( aLength, -aLength*Tan( anAngle/2. ) );
      P2.Rotate( theOrigine, theAngle );
index 70f8bfe6f439b7fad5691a99ee8a672f10218837..1568fde02c66d56bd95c4aac21c37558c103b385 100755 (executable)
@@ -58,7 +58,7 @@ Prs2d_Axis::Prs2d_Axis( const Handle(Graphic2d_GraphicObject)& aGO,
    if ( myX2 > myMaxX ) myMaxX =  myX2;
    if ( myY2 > myMaxY ) myMaxY =  myY2;  
 
-   Standard_Real ArrAngle = PI/180.*anArrAngle, theAngle;
+   Standard_Real ArrAngle = M_PI/180.*anArrAngle, theAngle;
    gp_Pnt2d theOrigine( 0., 0.), P1, P2, P3;
    gp_Vec2d VX( 1., 0. ), VDir;
   
@@ -167,7 +167,7 @@ Prs2d_Axis::Prs2d_Axis( const Handle(Graphic2d_GraphicObject)& aGO,
    if ( myX1 > myMaxX  ) myMaxX = myX1;
    if ( myY1 > myMaxY  ) myMaxY = myY1;
 
-   Standard_Real ArrAngle = PI/180.*anArrAngle, theAngle;
+   Standard_Real ArrAngle = M_PI/180.*anArrAngle, theAngle;
    gp_Pnt2d theOrigine( 0., 0.), P1, P2, P3;
    gp_Vec2d VX( 1., 0. ), VDir;
   
@@ -246,7 +246,7 @@ Prs2d_Axis::Prs2d_Axis( const Handle(Graphic2d_GraphicObject)& aGO,
    if ( myX1 > myMaxX  ) myMaxX = myX1;
    if ( myY1 > myMaxY  ) myMaxY = myY1;
    
-   Standard_Real ArrAngle = PI/180.*anArrAngle, theAngle;
+   Standard_Real ArrAngle = M_PI/180.*anArrAngle, theAngle;
    gp_Pnt2d theOrigine( 0., 0.), P1, P2, P3;
    gp_Vec2d VX( 1., 0. ), VDir;
   
index 5ccb0a62ddcd63c6bb39e8c0521c769a1f8286a4..dd8815bbc113d177dcda3637d099c3e44c8a94f1 100755 (executable)
@@ -42,7 +42,7 @@ void Prs2d_Circularity::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
      X1 = Standard_ShortReal( a1 );
         Y1 = Standard_ShortReal( b1 );
     }
-    aDrawer->MapArcFromTo( X1, Y1, myLength/2, 0.0, Standard_ShortReal( 2. * Standard_PI ) );
+    aDrawer->MapArcFromTo( X1, Y1, myLength/2, 0.0, Standard_ShortReal( 2. * M_PI ) );
  }
 }
 
index 9453c9263e0d03deedd98e20abb04e48165d20da..bf4af2b5b07622f2cfaa458eba080e123b075ad5 100755 (executable)
@@ -42,8 +42,8 @@ void Prs2d_Concentric::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
      X1 = Standard_ShortReal( a1 );
         Y1 = Standard_ShortReal( b1 );
     }
-    aDrawer->MapArcFromTo( X1, Y1, myLength/2, 0.0, Standard_ShortReal( 2. * Standard_PI ) );
-    aDrawer->MapArcFromTo( X1, Y1, myLength/3, 0.0, Standard_ShortReal( 2. * Standard_PI ) );
+    aDrawer->MapArcFromTo( X1, Y1, myLength/2, 0.0, Standard_ShortReal( 2. * M_PI ) );
+    aDrawer->MapArcFromTo( X1, Y1, myLength/3, 0.0, Standard_ShortReal( 2. * M_PI ) );
  }
 
 }
index 54bc83b0f68587c5cb71887ec434ab6e37774e0a..f45f72dbb7742e1d7956c66ef6e8908022f06d14 100755 (executable)
@@ -38,7 +38,7 @@ void Prs2d_Cylindric::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
     gp_Vec2d theVec( thePnt1, gp_Pnt2d( X3, Y3 ) );
     theVec /= 2;
     thePnt1.Translate( theVec );
-    Standard_ShortReal theRad = Standard_ShortReal( myLength/2*Sin(Standard_PI / 3) );
+    Standard_ShortReal theRad = Standard_ShortReal( myLength/2*Sin(M_PI / 3) );
     Standard_ShortReal Xc = Standard_ShortReal(thePnt1.X()), 
                        Yc = Standard_ShortReal(thePnt1.Y());
 
@@ -94,7 +94,7 @@ void Prs2d_Cylindric::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
     }
     aDrawer->MapSegmentFromTo( X1, Y1, X2, Y2 );
     aDrawer->MapSegmentFromTo( X4, Y4, X3, Y3 );
-    aDrawer->MapArcFromTo( Xc, Yc, theRad, 0.0, Standard_ShortReal( 2. * Standard_PI ) );
+    aDrawer->MapArcFromTo( Xc, Yc, theRad, 0.0, Standard_ShortReal( 2. * M_PI ) );
   }
 }
 
index 35ba8511d90824c840ac64004fa5041c5fdcb560..0f95b3eaf4af372a3eb23b4fffd805f902448ec0 100755 (executable)
@@ -140,7 +140,7 @@ Prs2d_Diameter::Prs2d_Diameter( const Handle(Graphic2d_GraphicObject)& aGO,
    if ( myX2 > myMaxX ) myMaxX = myX2;
    if ( myY2 > myMaxY ) myMaxY = myY2;
    
-   Standard_Real ArrAngle = PI/180.* anArrAngle, theAngle;
+   Standard_Real ArrAngle = M_PI/180.* anArrAngle, theAngle;
    gp_Pnt2d theOrigine( 0., 0.), P1, P2, P3;
   
    if ( ( myArrow == Prs2d_AS_FIRSTAR ) || ( myArrow == Prs2d_AS_BOTHAR ) ) {
@@ -249,14 +249,14 @@ void Prs2d_Diameter::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
    gp_Vec2d VX( 1., 0. ), theVec(thePnt2, thePnt1);
    Standard_Real theTxtAngle = VX.Angle( theVec );
    gp_Pnt2d pntText;
-   if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+   if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
        pntText = thePnt2.Translated( (myArrowLen+dxx)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+   else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
        pntText = thePnt1.Translated( (myArrowLen+dxx)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
        theTxtAngle = VX.Angle( theVec.Reversed() );
-   } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+   } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
        pntText = thePnt2.Translated( (myArrowLen+dxx)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+   else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated( (myArrowLen+dxx)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
         theTxtAngle = VX.Angle( theVec.Reversed() );
    }
@@ -389,14 +389,14 @@ void Prs2d_Diameter::DrawElement( const Handle(Graphic2d_Drawer)& aDrawer,
    gp_Vec2d VX( 1., 0. ), theVec(thePnt2, thePnt1);
    Standard_Real theTxtAngle = VX.Angle( theVec );
    gp_Pnt2d pntText;
-   if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+   if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
        pntText = thePnt2.Translated( (myArrowLen+dxx)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+   else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
        pntText = thePnt1.Translated( (myArrowLen+dxx)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
        theTxtAngle = VX.Angle( theVec.Reversed() );
-   } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+   } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
        pntText = thePnt2.Translated( (myArrowLen+dxx)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+   else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated( (myArrowLen+dxx)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
         theTxtAngle = VX.Angle( theVec.Reversed() );
    }
@@ -593,14 +593,14 @@ Standard_Boolean Prs2d_Diameter::Pick( const Standard_ShortReal X,
    gp_Vec2d VX( 1., 0. ), theVec(thePnt2, thePnt1);
    Standard_Real theTxtAngle = VX.Angle( theVec );
    gp_Pnt2d pntText;
-   if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+   if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
        pntText = thePnt2.Translated( (myArrowLen+dxx)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+   else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
        pntText = thePnt1.Translated( (myArrowLen+dxx)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
        theTxtAngle = VX.Angle( theVec.Reversed() );
-   } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+   } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
        pntText = thePnt2.Translated( (myArrowLen+dxx)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+   else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated( (myArrowLen+dxx)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
         theTxtAngle = VX.Angle( theVec.Reversed() );
    }
index a3a59e01a9d2fa6adf6edd0b822e6133103d0cad..6ea19ad217818b0c9f7b29abc828728d534c6a90 100755 (executable)
@@ -16,7 +16,7 @@ inline void Prs2d_Diameter::CalcTxtPos(const Standard_Boolean theFromAbs) {
   theVec.Normalized();
   
   theVecI = theVec.Reversed()*myTextPosH/theDist;
-  theVecJ = theVec.Reversed().Rotated(PI/2)*myTextPosV/theDist;
+  theVecJ = theVec.Reversed().Rotated(M_PI/2)*myTextPosV/theDist;
   
   theVec.Rotate(-myTextAngle);
   
@@ -29,14 +29,14 @@ inline void Prs2d_Diameter::CalcTxtPos(const Standard_Boolean theFromAbs) {
   gp_Pnt2d pntText;
   
   
-  if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+  if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
         pntText = thePnt2.Translated(theVec/theDist);
-  else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+  else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
         pntText = thePnt1.Translated(theVec.Reversed()/theDist) ;
        theTxtAngle = VX.Angle( theVec.Reversed() );
-  } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+  } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
         pntText = thePnt2.Translated(theVec/theDist);
-  else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+  else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated(theVec.Reversed()/theDist);
         theTxtAngle = VX.Angle( theVec.Reversed() );
   }
index 4451e60573888046695060c1123071f0dc87a208..e7970c83878b86b1d0c829451379bc9576941280 100755 (executable)
@@ -53,7 +53,7 @@ void Prs2d_DrawSymbol::Draw( const Handle(Graphic2d_Drawer)& aDrawer ) {
      Standard_ShortReal theRad = ( myWidth < myHeight) ? myWidth : myHeight;
      gp_Pnt2d theCent( myX, myY );
      gp_Vec2d theVec( theCent, gp_Pnt2d( myX + 13 * theRad/ 10, myY ) );
-     theVec.Rotate( Standard_PI / 4 );
+     theVec.Rotate( M_PI / 4 );
      gp_Pnt2d P1 = theCent.Translated( theVec );
      gp_Pnt2d P2 = theCent.Translated( theVec.Reversed() );     
 
@@ -81,7 +81,7 @@ void Prs2d_DrawSymbol::Draw( const Handle(Graphic2d_Drawer)& aDrawer ) {
      }
 
      DrawLineAttrib( aDrawer );
-     aDrawer->MapArcFromTo( a, b, theRad, 0., Standard_ShortReal( 2 * Standard_PI ) );
+     aDrawer->MapArcFromTo( a, b, theRad, 0., Standard_ShortReal( 2 * M_PI ) );
      aDrawer->MapSegmentFromTo( c, d, e, f );
 
     }// end TOS_DIAMETER
index be53f67ce8e14d2dfaf858be554e16d044971e17..4990e81577b96efb987cab85112cefd6a9278b08 100755 (executable)
@@ -754,8 +754,8 @@ void Prs2d_Length::GetPntProject( const Standard_Real aLength )
        DirLin2.Normalize();
        DirLin1 *= aLength;
        DirLin2 *= aLength;
-       DirLin1.Rotate( PI/2. );
-       DirLin2.Rotate( -PI/2. );
+       DirLin1.Rotate( M_PI/2. );
+       DirLin2.Rotate( -M_PI/2. );
        aPntProj1 = myPntAttach1.Translated( DirLin1 );
        aPntProj2 = myPntAttach2.Translated( DirLin2 );;
        break;
@@ -771,8 +771,8 @@ void Prs2d_Length::GetPntProject( const Standard_Real aLength )
        DirLin2.Normalize();
        DirLin1 *= aLength;
        DirLin2 *= aLength;
-       DirLin1.Rotate( PI/2. );
-       DirLin2.Rotate( -PI/2. );
+       DirLin1.Rotate( M_PI/2. );
+       DirLin2.Rotate( -M_PI/2. );
        aPntProj1 = myPntAttach1.Translated( DirLin1 );
        aPntProj2 = myPntAttach2.Translated( DirLin2 );;
        break;
@@ -808,7 +808,7 @@ void Prs2d_Length::GetPntProject( const Standard_Real aLength )
 void Prs2d_Length::ComputeArrows( const Standard_Boolean /*isnotPoints*/ ) 
 {
   
-  Standard_Real ArrAngle = PI/180. * ArrowAngle(), theAngle;
+  Standard_Real ArrAngle = M_PI/180. * ArrowAngle(), theAngle;
   gp_Pnt2d aPnt1( myX1, myY1 ), aPnt2( myX2, myY2 );
   gp_Pnt2d theOrigine( 0., 0.), P1, P2, P3;
   gp_Vec2d VX( 1., 0. ), VDir;
index 0447f62126e9afdba10465f6c1413548eccc38c0..9bcc71bdbea840937732380c5844609dd3ce9e7e 100755 (executable)
@@ -19,7 +19,7 @@ inline void Prs2d_Length::CalcTxtPos(const Standard_Boolean theFromAbs) {
   
    theVecI = theVec*(theDist/2-theTextLen/2+myTextPosH);
    tmpVec  = theVec*(theDist/2+myTextPosH);
-   theVecJ = theVec.Rotated(PI/2)*myTextPosV;
+   theVecJ = theVec.Rotated(M_PI/2)*myTextPosV;
    
    theOrigine=thePnt1;
    theOrigine.Translate(tmpVec);
index 74596e97078708a3f4b28955cdbe7132e9033175..09e4a78b4cf5d2ea4d2da597ef6727c70f1d4101 100755 (executable)
@@ -44,7 +44,7 @@ void Prs2d_LineProfile::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
         Y1 = Standard_ShortReal( b1 );
     }
     
-   aDrawer->MapArcFromTo( X1, Y1, myLength/2, myAngle, Standard_ShortReal( Standard_PI + myAngle ) );
+   aDrawer->MapArcFromTo( X1, Y1, myLength/2, myAngle, Standard_ShortReal( M_PI + myAngle ) );
   }
 }
 
index 4d835ab42105cd5cf6a7da43378fd240631372c9..04d7a5f32329b85e3fdbdfd8c33fd580426d427d 100755 (executable)
@@ -27,9 +27,9 @@ void Prs2d_Parallelism::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
 
     Standard_ShortReal X1 = myX - myLength/2, 
                        Y1 = myY - myLength/2, 
-                       X2 = Standard_ShortReal( X1 + myLength * Cos( Standard_PI / 4 ) ),
+                       X2 = Standard_ShortReal( X1 + myLength * Cos( M_PI / 4 ) ),
                        Y2 = myY + myLength/2,
-                       X3 = Standard_ShortReal(myX + myLength* Cos( Standard_PI / 4 ) ),
+                       X3 = Standard_ShortReal(myX + myLength* Cos( M_PI / 4 ) ),
                        Y3 = Y2,
                        X4 = myX,
                        Y4 = Y1;
index 00a594c1bbed821e904b97f30e1e71c01a2c4622..9c6051d24a2bb9a73e45cdcd2d9b60bbe2226db7 100755 (executable)
@@ -89,7 +89,7 @@ void Prs2d_Position::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
     }
     aDrawer->MapSegmentFromTo( X1, Y1, X2, Y2 );
     aDrawer->MapSegmentFromTo( X4, Y4, X3, Y3 );
-    aDrawer->MapArcFromTo( Xc, Yc, myLength/2, 0.0, Standard_ShortReal( 2. * Standard_PI ) );
+    aDrawer->MapArcFromTo( Xc, Yc, myLength/2, 0.0, Standard_ShortReal( 2. * M_PI ) );
   }
 }
 
index 358d450107b844b308d54b51576aa1184597c7ca..0b826c551adcce484b05d0364e27920ad09ec88b 100755 (executable)
@@ -60,7 +60,7 @@ Prs2d_Radius::Prs2d_Radius( const Handle(Graphic2d_GraphicObject) & aGO,
    if ( myX2 > myMaxX ) myMaxX = myX2;
    if ( myY2 > myMaxY ) myMaxY = myY2;
    
-   Standard_Real ArrAngle = PI/180.* anArrAngle, theAngle;
+   Standard_Real ArrAngle = M_PI/180.* anArrAngle, theAngle;
    gp_Pnt2d theOrigine( 0., 0. ), P1, P2, P3;
    gp_Vec2d VX( 1., 0. ), VDir;
  
@@ -161,14 +161,14 @@ void Prs2d_Radius::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
    gp_Vec2d VX( 1., 0. ), theVec(thePnt2, thePnt1);
    Standard_Real theTxtAngle = VX.Angle( theVec );
    gp_Pnt2d pntText;
-   if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+   if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+   else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
        pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
        theTxtAngle = VX.Angle( theVec.Reversed() );
-   } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+   } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+   else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
         theTxtAngle = VX.Angle( theVec.Reversed() );
    }
@@ -326,14 +326,14 @@ void Prs2d_Radius::DrawElement( const Handle(Graphic2d_Drawer)& aDrawer,
    gp_Vec2d VX( 1., 0. ), theVec(thePnt2, thePnt1);
    Standard_Real theTxtAngle = VX.Angle( theVec );
    gp_Pnt2d pntText;
-   if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+   if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+   else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
        pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
        theTxtAngle = VX.Angle( theVec.Reversed() );
-   } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+   } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+   else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
         theTxtAngle = VX.Angle( theVec.Reversed() );
    }
@@ -510,14 +510,14 @@ Standard_Boolean Prs2d_Radius::Pick( const Standard_ShortReal X,
    gp_Vec2d VX( 1., 0. ), theVec(thePnt2, thePnt1);
    Standard_Real theTxtAngle = VX.Angle( theVec );
    gp_Pnt2d pntText;
-   if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+   if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+   else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
        pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
        theTxtAngle = VX.Angle( theVec.Reversed() );
-   } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+   } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+   else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
         theTxtAngle = VX.Angle( theVec.Reversed() );
    }
index 7fb77a674c9fd3a79adf3ebe12c2db5e54784240..2f35f0cd3add865c6e734284a0b2a30f5ce9b2b5 100755 (executable)
@@ -113,7 +113,7 @@ Prs2d_RadiusIndep::Prs2d_RadiusIndep( const Handle(Graphic2d_GraphicObject) & aG
    if ( myX2 > myMaxX ) myMaxX = myX2;
    if ( myY2 > myMaxY ) myMaxY = myY2;
    
-   Standard_Real ArrANG = Standard_PI/6., theArrLN  = aRad/5., theANG;
+   Standard_Real ArrANG = M_PI / 6., theArrLN  = aRad/5., theANG;
    gp_Pnt2d theOrig( 0., 0. ), P2, P3;
    gp_Vec2d VX( 1., 0. );
  
index 17e8b1737bb1a87338b87281b5162dfb8f475c59..07756b71762e313839298b867612fbf71c06c437 100755 (executable)
@@ -39,7 +39,7 @@ Prs2d_Repere::Prs2d_Repere( const Handle(Graphic2d_GraphicObject)& aGO,
     
     gp_Pnt2d theOrig( 0., 0. ), P1, P2, P3;
     gp_Vec2d VX( 1., 0. ), VDir( aPnt1, aPnt2 );
-    Standard_Real alpha = Standard_PI - anArrAngle;
+    Standard_Real alpha = M_PI - anArrAngle;
     P1 = aPnt1;  
     P2 = gp_Pnt2d( anArrLength,  anArrLength*Tan( alpha/2. ) );
     P3 = gp_Pnt2d( anArrLength, -anArrLength*Tan( alpha/2. ) );
@@ -71,15 +71,15 @@ Prs2d_Repere::Prs2d_Repere( const Handle(Graphic2d_GraphicObject)& aGO,
       
   }
 
-  if ( theAng >= 0. && theAng < PI/2) {
+  if ( theAng >= 0. && theAng < M_PI/2) {
         nX -= aLenBase;
-  } else if ( theAng >= PI/2 && theAng <= PI ) {
+  } else if ( theAng >= M_PI/2 && theAng <= M_PI ) {
         nX += aLenBase;
         myObtuse = Standard_True;  
-  } else if ( theAng >= -PI && theAng < -PI/2) {
+  } else if ( theAng >= -M_PI && theAng < -M_PI/2) {
         nX += aLenBase;
         myObtuse = Standard_True;  
-  } else if ( theAng >= -PI/2 && theAng < 0. ) 
+  } else if ( theAng >= -M_PI/2 && theAng < 0. ) 
         nX -= aLenBase;
 
   myXVert(3) = Standard_ShortReal( nX );
index eb8a1b596c7956c21b7858a4ba65c585c50510ca..4de0a8a65c5a8aad9713a0dd3b1cbd2daa2e5b01 100755 (executable)
@@ -66,7 +66,7 @@ void Prs2d_SurfProfile::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
         Yc = Standard_ShortReal( b1 );
     }
     aDrawer->MapSegmentFromTo( X1, Y1, X2, Y2 );
-    aDrawer->MapArcFromTo( Xc, Yc, myLength/2, myAngle, Standard_ShortReal( Standard_PI + myAngle ) );
+    aDrawer->MapArcFromTo( Xc, Yc, myLength/2, myAngle, Standard_ShortReal( M_PI + myAngle ) );
   }
 }
 
index 3fb72df511cc5dceefa5bcafb861420f8fd1e3cb..c63e4348b8c9dda66bec2c477458d045f7842561 100755 (executable)
@@ -24,11 +24,11 @@ void Prs2d_SymCircular::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
 
   if ( IsIn ) {
     DrawLineAttrib( aDrawer );
-    const Standard_Real alpha = Standard_PI / 12;
+    const Standard_Real alpha = M_PI / 12;
 
     Standard_ShortReal X1 = myX - myLength/2, 
                        Y1 = myY - myLength/2, 
-                       X2 = Standard_ShortReal(X1 + myLength * Cos( Standard_PI / 4 ) ), 
+                       X2 = Standard_ShortReal(X1 + myLength * Cos( M_PI / 4 ) ), 
                        Y2 = myY + myLength/2;
     
     
index 64bdc3e7d499d3b4af1943536559f78b20ad1f93..09319630ae36d6948a71d09de34716cb217c0b8c 100755 (executable)
@@ -24,16 +24,16 @@ void Prs2d_SymTotal::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
 
   if ( IsIn ) {
     DrawLineAttrib( aDrawer );
-    const Standard_Real alpha = Standard_PI / 12;
+    const Standard_Real alpha = M_PI / 12;
 
     Standard_ShortReal X1 = myX - myLength/2, 
                        Y1 = myY - myLength/2, 
-                       X2 = Standard_ShortReal(X1 + myLength * Cos( Standard_PI / 4 ) ), 
+                       X2 = Standard_ShortReal(X1 + myLength * Cos( M_PI / 4 ) ), 
                        Y2 = myY + myLength/2,
 
                        X5 = myX,
                        Y5 = myY - myLength/2,
-                       X6 = Standard_ShortReal(X5 + myLength * Cos( Standard_PI / 4 ) ), 
+                       X6 = Standard_ShortReal(X5 + myLength * Cos( M_PI / 4 ) ), 
                        Y6 = myY + myLength/2;
     
     gp_Pnt2d P1( X2, Y2 );
index 0a21a1e8ba23c5160e5451bebddd94a7e740e7c7..ecde3b08922ccf9970439598bf660cf8212354ba 100755 (executable)
@@ -28,7 +28,7 @@ void Prs2d_Taper::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
 
   if ( IsIn ) {
     DrawLineAttrib( aDrawer );
-    const Standard_Real alpha = Standard_PI / 10;
+    const Standard_Real alpha = M_PI / 10;
 
     Standard_ShortReal X1 = myX - myLength/2, 
                        Y1 = myY,
index e1c58dc6807264a47c14d4e6edde314ec9775adb..47dfa165515195dca57af8e9b9197ddcd355d95c 100755 (executable)
@@ -49,7 +49,7 @@ Prs2d_ToleranceFrame::Prs2d_ToleranceFrame( const Handle(Graphic2d_GraphicObject
     gp_Pnt2d Pnt0 = PntP.Translated( theV1 );
     gp_Vec2d theVecG( Pnt0, gp_Pnt2d( Pnt0.X() + 1.0, Pnt0.Y() ) );
     theVecG.Rotate( myAngle );
-    gp_Vec2d theVecV = theVecG.Rotated( Standard_PI / 2 );
+    gp_Vec2d theVecV = theVecG.Rotated( M_PI / 2 );
     theVecG.Normalize();
     theVecV.Normalize();
 
@@ -187,7 +187,7 @@ void Prs2d_ToleranceFrame::Draw( const Handle(Graphic2d_Drawer)& aDrawer ) {
       theVecT.Normalize();
       gp_Vec2d theVecG( Pnt0, gp_Pnt2d( Pnt0.X() + 1.0, Pnt0.Y() ) );
       theVecG.Rotate( myAngle );
-      gp_Vec2d theVecV = theVecG.Rotated( Standard_PI / 2 );
+      gp_Vec2d theVecV = theVecG.Rotated( M_PI / 2 );
       theVecG.Normalize();
       theVecV.Normalize();
 
index 1f258cd018eedd9f1dd428baddcfe48d306163b5..a281de0876b9a9b6eb92c8707030b23dc0e96587 100755 (executable)
@@ -41,7 +41,7 @@ void Prs3d_AnglePresentation::Draw (
   Standard_Real x1,y1,z1,x2,y2,z2;
   AttachmentPoint2.Coord(x1,y1,z1);
   AttachmentPoint3.Coord(x2,y2,z2);
-  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / PI));
+  Standard_Integer nbp = Max (4 , Standard_Integer (50. * alpha / M_PI));
   Standard_Real dteta = alpha/(nbp-1);
   Standard_Real x,y,z;
   gp_Vec u;
index af4814a1096ccc34c8fd49271d411ed88cb9ed07..0ca101df81799b21f67c13e915fe781ca2fd3fbe 100755 (executable)
@@ -51,8 +51,8 @@ void Prs3d_Arrow::Draw(const Handle(Prs3d_Presentation)& aPresentation,
 
   for (Standard_Integer i = 1 ; i <= NbPoints ; i++) {
 
-    cosinus = cos ( 2 * PI / NbPoints * (i-1) );   
-    sinus   = sin ( 2 * PI / NbPoints * (i-1) );
+    cosinus = cos ( 2 * M_PI / NbPoints * (i-1) );   
+    sinus   = sin ( 2 * M_PI / NbPoints * (i-1) );
 
     x = xc + (cosinus * xi + sinus * xj) * aLength * Tg;
     y = yc + (cosinus * yi + sinus * yj) * aLength * Tg;
index 32bd93931fe74377e7f7f4b9fe940847dd5afb0f..1eac3784fb97c40b3bf5e45c09cff73052945948 100755 (executable)
@@ -3,7 +3,7 @@
 #include <Prs3d_ArrowAspect.ixx>
 
 Prs3d_ArrowAspect::Prs3d_ArrowAspect () 
-     : myAngle(PI/180.*10), myLength(1.) {
+     : myAngle(M_PI/180.*10), myLength(1.) {
 #ifdef IMP120100
   myArrowAspect = 
        new Graphic3d_AspectLine3d (
@@ -24,7 +24,7 @@ Prs3d_ArrowAspect::Prs3d_ArrowAspect (const Quantity_PlaneAngle anAngle,
 
 void Prs3d_ArrowAspect::SetAngle ( const Quantity_PlaneAngle anAngle) {
   Prs3d_InvalidAngle_Raise_if ( anAngle <= 0.  ||
-                              anAngle >= PI /2. , "");
+                              anAngle >= M_PI /2. , "");
   myAngle = anAngle;
 }
 Quantity_PlaneAngle Prs3d_ArrowAspect::Angle () const
index eb0293f126c50725956ec474b3d8ab843b862c08..8f25b74c2c6350353a334707e787d40aa1f25843 100755 (executable)
@@ -68,7 +68,7 @@ void Prs3d_Datum::Add( const Handle(Prs3d_Presentation)& aPresentation,
     G->SetPrimitivesAspect(aDrawer->TextAspect()->Aspect());
     G->Text(Standard_CString("X"),A(2),16.);
 #else
-    Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),oX,PI/180.*10.,DS/10.);
+    Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),oX,M_PI/180.*10.,DS/10.);
     Prs3d_Root::CurrentGroup(aPresentation)->Text(Standard_CString("X"),A(2),1./81.);
 #endif
 }
@@ -85,7 +85,7 @@ void Prs3d_Datum::Add( const Handle(Prs3d_Presentation)& aPresentation,
     G->SetPrimitivesAspect(aDrawer->TextAspect()->Aspect());
     G->Text(Standard_CString("Y"),A(2),16.);
 #else
-    Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),oY,PI/180.*10.,DS/10.);
+    Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),oY,M_PI/180.*10.,DS/10.);
     Prs3d_Root::CurrentGroup(aPresentation)->Text(Standard_CString("Y"),A(2),1./81.);
 #endif
 }
@@ -103,7 +103,7 @@ void Prs3d_Datum::Add( const Handle(Prs3d_Presentation)& aPresentation,
     G->Text(Standard_CString("Z"),A(2),16.);
 #else
     Prs3d_Root::CurrentGroup(aPresentation)->Text(Standard_CString("Z"),A(2),1./81.);
-    Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),oZ,PI/180.*10.,DS/10.);
+    Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x,y,z),oZ,M_PI/180.*10.,DS/10.);
 #endif
 }
 }
index 8f88615876f889bebefdc244c63321f5fe3b3c23..e5e70e92f4884054e65f1ab3083265f42eb25565 100755 (executable)
@@ -15,8 +15,8 @@ Prs3d_Drawer::Prs3d_Drawer(): myNbPoints(30),myIsoOnPlane(Standard_False),
  myMaximalParameterValue(500000.),
  myDeviationCoefficient(0.001),
  myHLRDeviationCoefficient(0.02),
- myDeviationAngle(12*PI/180),
- myHLRAngle(20*PI/180),
+ myDeviationAngle(12*M_PI/180),
+ myHLRAngle(20*M_PI/180),
  myLineDrawArrow(Standard_False),
  myDrawHiddenLine(Standard_False)
 {
index 837993dc5d27516c3fdc4900054a253cdd49f388..671b59e1e4433f65d50d83fc9dbad170971e31d8 100755 (executable)
@@ -14,7 +14,7 @@ Prs3d_PlaneAspect::Prs3d_PlaneAspect()
   myPlaneYLength= 1.;
   myArrowsLength= 0.02;
   myArrowsSize=0.1;
-  myArrowsAngle=PI/8.;
+  myArrowsAngle=M_PI/8.;
 }
 
 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::EdgesAspect() const
index 340119fe9920d995484ee5df3646bd3f3b110e50..fdc4931aa0fc880a6a0681730e734955856f843f 100755 (executable)
@@ -40,7 +40,7 @@ void Prs3d_Vector::Add(const Handle(Prs3d_Presentation)& aPresentation,
   A(2).SetCoord(x1+dx,y1+dy,z1+dz);
   G->Polyline(A);
   Prs3d_Arrow::Draw(aPresentation,gp_Pnt(x1+dx,y1+dy,z1+dz),gp_Dir(Vec),
-                  PI/180.*10.,Sqrt(dx*dx+dy*dy+dz*dz)/10.);
+                  M_PI/180.*10.,Sqrt(dx*dx+dy*dy+dz*dz)/10.);
   
 }
 
index c5362a0ba0b26b74c7bcc9f8a21b9a565377e340..f19775054cf03750eec98540562c7087788f0ced 100755 (executable)
@@ -1373,7 +1373,7 @@ static Standard_Integer BUC60856(Draw_Interpretor& di, Standard_Integer /*argc*/
   double R1=8, R2=16, H1=20, H2=40, angle;                                       
   gp_Pnt P0(0,0,0),                                                              
   P1(0,0,20), P2(0,0,45);                                                        
-  angle = 2*PI;                                                                  
+  angle = 2*M_PI;                                                                  
   Handle(Geom_RectangularTrimmedSurface) S = GC_MakeTrimmedCone (P1, P2, R1, R2).Value();
   TopoDS_Shape myshape = BRepBuilderAPI_MakeFace(S, Precision::Confusion()).Shape();
   Handle(AIS_Shape) ais1 = new AIS_Shape(myshape);
index c81f217e3db671c838ec9695e74b5a73e28cca7d..138edc2b1cdf68ff331e7305bf3abf30f1604af4 100755 (executable)
@@ -39,7 +39,7 @@ static Standard_Integer BUC60753 (Draw_Interpretor& di, Standard_Integer argc, c
     return 1;
   }
            
-  Standard_Real Alpha = Standard_PI/10.;
+  Standard_Real Alpha = M_PI/10.;
   Standard_Real CosAlpha = Cos (Alpha);
   Standard_Real SinAlpha = Sin (Alpha);
   Standard_Real MoinsCosAlpha = Cos (-Alpha);
index b8d54e459874c83b2134073a608d6b539a9e7b42..c30bc24e53efd7c1a46d6869d4e9ab0e8167faeb 100755 (executable)
@@ -25,7 +25,7 @@ static Standard_Integer BUC60857 (Draw_Interpretor& di, Standard_Integer /*argc*
   gp_Ax2  Cone_Ax;
   double R1=8, R2=16, H1=20, H2=40, angle;
   gp_Pnt P0(0,0,0), P1(0,0,20), P2(0,0,45);
-  angle = 2*PI;
+  angle = 2*M_PI;
 
   Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
   if(aContext.IsNull()) {
index 0a9146e9e50e81c8ec9bdb2307bc308bb63bd315..b755ea357b09a997519c9183cd1be936c5d53e74 100755 (executable)
@@ -68,7 +68,7 @@ static Standard_Integer OCC426 (Draw_Interpretor& di, Standard_Integer argc, con
   gp_Pnt P1(0, 0, 0);
   gp_Dir D1(0, 0, 30);
   gp_Ax1 A1(P1,D1);
-  Standard_Real angle1 = 360 * PI180;
+  Standard_Real angle1 = 360 * (M_PI / 180.0);
   TopoDS_Shape rs1 = BRepPrimAPI_MakeRevol(F1, A1, angle1);
 
   BRepBuilderAPI_MakePolygon W2;
@@ -86,7 +86,7 @@ static Standard_Integer OCC426 (Draw_Interpretor& di, Standard_Integer argc, con
   gp_Pnt P2(0, 0, 0);
   gp_Dir D2(0, 0, 30);
   gp_Ax1 A2(P2,D2);
-  Standard_Real angle2 = 270 * PI180;
+  Standard_Real angle2 = 270 * (M_PI / 180.0);
   TopoDS_Shape rs2 = BRepPrimAPI_MakeRevol(F2, A2, angle2);
 
   BRepBuilderAPI_MakePolygon W3;
@@ -102,7 +102,7 @@ static Standard_Integer OCC426 (Draw_Interpretor& di, Standard_Integer argc, con
   gp_Pnt P3(0, 0, 0);
   gp_Dir D3(0, 0, 30);
   gp_Ax1 A3(P3,D3);
-  Standard_Real angle3 = 360 * PI180;
+  Standard_Real angle3 = 360 * (M_PI / 180.0);
   TopoDS_Shape rs3 = BRepPrimAPI_MakeRevol(F3, A3, angle3);
 
   TopoDS_Shape fuse32, fuse321;
@@ -357,7 +357,7 @@ static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, con
       TopoDS_Shape slabShape = slab.Shape();
       if (fabs(draftAngle) > 0.01)
         {
-         Standard_Real angle = draftAngle*PI180;
+         Standard_Real angle = draftAngle*(M_PI / 180.0);
          BRepOffsetAPI_DraftAngle draftSlab(slabShape);
 
          TopoDS_Shape fShape = slab.FirstShape();
@@ -880,7 +880,7 @@ static Standard_Integer OCC826 (Draw_Interpretor& di,Standard_Integer argc, cons
   gp_Pnt P1(0, 0, 0);
   gp_Dir D1(0, 30, 0);
   gp_Ax1 A1(P1,D1);
-  Standard_Real angle1 = 360 * PI180;
+  Standard_Real angle1 = 360 * (M_PI / 180.0);
   TopoDS_Shape rev = BRepPrimAPI_MakeRevol(F1, A1, angle1);
   if (index < argc) DBRep::Set(argv[index++], rev);
 
@@ -954,7 +954,7 @@ static Standard_Integer OCC827 (Draw_Interpretor& di,Standard_Integer argc, cons
   gp_Pnt P1(0, 0, 0);
   gp_Dir D1(0, 0, 30);
   gp_Ax1 A1(P1,D1);
-  Standard_Real angle1 = 360 * PI180;
+  Standard_Real angle1 = 360 * (M_PI / 180.0);
   TopoDS_Shape rev = BRepPrimAPI_MakeRevol(F1, A1, angle1);
   if (index < argc) DBRep::Set(argv[index++], rev);
 
index 53750815983da7e0ec2aa99d42545a5d67abd593..45763f7c656aba1b243d3117f5324852eeecc4b2 100755 (executable)
@@ -1280,7 +1280,7 @@ static Standard_Integer OCC22 (Draw_Interpretor& di, Standard_Integer argc, cons
     else aConsiderLocation = Standard_True;
 
     // 2. Iniitialize aShapeUpgrade
-    ShapeUpgrade_ShapeDivideAngle aShapeUpgrade(PI/2.);
+    ShapeUpgrade_ShapeDivideAngle aShapeUpgrade(M_PI/2.);
     // precision
     aShapeUpgrade.SetPrecision (Precision::Confusion());
     // tolerance
@@ -1384,7 +1384,7 @@ static Standard_Integer OCC369(Draw_Interpretor& di, Standard_Integer argc, cons
     if(aShape.IsNull()) {di << "OCC369 FAULTY. Entry shape is NULL \n"; return 0;}
 
     // 3. Build mesh
-    BRepMesh_IncrementalMesh aMesh(aShape, 0.2, Standard_True, PI/6);
+    BRepMesh_IncrementalMesh aMesh(aShape, 0.2, Standard_True, M_PI/6);
 
   }
   catch (Standard_Failure) {di << "OCC369 Exception \n" ;return 0;}
@@ -2221,8 +2221,8 @@ static Standard_Integer OCC1487 (Draw_Interpretor& di, Standard_Integer argc, co
   TopoDS_Shape cyl2;
   TopoDS_Shape o_cut_shape;
   if (CaseNumber == 1) {
-    //BRepPrimAPI_MakeCylinder o_mc2 (gp_Ax2 (gp_Pnt(21.65064, -50.0, 127.5),gp_Dir(-sin(PI/3), 0.0, 0.5)), 5, 150);
-    gp_Dir myDir_mc2(-sin(PI/3), 0.0, 0.5);
+    //BRepPrimAPI_MakeCylinder o_mc2 (gp_Ax2 (gp_Pnt(21.65064, -50.0, 127.5),gp_Dir(-sin(M_PI/3), 0.0, 0.5)), 5, 150);
+    gp_Dir myDir_mc2(-sin(M_PI/3), 0.0, 0.5);
     gp_Pnt myPnt_mc2(21.65064, -50.0, 127.5);
     gp_Ax2 myAx2_mc2(myPnt_mc2, myDir_mc2);
     BRepPrimAPI_MakeCylinder o_mc2 (myAx2_mc2, 5, 150);
@@ -2241,8 +2241,8 @@ static Standard_Integer OCC1487 (Draw_Interpretor& di, Standard_Integer argc, co
       o_cut_shape = BRepAlgo_Cut (o_mc1.Solid (), o_mc2.Solid ());
     }
   } else {
-    //BRepPrimAPI_MakeCylinder o_mc2 (gp_Ax2 (gp_Pnt(978.34936, -50.0, 127.5),gp_Dir(sin(PI/3), 0.0, 0.5)), 5, 150);
-    gp_Dir myDir_mc2(-sin(PI/3), 0.0, 0.5);
+    //BRepPrimAPI_MakeCylinder o_mc2 (gp_Ax2 (gp_Pnt(978.34936, -50.0, 127.5),gp_Dir(sin(M_PI/3), 0.0, 0.5)), 5, 150);
+    gp_Dir myDir_mc2(-sin(M_PI/3), 0.0, 0.5);
     gp_Pnt myPnt_mc2(21.65064, -50.0, 127.5);
     gp_Ax2 myAx2_mc2(myPnt_mc2, myDir_mc2);
     BRepPrimAPI_MakeCylinder o_mc2 (myAx2_mc2, 5, 150);
@@ -3361,7 +3361,7 @@ Standard_Integer OCC14376(Draw_Interpretor& di, Standard_Integer argc, const cha
   }
   di<<"deflection="<< aDeflection << "\n";
 
-  BRepMesh_IncrementalMesh aIMesh(aShape, aDeflection, Standard_False, PI/9.);
+  BRepMesh_IncrementalMesh aIMesh(aShape, aDeflection, Standard_False, M_PI/9.);
   TopLoc_Location aLocation;
   Handle(Poly_Triangulation) aTriang = BRep_Tool::Triangulation(TopoDS::Face(aShape), aLocation);
 
index 993d7f305af6497f292415fdf40272902c32f76e..27c451ea7115dd333470872667d2b66c2ecfc5d7 100755 (executable)
@@ -52,12 +52,12 @@ static Standard_Integer OCC895 (Draw_Interpretor& di, Standard_Integer argc, con
   gp_Ax2 axis1 = reverse?
     gp_Ax2(center1, gp::DY(), gp::DZ()) : gp_Ax2(center1, -gp::DY(), gp::DX());
   if (Abs(angle) > gp::Resolution())
-    axis1.Rotate(gp_Ax1(center1, gp::DZ()), angle*PI/180.0);
+    axis1.Rotate(gp_Ax1(center1, gp::DZ()), angle*M_PI/180.0);
 
   gce_MakeCirc makeCirc1(axis1, rad);
   if(!makeCirc1.IsDone()) return 1;
   gp_Circ circ1 = makeCirc1.Value();
-  GC_MakeArcOfCircle makeArc1(circ1, 0, PI/2, Standard_True);
+  GC_MakeArcOfCircle makeArc1(circ1, 0, M_PI/2, Standard_True);
   if(!makeArc1.IsDone()) return 1;
   Handle_Geom_TrimmedCurve arc1 = makeArc1.Value();
 
@@ -77,7 +77,7 @@ static Standard_Integer OCC895 (Draw_Interpretor& di, Standard_Integer argc, con
   gce_MakeCirc makeCirc2(axis2, rad);
   if(!makeCirc2.IsDone()) return 1;
   gp_Circ circ2 = makeCirc2.Value();
-  GC_MakeArcOfCircle makeArc2(circ2, 0, PI/2, Standard_True);
+  GC_MakeArcOfCircle makeArc2(circ2, 0, M_PI/2, Standard_True);
   if(!makeArc2.IsDone()) return 1;
   Handle_Geom_TrimmedCurve arc2 = makeArc2.Value();
 
index efc986392acdbba8c8133dd81300692661476156..eb85447064c66fa42a961bf4c8833195bc3f8468 100755 (executable)
@@ -65,15 +65,9 @@ static Standard_Integer OCC332bug (Draw_Interpretor& di, Standard_Integer argc,
   if (argc>4) major_radius = atof(argv[4]);
   if (argc>5) length = atof(argv[5]);
   double bend_angle = length/major_radius;
-  double PI;
-#ifdef M_PI
-  PI = M_PI;
-#else
-  PI = 2. * asin(1.0);
-#endif
 
   //if ((bend_angle >= M_PI)) {
-  if ((bend_angle >= PI)) {
+  if ((bend_angle >= M_PI)) {
     di << "The arguments are invalid." << "\n";
     return(TCL_ERROR);
   }
@@ -426,13 +420,7 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con
   double radius_l = 20.0;
   double radius_r = 80.0;
   // mkv 15.07.03 double bend_angle = M_PI/2.0;
-  double PI;
-#ifdef M_PI
-  PI = M_PI;
-#else
-  PI = 2. * asin(1.0);
-#endif
-  double bend_angle = PI/2.0;
+  double bend_angle = M_PI/2.0;
 
   double major_rad = 280.0;
   double wall_thickness = 10.0;
@@ -446,7 +434,7 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con
   if (argc>5) wall_thickness = atof(argv[5]);
 
   // mkv 15.07.03 if ((bend_angle >= 2.0*M_PI)) {
-  if ((bend_angle >= 2.0*PI)) {
+  if ((bend_angle >= 2.0*M_PI)) {
     di << "The arguments are invalid." << "\n";
     return(TCL_ERROR);
   }
@@ -486,22 +474,22 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con
   gp_Circ faceCircle2(circ2axis,radius_r);
   gp_Circ outFaceCircle2(circ2axis,radius_r+wall_thickness);
 
-  TopoDS_Edge E1_1 = BRepBuilderAPI_MakeEdge(faceCircle, 0, PI);
-  TopoDS_Edge E1_2 = BRepBuilderAPI_MakeEdge(faceCircle, PI, 2.*PI);
+  TopoDS_Edge E1_1 = BRepBuilderAPI_MakeEdge(faceCircle, 0, M_PI);
+  TopoDS_Edge E1_2 = BRepBuilderAPI_MakeEdge(faceCircle, M_PI, 2.*M_PI);
   TopoDS_Wire Wire1_ = BRepBuilderAPI_MakeWire(E1_1, E1_2);
   
   // Create the face at the near end for the wall solid, an annular ring.
-  TopoDS_Edge Eout1_1 = BRepBuilderAPI_MakeEdge(outFaceCircle, 0, PI);
-  TopoDS_Edge Eout1_2 = BRepBuilderAPI_MakeEdge(outFaceCircle, PI, 2.*PI);
+  TopoDS_Edge Eout1_1 = BRepBuilderAPI_MakeEdge(outFaceCircle, 0, M_PI);
+  TopoDS_Edge Eout1_2 = BRepBuilderAPI_MakeEdge(outFaceCircle, M_PI, 2.*M_PI);
   TopoDS_Wire outerWire1_ = BRepBuilderAPI_MakeWire(Eout1_1, Eout1_2);
  
-  TopoDS_Edge E2_1 = BRepBuilderAPI_MakeEdge(faceCircle2, 0, PI);
-  TopoDS_Edge E2_2 = BRepBuilderAPI_MakeEdge(faceCircle2, PI, 2.*PI);
+  TopoDS_Edge E2_1 = BRepBuilderAPI_MakeEdge(faceCircle2, 0, M_PI);
+  TopoDS_Edge E2_2 = BRepBuilderAPI_MakeEdge(faceCircle2, M_PI, 2.*M_PI);
   TopoDS_Wire Wire2_ = BRepBuilderAPI_MakeWire(E2_1, E2_2);
   
   // Create the face at the far end for the wall solid, an annular ring.
-  TopoDS_Edge Eout2_1 = BRepBuilderAPI_MakeEdge(outFaceCircle2, 0, PI);
-  TopoDS_Edge Eout2_2 = BRepBuilderAPI_MakeEdge(outFaceCircle2, PI, 2.*PI);
+  TopoDS_Edge Eout2_1 = BRepBuilderAPI_MakeEdge(outFaceCircle2, 0, M_PI);
+  TopoDS_Edge Eout2_2 = BRepBuilderAPI_MakeEdge(outFaceCircle2, M_PI, 2.*M_PI);
   TopoDS_Wire outerWire2_ = BRepBuilderAPI_MakeWire(Eout2_1, Eout2_2);
 
   BRepBuilderAPI_MakeFace mkFace;
index 656bb3caf49078fe2b98351bd0496d33ff8c5b6e..20cd9799397088d04cad1248c3c4c1320c2f6b2b 100755 (executable)
@@ -634,7 +634,7 @@ static Standard_Integer OCC394 (Draw_Interpretor& di, Standard_Integer argc, con
    Standard_Integer k = 3;
    Standard_Real tol = 100000;
    Standard_Integer mode = 2;
-   Standard_Real tolang = PI/2;
+   Standard_Real tolang = M_PI/2;
    if(argc > k) 
      tol = atof(argv[k++]);
    
index b4b8ba9fda8bf7ecf00fad1925860649042c6784..6f7f4f697670a59b01317f1084b13db24e9e6a24 100755 (executable)
@@ -482,7 +482,7 @@ static Standard_Integer TDraft2d (Draw_Interpretor& di, Standard_Integer argc, c
     return 1;
   }
   anAngle = atof(argv[4]);
-  anAngle = 2*PI * anAngle / 360.0;
+  anAngle = 2*M_PI * anAngle / 360.0;
   gp_Pln aPln;
   Handle(Geom_Surface) aSurf;
 //  AIS2D_KindOfSurface aSurfType;
index d708c8738b68e797b4f0508a98af9ef092489deb..418fce1d32ec57f7971d073b215d9c46c18ce339 100755 (executable)
@@ -461,7 +461,7 @@ static char *GetTypeNameFromShape2d (const TopoDS_Shape& aShape)
   OSD_Timer myTimer;
   TheAIS2DContext()->CloseLocalContext();
   
-  Standard_Real Step = 4*PI/180;
+  Standard_Real Step = 4*M_PI/180;
   Standard_Real Angle = 0;
   
   Handle(AIS2D_InteractiveObject) aIO;
@@ -483,7 +483,7 @@ static char *GetTypeNameFromShape2d (const TopoDS_Shape& aShape)
   if (atoi(argv[2]) == 1)
   { 
     cout << " Calcul par Transformation" << endl;
-    for (Standard_Real myAngle = 0; Angle < 10*2*PI; myAngle++)
+    for (Standard_Real myAngle = 0; Angle < 10*2*M_PI; myAngle++)
     {
       Angle = Step*myAngle;
       gp_Trsf myTransfo;
@@ -500,7 +500,7 @@ static char *GetTypeNameFromShape2d (const TopoDS_Shape& aShape)
     TopLoc_Location myDeltaAngle (myAngleTrsf);
     TopLoc_Location myTrueLoc;
     
-    for (Standard_Real myAngle = 0; Angle < 10*2*PI; myAngle++)
+    for (Standard_Real myAngle = 0; Angle < 10*2*M_PI; myAngle++)
     {
       Angle = Step*myAngle;
       myTrueLoc = myTrueLoc*myDeltaAngle;
@@ -580,9 +580,9 @@ static char *GetTypeNameFromShape2d (const TopoDS_Shape& aShape)
 //  TheAIS2DContext()->Deactivate(myAisPropeller   );
   
   // Boucle de mouvement
-  for (Standard_Real myAngle = 0; angleA < 2*PI*10.175; myAngle++)
+  for (Standard_Real myAngle = 0; angleA < 2*M_PI*10.175; myAngle++)
   {
-    angleA = thread*myAngle*PI/180;
+    angleA = thread*myAngle*M_PI/180;
     X = Sin(angleA)*3/8;
     angleB = atan(X / Sqrt(-X * X + 1));
 //    Standard_Real decal(25*0.6);
index ccfaf62f1dbe34a17fa49c79922a2103ab244aee..971df3b7bba63642bde27a0be29db812ba297f03 100755 (executable)
@@ -240,7 +240,7 @@ static int V2dTrihedron2D (Draw_Interpretor& , Standard_Integer argc, char** arg
   gp_Dir TheZVector (coord[3],coord[4],coord[5]);
   gp_Dir TheXVector (coord[6],coord[7],coord[8]);
 
-  if (!TheZVector.IsNormal(TheXVector,PI/180))
+  if (!TheZVector.IsNormal(TheXVector,M_PI/180))
   {
     cout << argv[0] << " VectorX is not normal to VectorZ" << endl;
     return 1;
@@ -1121,7 +1121,7 @@ static int V2dPlaneBuilder (Draw_Interpretor& , Standard_Integer argc, char** ar
        if (mySurface.GetType() == GeomAbs_Plane)
         {
          gp_Pln myPlane = mySurface.Plane();
-         myPlane.Rotate(myRotAxis, PI/2);
+         myPlane.Rotate(myRotAxis, M_PI/2);
          
          Handle(Geom_Plane) theGeomPlane = new Geom_Plane(myPlane);
          gp_Pnt theMiddle ((Aa.X()+Ab.X())/2, (Aa.Y()+Ab.Y())/2, (Aa.Z()+Ab.Z())/2);
@@ -1169,7 +1169,7 @@ static int V2dPlaneBuilder (Draw_Interpretor& , Standard_Integer argc, char** ar
        if (mySurface.GetType() == GeomAbs_Plane)
         {
          gp_Pln myPlane = mySurface.Plane();
-         myPlane.Rotate(myRotAxis, PI/2);
+         myPlane.Rotate(myRotAxis, M_PI/2);
          Handle(Geom_Plane) theGeomPlane = new Geom_Plane(myPlane);
          gp_Pnt theMiddle ((Ba.X()+Bb.X())/2, (Ba.Y()+Bb.Y())/2, (Ba.Z()+Bb.Z())/2);
          Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane, theMiddle);
index 2e86d13842b24ab23ad4ea0e6ef6d261544f2522..7f0c96929bee8665e2012efa6a62dd88ab049485 100755 (executable)
@@ -239,7 +239,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepRepr
   // Initialise the default value
   // status : 0 if OK, else 1 2 3
   lengthFactor = solidAngleFactor = 1.;
-  planeAngleFactor = PI/180.;
+  planeAngleFactor = M_PI/180.;
 //  Standard_Real theLExp   = 1.;
 //  Standard_Real thePAExp  = 0.;
 //  Standard_Real theSAExp  = 0.;
index 34eb9725b36c832e5f3f607726edff4405d7abc4..50b92ca29c124ca7349663ec4eab8af53187adcf 100755 (executable)
@@ -1551,7 +1551,7 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)&
     stat1 = myUnit.ComputeFactors(theGUAC);
     Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode");
     Standard_Real angleFactor = ( anglemode == 0 ? myUnit.PlaneAngleFactor() :
-                                 anglemode == 1 ? 1. : PI/180. );
+                                 anglemode == 1 ? 1. : M_PI/180. );
     UnitsMethods::InitializeFactors(myUnit.LengthFactor(),
                                    angleFactor,
                                    myUnit.SolidAngleFactor());
index fba328abb507d6cf6ef17b48faa0b1b4c8dfd829..6c50114658c6777a9b8a2c3f69c4d855cbfc3833 100755 (executable)
@@ -447,7 +447,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::Transfer (const Handle(Transfer_
   Standard_Real lFactor = UnitsMethods::GetLengthFactorValue ( Interface_Static::IVal ( "write.step.unit" ) );
   lFactor /= UnitsMethods::GetCasCadeLengthUnit();
   Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode");
-  UnitsMethods::InitializeFactors ( lFactor, ( anglemode <= 1 ? 1. : PI/180. ), 1. );
+  UnitsMethods::InitializeFactors ( lFactor, ( anglemode <= 1 ? 1. : M_PI/180. ), 1. );
 
   // create SDR
   STEPConstruct_Part SDRTool;
index 13a4493e15657f8071199ffad3add9b65f8a1b90..451087bb67c05b1ffda40a6f8f7c97a8954f57ce 100755 (executable)
@@ -537,7 +537,7 @@ static Standard_Integer fixsmalledges(Draw_Interpretor& di, Standard_Integer n,
   Standard_Integer k = 3;
   Standard_Real tol = 100000;
   Standard_Integer mode = 2;
-  Standard_Real tolang = PI/2;
+  Standard_Real tolang = M_PI/2;
   if(n > k) 
     tol = atof(a[k++]);
   
index 1bfa4d96c6a9257aa35a4b472ca88bf2c0769bd9..893d4f0d3212660e7f22a6af599de7a68999e6dd 100755 (executable)
@@ -447,7 +447,7 @@ static Standard_Integer DT_SplitAngle(Draw_Interpretor& di,
     if ( maxangle <1 ) maxangle = 1;
   }
   
-  ShapeUpgrade_ShapeDivideAngle tool(maxangle*PI/180,inputShape);
+  ShapeUpgrade_ShapeDivideAngle tool(maxangle*M_PI/180,inputShape);
   tool.Perform();
   TopoDS_Shape res = tool.Result();
 
index 65f2bf08b3ac3540210dfd67bfc5355403296ac3..4ea8d6ae57c4019d2c10f471d44a75c73b068393 100755 (executable)
@@ -34,7 +34,7 @@ myangle(Angle),
 mynbpt(NbPoints)
 
 {
-  if(myangle<=Precision::Confusion()) myangle=2*PI;
+  if(myangle<=Precision::Confusion()) myangle=2*M_PI;
 }
 
 
index b224892561e54a29e2612578c05c1d6ec55498b2..8747d5f417902eae316081fa4dbe38af7c57402f 100755 (executable)
@@ -45,10 +45,10 @@ Areas(SelectBasics_ListOfBox2d& boxes)
   
   Standard_Real theangle = (VAxx.Angle(MyVec));
   theangle = Abs(theangle);
-  if(theangle>=PI/2.) theangle-=PI/2;
+  if(theangle>=M_PI/2.) theangle-=M_PI/2;
 
   
-  if(theangle>=PI/12. && theangle <=5*PI/12.)
+  if(theangle>=M_PI/12. && theangle <=5*M_PI/12.)
     {
       TColgp_Array1OfPnt2d BoxPoint (1,mymaxrect+1);
       BoxPoint (1) = mystart;BoxPoint(mymaxrect+1)=myend;
index c8a0ac8cd5487bc9142500e7f79cd7499c762382..d852b2a2c8587587f98c69739fc2cb48a715caee 100755 (executable)
@@ -82,8 +82,8 @@ void Select3D_SensitiveSegment
   else {
     gp_Vec2d MyVec(myprojstart,myprojend);//,VAxx(gp_Dir2d(0.,1.));
     Standard_Real theangle = Abs(gp_Dir2d(0.,1.).Angle(gp_Vec2d(myprojstart,myprojend)));
-    if(theangle>=PI/2.) theangle-=PI/2;
-    if(theangle>=PI/12. && theangle <=5*PI/12.)
+    if(theangle>=M_PI/2.) theangle-=M_PI/2;
+    if(theangle>=M_PI/12. && theangle <=5*M_PI/12.)
       {
        TColgp_Array1OfPnt2d BoxPoint (1,mymaxrect+1);
        BoxPoint (1) = myprojstart;
index b2b1dab7879a6be4a19e3ebfc0ba6d9b627756f5..80b1ccc066d7d65c45acccdd964bdbfdb27ea0d6 100755 (executable)
@@ -918,7 +918,7 @@ Standard_Boolean  ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
        }
 //       cout << "angle1 "   << angle1<< endl;
 //       cout << "angle2 "   << angle2<< endl;
-      if ((angle1<=0.001 && angle2<=0.01) || ((PI-angle2)<= 0.001 && (PI-angle2)<= 0.01)) return Standard_True;
+      if ((angle1<=0.001 && angle2<=0.01) || ((M_PI-angle2)<= 0.001 && (M_PI-angle2)<= 0.01)) return Standard_True;
       else return Standard_False;
     } 
     
index 3030cf9e87239f36426bf9193ad1e9e007134bd5..9ba14d6f7ca833bb21a187b5ded63173411a4489 100755 (executable)
@@ -338,7 +338,7 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
           proj  = ElCLib::Value(param, aCirc);
         }
        closed = Standard_True;
-       valclosed = 2.*PI;
+       valclosed = 2.*M_PI;
       }
       break;
     case GeomAbs_Hyperbola:
@@ -364,7 +364,7 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
        param = ElCLib::Parameter(C3D.Ellipse(), P3D);
        proj  = ElCLib::Value(param, C3D.Ellipse());
        closed = Standard_True;
-       valclosed = 2.*PI;
+       valclosed = 2.*M_PI;
 
       }
       break;
@@ -802,8 +802,8 @@ static void AppendControlPoles (TColgp_SequenceOfPnt& seq,
     seq.Append(curve->Value(1));
   } else if ( curve->IsKind(STANDARD_TYPE(Geom_Conic))) {
     seq.Append(curve->Value(0));
-    seq.Append(curve->Value(PI/2));
-    seq.Append(curve->Value(PI));
+    seq.Append(curve->Value(M_PI/2));
+    seq.Append(curve->Value(M_PI));
   } else if ( curve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
     //DeclareAndCast(Geom_TrimmedCurve, Trimmed, curve);
     Handle(Geom_TrimmedCurve) Trimmed = *((Handle(Geom_TrimmedCurve) *) &curve);
@@ -1087,7 +1087,7 @@ Standard_Boolean ShapeAnalysis_Curve::GetSamplePoints (const Handle(Geom2d_Curve
     return Standard_True;
   }
   else if(curve->IsKind(STANDARD_TYPE(Geom2d_Conic))) {
-    step = Min ( PI, last-first ) / 19; //:abv 05.06.02 TUBE.stp #19209...: PI/16
+    step = Min ( M_PI, last-first ) / 19; //:abv 05.06.02 TUBE.stp #19209...: M_PI/16
 //     if( step>(last-first) ) {
 //       seq.Append(curve->Value(first));
 //       seq.Append(curve->Value((last+first)/2));
index 14dd52c1c94d71edb59a82b5c3d2e0d210e4f26e..fb74de9fd0198b027b14750a298fdcd92d69cb43 100755 (executable)
@@ -329,7 +329,7 @@ Standard_Boolean ShapeAnalysis_FreeBoundsProperties::CheckNotches(const TopoDS_W
   if ( E2.Orientation() == TopAbs_REVERSED ) vec2.Reverse();
   
   Standard_Real angl = Abs( vec1.Angle(vec2));
-  if (angl > 0.95*PI) {
+  if (angl > 0.95*M_PI) {
     distMax = .0;
     for (Standard_Integer i = 0; i < NbControl; i++) {
       Standard_Real prm = ((NbControl-1-i)*First1 + i*Last1)/(NbControl-1);
index f99ea52b38da332feb45af8e33e5c958c8edee75..89cdbb60a932d8f35dc6f34e82efd9a0efd3f605 100755 (executable)
@@ -146,12 +146,12 @@ void ShapeAnalysis_Surface::ComputeSingularities()
     //szv#4:S4163:12Mar99 warning - possible div by zero
     Standard_Real Ang = ACos (Min (1., majorR / minorR));
     myPreci   [0] = myPreci[1] = Max (0., majorR - minorR);
-    myP3d     [0] = mySurf->Value (0., PI-Ang);
-    myFirstP2d[0].SetCoord (su1, PI-Ang);
-    myLastP2d [0].SetCoord (su2, PI-Ang);
-    myP3d     [1] = mySurf->Value (0., PI+Ang);
-    myFirstP2d[1].SetCoord (su2, PI+Ang);
-    myLastP2d [1].SetCoord (su1, PI+Ang);
+    myP3d     [0] = mySurf->Value (0., M_PI-Ang);
+    myFirstP2d[0].SetCoord (su1, M_PI-Ang);
+    myLastP2d [0].SetCoord (su2, M_PI-Ang);
+    myP3d     [1] = mySurf->Value (0., M_PI+Ang);
+    myFirstP2d[1].SetCoord (su2, M_PI+Ang);
+    myLastP2d [1].SetCoord (su1, M_PI+Ang);
     myFirstPar[0] = myFirstPar[1] = su1;
     myLastPar [0] = myLastPar [1] = su2;
     myUIsoDeg [0] = myUIsoDeg [1] = Standard_False;
@@ -917,29 +917,29 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
     {
       gp_Cylinder Cylinder = SurfAdapt.Cylinder();
       ElSLib::Parameters( Cylinder, P3D, S, T);
-      S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*PI);
+      S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*M_PI);
       break;
     }
   case GeomAbs_Cone :
     {
       gp_Cone Cone = SurfAdapt.Cone();
       ElSLib::Parameters( Cone, P3D, S, T);
-      S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*PI);
+      S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*M_PI);
       break;
     }
   case GeomAbs_Sphere :
     {
       gp_Sphere Sphere = SurfAdapt.Sphere();
       ElSLib::Parameters( Sphere, P3D, S, T);
-      S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*PI);
+      S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*M_PI);
       break;
     }
   case GeomAbs_Torus :
     {
       gp_Torus Torus = SurfAdapt.Torus();
       ElSLib::Parameters( Torus, P3D, S, T);
-      S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*PI);
-      T += ShapeAnalysis::AdjustByPeriod(T,0.5*(vf+vl),2*PI);
+      S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*M_PI);
+      T += ShapeAnalysis::AdjustByPeriod(T,0.5*(vf+vl),2*M_PI);
       break;
     }
   case GeomAbs_BezierSurface :
index e823f82c1b9bb44ad3cec94c4f4a0be296b2ffa6..c62b08d0488058e4fa2500beb97504c91798b8d4 100755 (executable)
@@ -1476,8 +1476,8 @@ Standard_Boolean ShapeAnalysis_Wire::CheckLacking (const Standard_Integer num,
   myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
 
   if ( myMax2d < Precision::PConfusion() || //:abv 03.06.02 CTS21866.stp
-       ( v1.SquareMagnitude() > gp::Resolution() && Abs ( v12.Angle ( v1 ) ) > 0.9 * PI ) ||
-       ( v2.SquareMagnitude() > gp::Resolution() && Abs ( v12.Angle ( v2 ) ) > 0.9 * PI ) ) 
+       ( v1.SquareMagnitude() > gp::Resolution() && Abs ( v12.Angle ( v1 ) ) > 0.9 * M_PI ) ||
+       ( v2.SquareMagnitude() > gp::Resolution() && Abs ( v12.Angle ( v2 ) ) > 0.9 * M_PI ) ) 
        myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE2 );
   return Standard_True;
 }
index 20d0b1a63b3d93f3949b3de4fcb10efe5b0d6f99..5777a1e16e86fa1f7b9fead064f2c640a22a1255 100755 (executable)
@@ -594,8 +594,8 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
     Abs(v1-VF) > Precision::PConfusion() || Abs(v2- VL) > Precision::PConfusion()) {
       /*if(aSurf->IsUPeriodic() ) {
       Standard_Real aDelta = (UL > UF ? UL - UF : UF - UL );
-      u1 = (aDelta > 2.*PI ? 0. : UF + ShapeAnalysis::AdjustByPeriod(UF,0.5*(UL+UF),2*PI)); 
-      u2 = (aDelta > 2.*PI ? 2.*PI : u1 + aDelta); 
+      u1 = (aDelta > 2.*M_PI ? 0. : UF + ShapeAnalysis::AdjustByPeriod(UF,0.5*(UL+UF),2*M_PI)); 
+      u2 = (aDelta > 2.*M_PI ? 2.*M_PI : u1 + aDelta); 
       }*/
       Standard_Boolean isTrim = Standard_False;
       if(!aSurf->IsUPeriodic() ) { //else {
@@ -605,8 +605,8 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
       /*if(aSurf->IsVPeriodic()) {
 
       Standard_Real aDelta = (VL > VF ? VL - VF : VF - VL );
-      v1 = (aDelta > 2.*PI ? 0. : VF + ShapeAnalysis::AdjustByPeriod(VF,0.5*(UL+UF),2*PI)); ; 
-      v2 = (aDelta > 2.*PI ? 2.* PI : v1 + aDelta); 
+      v1 = (aDelta > 2.*M_PI ? 0. : VF + ShapeAnalysis::AdjustByPeriod(VF,0.5*(UL+UF),2*M_PI)); ; 
+      v2 = (aDelta > 2.*M_PI ? 2.* M_PI : v1 + aDelta); 
       }*/
       if(!aSurf->IsVPeriodic()) {//else 
         v1 = Max(v1,VF); v2 = Min(v2,VL);
index 47ee417efa1a4c7ddbf15eb68420b2a3125a0f7d..4b05524aadeec823b44755373c808071da6ef6d4 100755 (executable)
@@ -93,7 +93,7 @@ Standard_Boolean ShapeCustom_ConvertToRevolution::NewSurface (const TopoDS_Face&
     Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(ES);
     gp_Ax2 Ax2 ( pos, X ^ dir, X );
     Handle(Geom_Circle) Circ = new Geom_Circle ( Ax2, SS->Radius() );
-    BasisCurve = new Geom_TrimmedCurve ( Circ, -PI/2., PI/2. );
+    BasisCurve = new Geom_TrimmedCurve ( Circ, -M_PI/2., M_PI/2. );
   }
   else if ( ES->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) {
     Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(ES);
@@ -221,7 +221,7 @@ Standard_Boolean ShapeCustom_ConvertToRevolution::NewCurve2d (const TopoDS_Edge&
     // for spherical surface, surface of revolution since based on TrimmedCurve
     // has V parametrisation shifted on 2PI; translate pcurve accordingly
     if ( ! ES.IsNull() && ES->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
-      gp_Vec2d shift ( 0., 2*PI );
+      gp_Vec2d shift ( 0., 2*M_PI );
       C->Translate ( shift );
     }
   }
index 5adcf9767d92ff7969dd48df310834a8d9e72954..2fc09cb5236e35b33bc3904b4741c006c19991b2 100755 (executable)
@@ -1992,7 +1992,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
     Standard_Integer index = 0;
     Standard_Boolean misoriented = Standard_True, samepatch = Standard_False;
     Standard_Boolean reverse = Standard_False, connected = Standard_False;
-    Standard_Real angle = -PI, mindist = RealLast();
+    Standard_Real angle = -M_PI, mindist = RealLast();
     Standard_Integer weigth = 0;
     Standard_Real shiftu=0., shiftv=0.;
 
@@ -2083,8 +2083,8 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
        }
        
        // short segment is to be taken with highest priority by angle
-        Standard_Real ang = ( shorts(i) >0 ? PI : endTan.Angle ( lVec ) );
-       if ( myClosedMode && shorts(i) <=0 && PI-ang < ::Precision::Angular() )
+        Standard_Real ang = ( shorts(i) >0 ? M_PI : endTan.Angle ( lVec ) );
+       if ( myClosedMode && shorts(i) <=0 && M_PI-ang < ::Precision::Angular() )
          ang = 0.; // abv 21 Mar 00: trj3_s1-md-214.stp #2471: avoid going back
         // abv 05 Feb 02: face from Parasolid: use tolerance of edges for check
         // for coincidence (instead of vertex tolerance) in order 
index e79f7692447655fc6574374af3e052fb2e139da7..5cc19873f4dc75b031541e03fd736b9a1d99c909 100755 (executable)
@@ -1442,14 +1442,14 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
     // this means that degenerated edge should be added to one of poles, and
     // then usual procedure applied
     if ( ismodeu && mySurf->Surface()->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
-      gp_Pnt2d p ( ( ismodeu < 0 ? 0. : 2.*PI ), ismodeu * 0.5 * PI );
+      gp_Pnt2d p ( ( ismodeu < 0 ? 0. : 2.*M_PI ), ismodeu * 0.5 * M_PI );
       gp_Dir2d d ( -ismodeu, 0. );
       Handle(Geom2d_Line) line = new Geom2d_Line ( p, d );
       TopoDS_Edge edge;
       B.MakeEdge ( edge );
       B.Degenerated ( edge, Standard_True );
       B.UpdateEdge ( edge, line, myFace, ::Precision::Confusion() );
-      B.Range ( edge, myFace, 0., 2*PI );
+      B.Range ( edge, myFace, 0., 2*M_PI );
       TopoDS_Vertex V;
       B.MakeVertex ( V, mySurf->Value ( p.X(), p.Y() ), ::Precision::Confusion() );
       V.Orientation(TopAbs_FORWARD);
index e91bf3a6a902264e1110fd53aa09d24bae84fb97..b3b91634b374896935d1f37594e2a8d3b1445d4b 100755 (executable)
@@ -395,7 +395,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
       if (c1->IsKind(STANDARD_TYPE(Geom_Circle)) ||
          c1->IsKind(STANDARD_TYPE(Geom_Ellipse))) 
       {
-       Standard_Real diff = PI - Abs(clast1-cfirst2)*0.5;
+       Standard_Real diff = M_PI - Abs(clast1-cfirst2)*0.5;
        first1 -= diff; last1 += diff;
        done1 = Standard_True;
       }
@@ -422,7 +422,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
       else if (c1->IsKind(STANDARD_TYPE(Geom_Circle)) ||
               c1->IsKind(STANDARD_TYPE(Geom_Ellipse))) 
       {
-       domfirst1 = 0.; domlast1 = 2*PI;
+       domfirst1 = 0.; domlast1 = 2*M_PI;
       }
       Standard_Real domfirst2 = first2, domlast2 = last2;
       if (c2->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) ||
@@ -442,7 +442,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
       else if (c2->IsKind(STANDARD_TYPE(Geom_Circle)) ||
               c2->IsKind(STANDARD_TYPE(Geom_Ellipse))) 
       {
-       domfirst2 = 0.; domlast2 = 2*PI;
+       domfirst2 = 0.; domlast2 = 2*M_PI;
       }
 
       Standard_Real ipar1 = clast1, ipar2 = cfirst2;
@@ -979,7 +979,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
       if (pc1->IsKind(STANDARD_TYPE(Geom2d_Circle)) ||
          pc1->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) 
       {
-       Standard_Real diff = PI - Abs(clast1-cfirst2)*0.5;
+       Standard_Real diff = M_PI - Abs(clast1-cfirst2)*0.5;
        first1 -= diff; last1 += diff;
        done1 = Standard_True;
       }
@@ -1006,7 +1006,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
       else if (pc1->IsKind(STANDARD_TYPE(Geom2d_Circle)) ||
               pc1->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) 
       {
-       domfirst1 = 0.; domlast1 = 2*PI;
+       domfirst1 = 0.; domlast1 = 2*M_PI;
       }
       Standard_Real domfirst2 = first2, domlast2 = last2;
       if (pc2->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)) ||
@@ -1026,7 +1026,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
       else if (pc2->IsKind(STANDARD_TYPE(Geom2d_Circle)) ||
               pc2->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) 
       {
-       domfirst2 = 0.; domlast2 = 2*PI;
+       domfirst2 = 0.; domlast2 = 2*M_PI;
       }
 
       Standard_Real ipar1 = clast1, ipar2 = cfirst2;
index 728aad6ed2d3f62b298d380da072e4c8456d3795..8f56d28d1677784a9c52b35c58cfd859dfbcd202 100755 (executable)
@@ -685,14 +685,14 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
                  if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
                  Standard_Real tol2 = Precision::Confusion() * Precision::Confusion();
                  if ( Vec1.SquareMagnitude() < tol2 ||
-                      Vec2.SquareMagnitude() < tol2 ) Ang1 = PI/2.;
+                      Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.;
                  else Ang1 = Abs(Vec1.Angle(Vec2));
                  C2->D1(last2,P,Vec1);
                  C3->D1(first3,P,Vec2);
                  if ( edge2.Orientation() == TopAbs_REVERSED ) Vec1.Reverse();
                  if ( edge3.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
                  if ( Vec1.SquareMagnitude() < tol2 ||
-                      Vec2.SquareMagnitude() < tol2 ) Ang2 = PI/2.;
+                      Vec2.SquareMagnitude() < tol2 ) Ang2 = M_PI/2.;
                  else Ang2 = Abs(Vec1.Angle(Vec2));
                  //isLimAngle = (theLimitAngle != -1 && Min(Ang1,Ang2) > theLimitAngle);  
                  //take_next = (Ang2<Ang1);
@@ -1125,14 +1125,14 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
                  if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
                  Standard_Real tol2 = Precision::Confusion() * Precision::Confusion();
                  if ( Vec1.SquareMagnitude() < tol2 ||
-                      Vec2.SquareMagnitude() < tol2 ) Ang1 = PI/2.;
+                      Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.;
                  else Ang1 = Abs(Vec1.Angle(Vec2));
                  C2->D1(last2,P,Vec1);
                  C3->D1(first3,P,Vec2);
                  if ( edge2.Orientation() == TopAbs_REVERSED ) Vec1.Reverse();
                  if ( edge3.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
                  if ( Vec1.SquareMagnitude() < tol2 ||
-                      Vec2.SquareMagnitude() < tol2 ) Ang2 = PI/2.;
+                      Vec2.SquareMagnitude() < tol2 ) Ang2 = M_PI/2.;
                  else Ang2 = Abs(Vec1.Angle(Vec2));
                  //isLimAngle = (theLimitAngle != -1 && Min(Ang1,Ang2) > theLimitAngle);  
                  //take_next = (Ang2<Ang1);
index f2b0d11c9f065e8260b9259fefe75d1fc0bce3ef..e276d1acab2905a5b4688c7a1375285e888db718 100755 (executable)
@@ -172,7 +172,7 @@ static Standard_Boolean splitangle (const Handle(ShapeProcess_Context)& context)
   Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
   if ( ctx.IsNull() ) return Standard_False;
   
-  ShapeUpgrade_ShapeDivideAngle SDA ( ctx->RealVal ( "Angle", 2*PI ), ctx->Result() );
+  ShapeUpgrade_ShapeDivideAngle SDA ( ctx->RealVal ( "Angle", 2*M_PI ), ctx->Result() );
   SDA.SetMaxTolerance ( ctx->RealVal ( "MaxTolerance", 1. ) );
   
   if ( ! SDA.Perform() && SDA.Status (ShapeExtend_FAIL) ) {
index c3f7a833102a09bd9ec3aa95a09d3a202da5084d..a777a8de2175aa046e21e517134a624b338df324 100755 (executable)
 #include <Standard_OStream.hxx>
 #endif
 
-#if defined(WNT) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
-Standard_Real PI     = 3.14159265358979324;
-Standard_Real PI180  = 0.017453292519943296;
-
-Standard_Real Standard_PI     = 3.14159265358979324;
-Standard_Real Standard_PI180  = 0.017453292519943296;
-#else
-const Standard_Real PI     = 3.14159265358979324;
-const Standard_Real PI180  = 0.017453292519943296;
-
-const Standard_Real Standard_PI     = 3.14159265358979324;
-const Standard_Real Standard_PI180  = 0.017453292519943296;
-#endif
-
 Handle_Standard_Type& Standard_Real_Type_() 
 {
   static Handle_Standard_Type _aType = 
@@ -93,7 +79,7 @@ Standard_Real ACosApprox (const Standard_Real Value)
     XX = 1.+Value;
     if (XX < RealSmall())
       return 0.;
-    return PI - apx_for_ACosApprox(XX);
+    return M_PI - apx_for_ACosApprox(XX);
   }
   XX = 1.-Value;
   if (XX < RealSmall())
@@ -106,7 +92,7 @@ Standard_Real ACosApprox (const Standard_Real Value)
 //   if (xp < RealSmall() || xn < RealSmall())
 //     return 0.;
 //   if (Value < 0.)
-//     return PI - apx_for_ACosApprox (xn);
+//     return M_PI - apx_for_ACosApprox (xn);
 //   return apx_for_ACosApprox (xp);
 }
 
index 5e86efa4ff3929938864eff67362df0617e8072e..cbda7ec408bbcf4d544e863fbfe18f364450f436 100755 (executable)
@@ -19,24 +19,6 @@ class Handle_Standard_Type;
 
 __Standard_API Handle_Standard_Type& Standard_Real_Type_();
 
-//==== In this version "PI" is a global variables.
-#ifdef PI
-#undef PI
-#endif 
-
-#if defined(WNT) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
-extern "C" __Standard_API Standard_Real PI;
-extern "C" __Standard_API Standard_Real PI180;
-extern "C" __Standard_API Standard_Real Standard_PI;
-extern "C" __Standard_API Standard_Real Standard_PI180;
-#else
-
-extern const Standard_Real PI;
-extern const Standard_Real PI180;
-
-extern const Standard_Real Standard_PI;
-extern const Standard_Real Standard_PI180;
-#endif  /* WNT */
 // ===============================================
 // Methods from Standard_Entity class which are redefined:  
 //    - Hascode
index ba1629d8770b6fdd6a4ab98aa03efc78e03f4d34..b44dd261b8be5eb44c741a46339435746c6574e1 100755 (executable)
@@ -29,9 +29,21 @@ __Standard_API double __cdecl acosh ( double );
 __Standard_API double __cdecl asinh ( double );
 __Standard_API double __cdecl atanh ( double );
 
-# define M_SQRT1_2  7.0710678118654752440E-1
+# ifdef M_SQRT1_2
+#  undef M_SQRT1_2
+# endif
+# define M_SQRT1_2  0.707106781186547524401
+
+# ifdef M_PI_2
+#  undef M_PI_2
+# endif 
 # define M_PI_2     1.57079632679489661923
 
+# ifdef M_PI
+#  undef M_PI
+# endif
+# define M_PI       3.14159265358979323846
+
 # endif  /* __MATH_WNT_H */
 
 #endif  /* WNT */
index 520fcf2a9239697e59642ea9ab4ddf2ad07d1a82..54fd5df33a3382cfceff64143f46c717c8286b35 100755 (executable)
@@ -689,7 +689,7 @@ Standard_Boolean StdSelect_BRepSelectionTool
         }
         case GeomAbs_Circle:
         {
-          if (2 * PI - Abs (wl - wf) <= Precision::Confusion())
+          if (2 * M_PI - Abs (wl - wf) <= Precision::Confusion())
           {
             if (BS.GetType() == GeomAbs_Cylinder ||
                 BS.GetType() == GeomAbs_Torus ||
index d4ab62ae68c1a467a4464f6d15108698b58d2ada..7cba36bf88b0928b2164c2ad581eeb867173183c 100755 (executable)
@@ -44,7 +44,7 @@ Standard_Boolean StepToGeom_MakeSurfaceOfRevolution::Convert (const Handle(StepG
             //change parametrization for trimming
             gp_Ax2 axnew(pc,norm,dirline.Reversed());
             conic->SetPosition(axnew);
-            C = new Geom_TrimmedCurve(conic, 0., PI);
+            C = new Geom_TrimmedCurve(conic, 0., M_PI);
           }
         }
       }
index edc831e6844c4711f239196eb9af69d8857fc6c0..0a7b6b45b753e73f72e2c0f4c110ed0700d1c4c6 100755 (executable)
@@ -185,12 +185,12 @@ Standard_Boolean StepToGeom_MakeTrimmedCurve::Convert (const Handle(StepGeom_Tri
   }
   else if (theSTEPCurve->IsKind(STANDARD_TYPE(StepGeom_Circle)) ||
            theSTEPCurve->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) {
-//    if (trim1 > 2.1*PI || trim2 > 2.1*PI) fact = PI / 180.;
+//    if (trim1 > 2.1*M_PI || trim2 > 2.1*M_PI) fact = M_PI / 180.;
     fact = UnitsMethods::PlaneAngleFactor();
     //:p3 abv 23 Feb 99: shift on pi/2 on ellipse with R1 < R2
     const Handle(StepGeom_Ellipse) ellipse = Handle(StepGeom_Ellipse)::DownCast(theSTEPCurve);
     if ( !ellipse.IsNull() && ellipse->SemiAxis1() - ellipse->SemiAxis2() < 0. )
-      shift = 0.5 * PI;
+      shift = 0.5 * M_PI;
 
     // skl 04.02.2002 for OCC133: we can not make TrimmedCurve if
     // there is no X-direction in StepGeom_Axis2Placement3d
@@ -207,9 +207,9 @@ Standard_Boolean StepToGeom_MakeTrimmedCurve::Convert (const Handle(StepGeom_Tri
             MasterRep =1;
           else {
             if ( SC->SenseAgreement() ) 
-              CC = new Geom_TrimmedCurve(theCurve, 0., 2.*PI, Standard_True);
+              CC = new Geom_TrimmedCurve(theCurve, 0., 2.*M_PI, Standard_True);
             else 
-              CC = new Geom_TrimmedCurve(theCurve, 2.*PI, 0., Standard_False);
+              CC = new Geom_TrimmedCurve(theCurve, 2.*M_PI, 0., Standard_False);
             return Standard_True;
           }
         }
index 8fd3af5b70c378e148d433f42af643ae77331f46..51e4bbe1809b29cb9a2008630f13ef8b1e36f1d6 100755 (executable)
@@ -62,12 +62,12 @@ Standard_Boolean StepToGeom_MakeTrimmedCurve2d::Convert (const Handle(StepGeom_T
     }
     else if (BasisCurve->IsKind(STANDARD_TYPE(StepGeom_Circle)) ||
              BasisCurve->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) {
-//      if (u1 > 2.1*PI || u2 > 2.1*PI) fact = PI / 180.;
+//      if (u1 > 2.1*M_PI || u2 > 2.1*M_PI) fact = M_PI / 180.;
       fact = UnitsMethods::PlaneAngleFactor();
       //:p3 abv 23 Feb 99: shift on pi/2 on ellipse with R1 < R2
       const Handle(StepGeom_Ellipse) ellipse = Handle(StepGeom_Ellipse)::DownCast(BasisCurve);
       if ( !ellipse.IsNull() && ellipse->SemiAxis1() - ellipse->SemiAxis2() < 0. )
-        shift = 0.5 * PI;
+        shift = 0.5 * M_PI;
     }
     else if (BasisCurve->IsKind(STANDARD_TYPE(StepGeom_Parabola)) ||
              BasisCurve->IsKind(STANDARD_TYPE(StepGeom_Hyperbola))) {
index b974b66d1dda14ec00153cc38c40a226a9f2cbde..92d503abc2ac4d334b76bb04cf155bbbb136f55f 100755 (executable)
@@ -160,7 +160,7 @@ void StlTransfer::BuildIncrementalMesh (const TopoDS_Shape&  Shape,
        //      vec.Transform(loc);
        if (modul1>Precision::Confusion () && modul2>Precision::Confusion ()) {
          Standard_Real an = vec.Angle(average);
-         if ( an > PI/2)  {
+         if ( an > M_PI/2)  {
            A = V3;B=V2;C=V1;
          }
          else {
index 031bcacda15fdc832dd3f536050c55adb59f6e38..a46397b7aeca90d86fe5991758307a176f31e841 100755 (executable)
@@ -1113,10 +1113,10 @@ static Standard_Integer OneShapeIsHalfSpace(const TopoDS_Shape& S1,const TopoDS_
              Standard_Real maxU = FSurf.LastUParameter();
              Standard_Real minV = FSurf.FirstVParameter();
              Standard_Real maxV = FSurf.LastVParameter();
-             Standard_Boolean yesU = ( Abs(minU - 0.) < 1.e-9 && Abs(maxU - 2*PI) < 1.e-9 );
+             Standard_Boolean yesU = ( Abs(minU - 0.) < 1.e-9 && Abs(maxU - 2*M_PI) < 1.e-9 );
              Standard_Boolean yesV = ( FSurf.GetType() == GeomAbs_Sphere ) ?
-               ( Abs(minV - (-PI/2.)) < 1.e-9 && Abs(maxV - PI/2.) < 1.e-9 ) :
-               ( Abs(minV - 0.) < 1.e-9 && Abs(maxV - 2*PI) < 1.e-9 );
+               ( Abs(minV - (-M_PI/2.)) < 1.e-9 && Abs(maxV - M_PI/2.) < 1.e-9 ) :
+               ( Abs(minV - 0.) < 1.e-9 && Abs(maxV - 2*M_PI) < 1.e-9 );
              SolidIsSphereOrTorus = ( yesU && yesV );
            }
 
@@ -1125,8 +1125,8 @@ static Standard_Integer OneShapeIsHalfSpace(const TopoDS_Shape& S1,const TopoDS_
              Standard_Boolean areBothPeriodic = ( FSurf.IsUPeriodic() && FSurf.IsVPeriodic() );
              if( areBothPeriodic )
                {
-                 Standard_Boolean yesU = ( Abs(FSurf.UPeriod() - PI) < 1.e-9 || Abs(FSurf.UPeriod() - 2*PI) < 1.e-9 );
-                 Standard_Boolean yesV = ( Abs(FSurf.VPeriod() - PI) < 1.e-9 || Abs(FSurf.VPeriod() - 2*PI) < 1.e-9 );
+                 Standard_Boolean yesU = ( Abs(FSurf.UPeriod() - M_PI) < 1.e-9 || Abs(FSurf.UPeriod() - 2*M_PI) < 1.e-9 );
+                 Standard_Boolean yesV = ( Abs(FSurf.VPeriod() - M_PI) < 1.e-9 || Abs(FSurf.VPeriod() - 2*M_PI) < 1.e-9 );
                  SolidIsSphereOrTorus = ( yesU && yesV );
                }
            }
index 8fe8db88cfc694db74e906a0be6aea52b4194374..3f9b583f77def49b63cbdae34244a221066ed0d9 100755 (executable)
@@ -168,19 +168,19 @@ static Standard_Real FUN_getpar(const gp_Dir& a, const gp_Dir& x, const gp_Dir&
   Standard_Boolean x1null = (Abs(x1) <= tol);
   Standard_Boolean x2null = (Abs(x2) <= tol);
 
-  if      (x1null) par = (x2 > 0.) ? 3.*PI*.5 : PI*.5;
-  else if (x2null) par = (x1 > 0.) ? 2.*PI    : PI;
+  if      (x1null) par = (x2 > 0.) ? 3.*M_PI*.5 : M_PI*.5;
+  else if (x2null) par = (x1 > 0.) ? 2.*M_PI    : M_PI;
   else {
     Standard_Real ac = ACos(Abs(x1));
     Standard_Boolean x1pos = (x1 > tol);
     Standard_Boolean x2pos = (x2 > tol);
-    if (x1pos && x2pos)   par = 2.*PI-ac;
+    if (x1pos && x2pos)   par = 2.*M_PI-ac;
     if (x1pos && !x2pos)  par = ac;
-    if (!x1pos && x2pos)  par = PI+ac;
-    if (!x1pos && !x2pos) par = PI-ac;
+    if (!x1pos && x2pos)  par = M_PI+ac;
+    if (!x1pos && !x2pos) par = M_PI-ac;
   }
 
-  if (complement) par = 2.*PI - par;
+  if (complement) par = 2.*M_PI - par;
   return par;
 }
 
@@ -418,9 +418,9 @@ static Standard_Boolean FUN_0or2PI(Standard_Real& paronEd, const Standard_Boolea
 {
   Standard_Real tol = Precision::Parametric(Precision::Confusion());
   Standard_Boolean extre = (Abs(paronEd) < tol);
-  extre = extre && (Abs(2.*PI-paronEd) < tol);
+  extre = extre && (Abs(2.*M_PI-paronEd) < tol);
   if (!extre) return Standard_False;
-  paronEd = (inout) ? 2.*PI : 0.;
+  paronEd = (inout) ? 2.*M_PI : 0.;
   return Standard_True;
 }
 
@@ -501,7 +501,7 @@ static Standard_Integer FUN_parondgEINFi(const TopOpeBRep_VPointInter& VP,
 
   Standard_Real par = FUN_getpar(a,x,y,complement);
   par1OnEd = par;
-  par2OnEd = (par > PI) ? par-PI : par+PI;
+  par2OnEd = (par > M_PI) ? par-M_PI : par+M_PI;
 
   // kpart Ec on Fi :
   Standard_Boolean changedpar1 = FUN_0or2PI(par1OnEd,T1inout);
index aca1bcadaed629580be17674c856daf770c333a7..1059e2623b3efb2347d5603c3d89f9163829665e 100755 (executable)
@@ -1814,10 +1814,10 @@ Standard_Integer TopOpeBRepBuild_Builder1::IsSame2d (const TopTools_SequenceOfSh
 
   Standard_Boolean IsTrFirst = Standard_True;
   if(parOri < f ) { 
-    parOri = 2*PI +  parOri;
+    parOri = 2*M_PI +  parOri;
   }
   if(parOri > l ) {
-    parOri = parOri - 2*PI;
+    parOri = parOri - 2*M_PI;
   }
 
   gp_Pnt2d aUV2; 
index 5defc9eb9b008a5391a7b2f7bc4fe1de6660478e..f2f348a3316a0bbeaaa586ae00727f00978e24b9 100755 (executable)
@@ -1548,12 +1548,12 @@ void TopOpeBRepBuild_BuilderON::GFillONPartsWES2(const Handle(TopOpeBRepDS_Inter
          if (!ok2) return;
          
          Standard_Real sum = matfs+matfor;
-         Standard_Boolean sumisPI = (Abs(sum-PI) < tola1);
-         Standard_Boolean fsinfPI  = (matfs < PI);
-         Standard_Boolean forinfPI = (matfor < PI);
+         Standard_Boolean sumisPI = (Abs(sum-M_PI) < tola1);
+         Standard_Boolean fsinfPI  = (matfs < M_PI);
+         Standard_Boolean forinfPI = (matfor < M_PI);
          if      (sumisPI)  b = Standard_False;
-         else if (sum < PI) b = Standard_True;
-         else { //sum > PI
+         else if (sum < M_PI) b = Standard_True;
+         else { //sum > M_PI
            if (fsinfPI && forinfPI) b = Standard_False;
            else { // (!fsinfPI) || (!forinfPI)
              Standard_Boolean sammat = (Abs(matfs-matfor)<tola1);
index e537ca8e787dd7a9889446fac46f9e3a902c0dfe..955da016b374c4c64b1ac7fbba3b3704995c2060 100755 (executable)
     Standard_Boolean nonPV = (fabs(V) < 1e-7) ? Standard_True : Standard_False;
 
     if(!nonPU && UP) {
-      Standard_Real dU = fmod(fabs(U), 2*PI);
-      nonPU = (dU > 1e-7 && (2*PI - dU > 1e-7)) ? Standard_True : Standard_False;
+      Standard_Real dU = fmod(fabs(U), 2*M_PI);
+      nonPU = (dU > 1e-7 && (2*M_PI - dU > 1e-7)) ? Standard_True : Standard_False;
     }
     
     if(!nonPV && VP) {
-      Standard_Real dV = fmod(fabs(V), 2*PI);
-      nonPV = (dV > 1e-7 && (2*PI - dV > 1e-7)) ? Standard_True : Standard_False;
+      Standard_Real dV = fmod(fabs(V), 2*M_PI);
+      nonPV = (dV > 1e-7 && (2*M_PI - dV > 1e-7)) ? Standard_True : Standard_False;
     }
 
-//    printf("(fmod(fabs(U), 2*PI) =%lf\n", (fmod(fabs(U), 2*PI)));
-//    printf(" (fmod(fabs(V), 2*PI) > 1e-7)=%lf\n", (fmod(fabs(V), 2*PI)));
+//    printf("(fmod(fabs(U), 2*M_PI) =%lf\n", (fmod(fabs(U), 2*M_PI)));
+//    printf(" (fmod(fabs(V), 2*M_PI) > 1e-7)=%lf\n", (fmod(fabs(V), 2*M_PI)));
     
     if(nonPU && nonPV && !BRep_Tool::Degenerated(anEdge))
       return 1;
   Standard_Integer b, k;
   gp_Vec2d aTrV;
 
-  TwoPI=2.*PI;
+  TwoPI=2.*M_PI;
 
   BndBoxWire(anOuterWire, B2dOuterWire);
   B2dOuterWire.Get(OuterU1,OuterV1,OuterU2,OuterV2);
index ae3888810def39d1b14cf117087148970d79e399..f8bd81f52300e28b52bd9a3cd9880c464fc05c2f 100755 (executable)
@@ -908,14 +908,14 @@ Handle(Geom2d_Curve) TopOpeBRepTool_CurveTool::MakePCurveOnFace
       Handle(Geom2d_Curve) PCT = Handle(Geom2d_Curve)::DownCast(C2D->Copy());
       // make mirror relative to the isoline of apex -PI/2 or PI/2
       gp_Trsf2d aTrsf;
-      gp_Pnt2d po(0,-PI/2);
-      if (maxcond) po.SetY(PI/2);
+      gp_Pnt2d po(0,-M_PI/2);
+      if (maxcond) po.SetY(M_PI/2);
       aTrsf.SetMirror(gp_Ax2d(po, gp_Dir2d(1,0)));
       PCT->Transform(aTrsf);
       // add translation along U direction on PI
-      gp_Vec2d vec(PI,0);
+      gp_Vec2d vec(M_PI,0);
       Standard_Real UFirst = BAS.FirstUParameter();
-      if (u2-UFirst-PI > -1e-7) vec.Reverse();
+      if (u2-UFirst-M_PI > -1e-7) vec.Reverse();
       PCT->Translate(vec);
       C2D = PCT;
       // recompute the test point
index 02298d67888c3cf6824e0ca6aea7cb38e2b6ba85..d7d52784559602c38784668cc9673263af500e95 100755 (executable)
@@ -78,7 +78,7 @@ Standard_EXPORT Standard_Boolean FUN_tool_onapex(const gp_Pnt2d& p2d,const Handl
     isapex = (dist < tol);
   }
   if (ST == GeomAbs_Sphere) {
-    Standard_Real pisur2 = PI*.5;
+    Standard_Real pisur2 = M_PI*.5;
 #ifdef DEB
     Standard_Real u =
 #endif
@@ -134,8 +134,8 @@ Standard_EXPORT gp_Dir FUN_tool_ngS(const gp_Pnt2d& p2d,const Handle(Geom_Surfac
       }
     }
     if (ST == GeomAbs_Sphere) {
-//      Standard_Real deuxpi = 2*PI;
-      Standard_Real pisur2 = PI*.5;
+//      Standard_Real deuxpi = 2*M_PI;
+      Standard_Real pisur2 = M_PI*.5;
       Standard_Real u = p2d.X(),v = p2d.Y();
 //      Standard_Boolean u0  =(Abs(u) < toluv);
 //      Standard_Boolean u2pi=(Abs(u-deuxpi) < toluv);
index 13fa5083ba41f91b9030378ce89652f74d79f9b9..ca817bc2896052facddaf22edca3577e886461a9 100755 (executable)
@@ -315,7 +315,7 @@ Standard_Boolean TopOpeBRepTool::PurgeClosingEdges(const TopoDS_Face& Fin, const
   Standard_Boolean uviso = FUN_tool_IsUViso(PC,isuiso,isviso,d2d,O2d);
   if (!uviso) return Standard_False;
 
-  Standard_Real period = 2*PI;
+  Standard_Real period = 2*M_PI;
   Standard_Real piso = isuiso? O2d.X(): O2d.Y();
   Standard_Real tol2d = 1.e-6;
   Standard_Boolean is0   = Abs(piso) < tol2d;
index 9502935aaf1caa2b2a8d838ac146784118a55786..9328d5724e030c6cfc16ef395ff72421e3b2a006 100755 (executable)
@@ -542,7 +542,7 @@ Standard_Boolean TopOpeBRepTool_REGUW::NearestE(const TopTools_ListOfShape& loe,
   if (M_REVERSED(efound.Orientation())) tg2dfound.Reverse();
   Standard_Real angfound = 1.e7;
   if (iStep == 1) angfound = TopOpeBRepTool_TOOL::Matter(mytg2d,tg2dfound);
-  else            angfound = 2.*PI - TopOpeBRepTool_TOOL::Matter(tg2dfound,mytg2d);
+  else            angfound = 2.*M_PI - TopOpeBRepTool_TOOL::Matter(tg2dfound,mytg2d);
 #ifdef DEB
   if (trc) cout<<"ang(e"<<FUN_adds(myed)<<",e"<<FUN_adds(efound)<<")="<<angfound<<endl;
 #endif
@@ -564,7 +564,7 @@ Standard_Boolean TopOpeBRepTool_REGUW::NearestE(const TopTools_ListOfShape& loe,
     
     Standard_Real angi = 1.e7;
     if (iStep == 1) angi = TopOpeBRepTool_TOOL::Matter(mytg2d,tg2di);
-    else            angi = 2.*PI - TopOpeBRepTool_TOOL::Matter(tg2di,mytg2d);
+    else            angi = 2.*M_PI - TopOpeBRepTool_TOOL::Matter(tg2di,mytg2d);
     Standard_Boolean eq = Abs(angi-angfound) < tola;
 #ifdef DEB
     if (trc) cout<<"ang(e"<<FUN_adds(myed)<<",e"<<FUN_adds(ei)<<")="<<angi<<endl;
index 4d484c5e1da72a3e864778e6ff5665a7afcc2644..c64236ab53a989ace35cd7513184ff630efe9585 100755 (executable)
@@ -1038,11 +1038,11 @@ Standard_Real TopOpeBRepTool_TOOL::Matter(const gp_Vec& d1, const gp_Vec& dR2, c
   Standard_Real ang = d1.Angle(d2);
   Standard_Boolean equal = (ang < tola);
   if (equal) return 0.;
-  Standard_Boolean oppo = ((PI-ang) < tola);
-  if (oppo)  return PI;
+  Standard_Boolean oppo = ((M_PI-ang) < tola);
+  if (oppo)  return M_PI;
 
   ang = d1.AngleWithRef(d2,Ref);
-  if (ang < 0) ang = 2.*PI+ang;    
+  if (ang < 0) ang = 2.*M_PI+ang;    
   return ang;
 }
 
@@ -1099,7 +1099,7 @@ Standard_Boolean TopOpeBRepTool_TOOL::Matter(const gp_Dir& xx1,const gp_Dir& nt1
   z1.Reverse();
   ang = xx1.AngleWithRef(xx2,z1);
   if (Abs(ang) < tola) {ang = 0.; return Standard_True;}
-  if (ang < 0) ang = 2.*PI+ang; 
+  if (ang < 0) ang = 2.*M_PI+ang; 
   
   return Standard_True;
 }
@@ -1264,7 +1264,7 @@ static Standard_Boolean FUN_ngF(const gp_Pnt2d& uv, const TopoDS_Face& F, gp_Vec
       }
     }
     if (ST == GeomAbs_Sphere) {
-      Standard_Real pisur2 = PI*.5;
+      Standard_Real pisur2 = M_PI*.5;
       Standard_Real u = uv.X(),v = uv.Y();
       Standard_Boolean vpisur2 = (Abs(v-pisur2) < tolv);
       Standard_Boolean vmoinspisur2 = (Abs(v+pisur2) < tolv);
@@ -1357,7 +1357,7 @@ Standard_Boolean TopOpeBRepTool_TOOL::MatterKPtg(const TopoDS_Face& f1,const Top
 
   gp_Dir v12(gp_Vec(pf1,pf2));
   Standard_Real dot = v12.Dot(nt1);
-  ang = (dot < 0.) ? 0. : 2.*PI;
+  ang = (dot < 0.) ? 0. : 2.*M_PI;
 
 //  gp_Dir nt1; ok1 = TopOpeBRepTool_TOOL::Nt(uv1,f1,nt1);
 //  if (!ok1) return Standard_False;
@@ -1371,8 +1371,8 @@ Standard_Boolean TopOpeBRepTool_TOOL::MatterKPtg(const TopoDS_Face& f1,const Top
 //  if (!ok2) return Standard_False;  
 //  Standard_Real angapp; Standard_Boolean ok = TopOpeBRepTool_TOOL::Matter(xx1,nt1, xx2,nt2,tola,angapp);
 //  if (!ok) return Standard_False;
-//  Standard_Boolean is0 = (Abs(angapp) < Abs(2.*PI-angapp));
-//  ang = is0 ? 0. : 2.*PI;
+//  Standard_Boolean is0 = (Abs(angapp) < Abs(2.*M_PI-angapp));
+//  ang = is0 ? 0. : 2.*M_PI;
   return Standard_True;
 }
 
index 56e7ae07800a945f5c440a9c64766e7791a7503f..1df0d0c34ba489bcb4ab5d3baf44ea444b96dc40 100755 (executable)
@@ -193,7 +193,7 @@ static Standard_Boolean FUN_MkTonE(const gp_Vec& faxis, const gp_Vec& dirINcle,
   Standard_Real ang = 1.e7;
   if (isONi) {
     Standard_Real dot = dirINcle.Dot(tgi);
-    ang = (dot > 0) ? 0 : PI;
+    ang = (dot > 0) ? 0 : M_PI;
 //    outin = (ang > 0); -xpu190499
     outin = Standard_True;
   }
@@ -205,7 +205,7 @@ static Standard_Boolean FUN_MkTonE(const gp_Vec& faxis, const gp_Vec& dirINcle,
     else          outin = (dot < 0);
   }//!isONi
 
-  Standard_Real Cang = (ang > PI) ? ang-PI : ang+PI;
+  Standard_Real Cang = (ang > M_PI) ? ang-M_PI : ang+M_PI;
   par1 = outin ? ang : Cang;
   par2 = outin ? Cang : ang;
   return Standard_True;
index 7ec630ff2b1c5342edbae5457f70fe11f469f7d9..39d5fa4f56cc8b91f80719d4c0e4e36f0e8ad57f 100755 (executable)
@@ -223,7 +223,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
       
       // convert basis curve to bspline in order to avoid self-intersecting
       // surface of revolution (necessary e.g. for CATIA)
-      if ( VL - VF - 2 * PI < -Precision::PConfusion() ) 
+      if ( VL - VF - 2 * M_PI < -Precision::PConfusion() ) 
        BasisCurve = ShapeAlgo::AlgoContainer()->ConvertCurveToBSpline (BasisCurve, VF, VL, Precision::Approximation(),
                                                                        GeomAbs_C1, 100, 9);
 //     BasisCurve = new Geom_TrimmedCurve ( BasisCurve, VF, VL );
index 802cff2b0e057068f234642de9ae089dbfcb4657..d143d6f493ae3be5da79ff135f462c1023cbe1a0 100755 (executable)
@@ -214,7 +214,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder::
 /* //:j1 abv 22 Oct 98: radians are used in the produced STEP file (at least by default)
    if(C->IsKind(STANDARD_TYPE(Geom_Circle)) ||
        C->IsKind(STANDARD_TYPE(Geom_Ellipse))) {
-      Standard_Real fact = 180. / PI;
+      Standard_Real fact = 180. / M_PI;
       trim1 = trim1 * fact;
       trim2 = trim2 * fact;
     }
index c44ec492035b1f6479e56141838759f873f705a2..4132b0daa24737e3318ad2e12c5e693915cff402 100755 (executable)
@@ -89,7 +89,7 @@ void V2d_CircularGraphicGrid::Draw(const Handle(Graphic2d_Drawer)& aDrawer){
       DrawCircle(aDrawer,xc,yc,s,Standard_False);
       s+=ds;
     }
-    Standard_Real a = Standard_PI / Standard_Real(Division);
+    Standard_Real a = M_PI / Standard_Real(Division);
     for (Standard_Integer j=1; j<= Division; j++) {
      aDrawer->MapInfiniteLineFromTo(OX,OY ,
         Standard_ShortReal(Cos(angle+Standard_Real(j)*a)),
@@ -124,16 +124,16 @@ void V2d_CircularGraphicGrid::DrawCircle
     if(myRadius > Def) 
       val = Max( 0.0044 , Min (0.7854 , 2. * ACos(1.-Def/myRadius)));
     else
-      val = 0.7854;  // = Standard_PI/4.
+      val = 0.7854;  // = PI / 4.
     Standard_Integer nbpoints;
     if(DrawPoints) {
       nbpoints = Division *2;
     }
     else {
-      nbpoints = Standard_Integer(Abs(2*Standard_PI)/val) +2;
+      nbpoints = Standard_Integer(Abs (2 * M_PI) / val) + 2;
     }
       
-    Standard_ShortReal teta = Standard_ShortReal(Abs(2*Standard_PI) /nbpoints);
+    Standard_ShortReal teta = Standard_ShortReal(Abs(2 * M_PI) / nbpoints);
     Standard_ShortReal x1 = myRadius;
     Standard_ShortReal y1 = 0;
     Standard_ShortReal x2,y2,x3,y3;
index 3af5b2dadac10cd04b5986a14086523991c1318d..b2100d8cf55bf06ee1c7de14636c4bae4c7434e7 100755 (executable)
@@ -61,12 +61,12 @@ void V2d_RectangularGrid::UpdateDisplay()
   myGraphicObject->RemovePrimitives();
   myGrid = new V2d_RectangularGraphicGrid
     (myGraphicObject,
-     XStep(),YStep(),FirstAngle()+RotationAngle(),SecondAngle()+RotationAngle()+Standard_PI/2.,XOrigin(),YOrigin(),myColorIndex2);
+     XStep(),YStep(),FirstAngle()+RotationAngle(),SecondAngle()+RotationAngle() + M_PI / 2.,XOrigin(),YOrigin(),myColorIndex2);
   myGrid->SetColorIndex(myColorIndex1);
   myGrid->SetDrawMode(DrawMode());
 #ifndef BUC60639        //See V2d_RectangularGraphicGrid
   Handle(Graphic2d_Marker) MK1 = new Graphic2d_Marker(myGraphicObject,14,XOrigin(),YOrigin(),0.01,0.01,FirstAngle()+RotationAngle());
-  Handle(Graphic2d_Marker) MK2 = new Graphic2d_Marker(myGraphicObject,14,XOrigin(),YOrigin(),0.01,0.01,SecondAngle()+RotationAngle()+Standard_PI/2.);
+  Handle(Graphic2d_Marker) MK2 = new Graphic2d_Marker(myGraphicObject,14,XOrigin(),YOrigin(),0.01,0.01,SecondAngle()+RotationAngle() + M_PI / 2.);
   MK1->SetColorIndex(myColorIndex2);
   MK2->SetColorIndex(myColorIndex2);
 #endif
index 200cbaf77d08ad2002400431d9042ecd2676bba8..48f6078d40a393ce7d170922cabe6272b088ad38 100755 (executable)
@@ -159,8 +159,8 @@ Graphic3d_Array1OfVertex V2(1,2);
 
         for (i = 1 ; i <= NbPoints ; i++) {
 
-            cosinus = Cos ( 2 * Standard_PI / NbPoints * (i-1) );   
-            sinus = Sin ( 2 * Standard_PI / NbPoints * (i-1) );
+            cosinus = Cos ( 2 * M_PI / NbPoints * (i-1) );   
+            sinus = Sin ( 2 * M_PI / NbPoints * (i-1) );
 
             X = Xc + (cosinus * Xi + sinus * Xj) * Lng * Tg;
             Y = Yc + (cosinus * Yi + sinus * Yj) * Lng * Tg;
@@ -180,7 +180,7 @@ void V3d::CircleInPlane(const Handle(Graphic3d_Group)& gcircle,const Standard_Re
 Standard_Real VX,VY,VZ,X,Y,Z,Xn,Yn,Zn,Xi,Yi,Zi,Xj,Yj,Zj,Norme;
 Standard_Integer NFACES = 30 , i;
 Standard_Real Alpha = 0. ;
-Standard_Real Dalpha = 2.*Standard_PI/NFACES ;
+Standard_Real Dalpha = 2. * M_PI / NFACES ;
 Graphic3d_Array1OfVertex Points(0,NFACES);
 
       Norme = Sqrt ( DX*DX + DY*DY + DZ*DZ );
@@ -239,8 +239,8 @@ void V3d::DrawSphere(const Handle(V3d_Viewer)& aViewer,const Quantity_Length ray
   Standard_Real R,X,Y,Z ;
   Standard_Real Beta = 0. ;
   Standard_Real Alpha = 0. ;
-  Standard_Real Dbeta = 2.*Standard_PI/NFACES ;
-  Standard_Real Dalpha = 2.*Standard_PI/NFACES ;
+  Standard_Real Dbeta = 2. * M_PI / NFACES ;
+  Standard_Real Dalpha = 2. * M_PI / NFACES ;
   Standard_Integer i,j ;
   for( j=0 ; j<NFACES/2 ; j++ ) {
     Alpha = 0. ;
index 2892b591565a49c71215014501ef04c8a24c08a6..f5619c653aed480d32a8bd3a0689245d990b0525 100755 (executable)
@@ -48,7 +48,7 @@
 #include <Aspect_Window.hxx>
 
 //-Declarations
-#define DEUXPI (2.*Standard_PI)
+#define DEUXPI (2. * M_PI)
 
 //-Constructors
 
@@ -87,7 +87,7 @@ void V3d_Camera::SetAngle(const Standard_Real Angle) {
 
 void V3d_Camera::SetAperture(const Standard_Real Angle) {
 
-  Viewer_BadValue_Raise_if( Angle <= 0. || Angle >= Standard_PI ,"V3d_Camera::SetAperture, bad angle");
+  Viewer_BadValue_Raise_if( Angle <= 0. || Angle >= M_PI ,"V3d_Camera::SetAperture, bad angle");
   MyAperture = Angle ;
 }
 
@@ -200,7 +200,7 @@ void V3d_Camera::Symbol (const Handle(Graphic3d_Group)& gsymbol,
   Standard_Real Xc1,Yc1,Zc1,Xc2,Yc2,Zc2,Xi,Yi,Zi,Xj,Yj,Zj;
   Standard_Real Xn,Yn,Zn,X,Y,Z,Norme;
   Standard_Real cosinus,sinus;
-  Standard_Real Alpha = Standard_PI/4.;
+  Standard_Real Alpha = M_PI / 4.;
   Standard_Integer NbPoints = 4, i;
   Graphic3d_Array1OfVertex VN1(1,NbPoints+1);
   Graphic3d_Array1OfVertex VN2(1,NbPoints+1);
@@ -236,8 +236,8 @@ void V3d_Camera::Symbol (const Handle(Graphic3d_Group)& gsymbol,
 //      Scheme of the case
   for (i = 1 ; i <= NbPoints ; i++) {
 
-    cosinus = Cos ( Alpha + (i - 1) *  Standard_PI/2. );   
-    sinus   = Sin ( Alpha + (i - 1) *  Standard_PI/2. );   
+    cosinus = Cos ( Alpha + (i - 1) *  M_PI / 2. );   
+    sinus   = Sin ( Alpha + (i - 1) *  M_PI/2. );   
     
     //          First base square
     X = Xc1 + (cosinus * Xi + sinus * Xj) * Lng / 2.;
@@ -263,8 +263,8 @@ void V3d_Camera::Symbol (const Handle(Graphic3d_Group)& gsymbol,
 //      Scheme of the objective
   for (i = 1 ; i <= NbPoints ; i++) {
     
-    cosinus = Cos ( Alpha + (i - 1) *  Standard_PI/2. );   
-    sinus   = Sin ( Alpha + (i - 1) *  Standard_PI/2. );   
+    cosinus = Cos ( Alpha + (i - 1) *  M_PI / 2. );   
+    sinus   = Sin ( Alpha + (i - 1) *  M_PI / 2. );   
 
     //          Premier carre de base
     X = Xc2 + (cosinus * Xi + sinus * Xj) * Lng / 6.;
@@ -387,8 +387,8 @@ void V3d_Camera::Display( const Handle(V3d_View)& aView,
       gnopick->Polyline(PRadius);
       V3d::ArrowOfRadius(gExtArrow,X-(X-X0)/10.,
                         Y-(Y-Y0)/10.,
-                            Z-(Z-Z0)/10.,X-X0,Y-Y0,Z-Z0,Standard_PI/15.,Rayon/20.);
-      V3d::ArrowOfRadius(gIntArrow,X0,Y0,Z0,X0-X,Y0-Y,Z0-Z,Standard_PI/15.,
+                            Z-(Z-Z0)/10., X-X0, Y-Y0, Z-Z0, M_PI / 15., Rayon / 20.);
+      V3d::ArrowOfRadius(gIntArrow, X0, Y0, Z0, X0-X, Y0-Y, Z0-Z, M_PI / 15.,
                         Rayon/20.);
       TCollection_AsciiString ValOfRadius(Rayon);
       PText.SetCoord( (X0+X)/2., (Y0+Y)/2. , (Z0+Z)/2. );
@@ -643,7 +643,7 @@ void V3d_Camera::AerialPilot( const Handle(V3d_View)& aView,
   if ( Ypix != IPY ) {
     aView->Size(Width,Height);
     IHeight = aView->Convert(Height);
-    Beta  = ((IPY - Ypix)*Standard_PI)/(IHeight*2.);
+    Beta  = ((IPY - Ypix) * M_PI) / (IHeight * 2.);
     aView->Proj(VX,VY,VZ);
     aView->Up(DXH,DYH,DZH);
     A = VY*DZH - VZ*DYH;
@@ -676,7 +676,7 @@ void V3d_Camera::AerialPilot( const Handle(V3d_View)& aView,
 //      Find the rolling determined by Xpix 
   if ( Xpix != IPX ) {
     IWidth = aView->Convert(Width);
-    Beta  = ((IPX - Xpix)*Standard_PI)/(IWidth*2.);
+    Beta  = ((IPX - Xpix) * M_PI) / (IWidth * 2.);
     MyAngle = MyAngle + Beta;
   }
 }
@@ -706,7 +706,7 @@ void V3d_Camera::EarthPilot( const Handle(V3d_View)& aView,
   if ( Ypix != IPY ) {
     aView->Size(Width,Height);
     IHeight = aView->Convert(Height);
-    Beta  = ((IPY - Ypix)*Standard_PI)/(IHeight*2.);
+    Beta  = ((IPY - Ypix) * M_PI) / (IHeight * 2.);
     aView->Proj(VX,VY,VZ);
     aView->Up(DXH,DYH,DZH);
     A = VY*DZH - VZ*DYH;
@@ -739,7 +739,7 @@ void V3d_Camera::EarthPilot( const Handle(V3d_View)& aView,
 //      an axis // a vector above passing through the eye
   if ( Xpix != IPX ) {
     IWidth = aView->Convert(Width);
-    Beta  = ((IPX - Xpix)*Standard_PI)/(IWidth*2.);
+    Beta  = ((IPX - Xpix) * M_PI) / (IWidth * 2.);
     aView->Up(A,B,C);
     Dist = Sqrt( A*A + B*B + C*C);
     A = A/Dist; B = B/Dist; C = C/Dist;
index 9a272817a7a51346d50b12338b6fb9114e32f3ed..75428881810eb5b5067ce92cd172c1d1133a5f55 100755 (executable)
@@ -240,7 +240,7 @@ Handle(Graphic3d_AspectLine3d) LineAttrib = new Graphic3d_AspectLine3d ();
 Standard_Real r;
 Standard_Real aStep = RadiusStep ();
 Standard_Real aDivision = DivisionNumber ();
-Standard_Real alpha = Standard_PI / aDivision;
+Standard_Real alpha = M_PI / aDivision;
 
 Standard_Integer Division = (Standard_Integer )( (aDivision >= DIVISION ? aDivision : DIVISION));
 Graphic3d_Array1OfVertex Cercle (0, 2*Division);
@@ -302,7 +302,7 @@ Standard_Boolean MakeCercles = Standard_False;
                myGroup2->SetGroupPrimitivesAspect (LineAttrib);
 #endif
                myGroup2->BeginPrimitives ();
-                       alpha = Standard_PI / Division;
+                       alpha = M_PI / Division;
                        for (r=aStep; r<=myRadius; r+=aStep) {
                                for (i=0; i<=2*Division; i++) {
                                        xl = Cos (alpha*i)*r;
@@ -341,7 +341,7 @@ Handle(Graphic3d_AspectMarker3d) MarkerAttrib = new Graphic3d_AspectMarker3d ();
 Standard_Real r;
 Standard_Real aStep = RadiusStep ();
 Standard_Real aDivision = DivisionNumber ();
-Standard_Real alpha = Standard_PI / aDivision;
+Standard_Real alpha = M_PI / aDivision;
 
 Graphic3d_Array1OfVertex Cercle (0,(Standard_Integer )(2*aDivision));
 Standard_Real xl, yl, zl = myOffSet;
index 7b6d33f880f89e40b9f9d96fdf019a58337796d1..f1b3acda4dd14f3ee4df259be7b51c6b7c2c9ae9 100755 (executable)
@@ -147,7 +147,7 @@ void V3d_DirectionalLight::Symbol (const Handle(Graphic3d_Group)& gsymbol, const
 //  A sphere is drawn
   V3d::CircleInPlane(gsymbol,Xi,Yi,Zi,VX,VY,VZ,Rayon/40.);
   for( j=1 ; j<=3 ; j++ ) {
-    Beta = j * Standard_PI/4.;
+    Beta = j * M_PI / 4.;
     CosBeta = Cos(Beta);
     SinBeta = Sin(Beta);
     Coef = 1. - CosBeta;
@@ -178,7 +178,7 @@ void V3d_DirectionalLight::Symbol (const Handle(Graphic3d_Group)& gsymbol, const
   Line(0).SetCoord(Xi,Yi,Zi);
   Line(1).SetCoord(X,Y,Z);
   gsymbol->Polyline(Line);
-  V3d::ArrowOfRadius(gsymbol,X,Y,Z,DX,DY,DZ,Standard_PI/15.,Rayon/20.);
+  V3d::ArrowOfRadius(gsymbol, X, Y, Z, DX, DY, DZ, M_PI / 15., Rayon / 20.);
 }
 
 void V3d_DirectionalLight::Display( const Handle(V3d_View)& aView,
index 906b4b1901f2dae3af42da07f32f6c3be5d775ee..46adfbee6ac884d1a314da5c7436a8efd344251a 100755 (executable)
@@ -64,7 +64,7 @@ void V3d_PerspectiveView::SetAngle(const Standard_Real Angle) {
   
   Standard_Real focale,Umin,Vmin,Umax,Vmax,Dxv,Dyv,Rap,Xrp,Yrp;     
 
-  Viewer_BadValue_Raise_if ( Angle <= 0. || Angle >= Standard_PI, "V3d_PerspectiveView::SetAngle, bad angle");
+  Viewer_BadValue_Raise_if ( Angle <= 0. || Angle >= M_PI, "V3d_PerspectiveView::SetAngle, bad angle");
 
   MyViewMapping.WindowLimit(Umin,Vmin,Umax,Vmax) ;
   Dxv = Abs(Umax - Umin)/2. ; Dyv = Abs(Vmax - Vmin)/2.;
@@ -89,7 +89,7 @@ Standard_Real V3d_PerspectiveView::Angle()const  {
   
 //  Graphic3d_Vertex Prp ;
   Standard_Real focale,Umin,Vmin,Umax,Vmax,Dxv,Dyv ;     
-  Standard_Real angle = Standard_PI ;
+  Standard_Real angle = M_PI ;
   
   MyViewMapping.WindowLimit(Umin,Vmin,Umax,Vmax) ;
   focale = Focale() ;
@@ -111,7 +111,7 @@ void V3d_PerspectiveView::SetPerspective(const Standard_Real Angle, const Standa
   Standard_Real Umin,Vmin,Umax,Vmax,Xrp,Yrp,Zrp,du,dv;
 
   Viewer_BadValue_Raise_if ( ZNear <= 0. || ZFar <= 0. || ZNear >= ZFar, "V3d_PerspectiveView::SetPerspective, bad distances");
-  Viewer_BadValue_Raise_if ( Angle <= 0. || Angle >= Standard_PI, "V3d_PerspectiveView::SetAngle, bad angle");
+  Viewer_BadValue_Raise_if ( Angle <= 0. || Angle >= M_PI, "V3d_PerspectiveView::SetAngle, bad angle");
 
   Graphic3d_Vertex PRP = MyViewMapping.ProjectionReferencePoint() ;
   Xrp = Yrp = Zrp = 0.;
index 8100b839978831e702a67bbcfc2a38c68ad0011d..4187c9fe0cde4d6d304afb8004b44e52404ef4c4 100755 (executable)
@@ -217,8 +217,8 @@ void V3d_PositionLight::Display( const Handle(V3d_View)& aView,
                                gnopick->Polyline(PRadius);
                                V3d::ArrowOfRadius(gExtArrow,X-(X-X0)/10.,
                                 Y-(Y-Y0)/10.,
-                                Z-(Z-Z0)/10.,X-X0,Y-Y0,Z-Z0,PI/15.,Rayon/20.);
-                               V3d::ArrowOfRadius(gIntArrow,X0,Y0,Z0,X0-X,Y0-Y,Z0-Z,PI/15.,Rayon/20.);
+                                Z-(Z-Z0)/10.,X-X0,Y-Y0,Z-Z0,M_PI/15.,Rayon/20.);
+                               V3d::ArrowOfRadius(gIntArrow,X0,Y0,Z0,X0-X,Y0-Y,Z0-Z,M_PI/15.,Rayon/20.);
                                TCollection_AsciiString ValOfRadius(Rayon);
                                PText.SetCoord( (X0+X)/2., (Y0+Y)/2. , (Z0+Z)/2. );
                                gradius->Text(ValOfRadius.ToCString(),PText,0.01);
index fabfc17f3bc3b2bc8beb0cb61f1c7b5e780147ba..3c1394e5d73bb21d6080ea27889369adaef99e97 100755 (executable)
@@ -141,7 +141,7 @@ void V3d_PositionalLight::Symbol (const Handle(Graphic3d_Group)& gsymbol, const
 //  A sphere is drawn
   V3d::CircleInPlane(gsymbol,Xi,Yi,Zi,VX,VY,VZ,Rayon/40.);
   for( j=1 ; j<=3 ; j++ ) {
-    Beta = j * Standard_PI/4.;
+    Beta = j * M_PI / 4.;
     CosBeta = Cos(Beta);
     SinBeta = Sin(Beta);
     Coef = 1. - CosBeta;
@@ -253,8 +253,8 @@ void V3d_PositionalLight::Display( const Handle(V3d_View)& aView,
       gnopick->Polyline(PRadius);
       V3d::ArrowOfRadius(gExtArrow,X-(X-X0)/10.,
                         Y-(Y-Y0)/10.,
-                        Z-(Z-Z0)/10.,X-X0,Y-Y0,Z-Z0,Standard_PI/15.,Rayon/20.);
-      V3d::ArrowOfRadius(gIntArrow,X0,Y0,Z0,X0-X,Y0-Y,Z0-Z,Standard_PI/15.,Rayon/20.);
+                        Z-(Z-Z0) / 10., X-X0, Y-Y0, Z-Z0, M_PI / 15., Rayon / 20.);
+      V3d::ArrowOfRadius(gIntArrow, X0, Y0, Z0, X0-X, Y0-Y, Z0-Z, M_PI / 15., Rayon / 20.);
       TCollection_AsciiString ValOfRadius(Rayon);
       PText.SetCoord( (X0+X)/2., (Y0+Y)/2. , (Z0+Z)/2. );
       gradius->Text(ValOfRadius.ToCString(),PText,0.01);
index 72012131928c03c1524a2a8bd625172f5c7ba10c..e621fd430c994f92e2cb967491327db9116f4980 100755 (executable)
@@ -51,7 +51,7 @@
 V3d_SpotLight::V3d_SpotLight(const Handle(V3d_Viewer)& VM, const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const V3d_TypeOfOrientation Direction, const Quantity_NameOfColor Name, const Standard_Real A1, const Standard_Real A2, const Standard_Real CN, const Standard_Real AN):V3d_PositionLight(VM) {
 
   Viewer_BadValue_Raise_if( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1  
-                       || AN < 0. || AN > PI, "V3d_SpotLight, bad coefficient or angle");
+                       || AN < 0. || AN > M_PI, "V3d_SpotLight, bad coefficient or angle");
 
   Quantity_Color C(Name) ;
   Graphic3d_Vector D = V3d::GetProjAxis(Direction) ;
@@ -68,7 +68,7 @@ V3d_SpotLight::V3d_SpotLight(const Handle(V3d_Viewer)& VM, const Standard_Real X
 V3d_SpotLight::V3d_SpotLight(const Handle(V3d_Viewer)& VM, const Standard_Real Xt, const Standard_Real Yt, const Standard_Real Zt, const Standard_Real Xp, const Standard_Real Yp, const Standard_Real Zp, const Quantity_NameOfColor Name, const Standard_Real A1, const Standard_Real A2, const Standard_Real CN, const Standard_Real AN):V3d_PositionLight(VM) {
 
   Viewer_BadValue_Raise_if( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1  
-                       || AN < 0. || AN > PI, "V3d_SpotLight, bad coefficient or angle");
+                       || AN < 0. || AN > M_PI, "V3d_SpotLight, bad coefficient or angle");
 
   Quantity_Color C(Name) ;
   Graphic3d_Vertex T(Xt,Yt,Zt) ;
@@ -122,7 +122,7 @@ void V3d_SpotLight::SetConcentration(const Standard_Real C) {
 
 void V3d_SpotLight::SetAngle(const Standard_Real Angle) {
 
-  Viewer_BadValue_Raise_if( Angle <= 0. || Angle >= PI,
+  Viewer_BadValue_Raise_if( Angle <= 0. || Angle >= M_PI,
                        "V3d_SpotLight::SetAngle, bad angle");
   MyLight->SetAngle(Angle) ;
 
@@ -191,7 +191,7 @@ void V3d_SpotLight::Symbol (const Handle(Graphic3d_Group)& gsymbol,
   this->Position(X,Y,Z);
   this->Direction(DX,DY,DZ);
   Rayon = this->Radius();
-  V3d::ArrowOfRadius(gsymbol,X,Y,Z,-DX,-DY,-DZ,PI/8.,Rayon/15.);
+  V3d::ArrowOfRadius(gsymbol,X,Y,Z,-DX,-DY,-DZ,M_PI/8.,Rayon/15.);
 }
     
 void V3d_SpotLight::Display( const Handle(V3d_View)& aView,
@@ -280,8 +280,8 @@ void V3d_SpotLight::Display( const Handle(V3d_View)& aView,
       gnopick->Polyline(PRadius);
       V3d::ArrowOfRadius(gExtArrow,X-(X-X0)/10.,
                         Y-(Y-Y0)/10.,
-                        Z-(Z-Z0)/10.,X-X0,Y-Y0,Z-Z0,Standard_PI/15.,Rayon/20.);
-      V3d::ArrowOfRadius(gIntArrow,X0,Y0,Z0,X0-X,Y0-Y,Z0-Z,Standard_PI/15.,Rayon/20.);
+                        Z-(Z-Z0) / 10., X-X0, Y-Y0, Z-Z0, M_PI / 15., Rayon / 20.);
+      V3d::ArrowOfRadius(gIntArrow, X0, Y0, Z0, X0-X, Y0-Y, Z0-Z, M_PI / 15., Rayon / 20.);
       TCollection_AsciiString ValOfRadius(Rayon);
       PText.SetCoord( (X0+X)/2., (Y0+Y)/2. , (Z0+Z)/2. );
       gradius->Text(ValOfRadius.ToCString(),PText,0.01);
index 5ceacc9f698e870b09910d0eb5d05dd2a29e21f2..8798e4c020cac51ad475b338ba51c35b88df1279 100755 (executable)
@@ -187,7 +187,7 @@ static OSD_Timer FullTimer;
 */
 
 #define Zmargin 1.
-#define DEUXPI (2.*Standard_PI)
+#define DEUXPI (2. * M_PI)
 
 // in case of NO_TRACE_ECHO and NO_TRACE_POINTS, in V3d_View_4.cxx and in
 // V3d_View.cxx, change MyGridEchoStructure and MyGridEchoGroup in cdl
@@ -2560,8 +2560,8 @@ Standard_Real V3d_View::Twist()const  {
   if( angle > 1. ) angle = 1. ;
   else if( angle < -1. ) angle = -1. ;
   angle = asin(angle) ;
-  if( sca < 0. ) angle = Standard_PI - angle ;
-  if( angle > 0. && angle < Standard_PI ) {
+  if( sca < 0. ) angle = M_PI - angle ;
+  if( angle > 0. && angle < M_PI ) {
     sca = pvx*Xpn + pvy*Ypn + pvz*Zpn ;
     if( sca < 0. ) angle = DEUXPI - angle ;
   }
@@ -3134,13 +3134,13 @@ void V3d_View::Rotation(const Standard_Integer X,
     dz = atan2(Standard_Real(X)-rx/2., ry/2.-Standard_Real(Y)) -
       atan2(sx-rx/2.,ry/2.-sy);
   } else {
-    dx = (Standard_Real(X) - sx) * Standard_PI/rx;
-    dy = (sy - Standard_Real(Y)) * Standard_PI/ry;
+    dx = (Standard_Real(X) - sx) * M_PI / rx;
+    dy = (sy - Standard_Real(Y)) * M_PI / ry;
   }
   Rotate(dx, dy, dz, gx, gy, gz, Standard_False);
 #else
-  Standard_Real dx = (Standard_Real(X - sx)) * Standard_PI;
-  Standard_Real dy = (Standard_Real(sy - Y)) * Standard_PI;
+  Standard_Real dx = (Standard_Real(X - sx)) * M_PI;
+  Standard_Real dy = (Standard_Real(sy - Y)) * M_PI;
   Rotate(dx/rx, dy/ry, 0., gx, gy, gz, Standard_False);
 #endif
 #ifdef IMP020300
index 48d0108652dfda39b3d6a370edb7d03aa5b96c19..486acb44783c111c3f9d44ec4f3726934d1752d1 100755 (executable)
@@ -50,7 +50,7 @@
 #define NO_TRACE_POINTS
 
 #define MYEPSILON1 0.0001              // Comparison with 0.0
-#define MYEPSILON2 Standard_PI / 180.  // Delta between 2 angles
+#define MYEPSILON2 M_PI / 180. // Delta between 2 angles
 
 #ifdef TRACE_POINTS
 #include <Graphic3d_AspectLine3d.hxx>
@@ -230,7 +230,7 @@ gp_Dir GPN (X2, Y2, Z2);
 
        // Casw when the plane of the grid and the plane of the view
        // are perpendicular to MYEPSILON2 close radians
-       if (Abs (VPN.Angle (GPN) - Standard_PI / 2.) < MYEPSILON2) {
+       if (Abs (VPN.Angle (GPN) - M_PI / 2.) < MYEPSILON2) {
                NewPoint.SetCoord (X1, Y1, Z1);
 #ifdef TRACE_POINTS
                TextAttrib->SetColor (Quantity_Color (Quantity_NOC_RED));
@@ -378,7 +378,7 @@ Handle(Aspect_CircularGrid) theGrid =
                        *(Handle(Aspect_CircularGrid) *) &MyGrid;
                RS = theGrid->RadiusStep ();
                DN = theGrid->DivisionNumber ();
-               Alpha = Standard_PI / Standard_Real (DN);
+               Alpha = M_PI / Standard_Real (DN);
 
 Standard_Real DistOP = Sqrt (XPp*XPp + YPp*YPp);
 
@@ -386,7 +386,7 @@ Standard_Integer i, ICur=0;
 Standard_Real Angle, AngleCur;
 Standard_Real XCurp=0, YCurp=0;
 gp_Dir2d OP (XPp, YPp);
-               AngleCur = 2 * Standard_PI;
+               AngleCur = 2 * M_PI;
                for (i=1; i<=DN*2; i++) {
                        X1 = XO + Cos (Alpha * i) * RS,
                        Y1 = YO + Sin (Alpha * i) * RS,
index 42318edc1031f2132541247ad4bbaa390bc7bc3e..ea76711aa8abbf02015c0e4c19fa271a99e78655 100755 (executable)
@@ -74,7 +74,7 @@ myDisplayPlaneLength(ViewSize)
   SetDefaultVisualization(Visualization) ;
   SetDefaultShadingModel(ShadingModel) ;
   SetDefaultSurfaceDetail(SurfaceDetail) ; 
-  SetDefaultAngle(Standard_PI/2.);
+  SetDefaultAngle(M_PI / 2.);
   SetDefaultTypeOfView(V3d_ORTHOGRAPHIC);
 
   Quantity_Color Color1 (Quantity_NOC_GRAY50);
index cd5b8c9344f455645a398a87765e7d7c4d293001..d02427dc55cf015de6713ae1beb37230e7f853c0 100755 (executable)
@@ -468,7 +468,7 @@ static Standard_Integer TDraft2d (Draw_Interpretor& , Standard_Integer argc, con
     return 1;
   }
   anAngle = atof(argv[4]);
-  anAngle = 2*PI * anAngle / 360.0;
+  anAngle = 2*M_PI * anAngle / 360.0;
   gp_Pln aPln;
   Handle(Geom_Surface) aSurf;
 //  AIS2D_KindOfSurface aSurfType;
index e55035b576315276cf8e940117ed4ba79d4d67af..2756abaad33b2e7e69bead5094d022713f94a286 100755 (executable)
@@ -1915,7 +1915,7 @@ static int drawFinishSymbol( Draw_Interpretor& , Standard_Integer argc, const ch
   gp_Pnt2d rightTopPoint(location.X() + length/2, location.Y() + length);
                                
   gp_Trsf2d trsf;
-  trsf.SetRotation(location, angle*PI/180);
+  trsf.SetRotation(location, angle*M_PI/180);
   
   startPoint.Transform(trsf);
   leftTopPoint.Transform(trsf);
index 60933b5d91c71907db4c103d5eef66669991b57c..4028f23dbd6fcedf1a23347c92d93ff3d40675ec 100755 (executable)
@@ -361,7 +361,7 @@ static int V2dDebug (Draw_Interpretor& di, Standard_Integer , const char** )
   OSD_Timer myTimer;
   TheAIS2DContext()->CloseLocalContext();
   
-  Standard_Real Step = 4*PI/180;
+  Standard_Real Step = 4*M_PI/180;
   Standard_Real Angle = 0;
   
   Handle(AIS2D_InteractiveObject) aIO;
@@ -383,7 +383,7 @@ static int V2dDebug (Draw_Interpretor& di, Standard_Integer , const char** )
   if (atoi(argv[2]) == 1)
   { 
     cout << " Calcul par Transformation" << endl;
-    for (Standard_Real myAngle = 0; Angle < 10*2*PI; myAngle++)
+    for (Standard_Real myAngle = 0; Angle < 10*2*M_PI; myAngle++)
     {
       Angle = Step*myAngle;
       gp_Trsf myTransfo;
@@ -400,7 +400,7 @@ static int V2dDebug (Draw_Interpretor& di, Standard_Integer , const char** )
     TopLoc_Location myDeltaAngle (myAngleTrsf);
     TopLoc_Location myTrueLoc;
     
-    for (Standard_Real myAngle = 0; Angle < 10*2*PI; myAngle++)
+    for (Standard_Real myAngle = 0; Angle < 10*2*M_PI; myAngle++)
     {
       Angle = Step*myAngle;
       myTrueLoc = myTrueLoc*myDeltaAngle;
@@ -480,9 +480,9 @@ static int V2dDebug (Draw_Interpretor& di, Standard_Integer , const char** )
 //  TheAIS2DContext()->Deactivate(myAisPropeller   );
   
   // Boucle de mouvement
-  for (Standard_Real myAngle = 0; angleA < 2*PI*10.175; myAngle++)
+  for (Standard_Real myAngle = 0; angleA < 2*M_PI*10.175; myAngle++)
   {
-    angleA = thread*myAngle*PI/180;
+    angleA = thread*myAngle*M_PI/180;
     X = Sin(angleA)*3/8;
     angleB = atan(X / Sqrt(-X * X + 1));
 //    Standard_Real decal(25*0.6);
index 950914b2db7a121498d31dac591a2143a6744601..36b2abcc99b8c9077ceb16f7c8098e6f066772ad 100755 (executable)
@@ -239,7 +239,7 @@ static int V2dTrihedron2D (Draw_Interpretor& , Standard_Integer argc, const char
   gp_Dir TheZVector (coord[3],coord[4],coord[5]);
   gp_Dir TheXVector (coord[6],coord[7],coord[8]);
 
-  if (!TheZVector.IsNormal(TheXVector,PI/180))
+  if (!TheZVector.IsNormal(TheXVector,M_PI/180))
   {
     cout << argv[0] << " VectorX is not normal to VectorZ" << endl;
     return 1;
@@ -1120,7 +1120,7 @@ static int V2dPlaneBuilder (Draw_Interpretor& , Standard_Integer argc, const cha
        if (mySurface.GetType() == GeomAbs_Plane)
         {
          gp_Pln myPlane = mySurface.Plane();
-         myPlane.Rotate(myRotAxis, PI/2);
+         myPlane.Rotate(myRotAxis, M_PI/2);
          
          Handle(Geom_Plane) theGeomPlane = new Geom_Plane(myPlane);
          gp_Pnt theMiddle ((Aa.X()+Ab.X())/2, (Aa.Y()+Ab.Y())/2, (Aa.Z()+Ab.Z())/2);
@@ -1168,7 +1168,7 @@ static int V2dPlaneBuilder (Draw_Interpretor& , Standard_Integer argc, const cha
        if (mySurface.GetType() == GeomAbs_Plane)
         {
          gp_Pln myPlane = mySurface.Plane();
-         myPlane.Rotate(myRotAxis, PI/2);
+         myPlane.Rotate(myRotAxis, M_PI/2);
          Handle(Geom_Plane) theGeomPlane = new Geom_Plane(myPlane);
          gp_Pnt theMiddle ((Ba.X()+Bb.X())/2, (Ba.Y()+Bb.Y())/2, (Ba.Z()+Bb.Z())/2);
          Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane, theMiddle);
index 8a847b8e9f0c3ad354c1a6be80993624dd9fe81c..7db57af7dc6f221eca28041ccad76611bd300d50 100755 (executable)
@@ -1950,7 +1950,7 @@ static int VMoveA (Draw_Interpretor& di, Standard_Integer argc, const char** arg
   if (TheAISContext()->HasOpenedContext())
     TheAISContext()->CloseLocalContext();
 
-  Standard_Real Step=2*PI/180;
+  Standard_Real Step=2*M_PI/180;
   Standard_Real Angle=0;
   // R est le rayon de l'hellicoide
   Standard_Real R=50;
@@ -1971,10 +1971,10 @@ static int VMoveA (Draw_Interpretor& di, Standard_Integer argc, const char** arg
   // boucle generant le mouvement
   if(argc==3) {
     di<<" Transformations"<<"\n";
-    for (Standard_Real myAngle=0;Angle<5*2*PI; myAngle++) {
+    for (Standard_Real myAngle=0;Angle<5*2*M_PI; myAngle++) {
 
       Angle=Step*myAngle;
-      gp_Ax3 newBase(gp_Pnt(R*cos(Angle), R*sin(Angle), D*Angle/(2*PI) ), gp_Vec(0,0,1), gp_Vec(1,0,0)  );
+      gp_Ax3 newBase(gp_Pnt(R*cos(Angle), R*sin(Angle), D*Angle/(2*M_PI) ), gp_Vec(0,0,1), gp_Vec(1,0,0)  );
       gp_Trsf myTransfo;
       myTransfo.SetTransformation(newBase.Rotated(gp_Ax1(gp_Pnt(R*cos(Angle),R*sin(Angle),0), gp_Dir(0,0,1)  ),Angle ) );
       TheAISContext()->SetLocation(aIO,myTransfo);
@@ -1993,7 +1993,7 @@ static int VMoveA (Draw_Interpretor& di, Standard_Integer argc, const char** arg
     TopLoc_Location myDeltaDist (myDistTrsf);
     TopLoc_Location myTrueLoc;
 
-    for (Standard_Real myAngle=0;Angle<5*2*PI; myAngle++) {
+    for (Standard_Real myAngle=0;Angle<5*2*M_PI; myAngle++) {
 
       Angle=Step*myAngle;
       myTrueLoc=myTrueLoc*myDeltaAngle*myDeltaDist;
@@ -2053,7 +2053,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
   if (TheAISContext()->HasOpenedContext())
     TheAISContext()->CloseLocalContext();
 
-  Standard_Real Step=4*PI/180;
+  Standard_Real Step=4*M_PI/180;
   Standard_Real Angle=0;
 
   Handle(AIS_InteractiveObject) aIO;
@@ -2076,7 +2076,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
   // Movement par transformation
   if(atoi(argv[2]) ==1) {
     di<<" Calcul par Transformation"<<"\n";
-    for (Standard_Real myAngle=0;Angle<10*2*PI; myAngle++) {
+    for (Standard_Real myAngle=0;Angle<10*2*M_PI; myAngle++) {
 
       Angle=Step*myAngle;
       gp_Trsf myTransfo;
@@ -2093,7 +2093,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
     TopLoc_Location myDeltaAngle (myAngleTrsf);
     TopLoc_Location myTrueLoc;
 
-    for (Standard_Real myAngle=0;Angle<10*2*PI; myAngle++) {
+    for (Standard_Real myAngle=0;Angle<10*2*M_PI; myAngle++) {
 
       Angle=Step*myAngle;
       myTrueLoc=myTrueLoc*myDeltaAngle;
@@ -2174,9 +2174,9 @@ static int VAnimation (Draw_Interpretor& di, Standard_Integer argc, const char**
   TheAISContext()->Deactivate(myAisPropeller   );
 
   // Boucle de mouvement
-  for (Standard_Real myAngle = 0;angleA<2*PI*10.175 ;myAngle++) {
+  for (Standard_Real myAngle = 0;angleA<2*M_PI*10.175 ;myAngle++) {
 
-    angleA = thread*myAngle*PI/180;
+    angleA = thread*myAngle*M_PI/180;
     X = Sin(angleA)*3/8;
     angleB = atan(X / Sqrt(-X * X + 1));
     Standard_Real decal(25*0.6);
@@ -3678,7 +3678,7 @@ static Standard_Integer TDraft(Draw_Interpretor& di, Standard_Integer argc, cons
     return 1;
   }
   anAngle = atof(argv[4]);
-  anAngle = 2*PI * anAngle / 360.0;
+  anAngle = 2*M_PI * anAngle / 360.0;
   gp_Pln aPln;
   Handle( Geom_Surface )aSurf;
   AIS_KindOfSurface aSurfType;
index 83cacf0cb3e5c05b65ff491d61eea9c29c8a7a39..48a879c775c7ebef5272c2c522adcfab2972c210 100755 (executable)
@@ -250,7 +250,7 @@ static int VTrihedron (Draw_Interpretor& di, Standard_Integer argc, const char**
   gp_Dir TheZVector(coord[3],coord[4],coord[5]);
   gp_Dir TheXVector(coord[6],coord[7],coord[8]);
 
-  if ( !TheZVector.IsNormal(TheXVector,PI/180)) {di<<argv[0]<<" VectorX is not normal to VectorZ"<<"\n"; return 1;}
+  if ( !TheZVector.IsNormal(TheXVector,M_PI/180)) {di<<argv[0]<<" VectorX is not normal to VectorZ"<<"\n"; return 1;}
 
   Handle(Geom_Axis2Placement) OrigineAndAxii=new Geom_Axis2Placement(ThePoint,TheZVector,TheXVector);
 
@@ -1427,7 +1427,7 @@ static int VPlaneBuilder(Draw_Interpretor& di, Standard_Integer argc, const char
         if (mySurface.GetType()==GeomAbs_Plane ) {
           gp_Pln myPlane=mySurface.Plane();
           // On effectue une rotation d'1/2 tour autour de l'axe de rotation
-          myPlane.Rotate(myRotAxis , PI/2 );
+          myPlane.Rotate(myRotAxis , M_PI/2 );
 
           Handle(Geom_Plane) theGeomPlane=new Geom_Plane (myPlane );
           // construit un plan parallele a theGeomPlane contenant l'edgeA (De centre le milieu de l'edgeA)
@@ -1489,7 +1489,7 @@ static int VPlaneBuilder(Draw_Interpretor& di, Standard_Integer argc, const char
         if (mySurface.GetType()==GeomAbs_Plane ) {
           gp_Pln myPlane=mySurface.Plane();
           // On effectue une rotation d'1/2 tour autour de l'axe de rotation
-          myPlane.Rotate(myRotAxis , PI/2  );
+          myPlane.Rotate(myRotAxis , M_PI/2  );
           Handle(Geom_Plane) theGeomPlane=new Geom_Plane (myPlane );
           // construit un plan parallele a theGeomPlane contenant l'edgeA (De centre le milieu de l'edgeA)
           gp_Pnt theMiddle ((Ba.X()+Bb.X() )/2 , (Ba.Y()+Bb.Y() )/2 , (Ba.Z()+Bb.Z() )/2 );
@@ -2494,15 +2494,15 @@ Handle( Poly_Triangulation ) CalculationOfSphere( double X , double Y , double Z
 
   // Check data, determine increments, and convert to radians
   startTheta = (localStartTheta < localEndTheta ? localStartTheta : localEndTheta);
-  startTheta *= Standard_PI  / 180.0;
+  startTheta *= M_PI  / 180.0;
   endTheta = (localEndTheta > localStartTheta ? localEndTheta : localStartTheta);
-  endTheta *= Standard_PI  / 180.0;
+  endTheta *= M_PI  / 180.0;
 
 
   startPhi = ( mStartPhi <  mEndPhi ?  mStartPhi :  mEndPhi);
-  startPhi *= Standard_PI  / 180.0;
+  startPhi *= M_PI  / 180.0;
   endPhi = ( mEndPhi >  mStartPhi ?  mEndPhi :  mStartPhi);
-  endPhi *= Standard_PI  / 180.0;
+  endPhi *= M_PI  / 180.0;
 
   phiResolution =  mPhiResolution - numPoles;
   deltaPhi = (endPhi - startPhi) / ( mPhiResolution - 1);
@@ -2562,7 +2562,7 @@ Handle( Poly_Triangulation ) CalculationOfSphere( double X , double Y , double Z
 
   number_point = 3;
   for ( i=0; i < localThetaResolution; i++){
-    theta = localStartTheta * Standard_PI / 180.0 + i*deltaTheta;
+    theta = localStartTheta * M_PI / 180.0 + i*deltaTheta;
     for ( j = jStart; j < jEnd; j++){
         phi = startPhi + j*deltaPhi;
         radius =  mRadius * sin((double)phi);
index a9d1b44eb9a7f7d9bf39d66e080166480adba866..6234fe0676958614ec7305206564d3d8c69bedc8 100755 (executable)
@@ -242,7 +242,7 @@ static int VAngleDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const c
     TheAISContext()->CloseLocalContext(myCurrentIndex);
     
     // Construction de l'AIS dimension
-    Handle (AIS_AngleDimension) myAISDim= new AIS_AngleDimension (TopoDS::Edge(ShapeA) ,TopoDS::Edge(ShapeB) ,theGeomPlane ,PI/2.0 ,TheMessage_Str );
+    Handle (AIS_AngleDimension) myAISDim= new AIS_AngleDimension (TopoDS::Edge(ShapeA) ,TopoDS::Edge(ShapeB) ,theGeomPlane ,M_PI/2.0 ,TheMessage_Str );
     GetMapOfAIS().Bind (myAISDim,argv[1]);
     TheAISContext()->Display(myAISDim );
     
@@ -1671,7 +1671,7 @@ static int VPerpendicularBuilder(Draw_Interpretor& di, Standard_Integer argc, co
     // on verifie si les edges sont orthogonaux.
     //gp_Lin theLineA=theCurveA.Line();
     //gp_Lin theLineB=theCurveB.Line();
-    //if (abs(theLineA.Angle(theLineB) ) != PI/2 ) {cout<<"vperpendicular error: Edges are not  othogonals."<<endl;return 1;}
+    //if (abs(theLineA.Angle(theLineB) ) != M_PI/2 ) {cout<<"vperpendicular error: Edges are not  othogonals."<<endl;return 1;}
     
     // On recupere 3 points A,B,C des  curves.
     gp_Pnt A=theCurveA.Value(0.1);
index 7e0915b549cfed24d895027c78c0c7c803727743..9dd539176a6bc12bd7d614aaf72b457d7c7a9584 100755 (executable)
@@ -499,7 +499,7 @@ Standard_Integer Visual3d_Light::Identification () const {
 
 Standard_Boolean Visual3d_Light::IsValid (const Standard_Real AAngle) {
 
-       return ( (AAngle <  Standard_PI) && (AAngle >= 0.0) );
+       return ( (AAngle <  M_PI) && (AAngle >= 0.0) );
 
 }
 
index 24c4b72c79396f65169efe57489720058bc33c07..99cdb95ecc3482961562da2dd437c28cd90d7557 100755 (executable)
@@ -208,7 +208,7 @@ Standard_Real pvn, sca, angle;
                                /* Compute Angle */
        if (angle > 1.) angle = 1. ;
        else if ( angle < -1. ) angle = -1. ;
-       angle = asin (angle)/Standard_PI180 ;
+       angle = asin (angle) / (M_PI / 180.0);
        sca = a1*a2 + b1*b2 + c1*c2 ;
        if (sca < 0.) angle = 180. - angle ;
        if ( (angle > 0.) && (angle < 180.) ) {
@@ -216,9 +216,9 @@ Standard_Real pvn, sca, angle;
         if (sca > 0.) angle = 360. - angle ;
        }
 
-       return (angle*Standard_PI/180.0);
+       return (angle * M_PI / 180.0);
 #else
-       return (Standard_PI/180.0);
+       return (M_PI / 180.0);
 #endif
 
 }
index 442eb0b8ba590b081304d4774a7a0bc3b5727c1e..6e3d5fa4cd13a1e93771cfd491e224d6550338ec 100755 (executable)
@@ -72,7 +72,7 @@ class VrmlData_ShapeConvert
   Standard_EXPORT void Convert (const Standard_Boolean theExtractFaces,
                                const Standard_Boolean theExtractEdges,
                                 const Standard_Real    theDeflection = 0.01,
-                               const Standard_Real    theDeflAngle = 20.*PI/180.);
+                               const Standard_Real    theDeflAngle = 20.*M_PI/180.);
                                 //this value of theDeflAngle is used by default 
                                 //for tesselation while shading (Drawer->HLRAngle())
   
index 9c98336977cc75d8eb51da204b4e041ec97ed687..2e875693056e24883cdee7aff19464103ff4b9d1 100755 (executable)
@@ -298,7 +298,7 @@ void WNT_DDriver::BeginDraw()
     Quantity_Length width, height;
     WorkSpace (width, height);
     if (myFlags & FLAG_ROTATE) {
-      a -> myAngle   = Standard_PI / 2;
+      a -> myAngle   = M_PI / 2;
       a -> myPivot.x = Convert (height / 2);
       a -> myPivot.y = Convert (width  / 2);
       a -> myMove.x  =
index fde2614b3a059ecb9a4b395fd339405d0d582735..96aecbcd6299d263351a6033de67be82cf1ceee5 100755 (executable)
@@ -15,7 +15,6 @@
 
 #include <WNT_Bitmap.h>
 
-#define M_PI       3.1415
 #define TRASH_SIZE 8
 
 #define PWND (  ( WNT_WindowPtr )myWindow  )
index 57023a8a4c8ac81c16639927dc4366caed3b9c02..e95c3337304673bdaa8f4e8d05690922e622ddfa 100755 (executable)
 #define max(a,b)       (a<b ? b : a)
 #endif
 
-#ifndef PI
-#define PI 3.14159
-#endif
-
-#define DRAD (PI/180.)
+#define DRAD (M_PI/180.)
 
 #define MAXLINES 256
 #define MAXPOLYS 256
index fac590f9abf779784a134320ed828614cc6acab0..8714854de5f57da897c9891dc3263da21733b5ed 100755 (executable)
@@ -1639,9 +1639,9 @@ float a,cosa,sina ;
                pltextlist->upoints[i].y = (short int )( yp + YROTATE(x,y) );
                a = pltextlist->rangles[i] + angle ;
                if( a > 0. ) {
-                 while( a > 2.*PI ) a -= 2.*PI ;
+                 while( a > 2.*M_PI ) a -= 2.*M_PI ;
                } else if( a < 0. ) {
-                 while( a < -2.*PI ) a += 2.*PI ;
+                 while( a < -2.*M_PI ) a += 2.*M_PI ;
                }
                pltextlist->uangles[i] = a ;
                pltextlist->uscalex[i] = pltextlist->rscalex[i] ;
@@ -1661,9 +1661,9 @@ float a,cosa,sina ;
                pptextlist->upoints[i].y = (short int )( yp + YROTATE(x,y) );
                a = pptextlist->rangles[i] + angle ;
                if( a > 0. ) {
-                 while( a > 2.*PI ) a -= 2.*PI ;
+                 while( a > 2.*M_PI ) a -= 2.*M_PI ;
                } else if( a < 0. ) {
-                 while( a < -2.*PI ) a += 2.*PI ;
+                 while( a < -2.*M_PI ) a += 2.*M_PI ;
                }
                pptextlist->uangles[i] = a ;
                pptextlist->uscalex[i] = pptextlist->rscalex[i] ;
index 459bf2b4c90cdd4a04cd2861fa8b52f485b85a07..f4680c14ae2cd07952dc49ddac55e33428c2ca2f 100755 (executable)
@@ -126,9 +126,9 @@ XW_ATTRIB textcode;
        ptextlist->slants[ntext] = 0. ;
        strcpy(ptextlist->ptexts[ntext],text) ;
         if( angle > 0. ) {
-            while( angle > 2.*PI ) angle -= 2.*PI ;
+            while( angle > 2.*M_PI ) angle -= 2.*M_PI ;
         } else if( angle < 0. ) {
-            while( angle < -2.*PI ) angle += 2.*PI ;
+            while( angle < -2.*M_PI ) angle += 2.*M_PI ;
         }
        ptextlist->rangles[ntext] = angle ;
        ptextlist->marges[ntext] = marge ;
index 8d9421a1ce9620060ba93ba06d2a2346b1f42c1c..63c101ecc5752fc7fffd086678134aa226cd6275 100755 (executable)
@@ -117,9 +117,9 @@ XW_ATTRIB textcode;
        ptextlist->slants[ntext] = 0. ;
        strcpy(ptextlist->ptexts[ntext],text) ;
         if( angle > 0. ) {
-            while( angle > 2.*PI ) angle -= 2.*PI ;
+            while( angle > 2.*M_PI ) angle -= 2.*M_PI ;
         } else if( angle < 0. ) {
-            while( angle < -2.*PI ) angle += 2.*PI ;
+            while( angle < -2.*M_PI ) angle += 2.*M_PI ;
         }
        ptextlist->rangles[ntext] = angle ;
  
index 566bdd715e09e4097654def8f173f7864d4f5116..696e440521dd3865645ff0dae694b063c71810ee 100755 (executable)
@@ -18,7 +18,7 @@ gce_MakeCone::gce_MakeCone(const gp_Ax2&       A2    ,
 {
   if (Radius < 0.0) { TheError = gce_NegativeRadius; }
   else {
-    if (Ang <= gp::Resolution() || PI/2-Ang <= gp::Resolution()) {
+    if (Ang <= gp::Resolution() || M_PI/2-Ang <= gp::Resolution()) {
       TheError = gce_BadAngle;
     }
     else {
@@ -58,7 +58,7 @@ gce_MakeCone::gce_MakeCone(const gp_Pnt& P1 ,
   Standard_Real Dist4 = L1.Distance(P4);
   Standard_Real DifRad = Dist3-Dist4;
   Standard_Real angle = Abs(ATan(DifRad/(Dist13-Dist14)));
-  if(Abs(PI/2.-angle) < RealEpsilon() || Abs(angle) < RealEpsilon()) { TheError = gce_NullRadius; return; }
+  if(Abs(M_PI/2.-angle) < RealEpsilon() || Abs(angle) < RealEpsilon()) { TheError = gce_NullRadius; return; }
   Standard_Real R1 = PP3.Distance(P3);
   Standard_Real R2 = PP4.Distance(P4);
   if (R1 < 0.0 || R2 < 0.0) { TheError = gce_NegativeRadius; return; }
@@ -165,7 +165,7 @@ gce_MakeCone::gce_MakeCone(const gp_Pnt&       P1   ,
     }
     else {
       Standard_Real Angle = Abs(atan((R1-R2)/dist));
-      if (Abs(PI/2.-Angle)<RealEpsilon() || Abs(Angle)<RealEpsilon()) {
+      if (Abs(M_PI/2.-Angle)<RealEpsilon() || Abs(Angle)<RealEpsilon()) {
        TheError = gce_NullAngle;
       }
       else {
index 03fe98bd8c141e340dbc2f638f2a64c1e00fc025..442a640512bce1c9531d925c85f26af4df38e968 100755 (executable)
@@ -30,13 +30,13 @@ inline void gp_Circ::SetRadius (const Standard_Real R)
 }
 
 inline   Standard_Real gp_Circ::Area() const
-{ return Standard_PI*radius*radius; }
+{ return M_PI * radius * radius; }
 
 inline const gp_Ax1& gp_Circ::Axis () const
 { return pos.Axis(); }
 
 inline   Standard_Real gp_Circ::Length() const
-{ return 2.*Standard_PI*radius; }
+{ return 2. * M_PI * radius; }
 
 inline const gp_Pnt& gp_Circ::Location () const
 { return pos.Location(); }
index 9bf62ef9c019544ceed57ca7e6625190abef13d2..df7b7e2595ca530bc38e6fe872f1dd2d73005a5f 100755 (executable)
@@ -38,7 +38,7 @@ inline void gp_Circ2d::SetRadius (const Standard_Real Radius)
 }
 
 inline   Standard_Real gp_Circ2d::Area() const
-{ return Standard_PI*radius*radius; }
+{ return M_PI * radius * radius; }
 
 inline void gp_Circ2d::Coefficients (Standard_Real& A,
                                     Standard_Real& B,
@@ -80,7 +80,7 @@ inline Standard_Real gp_Circ2d::SquareDistance (const gp_Pnt2d& P) const
 }
 
 inline   Standard_Real gp_Circ2d::Length() const
-{ return 2.*Standard_PI*radius; }
+{ return 2. * M_PI * radius; }
 
 inline const gp_Pnt2d& gp_Circ2d::Location () const
 {return pos.Location(); }
index d068ef9acca7335a81b93b9a45ce26c84d0a48d6..1db58444123ae1d82fe258b101a428cf603a1202 100755 (executable)
@@ -5,7 +5,7 @@
 
 inline gp_Cone::gp_Cone () :
 radius (RealLast()),
-semiAngle (Standard_PI * 0.25)
+semiAngle (M_PI * 0.25)
 { }
 
 inline gp_Cone::gp_Cone (const gp_Ax3& A3,
@@ -20,7 +20,7 @@ inline gp_Cone::gp_Cone (const gp_Ax3& A3,
   Standard_ConstructionError_Raise_if
     (radius < 0. ||
      val            <= gp::Resolution() ||
-     Standard_PI * 0.5 - val <= gp::Resolution(), "");
+     M_PI * 0.5 - val <= gp::Resolution(), "");
 }
 
 inline void gp_Cone::SetAxis     (const gp_Ax1& A1)
@@ -45,7 +45,7 @@ inline void gp_Cone::SetSemiAngle (const Standard_Real Ang)
   if (val < 0) val = - val;
   Standard_ConstructionError_Raise_if
     (val            <= gp::Resolution() ||
-     Standard_PI * 0.5 - val <= gp::Resolution(),"");
+     M_PI * 0.5 - val <= gp::Resolution(),"");
   semiAngle = Ang;
 }
 
index 8a8e1bb97dffeda35ef01b794e300d1ab9acafc7..3f95450f7c45393c68c8a548f6100d39b1e352c5 100755 (executable)
@@ -18,7 +18,7 @@ Standard_Real gp_Dir::Angle (const gp_Dir& Other) const
     return acos (Cosinus);
   else {
     Standard_Real Sinus = (coord.Crossed (Other.coord)).Modulus ();
-    if(Cosinus < 0.0)  return Standard_PI - asin (Sinus);
+    if(Cosinus < 0.0)  return M_PI - asin (Sinus);
     else               return      asin (Sinus);
   }
 }
@@ -33,7 +33,7 @@ Standard_Real gp_Dir::AngleWithRef (const gp_Dir& Other,
   if (Cosinus > -0.70710678118655 && Cosinus < 0.70710678118655)
     Ang =  acos (Cosinus);
   else {
-    if(Cosinus < 0.0)  Ang = Standard_PI - asin (Sinus);
+    if(Cosinus < 0.0)  Ang = M_PI - asin (Sinus);
     else               Ang =      asin (Sinus);
   }
   if (XYZ.Dot (Vref.coord) >= 0.0)  return  Ang;
index 07a1ecd01074e0d2d2cdb15ae81e2e6e25683588..c1434595906bf5581b065d93a6af0e8d22415dfe 100755 (executable)
@@ -146,7 +146,7 @@ inline Standard_Boolean gp_Dir::IsNormal
 (const gp_Dir& Other,
  const Standard_Real AngularTolerance) const
 {
-  Standard_Real Ang = Standard_PI / 2.0 - Angle (Other);
+  Standard_Real Ang = M_PI / 2.0 - Angle (Other);
   if (Ang < 0) Ang = - Ang;
   return   Ang <= AngularTolerance;
 }    
@@ -154,14 +154,14 @@ inline Standard_Boolean gp_Dir::IsNormal
 inline Standard_Boolean gp_Dir::IsOpposite
 (const gp_Dir& Other,
  const Standard_Real AngularTolerance) const
-{ return Standard_PI - Angle (Other) <= AngularTolerance; }    
+{ return M_PI - Angle (Other) <= AngularTolerance; }    
 
 inline Standard_Boolean gp_Dir::IsParallel
 (const gp_Dir& Other, 
  const Standard_Real AngularTolerance) const
 {
   Standard_Real Ang = Angle (Other);
-  return Ang <= AngularTolerance || Standard_PI - Ang <= AngularTolerance;
+  return Ang <= AngularTolerance || M_PI - Ang <= AngularTolerance;
 }    
 
 inline void gp_Dir::Cross (const gp_Dir& Right)
index d37063533a1a93659b8a5f4f548f8936fc440a7b..2ce634f21ac69229da72f716a97d07c2c9e19d67 100755 (executable)
@@ -20,8 +20,8 @@ Standard_Real gp_Dir2d::Angle (const gp_Dir2d& Other) const
   else {
     if (Cosinus > 0.0)  return      asin (Sinus);
     else { 
-      if (Sinus > 0.0) return  Standard_PI - asin (Sinus);
-      else             return -Standard_PI - asin (Sinus);
+      if (Sinus > 0.0) return  M_PI - asin (Sinus);
+      else             return -M_PI - asin (Sinus);
     }
   }
 }
index 37efe6ae2b2901329b1b45bf446ac3fc955cd69d..9618c1e1448be1d8ad60dddaac150e711993a931 100755 (executable)
@@ -122,7 +122,7 @@ inline Standard_Boolean gp_Dir2d::IsNormal
 {
   Standard_Real Ang = Angle(Other);
   if (Ang < 0) Ang = - Ang;
-  Ang = Standard_PI / 2.0 - Ang;
+  Ang = M_PI / 2.0 - Ang;
   if (Ang < 0) Ang = - Ang;
   return   Ang <= AngularTolerance;
 }    
@@ -133,7 +133,7 @@ inline Standard_Boolean gp_Dir2d::IsOpposite
 { 
   Standard_Real Ang = Angle(Other);
   if (Ang < 0) Ang = - Ang;
-  return Standard_PI - Ang <= AngularTolerance;
+  return M_PI - Ang <= AngularTolerance;
 }    
 
 inline Standard_Boolean gp_Dir2d::IsParallel
@@ -142,7 +142,7 @@ inline Standard_Boolean gp_Dir2d::IsParallel
 {
   Standard_Real Ang = Angle(Other);
   if (Ang < 0) Ang = - Ang;
-  return   Ang <= AngularTolerance || Standard_PI - Ang <= AngularTolerance;
+  return   Ang <= AngularTolerance || M_PI - Ang <= AngularTolerance;
 }    
 
 inline Standard_Real gp_Dir2d::Crossed (const gp_Dir2d& Right) const
index e959863f3d6b1c7c1fbc284f41e040f8c8d3d744..fac29963602f48a65db7af5a545105306e71dd33 100755 (executable)
@@ -23,7 +23,7 @@ inline gp_Elips::gp_Elips (const gp_Ax2& A2,
 }
 
 inline Standard_Real gp_Elips::Area() const
-{ return Standard_PI * majorRadius * minorRadius; }
+{ return M_PI * majorRadius * minorRadius; }
 
 inline Standard_Real gp_Elips::MajorRadius() const
 { return majorRadius; }
index 0ca5c9b4136fca09e526c39fbd413dfc176c3672..bde25932e3ce5bce461241ba97cb063f71792554 100755 (executable)
@@ -58,7 +58,7 @@ inline void gp_Elips2d::SetYAxis (const gp_Ax2d& A)
 {  pos.SetYAxis(A); }
 
 inline  Standard_Real gp_Elips2d::Area() const
-{ return Standard_PI * majorRadius * minorRadius; }
+{ return M_PI * majorRadius * minorRadius; }
 
 inline gp_Ax2d gp_Elips2d::Directrix1() const
 {
index 17cbc0ffb3dbd2868f6bdc9217c21ee1fe31cd0c..aed076df11a2fff5341d76cbd279a485d8ca9b08 100755 (executable)
@@ -22,7 +22,7 @@ inline void gp_Sphere::SetRadius (const Standard_Real R)
 }
 
 inline Standard_Real gp_Sphere::Area () const
-{ return 4.0 * Standard_PI * radius * radius; }
+{ return 4.0 * M_PI * radius * radius; }
 
 inline void gp_Sphere::UReverse()
 { pos.YReverse(); }
@@ -43,7 +43,7 @@ inline Standard_Real gp_Sphere::Radius () const
 { return radius; }
 
 inline Standard_Real gp_Sphere::Volume () const
-{ return (4.0 * Standard_PI * radius * radius * radius) / 3.0; }
+{ return (4.0 * M_PI * radius * radius * radius) / 3.0; }
 
 inline gp_Ax1 gp_Sphere::XAxis () const
 { return gp_Ax1(pos.Location(), pos.XDirection()); }
index 14b343d58085eabae085270ea659c810dfd5877d..413f9234ed6dbe784ead44e494b6a6b517a9a88b 100755 (executable)
@@ -40,7 +40,7 @@ inline void gp_Torus::SetPosition (const gp_Ax3& A3)
 { pos = A3; }
 
 inline Standard_Real gp_Torus::Area () const
-{ return 4.0 * Standard_PI * Standard_PI * minorRadius * majorRadius; }
+{ return 4.0 * M_PI * M_PI * minorRadius * majorRadius; }
 
 inline void gp_Torus::UReverse()
 { pos.YReverse(); }
@@ -67,7 +67,7 @@ inline Standard_Real gp_Torus::MinorRadius () const
 { return minorRadius; }
 
 inline Standard_Real gp_Torus::Volume () const
-{ return (Standard_PI * minorRadius * minorRadius) * (2.0 * Standard_PI * majorRadius); }
+{ return (M_PI * minorRadius * minorRadius) * (2.0 * M_PI * majorRadius); }
 
 inline gp_Ax1 gp_Torus::XAxis () const
 { return gp_Ax1(pos.Location(), pos.XDirection()); }
index 65333fc51670504693deb4b71c51217cfcccabd2..61d52e3c99397c17fe6916275d64701a4fab1075 100755 (executable)
@@ -77,7 +77,7 @@ inline Standard_Boolean gp_Vec::IsNormal
 (const gp_Vec& Other,
  const Standard_Real AngularTolerance) const
 {
-  Standard_Real Ang = Standard_PI / 2.0 - Angle(Other);
+  Standard_Real Ang = M_PI / 2.0 - Angle(Other);
   if (Ang < 0) Ang = - Ang;
   return  Ang <= AngularTolerance;
 }    
@@ -86,7 +86,7 @@ inline Standard_Boolean gp_Vec::IsOpposite
 (const gp_Vec& Other,
  const Standard_Real AngularTolerance) const
 {
-  Standard_Real Ang = Standard_PI - Angle(Other);
+  Standard_Real Ang = M_PI - Angle(Other);
   return Ang <= AngularTolerance;
 }    
 
@@ -95,7 +95,7 @@ inline Standard_Boolean gp_Vec::IsParallel
  const Standard_Real AngularTolerance) const
 {
   Standard_Real Ang = Angle (Other);
-  return   Ang <= AngularTolerance || Standard_PI - Ang <= AngularTolerance;
+  return   Ang <= AngularTolerance || M_PI - Ang <= AngularTolerance;
 }    
 
 inline Standard_Real gp_Vec::Angle (const gp_Vec& Other) const
index cd17ca89dac6d10c092b2ea3fb8267545a0a181d..9e7a43e3085a030370cfd9d0f542497be9a7661e 100755 (executable)
@@ -56,8 +56,8 @@ Standard_Real gp_Vec2d::Angle (const gp_Vec2d& Other) const
     if (Cosinus > 0.0) return        asin (Sinus);
     else
     { 
-      if (Sinus > 0.0) return   PI - asin (Sinus);
-      else             return - PI - asin (Sinus);
+      if (Sinus > 0.0) return   M_PI - asin (Sinus);
+      else             return - M_PI - asin (Sinus);
     }
   }  
 }
index 43951a5dbb2c66f5307a9ad4f42d7d6191b61173..af04ce5ef38b3a43d713b2f08d5e510ae0cd0f9f 100755 (executable)
@@ -62,7 +62,7 @@ inline Standard_Boolean gp_Vec2d::IsNormal
 {
   Standard_Real Ang = Angle(Other);
   if (Ang < 0) Ang = - Ang;
-  Ang = Standard_PI / 2.0 - Angle(Other);
+  Ang = M_PI / 2.0 - Angle(Other);
   if (Ang < 0) Ang = - Ang;
   return  Ang <= AngularTolerance;
 }    
@@ -73,7 +73,7 @@ inline Standard_Boolean gp_Vec2d::IsOpposite
 {
   Standard_Real Ang = Angle(Other);
   if (Ang < 0) Ang = - Ang;
-  return Standard_PI - Ang <= AngularTolerance;
+  return M_PI - Ang <= AngularTolerance;
 }    
 
 inline Standard_Boolean gp_Vec2d::IsParallel
@@ -82,7 +82,7 @@ inline Standard_Boolean gp_Vec2d::IsParallel
 {
   Standard_Real Ang = Angle(Other);
   if (Ang < 0) Ang = - Ang;
-  return   Ang <= AngularTolerance || Standard_PI - Ang <= AngularTolerance;
+  return   Ang <= AngularTolerance || M_PI - Ang <= AngularTolerance;
 }    
 
 inline Standard_Real gp_Vec2d::Magnitude() const
index be0732c3e4e2891bf0042bffc432bdeb88bda552..308b7d48f4d895a6733ccf8a2838263cf8124e76 100755 (executable)
@@ -375,7 +375,7 @@ void math_DirectPolynomialRoots::Solve(const Standard_Real a,
         else {
           Omega = atan(0.5 * Q / sqrt(- Discr));
           Sp3 = sqrt(-P / 3.0);
-          Y1 = -2.0 * Sb * Sp3 * cos(PI / 6.0 - Sb * Omega / 3.0);          
+          Y1 = -2.0 * Sb * Sp3 * cos(M_PI / 6.0 - Sb * Omega / 3.0);          
           TheRoots[0] = - Beta / 3.0 + Y1;
           if(Beta * Q <= 0.0) {
             TheRoots[1] = - Beta / 3.0 + 2.0 * Sp3 * sin(Omega / 3.0);
index 2e707775d429ccfed3ccdfb2b790895772bcc908..5d94c729dfabd8a8280485d9be66d193b0504fd1 100755 (executable)
@@ -129,7 +129,7 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,
 
   Eps = 1.e-12;
 
-  Depi = PI+PI;
+  Depi = M_PI+M_PI;
   if (InfBound <= RealFirst() && SupBound >= RealLast()) {
     MyBorneInf = 0.0;
     Delta = Depi;
@@ -174,7 +174,7 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,
        }
 
        Zer(1) = ASin(AA);
-       Zer(2) = PI - Zer(1);
+       Zer(2) = M_PI - Zer(1);
        NZer = 2;
        for (i = 1; i <= NZer; i++) {
          if (Zer(i) <= -Eps) {
@@ -211,7 +211,7 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,
        }
        // On rend les solutions entre InfBound et SupBound:
        // =================================================
-       Zer(i) += IntegerPart(Mod)*2.*PI;
+       Zer(i) += IntegerPart(Mod)*2.*M_PI;
        X = Zer(i)-MyBorneInf;
        if ((X >= (-Epsilon(Delta))) && (X <= Delta+ Epsilon(Delta))) {
          NbSol++;
@@ -380,7 +380,7 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,
   if(NbSol<4) { 
     Standard_Integer startIndex = NbSol + 1;
     for( Standard_Integer solIt = startIndex; solIt <= 4; solIt++) {
-      Teta = PI + IntegerPart(Mod)*2.0*PI;;
+      Teta = M_PI + IntegerPart(Mod)*2.0*M_PI;;
       X = Teta - MyBorneInf;
       if ((X >= (-Epsilon(Delta))) && (X <= Delta + Epsilon(Delta))) {
        if (Abs(A-C+E) <= Eps) {