DATAKIT API  V2025.1
Step Write Functions

Functions

Dtk_ErrorStatus stepw_Add3DFdtModelDisplay (const Dtk_ModelDisplayPtr &inModelDisplay, const Dtk_FdtPtr &inFDT)
 Commands to write a Model Display (type Dtk_ModelDisplay) with a link to a FDT , in a 3d Part. More...
 
Dtk_ErrorStatus stepw_Add3DModelDisplay (const Dtk_ModelDisplayPtr &inModelDisplay, const int inMode)
 Commands to write a Model Display (type Dtk_ModelDisplay) in a 3d Part. More...
 
DtkErrorStatus stepw_Add3DPartFDT (const Dtk_FdtPtr &inFDT)
 Commands to write a FDT of a 3D Part. More...
 
DtkErrorStatus stepw_Add3DPartFDT (const Dtk_FdtPtr &inFDT, const Dtk_FdtPtr &inFDTGraf)
 Commands to write a FDT of a 3D Part, with a predefined graphic presentation (can be different) More...
 
Dtk_ErrorStatus stepw_Add3DPartProperty (const Dtk_MetaDataPtr &inProperty)
 Commands to write a Property to a Part (at the level of the whole Part) by default, or to an Item, according to InitPropertySet. More...
 
Dtk_ErrorStatus stepw_AddExternalReference (const Dtk_string &inProductName, const Dtk_string &inFileName, int &outID, Dtk_ID inInstCompId=0)
 Declares a product to be written as external reference. More...
 
DtkErrorStatus stepw_AddInstance (const int inIDfather, const int inIDchild, const Dtk_transfo &inPosition, const Dtk_string &inInstanceName)
 Adds an instance of a sub-component (child) in a product (father : assembly node) More...
 
DtkErrorStatus stepw_AddInstanceWithInfo (const int inIDfather, const int inIDchild, const Dtk_transfo &inPosition, const Dtk_string &inInstanceName, const Dtk_InfoPtr &inInstanceInfo)
 Adds an instance of a sub-component (child) in a product (father : assembly node) More...
 
DtkErrorStatus stepw_End3DPart ()
 Ends the writing of a part : the own 3D part of a product + product definition. More...
 
DtkErrorStatus stepw_EndFile ()
 Ends the writing of the STEP file. More...
 
DtkErrorStatus stepw_EndProduct (const int inID)
 Ends the writing of a product - calls WriteAssemblyInstances if not yet done. More...
 
Dtk_string stepw_GiveUniqueFileName (const Dtk_string &inFileName)
 Creates a unique file name for an external reference - applies to the current session (InitFile-EndFile) If already recorded as "name.stp" or "name--ii.stp" while ii is an integer (.stp: extension given as example), it computes the first free value for ii and returns "name--ii.stp" Otherwise (if not recorded yet) returns the input file name unchanged. More...
 
Dtk_string stepw_GiveUniqueProductName (const Dtk_string &inProductName)
 Creates a unique product name. If already recorded as "name" or "name--ii" while ii is an integer, it computes the first free value for ii and returns "name--ii" Otherwise (if not recorded yet) returns the input product name unchanged Null or empty name is interpreted to give "Product" as default. More...
 
DtkErrorStatus stepw_Init3DPart (const int inID)
 Initialise the writing of a 3D part : the own 3D part of a product (NOT its sub-components if any !) + product definition. More...
 
DtkErrorStatus stepw_InitFile (const Dtk_string &inFileOut, const char *Origin=" user ", const int StepSchema=0)
 Initialise a file to be written. More...
 
void stepw_InitNodeContext (const int inNodeID)
 Initialises the context to write items in a node of the model (internal model tree, NOT the assembly tree) More...
 
void stepw_InitNodeContext (const int inNodeID, const Dtk_InfoPtr &inNodeInfo)
 Initialises the context to write items in a node of the model (internal model tree, NOT the assembly tree) More...
 
