buildingSMART Forums


Is anybody using IfcTriangulatedFaceSet for export?
Could you please give some examples?

I do, but unfortunately, I cannot share the model.

Here is a snippet, hopefully it helps:

#10397 = IFCCARTESIANPOINTLIST3D(((3.76133079953433E-5, 99.999932308654, 300.000045776385), (143.680221023953, 99.999932308654, 300.000045776385), (56.3198557285423, 99.999932308654, -2.47192364440707E-4), (3.76133079953433E-5, 99.999932308654, -2.47192364440707E-4), (100.000038376247, 2.22225646211882E-4, -2.47192364440707E-4), (56.3198557285423, 2.22225646211882E-4, -2.47192364440707E-4), (100.000038376247, 2.22225646211882E-4, 300.000045776385), (143.680221023953, 2.22225646211882E-4, 300.000045776385)));
#10407 = IFCTRIANGULATEDFACESET(#10397, $, $, ((1, 2, 3), (3, 4, 1), (3, 4, 5), (5, 6, 3), (6, 5, 7), (7, 8, 6), (7, 8, 2), (2, 1, 7), (4, 5, 7), (7, 1, 4), (8, 6, 3), (3, 2, 8)), $);

Thanks Moult.
Why do not you use IfcPolygonalFaceSet?
I see only justification to use IfcTriangulatedFace.Normals, it any cases IfcPolygonalFaceSet is preferable. Or am I missing?

Well, corrected question: is anybody using IfcTriangulatedFaceSet with Normals for export?

@igor.sokolov, I believe IfcTriangulatedFaceSet has two more advantages even if not using normals:

  1. You can assume triangles and don’t need to do triangulation (or verify it is triangulated) in case the consuming application works well with triangulated meshes anyway.
  2. The indexing is much more compact (resulting in smaller instances). For IfcTriangulatedFaceSet you have a twodimensional array with vertex indexes per face, for IfcPolygonalFaceSet you have an entity instance of type IfcIndexedPolygonalFace for every face. I believe this is mainly due to the fact that these faces are allowed to have voids and it would be borderline to do this with nested arrays (you would need three dimensions I guess).

For these reasons, I think if you have a triangulation anyway, thus no faces with voids, I would use IfcTriangulatedFaceSet rather than IfcPolygonalFaceSet.

Admittedly, that does not answer your corrected question.

1 Like

We are using them for export with normals, but I am not convinced that we are doing so correctly. At present we are using the form present in 4.0 and 4.0ADD1 (with a list-of-triplets-of indices for the normals). 4.0 ADD2 has a different and incompatible arrangement that we do not yet support.

Two examples from our tests are attached, a box - where the normals are not really needed, and a cylinder, where they do make a difference. (In both these cases, of course, there are alternative ways of representing the geometry)

MultiExport_3-7-1-9_BoxFacetted_ifc4_.ifc (6.0 KB) MultiExport_3-7-1-12_CylinderFacetted_ifc4_.ifc (41.6 KB)