.. _twogeometries-example:

##############
Two Geometries
##############

.. image:: ../../../images/vtfx/twogeometries_example.png
    :height: 250px
    :align: center

This example shows how to write two different geometries to the same database. This could be useful if you have separate 
entities in your model, and especially so if you are going to read this file into a |FamilyName| based application 
where you want to use multiple geometries for structural reasons.

It is also useful to use multiple geometries if some parts of your model/scene have a static topology and some parts 
have an adaptive topology.

The example shows how to create two geometries in the same model. There are two time steps, and the first part has an 
adaptive topology and has a different mesh in the two time steps, whereas the second part has the same topology in both 
states.

.. seealso::

    :ref:`adaptivetopology-example`


.. literalinclude:: ../../../../../../EnvisionDesktop/Examples/VTFx/VTFxTwoGeometries/VTFxTwoGeometries.cpp
    :language: cpp
    :lines: 53-409