DtkErrorStatus stepw_InitProduct (const Dtk_string &inProductName, int &outID, Dtk_ID inCompID=0)
 Initialise the writing of a product (assembly node and/or part with 3D bodies) More...
 
Dtk_ErrorStatus stepw_InitPropertySet (const int inMode)
 Commands Dtk_MetaData to be to be written, attached to the whole Part, or to the following Item to be written. More...
 
Dtk_ErrorStatus stepw_SetContextTolerance (const double inTol)
 Modal setting of Length Tolerance for the 3D geometry (uncertainty) To be called before Init3dPart, applies on all Parts till new call, at least once after InitFile. More...
 
Dtk_ErrorStatus stepw_SetContextUnit (const int inLength, const int inAngle=0)
 Modal setting of Units in which the geometries, properties, .. are to be written. To be called before Init3dPart, applies on all Parts till new call, at least once after InitFile. More...
 
Dtk_ErrorStatus stepw_SetConversionLengthUnit (const int inLength)
 Modal setting of Length Units in which the geometries, properties, .. are to be converted and written. To be called before Init3dPart, applies on all Parts till new call, at least once after InitFile. More...
 
DtkErrorStatus stepw_SetHeaderData (const int inNumItem, const Dtk_string &inValItem)
 Sets values of fields in Header - variant of stepw_SetHeaderData with a Dtk_string. More...
 
DtkErrorStatus stepw_SetHeaderData (const int inNumItem, const wchar_t *inValItem)
 Sets values of fields in Header. More...
 
DtkErrorStatus stepw_SetModeCompress (const int inMode)
 Selects a mode of writing compact or compressed step files. More...
 
DtkErrorStatus stepw_SetModeFdt (const int inMode, const int inPolyline=0)
 Activates/Deactivates writing of FDT (ignored if product Step3dWriteFdt is not present) More...
 
DtkErrorStatus stepw_SetModeInfoFirstFace (const int inModeInfoFirstFace)
 On a solid or shell, Switches on/off the use of graphic attributes of its First Face as default. If the solid/shell has a color defined, this has no effect. Else, if the switch is on, the first face with color is considered as default color for the whole shell, otherwise it has no color assigned. More...
 
DtkErrorStatus stepw_SetModeItemName (const int inMode)
 Selects a mode of writing names of internal (topological) 3D items (shells, faces, edges ..) More...
 
DtkErrorStatus stepw_SetModeProp (const int inMode)
 Activates/Deactivates writing of Properties : User Attributes, Product Data. More...
 
DtkErrorStatus stepw_SetPartProperties (const Dtk_InfoPtr &inInfo, const int inItem)
 Defines properties to be attached directly to the component : considers the list of Dtk_Val in the Dtk_Info. More...
 
int stepw_WhichProductID (const Dtk_string &inProductName)
 Checks a product (known by its unique name), is it already written If returns < 0 (negative value), not yet written : it can be written Otherwise, already written : it is the product ID of this product for this writing session it can be used in an assembly. More...
 
DtkErrorStatus stepw_Write3DAxisSystem (const Dtk_AxisSystemPtr &inAxis)
 Writes an Axis System of a 3D part - in STEP it is a construction geometry based on an axis placement. More...
 
DtkErrorStatus stepw_Write3DConstructionGeometry (const Dtk_BodyPtr &inBody)
 Writes a Body as a Construction Geometry of a 3D part, of any kind (solid, shell / faces, wireframe / points) More...
 
DtkErrorStatus stepw_Write3DPartBody (const Dtk_BodyPtr &inBody)
 Writes a Body of a 3D part (3D content of a product), of any kind (solid, shell / faces, wireframe / points) More...
 
DtkErrorStatus stepw_Write3DPartBodyWithMesh (const Dtk_BodyPtr &inBody, const Dtk_MeshPtr &inMesh, const int inMode=0)
 Writes a Body of a 3D part (3D content of a product), associated with a Mesh \ brief The Mesh is assumed to be the result of computing tessellation on the Body : its items can be bound with items of the Body \ Warning: not recommended for STEP versions before AP242. More...
 
