###################
HOOPS Exchange 2019
###################

.. rubric:: Format updates

+------------+-------------------+
| *Format*   | *Updated Version* |
+============+===================+
| SolidWorks | 2019              |
+------------+-------------------+
| Solid Edge | 2019              |
+------------+-------------------+
| Parasolid  | V31               |
+------------+-------------------+
| Revit      | 2019              |
+------------+-------------------+
| JT Import  | 10.2              |
+------------+-------------------+
| JT Export  | 10                |
+------------+-------------------+


.. rubric:: New Format Support (Summary)

+------------+----------------------------+-----------------------+
| *Format*   | *Support for Import/Export*|       *Platforms*     |
+============+============================+=======================+
|  FBX .fbx  |       Import/Export        |  Windows macOS Linux  |
+------------+----------------------------+-----------------------+


.. rubric:: Platform changes

* Added `3DS` import for macOS and Linux.
* Added `COLLADA` for macOS and Linux.
* Added `OBJ` export for Windows, macOS and Linux.
* Added `OBJ` import for macOS and Linux.
* Added `Revit` for Linux

.. rubric:: See also

* :doc:`/start/supported-formats`

*****************************
Compilation Toolchain Changes
*****************************

* **Linux**

  * As mentioned in the previous release, Linux binaries are now compiled using *CentOS 6* and built with *devtoolset 6*.
  * g++/gcc 6.5 (new ABI)


* **macOS**

  * We now support **macOS 10.10** *Yosemite* and **Xcode 8.3**.

* **Android**

  * Android NDK 11c - Clang with `gnustl_static`

.. rubric:: See also

* :doc:`/start/supported-platforms`

***********************
New format support: FBX
***********************

This is the first release of FBX.
FBX (originally a successor to *FilmBoX*) is an Autodesk owned proprietary format (`.fbx`). It is widely used to exchange 3D assets between 3DS Max, Maya and Unity as well as other proprietary and third-party software.

FBX can be either binary or ASCII data and HOOPS Exchange will support the reading (Import) and writing (Export) of both binary and ASCII.

Support for FBX contains:

* Import and export tessellated model (triangles only), position, color and material/texture. (The texture information is exported as external files, they are not embedded in the FBX files.)
* No animation data or information will be imported or exported.
  Polylines (PMI etc.), point clouds and meta data will be ignored, both for import and export.
* B-rep and 3D curves are not supported.
* Assembly files are exported to a unique FBX file which contains the assembly, any sub-assemblies and the part files.

.. rubric:: See also

* :doc:`/start/supported-formats`
* :doc:`/start/format/fbx_reader`
* :doc:`/start/format/fbx_writer`

**********************************
New format support: Autodesk Revit
**********************************

Supported versions and platforms:

* Revit 2015 to 2019 inclusive
* Windows and Linux
* 64 bits only.

Support for Revit contains:

* Import `.rvt` files and `.rfa` files
* Import tessellated objects
* Support for color and transparency
* Ability to sort, gather and display objects by level (storey/floor), and then on each level categories are collected together. Each level has a metadata `TYPE = IFCBUILDINGSTOREY`
* Import 3d views (change visibility + set camera)

Not supported:

* Link to external Revit files.
* Views only handle the ability to change visibilities. You cannot change the LOD (level of detail), the color or rendering mode.
* Revit metadata.
* Floor plans or drawing sheets.
* "Crop Region" from views.
* Textures.
* Instance: In case of identical `.rfa` files imported multiple times, the tessellation will simply be duplicated.

.. rubric:: See also

* :doc:`/start/supported-formats`
* :doc:`/start/format/revit_reader`

*************************
JT structure improvements
*************************

The structures obtained from JT files are now simpler and closer to the original JT structure.

If you have any questions or concerns regarding these changes, please `contact our support team <https://developer.techsoft3d.com/developer-support>`__.

.. rubric:: See also

+ :doc:`/start/supported-formats`
+ :doc:`/start/format/jt_reader`
+ :doc:`/start/format/jt_writer`

***********************
SolidWorks PMIs support
***********************

We support most PMIs in SolidWorks.
Please see the limitations in the PMI section in the :doc:`SolidWorks reader page </start/format/solidworks_reader>`.

.. rubric:: See also

* :doc:`/guide/markup`
* :doc:`/start/format/solidworks_reader`

***************************
SolidWorks features support
***************************

Feature tree reading is supported with :doc:`SolidWorks </start/format/solidworks_reader>`, with access to detailed information for holes, patterns and threads.
Pitch, handedness and tip angle data are not retrieved for threads contained in holes.

When available the feature geometry association (faces) is supported.

.. rubric:: See also

* :doc:`/start/format/solidworks_reader`
* :doc:`/guide/feature_trees`

************************************************
Identifying Rigidly Connected Parts for PTC Creo
************************************************

