A3DSDKReadWrite.h

Header file for the read-write module.

Author

Tech Soft 3D

Version

23.0

Date

January 2023

Copyright (c) 2010 - 2023 by Tech Soft 3D, Inc. All rights reserved.

Content

Data Structures

A3DThumbnailData

Thumbnail data.

A3DFileInformationData

File.

A3DFileContextData

A structure that specifies the file contexts It is used to by: A3DAsmGetFilesContextsFromModelFile .

A3DRWParamsExportParasolidData

A structure that specifies parameters used to write the model file to Parasolid format.

A3DChainedBuffer_t

A structure that contains chained buffers.

A3DRWParamsTranslateToPkPartsData

A structure that specifies parameters used to translate the model file or a representation item into an open Parasolid session.

A3DRWParamsExportAcisData

A structure that specifies parameters used to write the model file to ACIS format.

Type definitions

A3DChainedBuffer

A structure that contains chained buffers.

Functions

A3DGetFileFormat()

Returns the format of a physical file.

A3DCheckFileFormat()

Checks the format of a physical file.

A3DExtractFileThumbnail()

Extract thumbnail stored in a CAD file.

A3DGetFileInformation()

Get file information a CAD file.

A3DAsmGetFilesPathFromModelFile()

Extract file paths from a model file.

A3DAsmGetFilesContextsFromModelFile()

Extract all the files contexts (RefSet, Configs…) from a model file.

A3DFileContextDelete()

This function is used to free memory allocated by following functions: A3DAsmGetFilesContextsFromModelFile .

A3DAsmModelFileLoadFromPRCFiles()

Creates a model file from multiple PRC files + a PRC assembly file + a map for file names.

A3DAsmModelFileLoadFromMultiplePrcFile()

Creates a model file from multiple PRC files + an PRC assembly file + a map for file names.

A3DAsmModelFileExportToParasolidFile()

Writes a model file to a physical file in Parasolid format.

A3DChainedBufferFree()

This function is used to free memory allocated by following functions: A3DAsmModelFileExportToParasolidBuffer A3DRepresentationItemExportToParasolidBuffer A3DAsmModelFileExportToAcisBuffer A3DRepresentationItemExportToAcisBuffer A3DChainedBufferFree .

A3DAsmModelFileExportToParasolidBuffer()

Writes a model file to a buffer in Parasolid format.

A3DRepresentationItemExportToParasolidFile()

Writes a representation item to a file in Parasolid format.

A3DRepresentationItemExportToParasolidBuffer()

Writes a representation item to a buffer in Parasolid format.

A3DAsmModelFileTranslateToPkParts()

Writes a model file to parts in the current Parasolid session.

A3DRepresentationItemTranslateToPkParts()

Writes a representation item to parts in the current Parasolid session.

A3DRepresentationItemsTranslateToPkPartsMultiProcess()

Writes a representation item to parts in the current Parasolid session in multi-process context.

A3DHealPkParts()

Heal parts in the current Parasolid session.

A3DMiscPKMapperGetPKEntitiesFromA3DEntity()

Get Parasolid entities from HOOPS Exchange entity.

A3DMiscPKMapperGetA3DEntitiesFromPKEntity()

Get HOOPS Exchange entities from Parasolid entity.

A3DAsmModelFileExportToParasolidFileWithMapper()

Writes a model file to a physical file in Parasolid format .

A3DPkPartsTranslateToA3DAsmModelFile()

Translate Parasolid Parts from parasolid session into an A3DModelFile with a mapper.

A3DAsmModelFileExportToParasolidBufferWithMapper()

Writes a model file to a buffer in Parasolid format .

A3DAsmModelFileExportToPrcStream()

Writes a model file to a stream buffer in a PRC format.

A3DAsmModelFileExportToAcisFile()

Writes a model file to a physical file in ACIS format.

A3DAsmModelFileExportToAcisBuffer()

Writes a model file to a buffer in binary ACIS format.

A3DRepresentationItemExportToAcisBuffer()

Writes a representation item to a buffer in binary ACIS format.

A3DAsmModelFileLoadFromXMLFile()

Loads an A3DAsmModelFile from a XML file and a set of native cad files.

A3DAsmModelFileLoadFromXMLStream()

Loads an A3DAsmModelFile from a XML buffer and a set of native cad files.

Type definitions

typedef struct A3DChainedBuffer_t A3DChainedBuffer

A structure that contains chained buffers.

It is used to by:

Version

4.0

Functions