DtkErrorStatus stepw_Write3DPartMesh (const Dtk_MeshPtr &inMesh)
 Writes a Mesh of a 3D part (3D content of a product). More...
 
DtkErrorStatus stepw_Write3DPartMeshFromBody (const Dtk_MeshPtr &inMesh, const Dtk_BodyPtr &inBody)
 Writes a Mesh of a 3D part (3D content of a product), coming from a Body, BUT does not write the Body. More...
 
DtkErrorStatus stepw_WriteAssemblyInstances (const int inID)
 Writes instances detained by a product. More...
 
Dtk_ErrorStatus stepw_WriteExternalReference (const int inID)
 Writes a product as an external reference. Only one per file for a given product. More...
 

Detailed Description

Function Documentation

◆ stepw_Add3DFdtModelDisplay()

Dtk_ErrorStatus stepw_Add3DFdtModelDisplay ( const Dtk_ModelDisplayPtr inModelDisplay,
const Dtk_FdtPtr inFDT 
)

Commands to write a Model Display (type Dtk_ModelDisplay) with a link to a FDT , in a 3d Part.

a same Model Display can be attached to several FDTs - will be written once

also, a same FDT can be used in several Model Displays

can be called at any time between Init3DPart and End3DPart - writing takes place after the bodies

Warning : Add3dPartFDT is NEEDED, here only the link with the view/model_display is recorded

There is no required order between Add3dPartFDT and Add3dFdtModelDisplay

Parameters
[in]inModelDisplay: the ModelDisplay to be written with the 3D Part
[in]inFDT: the FDT to be put in the View
Returns
dtkNoError if done, dtkErrorUnspecified if inModelDisplay or inFDT is null, dtkErrorAPINotStarted if no licence active or stepw_SetModeFdt not called before starting

◆ stepw_Add3DModelDisplay()

Dtk_ErrorStatus stepw_Add3DModelDisplay ( const Dtk_ModelDisplayPtr inModelDisplay,
const int  inMode 
)

Commands to write a Model Display (type Dtk_ModelDisplay) in a 3d Part.

either attached to no FDT or Annotation (inMode=0)

or to ALL FDTs and Annotations (inMode=1) - if set, this mode is prior

can be called at any time between Init3DPart and End3DPart - writing takes place after the bodies

Parameters
[in]inModelDisplay: the Model Display to be written with the 3D Part
[in]inMode: 0 no FDT/Annotation by efault, 1 All FDT/Annotations
Returns
dtkNoError if done, dtkErrorUnspecified if inModelDisplay is null, dtkErrorAPINotStarted if no licence active or stepw_SetModeFdt not called before starting

◆ stepw_Add3DPartFDT() [1/2]

DtkErrorStatus stepw_Add3DPartFDT ( const Dtk_FdtPtr inFDT)

Commands to write a FDT of a 3D Part.

can be called at any time between Init3DPart and End3DPart - writing takes place after the bodies

Parameters
[in]inFDT: the FDT to be written with the 3D part (according to ModeFdt, as semantic and/or graphic)
Returns
dtkNoError if done, dtkErrorUnspecified if inFDT is null, dtkErrorAPINotStarted if no licence active or stepw_SetModeFdt not called before starting

◆ stepw_Add3DPartFDT() [2/2]

DtkErrorStatus stepw_Add3DPartFDT ( const Dtk_FdtPtr inFDT,
const Dtk_FdtPtr inFDTGraf 
)

Commands to write a FDT of a 3D Part, with a predefined graphic presentation (can be different)

can be called at any time between Init3DPart and End3DPart - writing takes place after the bodies

Parameters
[in]inFDT: the FDT to be written as semantic data with the 3D part
[in]inFDT: the FDT to be used for graphical presentation with the 3D part
Returns
dtkNoError if done, dtkErrorUnspecified if inFDT is null, dtkErrorAPINotStarted if no licence active or stepw_SetModeFdt not called before starting

