mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 04:29:55 +00:00
Check for empty result from map(IfcRepresentation) in iterator
This commit is contained in:
@@ -178,6 +178,9 @@ namespace IfcGeom {
|
|||||||
for (auto& task : reps) {
|
for (auto& task : reps) {
|
||||||
geometry_conversion_result res;
|
geometry_conversion_result res;
|
||||||
res.item = converter_->mapping()->map(task.representation);
|
res.item = converter_->mapping()->map(task.representation);
|
||||||
|
if (!res.item) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
std::transform(task.products->begin(), task.products->end(), std::back_inserter(res.products), [this, &res](IfcUtil::IfcBaseClass* prod) {
|
std::transform(task.products->begin(), task.products->end(), std::back_inserter(res.products), [this, &res](IfcUtil::IfcBaseClass* prod) {
|
||||||
auto prod_item = converter_->mapping()->map(prod);
|
auto prod_item = converter_->mapping()->map(prod);
|
||||||
return std::make_pair(prod->as<IfcUtil::IfcBaseEntity>(), taxonomy::cast<taxonomy::geom_item>(prod_item)->matrix);
|
return std::make_pair(prod->as<IfcUtil::IfcBaseEntity>(), taxonomy::cast<taxonomy::geom_item>(prod_item)->matrix);
|
||||||
|
|||||||
Reference in New Issue
Block a user