mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Merge pull request #3 from aothms/cgal
Thomas fixed the transformations
This commit is contained in:
@@ -192,7 +192,7 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcObjectPlacement* l, cgal_p
|
||||
// } 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;
|
||||
// for (int i = 0; i < 3; ++i) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// For MSVC to have M_PI
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
|
||||
#include "CgalKernel.h"
|
||||
|
||||
bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcPolyLoop* l, cgal_wire_t& result) {
|
||||
|
||||
@@ -225,7 +225,7 @@ bool IfcGeom::CgalKernel::convert_openings(const IfcSchema::IfcProduct* entity,
|
||||
// }
|
||||
|
||||
// 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;
|
||||
// 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()) {
|
||||
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());
|
||||
for (auto &vertex: vertices(opening_shape)) vertex->point() = vertex->point().transform(gtrsf);
|
||||
opening_shapelist.push_back(opening_shape);
|
||||
|
||||
Reference in New Issue
Block a user