Adapt and replace all B-rep in model file

Types

A3DCopyAndAdaptBrepModelErrorData

Functions

A3DStatus

A3DAdaptAndReplaceAllBrepInModelFile

A3DStatus

A3DAdaptAndReplaceAllBrepInModelFileAdvanced

Detailed Description

group a3d_adapt_and_replace_all_brep_in_modelfile

Function Documentation

A3DStatus A3DAdaptAndReplaceAllBrepInModelFile(A3DAsmModelFile *pModelFile, const A3DCopyAndAdaptBrepModelData *psSetting)

Entity Convert to NURBS facility.

This function adapts all B-rep in a Model File to customers’ needs. It enables the transformation of predetermined types of surfaces and curves as NURBS. It also permits computation of parametric curves and/or 3D curves, splitting periodic surfaces, etc.

These are the steps performed, according to the settings in A3DCopyAndAdaptBrepModelData:

  • For each face, the bearing surface is converted and then the 3D curves that are present

  • Surfaces are shrinked.

  • Cross-period UV curves are deleted if needed.

  • Faces are split at periodic seams and/or mid-parameter for closed surfaces.

  • Final UV curves are computed.

  • A second surface shrink is performed with new UVs.

  • Final 3D curves are computed.

In case where psSetting->m_bContinueOnError is A3D_TRUE, the function does not return any error code, unless it is considered as a fatal error. In that case, if you wish to know when an error occurs, use A3DAdaptAndReplaceAllBrepInModelFileAdvanced instead. Then check its puiNbErrors parameter.

Version

5.2

Note

When the function A3AdaptAndReplaceAllBrepInModelFile ends in error, you may try to set the parameters m_bSplitFaces and/or m_bForceComputeUV to A3D_FALSE and retry the conversion.

Parameters:
  • pModelFile[in] The source model file to adapt.

  • psSetting[in] The structure that defines which types of B-rep you would like to convert to.

Return values:
  • A3D_CRV_INVALID_PARAMETER – if psSetting ->m_puiAcceptableCurves contains invalid types.

  • A3D_SRF_INVALID_PARAMETERS – if psSetting->m_puiAcceptableSurfaces contains invalid types.

  • A3D_TOOLS_NURBSCONVERT_GENERAL_FAILURE

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAdaptAndReplaceAllBrepInModelFileAdvanced(A3DAsmModelFile *p, const A3DCopyAndAdaptBrepModelData *psSetting, A3DUns32 *puiNbErrors, A3DCopyAndAdaptBrepModelErrorData **pErrors)

Entity Convert to NURBS facility.

Same as A3DAdaptAndReplaceAllBrepInModelFile , but return status of each element in error if A3DCopyAndAdaptBrepModelData::m_bContinueOnError is set to true

puiNbErrors return the number of brep in error

pErrors corresponds to the list of error for each brep

Version

9.2

Parameters:
  • p[in] A pointer to the model file

  • psSetting[in] The structure that defines which types of B-rep you would like to convert to

  • puiNbErrors[out] Number of brep in error

  • pErrors[out] list of errors for each brep

Return values:
Returns:

A3D_SUCCESS on success, or an error code on failure