In HOOPS Exchange 2018 SP2, we added new functionality to identify components within a CAD assembly that are rigidly fixed to each other, valuable in motion and kinematic analysis.

The three new functions are:

- :func:`A3DAsmGetFixedComponents`
- :func:`A3DAsmGetFixedTogetherComponents`
- :func:`A3DAsmGetFlexibleComponents`

In HOOPS Exchange 2018 SP2 these new functions were supported for CATIA, NX and SolidWorks files only.
In HOOPS Exchange 2019, we have also added support for :doc:`/start/format/creo_reader`.

.. rubric:: See also

* :doc:`/guide/advanced`
* :doc:`/start/format/creo_reader`

********************************
Collision detection improvements
********************************

We've refactored our :doc:`collision detection </guide/advanced>` to improve speed and precision.

*************************
Grid-aligned tessellation
*************************

HOOPS Exchange now provides a new way to perform accurate tessellation upon loading.
The **grid-aligned tessellation** allows accurate tessellation to obtain more regular triangles, where point insertion is based on a grid layout.

To enable this feature, set :member:`A3DRWParamsTessellationData.m_bAccurateTessellationWithGrid` to `A3D_TRUE`.
If set, accurate tessellation using grid-based point placement will be used no matter what the value of :member:`A3DRWParamsTessellationData.m_bAccurateTessellation` is.

.. rubric:: See also

* :doc:`/guide/geometry/getting_tessellation`

Restricting tessellation grid size
==================================

When performing grid-based tessellation, the maximum grid stitch length may be defined.
This can lead to a more regular grid.
This maximum value may be set using :member:`A3DRWParamsTessellationData.m_dAccurateTessellationWithGridMaximumStitchLength`.
This field is a double floating point value used as a reference for the grid. Setting the value to `0.0` will disable the constraint, which is the default behavior.

A very small value may lead to a huge number of points, thus a very long tessellation process.

Side effects with curved surface
================================

As of 2018 SP2, HOOPS Exchange provided a new parameter for accurate tessellation: :member:`A3DRWParamsTessellationData.m_bAccurateSurfaceCurvatures`.
With this option the tessellation tends to create more adapted triangles along curvatures.
Now when using both this option and :member:`A3DRWParamsTessellationData.m_dAccurateTessellationWithGridMaximumStitchLength` with a small value the generated triangles may not meet expectations.

***************************
Reader feedback improvement
***************************

While :doc:`/start/supported-formats`, HOOPS Exchange identifies the format and version.
If the version is not supported by our reader, the associated error code is returned:

* `A3D_LOAD_FILE_TOO_OLD` if the input format is too old for HOOPS Exchange.
* `A3D_LOAD_FILE_TOO_RECENT` if the input format is too recent for HOOPS Exchange.

As of version 2019, this functionality is available with the formats below:

* CATIA V5
* Creo - Pro/E
* GL Transmission Format
* Autodesk Inventor
* JT
* NX - Unigraphics
* Revit
* Rhino3D
* Solid Edge
* SolidWorks
* U3D

.. rubric:: See also

* :doc:`/start/supported-formats`

************************************************
New method for retrieving features from PRC tree
************************************************

HOOPS Exchange changed the way features are stored and accessed in the PRC tree.
Previously, getting an instance of `A3DFRMFeatureTree` was accomplished using :func:`A3DAsmPartDefinitionFeatureTreesGet`.
As of this release, feature management has been moved from the part definitions to the product occurrences.

Now, features are directly stored in `A3DAsmProductoccurrence` as an array where:

* `m_uiFeatureBasedEntitiesSize` (`A3DUns32`) is the size of the array and
* `m_ppFeatureBasedEntities` (`A3DFRMFeatureTree**`) is a pointer to the array.

These fields are filled in using :func:`A3DAsmProductOccurrenceGet` and no additional function call is required.
:func:`A3DAsmPartDefinitionFeatureTreesGet` is now deprecated. Calling it will return `A3D_SUCCESS` and an empty array.

The **PRC2XML** example code has been updated to illustrate the changes.

.. rubric:: See also

+ :doc:`/guide/feature_trees`
+ :doc:`/sample_codes`

For more information about reading feature trees, see :doc:`/guide/feature_trees`.

*************
IFC 4 support
*************

By the version 2019, IFC reader supports the following B-Rep and Tessellation types:

* `IFCTESSELLATEDFACESET`
* `IFCADVANCEDBREP`
* `IFCADVANCEDBREPWITHVOIDS`
* `IFCINDEXEDPOLYCURVE` (from IFC 4 Addendum 2)
* `IFCPOLYGONALFACE` (from IFC 4 Addendum 2)

.. rubric:: See also

+ :doc:`/start/format/ifc_reader`

**************
PMI management
**************

