From 2ce89c8b22211832b8179aaeafb13c560484beb4 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 20 Feb 2015 18:06:52 +0000 Subject: [PATCH] Properly read the CONVERT_BACK_UNITS setting for serialized elements --- src/ifcgeom/IfcGeomRepresentation.cpp | 4 ++-- src/ifcgeom/IfcGeomRepresentation.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ifcgeom/IfcGeomRepresentation.cpp b/src/ifcgeom/IfcGeomRepresentation.cpp index ad699643c4..15801265ae 100644 --- a/src/ifcgeom/IfcGeomRepresentation.cpp +++ b/src/ifcgeom/IfcGeomRepresentation.cpp @@ -35,10 +35,10 @@ IfcGeom::Representation::Serialization::Serialization(const BRep& brep) TopoDS_Compound compound; BRep_Builder builder; builder.MakeCompound(compound); - for ( IfcGeom::IfcRepresentationShapeItems::const_iterator it = brep.begin(); it != brep.end(); ++ it ) { + for (IfcGeom::IfcRepresentationShapeItems::const_iterator it = brep.begin(); it != brep.end(); ++ it) { const TopoDS_Shape& s = it->Shape(); gp_GTrsf trsf = it->Placement(); - if (convert_back_units) { + if (settings().convert_back_units()) { gp_Trsf scale; scale.SetScaleFactor(1.0 / settings().unit_magnitude()); trsf.PreMultiply(scale); diff --git a/src/ifcgeom/IfcGeomRepresentation.h b/src/ifcgeom/IfcGeomRepresentation.h index 7e5066cf0b..b151b29cbb 100644 --- a/src/ifcgeom/IfcGeomRepresentation.h +++ b/src/ifcgeom/IfcGeomRepresentation.h @@ -69,7 +69,6 @@ namespace IfcGeom { class Serialization : public Representation { private: int _id; - bool convert_back_units; std::string _brep_data; public: int id() const { return _id; }