buildingSMART Forums

Can Tessellation typed Representation hold items from another group?

Hello,
I need Your help.

During development, my program should understand IFC files exported by another CAD softwares.

Now I have found the following situation (copied only the relevant part).

#13597= IFCEXTRUDEDAREASOLID(#13593,#13596,#20,1.54);
(…)
#14443= IFCPOLYGONALFACESET(#14417,.T.,(#14393,#14395,#14397,#14399,#14409,#14411),$);
(…)
#14595= IFCSHAPEREPRESENTATION(#111,‘Body’,‘Tessellation’,(#13597,#14443));

As you can see, there is a Body Representation for an element, which has Tessellation type.
It has 2 items, one is a Polygonal Faceset, it is OK since it is in the “IfcTessellatedItem” group.
But the other one is a AreaExtrusion, which is not a Tessellation-like entity, but it belongs to the IfcSolidModel group.

The documentation for IfcShapeRepresentation has a Formal Proposition:

CorrectItemsForType: Checks the proper use of Items according to the RepresentationType .

It is worth noting that this whole representation is a Mapped thing:
#14598= IFCREPRESENTATIONMAP(#14597,#14595);
#14605= IFCMAPPEDITEM(#14598,#13514);
#14607= IFCSHAPEREPRESENTATION(#111,‘Body’,‘MappedRepresentation’,(#14605));
#14609= IFCPRODUCTDEFINITIONSHAPE(,,(#14607));

In summary, the question again:
Should a Representation hold only matching items?

Thanks in advance

1 Like

CorrectItemsForType refers to FUNCTION IfcShapeRepresentationTypes, which basically contains a mapping from the RepresentationType strings to a set of allowed geometrical entity types. The number of items is compared to the number of items that match the type criteria and these should be equal (RETURN (Count = SIZEOF(Items));). So the answer is yes.

I think the way to go is to add an additional entry to the IfcProductDefinitionShape. I assume the tesselation and the body describe the same geometry (?) so importing applications can then chose the description they support best.

Thank you Thomas for the clarification.

Yeah, it would be great, more (alternative) BODY definitions…
But in my case it is an IfcWindow, where the frame is defined by Tessellation-type bodies, while the glass is a simple Sweptsolid :frowning:

Anyway, I will send a note to the creators of the original software about this problem.

Maybe this needs consideration. If you check the documentation of https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/link/ifccsgsolid.htm you can see it mentions you can nest tessellated shapes into that solid definition, but looking at the select, it doesn’t reflect this.

I would agree with the consensus above. I also, on import, wouldn’t trust or care what that value said, since there is nothing that prevents invalid use of that label. A shared open source toolkit might validate that, but currently it is just on trust. That said, I’m going to investigate the original issue.