DATAKIT API  V2025.1
stepw.hpp
Go to the documentation of this file.
1 class stepw_ER;
2 
5 
13 
14 DtkErrorStatus stepw_InitFile (const Dtk_string& inFileOut, const char* Origin=" user ", const int StepSchema=0);
15 
21 DtkErrorStatus stepw_SetHeaderData (const int inNumItem, const wchar_t* inValItem);
22 
28 DtkErrorStatus stepw_SetHeaderData (const int inNumItem, const Dtk_string& inValItem);
29 
36 
37 DtkErrorStatus stepw_SetModeFdt (const int inMode, const int inPolyline = 0);
38 
43 DtkErrorStatus stepw_SetModeProp (const int inMode);
44 
50 
60 
67 DtkErrorStatus stepw_SetModeInfoFirstFace (const int inModeInfoFirstFace);
68 
76 
77 Dtk_ErrorStatus stepw_SetContextUnit (const int inLength, const int inAngle=0);
78 
79 
88 
94 
96 
103 
105 
118 
119 Dtk_ErrorStatus stepw_AddExternalReference (const Dtk_string& inProductName, const Dtk_string& inFileName, int& outID, Dtk_ID inInstCompId=0);
120 
129 // dtkErrorUnspecified if not recorded by AddExternalReference
130 
132 
139 int stepw_WhichProductID (const Dtk_string& inProductName);
140 
149 
158 // writes another STEP file, same path, file name as given to AddExternalReference
160 
161 DtkErrorStatus stepw_InitProduct (const Dtk_string& inProductName, int& outID, Dtk_ID inCompID=0);
162 
170 
171 DtkErrorStatus stepw_AddInstance (const int inIDfather, const int inIDchild, const Dtk_transfo& inPosition, const Dtk_string& inInstanceName); // 0 OK, -1 ERROR
172 
173 
182 
183 DtkErrorStatus stepw_AddInstanceWithInfo (const int inIDfather, const int inIDchild, const Dtk_transfo& inPosition, const Dtk_string& inInstanceName, const Dtk_InfoPtr& inInstanceInfo);
184 
185 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 = "");
186 
187 
195 
197 
198 
205 
207 
213 void stepw_InitNodeContext(const int inNodeID);
214 
221 void stepw_InitNodeContext(const int inNodeID, const Dtk_InfoPtr& inNodeInfo);
222 
223 // ?? deocumenter
224 void stepw_EndNodeContext(const int inNodeID = 0);
225 
226 // ?? deocumenter
228 
233 
235 
236 
245 
246 DtkErrorStatus stepw_Write3DPartBodyWithMesh (const Dtk_BodyPtr& inBody, const Dtk_MeshPtr& inMesh, const int inMode=0);
247 
253 
255 
262 
269 
271 
281 
283 
290 
292 
300 
301 DtkErrorStatus stepw_Add3DPartFDT (const Dtk_FdtPtr& inFDT, const Dtk_FdtPtr& inFDTGraf);
302 
304 
305 
315 Dtk_ErrorStatus stepw_Add3DModelDisplay (const Dtk_ModelDisplayPtr& inModelDisplay, const int inMode);
316 
329 
337 
355 
357 
361 
363 
368 DtkErrorStatus stepw_WriteAssemblyInstances (const int inID); // inID must repeat that of InitProduct
369 
374 
376 
377 
381 
383 
384 
385 // == Class to describe element references inside a component or between components
386 
387 class stepw_ER { // Element Reference
388  public:
390 
391 void* _data;
392 };
393 
394 class stepw_ERP {
395 public:
397 
398 void* _data;
399 };
400 
401 // Setting reference in current product
402 DtkErrorStatus stepw_CreateReference (stepw_ER& ER, const int inEntityID);
403 
404 DtkErrorStatus stepw_CreateReference (stepw_ER& ER, const int inEntityID, const int inProductID);
405 
406 DtkErrorStatus stepw_CreateReference (stepw_ER& ER, const int inEntityID, const int inProductID, const char* inRefKind);
407 
408 DtkErrorStatus stepw_CreateReferenceToNode(stepw_ER& ER, const int inNodeID, const int inProductID, const char* inRefKind = "");
409 
411 
412 DtkErrorStatus stepw_CreateReferenceToFdt (stepw_ER& ER, const int inEntityID, const int inProductID);
413 
414 DtkErrorStatus stepw_CreateReferenceToGroup (stepw_ER& ER, const int inEntityID, const int inProductID);
415 
416 DtkErrorStatus stepw_SetAnchorProduct (const int stepw_ID, const int user_ID);
417 
418 int stepw_AnchorProductID (const int user_ID);
419 
420 Dtk_ErrorStatus stepw_AddAnchorItem (const int inEntityID, const int inProductID, const Dtk_string& inGUID);
421 
423 
424 DtkErrorStatus stepw_AddInstanceToPath (stepw_ERP& ERP, const int inInstanceID);
425 
426 Dtk_ErrorStatus stepw_DefineInstancePath(stepw_ERP& ERP, const Dtk_tab<Dtk_ID>& inInstancePath, const bool userid);
427 
429 
430 DtkErrorStatus stepw_SetAnchorInstance (const int stepw_ID, const int user_ID);
431 
432 int stepw_AnchorInstanceID (const int user_ID);
433 
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)
stepw_CreateReference
DtkErrorStatus stepw_CreateReference(stepw_ER &ER, const int inEntityID)
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:689
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)
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
stepw_ER::_data
void * _data
Definition: stepw.hpp:391
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 !...
stepw_DefineInstancePath
Dtk_ErrorStatus stepw_DefineInstancePath(stepw_ERP &ERP, const Dtk_tab< Dtk_ID > &inInstancePath, const bool userid)
stepw_SetReferencePath
DtkErrorStatus stepw_SetReferencePath(stepw_ER &ER, stepw_ERP &ERP)
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.
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,...
stepw_ERP
Definition: stepw.hpp:394
stepw_WriteAssemblyInstances
DtkErrorStatus stepw_WriteAssemblyInstances(const int inID)
Writes instances detained by a product.
stepw_SetModeFdt
DtkErrorStatus stepw_SetModeFdt(const int inMode, const int inPolyline=0)
Activates/Deactivates writing of FDT (ignored if product Step3dWriteFdt is not present)
stepw_Write3DPartMesh
DtkErrorStatus stepw_Write3DPartMesh(const Dtk_MeshPtr &inMesh)
Writes a Mesh of a 3D part (3D content of a product).
stepw_SetContextTolerance
Dtk_ErrorStatus stepw_SetContextTolerance(const double inTol)
Modal setting of Length Tolerance for the 3D geometry (uncertainty) To be called before Init3dPart,...
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
stepw_ERP::_data
void * _data
Definition: stepw.hpp:398
stepw_CreateReferenceToFdt
DtkErrorStatus stepw_CreateReferenceToFdt(stepw_ER &ER, const int inEntityID, const int inProductID)
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)
stepw_AddReference
DtkErrorStatus stepw_AddReference(stepw_ER &ER)
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,...
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 assu...
stepw_WriteExternalReference
Dtk_ErrorStatus stepw_WriteExternalReference(const int inID)
Writes a product as an external reference. Only one per file for a given product.
stepw_SetAnchorProduct
DtkErrorStatus stepw_SetAnchorProduct(const int stepw_ID, const int user_ID)
stepw_EndProduct
DtkErrorStatus stepw_EndProduct(const int inID)
Ends the writing of a product - calls WriteAssemblyInstances if not yet done.
stepw_AnchorInstanceID
int stepw_AnchorInstanceID(const int user_ID)
stepw_SetModeProp
DtkErrorStatus stepw_SetModeProp(const int inMode)
Activates/Deactivates writing of Properties : User Attributes, Product Data.
stepw_AnchorProductID
int stepw_AnchorProductID(const int user_ID)
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...
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-EndFi...
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,...
stepw_CreateInstancePath
DtkErrorStatus stepw_CreateInstancePath(stepw_ERP &ERP)
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.
stepw_CreateReferenceToNode
DtkErrorStatus stepw_CreateReferenceToNode(stepw_ER &ER, const int inNodeID, const int inProductID, const char *inRefKind="")
stepw_Add3DPartFDT
DtkErrorStatus stepw_Add3DPartFDT(const Dtk_FdtPtr &inFDT)
Commands to write a FDT of a 3D Part.
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
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 Dt...
stepw_SetModeItemName
DtkErrorStatus stepw_SetModeItemName(const int inMode)
Selects a mode of writing names of internal (topological) 3D items (shells, faces,...
Dtk_SmartPtr< Dtk_Info >
stepw_EndFile
DtkErrorStatus stepw_EndFile()
Ends the writing of the STEP file.
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....
stepw_End3DPart
DtkErrorStatus stepw_End3DPart()
Ends the writing of a part : the own 3D part of a product + product definition.
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...
stepw_ERP::stepw_ERP
stepw_ERP()
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.
stepw_AddAnchorItem
Dtk_ErrorStatus stepw_AddAnchorItem(const int inEntityID, const int inProductID, const Dtk_string &inGUID)
stepw_AddOverrideInstanceInfo
Dtk_ErrorStatus stepw_AddOverrideInstanceInfo(stepw_ERP &ERP, Dtk_InfoPtr &info)
stepw_InitFile
DtkErrorStatus stepw_InitFile(const Dtk_string &inFileOut, const char *Origin=" user ", const int StepSchema=0)
Initialise a file to be written.
stepw_CreateReferenceToGroup
DtkErrorStatus stepw_CreateReferenceToGroup(stepw_ER &ER, const int inEntityID, const int inProductID)
stepw_Write3DPartRoot
DtkErrorStatus stepw_Write3DPartRoot()
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...
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:85
stepw_SetAnchorInstance
DtkErrorStatus stepw_SetAnchorInstance(const int stepw_ID, const int user_ID)
stepw_ER
Definition: stepw.hpp:387
stepw_AddInstanceToPath
DtkErrorStatus stepw_AddInstanceToPath(stepw_ERP &ERP, const int inInstanceID)
stepw_SetHeaderData
DtkErrorStatus stepw_SetHeaderData(const int inNumItem, const wchar_t *inValItem)
Sets values of fields in Header.
Pdfw::inInfo
Dtk_tab< Dtk_dir > Dtk_ID Dtk_InfoPtr inInfo
Definition: pdfw.hpp:676
stepw_SetModeCompress
DtkErrorStatus stepw_SetModeCompress(const int inMode)
Selects a mode of writing compact or compressed step files.
Pdfw::outID
Dtk_tab< Dtk_dir > Dtk_ID & outID
Definition: pdfw.hpp:675
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,...
catiav5w::inInstanceName
const Dtk_string & inInstanceName
Definition: catiav5w.hpp:618
stepw_ER::stepw_ER
stepw_ER()
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...
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...
stepw_InitNodeContext
void stepw_InitNodeContext(const int inNodeID)
Initialises the context to write items in a node of the model (internal model tree,...
stepw_EndNodeContext
void stepw_EndNodeContext(const int inNodeID=0)
stepw_SetNextSubBody
Dtk_ErrorStatus stepw_SetNextSubBody(const int mode)
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),...