DATAKIT API  V2025.3
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() :col( Dtk_RGB( 0, 0, 192 ) ), width(0.70) {}
44  };
46  };
48 
50  background_color_bottom( Dtk_RGB( 230, 230, 230 ) )
51  {}
52  };
53 
60  Dtk_ErrorStatus InitFile( const Dtk_string& inFilename, int inVersiontowrite = DTK_UGW_VERSION_NX5, const DefaultParameters& inDef = DefaultParameters() );
61 
63  Dtk_ErrorStatus InitFile( const Dtk_string& inFilename,
64  int inVersiontowrite, int inUnitasmm, int inMultithread = 0 );
65 
66 
73 
79 
80 
87 
94 
102 
113 
117  const Dtk_string& inProtoFileName,
118  Dtk_bool& outWasAlreadyInstancied,
119  const Dtk_transfo& inTrans,
120  const Dtk_RGB& inRgb);
131  Dtk_ErrorStatus OpenInstance(const Dtk_string& inProtoFileName,
132  const Dtk_transfo& inTrans, Dtk_InfoPtr inInfos);
133 
141  const Dtk_transfo& inTrans, Dtk_InfoPtr inInfos, void(*innxread_getdata)(const Dtk_string&, void*&));
142 
149  Dtk_ErrorStatus GetColorInTable(size_t inIth, Dtk_RGB& outColor, Dtk_string& outColorname);
150 
157  Dtk_ErrorStatus SetColorInTable(size_t inIth, const Dtk_RGB& inColor, const Dtk_string& inColorname);
158 
164 
172  const Dtk_tab<Dtk_Int32> & inSelectables = Dtk_tab<Dtk_Int32>());
173 
175  Dtk_ErrorStatus SetGroupVisibility(const Dtk_string& inGroupName, Dtk_bool inVisible);
176 
184  Dtk_ErrorStatus SetGroupDatas(const Dtk_string& inGroupName, Dtk_InfoPtr inInfos);
185 
192  Dtk_ErrorStatus WriteExternParasolidBody(const char* inFlux, size_t inSize, const Dtk_InfoPtr& inInf);
193 
200  Dtk_ErrorStatus WriteExternJtMesh(const char* inFlux, size_t inSize, const Dtk_InfoPtr& inInf);
201 
206 
211 
212 }
213 
214 #endif
215 
Ugw::DefaultParameters
Definition: ugw.hpp:14
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
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:47
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:58
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:725
Dtk_Double64
double Dtk_Double64
Definition: define.h:699
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:49
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::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
catiav5w::inInstanceName
const Dtk_string & inInstanceName
Definition: catiav5w.hpp:618
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