Fixes to flatten_shape_list()

This commit is contained in:
aothms
2015-10-07 16:14:34 +02:00
parent 3a9e90f94f
commit c7ddc0643e
+12 -2
View File
@@ -776,8 +776,14 @@ bool IfcGeom::Kernel::flatten_shape_list(const IfcGeom::IfcRepresentationShapeIt
_trsf = trsf.Trsf();
trsf_valid = true;
} catch (...) {}
const TopoDS_Shape moved_shape = trsf_valid ? merged.Moved(_trsf) :
BRepBuilderAPI_GTransform(merged,trsf,true).Shape();
const TopoDS_Shape moved_shape = trsf.Form() == gp_Identity
? merged
: (
trsf_valid
? merged.Moved(_trsf)
: BRepBuilderAPI_GTransform(merged,trsf,true).Shape()
);
if (shapes.size() == 1) {
result = moved_shape;
@@ -809,6 +815,10 @@ bool IfcGeom::Kernel::flatten_shape_list(const IfcGeom::IfcRepresentationShapeIt
}
}
if (!fuse) {
result = compound;
}
const bool success = !result.IsNull();
if (success) {
const double precision = getValue(GV_PRECISION);