◆ stepw_Add3DPartProperty()

Dtk_ErrorStatus stepw_Add3DPartProperty ( const Dtk_MetaDataPtr inProperty)

Commands to write a Property to a Part (at the level of the whole Part) by default, or to an Item, according to InitPropertySet.

for the whole Part :

Can represent, either a Product Data or a Property of any kind, attached to its Product

Product Data correspond to reserved names :

"Part Number" which an alternate for Product Name , "Nomenclature", "Description", "Definition", "Revision", "Document", "Source"

All are optional (when absent, a default is taken), required to be TEXT,

and "Source" must take these values : "MADE" or "BOUGHT" otherwise it is ignored

can be called at any time between Init3DPart and End3DPart

For an Item :

It will be then attached to the FOLLOWING written Item - so, to be called BEFORE writing the Item of attachment

Items eligible for properties as metadata are : Dtk_Body Dtk_Mesh Dtk_Feature

Other items are ignored, a Property attached to no item will be written at the level of the whole Part

Parameters
[in]inProperty: the MetaData to be written with the 3D Part
Returns
dtkNoError if done, dtkErrorUnspecified if inProperty is null, dtkErrorAPINotStarted if no licence active or stepw_SetModeFdt not called before starting

◆ stepw_AddExternalReference()

Dtk_ErrorStatus stepw_AddExternalReference ( const Dtk_string inProductName,
const Dtk_string inFileName,
int &  outID,
Dtk_ID  inInstCompId = 0 
)

Declares a product to be written as external reference.

Parameters
[in]inProductName: name of product to be referenced externally
[in]inFileName: name of file in which it is described (to be physicall referenced).
[out]outID: returned UNIQUE identifier for a product. To be used in other calls to identify it.
[in]inInstCompID: OPTIONAL, if positive defines a user ID for this instance

If a sequence InitProduct..EndProduct is then called with that ID, it automatically produced another file, with that name, in the same path as the master file

An external reference is written in the current file (only one per file) if this product is used in an instance or if WriteExternalReference is explicitly called.

Warning
Must be called before first use or first call to InitProduct.. or WriteExternalReference for this product
Returns
dtkNoError if OK, dtkErrorUnspecified if product already written not as external reference

◆ stepw_AddInstance()

DtkErrorStatus stepw_AddInstance ( const int  inIDfather,
const int  inIDchild,
const Dtk_transfo inPosition,
const Dtk_string inInstanceName 
)

Adds an instance of a sub-component (child) in a product (father : assembly node)

Parameters
[in]inIDfather: UNIQUE identifier for the father component, must repeat the ID given to stepw_InitComponent
[in]inIDchild: UNIQUE identifier for the child component, which must have been PREVIOUSLY WRITTEN
[in]inPosition: the relative position of the child component in the father component for that instance
[in]inInstanceName: name attached to that instance - recommendation : if unknown, to be defaulted to empty ""
Returns
dtkNoError if done, dtkErrorUnspecified if the child component was not written yet (so the instance is not written)

◆ stepw_AddInstanceWithInfo()

DtkErrorStatus stepw_AddInstanceWithInfo ( const int  inIDfather,
const int  inIDchild,
const Dtk_transfo inPosition,
const Dtk_string inInstanceName,
const Dtk_InfoPtr inInstanceInfo 
)

Adds an instance of a sub-component (child) in a product (father : assembly node)

Parameters
[in]inIDfather: UNIQUE identifier for the father component, must repeat the ID given to stepw_InitComponent
[in]inIDchild: UNIQUE identifier for the child component, which must have been PREVIOUSLY WRITTEN
[in]inPosition: the relative position of the child component in the father component for that instance
[in]inInstanceName: name attached to that instance - recommendation : if unknown, to be defaulted to empty ""
[in]inInstanceInfo: set of infos attached to that instance - contains attributes (Dtk_Val)
Returns
dtkNoError if done, dtkErrorUnspecified if the child component was not written yet (so the instance is not written)

◆ stepw_End3DPart()

