I've tried to create a flatroof with an IfcSlab. The IfcRoof is supposed to be decomposed by the IfcSlab. I created the slab with a ShapeRepresentation and gave it coordinates. BuidlingSMART is saying that I don't need a ShapeRespresentation for my roof when the slab already has one. But appenrtly it doesn't work when I run my application and try to see my model in the Xplorer. The roof isn't there, but when I create an own ShapeRepresentation for the roof it works.
This is how I wanted to create the roof with the slab:
var aggregation = model.Instances.New<IfcRelAggregates>();
aggregation.RelatingObject = slabRoof;
aggregation.RelatedObjects.Add(roof);
Is there a way to create this flatroof without an extra ShapeRepresentation for the roof like it's written in buildingSMART?
You may have inverted the aggregation relation. For
IfcRelAggregates
, theRelatingObject
side should refer to the whole (that isIfcRoof
) and theRelatedObjects
side should refer to the parts (that isIfcSlab
). If you do it the other way round, the viewer will not find any parts of the roof with geometry and show nothing.