Merge branch 'IfcOpenShell:v0.8.0' into v0.8.0

This commit is contained in:
Richard Brice
2023-12-01 07:22:29 -08:00
committed by GitHub
5 changed files with 32 additions and 12 deletions
+8 -2
View File
@@ -42,10 +42,16 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRepresentation* inst) {
// @todo
// if (s.ShapeType() == TopAbs_COMPOUND && TopoDS_Iterator(s).More() && TopoDS_Iterator(s).Value().ShapeType() == TopAbs_SOLID) {
return filter_in_place(items, [&use_body](taxonomy::ptr i) {
auto filtered = filter_in_place(items, [&use_body](taxonomy::ptr i) {
// @todo just filter loops for now.
return (i->kind() != taxonomy::LOOP) == use_body;
return (i->kind() != taxonomy::LOOP && i->kind() != taxonomy::PIECEWISE_FUNCTION) == use_body;
});
if (filtered->children.empty()) {
return nullptr;
}
return filtered;
}
/*
+5 -7
View File
@@ -236,14 +236,12 @@ void mapping::get_representations(std::vector<geometry_conversion_task>& tasks,
}
// @todo, fix this properly by considering the mapped geometry types in the representation.
if (representation->RepresentationIdentifier() && *representation->RepresentationIdentifier() == "Body") {
geometry_conversion_task task;
task.index = task_index++;
task.representation = representation;
task.products = ifcproducts->generalize();
geometry_conversion_task task;
task.index = task_index++;
task.representation = representation;
task.products = ifcproducts->generalize();
tasks.emplace_back(task);
}
tasks.emplace_back(task);
}
}