DtkErrorStatus stepw_End3DPart ( )

Ends the writing of a part : the own 3D part of a product + product definition.

Returns
dtkNoError if OK, dtkErrorUserBreak in case of calling sequence error

◆ stepw_EndFile()

DtkErrorStatus stepw_EndFile ( )

Ends the writing of the STEP file.

Returns
dtkNoError if OK

◆ stepw_EndProduct()

DtkErrorStatus stepw_EndProduct ( const int  inID)

Ends the writing of a product - calls WriteAssemblyInstances if not yet done.

Parameters
[in]inID: UNIQUE identifier for a product. Must be the same as for stepw_InitProduct
Returns
dtkNoError : OK, dtkErrorUnspecified : error in calling sequence

◆ stepw_GiveUniqueFileName()

Dtk_string stepw_GiveUniqueFileName ( const Dtk_string inFileName)

Creates a unique file name for an external reference - applies to the current session (InitFile-EndFile) If already recorded as "name.stp" or "name--ii.stp" while ii is an integer (.stp: extension given as example), it computes the first free value for ii and returns "name--ii.stp" Otherwise (if not recorded yet) returns the input file name unchanged.

Returns
a string which defines a unique file name in a Step Write session

◆ stepw_GiveUniqueProductName()

Dtk_string stepw_GiveUniqueProductName ( const Dtk_string inProductName)

Creates a unique product name. If already recorded as "name" or "name--ii" while ii is an integer, it computes the first free value for ii and returns "name--ii" Otherwise (if not recorded yet) returns the input product name unchanged Null or empty name is interpreted to give "Product" as default.

Returns
a string which defines a unique product name

◆ stepw_Init3DPart()

DtkErrorStatus stepw_Init3DPart ( const int  inID)

Initialise the writing of a 3D part : the own 3D part of a product (NOT its sub-components if any !) + product definition.

Parameters
[in]inID: the identifier of the product. Must repeat the ID of the product given to step_InitProduct
Returns
dtkNoError if done, dtkErrorOutOfRange if no call to stepw_InitProduct was done previously, or ID wrong Each product must have a 3D part, even empty : started by stepw_Init3DPart, ended by stepw_End3DPart, between them there can be 0, 1 or more Bodies to write (by stepw_WritePartBody)

◆ stepw_InitFile()

DtkErrorStatus stepw_InitFile ( const Dtk_string inFileOut,
const char *  Origin = " user ",
const int  StepSchema = 0 
)

Initialise a file to be written.

Parameters
[in]inFileOut: Step File to write
[in]Origin: designation of Originating system. Optional, defaulted to " user ". Will be written in file header
[in]StepSchema: specifies a protocol : 1 AP203(E1), 2 AP214, 3 AP203E2, 4 AP242E1 - 0 default : basic AP203, write with colors AP214, write with FDT AP242
Returns
0 if OK , -4 if licence checking has failed

◆ stepw_InitNodeContext() [1/2]

void stepw_InitNodeContext ( const int  inNodeID)

Initialises the context to write items in a node of the model (internal model tree, NOT the assembly tree)

Node Context is defined an ID, UNIQUE in the scope of a Product (between Init3DPart and End3DPart)

Parameters
Thiscontext is kept till End3DPart or next InitNodeContext
inNodeID: the ID attached to this node, must be POSITIVE and UNIQUE in the scope of a PRODUCT

◆ stepw_InitNodeContext() [2/2]

void stepw_InitNodeContext ( const int  inNodeID,
const Dtk_InfoPtr inNodeInfo 
)

Initialises the context to write items in a node of the model (internal model tree, NOT the assembly tree)

Node Context is defined by an ID, UNIQUE in the scope of a Product, and a Dtk_Info for attributes (like color, layer, invisibility)

Parameters
inNodeInfo: the Dtk_Info of thr node which contains the context of 3D items
Thiscontext is kept till End3DPart or next InitNodeContext
inNodeID: the ID attached to this node, must be POSITIVE and UNIQUE in the scope of a PRODUCT

