DATAKIT API  V2025.1
Parasolid Write Functions

Functions

DtkErrorStatus psw_CreateAttribut (Dtk_ID inIdCompo, Dtk_InfoPtr &info)
 Create all attribut attached to a component (body, assembly, instance) More...
 
DtkErrorStatus psw_CreateCSysAttribut (Dtk_ID inIdCompo, const Dtk_transfo &transfo, Dtk_bool bCurrent)
 Create Coordinate System attribut attached to a point body (body with 1 point only) More...
 
DtkErrorStatus psw_CreateEmptyAssembly (Dtk_ID &outIdass)
 Create the entry item of an assembly. More...
 
DtkErrorStatus psw_CreateInstance (Dtk_ID inIdAss, Dtk_ID inIdPart, Dtk_transfoPtr &Matrix, Dtk_ID &outIdInst)
 Create an Instance item of a part referenced by inIdPart. More...
 
DtkErrorStatus psw_EndFile (Dtk_tab< Dtk_ID > &inTabIds, Dtk_bool binForceListOfBody=DTK_FALSE)
 Ends the writing of the Parasolid (x_t or x_b) file. More...
 
DtkErrorStatus psw_InitFile (const Dtk_string &inFileOut, Dtk_bool muteMode, Dtk_Int32 inVersion=180)
 Initialise a file to be written. More...
 
DtkErrorStatus psw_LinkAttribut (Dtk_ID inIdAss)
 link all attribut attached to an assembly More...
 
DtkErrorStatus psw_SetNoNamedAttribut (Dtk_ID inIdCompo, Dtk_InfoPtr &info)
 set name attribut if not defined only (body, assembly, instance) More...
 
Dtk_ErrorStatus psw_SetPublicationAttribut (Dtk_ID inIdCompo, const Dtk_string &publication)
 Create all publication attribut attached to a component (body) More...
 
Dtk_ErrorStatus psw_SetReaderType (DtkReaderType readertype)
 set the current reader used on the writer activated More...
 
DtkErrorStatus psw_UpdateNameAttribut (Dtk_ID inIdCompo, Dtk_InfoPtr &info)
 Update name attribut only (body, assembly, instance) More...
 
Dtk_ErrorStatus psw_WriteBody (Dtk_BodyPtr &inBody)
 Writes a Body of a 3D part (3D content of a product), of any kind (solid, shell / faces, wireframe / points) More...
 
Dtk_ErrorStatus psw_WriteBody (Dtk_BodyPtr &inBody, Dtk_tab< Dtk_ID > &outTabIds, Dtk_Int32 writeMode=0)
 Writes a Body of a 3D part (3D content of a product), of any kind (solid, shell / faces, wireframe / points) More...
 
DtkErrorStatus psw_WriteBody (Dtk_tab< Dtk_ID > &outTabIds, Dtk_tab< Dtk_BodyPtr > &bodies, Dtk_bool bSewing=DTK_TRUE, Dtk_Double64 tolmin=0.01, Dtk_Double64 tolmax=0.05, int iterationNumber=3)
 Writes a liste of Bodies of a 3D part (3D content of a product), of any kind (solid, shell / faces, wireframe / points) with sewing or not. More...
 
Dtk_ErrorStatus psw_WriteMesh (Dtk_MeshPtr &inMesh, Dtk_tab< Dtk_ID > &outTabIds, Dtk_bool bExplode=DTK_FALSE)
 Writes a Mesh of a 3D part. More...
 
Dtk_ErrorStatus psw_WritePointBody (const Dtk_AxisSystemPtr &inObject, Dtk_tab< Dtk_ID > &outTabIds)
 Writes a Body defined by one point only. More...
 

Detailed Description

Function Documentation

◆ psw_CreateAttribut()

DtkErrorStatus psw_CreateAttribut ( Dtk_ID  inIdCompo,
Dtk_InfoPtr info 
)

Create all attribut attached to a component (body, assembly, instance)

Parameters
[in]inIdCompoid of the component item
[in]infoattributs defined on the Dtk_InfoPtr object
Returns
dtkNoError if OK, dtkErrorUserBreak in case of calling sequence error

◆ psw_CreateCSysAttribut()

DtkErrorStatus psw_CreateCSysAttribut ( Dtk_ID  inIdCompo,
const Dtk_transfo transfo,
Dtk_bool  bCurrent 
)

Create Coordinate System attribut attached to a point body (body with 1 point only)

Parameters
[in]inIdCompoid of the component item
[in]transfomatrix used to define the 3 axis
[in]bCurrentdefine if this axis is current or not
Returns
dtkNoError if OK, dtkErrorUserBreak in case of calling sequence error

◆ psw_CreateEmptyAssembly()

DtkErrorStatus psw_CreateEmptyAssembly ( Dtk_ID outIdass)

Create the entry item of an assembly.

Parameters
[out]outIdass: the assembly item - entry written
Returns
dtkNoError if OK, dtkErrorUserBreak in case of calling sequence error

◆ psw_CreateInstance()

DtkErrorStatus psw_CreateInstance ( Dtk_ID  inIdAss,
Dtk_ID  inIdPart,
Dtk_transfoPtr Matrix,
Dtk_ID outIdInst 
)

Create an Instance item of a part referenced by inIdPart.

Parameters
[in]inIdAssid of the father assembly's item
[in]inIdPartid of the part (body or assembly) referenced
[in]Matrixmatrix used to position the instance on the assembly
[out]outIdInst: the instance item - entry written
Returns
dtkNoError if OK, dtkErrorUserBreak in case of calling sequence error

◆ psw_EndFile()

