From f3af39546be9ecd485737ff0954cfb92807fca1d Mon Sep 17 00:00:00 2001 From: aothms Date: Tue, 13 Oct 2015 11:15:45 +0200 Subject: [PATCH] Don't construct transformation from matrix, but use original data. --- src/ifcconvert/OpenCascadeBasedSerializer.cpp | 14 +------------- src/ifcconvert/SvgSerializer.cpp | 12 +----------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/src/ifcconvert/OpenCascadeBasedSerializer.cpp b/src/ifcconvert/OpenCascadeBasedSerializer.cpp index 77bc7e7fc9..3dc8ad9386 100644 --- a/src/ifcconvert/OpenCascadeBasedSerializer.cpp +++ b/src/ifcconvert/OpenCascadeBasedSerializer.cpp @@ -40,19 +40,7 @@ void OpenCascadeBasedSerializer::write(const IfcGeom::BRepElement* o) { for (IfcGeom::IfcRepresentationShapeItems::const_iterator it = o->geometry().begin(); it != o->geometry().end(); ++ it) { gp_GTrsf gtrsf = it->Placement(); - const std::vector& matrix = o->transformation().matrix().data(); - - // Convert the matrix back into a transformation object. The tolerance values - // are taken into consideration to reconstruct the form of the transformation. - gp_Trsf o_trsf; - o_trsf.SetValues( - matrix[0], matrix[3], matrix[6], matrix[ 9], - matrix[1], matrix[4], matrix[7], matrix[10], - matrix[2], matrix[5], matrix[8], matrix[11] -#if OCC_VERSION_HEX < 0x60800 - , Precision::Angular(), Precision::Confusion() -#endif - ); + const gp_Trsf& o_trsf = o->transformation().data(); gtrsf.PreMultiply(o_trsf); const TopoDS_Shape& s = it->Shape(); diff --git a/src/ifcconvert/SvgSerializer.cpp b/src/ifcconvert/SvgSerializer.cpp index 8319393ff8..7c03241971 100644 --- a/src/ifcconvert/SvgSerializer.cpp +++ b/src/ifcconvert/SvgSerializer.cpp @@ -217,17 +217,7 @@ void SvgSerializer::write(const IfcGeom::BRepElement* o) { for (IfcGeom::IfcRepresentationShapeItems::const_iterator it = o->geometry().begin(); it != o->geometry().end(); ++ it) { gp_GTrsf gtrsf = it->Placement(); - gp_Trsf o_trsf; - const std::vector& matrix = o->transformation().matrix().data(); - o_trsf.SetValues( - matrix[0], matrix[3], matrix[6], matrix[ 9], - matrix[1], matrix[4], matrix[7], matrix[10], - matrix[2], matrix[5], matrix[8], matrix[11] -#if OCC_VERSION_HEX < 0x60800 - , Precision::Angular(), Precision::Confusion() -#endif - ); - gtrsf.PreMultiply(o_trsf); + const gp_Trsf& o_trsf = o->transformation().data(); const TopoDS_Shape& s = it->Shape(); bool trsf_valid = false;