A3DSDKRootEntities.h
Root entities section.
- 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
A structure representing a hierarchy of descriptive names and modeler data that applies to any PRC entity. |
|
A structure specifying root graphics data. |
|
A structure that specifies modeler data attribute. |
|
A structure that specifies descriptive names and modeller data. |
|
A structure that specifies base unit information. |
|
A structure that specifies unit information. |
Functions
Gets the actual type of the entity. |
|
Indicates whether an entity base type corresponds to the kA3DTypeRootBaseWithGraphics type enumeration. |
|
Indicates whether an entity base type corresponds to the kA3DTypeRootBase type enumeration. |
|
Populates an A3DRootBaseData structure with the data from a PRC entity. |
|
Adds an A3DRootBaseData structure to an existing PRC entity. |
|
Remove all attributes stored in a PRC entity. |
|
Remove attribute in the attribute array of PRC entity with a specific title. |
|
Remove attribute of the current attribute array stored in a PRC entity, at a specific position. |
|
Append attributes to the current attribute array stored in a PRC entity. |
|
Add an attribute to the current attribute array stored in a PRC entity. |
|
Populates the A3DRootBaseWithGraphicsData structure. |
|
Adds an A3DRootBaseWithGraphicsData structure to an existing A3DRootBaseWithGraphics entity. |
|
Populates the A3DMiscAttributeData structure. |
|
Creates an A3DMiscAttribute from A3DMiscAttributeData structure. |
|
Get unit information related to a A3DMiscSingleAttributeData structure. |
|
Get unit information related to a A3DMiscSingleAttributeData structure. |
Functions
-
A3DStatus A3DEntityGetType(const A3DEntity *pEntity, A3DEEntityType *peEntityType)
Gets the actual type of the entity.
This function returns an integer that specifies an Entity type. The integer corresponds to one of the values described by the A3DEEntityType enumeration.
See also
- Version
2.0
- Sample code
/* code to get data from a representation item structure */ A3DRiRepresentationItem* pRepItem; /* this is retrieved for example on a PartDefinition data */ A3DInt32 iErr = A3D_SUCCESS; A3DEEntityType eType; if (A3DEntityGetType(pRepItem,&eType)==A3D_SUCCESS) { switch(eType) { case kA3DTypeRiPointSet: { A3DRiPointSetData sData; A3D_INITIALIZE_DATA( sData ); iErr = A3DRiPointSetGet( pRepItem, &sData ); /* work with PointSet data... */ break; } /* treate other types of data */ case ...: default: return ERROR; break; } }
- Return values
A3D_INVALID_ENTITY_NULL –
A3D_INVALID_ENTITY_TYPE –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DBool A3DEntityIsBaseWithGraphicsType(const A3DEntity *pEntity)
Indicates whether an entity base type corresponds to the kA3DTypeRootBaseWithGraphics type enumeration.
This function returns a value of
TRUE
if an entity type is based on the abstract root type for a PRC entity that can represent graphic data. Such an abstract root type is identified by the kA3DTypeRootBaseWithGraphics type enumeration.Remark
Because this function does not return A3DStatus the internal thread safety policy is to wait for the availability of the API.
- Version
2.0 You may need to use this function to sort entities for particular treatments.
-
A3DBool A3DEntityIsBaseType(const A3DEntity *pEntity)
Indicates whether an entity base type corresponds to the kA3DTypeRootBase type enumeration.
This function returns a value of
TRUE
if an entity type is based on the abstract root type for any PRC entity (with or without graphic data). Such an abstract root type is identified by the kA3DTypeRootBase type enumeration.Remark
Because this function does not return A3DStatus the internal thread safety policy is to wait for the availability of the API.
- Version
2.0 You may need to use this function to sort entities for particular treatments.
-
A3DStatus A3DRootBaseGet(const A3DRootBase *pRootBase, A3DRootBaseData *pData)
Populates an A3DRootBaseData structure with the data from a PRC entity.
- Version
2.0
- 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 A3DRootBaseSet(A3DRootBase *pRootBase, const A3DRootBaseData *pData)
Adds an A3DRootBaseData structure to an existing PRC entity.
According to what is defined in the parameter pData, the A3DEntity will be updated.
If A3DRootBaseData::m_pcName is initialized, the entity will be renamed.
Persistent and non-persistent id’s are systematically replaced.
The array A3DRootBaseData::m_ppAttributes will be appended to the current attribute array of the Entity. To manipulate just the Entity attributes, please use the following functions: A3DRootBaseAttributeRemoveAll, A3DRootBaseAttributeRemove, A3DRootBaseAttributeRemoveAt, A3DRootBaseAttributeAppend, A3DRootBaseAttributeAdd.
- Version
2.0
Note
A3DRootBase is an abstract class and cannot be directly created; however, any entity created with a function of the form
A3DCreate
results in the creation of a PRC entity of typeA3DRootBase
and of typeA3D
.- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DRootBaseAttributeRemoveAll(A3DRootBase *pEntity)
Remove all attributes stored in a PRC entity.
- Version
11.1
Note
A3DRootBase is an abstract class and cannot be directly created; however, any entity created with a function of the form
A3DCreate
results in the creation of a PRC entity of typeA3DRootBase
and of typeA3D
.- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_BASE_BAD_ENTITY_TYPE –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DRootBaseAttributeRemove(A3DRootBase *pEntity, A3DUTF8Char *pcTitle)
Remove attribute in the attribute array of PRC entity with a specific title.
- Version
11.1
Note
A3DRootBase is an abstract class and cannot be directly created; however, any entity created with a function of the form
A3DCreate
results in the creation of a PRC entity of typeA3DRootBase
and of typeA3D
.- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_BASE_BAD_ENTITY_TYPE –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DRootBaseAttributeRemoveAt(A3DRootBase *pEntity, A3DUns32 uIndex)
Remove attribute of the current attribute array stored in a PRC entity, at a specific position.
- Version
11.1
Note
A3DRootBase is an abstract class and cannot be directly created; however, any entity created with a function of the form
A3DCreate
results in the creation of a PRC entity of typeA3DRootBase
and of typeA3D
.- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_BASE_BAD_ENTITY_TYPE –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DRootBaseAttributeAppend(A3DRootBase *pEntity, A3DUns32 uiSize, A3DMiscAttribute **m_ppAttributes)
Append attributes to the current attribute array stored in a PRC entity.
- Version
11.1
Note
A3DRootBase is an abstract class and cannot be directly created; however, any entity created with a function of the form
A3DCreate
results in the creation of a PRC entity of typeA3DRootBase
and of typeA3D
.- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_BASE_BAD_ENTITY_TYPE –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DRootBaseAttributeAdd(A3DRootBase *pEntity, A3DUTF8Char *pcTitle, A3DUTF8Char *pcValue)
Add an attribute to the current attribute array stored in a PRC entity.
- Version
11.1
Note
A3DRootBase is an abstract class and cannot be directly created; however, any entity created with a function of the form
A3DCreate
results in the creation of a PRC entity of typeA3DRootBase
and of typeA3D
.- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_BASE_BAD_ENTITY_TYPE –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DRootBaseWithGraphicsGet(const A3DRootBaseWithGraphics *pRoot, A3DRootBaseWithGraphicsData *pData)
Populates the A3DRootBaseWithGraphicsData structure.
- Version
11.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 A3DRootBaseWithGraphicsSet(A3DRootBaseWithGraphics *pRoot, const A3DRootBaseWithGraphicsData *pData)
Adds an A3DRootBaseWithGraphicsData structure to an existing A3DRootBaseWithGraphics entity.
- Version
11.1
Note
The A3DRootBaseWithGraphics entity type is an abstract class and cannot be directly created; however, any graphic entity created with a function of the form
A3DCreate
results in the creation of a PRC entity of typeA3DRootBaseWithGraphics
and of typeA3D
. That is, a function of the formA3DCreate
adds specific data to the base class, for example A3DRootBaseWithGraphicsData::m_pGraphics.Note
When A3DRootBaseWithGraphicsSet is used to set a new A3DGraphics, its data is copied in the A3DRootBaseWithGraphics but the pointer is not kept nor freed later when the A3DRootBaseWithGraphics is deleted. It must be deleted using A3DGraphicsDelete
Never call A3DGraphicsDelete on an A3DGraphics obtained with A3DRootBaseWithGraphicsGet.A3DGraphicsData sGraphicsData; A3D_INITIALIZE_DATA(A3DGraphicsData, sGraphicsData) // fill in sGraphicsData A3DGraphics* pGraphics = NULL; A3DStatus eStatus = A3DGraphicsCreate(&sGraphicsData, &graphics); A3DRootBaseWithGraphicsData sRootBaseWithGraphicsData; A3D_INITIALIZE_DATA(A3DRootBaseWithGraphicsData, sRootBaseWithGraphicsData) sRootBaseWithGraphicsData.m_pGraphics = pGraphics; // copy pGraphics'content to pEntity eStatus = A3DRootBaseWithGraphicsSet(pEntity, &sRootBaseWithGraphicsData); // free pGraphics eStatus = A3DGraphicsDelete(pGraphics);
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DMiscAttributeGet(const A3DMiscAttribute *pAttribute, A3DMiscAttributeData *pData)
Populates the A3DMiscAttributeData structure.
- Version
2.0
- 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 A3DMiscAttributeCreate(const A3DMiscAttributeData *pData, A3DMiscAttribute **ppAttribute)
Creates an A3DMiscAttribute from A3DMiscAttributeData structure.
- Version
2.0
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DGlobalGetUnit(const A3DUns32 uiIndexUnit, A3DMiscAttributeUnit **ppUnit)
Get unit information related to a A3DMiscSingleAttributeData structure.
- Version
12.1
- Return values
A3D_INVALID_UNIT_INDEX –
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DGlobalGetUnitData(A3DMiscAttributeUnit *const pUnit, A3DMiscAttributeUnitData *pData)
Get unit information related to a A3DMiscSingleAttributeData structure.
- Version
12.1
- Return values
A3D_INVALID_UNIT_INDEX –
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code