◆ stepw_InitProduct()

DtkErrorStatus stepw_InitProduct ( const Dtk_string inProductName,
int &  outID,
Dtk_ID  inCompID = 0 
)

Initialise the writing of a product (assembly node and/or part with 3D bodies)

Parameters
[in]inProductName: name of product for that product.
Warning
: Must be unique in the whole step file - not checked here, must be checked before (with stepw_WhichProductID , stepw_GiveUniqueProductName)
Parameters
[out]outID: returned UNIQUE identifier for a product. To be used in other calls to identify it
[in]inCompID: OPTIONAL, if positive defines a user identifier for this product

If this product has previously been recorded by AddExternalReference, the sequence InitProduct..EndProduct

Returns
dtkNoError : product OK to be written, dtkErrorUnspecified : error in calling sequence

◆ stepw_InitPropertySet()

Dtk_ErrorStatus stepw_InitPropertySet ( const int  inMode)

Commands Dtk_MetaData to be to be written, attached to the whole Part, or to the following Item to be written.

Items eligible for properties as metadata are : Dtk_Body Dtk_Mesh

Notice : this mode is to be set for each Item, it is reset by End3DPart and by each writing of an Item with Properties

Parameters
[in]inMode: 0 for the whole Part (it is the default), 1 for a Body or Mesh Item to be written
Returns
dtkNoError if OK , dtkErrorOutOfRange if value is incorrect

◆ stepw_SetContextTolerance()

Dtk_ErrorStatus stepw_SetContextTolerance ( const double  inTol)

Modal setting of Length Tolerance for the 3D geometry (uncertainty) To be called before Init3dPart, applies on all Parts till new call, at least once after InitFile.

Parameters
[in]inTol: Value of tolerance, must be positive. If not called, 0.005 is applied
Returns
0 if OK , -1 if value is incorrect

◆ stepw_SetContextUnit()

Dtk_ErrorStatus stepw_SetContextUnit ( const int  inLength,
const int  inAngle = 0 
)

Modal setting of Units in which the geometries, properties, .. are to be written. To be called before Init3dPart, applies on all Parts till new call, at least once after InitFile.

Parameters
[in]inLength: Length Unit, 0 or 1 MM (default), 2 CM, 3 M, 4 KM, 5 IN(INCH), 6 FT(FOOT)
[in]inAngle: Angle Unit, 0 Radian (default), 1 Degree
Warning
: all 3D data and values are assumed to be defined in the choosen units
Returns
0 if OK , -1 if value is incorrect

◆ stepw_SetConversionLengthUnit()

Dtk_ErrorStatus stepw_SetConversionLengthUnit ( const int  inLength)

Modal setting of Length Units in which the geometries, properties, .. are to be converted and written. To be called before Init3dPart, applies on all Parts till new call, at least once after InitFile.

Parameters
[in]inLength: Length Unit, 0 or 1 MM (default), 2 CM, 3 M, 4 KM, 5 IN(INCH), 6 FT(FOOT)
Warning
: all 3D data and values are defined in MM, the STEP writer converts them to the defined length unit (while SetContextUnit takes them as they are)
Returns
0 if OK , -1 if value is incorrect

◆ stepw_SetHeaderData() [1/2]

DtkErrorStatus stepw_SetHeaderData ( const int  inNumItem,
const Dtk_string inValItem 
)

Sets values of fields in Header - variant of stepw_SetHeaderData with a Dtk_string.

Parameters
[in]inNumItem: 0 description, 1 author, 2 organisation, 3 system, 4 authorization
[in]inValItem: the value to be set - empty to go back to default setting
Returns
0 if OK, -1 if inNumItem not supported case

◆ stepw_SetHeaderData() [2/2]

DtkErrorStatus stepw_SetHeaderData ( const int  inNumItem,
const wchar_t *  inValItem 
)

Sets values of fields in Header.

