MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / addBuildingProduct

Method addBuildingProduct

src/ifcparse/IfcHierarchyHelper.cpp:271–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269
270template <typename Schema>
271typename 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
298template <typename Schema>
299void IfcHierarchyHelper<Schema>::addExtrudedPolyline(typename Schema::IfcShapeRepresentation* rep,

Callers 9

mainFunction · 0.80
create_testcase_forFunction · 0.80
create_curve_rebarFunction · 0.80
create_testcaseFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
create_testcase_forFunction · 0.80
create_product_from_itemFunction · 0.80
mainFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected