A3DSDKTopology.h
Header file for topology entities.
- 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
TopoBody structure. |
|
Structure for parsing or creating an A3DTopoContext entity. |
|
SingleWireBody structure. |
|
BrepData structure. |
|
Connex structure. |
|
Shell structure. |
|
Face structure. |
|
Loop structure. |
|
Co-edge structure. |
|
Edge structure. |
|
WireEdge structure. |
|
Structure for a vertex defined with a single position. |
|
Structure for a vertex defined with multiple positions. |
Macro definitions
The bounding box has been roughly evaluated from geometrical entities included in the body. |
|
The bounding box has been deduced from a complete tessellation of the body. |
|
The bounding box has been read from the originating CAD file. |
|
Outer loops are always first loops. |
|
UV Curves are clamped on surface. |
|
Faces are split. |
|
Brep can contain analytic elements (not exclusively BSpline). |
Functions
Populates the A3DTopoBodyData structure. |
|
Sets a previously created A3DTopoBody with an A3DTopoBodyData structure. |
|
Populates the A3DTopoContextData structure. |
|
Creates an A3DTopoContext from an A3DTopoContextData structure. |
|
Populates the A3DTopoSingleWireBodyData structure. |
|
Creates an A3DTopoSingleWireBody from an A3DTopoSingleWireBodyData structure. |
|
Populates the A3DTopoBrepDataData structure. |
|
Creates an A3DTopoBrepData from an A3DTopoBrepDataData structure. |
|
Return all A3DTopoFace from an A3DTopoBrepData . |
|
Return all A3DTopoEdge from an A3DTopoBrepData . |
|
Populates the A3DTopoConnexData structure. |
|
Creates an A3DTopoConnex from an A3DTopoConnexData structure. |
|
Populates the A3DTopoShellData structure. |
|
Creates an A3DTopoShell from an A3DTopoShellData structure. |
|
Populates the A3DTopoFaceData structure. |
|
Creates an A3DTopoFace from an A3DTopoFaceData structure. |
|
Return the owning A3DTopoShell of the A3DTopoFace and the orientation between them inside the given A3DTopoBrepData . |
|
Return the owning A3DTopoShell of the A3DTopoFace inside the given A3DTopoBrepData . |
|
Populates the A3DTopoLoopData structure. |
|
Creates an A3DTopoLoop from an A3DTopoLoopData structure. |
|
Return the owning A3DTopoFace of the A3DTopoLoop inside the given A3DTopoBrepData . |
|
Populates the A3DTopoCoEdgeData structure. |
|
Creates an A3DTopoCoEdge from an A3DTopoCoEdgeData structure. |
|
Sets the A3DTopoCoEdge neighbor on an A3DTopoCoEdge . |
|
Return the owning A3DTopoLoop of an A3DTopoCoEdge . |
|
Populates the A3DTopoEdgeData structure. |
|
Creates an A3DTopoEdge from an A3DTopoEdgeData structure. |
|
Return all A3DTopoCoEdge from an A3DTopoEdge within the given A3DTopoBrepData. |
|
Return all A3DSurfBase from an A3DTopoEdge within the given A3DTopoBrepData. |
|
Return a A3DCrvBase (3D curve or computed A3DCrvOnSurf) from an A3DTopoEdge within the given A3DTopoBrepData. |
|
Populates the A3DTopoWireEdgeData structure. |
|
Creates an A3DTopoWireEdge from an A3DTopoWireEdgeData structure. |
|
Populates the A3DTopoUniqueVertexData structure. |
|
Creates an A3DTopoUniqueVertexData from an A3DTopoUniqueVertexData structure. |
|
Populates the A3DTopoMultipleVertexData structure. |
|
Creates an A3DTopoMultipleVertex from an A3DTopoMultipleVertexData structure. |
Macro definitions
-
kA3DBodyBoundingBoxEvaluation
The bounding box has been roughly evaluated from geometrical entities included in the body.
-
kA3DBodyBoundingBoxPrecise
The bounding box has been deduced from a complete tessellation of the body.
-
kA3DBodyBoundingBoxCadData
The bounding box has been read from the originating CAD file.
-
kA3DContextOuterLoopFirst
Outer loops are always first loops.
-
kA3DContextNoClamp
UV Curves are clamped on surface.
-
kA3DContextNoSplit
Faces are split.
-
kA3DContextHasAnalytics
Brep can contain analytic elements (not exclusively BSpline).
Functions
-
A3DStatus A3DTopoBodyGet(const A3DTopoBody *pBody, A3DTopoBodyData *pData)
Populates the A3DTopoBodyData 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 A3DTopoBodySet(A3DTopoBody *pBody, const A3DTopoBodyData *pData)
Sets a previously created A3DTopoBody with an A3DTopoBodyData structure.
- Version
2.0
Note
Because an A3DTopoBody entity is an abstract class, you cannot create directly such entity. Instead, use the appropriate derived function (such as A3DTopoSingleWireBodyCreate or A3DTopoBrepDataCreate) to create a specific topology entity. Then use this function to specify values in the entity base class. For example, this function specifies a value for the A3DTopoBodyData::m_pContext.
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SET_INCONSISTENT_EMPTY –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DTopoContextGet(const A3DTopoContext *pContext, A3DTopoContextData *pData)
Populates the A3DTopoContextData 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 A3DTopoContextCreate(const A3DTopoContextData *pData, A3DTopoContext **ppContext)
Creates an A3DTopoContext from an A3DTopoContextData 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 A3DTopoSingleWireBodyGet(const A3DTopoSingleWireBody *pSingleWireBody, A3DTopoSingleWireBodyData *pData)
Populates the A3DTopoSingleWireBodyData 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 A3DTopoSingleWireBodyCreate(const A3DTopoSingleWireBodyData *pData, A3DTopoSingleWireBody **ppSingleWireBody)
Creates an A3DTopoSingleWireBody from an A3DTopoSingleWireBodyData 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 A3DTopoBrepDataGet(const A3DTopoBrepData *pBrep, A3DTopoBrepDataData *pData)
Populates the A3DTopoBrepDataData 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 A3DTopoBrepDataCreate(const A3DTopoBrepDataData *pData, A3DTopoBrepData **ppBrep)
Creates an A3DTopoBrepData from an A3DTopoBrepDataData 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 A3DTopoBrepDataGetFaces(A3DTopoBrepData const *psBrepData, A3DUns32 *psNbFaces, A3DTopoFace ***papsFaces)
Return all A3DTopoFace from an A3DTopoBrepData.
- Version
8.2
- 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 A3DTopoBrepDataGetEdges(A3DTopoBrepData const *psBrepData, A3DUns32 *piNbEdges, A3DTopoEdge ***papsEdges)
Return all A3DTopoEdge from an A3DTopoBrepData.
- Version
8.2
- 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 A3DTopoConnexGet(const A3DTopoConnex *pConnex, A3DTopoConnexData *pData)
Populates the A3DTopoConnexData 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 A3DTopoConnexCreate(const A3DTopoConnexData *pData, A3DTopoConnex **ppConnex)
Creates an A3DTopoConnex from an A3DTopoConnexData 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 A3DTopoShellGet(const A3DTopoShell *pShell, A3DTopoShellData *pData)
Populates the A3DTopoShellData 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 A3DTopoShellCreate(const A3DTopoShellData *pData, A3DTopoShell **ppShell)
Creates an A3DTopoShell from an A3DTopoShellData structure.
- Version
2.0
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SHELL_INCONSISTENT_DATA –
A3D_SHELL_BAD_ORIENTATION_DATA –
A3D_SHELL_CANNOT_CREATE –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DTopoFaceGet(const A3DTopoFace *pFace, A3DTopoFaceData *pData)
Populates the A3DTopoFaceData 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 A3DTopoFaceCreate(const A3DTopoFaceData *pData, A3DTopoFace **ppFace)
Creates an A3DTopoFace from an A3DTopoFaceData 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 A3DTopoFaceGetShellAndOrientation(A3DTopoBrepData const *psBrepData, A3DTopoFace const *psFace, A3DTopoShell const **ppsShell, A3DUns8 *pusOrientation)
Return the owning A3DTopoShell of the A3DTopoFace and the orientation between them inside the given A3DTopoBrepData.
- Version
11.1
Note
Possible values for
pusOrientation
are as follows:0: Opposite orientation
1: Same orientation for face and shell
2: Unknown orientation
- 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 A3DTopoFaceGetShell(A3DTopoBrepData const *psBrepData, A3DTopoFace const *psFace, A3DTopoShell const **ppsShell)
Return the owning A3DTopoShell of the A3DTopoFace inside the given A3DTopoBrepData.
- Version
8.2
- 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 A3DTopoLoopGet(const A3DTopoLoop *pLoop, A3DTopoLoopData *pData)
Populates the A3DTopoLoopData 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 A3DTopoLoopCreate(const A3DTopoLoopData *pData, A3DTopoLoop **ppLoop)
Creates an A3DTopoLoop from an A3DTopoLoopData 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 A3DTopoLoopGetFace(A3DTopoBrepData const *psBrepData, A3DTopoLoop const *psLoop, A3DTopoFace const **ppsFace)
Return the owning A3DTopoFace of the A3DTopoLoop inside the given A3DTopoBrepData.
- Version
8.2
- 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 A3DTopoCoEdgeGet(const A3DTopoCoEdge *pCoEdge, A3DTopoCoEdgeData *pData)
Populates the A3DTopoCoEdgeData 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 A3DTopoCoEdgeCreate(const A3DTopoCoEdgeData *pData, A3DTopoCoEdge **ppCoEdge)
Creates an A3DTopoCoEdge from an A3DTopoCoEdgeData 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 A3DTopoCoEdgeSetNeighbour(A3DTopoCoEdge *pCoEdge, A3DTopoCoEdge *pNeighbour)
Sets the A3DTopoCoEdge neighbor on an A3DTopoCoEdge.
- Version
2.0
- Return values
A3D_INVALID_ENTITY_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DTopoCoedgeGetLoop(A3DTopoCoEdge const *psCoEdge, A3DTopoLoop **ppsLoop)
Return the owning A3DTopoLoop of an A3DTopoCoEdge.
- Version
8.2
- Return values
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DTopoEdgeGet(const A3DTopoEdge *pEdge, A3DTopoEdgeData *pData)
Populates the A3DTopoEdgeData 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 A3DTopoEdgeCreate(const A3DTopoEdgeData *pData, A3DTopoEdge **ppEdge)
Creates an A3DTopoEdge from an A3DTopoEdgeData structure.
- Version
2.0
- Return values
A3D_EDGE_BAD_INTERVAL –
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DTopoEdgeGetCoEdges(const A3DTopoBrepData *psBrepData, const A3DTopoEdge *psEdge, A3DUns32 *piNbCoedges, A3DTopoCoEdge ***papsCoEdges)
Return all A3DTopoCoEdge from an A3DTopoEdge within the given A3DTopoBrepData.
- Version
8.2
- 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 A3DTopoEdgeGetSurfaces(const A3DTopoBrepData *psBrepData, const A3DTopoEdge *psEdge, A3DUns32 *piNbSurfaces, A3DSurfBase ***papsSurfaces)
Return all A3DSurfBase from an A3DTopoEdge within the given A3DTopoBrepData.
- Version
8.2
- 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 A3DTopoEdgeGetOrCompute3DCurve(A3DTopoBrepData const *psBrepData, A3DTopoEdge const *psEdge, A3DCrvBase const **pps3DCurve)
Return a A3DCrvBase (3D curve or computed A3DCrvOnSurf) from an A3DTopoEdge within the given A3DTopoBrepData.
- Version
8.2
- 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 A3DTopoWireEdgeGet(const A3DTopoWireEdge *pWireEdge, A3DTopoWireEdgeData *pData)
Populates the A3DTopoWireEdgeData 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 A3DTopoWireEdgeCreate(const A3DTopoWireEdgeData *pData, A3DTopoWireEdge **ppWireEdge)
Creates an A3DTopoWireEdge from an A3DTopoWireEdgeData 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 A3DTopoUniqueVertexGet(const A3DTopoUniqueVertex *pUniqueVertex, A3DTopoUniqueVertexData *pData)
Populates the A3DTopoUniqueVertexData 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 A3DTopoUniqueVertexCreate(const A3DTopoUniqueVertexData *pData, A3DTopoUniqueVertex **ppUniqueVertex)
Creates an A3DTopoUniqueVertexData from an A3DTopoUniqueVertexData 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 A3DTopoMultipleVertexGet(const A3DTopoMultipleVertex *pMultipleVertex, A3DTopoMultipleVertexData *pData)
Populates the A3DTopoMultipleVertexData 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 A3DTopoMultipleVertexCreate(const A3DTopoMultipleVertexData *pData, A3DTopoMultipleVertex **ppMultipleVertex)
Creates an A3DTopoMultipleVertex from an A3DTopoMultipleVertexData 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