DATAKIT SDK  V2026.1
ugw.hpp
Go to the documentation of this file.
1 /**********************************************************
2 UGW.H
3 ***********************************************************/
4 #ifndef _UGW_H
5 #define _UGW_H
6 
7 #define DTK_UGW_VERSION_NX5 45
8 #define DTK_UGW_VERSION_NX1980 60
9 #define DTK_UGW_VERSION_NX2212 63
10 
11 namespace Ugw
12 {
14  {
15  enum Unit
16  {
17  inch = 0, millimeters = 1
18  };
22  {
25  double density;
27  {
29  };
32  density( 7830.640 ), density_unit( kg_m3 )
33  {}
34  };
38  {
39  struct General
40  {
43  General():width(0.35) {} // or default (-1)
44  };
47  {
48  def.col = Dtk_RGB( 0, 0, 192 );
49  def.width = 0.70;
50  }
51  };
53 
55  background_color_bottom( Dtk_RGB( 230, 230, 230 ) )
56  {}
57  };
58 
65  Dtk_ErrorStatus InitFile( const Dtk_string& inFilename, int inVersiontowrite = DTK_UGW_VERSION_NX5, const DefaultParameters& inDef = DefaultParameters() );
66 
68  Dtk_ErrorStatus InitFile( const Dtk_string& inFilename,
69  int inVersiontowrite, int inUnitasmm, int inMultithread = 0 );
70 
71 
78 
84 
85 
92 
99 
107 
118 
122  const Dtk_string& inProtoFileName,
123  Dtk_bool& outWasAlreadyInstancied,
124  const Dtk_transfo& inTrans,
125  const Dtk_RGB& inRgb);
136  Dtk_ErrorStatus OpenInstance(const Dtk_string& inProtoFileName,
137  const Dtk_transfo& inTrans, Dtk_InfoPtr inInfos);
138 
146  const Dtk_transfo& inTrans, Dtk_InfoPtr inInfos, void(*innxread_getdata)(const Dtk_string&, void*&));
147 
154  Dtk_ErrorStatus GetColorInTable(size_t inIth, Dtk_RGB& outColor, Dtk_string& outColorname);
155 
162  Dtk_ErrorStatus SetColorInTable(size_t inIth, const Dtk_RGB& inColor, const Dtk_string& inColorname);
163 
169 
177  const Dtk_tab<Dtk_Int32> & inSelectables = Dtk_tab<Dtk_Int32>());
178 
180  Dtk_ErrorStatus SetGroupVisibility(const Dtk_string& inGroupName, Dtk_bool inVisible);
181 
189  Dtk_ErrorStatus SetGroupDatas(const Dtk_string& inGroupName, Dtk_InfoPtr inInfos);
190 
197  Dtk_ErrorStatus WriteExternParasolidBody(const char* inFlux, size_t inSize, const Dtk_InfoPtr& inInf);
198 
205  Dtk_ErrorStatus WriteExternJtMesh(const char* inFlux, size_t inSize, const Dtk_InfoPtr& inInf);
206 
211 
216 
217 }
218 
219 #endif
220 
Ugw::DefaultParameters
Definition: ugw.hpp:14
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Ugw::DefaultParameters::ObjectPreferences::solid_body
General solid_body
Definition: ugw.hpp:45
Ugw::DefaultParameters::inch
@ inch
Definition: ugw.hpp:17
Ugw::ImportCdfColorfile
Dtk_ErrorStatus ImportCdfColorfile(const Dtk_string &InCdfFile)
Import a color palette.
Ugw::WriteAxisSystem
Dtk_ErrorStatus WriteAxisSystem(const Dtk_AxisSystemPtr &inAxisSystem)
Add an axis system into the current node.
Ugw::DefaultParameters::objectpreferences
ObjectPreferences objectpreferences
Definition: ugw.hpp:52
Ugw::SetColorInTable
Dtk_ErrorStatus SetColorInTable(size_t inIth, const Dtk_RGB &inColor, const Dtk_string &inColorname)
Replace color value and color name on the palette.
Ugw::DefaultParameters::ModelingPreferences::DensityUnit
DensityUnit
Definition: ugw.hpp:27
Ugw::AddExternInstance
Dtk_ErrorStatus AddExternInstance(const Dtk_string &inProtoFileName, const Dtk_transfo &inTrans, Dtk_InfoPtr inInfos, void(*innxread_getdata)(const Dtk_string &, void *&))
Open an extern file to add as instance in current assembly, inProtoFileName must be in the output dir...
Ugw::DefaultParameters::millimeters
@ millimeters
Definition: ugw.hpp:17
DTK_UGW_VERSION_NX5
#define DTK_UGW_VERSION_NX5
Definition: ugw.hpp:7
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Ugw::WriteReferenceGeometry
Dtk_ErrorStatus WriteReferenceGeometry(const Dtk_BodyPtr &inRefgeom)
Add a reference geometry into the current node.
Ugw::DefaultParameters::ModelingPreferences::ModelingPreferences
ModelingPreferences()
Definition: ugw.hpp:31
Ugw::WriteExternJtMesh
Dtk_ErrorStatus WriteExternJtMesh(const char *inFlux, size_t inSize, const Dtk_InfoPtr &inInf)
Add a JT file as lightweight body inside the file.
Ugw::WriteBody
Dtk_ErrorStatus WriteBody(const Dtk_BodyPtr &inBody)
Add a body inside the file.
Dtk_bool
char Dtk_bool
Definition: define.h:728
Dtk_Double64
double Dtk_Double64
Definition: define.h:702
Ugw::SetLayerData
Dtk_ErrorStatus SetLayerData(const Dtk_LayerInfosSetPtr &inLayerDataSet, const Dtk_tab< Dtk_Int32 > &inVisibles=Dtk_tab< Dtk_Int32 >(), const Dtk_tab< Dtk_Int32 > &inSelectables=Dtk_tab< Dtk_Int32 >())
define Data for layers
Ugw::DefaultParameters::asm_multithread
bool asm_multithread
Definition: ugw.hpp:20
Ugw::DefaultParameters::ObjectPreferences::General::col
Dtk_RGB col
Definition: ugw.hpp:41
Ugw::DefaultParameters::ModelingPreferences::g_m3
@ g_m3
Definition: ugw.hpp:28
Ugw::DefaultParameters::ModelingPreferences::distance_tolerance
double distance_tolerance
Definition: ugw.hpp:23
Ugw::WritePMI
Dtk_ErrorStatus WritePMI(const Dtk_FdtPtr &inPmi)
Add a pmi inside the file.
Ugw::WriteExternParasolidBody
Dtk_ErrorStatus WriteExternParasolidBody(const char *inFlux, size_t inSize, const Dtk_InfoPtr &inInf)
Add a Parasolid file as body inside the file.
Ugw::DefaultParameters::ObjectPreferences::General::General
General()
Definition: ugw.hpp:43
Ugw::CloseLastInstance
Dtk_ErrorStatus CloseLastInstance()
Close the last instance.
Ugw::DefaultParameters::background_color_top
Dtk_RGB background_color_top
Definition: ugw.hpp:36
Ugw::SetGroupDatas
Dtk_ErrorStatus SetGroupDatas(const Dtk_string &inGroupName, Dtk_InfoPtr inInfos)
define Visibility for a specific group
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Ugw::DefaultParameters::ObjectPreferences::def
General def
Definition: ugw.hpp:45
Ugw::SetGroupVisibility
Dtk_ErrorStatus SetGroupVisibility(const Dtk_string &inGroupName, Dtk_bool inVisible)
Ugw::DefaultParameters::ObjectPreferences
Definition: ugw.hpp:38
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Ugw::GetColorInTable
Dtk_ErrorStatus GetColorInTable(size_t inIth, Dtk_RGB &outColor, Dtk_string &outColorname)
Get color value and color name from the palette.
Ugw::DefaultParameters::background_color_bottom
Dtk_RGB background_color_bottom
Definition: ugw.hpp:36
Ugw::DefaultParameters::modelingpreferences
ModelingPreferences modelingpreferences
Definition: ugw.hpp:35
Ugw::DefaultParameters::unit
Unit unit
Definition: ugw.hpp:19
Ugw::DefaultParameters::DefaultParameters
DefaultParameters()
Definition: ugw.hpp:54
Ugw::DefaultParameters::ModelingPreferences::density
double density
Definition: ugw.hpp:25
Ugw::DefaultParameters::ModelingPreferences::density_unit
DensityUnit density_unit
Definition: ugw.hpp:30
Ugw::DefaultParameters::ModelingPreferences::lb_ft3
@ lb_ft3
Definition: ugw.hpp:28
Ugw::DefaultParameters::ObjectPreferences::General
Definition: ugw.hpp:40
Dtk_tab< Dtk_Int32 >
Ugw::WriteMesh
Dtk_ErrorStatus WriteMesh(const Dtk_MeshPtr &inMesh)
Add a mesh inside the file.
Ugw::AddMetaData
Dtk_ErrorStatus AddMetaData(const Dtk_MetaDataPtr &inMeta)
Add a MetaData in the current component.
Ugw::InitFile
Dtk_ErrorStatus InitFile(const Dtk_string &inFilename, int inVersiontowrite=45, const DefaultParameters &inDef=DefaultParameters())
Initialize UG Writer.
Ugw::OpenInstance
Dtk_ErrorStatus OpenInstance(const Dtk_string &inInstanceName, const Dtk_string &inProtoFileName, Dtk_bool &outWasAlreadyInstancied, const Dtk_transfo &inTrans, const Dtk_RGB &inRgb)
deprecated
Ugw::DefaultParameters::ObjectPreferences::ObjectPreferences
ObjectPreferences()
Definition: ugw.hpp:46
Ugw::DefaultParameters::ModelingPreferences::angle_tolerance
double angle_tolerance
Definition: ugw.hpp:24
Ugw
Definition: ugw.hpp:12
Ugw::DefaultParameters::ModelingPreferences::kg_m3
@ kg_m3
Definition: ugw.hpp:28
Ugw::DefaultParameters::ObjectPreferences::General::width
Dtk_Double64 width
Definition: ugw.hpp:42
Ugw::DefaultParameters::ModelingPreferences::lb_in3
@ lb_in3
Definition: ugw.hpp:28
Ugw::DefaultParameters::ObjectPreferences::sheet_body
General sheet_body
Definition: ugw.hpp:45
catiav5w::inInstanceName
const Dtk_string & inInstanceName
Definition: catiav5w.hpp:621
Dtk_RGB
Definition: dtk_rgb.hpp:7
Ugw::EndFile
Dtk_ErrorStatus EndFile()
Close the UG file.
Ugw::DefaultParameters::Unit
Unit
Definition: ugw.hpp:16
Ugw::DefaultParameters::ModelingPreferences
Definition: ugw.hpp:22