DATAKIT API  V2025.1
stepw.hpp File Reference

Go to the source code of this file.

Data Structures

class  stepw_ER
 
class  stepw_ERP
 

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...
 
DtkErrorStatus stepw_Add3DPartFDT (const Dtk_FdtPtr &inFDT, const stepw_ER &ER)
 
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_AddAnchorItem (const int inEntityID, const int inProductID, const Dtk_string &inGUID)
 
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_AddInstanceToPath (stepw_ERP &ERP, const int inInstanceID)
 
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_AddInstanceWithInfo (const int inIDfather, const int inIDchild, const Dtk_transfo &inPosition, const Dtk_string &inInstanceName, const Dtk_InfoPtr &inInstanceInfo, int &outInstID, const int inInstUserID, const Dtk_string &inRefDesign="")
 
Dtk_ErrorStatus stepw_AddOverrideInstanceInfo (stepw_ERP &ERP, Dtk_InfoPtr &info)
 
DtkErrorStatus stepw_AddReference (stepw_ER &ER)
 
int stepw_AnchorInstanceID (const int user_ID)
 
int stepw_AnchorProductID (const int user_ID)
 
DtkErrorStatus stepw_CreateInstancePath (stepw_ERP &ERP)
 
DtkErrorStatus stepw_CreateReference (stepw_ER &ER, const int inEntityID)
 
DtkErrorStatus stepw_CreateReference (stepw_ER &ER, const int inEntityID, const int inProductID)
 
DtkErrorStatus stepw_CreateReference (stepw_ER &ER, const int inEntityID, const int inProductID, const char *inRefKind)
 
DtkErrorStatus stepw_CreateReferenceToFdt (stepw_ER &ER, const int inEntityID, const int inProductID)
 
DtkErrorStatus stepw_CreateReferenceToGroup (stepw_ER &ER, const int inEntityID, const int inProductID)
 
DtkErrorStatus stepw_CreateReferenceToNode (stepw_ER &ER, const int inNodeID, const int inProductID, const char *inRefKind="")
 
Dtk_ErrorStatus stepw_DefineInstancePath (stepw_ERP &ERP, const Dtk_tab< Dtk_ID > &inInstancePath, const bool userid)
 
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...
 
void stepw_EndNodeContext (const int inNodeID=0)
 
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...
 
DtkErrorStatus stepw_SetAnchorInstance (const int stepw_ID, const int user_ID)
 
DtkErrorStatus stepw_SetAnchorProduct (const int stepw_ID, const int user_ID)
 
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...
 
Dtk_ErrorStatus stepw_SetNextSubBody (const int mode)
 
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...
 
DtkErrorStatus stepw_SetReferencePath (stepw_ER &ER, stepw_ERP &ERP)
 
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_Write3DPartRoot ()
 
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...
 

Function Documentation

◆ stepw_Add3DPartFDT()

DtkErrorStatus stepw_Add3DPartFDT ( const Dtk_FdtPtr inFDT,
const stepw_ER ER 
)

◆ stepw_AddAnchorItem()

Dtk_ErrorStatus stepw_AddAnchorItem ( const int  inEntityID,
const int  inProductID,
const Dtk_string inGUID 
)

◆ stepw_AddInstanceToPath()

DtkErrorStatus stepw_AddInstanceToPath ( stepw_ERP ERP,
const int  inInstanceID 
)

◆ stepw_AddInstanceWithInfo()

DtkErrorStatus stepw_AddInstanceWithInfo ( const int  inIDfather,
const int  inIDchild,
const Dtk_transfo inPosition,
const Dtk_string inInstanceName,
const Dtk_InfoPtr inInstanceInfo,
int &  outInstID,
const int  inInstUserID,
const Dtk_string inRefDesign = "" 
)

◆ stepw_AddOverrideInstanceInfo()

Dtk_ErrorStatus stepw_AddOverrideInstanceInfo ( stepw_ERP ERP,
Dtk_InfoPtr info 
)

◆ stepw_AddReference()

DtkErrorStatus stepw_AddReference ( stepw_ER ER)

◆ stepw_AnchorInstanceID()

int stepw_AnchorInstanceID ( const int  user_ID)

◆ stepw_AnchorProductID()

int stepw_AnchorProductID ( const int  user_ID)

◆ stepw_CreateInstancePath()

DtkErrorStatus stepw_CreateInstancePath ( stepw_ERP ERP)

◆ stepw_CreateReference() [1/3]

DtkErrorStatus stepw_CreateReference ( stepw_ER ER,
const int  inEntityID 
)

◆ stepw_CreateReference() [2/3]

DtkErrorStatus stepw_CreateReference ( stepw_ER ER,
const int  inEntityID,
const int  inProductID 
)

◆ stepw_CreateReference() [3/3]

DtkErrorStatus stepw_CreateReference ( stepw_ER ER,
const int  inEntityID,
const int  inProductID,
const char *  inRefKind 
)

◆ stepw_CreateReferenceToFdt()

DtkErrorStatus stepw_CreateReferenceToFdt ( stepw_ER ER,
const int  inEntityID,
const int  inProductID 
)

◆ stepw_CreateReferenceToGroup()

DtkErrorStatus stepw_CreateReferenceToGroup ( stepw_ER ER,
const int  inEntityID,
const int  inProductID 
)

◆ stepw_CreateReferenceToNode()

DtkErrorStatus stepw_CreateReferenceToNode ( stepw_ER ER,
const int  inNodeID,
const int  inProductID,
const char *  inRefKind = "" 
)

◆ stepw_DefineInstancePath()

Dtk_ErrorStatus stepw_DefineInstancePath ( stepw_ERP ERP,
const Dtk_tab< Dtk_ID > &  inInstancePath,
const bool  userid 
)

◆ stepw_EndNodeContext()

void stepw_EndNodeContext ( const int  inNodeID = 0)

◆ stepw_SetAnchorInstance()

DtkErrorStatus stepw_SetAnchorInstance ( const int  stepw_ID,
const int  user_ID 
)

◆ stepw_SetAnchorProduct()

DtkErrorStatus stepw_SetAnchorProduct ( const int  stepw_ID,
const int  user_ID 
)

◆ stepw_SetNextSubBody()

Dtk_ErrorStatus stepw_SetNextSubBody ( const int  mode)

◆ stepw_SetReferencePath()

DtkErrorStatus stepw_SetReferencePath ( stepw_ER ER,
stepw_ERP ERP 
)

◆ stepw_Write3DPartRoot()

DtkErrorStatus stepw_Write3DPartRoot ( )