From 2137ad2488368c4760e6987ccad05e2c756a1154 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 13 Jun 2012 07:13:31 +0000 Subject: [PATCH] Apply patch #3534755 by myueho to use the standard M_PI instead of relying on PI defined in OCC, which recently got removed upstream. --- src/ifcgeom/IfcGeomWires.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index d1258541ec..53243bc65d 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -23,6 +23,9 @@ * * ********************************************************************************/ +#define _USE_MATH_DEFINES +#include + #include #include #include @@ -181,7 +184,7 @@ bool IfcGeom::convert(const Ifc2x3::IfcTrimmedCurve::ptr l, TopoDS_Wire& wire) { } else if ( i->is(Ifc2x3::Type::IfcParameterValue) && !trim_cartesian && trimmed1 ) { const double value = *reinterpret_pointer_cast(i)->wrappedValue(); double flt2 = value * parameterFactor; - if ( isConic && ALMOST_THE_SAME(fmod(flt2-flt1,(double)(PI*2.0)),0.0f) ) { + if ( isConic && ALMOST_THE_SAME(fmod(flt2-flt1,(double)(M_PI*2.0)),0.0f) ) { w.Add(BRepBuilderAPI_MakeEdge(curve)); } else { BRepBuilderAPI_MakeEdge e (curve,sense_agreement ? flt1 : flt2,sense_agreement ? flt2 : flt1);