Project Point Cloud

Types

A3DProjectedPointCloudData

A3DProjectPointCloudManagerDataFromRI

A3DProjectPointCloudOptionsData

Functions

A3DStatus

A3DProjectPointCloud

A3DStatus

A3DProjectPointCloudManagerCreateFromRI

A3DStatus

A3DProjectPointCloudManagerCreateFromModelFile

A3DStatus

A3DProjectPointCloudManagerDelete

A3DStatus

A3DProjectPointCloud3

Detailed Description

group a3d_ProjectPointCloud

ProjectPointCloud functions for model file.

Version

6.1

Function Documentation

A3DStatus A3DProjectPointCloud(unsigned int uRiBrepModelSize, A3DRiBrepModel **pRiBrepModel, A3DUns32 uPointCloudSize, A3DVector3dData *pPointCloudToProject, A3DBool bUseExactComputation, A3DUns32 uNbThreads, A3DProjectedPointCloudData **ppProjectedPointCloud)

Function to project Point Cloud on BrepModel.

Version

6.1

Parameters:
  • uRiBrepModelSize[in] Number of BrepModels in pRiBrepModel.

  • pRiBrepModel[in] Array of Brep Models.

  • uPointCloudSize[in] Number of points in pPointCloudToProject.

  • pPointCloudToProject[in] Point cloud to project. This point cloud must be in the same coordinate system as the BrepData structures stored in BrepModel.

  • bUseExactComputation[in] Flag to use exact topology. When this flag is false, the algorithm drops the point cloud on the faceted geometry, otherwise, the exact topology is used.

  • uNbThreads[in] Number of threads wanted. 0 means non multi-thread. Please avoid setting a number of threads larger than the number of CPU cores.

  • ppProjectedPointCloud[out] Point cloud projected. ppProjectedPointCloud is automatically allocated by A3DProjectPointCloud. It must be freed with the custom free memory callback.

Return values:
  • A3D_SUCCESS

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_ENTITY_TYPE

  • A3D_ERROR

  • A3D_BREPDATA_INCONSISTENT_DATA – if bUseExactComputation is set and if is missing A3DTopoBrepData

  • A3D_TOPO_GEOMETRY_MISSING – if bUseExactComputation is set and if is missing UV curves

  • A3D_INCOMPATIBLE_FUNCTION_WITH_KEEP_PARSED_ENTITY_MODE

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DProjectPointCloudManagerCreateFromRI(A3DProjectPointCloudManagerDataFromRI *pData, A3DProjectPointCloudManager **pManager)

Create a Point Cloud Manager from a set of A3DRiRepresentationItem with matrix placement.

The created manager holds memory that must be explicitely released using A3DProjectPointCloudManagerDelete.

Version

8.1

Parameters:
Return values:
  • A3D_SUCCESS

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_ENTITY_TYPE

  • A3D_ERROR

  • A3D_BREPDATA_INCONSISTENT_DATA – if bUseExactComputation is set and if is missing A3DTopoBrepData

  • A3D_TOPO_GEOMETRY_MISSING – if bUseExactComputation is set and if is missing UV curves

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DProjectPointCloudManagerCreateFromModelFile(A3DAsmModelFile *pModelFile, A3DProjectPointCloudManager **pManager)

Create a Point Cloud Manager from a A3DAsmModelFile.

The created manager holds memory that must be explicitely released using A3DProjectPointCloudManagerDelete.

Version

8.1

Parameters:
  • pModelFile[in] The model file object to create manager from.

  • pManager[out] A location to a new instance of A3DProjectPointCloudManager.

Return values:
  • A3D_SUCCESS

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_ENTITY_TYPE

  • A3D_ERROR

  • A3D_BREPDATA_INCONSISTENT_DATA – if bUseExactComputation is set and if is missing A3DTopoBrepData

  • A3D_TOPO_GEOMETRY_MISSING – if bUseExactComputation is set and if is missing UV curves

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DProjectPointCloudManagerDelete(A3DProjectPointCloudManager *pManager)

Deletes an A3DProjectPointCloudManager instance.

The provided pManager object must have been created earlier by either A3DProjectPointCloudManagerCreateFromModelFile or A3DProjectPointCloudManagerCreateFromRI.

Version

8.1

Parameters:

pManager[in] The manager instance.

Return values:
  • A3D_SUCCESS – In case of success.

  • A3D_INITIALIZE_NOT_CALLED – If the library is not initialized.

  • A3D_INVALID_ENTITY_TYPE – If pManager is not an instance of A3DProjectPointCloudManager.

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DProjectPointCloud3(A3DProjectPointCloudManager *pManager, A3DUns32 uPointCloudSize, A3DVector3dData const *pPointCloudToProject, A3DProjectPointCloudOptionsData const *pOptions, A3DProjectedPointCloudData **ppProjectedPointCloud)

Function to project Point Cloud on BrepModel with a A3DProjectPointCloudManager.

Version

22.2

Memory Management

In case of success, ppProjectedPointCloud contains heap allocated memory you are responsible for. To free the memory on ppProjectedPointCloud, call A3DProjectPointCloud3 by setting pManager to 0. In this case, all other parameters are ignored:

A3DProjectPointCloud3(0, 0, 0, 0, ppProjectedPointCloud);

Warning

If A3DProjectPointCloudManagerCreateFromRI is used to create pManager, and A3DProjectPointCloudManagerDataFromRI::m_bUseExactComputation is set to false, you can’t set bUseExactComputation to true. In this case, an A3D_INVALID_DATA error is returned.

Parameters:
  • pManager[in] A3DProjectPointCloudManager created by A3DProjectPointCloudManagerCreateFromModelFile function.

  • uPointCloudSize[in] Number of points in pPointCloudToProject.

  • pPointCloudToProject[in] Point cloud to project. May also contain normals directions (ordered as follow: Point1, Normal1, Point 2, Normal2, etc…) depending on the A3DProjectPointCloudOptionsData::m_bPreferFaceTowardScan option. This point cloud must be in the same coordinate system as the BrepData structures stored in BrepModel.

  • pOption[in] Structure containing option (must be set). see A3DProjectPointCloudOption

  • ppProjectedPointCloud[out] Point cloud projected.

Return values:
  • A3D_SUCCESS

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA

  • A3D_ERROR

Returns:

A3D_SUCCESS on success, or an error code on failure