:orphan:

###############
CATIA V5 Reader
###############

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

+------------------------------------------------------------------------------------------+
|                    **CATIA V5**                                                          |
+-----------------------------------------+------------------------------------------------+
| **File Extension**                      | CATDrawing, CATPart, CATProduct, CATShape, CGR |
+-----------------------------------------+------------------------------------------------+
| **Supported Versions**                  | Up to V5-6R2026                                |
+-----------------------------------------+------------------------------------------------+
| **Platforms**                           | |wy| |ly| |my| |ay| |iy|                       |
+-----------------------------------------+------------------------------------------------+
| :ref:`catiav5_tessellation`             | |t_green| Supported                            |                     
+-----------------------------------------+------------------------------------------------+
| :ref:`catiav5_brep`                     | |c_green| Supported                            |
+-----------------------------------------+------------------------------------------------+
| :ref:`catiav5_pmi`                      | |c_green| Supported                            |                     
+-----------------------------------------+------------------------------------------------+

CATIA V5 files are native CAD formats containing complete part and assembly design data.
When read by HOOPS Exchange, they provide access to product structure, B-rep model data, 
and associated visualization information.
This includes access to the assembly, b-rep, visualization, views, and 
PMI data that is stored within a CATIA V5 file. 

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

* `.CATDrawing`
* `.CATPart`
* `.CATProduct`
* `.CATShape`
* `.CGR`

.. image:: /_assets/images/CV5_Main.png
   :align: center

How to Import From CATIA V5
===========================

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

To load a CATIA V5 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.CATPart", &sReadParam, &pModelFile);

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

.. _catiav5_tessellation: 

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

The CATIA V5 reader can directly access the cached visualization data 
(commonly referred to as CGR) stored within a CATIA V5 file. 
This occurs if upon import of the file, the reading mode in HOOPS Exchange is set 
to **tessellation only**.

.. _catiav5_brep: 

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

B-rep support within CATIA V5 is based on the CGM modeler.

HOOPS Exchange provides evaluators, which allows you to direct query all of the 
geometric types available in CGM.
Additionally, you can use HOOPS Exchange to approximate any specific geometry 
and provide it in a standard NURBS form.

The list of surface types available in CATIA V5 include:

* CATChamferSurface
* CATCone
* CATCylinder
* CATDraftSurface
* CATFilletSurface
* CATGenericFillet
* CATGenericRuledSurface
* CATLinearTransfoSurface
* CATNonLinearTransfoSurface
* CATNurbsSurface
* CATOffsetSurface
* CATPlane
* CATProcOffsetSurface
* CATRevolutionSurface
* CATRuledSurface
* CATSpecSurface
* CATSphere
* CATSweepSurface
* CATSweepSegmentSurface
* CATTabulatedCylinder
* CATTorus

The list of curve types available in CATIA V5 include:

* CATCircle
* CATEllipse
* CATHelix
* CATLine
* CATNurbsCurve
* CATPLine
* CATPCircle
* CATPCurveEquation
* CATPEllipse
* CATPHyperbola
* CATPNurbs
* CATPParabola
* CATPSpline
* CATProcCurve
* CATSplineCurve

.. _catiav5_pmi: 

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

HOOPS Exchange provides access to all PMI data available in a CATIA V5 file. 
These can be created by either the Functional Tolerancing and Annotation module 
or the Tolerance Advisor with CATIA V5. 
The PMI is provided in both Visual and Semantic form.

The list of specific PMI types supported include:

* Datum
* Datum Target
* Dimension
* Dimension (Basic)
* Dimension (Coordinate)
* Dimension (Cumulated)
* Dimension (Curvlinear)
* Dimension (Stacked)
* Distance
* Flags
* Feature Control Frame
* Geometrical Tolerance
* Note Object Attribute (Text)
* Note Object Attribute (Ditto)
* Roughness
* Weld

.. figure:: /_assets/images/CV5_PMI.png
   :align: center

   HOOPS Exchange Demo showing PMI from a CATIA V5 part

Assembly
========

External references are fully supported which means that components in the 
assembly can reside in a separate STEP or CV4 file.
The reader will automatically load and present this data to you.

Additional support is provided for:

* Datum planes and construction geometry
* Exact recreation of the CATIA V5 assembly tree (no flattening, re-organization, or renaming of parts in the assembly tree)
* Incremental load is supported by our CATIA V5 reader

Views
=====

There are two types of views supported in CATIA V5:

* **Annotation views:** A view plane in addition to visibilities that are applied to the PMI entities
* **Capture views:** A full camera definition with visibilities applied to PMI, visibilities, and transformations. These can be applied to components in the assembly and the optional definition of section planes.

Both types of views are fully supported by HOOPS Exchange.

.. _catia_v5_misc:

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

Entities can be filtered by either entity type, layer, or colors, all of which are supported by our CATIA V5 reader.

Additionally, support is provided for:

* User defined coordinate systems
* Persistent and non-persistent IDs. Very important for people who need to map their data to other CAD systems. HOOPS Exchange supports this feature at the edge, face, body, and assembly level.
* User attributes attached at all levels of the model (assemblies, parts, instances and faces)
* Entity names attached at all levels of the model (assemblies, parts, instances, faces, coordinate axes, etc.)
* Piping, except for pipes with an empty cross-section

Note that a density value of -1 means that no density was set in the CAD file

CATIAV5-specific Import Options
*******************************

:member:`A3DRWParamsCatiaV5Data.m_bCacheActivation` forces HOOPS Exchange to quickly load the CGR representation for the model.
This behavior is designed to mimic the "Work with the cache" mode in CATIA V5.

CATDRAWING Support
******************

Our CATIA V5 reader includes support for `CATDrawings`, with the drawing information provided in the structures used to represent PMI.
This functionality supports drawing views.

Publications
************

As of HOOPS Exchange 2023 SP2 U1, HOOPS Exchange provides support for Publications.
Check our :doc:`programming guide </guide/publications>` for more information.

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

* Density on linked materials is not supported.
* Density is not retrieved on prototyped parts with different densities.
