:orphan:

###################
Autodesk DWF Reader
###################


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

+--------------------------------------------------------------------------+
|                        **Autodesk Design Web Format**                    |
+-----------------------------------------+--------------------------------+
| **File Extension**                      | DWF, DWFX                      |
+-----------------------------------------+--------------------------------+
| **Supported Versions**                  | Any                            |
+-----------------------------------------+--------------------------------+
| **Platforms**                           | |wy| |ly| |mn| |ay| |iy|       | 
+-----------------------------------------+--------------------------------+
| :ref:`dwf_tessellation`                 | |t_green| Supported            |
+-----------------------------------------+--------------------------------+
| :ref:`dwf_brep`                         | |c_grey| Unsupported by format |
+-----------------------------------------+--------------------------------+
| :ref:`dwf_pmi`                          | |c_grey| Unsupported by format |
+-----------------------------------------+--------------------------------+

DWF is a lightweight CAD publishing format intended for design visualization and distribution. 
When read by HOOPS Exchange, it provides access to tessellated 3D objects and associated visual attributes, but does not expose full CAD model definitions.

A file does not need to have a particular extension to be read correctly by HOOPS Exchange. 
However, the file extensions of DWF files that you can expect to be loaded by HOOPS Exchange are:

* `.DWF`
* `.DWFX`

How to Import From DWF
======================

Reading ``Autodesk`` files follows the same pattern as other formats: configure load parameters, then call the standard load function.

To load an Autodesk DWF file, use :cpp:func:`A3DAsmModelFileLoadFromFile`.
The :cpp:struct:`A3DParamsLoadData` structure is used to customize the loading behavior:

.. code-block:: c

   A3DAsmModelFile* pModelFile = 0;

   A3DRWParamsLoadData sReadParam = A3D_MAKE_DATA(A3DRWParamsLoadData);
   sReadParam.m_sGeneral.m_bReadSolids = true;

   // ... set other A3DRWParamsLoadData fields as necessary

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

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

.. _dwf_tessellation: 

Tessellation
============

Triangle data, along with RGBA color and texture information, is parsed and provided by HOOPS Exchange.

.. _dwf_brep: 

Boundary Representation (B-rep)
===============================

Boundary Representation is unsupported by DWF.

.. _dwf_pmi: 

Product and Manufacturing Information (PMI)
=======================================

Product and Manufacturing Information (PMI) is unsupported by DWF.

.. _dwf_assembly:

Assembly
========

Incremental load is unsupported for DWF.

Model Tree Names and Order
**************************

A DWF file describes its model twice: once in the 3D graphics, and once in an XML content description.
HOOPS Exchange builds the product occurrence tree from the graphics.
It then takes the names and properties of the product occurrences from the XML content description.

Starting with HOOPS Exchange 2026.8.0, the product occurrence tree follows these rules:

* Each product occurrence takes the label of its matching object in the XML content description as its name.
  The properties of that object become attributes of the product occurrence.
  Shared properties go to the prototype of the product occurrence, when it has one.
* Sibling product occurrences are sorted by their node number in the graphics.
  This applies only when each sibling has a node number, and no two siblings have the same one.
* Unnamed product occurrences without child occurrences are removed when they are directly below the root product occurrence.

When HOOPS Exchange cannot match a product occurrence with an object of the XML content description, the product occurrence keeps its name from the graphics.
This name is often a number.

These rules give a model tree that is closer to the tree displayed by Autodesk viewers.

Views
=====

Views are unsupported by DWF.

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

DWF-specific Import Options
***************************

There are no import options specific to the DWF format.

Limitations
***********

* Reading DWF is supported only on Windows and Linux platforms.
* Only 3D objects are supported during import.
