mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Fixes to flatten_shape_list()
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user