mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
Reverse matrix multiplication order
This commit is contained in:
@@ -192,7 +192,7 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcObjectPlacement* l, cgal_p
|
|||||||
// } std::cout << std::endl;
|
// } std::cout << std::endl;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
trsf = trsf * trsf2; // TODO: I think it's fine, but maybe should it be the other way around?
|
trsf = trsf2 * trsf;
|
||||||
|
|
||||||
// std::cout << "trsf (after multiplication)" << std::endl;
|
// std::cout << "trsf (after multiplication)" << std::endl;
|
||||||
// for (int i = 0; i < 3; ++i) {
|
// for (int i = 0; i < 3; ++i) {
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ bool IfcGeom::CgalKernel::convert_openings(const IfcSchema::IfcProduct* entity,
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// Move the opening into the coordinate system of the IfcProduct
|
// Move the opening into the coordinate system of the IfcProduct
|
||||||
opening_trsf = opening_trsf * entity_trsf.inverse();
|
opening_trsf = entity_trsf.inverse() * opening_trsf;
|
||||||
|
|
||||||
// std::cout << "opening_trsf after" << std::endl;
|
// std::cout << "opening_trsf after" << std::endl;
|
||||||
// for (int i = 0; i < 3; ++i) {
|
// for (int i = 0; i < 3; ++i) {
|
||||||
@@ -248,7 +248,7 @@ bool IfcGeom::CgalKernel::convert_openings(const IfcSchema::IfcProduct* entity,
|
|||||||
if (opening_shapes[i].Placement()) {
|
if (opening_shapes[i].Placement()) {
|
||||||
gtrsf = *(CgalPlacement*)opening_shapes[i].Placement();
|
gtrsf = *(CgalPlacement*)opening_shapes[i].Placement();
|
||||||
}
|
}
|
||||||
gtrsf = gtrsf * opening_trsf;
|
gtrsf = opening_trsf * gtrsf;
|
||||||
cgal_shape_t opening_shape(((CgalShape*)opening_shapes[i].Shape())->shape());
|
cgal_shape_t opening_shape(((CgalShape*)opening_shapes[i].Shape())->shape());
|
||||||
for (auto &vertex: vertices(opening_shape)) vertex->point() = vertex->point().transform(gtrsf);
|
for (auto &vertex: vertices(opening_shape)) vertex->point() = vertex->point().transform(gtrsf);
|
||||||
opening_shapelist.push_back(opening_shape);
|
opening_shapelist.push_back(opening_shape);
|
||||||
|
|||||||
Reference in New Issue
Block a user