
################################
A3DCopyAndAdaptBrepModelAdvanced
################################

.. c:function:: A3DStatus A3DCopyAndAdaptBrepModelAdvanced(const A3DEntity *p, const A3DCopyAndAdaptBrepModelData *psSetting, A3DEntity **const pp, A3DUns32 *puiNbErrors, A3DInt32 **paiErrors)

   .. rst-class:: sig-pretty-signature
   
      | :c:enum:`~A3DStatus` A3DCopyAndAdaptBrepModelAdvanced(*const* :c:type:`~A3DEntity`\ \* **p**\ , *const* :c:struct:`~A3DCopyAndAdaptBrepModelData`\ \* **psSetting**\ , :c:type:`~A3DEntity`\ \*\* **pp**\ , :c:type:`~A3DUns32`\ \* **puiNbErrors**\ , :c:type:`~A3DInt32`\ \*\* **paiErrors**\ )
   
   Copy and adapt B-rep parameters.
   
   Same as :c:func:`~A3DCopyAndAdaptBrepModel`\ , but returns the status of each face in error if :c:member:`A3DCopyAndAdaptBrepModelData::m_bContinueOnError <A3DCopyAndAdaptBrepModelData.m_bContinueOnError>` is set to true.
   
   ``puiNbErrors`` returns the number of faces in error.
   
   ``paiErrors`` corresponds to a set of indexes and error codes:
   
   .. code-block:: c
   
      paiErrors[0] = type the topological element
      paiErrors[1] = error status
      paiErrors[2] = number of indexes to find element (connex = 1, shell = 2, face = 3, loop = 4, coedge /edge = 5)
      paiErrors[3] = first index
      ...
      paiErrors[2+paiErrors[2]] = last index
   
   **Return Values**
   
   
      **A3D_INVALID_ENTITY_TYPE**\ : if ``p`` is of an invalid entity type
   
      **A3D_SRF_INVALID_PARAMETERS**\ : if ``psSetting->m_puiAcceptableSurfaces`` contains a value that is not a supported ``kA3DTypeSurf*`` type
   
      **A3D_CRV_INVALID_PARAMETER**\ : if ``psSetting->m_puiAcceptableCurves`` contains a value that is not a supported ``kA3DTypeCrv*`` type
   
      **A3D_ERROR**\ : on a general, unclassified error
   
      **A3D_SUCCESS**\ : returned on success
   
      **A3D_INITIALIZE_NOT_CALLED**\ : if the library has not been initialized via ``A3DDllInitialize``
   
      **A3D_INVALID_LICENSE**\ : if the current license does not allow this function
   
      **A3D_INITIALIZE_BAD_VALUES**\ : if initialization led to bad internal values for globals; this is a fatal error requiring the program to be reinitialized
   
      **A3D_NOT_IMPLEMENTED**\ : if the requested operation is not yet implemented
   
      **A3D_TOPO_VERTICES_MISSING**\ : if the input topology is missing vertices
   
      **A3D_COEDGE_BAD_ORIENTATION_DATA**\ : if input coedge orientation data is incorrect
   
      **A3D_TOPO_GEOMETRY_MISSING**\ : if the input topology is missing geometry
   
      **A3D_LOOP_BAD_ORIENTATION_DATA**\ : if input loop orientation data is incorrect
   
      **A3D_SHELL_BAD_ORIENTATION_DATA**\ : if input shell orientation data is incorrect
   
      **A3D_TOPO_WRONG_TOLERANCES**\ : if tolerances on edges, vertices, or faces are invalid or inconsistent
   
      **A3D_TOPO_CONSISTENCY**\ : if the input topology has a consistency problem
   
      **A3D_TOPO_NON_CONNEX_SHELL**\ : if a shell in the input topology is non-connex
   
      **A3D_TOPO_OPEN_SOLID**\ : if the input solid is invalid, containing edges without neighbors
   
      **A3D_TOOLS_NURBSCONVERT_SURFACE_FAILURE**\ : if converting a surface to NURBS fails
   
      **A3D_TOOLS_NURBSCONVERT_UV_FAILURE**\ : if converting a space parametric (UV) curve fails
   
      **A3D_TOOLS_NURBSCONVERT_3D_FAILURE**\ : if converting a 3D space curve fails
   
      **A3D_TOOLS_NURBSCONVERT_GENERAL_FAILURE**\ : on a general, unclassified NURBS conversion failure
   
      **A3D_TOOLS_SPLIT_FAILURE**\ : if splitting a surface at a seam fails
   
      **A3D_TOOLS_COMPUTE_UV_FAILURE**\ : if computing a space parametric (UV) curve fails
   
      **A3D_TOOLS_COMPUTE_3D_FAILURE**\ : if computing a 3D space curve fails
   
      **A3D_INVALID_ENTITY_NULL**\ : if ``p`` or ``pp`` is null
   
      **A3D_EXCEPTION**\ : if an exception was caught during processing
   
      **A3D_BREPDATA_CANNOT_GETBOUNDINGBOX**\ : if the bounding box could not be computed
   
      **A3D_INCOMPATIBLE_FUNCTION_WITH_KEEP_PARSED_ENTITY_MODE**\ : if the input was read in Keep Parsed Entities mode, which is not supported by this function
   
   
   **Parameters**
   
   
      **p**\ : A pointer to the source B-rep entity
   
      **psSetting**\ : The structure that defines which types of B-rep you would like to convert to
   
      **pp**\ : A pointer to the result B-rep entity or entities
   
      **puiNbErrors**\ : Number of elements in error
   
      **paiErrors**\ : Index and error code of each element
   
   
   **Returns**
   
   
      ``A3D_SUCCESS`` on success, or an error code on failure
   
   




