Data Structures

struct  A3DCopyAndAdaptBrepModelData
 Copy and convert to NURBS parameter. More...
 

Functions

A3DStatus A3DCopyAndAdaptBrepModel (const A3DEntity *p, const A3DCopyAndAdaptBrepModelData *psSetting, A3DEntity **const pp)
 Copy and adapt B-rep parameters. More...
 
A3DStatus A3DCopyAndAdaptBrepModelAdvanced (const A3DEntity *p, const A3DCopyAndAdaptBrepModelData *psSetting, A3DEntity **const pp, A3DUns32 *puiNbErrors, A3DInt32 **paiErrors)
 Copy and adapt B-rep parameters. More...
 

Detailed Description

Function Documentation

A3DStatus A3DCopyAndAdaptBrepModel ( const A3DEntity p,
const A3DCopyAndAdaptBrepModelData psSetting,
A3DEntity **const  pp 
)

Copy and adapt B-rep parameters.

The B-rep used by HOOPS Exchange may not be completely compatible with modeling systems that do not support the full range of B-rep as employed by PRC. This function attempts to convert PRC B-rep into a format that is compatible with your system.

In order to use this function, you create a A3DCopyAndAdaptBrepModelData structure and configure it to create a new B-rep model using entities you are able to support. The function can transform predetermined surface types and curves to NURBS. It also can process parametric curves and 3D curves, as well as split periodic parametric surfaces.

Finally, it creates a new B-rep model. After using it, the new model should be deleted.

A3DCopyAndAdaptBrepModel will perform the following steps:

  • For each face, the bearing surface and the 3D curves are converted
  • Surfaces are reduced in size
  • Cross-period UV curves are deleted if necessary
  • 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 UV parameters
  • Final 3D curves are computed
Note
When the function A3DCopyAndAdaptBrepModel returns an error, you may try to set the parameters m_bSplitFaces and/or m_bForceComputeUV to 'false' and retry the conversion.
Parameters
[in]pA pointer to the source B-rep entity
[in]psSettingThe structure that defines which types of B-rep you would like to convert to
[out]ppA pointer to the result B-rep entity or entities
Returns
A3D_INVALID_ENTITY_TYPE
A3D_SRF_INVALID_PARAMETERS
A3D_CRV_INVALID_PARAMETER
A3D_TOOLS_NURBSCONVERT_GENERAL_FAILURE
A3D_ERROR
A3D_SUCCESS
A3D_INITIALIZE_BAD_VALUES
A3D_NOT_IMPLEMENTED
A3D_TOPO_VERTICES_MISSING
A3D_COEDGE_BAD_ORIENTATION_DATA
A3D_TOPO_GEOMETRY_MISSING
A3D_LOOP_BAD_ORIENTATION_DATA
A3D_SHELL_BAD_ORIENTATION_DATA
A3D_TOPO_WRONG_TOLERANCES
A3D_TOPO_CONSISTENCY
A3D_TOPO_NON_CONNEX_SHELL
A3D_TOPO_OPEN_SOLID
A3D_TOOLS_NURBSCONVERT_SURFACE_FAILURE
A3D_TOOLS_NURBSCONVERT_UV_FAILURE
A3D_TOOLS_NURBSCONVERT_3D_FAILURE
A3D_TOOLS_NURBSCONVERT_GENERAL_FAILURE
A3D_TOOLS_SPLIT_FAILURE
A3D_TOOLS_COMPUTE_UV_FAILURE
A3D_TOOLS_COMPUTE_3D_FAILURE
A3D_INVALID_ENTITY_NULL
A3D_EXCEPTION
A3D_BREPDATA_CANNOT_GETBOUNDINGBOX
A3D_INCOMPATIBLE_FUNCTION_WITH_KEEP_PARSED_ENTITY_MODE
A3DStatus A3DCopyAndAdaptBrepModelAdvanced ( const A3DEntity p,
const A3DCopyAndAdaptBrepModelData psSetting,
A3DEntity **const  pp,
A3DUns32 puiNbErrors,
A3DInt32 **  paiErrors 
)

Copy and adapt B-rep parameters.

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

puiNbErrors return the number of faces in error

paiErrors corresponds to a set of indexes and error codes 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

Parameters
[in]pA pointer to the source B-rep entity
[in]psSettingThe structure that defines which types of B-rep you would like to convert to
[out]ppA pointer to the result B-rep entity or entities
[out]puiNbErrorsNumber of elements in error
[out]paiErrorsIndex and error code of each element
Returns
A3D_INVALID_ENTITY_TYPE
A3D_SRF_INVALID_PARAMETERS
A3D_CRV_INVALID_PARAMETER
A3D_TOOLS_NURBSCONVERT_GENERAL_FAILURE
A3D_ERROR
A3D_SUCCESS
A3D_INITIALIZE_BAD_VALUES
A3D_NOT_IMPLEMENTED
A3D_TOPO_VERTICES_MISSING
A3D_COEDGE_BAD_ORIENTATION_DATA
A3D_TOPO_GEOMETRY_MISSING
A3D_LOOP_BAD_ORIENTATION_DATA
A3D_SHELL_BAD_ORIENTATION_DATA
A3D_TOPO_WRONG_TOLERANCES
A3D_TOPO_CONSISTENCY
A3D_TOPO_NON_CONNEX_SHELL
A3D_TOPO_OPEN_SOLID
A3D_TOOLS_NURBSCONVERT_SURFACE_FAILURE
A3D_TOOLS_NURBSCONVERT_UV_FAILURE
A3D_TOOLS_NURBSCONVERT_3D_FAILURE
A3D_TOOLS_NURBSCONVERT_GENERAL_FAILURE
A3D_TOOLS_SPLIT_FAILURE
A3D_TOOLS_COMPUTE_UV_FAILURE
A3D_TOOLS_COMPUTE_3D_FAILURE
A3D_INVALID_ENTITY_NULL
A3D_EXCEPTION
A3D_BREPDATA_CANNOT_GETBOUNDINGBOX
A3D_INCOMPATIBLE_FUNCTION_WITH_KEEP_PARSED_ENTITY_MODE