mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
Fix funky mep geometry #5255
This commit is contained in:
@@ -47,7 +47,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCartesianTransformationOpera
|
|||||||
}
|
}
|
||||||
|
|
||||||
double scale1, scale2;
|
double scale1, scale2;
|
||||||
scale1 = scale2 = 1.0;
|
scale1 = 1.0;
|
||||||
|
|
||||||
if (inst->Scale()) {
|
if (inst->Scale()) {
|
||||||
scale1 = *inst->Scale();
|
scale1 = *inst->Scale();
|
||||||
@@ -55,6 +55,8 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCartesianTransformationOpera
|
|||||||
if (inst->as<IfcSchema::IfcCartesianTransformationOperator2DnonUniform>()) {
|
if (inst->as<IfcSchema::IfcCartesianTransformationOperator2DnonUniform>()) {
|
||||||
auto nu = inst->as<IfcSchema::IfcCartesianTransformationOperator2DnonUniform>();
|
auto nu = inst->as<IfcSchema::IfcCartesianTransformationOperator2DnonUniform>();
|
||||||
scale2 = nu->Scale2() ? *nu->Scale2() : scale1;
|
scale2 = nu->Scale2() ? *nu->Scale2() : scale1;
|
||||||
|
} else {
|
||||||
|
scale2 = scale1;
|
||||||
}
|
}
|
||||||
|
|
||||||
m->components() <<
|
m->components() <<
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCartesianTransformationOpera
|
|||||||
}
|
}
|
||||||
|
|
||||||
double scale1, scale2, scale3;
|
double scale1, scale2, scale3;
|
||||||
scale1 = scale2 = scale3 = 1.;
|
scale1 = 1.;
|
||||||
|
|
||||||
if (inst->Scale()) {
|
if (inst->Scale()) {
|
||||||
scale1 = *inst->Scale();
|
scale1 = *inst->Scale();
|
||||||
@@ -59,6 +59,8 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCartesianTransformationOpera
|
|||||||
auto nu = inst->as<IfcSchema::IfcCartesianTransformationOperator3DnonUniform>();
|
auto nu = inst->as<IfcSchema::IfcCartesianTransformationOperator3DnonUniform>();
|
||||||
scale2 = nu->Scale2() ? *nu->Scale2() : scale1;
|
scale2 = nu->Scale2() ? *nu->Scale2() : scale1;
|
||||||
scale3 = nu->Scale3() ? *nu->Scale3() : scale1;
|
scale3 = nu->Scale3() ? *nu->Scale3() : scale1;
|
||||||
|
} else {
|
||||||
|
scale2 = scale3 = scale1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scale1 != 1.) {
|
if (scale1 != 1.) {
|
||||||
|
|||||||
Reference in New Issue
Block a user