简体   繁体   中英

IfcRoof won't work without own ShapeRepresentation

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 , 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM