IfcRoof won't work without own ShapeRepresentation

100 views Asked by At

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?

1

There are 1 answers

0
hlg On

You may have inverted the aggregation relation. For IfcRelAggregates, the RelatingObject side should refer to the whole (that is IfcRoof) and the RelatedObjects side should refer to the parts (that is IfcSlab). If you do it the other way round, the viewer will not find any parts of the roof with geometry and show nothing.