Overview

Programming Guide

API Reference

2.3.3 Creating representation item PRC entities

The Exchange API Reference groups the PRC entities that specify individual objects present in the CAD file into the representation item module. Representation items define a particular aspect of the geometric data. The B-rep model representation item is one of the PRC entities available for packaging distinct 3D objects. Some of the other representation items include set, point set, poly B-rep model, and polywire.

Create a B-rep model representation item

  1. Declare a pointer to a B-rep model entity.

    A3DRiBrepModel* pBrepModel = NULL;

  2. Create a pointer to a populated topology B-rep data entity. (See Create a topology B-rep data entity.) The createTopoBrep function in the following example is a private function that returns a reference to a populated topology B-rep data entity.

    A3DTopoBrep* p = createTopoBrep();

  3. Declare and initialize a B-rep model data structure, and set its member values. In the following example, the m_pBrepData member references the B-rep data entity created in the previous step, and the m_bSolid member is set to FALSE, indicating that the B-rep model is a shell.

    sData.m_pBrepData = p;
    sData.m_bSolid = FALSE;

  4. Package the B-rep model data as a PRC entity by invoking the A3DRiBrepModelCreate function. The first argument is a pointer to the B-rep data structure, and the second is a pointer to the B-rep model created in Step 1.

    ASInt32 iRet=A3DRiBrepModelCreate(&sData, &pBrepModel);