From dce878515e571363cf035df6691d0f792ab4f965 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 19 Jul 2014 10:30:13 +0000 Subject: [PATCH] Correct an invalid default value for IfcCartesianTransformationOperator3D.Axis3. Thanks Stefan. --- src/ifcgeom/IfcGeomHelpers.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ifcgeom/IfcGeomHelpers.cpp b/src/ifcgeom/IfcGeomHelpers.cpp index dcfdfa7b98..4b187c409e 100644 --- a/src/ifcgeom/IfcGeomHelpers.cpp +++ b/src/ifcgeom/IfcGeomHelpers.cpp @@ -137,11 +137,10 @@ bool IfcGeom::convert(const Ifc2x3::IfcCartesianTransformationOperator3D::ptr l, IfcGeom::convert(l->LocalOrigin(),origin); gp_Dir axis1 (1.,0.,0.); gp_Dir axis2 (0.,1.,0.); - gp_Dir axis3; + gp_Dir axis3 (0.,0.,1.); if ( l->hasAxis1() ) IfcGeom::convert(l->Axis1(),axis1); if ( l->hasAxis2() ) IfcGeom::convert(l->Axis2(),axis2); if ( l->hasAxis3() ) IfcGeom::convert(l->Axis3(),axis3); - else axis3 = axis1.Crossed(axis2); gp_Ax3 ax3 (origin,axis3,axis1); if ( axis2.Dot(ax3.YDirection()) < 0 ) ax3.YReverse(); trsf.SetTransformation(ax3); @@ -170,11 +169,10 @@ bool IfcGeom::convert(const Ifc2x3::IfcCartesianTransformationOperator3DnonUnifo IfcGeom::convert(l->LocalOrigin(),origin); gp_Dir axis1 (1.,0.,0.); gp_Dir axis2 (0.,1.,0.); - gp_Dir axis3; + gp_Dir axis3 (0.,0.,1.); if ( l->hasAxis1() ) IfcGeom::convert(l->Axis1(),axis1); if ( l->hasAxis2() ) IfcGeom::convert(l->Axis2(),axis2); if ( l->hasAxis3() ) IfcGeom::convert(l->Axis3(),axis3); - else axis3 = axis1.Crossed(axis2); gp_Ax3 ax3 (origin,axis3,axis1); if ( axis2.Dot(ax3.YDirection()) < 0 ) ax3.YReverse(); trsf.SetTransformation(ax3);