A3DStatus A3DGetFileFormat(const A3DUTF8Char *pcFileName, A3DEModellerType *peModellerType)

Returns the format of a physical file.

Version

3.0

Parameters
  • pcFileName[in] References the path to the CAD file

  • peModellerType[out] References the format of the input CAD file

Return values
  • A3D_INVALID_LICENSE

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_LOAD_CANNOT_LOAD_MODEL

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY

  • A3D_LOAD_EMPTY_MULTI_MODEL

  • A3D_LOAD_INVALID_FILE_FORMAT

  • A3D_LOAD_MISSING_COMPONENTS

  • A3D_LOAD_MULTI_MODELS_CADFILE

  • A3D_LOAD_READER_NOT_IMPLEMENTED

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_WRITE_ERROR

  • A3D_WRITE_WRITER_NOT_IMPLEMENTED

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DCheckFileFormat(const A3DUTF8Char *pcFileName, A3DEModellerType eCadTypeWanted)

Checks the format of a physical file.

Version

6.0

Parameters
  • pcFileName[in] References the path to the CAD file

  • eCadTypeWanted[in] References the format that the input CAD file is going to be checked against

Return values
  • A3D_INVALID_LICENSE

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_LOAD_CANNOT_LOAD_MODEL

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY

  • A3D_LOAD_EMPTY_MULTI_MODEL

  • A3D_LOAD_INVALID_FILE_FORMAT

  • A3D_LOAD_MISSING_COMPONENTS

  • A3D_LOAD_MULTI_MODELS_CADFILE

  • A3D_LOAD_READER_NOT_IMPLEMENTED

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_WRITE_ERROR

  • A3D_WRITE_WRITER_NOT_IMPLEMENTED

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DExtractFileThumbnail(const A3DUTF8Char *pcFileName, A3DThumbnailData *pThumbnailData)

Extract thumbnail stored in a CAD file.

Version

8.2

Warning

This function is only available for Catia V5 and Solidworks inputs.

Parameters
  • pcFileName[in] References the path to the CAD file

  • pThumbnailData[out] References the thumbnail data

Return values
  • A3D_INVALID_LICENSE

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_LOAD_CANNOT_LOAD_MODEL

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY

  • A3D_LOAD_EMPTY_MULTI_MODEL

  • A3D_LOAD_INVALID_FILE_FORMAT

  • A3D_LOAD_MISSING_COMPONENTS

  • A3D_LOAD_MULTI_MODELS_CADFILE

  • A3D_LOAD_READER_NOT_IMPLEMENTED

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_WRITE_ERROR

  • A3D_WRITE_WRITER_NOT_IMPLEMENTED

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DGetFileInformation(const A3DUTF8Char *pcFileName, A3DFileInformationData *pFileInformationData)

Get file information a CAD file.

Version

8.2

Warning

This function is only available for Catia V5 and Solidworks inputs. For unsupported formats, the function returns A3D_LOAD_CANNOT_ACCESS_CADFILE.

Parameters
  • pcFileName[in] References the path to the CAD file

  • pFileInformationData[out] References the information of the input CAD file

Return values
  • A3D_INVALID_LICENSE

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_LOAD_CANNOT_LOAD_MODEL

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY

  • A3D_LOAD_EMPTY_MULTI_MODEL

  • A3D_LOAD_INVALID_FILE_FORMAT

  • A3D_LOAD_MISSING_COMPONENTS

  • A3D_LOAD_MULTI_MODELS_CADFILE

  • A3D_LOAD_READER_NOT_IMPLEMENTED

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_WRITE_ERROR

  • A3D_WRITE_WRITER_NOT_IMPLEMENTED

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmGetFilesPathFromModelFile(const A3DAsmModelFile *pA3DAsmModelFile, A3DUns32 *uNbPartFiles, A3DUTF8Char ***ppPartFilesPaths, A3DUns32 *uNbAssemblyFiles, A3DUTF8Char ***ppAssemblyFilesPaths, A3DUns32 *uNbMissingFiles, A3DUTF8Char ***ppMissingFilesPaths)

Extract file paths from a model file.

This function reads the A3DAsmModelFile extracts the file path of all the sub-assemblies, part and missing files of the A3DAsmModelFile

entity. Sub-assemblies are files referencing other files (part files or other sub-assemblies files).

Part files are final files with no reference to an other depending file.

If a file has reference on both types of file, the file will be considered as a sub-assembly file and will not be referenced in the part file path array.

