mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +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 = trsf.Trsf();
|
||||||
trsf_valid = true;
|
trsf_valid = true;
|
||||||
} catch (...) {}
|
} 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) {
|
if (shapes.size() == 1) {
|
||||||
result = moved_shape;
|
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();
|
const bool success = !result.IsNull();
|
||||||
if (success) {
|
if (success) {
|
||||||
const double precision = getValue(GV_PRECISION);
|
const double precision = getValue(GV_PRECISION);
|
||||||
|
|||||||
Reference in New Issue
Block a user