In the :struct:`A3DMarkupGDTData` data structure, we've added an array of `A3DMDTolerance*` entities: \ref :member:`A3DMarkupGDTData.m_ppsMarkupTolerances`.
Previously this tolerance was an :struct:`A3DMDFeatureControlFrameData`.
Now this tolerance can be either an :struct:`A3DMDFeatureControlFrameData` or an :struct:`A3DMDToleranceSizeData`.

* :struct:`A3DMDToleranceSizeData` is a concatenation on a line of dimensions for defining an element. For example, for a hole we can have an :struct:`A3DMDToleranceSizeValueData` for the depth and a :struct:`A3DMDToleranceSizeValueData` for the diameter.
* :struct:`A3DMDToleranceSizeValueData`: Contains a dimension value and EA3DMDDimensionType
  "an enumerator" specifying type of dimension. And information like the symbol before the value.
* :func:`A3DMDToleranceSizeGet` can be called to fill in an :struct:`A3DMDToleranceSizeData` instance.
* :func:`A3DMDToleranceSizeValueGet` can be called to fill in an :struct:`A3DMDToleranceSizeValueData` instance.

.. rubric:: See Also

* :doc:`/guide/markup`

***************************************
Reading mode when 3D and 2D are present
***************************************

Previously, reading either 3D or 2D was specified using \ref `A3DRWParamsGeneralData::m_bReadDrawings`. With this release, the field has been replaced by an enumeration \ref `A3DRWParamsGeneralData::m_eReadingMode2D3D`. \ref `A3DEReadingMode2D3D` can either be:

* `kA3DRead_3D`: Read 3D only
* `kA3DRead_Drawings`: Read Drawings only
* `kA3DRead_Both`: Read 3D and drawings

.. rubric:: See Also

* :struct:`A3DRWParamsGeneralData`
* :doc:`/guide/basic_operations/load_model`

**********************************************************************
Enabling hidden solid and surfaces with `A3DComputePhysicalProperties`
**********************************************************************

When computing physical properties from a model file, it is now possible to decide whether hidden solid and surfaces are part of the computation or not.

This option can be toggled on using :member:`A3DPhysicalPropertiesData.m_bIncludeHiddenRIs`. By default, this field is set to `A3D_FALSE`.

.. rubric:: See Also

+ :func:`A3DComputePhysicalProperties`
+ :doc:`/guide/advanced`

*********************************
Retrieve the unit of a model file
*********************************

A new function is added: :func:`A3DAsmModelFileGetUnit`.
This function returns the unit of the model file.

The unit of a model file is the first valid unit in the ModelFile/ProductOccurrence chain.
If a valid unit is defined at the model file level, it will apply to all product occurrences.

Once a valid unit is found, the remainder of the data is interpreted with respect to that unit, even for occurrences higher in the product occurrence hierarchy.
In other words, if a product occurrence having no valid unit has a son with a valid unit, it is assumed that the entire hierarchy of model file and product occurrence are to be interpreted and used according to this unit.

.. rubric:: See also

* :doc:`/guide/basic_operations/prc_basics`

*****************************************
New option for copy-and-adapt B-Rep model
*****************************************

An new option is added :member:`A3DCopyAndAdaptBrepModelData.m_bClampTolerantUVCurvesInsideUVDomain`.
By default (`A3D_FALSE`), when using :func:`A3DCopyAndAdaptBrepModel` UV curves may stray outside the UV domain as long as the 3D edge tolerance is respected.

When set to `A3D_TRUE` UV curves will be clamped to the UV domain.

.. rubric:: See Also
   
+ :struct:`A3DCopyAndAdaptBrepModelData`
+ :doc:`/guide/geometry/getting_brep`

*********************
New option for sewing
*********************

A new structure is added which allows to customize sew: :struct:`A3DSewOptionsData`.
This implies changes in the signature of following functions:

* :func:`A3DSewBrep`
* :func:`A3DAsmModelFileSew`

With this addition a new option is available: :member:`A3DSewOptionsData.m_bComputePreferredOpenShellOrientation`.
By definition, open shells do not have a proper inward/outward orientation.
With this option enabled (`A3D_TRUE`) an orientation is inferred even if is it an open shell. The default value is `A3D_FALSE`.

.. rubric:: See also

* :struct:`A3DSewOptionsData`
* :doc:`/guide/advanced`

**************************************
New documentation for incremental load
**************************************

New documentation is available for performing an :doc:`/guide/basic_operations/load_model`.

*******************
Other C API Changes
*******************

* :struct:`A3DCollisionParameterData`: renamed `m_dTesselationTolerance` to `m_dTessellationTolerance`.
* :struct:`A3DRWParamsTranslateToPkPartsData`: renamed `m_bUseUTF8ForNameAttribute` to `m_bUseUNameAttribute`.
* :func:`A3DTopoItemOwnersManagerGet`: function parameters changed.
* :func:`A3DTopoItemOwnersGet`: function parameters changed.