Missing files path are sub-files that cannot be loaded for some reasons: bad paths, file not found…

If pA3DAsmModelFile is NULL, the A3DUTF8Char arrays will be freed if the corresponding unsigned int parameters are non-null: A3DAsmGetFilesPathFromModelFile(NULL, […]) to delete the arrays.

Version

5.0

Parameters
  • pA3DAsmModelFile[in] The input model file. Can be “tree only” A3DAsmModelFile.

  • uNbPartFiles[out] The number of parts detected. (must not be NULL)

  • ppPartFilesPaths[out] The file names of detected parts. (must not be NULL)

  • uNbAssemblyFiles[out] The number of sub-assemblies detected. (can be NULL)

  • ppAssemblyFilesPaths[out] The file names of detected sub-assemblies. (can be NULL)

  • uNbMissingFiles[out] The number of missing files. (can be NULL)

  • ppMissingFilesPaths[out] The file names of detected missing files. (can be NULL)

Return values
  • A3D_INVALID_ENTITY_NULL

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmGetFilesContextsFromModelFile(const A3DAsmModelFile *pA3DAsmModelFile, A3DUns32 *uNbFilesContexts, A3DFileContextData ***ppFilesContexts)

Extract all the files contexts (RefSet, Configs…) from a model file.

Version

8.1

Parameters
  • pA3DAsmModelFile[in] The input model file. Can be “tree only” A3DAsmModelFile.

  • uNbFilesContexts[out] The number of files contexts detected. (must not be NULL)

  • ppFilesContexts[out] The file contexts. (must not be NULL)

Return values
  • A3D_INVALID_ENTITY_NULL

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DFileContextDelete(A3DFileContextData *pData)

This function is used to free memory allocated by following functions: A3DAsmGetFilesContextsFromModelFile .

Version

8.1

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileLoadFromPRCFiles(const A3DUTF8Char *pcRootPrcFilePath, const A3DUns32 uNbFile, const A3DUTF8Char **ppPRCFilePath, const A3DUTF8Char **ppCADFilePath, const A3DRWParamsLoadData *pParamsLoadData, A3DAsmModelFile **pA3DAsmModelFile)

Creates a model file from multiple PRC files + a PRC assembly file + a map for file names.

This function inserts all the parts and product occurrences from a file list into a single PRC assembly file loaded in “assembly NO Dependency” mode and outputs a reassembled model file.

Version

7.1

Parameters
  • pcRootPrcFilePath[in] The file name of the top assembly file. This model file is loaded as assembly tree only and saved as a PRC file.

  • uNbFile[in] The number of file names to plug into the assembly.

  • ppPRCFilePath[in] The equivalent PRC file paths for parts. Length must equal uNbFile.

  • ppCADFilePath[in] The native part file paths. Length must equal uNbFile.

  • pParamsLoadData[in] The parameters to use when reading the model files. Configuration must be set to read the default entry or must only specify a single entry to read.

  • pA3DAsmModelFile[out] The final reassembled model file.

Return values
  • A3D_ERROR

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA

  • A3D_LOAD_INVALID_FILE_NAME

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileLoadFromMultiplePrcFile(const A3DUTF8Char *pcFileName, const A3DUns32 uNbPart, const A3DUTF8Char **ppCADFilePath, const A3DUTF8Char **ppPRCFilePath, const A3DRWParamsLoadData *pParamsLoadData, A3DAsmModelFile **pA3DAsmModelFile)

Creates a model file from multiple PRC files + an PRC assembly file + a map for file names.

This function replugs all the parts from a list from a PRC file loaded with an “assembly tree only” mode.

Version

5.0

Parameters
  • pcFileName[in] The file name of the top assembly file. Conceived for model file loaded as assembly tree only and saved as a PRC file.

  • uNbPart[in] The number of file names to plug.

  • ppCADFilePath[in] The native part file paths. Length must equal uNbPart.

  • ppPRCFilePath[in] The equivalent PRC file paths for parts. Length must equal uNbPart.

  • pParamsLoadData[in] The read/write parameters use the model file. Configurations must be set (default or numEntries = 1).

  • pA3DAsmModelFile[out] The final reassembled model file.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToParasolidFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportParasolidData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in Parasolid format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

3.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DChainedBufferFree(A3DChainedBuffer *pBuffer)

This function is used to free memory allocated by following functions: A3DAsmModelFileExportToParasolidBuffer A3DRepresentationItemExportToParasolidBuffer A3DAsmModelFileExportToAcisBuffer A3DRepresentationItemExportToAcisBuffer A3DChainedBufferFree .

