.. _group__a3d__filter:

#############
Filter Module
#############

Creates and accesses filter entities that control the entities and layers included in the 3D image.

Entity type is :c:enumerator:`~kA3DTypeAsmFilter`\ .

The filter entity lets you include or exclude product occurrences or representation items based on their layer or entity type. Such inclusive or exclusive filtering applies to the primary entity and its descendants. For example, you can exclude all wireframe entities.

You can filter entities from these perspectives:


- Layer, inclusively. Only the entities belonging to a certain layer are included in the 3D view. Entities in other layers are removed.
- Layer, exclusively. Only the entities not belonging to a certain layer are included in the 3D view. Entities in other layers are removed.
- Entity, inclusively. Only entities of certain types are included in the 3D view. Entities of other types are removed.
- Entity, exclusively. Only entities not of certain types are included in the 3D view. Entities of other types are removed.

If the :c:member:`A3DAsmLayerFilterItemData::m_bIsInclusive <A3DAsmLayerFilterItemData.m_bIsInclusive>`\ member is ``TRUE``\ , the layer filter is inclusive; otherwise, it is exclusive. Similarly for an entity filter, if the :c:member:`A3DAsmEntityFilterItemData::m_bIsInclusive <A3DAsmEntityFilterItemData.m_bIsInclusive>`\ member is ``TRUE``\ , the entity filter is inclusive; otherwise, it is exclusive. If a layer or entity satisfies an inclusive filter criterion, then it and all of its child entities are included in the 3D view. If a layer or entity satisfies an exclusive filter criterion, then it and all its child entities are excluded from the 3D view.

For example, if one of the entries in the :c:member:`A3DAsmLayerFilterItemData::m_puiLayerIndexes <A3DAsmLayerFilterItemData.m_puiLayerIndexes>`\ member specifies a layer index of "3" and if the :c:member:`A3DAsmLayerFilterItemData::m_bIsInclusive <A3DAsmLayerFilterItemData.m_bIsInclusive>`\ member is ``FALSE``\ , then entities with miscellaneous cascaded attributes member ``m_usLayer``\ set to 3 are excluded from the 3D view.

Multiple filters can be specified within a particular :ref:`Product Occurrence <group__a3d__productoccurrence>`\ entity. The filters specified within one product are propagated to descendent product occurrences.

**Returns**


   ``A3D_SUCCESS``\ on success, or an error code on failure


.. rst-class:: kind-group kind-record

.. rubric:: Structures
   :class: kind-group-title


.. rst-class:: api-xref-list


* :c:struct:`~A3DAsmLayerFilterItemData`
* :c:struct:`~A3DAsmEntityFilterItemData`
* :c:struct:`~A3DAsmFilterData`

.. rst-class:: kind-group kind-function

.. rubric:: Functions
   :class: kind-group-title


.. rst-class:: api-xref-list


* :c:func:`~A3DAsmFilterGet`
* :c:func:`~A3DAsmFilterCreate`

.. toctree::
   :maxdepth: 1
   :hidden:

   ../structures/A3DAsmLayerFilterItemData
   ../structures/A3DAsmEntityFilterItemData
   ../structures/A3DAsmFilterData
   ../functions/A3DAsmFilterGet
   ../functions/A3DAsmFilterCreate


