mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Don't mutate conversion result placement. Breaks combination of world coords + optimized model.
This commit is contained in:
@@ -8,3 +8,13 @@ IfcGeom::Representation::Triangulation * IfcGeom::ConversionResultShape::Triangu
|
||||
Triangulate(settings, iden, t, -1);
|
||||
return t;
|
||||
}
|
||||
|
||||
using namespace ifcopenshell::geometry::taxonomy;
|
||||
|
||||
void IfcGeom::ConversionResult::append(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf) {
|
||||
placement_ = make<matrix4>(placement_->ccomponents() * trsf->ccomponents());
|
||||
}
|
||||
|
||||
void IfcGeom::ConversionResult::prepend(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf) {
|
||||
placement_ = make<matrix4>(trsf->ccomponents() * placement_->ccomponents());
|
||||
}
|
||||
|
||||
@@ -245,14 +245,8 @@ namespace IfcGeom {
|
||||
ConversionResult(int id, ConversionResultShape* shape)
|
||||
: id(id), placement_(ifcopenshell::geometry::taxonomy::make<ifcopenshell::geometry::taxonomy::matrix4>()), shape_(shape)
|
||||
{}
|
||||
void append(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf) {
|
||||
// @todo verify order
|
||||
placement_->components() = placement_->ccomponents() * trsf->ccomponents();
|
||||
}
|
||||
void prepend(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf) {
|
||||
// @todo verify order
|
||||
placement_->components() = trsf->ccomponents() * placement_->ccomponents();
|
||||
}
|
||||
void append(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf);
|
||||
void prepend(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf);
|
||||
std::shared_ptr<ConversionResultShape> Shape() const { return shape_; }
|
||||
ifcopenshell::geometry::taxonomy::matrix4::ptr Placement() const { return placement_; }
|
||||
bool hasStyle() const { return !!style_; }
|
||||
|
||||
Reference in New Issue
Block a user