mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
Fixes double unit conversion when convert-back-units are used
This commit is contained in:
committed by
Thomas Krijnen
parent
206cd6bbe1
commit
52d894298e
@@ -977,12 +977,14 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
|||||||
if (item == nullptr) {
|
if (item == nullptr) {
|
||||||
throw IfcParse::IfcException("Failed to convert placement");
|
throw IfcParse::IfcException("Failed to convert placement");
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (st.get<ifcopenshell::geometry::settings::ConvertBackUnits>().get()) {
|
if (st.get<ifcopenshell::geometry::settings::ConvertBackUnits>().get()) {
|
||||||
// we pass the settings to the Transformation object, but access the data just offloads to the
|
// we pass the settings to the Transformation object, but access the data just offloads to the
|
||||||
// generic cartesian_base<Matrix4> so there's no time to apply the settings to the translation part.
|
// generic cartesian_base<Matrix4> so there's no time to apply the settings to the translation part.
|
||||||
item = ifcopenshell::geometry::taxonomy::matrix4::ptr(item->clone_());
|
item = ifcopenshell::geometry::taxonomy::matrix4::ptr(item->clone_());
|
||||||
item->components().col(3).head<3>() /= kernel.settings().get<ifcopenshell::geometry::settings::LengthUnit>().get();
|
item->components().col(3).head<3>() /= kernel.settings().get<ifcopenshell::geometry::settings::LengthUnit>().get();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return new IfcGeom::Transformation(kernel.settings(), item);
|
return new IfcGeom::Transformation(kernel.settings(), item);
|
||||||
} else {
|
} else {
|
||||||
if (!representation) {
|
if (!representation) {
|
||||||
|
|||||||
Reference in New Issue
Block a user