DtkErrorStatus psw_EndFile ( Dtk_tab< Dtk_ID > &  inTabIds,
Dtk_bool  binForceListOfBody = DTK_FALSE 
)

Ends the writing of the Parasolid (x_t or x_b) file.

Parameters
[in]inTabIds: the tab of body/assembly-entry written at level 0 if size > 1, a start list is created
[in]binForceListOfBody: if true, no assembly created default = false
Returns
0 if OK

◆ psw_InitFile()

DtkErrorStatus psw_InitFile ( const Dtk_string inFileOut,
Dtk_bool  muteMode,
Dtk_Int32  inVersion = 180 
)

Initialise a file to be written.

Parameters
[in]inFileOut: Parasolid (x_t or x_b) File to write
[in]muteMode: no log file used
[in]inVersion: vesion to write, default = 100 (= 10.0)
Returns
0 if OK , -4 if licence checking has failed

◆ psw_LinkAttribut()

DtkErrorStatus psw_LinkAttribut ( Dtk_ID  inIdAss)

link all attribut attached to an assembly

Parameters
[in]inIdAssid of the assembly item
Returns
dtkNoError if OK, dtkErrorUserBreak in case of calling sequence error

◆ psw_SetNoNamedAttribut()

DtkErrorStatus psw_SetNoNamedAttribut ( Dtk_ID  inIdCompo,
Dtk_InfoPtr info 
)

set name attribut if not defined only (body, assembly, instance)

Parameters
[in]inIdCompoid of the component item
[in]infoattributs defined on the Dtk_InfoPtr object
Returns
dtkNoError if OK, dtkErrorUserBreak in case of calling sequence error

◆ psw_SetPublicationAttribut()

Dtk_ErrorStatus psw_SetPublicationAttribut ( Dtk_ID  inIdCompo,
const Dtk_string publication 
)

Create all publication attribut attached to a component (body)

Parameters
[in]inIdCompoid of the component item
[in]publicationDtk_string defined the name of publication
Returns
dtkNoError if OK, dtkErrorUserBreak in case of calling sequence error

◆ psw_SetReaderType()

Dtk_ErrorStatus psw_SetReaderType ( DtkReaderType  readertype)

set the current reader used on the writer activated

Parameters
[in]readertype: the reader
Returns
0 if done, -1 if no writer activated

◆ psw_UpdateNameAttribut()

DtkErrorStatus psw_UpdateNameAttribut ( Dtk_ID  inIdCompo,
Dtk_InfoPtr info 
)

Update name attribut only (body, assembly, instance)

Parameters
[in]inIdCompoid of the component item
[in]infoattributs defined on the Dtk_InfoPtr object
Returns
dtkNoError if OK, dtkErrorUserBreak in case of calling sequence error

◆ psw_WriteBody() [1/3]

Dtk_ErrorStatus psw_WriteBody ( Dtk_BodyPtr inBody)

Writes a Body of a 3D part (3D content of a product), of any kind (solid, shell / faces, wireframe / points)

Parameters
[in]inBody: the Body to be written
Returns
0 if done, -1 if body is null or conversion failed

◆ psw_WriteBody() [2/3]

Dtk_ErrorStatus psw_WriteBody ( Dtk_BodyPtr inBody,
Dtk_tab< Dtk_ID > &  outTabIds,
Dtk_Int32  writeMode = 0 
)

Writes a Body of a 3D part (3D content of a product), of any kind (solid, shell / faces, wireframe / points)

Parameters
[in]inBody: the Body to be written
[in]writeMode: [0] = one body per closed shell and one body per open shell, [1] = separate all faces, [2] one body per closed shell and only one body per all the open shells (combined values possible)
[out]outTabIds: the tab of body-entry written
Returns
0 if done, -1 if body is null or conversion failed

◆ psw_WriteBody() [3/3]

DtkErrorStatus psw_WriteBody ( Dtk_tab< Dtk_ID > &  outTabIds,
Dtk_tab< Dtk_BodyPtr > &  bodies,
Dtk_bool  bSewing = DTK_TRUE,
Dtk_Double64  tolmin = 0.01,
Dtk_Double64  tolmax = 0.05,
int  iterationNumber = 3 
)

Writes a liste of Bodies of a 3D part (3D content of a product), of any kind (solid, shell / faces, wireframe / points) with sewing or not.

Parameters
[in]bodies: the list of Bodies to be written
[in]bSewing: a sewing action of the bodies is performed or not
[in]tolmin: the start tolerance used for the sewing process
[in]tolmax: the last tolerance used for the sewing process
[in]iterationNumber: the number of iteration between start and last tolerance for the sewing process
[out]outTabIds: the tab of body-entry written
Returns
0 if done, -1 if body is null or conversion failed

◆ psw_WriteMesh()

Dtk_ErrorStatus psw_WriteMesh ( Dtk_MeshPtr inMesh,
Dtk_tab< Dtk_ID > &  outTabIds,
Dtk_bool  bExplode = DTK_FALSE 
)

Writes a Mesh of a 3D part.

Parameters
[in]inMesh: the Mesh to be written
[in]bExplode: if true 1 body written per face
[out]outTabIds: the tab of body-entry written
Returns
0 if done, -1 if body is null or conversion failed

◆ psw_WritePointBody()

Dtk_ErrorStatus psw_WritePointBody ( const Dtk_AxisSystemPtr inObject,
Dtk_tab< Dtk_ID > &  outTabIds 
)

Writes a Body defined by one point only.

Parameters
[in]point: the point
[out]outTabIds: the tab of body-entry written
Returns
0 if done, -1 if body is null or conversion failed