There are several types of faceted topology objects in Teigha BIM. Each type has four different parameters:
- Max points
- Precision
- Presence of offset
- Flags
The following is a table of facet topology differences:
Type | Max points | Precision | Offset | Edge visibility flags |
FacetedTopology0 | 64K | Single | - | - |
FacetedTopology1 | 4M | Single | - | - |
FacetedTopology2 | 64K | Single | + | - |
FacetedTopology3 | 4M | Single | + | - |
FacetedTopology4 | 64K | Double | - | - |
FacetedTopology5 | 4M | Double | - | - |
FacetedTopology8 | 64K | Single | - | + |
FacetedTopology9 | 4M | Single | - | + |
FacetedTopology10 | 64K | Single | + | + |
FacetedTopology11 | 4M | Single | + | + |
FacetedTopology12 | 64K | Double | - | + |
FacetedTopology13 | 4M | Double | - | + |
As you can see, there are pros and cons to these types of facet topologies:
- Max Points — A container for faceted topologies with 4M points occupies more memory, but it can represent a more detailed model (up to 4 million points can be used).
- Precision — A container with double precision values (“double”) is more precise but takes two times the memory than single-precision (“float”): 8 bytes instead of 4 bytes for each point.
- Offset — An additional 3D-based value allows for the possibility to add the object’s offset, but it allocates more memory.
- Edges visibility flags — More memory is needed for these flags, but it gives additional advantages in special cases.
To create various faceted topologies, the Teigha BIM “BmMasterImportSymbolGPolyMesh_20009_ISH“ test was created (you can find it in \Bim\Tests\TB_UnitTests\BmMasterImportSymbolGPolyMesh_20009.cpp). It demonstrates the creation of different faceted topologies, including import from an .stl file.