mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +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);
|
Triangulate(settings, iden, t, -1);
|
||||||
return t;
|
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)
|
ConversionResult(int id, ConversionResultShape* shape)
|
||||||
: id(id), placement_(ifcopenshell::geometry::taxonomy::make<ifcopenshell::geometry::taxonomy::matrix4>()), shape_(shape)
|
: id(id), placement_(ifcopenshell::geometry::taxonomy::make<ifcopenshell::geometry::taxonomy::matrix4>()), shape_(shape)
|
||||||
{}
|
{}
|
||||||
void append(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf) {
|
void append(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf);
|
||||||
// @todo verify order
|
void prepend(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf);
|
||||||
placement_->components() = placement_->ccomponents() * trsf->ccomponents();
|
|
||||||
}
|
|
||||||
void prepend(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf) {
|
|
||||||
// @todo verify order
|
|
||||||
placement_->components() = trsf->ccomponents() * placement_->ccomponents();
|
|
||||||
}
|
|
||||||
std::shared_ptr<ConversionResultShape> Shape() const { return shape_; }
|
std::shared_ptr<ConversionResultShape> Shape() const { return shape_; }
|
||||||
ifcopenshell::geometry::taxonomy::matrix4::ptr Placement() const { return placement_; }
|
ifcopenshell::geometry::taxonomy::matrix4::ptr Placement() const { return placement_; }
|
||||||
bool hasStyle() const { return !!style_; }
|
bool hasStyle() const { return !!style_; }
|
||||||
|
|||||||
Reference in New Issue
Block a user