Parameters
[in]inNumItem: 0 description, 1 author, 2 organisation, 3 system, 4 authorization
[in]inValItem: the value to be set - empty to go back to default setting
Returns
0 if OK, -1 if inNumItem not supported case

◆ stepw_SetModeCompress()

DtkErrorStatus stepw_SetModeCompress ( const int  inMode)

Selects a mode of writing compact or compressed step files.

Parameters
[in]inMode: -2 to 1 inMode = -2 and -1 compatible modes with previous versions (-2 full compatible) : concerns duplication of duplicated colors and compact writing of non-rational NURBS (without weights) inMode = 0 normal mode (colors are not duplicated, non-rational NURBS are written compact) inMode = 1 idem plus the output is COMPRESSED (by ZIP algorithm), the file is written as .stp.Z
Returns
0 if OK , -1 if value is incorrect

◆ stepw_SetModeFdt()

DtkErrorStatus stepw_SetModeFdt ( const int  inMode,
const int  inPolyline = 0 
)

Activates/Deactivates writing of FDT (ignored if product Step3dWriteFdt is not present)

Parameters
[in]inMode: general mode, -1 graphics only, 0 no writing, 1 complete write (semantics + full graphics), others values for future use
[in]inPolyline: mode for graphic output, 0 as is (texts, symbols, geometries), 1 minimal (placeholder), 2 polyline, 3 tessellation
Returns
0 if OK , -1 if value is incorrect, -4 if licence checking has failed

◆ stepw_SetModeInfoFirstFace()

DtkErrorStatus stepw_SetModeInfoFirstFace ( const int  inModeInfoFirstFace)

On a solid or shell, Switches on/off the use of graphic attributes of its First Face as default. If the solid/shell has a color defined, this has no effect. Else, if the switch is on, the first face with color is considered as default color for the whole shell, otherwise it has no color assigned.

Parameters
[in]inMode: 0 off, 1 on
Returns
0 if OK , -1 if value is incorrect

◆ stepw_SetModeItemName()

DtkErrorStatus stepw_SetModeItemName ( const int  inMode)

Selects a mode of writing names of internal (topological) 3D items (shells, faces, edges ..)

Parameters
[in]inMode: 0 no writing (empty name), 1 name recorded in Dtk_Info, 2 ID recorded in Dtk_Info (as "no xx")
Returns
0 if OK , -1 if value is incorrect

◆ stepw_SetModeProp()

DtkErrorStatus stepw_SetModeProp ( const int  inMode)

Activates/Deactivates writing of Properties : User Attributes, Product Data.

Parameters
[in]inMode: 0 no writing, 1 attributes (Dtk_Info) + product data, 2 same + typed metadata (except types FileProperty Unknown), 3 same + all metadata
Returns
0 if OK , -1 if value is incorrect

◆ stepw_SetPartProperties()

DtkErrorStatus stepw_SetPartProperties ( const Dtk_InfoPtr inInfo,
const int  inItem 
)

Defines properties to be attached directly to the component : considers the list of Dtk_Val in the Dtk_Info.

Parameters
[in]inInfo: the Dtk_Info which brings the Dtk_Val objects to be written to properties
[in]inItem: 0 dispatched between PDS and PD (see rec.pracs), 1 on PDS, 2 on PD
Warning
: must be called after just before Init3dPart of the component to be populated If Info 0 is set, it is prior to others. Dispatch according to rules of the CAX-IF rec.pracs
Returns
dtkNoError if done, dtk_ErrorOutOfRange if inItem not 0 1 2, dtkErrorUnspecified : error in calling sequence

◆ stepw_WhichProductID()

int stepw_WhichProductID ( const Dtk_string inProductName)

Checks a product (known by its unique name), is it already written If returns < 0 (negative value), not yet written : it can be written Otherwise, already written : it is the product ID of this product for this writing session it can be used in an assembly.

Warning
: This MUST prevent to write this product again ! this would cause inconsistent result

◆ stepw_Write3DAxisSystem()

DtkErrorStatus stepw_Write3DAxisSystem ( const Dtk_AxisSystemPtr inAxis)

