DATAKIT API  V2025.3
stepw.hpp
Go to the documentation of this file.
1 #ifndef _STEPW_HEADER_
2 #define _STEPW_HEADER_
3 class stepw_ER;
4 
7 
15 
16 DtkErrorStatus stepw_InitFile (const Dtk_string& inFileOut, const char* Origin=" user ", const int StepSchema=0);
17 
23 DtkErrorStatus stepw_SetHeaderData (const int inNumItem, const wchar_t* inValItem);
24 
30 DtkErrorStatus stepw_SetHeaderData (const int inNumItem, const Dtk_string& inValItem);
31 
38 
39 DtkErrorStatus stepw_SetModeFdt (const int inMode, const int inPolyline = 0);
40 
45 DtkErrorStatus stepw_SetModeProp (const int inMode);
46 
52 
62 
69 DtkErrorStatus stepw_SetModeInfoFirstFace (const int inModeInfoFirstFace);
70 
78 
79 Dtk_ErrorStatus stepw_SetContextUnit (const int inLength, const int inAngle=0);
80 
81 
90 
96 
98 
105 
107 
120 
121 Dtk_ErrorStatus stepw_AddExternalReference (const Dtk_string& inProductName, const Dtk_string& inFileName, int& outID, Dtk_ID inInstCompId=0);
122 
131 // dtkErrorUnspecified if not recorded by AddExternalReference
132 
134 
141 int stepw_WhichProductID (const Dtk_string& inProductName);
142 
151 
160 // writes another STEP file, same path, file name as given to AddExternalReference
162 
163 DtkErrorStatus stepw_InitProduct (const Dtk_string& inProductName, int& outID, Dtk_ID inCompID=0);
164 
172 
173 DtkErrorStatus stepw_AddInstance (const int inIDfather, const int inIDchild, const Dtk_transfo& inPosition, const Dtk_string& inInstanceName); // 0 OK, -1 ERROR
174 
175 
184 
185 DtkErrorStatus stepw_AddInstanceWithInfo (const int inIDfather, const int inIDchild, const Dtk_transfo& inPosition, const Dtk_string& inInstanceName, const Dtk_InfoPtr& inInstanceInfo);
186 
187 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 = "");
188 
189 
197 
199 
200 
207 
209 
215 void stepw_InitNodeContext(const int inNodeID);
216 
223 void stepw_InitNodeContext(const int inNodeID, const Dtk_InfoPtr& inNodeInfo);
224 
225 // ?? deocumenter
226 void stepw_EndNodeContext(const int inNodeID = 0);
227 
228 // ?? deocumenter
230 
235 
237 
238 
247 
248 DtkErrorStatus stepw_Write3DPartBodyWithMesh (const Dtk_BodyPtr& inBody, const Dtk_MeshPtr& inMesh, const int inMode=0);
249 
255 
257 
264 
271 
273 
283 
285 
292 
294 
302 
303 DtkErrorStatus stepw_Add3DPartFDT (const Dtk_FdtPtr& inFDT, const Dtk_FdtPtr& inFDTGraf);
304 
306 
307 
317 Dtk_ErrorStatus stepw_Add3DModelDisplay (const Dtk_ModelDisplayPtr& inModelDisplay, const int inMode);
318 
331 
339 
356 
358 
362 
364 
369 DtkErrorStatus stepw_WriteAssemblyInstances (const int inID); // inID must repeat that of InitProduct
370 
375 
377 
378 
382 
384 
385 
386 // == Class to describe element references inside a component or between components
387 
388 class stepw_ER { // Element Reference
389  public:
391 
392 void* _data;
393 };
394 
395 class stepw_ERP {
396 public:
398 
399 void* _data;
400 };
401 
402 // Setting reference in current product
403 DtkErrorStatus stepw_CreateReference (stepw_ER& ER, const int inEntityID);
404 
405 DtkErrorStatus stepw_CreateReference (stepw_ER& ER, const int inEntityID, const int inProductID);
406 
407 DtkErrorStatus stepw_CreateReference (stepw_ER& ER, const int inEntityID, const int inProductID, const char* inRefKind);
408 
409 DtkErrorStatus stepw_CreateReferenceToNode(stepw_ER& ER, const int inNodeID, const int inProductID, const char* inRefKind = "");
410 
412 
413 DtkErrorStatus stepw_CreateReferenceToFdt (stepw_ER& ER, const int inEntityID, const int inProductID);
414 
415 DtkErrorStatus stepw_CreateReferenceToGroup (stepw_ER& ER, const int inEntityID, const int inProductID);
416 
417 DtkErrorStatus stepw_SetAnchorProduct (const int stepw_ID, const int user_ID);
418 
419 int stepw_AnchorProductID (const int user_ID);
420 
421 Dtk_ErrorStatus stepw_AddAnchorItem (const int inEntityID, const int inProductID, const Dtk_string& inGUID);
422 
424 
425 DtkErrorStatus stepw_AddInstanceToPath (stepw_ERP& ERP, const int inInstanceID);
426 
427 Dtk_ErrorStatus stepw_DefineInstancePath(stepw_ERP& ERP, const Dtk_tab<Dtk_ID>& inInstancePath, const bool userid);
428 
430 
431 DtkErrorStatus stepw_SetAnchorInstance (const int stepw_ID, const int user_ID);
432 
433 int stepw_AnchorInstanceID (const int user_ID);
434 
436 
437 #endif
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:392
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:395
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:399
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:388
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),...