.. _group__a3d__reference__on__topo:

##################################
Reference on Topology/Tessellation
##################################

Creates and accesses entities that reference topological entities and that specify globally-defined attributes.


   2.0


Entity type is :c:enumerator:`~kA3DTypeMiscReferenceOnTopology`\ .

Referenced topological entities are retrieved by indexes which are meaningful in the context of their parent element.

For a :c:type:`~A3DTopoConnex`\ , it needs:


- the :c:type:`~A3DTopoConnex` index on the current :c:type:`~A3DTopoBrepData`\ .

For a :c:type:`~A3DTopoShell`\ , it needs:


- 
.. code-block:: c

     A3DUns32 uiShellIndex = 0;
     for all pConnex on A3DTopoBrepData
     {
         for all pShell on pConnex
         {
             if pShell is wanted
                 return uiShellIndex;
             uiShellIndex++;
         }
     }


For a :c:type:`~A3DTopoFace`\ , it needs:


- 
.. code-block:: c

     A3DUns32 uiFaceIndex = 0;
     for all pConnex on A3DTopoBrepData
     {
         for all pShell on pConnex
         {
             for all pFace on pShell
             {
                 if pFace is wanted
                     return uiFaceIndex;
                 uiFaceIndex++;
             }
         }
     }


For a :c:type:`~A3DTopoEdge` or :c:type:`~A3DTopoCoEdge`\ , it needs:


- the :c:type:`~A3DTopoFace` index on the current :c:type:`~A3DTopoBrepData` (see index need for :c:type:`~A3DTopoFace` reference). 
- the :c:type:`~A3DTopoLoop` index on the current :c:type:`~A3DTopoFace`\ . 
- the :c:type:`~A3DTopoCoEdge` index on the current :c:type:`~A3DTopoLoop`\ .

For a :c:type:`~A3DTopoVertex`\ , it needs:


- the :c:type:`~A3DTopoFace` index on the current :c:type:`~A3DTopoBrepData` (see index need for :c:type:`~A3DTopoFace` reference). 
- the :c:type:`~A3DTopoLoop` index on the current :c:type:`~A3DTopoFace`\ . 
- the :c:type:`~A3DTopoCoEdge` index on the current :c:type:`~A3DTopoLoop`\ . 
- the :c:type:`~A3DTopoVertex` index on the current :c:type:`~A3DTopoEdge`\ . Is set to 0 for the start vertex, and 1 for the end vertex. 

.. rst-class:: kind-group kind-function

.. rubric:: Functions
   :class: kind-group-title


.. rst-class:: api-xref-list


* :c:func:`~A3DMiscReferenceOnTessCreate`
* :c:func:`~A3DMiscReferenceOnTessGet`
* :c:func:`~A3DMiscReferenceOnTopologyCreate`
* :c:func:`~A3DMiscReferenceOnTopologyGet`