Version

4.0

A3DStatus A3DAsmModelFileExportToParasolidBuffer(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportParasolidData *pParamsExportData, A3DChainedBuffer **pBuffer)

Writes a model file to a buffer in Parasolid format.

This function writes the A3DAsmModelFile entity to a buffer.

Version

4.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pBuffer[out] References the chained buffer to be filled.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DRepresentationItemExportToParasolidFile(const A3DRiRepresentationItem *pRepItem, const A3DUTF8Char *pcTempFileName, A3DDouble dUnit)

Writes a representation item to a file in Parasolid format.

This function writes the A3DAsmModelFile entity to a file.

Version

4.0

Parameters
  • pRepItem[in] References the A3DRiRepresentationItem to be written out.

  • pcTempFileName[inout] References the output file to be written.

  • dUnit[in] References the wanted unit for the RI.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DRepresentationItemExportToParasolidBuffer(const A3DRiRepresentationItem *pRepItem, A3DChainedBuffer **pBuffer, double dUnit)

Writes a representation item to a buffer in Parasolid format.

This function writes the A3DRiRepresentationItem entity to a buffer.

Version

4.0

Parameters
  • pRepItem[in] References the A3DRiRepresentationItem to be written out.

  • pBuffer[in] References the chained buffer to be filled.

  • dUnit[in] References the wanted unit for the RI.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileTranslateToPkParts(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportParasolidData *pParamsExportData, const A3DRWParamsTranslateToPkPartsData *pParamsTranslateToPkPartsData, int *pNbPkParts, int **pPkParts)

Writes a model file to parts in the current Parasolid session.

This function writes the A3DAsmModelFile entity to parts in the current Parasolid session.

Version

8.1

Version

8.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pParamsTranslateToPkPartsData[in] References the parameters to export in the Parasolid session.

  • pNbPkParts[out] References the number of resulting parts.

  • pPkParts[out] References the array of resulting parts. Memory for the pPkParts array should be allocated and freed in Parasolid.

Return values
  • <tt>A3D_SUCCESS</tt> – In case of success.

  • <tt>A3D_INITIALIZE_NOT_CALLED</tt> – if the library is not initialized.

  • <tt>A3D_INVALID_DATA_STRUCT_NULL</tt> – if either pParamsExportData or pParamsTranslateToPkPartsData is null

  • <tt>A3D_INVALID_DATA_STRUCT_SIZE</tt> – if either pParamsExportData or pParamsTranslateToPkPartsData is incorrectly initialized

  • <tt>A3D_INVALID_ENTITY_NULL</tt> – if pA3DAsmModelFileis null

  • <tt>A3D_INVALID_ENTITY_TYPE</tt> – if pA3DAsmModelFile references an invalid entity type

  • A3D_PARASOLID_MEMORY_ERROR – if Parasolid is out of memory

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DRepresentationItemTranslateToPkParts(const A3DRiRepresentationItem *pRepItem, const A3DRWParamsTranslateToPkPartsData *pParamsTranslateToPkPartsData, double dUnit, int *pNbPkParts, int **pPkParts)

Writes a representation item to parts in the current Parasolid session.

This function writes the A3DRiRepresentationItem entity to parts in the current Parasolid session.

Version

8.1

Version

8.0

Parameters
  • pRepItem[in] References the A3DRiRepresentationItem to be written out.

  • pParamsTranslateToPkPartsData[in] References the parameters to export in the Parasolid session.

  • dUnit[in] References the wanted unit for the RI.

  • pNbPkParts[out] References the number of resulting parts.

  • pPkParts[out] References the array of resulting parts.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_PARASOLID_MEMORY_ERROR

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DRepresentationItemsTranslateToPkPartsMultiProcess(A3DUns32 uiNbProc, A3DRWParamsTranslateToPkPartsData const *pParamsTranslateToPkPartsData, A3DUns32 uiNbRepItem, A3DRiRepresentationItem const **pRepItem, A3DDouble const *padUnit, int **pNbPkParts, int ***pPkParts)

Writes a representation item to parts in the current Parasolid session in multi-process context.

This function writes the A3DRiRepresentationItem entity to parts in the current Parasolid session.

Version

8.1

Version

9.2

