:orphan:

##########
U3D Reader
##########

.. rst-class:: format-title-block

+----------------------------------------------------------------------+
|                        **U3D Format**                                |
+-----------------------------------------+----------------------------+
| **File Extension**                      | U3D                        |
+-----------------------------------------+----------------------------+
| **Supported Versions**                  | ECMA-363                   |
+-----------------------------------------+----------------------------+
| **Platforms**                           | |wy| |ly| |my| |ay| |iy|   | 
+-----------------------------------------+----------------------------+
| **B-rep**                               | |c_grey| N/A               | 
+-----------------------------------------+----------------------------+
| **PMI**                                 | |c_grey| N/A               | 
+-----------------------------------------+----------------------------+
| **Tessellation**                        | |t_green|                  | 
+-----------------------------------------+----------------------------+
| **Views**                               | |c_red|                    |
+-----------------------------------------+----------------------------+
| **Visualization**                       | |c_green|                  |
+-----------------------------------------+----------------------------+

The U3D (Universal 3D) file format was developed by a consortium called the 3D Industry Forum (3DIF), spearheaded by Intel Corporation, and later standardized by Ecma International (as ECMA-363) in the mid-2000s to facilitate sharing 3D CAD data, especially within PDF documents.

Our U3D Reader provides access to the visualization data stored within a U3D file. The most common file extension for U3D files is *.U3D*.

HOOPS Exchange geometry access for U3D includes:

* **Tessellation:** Mesh or polygonal geometry is imported directly.
* **B-rep:** Not supported by this format - HOOPS Exchange treats it as tessellation only.


How to Import From U3D 
======================

If you are new to reading models with HOOPS Exchange, see the :doc:`basic load workflow </guide/basic_operations/load_model`>` section of the Programming Guide.

To load a U3D file, use :cpp:func:`A3DAsmModelFileLoadFromFile`.

Below, the ``A3DParamsLoadData`` structure is used to customize the loading behavior. See our :cpp:struct:`API reference manual <A3DParamsLoadData>` for more information about this important data type.

.. code-block:: c

   A3DAsmModelFile* pModelFile = 0;

   A3DRWParamsLoadData sReadParam;
   A3D_INITIALIZE_DATA(A3DRWParamsLoadData, sReadParam);
   sReadParam.m_sGeneral.m_bReadSolids = true;

   // ... set other A3DRWParamsLoadData fields as necessary

   A3DAsmModelFileLoadFromFile("path/to/file.u3d", &sReadParam, &pModelFile);

See :doc:`/guide/basic_operations/load_model` for general information about loading model files.


Assembly
========

This concept is not supported by U3D. However, U3D files may contain multiple components or objects. HOOPS Exchange represents these as a model tree that you can traverse using the standard structure APIs.

To learn more about how HOOPS Exchange handles assemblies, see our tutorial about :doc:`assembly traversal </tutorials/c/print-assembly-structure>`.


B-Rep
=====

This concept is not supported by U3D.


Visualization
=============

This concept is not supported by U3D.


Views
=====

HOOPS Exchange does not currently support U3D views.


PMI
===

This concept is not supported by U3D.


Miscellaneous
=============

Construction geometries are handled by the reader.


Limitations
===========

The animation stored within a particular file is not exposed to developers.
However, if you are providing a U3D file to Advanced Publishing to put into a PDF document, then the U3D remains unchanged and the animation remains available and can be exposed in the PDF document.
