From 38e6d90e40904512c423476367b4d3958479be05 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Thu, 2 Feb 2012 03:06:28 +0000 Subject: [PATCH] - Configure STEP reader to use double precision, small changes to the Ifc code to tolerate this (Ifc itself still working with single precision). git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1136 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/IFCCurve.cpp | 6 ++++-- code/IFCGeometry.cpp | 2 +- code/STEPFile.h | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/IFCCurve.cpp b/code/IFCCurve.cpp index 74927b29d..d5e379d43 100644 --- a/code/IFCCurve.cpp +++ b/code/IFCCurve.cpp @@ -120,7 +120,8 @@ public: // -------------------------------------------------- IfcVector3 Eval(IfcFloat u) const { u = -conv.angle_scale * u; - return location + entity.Radius*(static_cast(::cos(u))*p[0] + static_cast(::sin(u))*p[1]); + return location + static_cast(entity.Radius)*(static_cast(::cos(u))*p[0] + + static_cast(::sin(u))*p[1]); } private: @@ -148,7 +149,8 @@ public: // -------------------------------------------------- IfcVector3 Eval(IfcFloat u) const { u = -conv.angle_scale * u; - return location + entity.SemiAxis1*static_cast(::cos(u))*p[0] + entity.SemiAxis2*static_cast(::sin(u))*p[1]; + return location + static_cast(entity.SemiAxis1)*static_cast(::cos(u))*p[0] + + static_cast(entity.SemiAxis2)*static_cast(::sin(u))*p[1]; } private: diff --git a/code/IFCGeometry.cpp b/code/IFCGeometry.cpp index 3c0910ab9..994c9cc58 100644 --- a/code/IFCGeometry.cpp +++ b/code/IFCGeometry.cpp @@ -1457,7 +1457,7 @@ void ProcessSweptAreaSolid(const IfcSweptAreaSolid& swept, TempMesh& meshout, Co IfcVector3 dir; ConvertDirection(dir,solid->ExtrudedDirection); - conv.collect_openings->push_back(TempOpening(solid, IfcMatrix3(m) * (dir*solid->Depth),meshtmp)); + conv.collect_openings->push_back(TempOpening(solid, IfcMatrix3(m) * (dir*static_cast(solid->Depth)),meshtmp)); return; } diff --git a/code/STEPFile.h b/code/STEPFile.h index be77a2ec2..cc038faca 100644 --- a/code/STEPFile.h +++ b/code/STEPFile.h @@ -281,8 +281,8 @@ namespace STEP { }; typedef PrimitiveDataType INTEGER; - typedef PrimitiveDataType REAL; - typedef PrimitiveDataType NUMBER; + typedef PrimitiveDataType REAL; + typedef PrimitiveDataType NUMBER; typedef PrimitiveDataType STRING;