| 81 | return false; |
| 82 | } |
| 83 | virtual bool convert(const taxonomy::ptr item, IfcGeom::ConversionResults& rs) |
| 84 | { |
| 85 | auto ops = mapping_->find_openings(item->instance->as<IfcUtil::IfcBaseEntity>()); |
| 86 | bool has_openings = ops && ops->size(); |
| 87 | for (auto& k : kernels_) { |
| 88 | #ifdef IFOPSH_WITH_CGAL |
| 89 | if (has_openings && !k->supports_boolean_operations()) { |
| 90 | // @todo this would fail later on in the find_openings() call, because we have a |
| 91 | // SimpleCgalShape which cannot be used on a kernel that supports booleans. |
| 92 | // @todo 1 implement the translation between various conversion result shapes |
| 93 | // @todo 2 fold the boolean result openings into the taxonomy item. This should be possible |
| 94 | // now that we have shared_ptr<item> and caching in place. So the inability |
| 95 | // to instance wouldn't matter as much. |
| 96 | continue; |
| 97 | } |
| 98 | #endif |
| 99 | bool success = false; |
| 100 | try { |
| 101 | success = k->convert(item, rs); |
| 102 | } catch (...) {} |
| 103 | if (success) { |
| 104 | return true; |
| 105 | } |
| 106 | } |
| 107 | return false; |
| 108 | } |
| 109 | virtual bool apply_layerset(IfcGeom::ConversionResults& items, const ifcopenshell::geometry::layerset_information& layers) |
| 110 | { |
| 111 | for (auto& k : kernels_) { |
nothing calls this directly
no test coverage detected