Parameters
  • uiNbProc[in] References the number of processes on which to run

  • pParamsTranslateToPkPartsData[in] References the parameters to export in the Parasolid session.

  • uiNbRepItem[in] References the number of A3DRiRepresentationItem to be written out.

  • pRepItem[in] References the array of A3DRiRepresentationItem to be written out.

  • padUnit[in] References the array of wanted units for the RI.

  • pNbPkParts[out] References the array of numbers of resulting parts.

  • pPkParts[out] References the array of arrays of resulting parts.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_PARASOLID_MEMORY_ERROR

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DHealPkParts(int *pNbPkParts, int **pPkParts, const A3DRWParamsTranslateToPkPartsData *pParamsTranslateToPkPartsData)

Heal parts in the current Parasolid session.

Version

8.1

Version

9.1

Parameters
  • pNbPkParts[in] References the number of resulting parts.

  • pPkParts[inout] References the array of resulting parts.

  • pParamsTranslateToPkPartsData[in] References the parameters to export in the Parasolid session.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMiscPKMapperGetPKEntitiesFromA3DEntity(const A3DMiscPKMapper *pMapper, const A3DEntity *pA3DEntity, int *piNbPKEntities, int **ppPKEntities)

Get Parasolid entities from HOOPS Exchange entity.

Version

9.0

Parameters
  • pMapper[in] Topology entities mapper

  • pA3DEntity[in] The HOOPS Exchange entity

  • piNbPKEntities[out] Number of Parasolid entities in the following array

  • ppPKEntities[out] Array of Parasolid entities. This array is internal to the A3DMiscPKMapper and should not be modified (changing it will compromise the A3DMiscPKMapper). The lifetime of this array is the same as the lifetime of the A3DMiscPKMapper.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DMiscPKMapperGetA3DEntitiesFromPKEntity(const A3DMiscPKMapper *pMapper, int pPKEntity, int *piNbA3DEntities, A3DEntity ***ppA3DEntities)

Get HOOPS Exchange entities from Parasolid entity.

Version

9.0