Writes an Axis System of a 3D part - in STEP it is a construction geometry based on an axis placement.

(in conjunction with FDT)

Parameters
[in]inBody: the Body to be written
Returns
dtkNoError if done, dtkErrorUnspecified if inAxis is null

◆ stepw_Write3DConstructionGeometry()

DtkErrorStatus stepw_Write3DConstructionGeometry ( const Dtk_BodyPtr inBody)

Writes a Body as a Construction Geometry of a 3D part, of any kind (solid, shell / faces, wireframe / points)

(in conjunction with FDT)

Parameters
[in]inBody: the Body to be written
Returns
dtkNoError if done, dtkErrorUnspecified if inBody is null

◆ stepw_Write3DPartBody()

DtkErrorStatus stepw_Write3DPartBody ( const 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
dtkNoError if done, dtkErrorUnspecified if inBody is null

◆ stepw_Write3DPartBodyWithMesh()

DtkErrorStatus stepw_Write3DPartBodyWithMesh ( const Dtk_BodyPtr inBody,
const Dtk_MeshPtr inMesh,
const int  inMode = 0 
)

Writes a Body of a 3D part (3D content of a product), associated with a Mesh \ brief The Mesh is assumed to be the result of computing tessellation on the Body : its items can be bound with items of the Body \ Warning: not recommended for STEP versions before AP242.

Parameters
[in]inBody: the Body to be written
[in]inMesh: the Mesh to be written - ignored if null
[in]inMode: mode of association, 0(default) as additional representation, 1(ignored before AP242) as alternate
Returns
dtkNoError if done, dtkErrorUnspecified if inBody is null

◆ stepw_Write3DPartMesh()

DtkErrorStatus stepw_Write3DPartMesh ( const Dtk_MeshPtr inMesh)

Writes a Mesh of a 3D part (3D content of a product).

Default is mockup mesh. If no mockup is defined, basic triangles are written instead

Warning
: correct mapping is with mockup; writing basic triangles of meshes is not efficient
Parameters
[in]inMesh: the Mesh to be written
Returns
dtkNoError if done, dtkErrorUnspecified if inMesh is null

◆ stepw_Write3DPartMeshFromBody()

DtkErrorStatus stepw_Write3DPartMeshFromBody ( const Dtk_MeshPtr inMesh,
const Dtk_BodyPtr inBody 
)

Writes a Mesh of a 3D part (3D content of a product), coming from a Body, BUT does not write the Body.

This variant of Write3DPartMesh allows to write a tessellation computed from a Body, and

consider the geometric links (from FDT, etc) to the Body (faces..) as applying to the Mesh (Mesh faces ..) instead

(the tessellation library records for mesh faces the ID of faces they come from)

Another call form Write3DPartBodyWithMesh writes both the Body and the Mesh

Parameters
[in]inMesh: the Mesh to be written
[in]inBody: the Body it comes from (not written) - if Null, ignored (acts as Write3DPartMesh)
Returns
dtkNoError if done, dtkErrorUnspecified if inMesh is null

◆ stepw_WriteAssemblyInstances()

DtkErrorStatus stepw_WriteAssemblyInstances ( const int  inID)

Writes instances detained by a product.

Parameters
[in]inID: UNIQUE identifier for a product. Must be the same as for stepw_InitProduct
Returns
dtkNoError : OK, dtkErrorUnspecified : error in calling sequence

◆ stepw_WriteExternalReference()

Dtk_ErrorStatus stepw_WriteExternalReference ( const int  inID)

Writes a product as an external reference. Only one per file for a given product.

Applies only on a product which has PREVIOUSLY been declared as external by AddExternalReference

Parameters
[in]inID: the identifier of the product. Must repeat the ID of the product given by AddExternalReference

It is useless to call it : if not called, it is automatically called on the first instance of the current file which uses this product.

Returns
dtkNoError if OK, dtkOutOfRange if inID is unknown, dtkErrorUserBreak if already written,