- 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
pull/5/head
aramis_acg 2012-02-02 03:06:28 +00:00
parent 02fc5effba
commit 38e6d90e40
3 changed files with 7 additions and 5 deletions

View File

@ -120,7 +120,8 @@ public:
// --------------------------------------------------
IfcVector3 Eval(IfcFloat u) const {
u = -conv.angle_scale * u;
return location + entity.Radius*(static_cast<IfcFloat>(::cos(u))*p[0] + static_cast<IfcFloat>(::sin(u))*p[1]);
return location + static_cast<IfcFloat>(entity.Radius)*(static_cast<IfcFloat>(::cos(u))*p[0] +
static_cast<IfcFloat>(::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<IfcFloat>(::cos(u))*p[0] + entity.SemiAxis2*static_cast<IfcFloat>(::sin(u))*p[1];
return location + static_cast<IfcFloat>(entity.SemiAxis1)*static_cast<IfcFloat>(::cos(u))*p[0] +
static_cast<IfcFloat>(entity.SemiAxis2)*static_cast<IfcFloat>(::sin(u))*p[1];
}
private:

View File

@ -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<IfcFloat>(solid->Depth)),meshtmp));
return;
}

View File

@ -281,8 +281,8 @@ namespace STEP {
};
typedef PrimitiveDataType<int64_t> INTEGER;
typedef PrimitiveDataType<float> REAL;
typedef PrimitiveDataType<float> NUMBER;
typedef PrimitiveDataType<double> REAL;
typedef PrimitiveDataType<double> NUMBER;
typedef PrimitiveDataType<std::string> STRING;