Parameters
  • pMapper[in] Topology entities mapper

  • pPKEntity[in] The Parasolid entity

  • piNbA3DEntities[out] Number of HOOPS Exchange entities in the following array

  • ppA3DEntities[out] Array of HOOPS Exchange entities. This array is internal to the A3DMiscPKMapper and shouldn’t be modified (changing it will compromise the A3DMiscPKMapper). The lifetime of this array is the same as the lifetime of the A3DMiscPKMapper.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToParasolidFileWithMapper(const A3DAsmModelFile *pA3DAsmModelFile, A3DMiscPKMapper *pMapper, const A3DRWParamsExportParasolidData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in Parasolid format .

This function writes the A3DAsmModelFile entity to a physical file. This function uses the PK bodies already converted and stored in the pMapper with the A3DAsmModelFile structure in order to export them as a Parasolid file.

Version

10.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pMapper[in] Topology entities mapper

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPkPartsTranslateToA3DAsmModelFile(int pNbPkParts, int *pPkParts, A3DRWParamsLoadData *pLoadParam, A3DAsmModelFile **ppA3DAsmModelFile, A3DMiscPKMapper **pMapper)

Translate Parasolid Parts from parasolid session into an A3DModelFile with a mapper.

This function creates an A3DAsmModelFile entity from parts of parasolid session and creates a mapper to get links between entities.

Version

10.2

Parameters
  • pNbPkParts[in] References the number of parts.

  • pPkParts[in] References the array of parts.

  • pLoadParam[in] Load parameters.

  • ppA3DAsmModelFile[out] References the A3DAsmModelFile to be created.

  • pMapper[out] Topology entities mapper

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_ENTITY_NULL

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_LOAD_READER_NOT_IMPLEMENTED

  • A3D_LOAD_CANNOT_LOAD_MODEL

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY

  • A3D_LOAD_EMPTY_MULTI_MODEL

  • A3D_LOAD_MISSING_COMPONENTS

  • A3D_LOAD_MULTI_MODELS_CADFILE – if the file contains multiple entries (see A3DRWParamsMultiEntriesData).

  • A3D_LOAD_INVALID_FILE_FORMAT

  • A3D_HEPB_MISSING

  • A3D_INVALID_DATA_NULL

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToParasolidBufferWithMapper(const A3DAsmModelFile *pA3DAsmModelFile, A3DMiscPKMapper *pMapper, const A3DRWParamsExportParasolidData *pParamsExportData, A3DChainedBuffer **pBuffer)

Writes a model file to a buffer in Parasolid format .

This function writes the A3DAsmModelFile entity to a physical file. This function uses the PK bodies already converted and stored in the pMapper with the A3DAsmModelFile structure in order to export them as a Parasolid file.

Version

11.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pMapper[in] Topology entities mapper

  • pParamsExportData[in] References the parameters for export.

  • pBuffer[out] Buffer.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToPrcStream(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportPrcData *pParamsExportData, A3DUTF8Char **pcStream, A3DUns32 *uLength, A3DRWParamsPrcWriteHelper **ppPrcWriteHelper)

Writes a model file to a stream buffer in a PRC format.

This function writes the A3DAsmModelFile entity to a PRC stream buffer.

Version

4.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcStream[out] Buffer containing the PRC content.

  • uLength[out] Length of the pcStream.

  • ppPrcWriteHelper[inout] Used to get PRC data such as unique identifiers of PRC nodes.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToAcisFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportAcisData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in ACIS format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

5.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INVALID_LICENSE

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToAcisBuffer(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportAcisData *pParamsExportData, A3DChainedBuffer **pBuffer)

Writes a model file to a buffer in binary ACIS format.

This function writes the A3DAsmModelFile entity to a buffer.

Version

5.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pBuffer[out] Buffer.

Return values
  • A3D_INVALID_LICENSE

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DRepresentationItemExportToAcisBuffer(const A3DRiRepresentationItem *pRepItem, A3DChainedBuffer **pBuffer, double dScale)

Writes a representation item to a buffer in binary ACIS format.

This function writes the A3DRiRepresentationItem entity to a buffer.

Version

7.2

Parameters
  • pRepItem[in] References the A3DRiRepresentationItem to be written out.

  • pBuffer[in] Buffer.

  • dScale[in] Scale applied to the representation item.

Return values
  • A3D_INVALID_LICENSE

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileLoadFromXMLFile(const A3DUTF8Char *pcFileName, const A3DRWParamsLoadData *pLoadParametersData, A3DAsmModelFile **ppModelFile)

Loads an A3DAsmModelFile from a XML file and a set of native cad files.

This function loads an A3DAsmModelFile from a XML file and a set of native cad files.

Version

7.0

Parameters
  • pcFileName[in] References the path to the file containing the XML description of the assembly.

  • pLoadParametersData[in] References the parameters for reading the native parts (does not affect the reading of the XML file).

  • ppModelFile[out] References a pointer into which should be stored the location of the model file. Set this pointer to null before calling the function.

Return values
  • <tt>A3D_FILE_TOO_RECENT</tt>

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_ENTITY_NULL

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_LOAD_CANNOT_LOAD_MODEL

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY

  • A3D_LOAD_EMPTY_MULTI_MODEL

  • A3D_LOAD_FILE_TOO_OLD

  • A3D_LOAD_FILE_TOO_RECENT

  • A3D_LOAD_INVALID_FILE_FORMAT

  • A3D_LOAD_MISSING_COMPONENTS

  • A3D_LOAD_MULTI_MODELS_CADFILE – if the file contains multiple entries (see A3DRWParamsMultiEntriesData).

  • A3D_LOAD_READER_NOT_IMPLEMENTED

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileLoadFromXMLStream(const A3DUTF8Char *pcBuffer, const A3DRWParamsLoadData *pLoadParametersData, A3DAsmModelFile **ppModelFile)

Loads an A3DAsmModelFile from a XML buffer and a set of native cad files.

This function loads an A3DAsmModelFile from a XML buffer and a set of native cad files.

Version

11.2

Parameters
  • pcBuffer[in] References null terminated buffer containing the XML description of the assembly.

  • pLoadParametersData[in] References the parameters for reading the native parts (does not affect the reading of the XML file).

  • ppModelFile[out] References a pointer into which should be stored the location of the model file. Set this pointer to null before calling the function.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_ENTITY_NULL

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_LOAD_READER_NOT_IMPLEMENTED

  • A3D_LOAD_CANNOT_LOAD_MODEL

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY

  • A3D_LOAD_EMPTY_MULTI_MODEL

  • A3D_LOAD_MISSING_COMPONENTS

  • A3D_LOAD_MULTI_MODELS_CADFILE – if the file contains multiple entries (see A3DRWParamsMultiEntriesData).

  • A3D_LOAD_INVALID_FILE_FORMAT

  • A3D_SUCCESS – Svalorted elements and examples: see A3DAsmModelFileLoadFromXMLFile.

Returns

A3D_SUCCESS in case of success or an error code