mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 02:07:36 +00:00
Fixed issue with transformations?
This commit is contained in:
@@ -704,9 +704,10 @@ namespace IfcGeom {
|
|||||||
next_shape_model = create_shape_model_for_next_entity();
|
next_shape_model = create_shape_model_for_next_entity();
|
||||||
|
|
||||||
// std::cout << "trsf" << std::endl;
|
// std::cout << "trsf" << std::endl;
|
||||||
|
// IfcGeom::CgalPlacement *trsf = next_shape_model->transformation().data();
|
||||||
// for (int i = 0; i < 3; ++i) {
|
// for (int i = 0; i < 3; ++i) {
|
||||||
// for (int j = 0; j < 4; ++j) {
|
// for (int j = 0; j < 4; ++j) {
|
||||||
// std::cout << next_shape_model->transformation().matrix().data() << " ";
|
// std::cout << << " ";
|
||||||
// } std::cout << std::endl;
|
// } std::cout << std::endl;
|
||||||
// }
|
// }
|
||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ bool IfcGeom::CgalKernel::convert_shape(const IfcBaseClass* l, cgal_shape_t& r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( processed && success ) {
|
if ( processed && success ) {
|
||||||
const double precision = getValue(GV_PRECISION);
|
// const double precision = getValue(GV_PRECISION);
|
||||||
// apply_tolerance(r, precision);
|
// apply_tolerance(r, precision);
|
||||||
#ifndef NO_CACHE
|
#ifndef NO_CACHE
|
||||||
cache.Shape[id] = r;
|
cache.Shape[id] = r;
|
||||||
|
|||||||
@@ -97,12 +97,12 @@ IfcGeom::NativeElement<double>* IfcGeom::CgalKernel::create_brep_for_representat
|
|||||||
convert(product->ObjectPlacement(), trsf);
|
convert(product->ObjectPlacement(), trsf);
|
||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
|
|
||||||
std::cout << "trsf" << std::endl;
|
// std::cout << "trsf" << std::endl;
|
||||||
for (int i = 0; i < 3; ++i) {
|
// for (int i = 0; i < 3; ++i) {
|
||||||
for (int j = 0; j < 4; ++j) {
|
// for (int j = 0; j < 4; ++j) {
|
||||||
std::cout << trsf.cartesian(i, j) << " ";
|
// std::cout << trsf.cartesian(i, j) << " ";
|
||||||
} std::cout << std::endl;
|
// } std::cout << std::endl;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Does the IfcElement have any IfcOpenings?
|
// Does the IfcElement have any IfcOpenings?
|
||||||
// Note that openings for IfcOpeningElements are not processed
|
// Note that openings for IfcOpeningElements are not processed
|
||||||
@@ -115,7 +115,22 @@ IfcGeom::NativeElement<double>* IfcGeom::CgalKernel::create_brep_for_representat
|
|||||||
Logger::Message(Logger::LOG_ERROR, "Not implemented opening subtractions");
|
Logger::Message(Logger::LOG_ERROR, "Not implemented opening subtractions");
|
||||||
}
|
}
|
||||||
|
|
||||||
shape = new IfcGeom::Representation::Native(element_settings, representation->entity->id(), shapes);
|
if (settings.get(IteratorSettings::USE_WORLD_COORDS)) {
|
||||||
|
// TODO: OpenCascade code uses opened_shapes. Check why.
|
||||||
|
for ( IfcGeom::ConversionResults::iterator it = shapes.begin(); it != shapes.end(); ++ it ) {
|
||||||
|
it->prepend(new CgalPlacement(trsf));
|
||||||
|
}
|
||||||
|
trsf = Kernel::Aff_transformation_3();
|
||||||
|
shape = new IfcGeom::Representation::Native(element_settings, representation->entity->id(), shapes);
|
||||||
|
} else if (settings.get(IteratorSettings::USE_WORLD_COORDS)) {
|
||||||
|
for ( IfcGeom::ConversionResults::iterator it = shapes.begin(); it != shapes.end(); ++ it ) {
|
||||||
|
it->prepend(new CgalPlacement(trsf));
|
||||||
|
}
|
||||||
|
trsf = Kernel::Aff_transformation_3();
|
||||||
|
shape = new IfcGeom::Representation::Native(element_settings, representation->entity->id(), shapes);
|
||||||
|
} else {
|
||||||
|
shape = new IfcGeom::Representation::Native(element_settings, representation->entity->id(), shapes);
|
||||||
|
}
|
||||||
|
|
||||||
std::string context_string = "";
|
std::string context_string = "";
|
||||||
if (representation->hasRepresentationIdentifier()) {
|
if (representation->hasRepresentationIdentifier()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user