mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Properly read the CONVERT_BACK_UNITS setting for serialized elements
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user