Exported APIs for STEP Write Library. More...
Functions | |
SetAsDeprecated ("2025.4", "Use stepw_Add3DModelDisplay and stepw_AddReference instead.") Dtk_ErrorStatus stepw_Add3DFdtModelDisplay(const Dtk_ModelDisplayPtr &inModelDisplay | |
Adds a view ( Dtk_ModelDisplay ) with a link to a FDT, in the current part context. More... | |
Dtk_ErrorStatus | stepw_Add3DModelDisplay (const Dtk_ModelDisplayPtr &inModelDisplay, const int inMode) |
Adds a view ( Dtk_ModelDisplay ) in the current part context. More... | |
DtkErrorStatus | stepw_Add3DPartFDT (const Dtk_FdtPtr &inFDT) |
Adds a FDT in the current part context. More... | |
DtkErrorStatus | stepw_Add3DPartFDT (const Dtk_FdtPtr &inFDT, const Dtk_FdtPtr &inFDTGraf) |
Adds a FDT in the current part context, with a predefined graphic presentation. More... | |
DtkErrorStatus | stepw_Add3DPartFDT (const Dtk_FdtPtr &inFDT, const stepw_ER &inER) |
Adds a FDT in the current part context, with an element reference (usually the target geometry). More... | |
Dtk_ErrorStatus | stepw_Add3DPartProperty (const Dtk_MetaDataPtr &inProperty) |
Adds a roperty to a part (default), or to an entity, according to InitPropertySet mode. More... | |
Dtk_ErrorStatus | stepw_AddAnchorItem (const int inEntityID, const int inProductID, const Dtk_string &inGUID) |
Registers an entity in the ANCHOR section, with an assigned GUID (optional). 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 an external reference (separated file). More... | |
DtkErrorStatus | stepw_AddInstance (const int inFatherProductID, const int inChildProductID, const Dtk_transfo &inPosition, const Dtk_string &inInstanceName) |
Adds an instance of a product ( child ) in an assembly product ( father ). More... | |
DtkErrorStatus | stepw_AddInstanceToPath (stepw_ERP &inOutElementReferencePath, const int inInstanceID) |
Appends an instance identifier to the element reference path. The instance identifier is provided by this library. More... | |
DtkErrorStatus | stepw_AddInstanceWithInfo (const int inFatherProductID, const int inChildProductID, const Dtk_transfo &inPosition, const Dtk_string &inInstanceName, const Dtk_InfoPtr &inInstanceInfo) |
Adds an instance of a product ( child ) in an assembly product ( father ), with provided attributes. More... | |
DtkErrorStatus | stepw_AddInstanceWithInfo (const int inFatherProductID, const int inChildProductID, const Dtk_transfo &inPosition, const Dtk_string &inInstanceName, const Dtk_InfoPtr &inInstanceInfo, int &outInstanceID, const int inInstanceUserID=0, const Dtk_string &inReferenceDesignator="") |
Adds an instance of a product ( child ) in an assembly product ( father ), with provided attributes. More... | |
Dtk_ErrorStatus | stepw_AddOverrideInstanceInfo (stepw_ERP &inElementReferencePath, Dtk_InfoPtr &inOverrideInfo) |
Assigns information on an instance in multi-level assembly context. More... | |
DtkErrorStatus | stepw_AddReference (stepw_ER &inElementReference) |
Registers the previously created element reference in the writer. More... | |
int | stepw_AnchorProductID (const int inUserID) |
Finds the product having an ANCHOR section, by user identifier. More... | |
DtkErrorStatus | stepw_CreateInstancePath (stepw_ERP &inOutElementReferencePath) |
Initializes a path for the element reference, identifying the sequence of instances to pass through. More... | |
DtkErrorStatus | stepw_CreateReference (stepw_ER &inOutElementReference, const int inEntityID, const int inProductID=0, const char *inReferenceKind="") |
Creates a reference to an entity located in the designated Product/Part context, or current context if not specified. More... | |
DtkErrorStatus | stepw_CreateReferenceToFdt (stepw_ER &inOutElementReference, const int inEntityID, const int inProductID) |
Creates a reference to an entity located in the designated Product/Part context. The reference target is known to be an FDT (Dtk_FDT). More... | |
DtkErrorStatus | stepw_CreateReferenceToGroup (stepw_ER &inOutElementReference, const int inEntityID, const int inProductID) |
Creates a reference to an entity located in the designated Product/Part context. The reference target is known to be a feature (Dtk_Feature) (interpreted as a group of geometries). More... | |
DtkErrorStatus | stepw_CreateReferenceToNode (stepw_ER &inOutElementReference, const int inNodeID, const int inProductID=0, const char *inReferenceKind="") |
Creates a reference to a whole node (Dtk_Node), located in the designated Product/Part context. More... | |
Dtk_ErrorStatus | stepw_DefineInstancePath (stepw_ERP &inOutElementReferencePath, const Dtk_tab< Dtk_ID > &inInstancePath, const bool unused=false) |
Define the whole instance identifier sequence of the element reference path. More... | |
DtkErrorStatus | stepw_End3DPart () |
Ends the writing of a product 3D part. More... | |
DtkErrorStatus | stepw_EndFile () |
Ends the writing of the current STEP file. More... | |
void | stepw_EndNodeContext (const int unused=0) |
Ends current node context. More... | |
DtkErrorStatus | stepw_EndProduct (const int inProductID) |
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 (stepw_InitFile to stepw_EndFile). More... | |
Dtk_string | stepw_GiveUniqueProductName (const Dtk_string &inProductName) |
Creates a unique product name. More... | |
DtkErrorStatus | stepw_Init3DPart (const int inProductID) |
Initializes the writing of a 3D part for the designated product. More... | |
DtkErrorStatus | stepw_InitFile (const Dtk_string &inFileName, const char *inOriginatingSystem=" user ", const int inSchema=0) |
Initializes a file to be written. More... | |
void | stepw_InitNodeContext (const int inNodeID) |
Initializes the context to write entities in a node. More... | |
void | stepw_InitNodeContext (const int inNodeID, const Dtk_InfoPtr &inNodeInfo) |
Initializes the context to write entities in a node. More... | |
DtkErrorStatus | stepw_InitProduct (const Dtk_string &inProductName, int &outAssignedID, Dtk_ID inProductUserID=0) |
Initializes the definition context of a product. More... | |
Dtk_ErrorStatus | stepw_InitPropertySet (const int inMode) |
Sets attachment mode for next property writing : the whole Part, or to the following entity to be written. More... | |
DtkErrorStatus | stepw_SetAnchorProduct (const int inProductID, const int inUserID) |
Declares the product as having an ANCHOR section. If the designated product is already declared as such, sets its user-defined identifier. More... | |
Dtk_ErrorStatus | stepw_SetContextTolerance (const double inTol) |
Sets length tolerance for the 3D geometry (uncertainty). More... | |
Dtk_ErrorStatus | stepw_SetContextUnit (const int inLength, const int inAngle=0) |
Sets file units in which the geometries, properties are to be written. More... | |
Dtk_ErrorStatus | stepw_SetConversionLengthUnit (const int inLength) |
Sets file units in which the geometries, properties are to be written, and apply the conversion factor (from MM). More... | |
DtkErrorStatus | stepw_SetHeaderData (const int inNumItem, const Dtk_string &inValItem) |
Sets STEP file header fields value. More... | |
DtkErrorStatus | stepw_SetHeaderData (const int inNumItem, const wchar_t *inValItem) |
Sets STEP file header fields value. More... | |
DtkErrorStatus | stepw_SetInstanceUserID (const int inInstanceID, const int inInstanceUserID) |
Sets the designated instance its user-defined identifier. 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=2) |
Activates/Deactivates writing of FDT. More... | |
DtkErrorStatus | stepw_SetModeInfoFirstFace (bool inModeInfoFirstFace) |
On a solid or shell, allows the spreading of its first available face graphical attributes to the whole solid/shell. More... | |
DtkErrorStatus | stepw_SetModeItemName (const int inMode) |
Selects a mode for topological 3D items naming policy (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 product : considers the list of Dtk_Val in the Dtk_Info. More... | |
DtkErrorStatus | stepw_SetProductLayerInfosSet (const Dtk_LayerInfosSetPtr inLayerInfoSet) |
Sets the LayerInfosSet to refer to when writing the current product. It uses its mapping between layer identifier and name. More... | |
DtkErrorStatus | stepw_SetReferencePath (stepw_ER &inOutElementReference, stepw_ERP &inElementReferencePath) |
Assigns the element reference path to the element reference. More... | |
int | stepw_WhichInstanceID (const int inUserID) |
Checks if an instance (known by its user-defined identifier), is already registered. More... | |
int | stepw_WhichProductID (const Dtk_string &inProductName) |
Checks if a product (known by its unique name), is already registered. 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. 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, without writing the body itself. 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... | |
Exported APIs for STEP Write Library.
SetAsDeprecated | ( | "2025.4" | , |
"Use stepw_Add3DModelDisplay and stepw_AddReference instead." | |||
) | const & |
Adds a view ( Dtk_ModelDisplay ) with a link to a FDT, in the current part context.
Can be called at any time between stepw_Init3DPart and stepw_End3DPart - writing takes place after the bodies. A same FDT can be used in several views.
[in] | inModelDisplay | : the view to be written with the 3D Part. |
[in] | inFDT | : the FDT to be linked to the view. |
Dtk_ErrorStatus stepw_Add3DModelDisplay | ( | const Dtk_ModelDisplayPtr & | inModelDisplay, |
const int | inMode | ||
) |
Adds a view ( Dtk_ModelDisplay ) in the current part context.
Can be called at any time between stepw_Init3DPart and stepw_End3DPar, writing takes place after the bodies.
[in] | inModelDisplay | : the view to be written with the 3D Part. |
[in] | inMode | : 0 no FDT/Annotation is attached to the view (default), 1 all FDT/Annotations are attached to the view. |
DtkErrorStatus stepw_Add3DPartFDT | ( | const Dtk_FdtPtr & | inFDT | ) |
Adds a FDT in the current part context.
Can be called at any time between stepw_Init3DPart and stepw_End3DPart, writing takes place after the bodies.
[in] | inFDT | : the FDT to be written with the 3D part (according to ModeFdt, as semantic and/or graphic). |
DtkErrorStatus stepw_Add3DPartFDT | ( | const Dtk_FdtPtr & | inFDT, |
const Dtk_FdtPtr & | inFDTGraf | ||
) |
Adds a FDT in the current part context, with a predefined graphic presentation.
Can be called at any time between stepw_Init3DPart and stepw_End3DPart, writing takes place after the bodies.
[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. |
DtkErrorStatus stepw_Add3DPartFDT | ( | const Dtk_FdtPtr & | inFDT, |
const stepw_ER & | inER | ||
) |
Adds a FDT in the current part context, with an element reference (usually the target geometry).
[in] | inFDT | : the FDT to be written with the 3D part (according to ModeFdt, as semantic and/or graphic). |
[in] | inER | : the element reference allowing the FDT to target entities (usually geometries). |
Dtk_ErrorStatus stepw_Add3DPartProperty | ( | const Dtk_MetaDataPtr & | inProperty | ) |
Adds a roperty to a part (default), or to an entity, according to InitPropertySet mode.
Properties on the whole part can represent either "Product Data" or a property of any kind. "Product Data" are predefined properties, their reserved titles are : "Part Number", "Nomenclature", "Description", "Definition", "Revision", "Document" or "Source". All are optional (when absent, a default value is set), required to be TEXT, "Source" must take these values : "MADE" or "BOUGHT" otherwise it is ignored. Entity properties will be attached to the next written entity, so, to be called before writing the entity of attachment. Entities eligible for properties as metadata are : Dtk_Body, Dtk_Mesh.
[in] | inProperty | : the MetaData to be written with the 3D Part. |
Dtk_ErrorStatus stepw_AddAnchorItem | ( | const int | inEntityID, |
const int | inProductID, | ||
const Dtk_string & | inGUID | ||
) |
Registers an entity in the ANCHOR section, with an assigned GUID (optional).
Entities declared in the ANCHOR section can be referenced from outside of the product file, in cases where this product is written in a separated file. If the designated product is not yet declared as having an ANCHOR section, it calls stepw_SetAnchorProduct.
[in] | inEntityID | : identifier of the entity to declare in the ANCHOR section. |
[in] | inProductID | : identifier of the product where to declare entities in the ANCHOR section. |
[in] | inGUID | : the GUID to assign to the entity. |
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 an external reference (separated file).
[in] | inProductName | : name of product to be referenced externally. |
[in] | inFileName | : name of file in which its content will be written. |
[out] | outID | : returned unique identifier for a product. To be used in other calls to identify it. |
[in] | inInstCompID | : optional, defines a user identifier for this product. If a sequence stepw_InitProduct - stepw_EndProduct is then called with outID identifier, it automatically produces 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.
DtkErrorStatus stepw_AddInstance | ( | const int | inFatherProductID, |
const int | inChildProductID, | ||
const Dtk_transfo & | inPosition, | ||
const Dtk_string & | inInstanceName | ||
) |
Adds an instance of a product ( child ) in an assembly product ( father ).
[in] | inFatherProductID | : unique identifier of the father product, provided by stepw_InitProduct. |
[in] | inChildProductID | : unique identifier of the child product, provided by stepw_InitProduct. |
[in] | inPosition | : the relative position of the child product instance, in the father product. |
[in] | inInstanceName | : name to be assigned to the instance. |
DtkErrorStatus stepw_AddInstanceToPath | ( | stepw_ERP & | inOutElementReferencePath, |
const int | inInstanceID | ||
) |
Appends an instance identifier to the element reference path. The instance identifier is provided by this library.
When in the context of an assembly with more than one depth level, to designates the instance of a part/product located at a deeper level, there is a need to identify all of the part/product instances we pass through.
[in,out] | inOutElementReferencePath | : object representing the reference path, that will be used internally. |
[in] | inInstanceID | : identifier of an instance to append to the element reference path. |
DtkErrorStatus stepw_AddInstanceWithInfo | ( | const int | inFatherProductID, |
const int | inChildProductID, | ||
const Dtk_transfo & | inPosition, | ||
const Dtk_string & | inInstanceName, | ||
const Dtk_InfoPtr & | inInstanceInfo | ||
) |
Adds an instance of a product ( child ) in an assembly product ( father ), with provided attributes.
[in] | inFatherProductID | : unique identifier of the father product, provided by stepw_InitProduct. |
[in] | inChildProductID | : unique identifier of the child product, provided by stepw_InitProduct. |
[in] | inPosition | : the relative position of the child product instance, in the father product. |
[in] | inInstanceName | : name to be assigned to the instance. |
[in] | inInstanceInfo | : set of information to be attached to the instance, contains attributes (Dtk_Val). |
DtkErrorStatus stepw_AddInstanceWithInfo | ( | const int | inFatherProductID, |
const int | inChildProductID, | ||
const Dtk_transfo & | inPosition, | ||
const Dtk_string & | inInstanceName, | ||
const Dtk_InfoPtr & | inInstanceInfo, | ||
int & | outInstanceID, | ||
const int | inInstanceUserID = 0 , |
||
const Dtk_string & | inReferenceDesignator = "" |
||
) |
Adds an instance of a product ( child ) in an assembly product ( father ), with provided attributes.
[in] | inFatherProductID | : unique identifier of the father product, provided by stepw_InitProduct. |
[in] | inChildProductID | : unique identifier of the child product, provided by stepw_InitProduct. |
[in] | inPosition | : the relative position of the child product instance, in the father product. |
[in] | inInstanceName | : name to be assigned to the instance. |
[in] | inInstanceInfo | : set of information attached to the instance, contains attributes (Dtk_Val). |
[out] | outInstanceID | : the assigned identifier to the created instance. |
[in] | inInstanceUserID | : optional, the identifier the user wants to provide to the instance, that will be use in addition to the one assigned by this library. |
[in] | inReferenceDesignator | : optional, additional name identification field for the instance. |
Dtk_ErrorStatus stepw_AddOverrideInstanceInfo | ( | stepw_ERP & | inElementReferencePath, |
Dtk_InfoPtr & | inOverrideInfo | ||
) |
Assigns information on an instance in multi-level assembly context.
The first identifier of the route designating the instance allows to deduce in which assembly context the instance will hold the information. This produces the writing of a CONTEXT_DEPENDENT_OVERRIDING_STYLED_ITEM.
[in] | inElementReferencePath | : the instance route to designate the instance in the assembly. |
[in] | inOverrideInfo | : the information to apply to this instance. Only color and blanked status are taken into account. |
DtkErrorStatus stepw_AddReference | ( | stepw_ER & | inElementReference | ) |
Registers the previously created element reference in the writer.
[in] | inElementReference | : object representing the reference, that will be used internally. |
int stepw_AnchorProductID | ( | const int | inUserID | ) |
Finds the product having an ANCHOR section, by user identifier.
[in] | inUserID | : identifier the user previously provided to identify the product. |
DtkErrorStatus stepw_CreateInstancePath | ( | stepw_ERP & | inOutElementReferencePath | ) |
Initializes a path for the element reference, identifying the sequence of instances to pass through.
When in the context of an assembly with more than one depth level, to designates the instance of a part/product located at a deeper level, there is a need to identify all of the part/product instances we pass through.
[in,out] | inOutElementReferencePath | : object representing the reference path, that will be used internally. |
DtkErrorStatus stepw_CreateReference | ( | stepw_ER & | inOutElementReference, |
const int | inEntityID, | ||
const int | inProductID = 0 , |
||
const char * | inReferenceKind = "" |
||
) |
Creates a reference to an entity located in the designated Product/Part context, or current context if not specified.
[in,out] | inOutElementReference | : object representing the reference, that will be used internally. |
[in] | inEntityID | : identifier of a Dtk_Entity that will be referenced in current Product/Part. |
[in] | inProductID | : identifier of the Product in which the entity is located. If equals 0, the current Product/Part context is used. |
[in] | inReferenceKind | : Optional, character sequence to specify the reason of the reference. Supported sequences are "fdt", "group", "visible", "hidden". "fdt" allows to specify that the target of the reference is a FDT entity (Dtk_Fdt). "group" allows to specify that the target of the reference is a feature (interpreted as a group of geometries) (Dtk_Feature). "visible" allows to specify that the target should be visible in the designated Product/Part context. "hidden" allows to specify that the target should be hidden in the designated Product/Part context. |
DtkErrorStatus stepw_CreateReferenceToFdt | ( | stepw_ER & | inOutElementReference, |
const int | inEntityID, | ||
const int | inProductID | ||
) |
Creates a reference to an entity located in the designated Product/Part context. The reference target is known to be an FDT (Dtk_FDT).
[in,out] | inOutElementReference | : object representing the reference, that will be used internally. |
[in] | inEntityID | : identifier of a Dtk_Entity that will be referenced in current Product/Part (is an FDT). |
[in] | inProductID | : identifier of the Product in which the entity is located. If equals 0, the current Product/Part context is used. |
DtkErrorStatus stepw_CreateReferenceToGroup | ( | stepw_ER & | inOutElementReference, |
const int | inEntityID, | ||
const int | inProductID | ||
) |
Creates a reference to an entity located in the designated Product/Part context. The reference target is known to be a feature (Dtk_Feature) (interpreted as a group of geometries).
[in,out] | inOutElementReference | : object representing the reference, that will be used internally. |
[in] | inEntityID | : identifier of a Dtk_Entity that will be referenced in current Product/Part (is a feature). |
[in] | inProductID | : identifier of the Product in which the entity is located. If equals 0, the current Product/Part context is used. |
DtkErrorStatus stepw_CreateReferenceToNode | ( | stepw_ER & | inOutElementReference, |
const int | inNodeID, | ||
const int | inProductID = 0 , |
||
const char * | inReferenceKind = "" |
||
) |
Creates a reference to a whole node (Dtk_Node), located in the designated Product/Part context.
[in,out] | inOutElementReference | : object representing the reference, that will be used internally. |
[in] | inNodeID | : identifier of a Dtk_Node that will be referenced in current Product/Part context. |
[in] | inProductID | : identifier of the Product in which the entity is located. If equals 0, the current Product/Part context is used. |
[in] | inReferenceKind | : Optional, character sequence to specify the reason of the reference. Supported sequences are "fdt", "group", "visible", "hidden". "fdt" allows to specify that the target of the reference is a node that contains a FDT (Dtk_Node, Dtk_Fdt). "group" allows to specify that the target of the reference is a node that contains a feature (interpreted as a group of geometries) (Dtk_Node, Dtk_Feature). "visible" allows to specify that the target should be visible in the designated Product/Part context. "hidden" allows to specify that the target should be hidden in the designated Product/Part context. |
Dtk_ErrorStatus stepw_DefineInstancePath | ( | stepw_ERP & | inOutElementReferencePath, |
const Dtk_tab< Dtk_ID > & | inInstancePath, | ||
const bool | unused = false |
||
) |
Define the whole instance identifier sequence of the element reference path.
When in the context of an assembly with more than one depth level, to designates the instance of a part/product located at a deeper level, there is a need to identify all of the part/product instances we pass through.
[in,out] | inOutElementReferencePath | : object representing the reference path, that will be used internally. |
[in] | inInstancePath | : sequence of instance identifiers to define for the element reference path. |
DtkErrorStatus stepw_End3DPart | ( | ) |
Ends the writing of a product 3D part.
DtkErrorStatus stepw_EndFile | ( | ) |
Ends the writing of the current STEP file.
void stepw_EndNodeContext | ( | const int | unused = 0 | ) |
Ends current node context.
DtkErrorStatus stepw_EndProduct | ( | const int | inProductID | ) |
Ends the writing of a product - calls WriteAssemblyInstances if not yet done.
[in] | inID | : unique identifier for a product. Must be the same as for stepw_InitProduct. |
Dtk_string stepw_GiveUniqueFileName | ( | const Dtk_string & | inFileName | ) |
Creates a unique file name for an external reference - applies to the current session (stepw_InitFile to stepw_EndFile).
Dtk_string stepw_GiveUniqueProductName | ( | const Dtk_string & | inProductName | ) |
Creates a unique product name.
DtkErrorStatus stepw_Init3DPart | ( | const int | inProductID | ) |
Initializes the writing of a 3D part for the designated product.
Each product must have a 3D part, even empty : started by stepw_Init3DPart, ended by stepw_End3DPart. The 3D part can contain multiple geometries (body, mesh, wireframe).
[in] | inProductID | : unique identifier of the product, provided by stepw_InitProduct. |
DtkErrorStatus stepw_InitFile | ( | const Dtk_string & | inFileName, |
const char * | inOriginatingSystem = " user " , |
||
const int | inSchema = 0 |
||
) |
Initializes a file to be written.
[in] | inFileName | : Step File to write |
[in] | inOriginatingSystem | : optional, designation of Originating system. Will be written in file header |
[in] | inSchema | : specifies a protocol. Supported input : 1 for AP203(E1), 2 for AP214, 3 for AP203E2, 4 for AP242E1, 5 for AP242E4, 0 to adapt to content that will be written. |
void stepw_InitNodeContext | ( | const int | inNodeID | ) |
Initializes the context to write entities in a node.
Typical entity that needs encapsulation in a node is FDT.
inNodeID | : the identifier attached to this node, must be positive and unique in the scope of a product. |
void stepw_InitNodeContext | ( | const int | inNodeID, |
const Dtk_InfoPtr & | inNodeInfo | ||
) |
Initializes the context to write entities in a node.
inNodeInfo | : additional information/attributes to qualify the node (color, layer, invisibility). |
inNodeID | : the identifier attached to this node, must be positive and unique in the scope of a product. |
DtkErrorStatus stepw_InitProduct | ( | const Dtk_string & | inProductName, |
int & | outAssignedID, | ||
Dtk_ID | inProductUserID = 0 |
||
) |
Initializes the definition context of a product.
[in] | inProductName | : name to be assigned to the product. |
[out] | outAssignedID | : assigned unique identifier of the product. To be used in other calls to identify it. |
[in] | inProductUserID | : optional, if positive, defines a user identifier for this product. |
Dtk_ErrorStatus stepw_InitPropertySet | ( | const int | inMode | ) |
Sets attachment mode for next property writing : the whole Part, or to the following entity to be written.
Entities eligible for properties as metadata are : Dtk_Body, Dtk_Mesh. this mode is to be set for each entity, it is reset by stepw_End3DPart and by each writing of an entity with properties.
[in] | inMode | : 0 attach property to the whole Part (default), 1 attach property to a body or mesh entity to be written. |
DtkErrorStatus stepw_SetAnchorProduct | ( | const int | inProductID, |
const int | inUserID | ||
) |
Declares the product as having an ANCHOR section. If the designated product is already declared as such, sets its user-defined identifier.
Having an ANCHOR section allows the product to declare entities that can be referenced from outside of the product file, in cases where this product is written in a separated file.
[in] | inProductID | : identifier of the product to declare. |
[in] | inUserID | : identifier the user wants to provide to the product, to be able to retrieve it later. |
Dtk_ErrorStatus stepw_SetContextTolerance | ( | const double | inTol | ) |
Sets length tolerance for the 3D geometry (uncertainty).
To be called before stepw_Init3DPart, applies on all Parts till new call.
[in] | inTol | : tolerance value, must be positive. |
Dtk_ErrorStatus stepw_SetContextUnit | ( | const int | inLength, |
const int | inAngle = 0 |
||
) |
Sets file units in which the geometries, properties are to be written.
To be called before stepw_Init3DPart. It applies on all Parts following its call.
[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. |
Dtk_ErrorStatus stepw_SetConversionLengthUnit | ( | const int | inLength | ) |
Sets file units in which the geometries, properties are to be written, and apply the conversion factor (from MM).
To be called before stepw_Init3DPart. It applies on all Parts following its call.
[in] | inLength | : Length Unit, 0 or 1 MM (default), 2 CM, 3 M, 4 KM, 5 IN(INCH), 6 FT(FOOT). |
DtkErrorStatus stepw_SetHeaderData | ( | const int | inNumItem, |
const Dtk_string & | inValItem | ||
) |
Sets STEP file header fields value.
[in] | inNumItem | : 0 description, 1 author, 2 organisation, 3 system, 4 authorization. |
[in] | inValItem | : the value to be set. If empty, switch back to default settings for this field. |
DtkErrorStatus stepw_SetHeaderData | ( | const int | inNumItem, |
const wchar_t * | inValItem | ||
) |
Sets STEP file header fields value.
[in] | inNumItem | : 0 description, 1 author, 2 organisation, 3 system, 4 authorization. |
[in] | inValItem | : the value to be set. If empty, switch back to default settings for this field. |
DtkErrorStatus stepw_SetInstanceUserID | ( | const int | inInstanceID, |
const int | inInstanceUserID | ||
) |
Sets the designated instance its user-defined identifier.
[in] | inInstanceID | : the already assigned identifier of the designated instance. |
[in] | inInstanceUserID | :the identifier the user wants to provide to the instance, that will be use in addition to the one assigned by this library. |
DtkErrorStatus stepw_SetModeCompress | ( | const int | inMode | ) |
Selects a mode of writing compact or compressed step files.
[in] | inMode | : 0 normal mode, 1 output a compressed .stp.Z file (ZIP algorithm), 2 output an archive .stpa file. |
DtkErrorStatus stepw_SetModeFdt | ( | const int | inMode, |
const int | inPolyline = 2 |
||
) |
Activates/Deactivates writing of FDT.
[in] | inMode | : FDT representation mode, -1 graphics only, 0 no writing, 1 fully semantic (with graphics). |
[in] | inPolyline | : FDT presentation mode (graphic output), 1 minimal (placeholder), 2 polyline, 3 tessellated. |
DtkErrorStatus stepw_SetModeInfoFirstFace | ( | bool | inModeInfoFirstFace | ) |
On a solid or shell, allows the spreading of its first available face graphical attributes to the whole solid/shell.
[in] | inMode | : true to activate, false to deactivate. |
DtkErrorStatus stepw_SetModeItemName | ( | const int | inMode | ) |
Selects a mode for topological 3D items naming policy (shells, faces, edges ).
[in] | inMode | : 0 no writing (empty name), 1 use name recorded in Dtk_Info, 2 use ID recorded in Dtk_Info (as "no [ID]"). |
DtkErrorStatus stepw_SetModeProp | ( | const int | inMode | ) |
Activates/Deactivates writing of properties : User Attributes, Product Data.
[in] | inMode | : determines what input attributes or properties will be written. 0 no writing, 1 attributes ( stored in Dtk_Info ) and product data, 2 same as 1, with also metadata (Dtk_MetaData::TypeFileProperty and Dtk_MetaData::TypeUnknown are filtered), 3 same as 2, without any Dtk_Metadata filtering |
DtkErrorStatus stepw_SetPartProperties | ( | const Dtk_InfoPtr & | inInfo, |
const int | inItem | ||
) |
Defines properties to be attached directly to the product : considers the list of Dtk_Val in the Dtk_Info.
[in] | inInfo | : the Dtk_Info which brings the Dtk_Val objects to be written as properties. |
[in] | inItem | : 0 dispatched between part (PDS) and product (PD), 1 on part only, 2 on product only. PDS = PRODUCT_DEFINITION_SHAPE or part, PD = PRODUCT_DEFINITION or product. |
DtkErrorStatus stepw_SetProductLayerInfosSet | ( | const Dtk_LayerInfosSetPtr | inLayerInfoSet | ) |
Sets the LayerInfosSet to refer to when writing the current product. It uses its mapping between layer identifier and name.
3D shapes can be assigned to a layer (through a layer index, in Dtk_Info). The Dtk_LayerInfoSet can further qualify those layers, by assigning them a name. Setting the LayerInfoSet for the product has to happen after stepw_InitProduct, and before any calls to stepw_Write3DPartBody, to be taken into account.
[in] | inLayerInfoSet | : Pointer to the LayerInfosSet to refer to, in order to assign names to layers. |
DtkErrorStatus stepw_SetReferencePath | ( | stepw_ER & | inOutElementReference, |
stepw_ERP & | inElementReferencePath | ||
) |
Assigns the element reference path to the element reference.
[in,out] | inOutElementReference | : the element reference to which the path will be assigned. |
[in] | inElementReferencePath | : the path to assign to the element reference. |
int stepw_WhichInstanceID | ( | const int | inUserID | ) |
Checks if an instance (known by its user-defined identifier), is already registered.
int stepw_WhichProductID | ( | const Dtk_string & | inProductName | ) |
Checks if a product (known by its unique name), is already registered.
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.
Usually used to complement FDT definition.
[in] | inAxis | : the axis to be written. |
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).
Usually used to complement FDT definition.
[in] | inBody | : the body to be written. |
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).
[in] | inBody | : the body to be written. |
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.
The mesh is assumed to be the result of computing tessellation on the body in case of association : its items can be bound with items of the body.
[in] | inBody | : the body to be written. |
[in] | inMesh | : the mesh to be written, ignored if null. |
[in] | inMode | : mode of association, 0 as additional representation (default), 1 as alternate geometry (ignored before AP242). |
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.
[in] | inMesh | : the mesh to be written. |
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, without writing the body itself.
The mesh is assumed to be the result of computing tessellation on the body in case of association : its items can be bound with items of the body.
[in] | inMesh | : the mesh to be written. |
[in] | inBody | : the body it comes from (not written), ignored if null (acts as Write3DPartMesh). |
DtkErrorStatus stepw_WriteAssemblyInstances | ( | const int | inID | ) |
Writes instances detained by a product.
[in] | inID | : unique identifier for a product. Must be the same as for stepw_InitProduct. |
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.
[in] | inID | : the identifier of the product. Must repeat the ID of the product given by AddExternalReference. It is not necessary to call it : the first instance that uses this product will call automatically this function. |