| 269 | |
| 270 | template <typename Schema> |
| 271 | typename Schema::IfcBuildingStorey* IfcHierarchyHelper<Schema>::addBuildingProduct(typename Schema::IfcProduct* product, |
| 272 | typename Schema::IfcBuildingStorey* storey, |
| 273 | typename Schema::IfcOwnerHistory* owner_hist) { |
| 274 | if (!owner_hist) { |
| 275 | owner_hist = getSingle<typename Schema::IfcOwnerHistory>(); |
| 276 | } |
| 277 | if (!owner_hist) { |
| 278 | owner_hist = addOwnerHistory(); |
| 279 | } |
| 280 | if (!storey) { |
| 281 | storey = getSingle<typename Schema::IfcBuildingStorey>(); |
| 282 | } |
| 283 | if (!storey) { |
| 284 | storey = addBuildingStorey(0, owner_hist); |
| 285 | } |
| 286 | addEntity(product); |
| 287 | |
| 288 | // CV-2x3-158: Don't add decompositions directly to a building storey |
| 289 | const bool is_decomposition = product->Decomposes()->size() > 0; |
| 290 | |
| 291 | if (!is_decomposition) { |
| 292 | addRelatedObject<typename Schema::IfcRelContainedInSpatialStructure>(storey, product, owner_hist); |
| 293 | relatePlacements(storey, product); |
| 294 | } |
| 295 | return storey; |
| 296 | } |
| 297 | |
| 298 | template <typename Schema> |
| 299 | void IfcHierarchyHelper<Schema>::addExtrudedPolyline(typename Schema::IfcShapeRepresentation* rep, |
no test coverage detected