DATAKIT API  V2025.1
dtk_IgesReader.hpp
Go to the documentation of this file.
1 #ifndef _DTK_IGES_READER_H_
2 #define _DTK_IGES_READER_H_
3 #include "def/define.h"
5 #include "util/dtk_maindoc.hpp"
7 #include "util/dtk_reader.hpp"
8 #include "util/error_dtk.hpp"
9 #include "util/util_ptr_dtk.hpp"
10 #include "util/util_stl_dtk.hpp"
11 
12 
13 class IgesReader: public Dtk_Reader
14 {
15 protected :
16 
17  struct Dtk_Handle; // Not defined here
18  Dtk_Handle *_Private; // Handle
20 
22  void _Init();
23  void _Reset();
26 
27 public :
28  virtual ~IgesReader();
29 
30 
32 
33 
34  static Dtk_bool Enable();
35  Dtk_ErrorStatus InitReader(const Dtk_string& inInputFile);
36  Dtk_ErrorStatus CreateDocument(const Dtk_string& inInputFile, Dtk_MainDocPtr& outDocument);
37  Dtk_ErrorStatus GetFileVersion(const Dtk_string &inInputFile, Dtk_string& outVersion);
39  const Dtk_string& inInputFile,
40  Dtk_MainDocPtr& inoutDocument,
41  Dtk_ComponentPtr& outRootComponent);
42  Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr >& inArrayStream, Dtk_MainDocPtr& inoutDocument, Dtk_ComponentPtr& outRootComponent );
44 
45 
46  Dtk_ErrorStatus ReadComponent(const Dtk_ComponentPtr& inComponent, Dtk_NodePtr& outRootNode);
47 
50 
55 
58  static void SetBoundaryPreference(Dtk_Int32 inPreference);
59 
63  static void SetConfigExcludeGroup(Dtk_bool inValue);
64 
67  static void SetReadAsDrawing(Dtk_Int32 inBool);
68 
71  static void SetReadStringDecoding(Dtk_Int32 inValue);
72 
76  static void SetTransformPolylineToCurve(const Dtk_bool inValue);
77 
81  static void SetAllowReadInvalidFiles(const Dtk_bool inValue);
82 } ;
83 
87 SetAsDeprecated("2022.2", "Use IgesReader::SetBoundaryPreference.")
88 void igesr_SetBoundaryPreference(Dtk_Int32 inPreference);
89 
94 SetAsDeprecated("2022.2", "Use IgesReader::SetConfigExcludeGroup method instead.")
95 void igesr_SetConfigExcludeGroup( Dtk_bool inValue );
96 
100 SetAsDeprecated("2022.2", "Use IgesReader::SetReadAsDrawing method instead.")
101 void igesr_SetReadAsDrawing( Dtk_Int32 inBool );
102 
103 
108 SetAsDeprecated("2022.1", "Use IgesReader::SetTransformPolylineToCurve method instead.")
109 void igesr_SetTransformPolylineToCurve( const Dtk_bool inValue );
110 
111 
112 #endif
113 
IgesReader::IgesReader
IgesReader()
IgesReader::SetBoundaryPreference
static void SetBoundaryPreference(Dtk_Int32 inPreference)
Set Preference on reading boundaries if both restrictions exist (UV and 3D)
IgesReader::ReadAdditionalInfos
Dtk_ErrorStatus ReadAdditionalInfos(Dtk_Node &inNode, Dtk_ObjectPtr &outEntity)
IgesReader::SetAllowReadInvalidFiles
static void SetAllowReadInvalidFiles(const Dtk_bool inValue)
Set Preference to change Allow Invalid Iges Files.
IgesReader::_WriteLogFile
Dtk_ErrorStatus _WriteLogFile()
IgesReader::DesactivateReader
Dtk_ErrorStatus DesactivateReader()
IgesReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_string &inInputFile, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
Dtk_Reader
Definition: dtk_reader.hpp:15
IgesReader::_Inventory
Dtk_ErrorStatus _Inventory()
IgesReader::_Init
void _Init()
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
IgesReader::SetReadAsDrawing
static void SetReadAsDrawing(Dtk_Int32 inBool)
Set Preference on reading file as drawing or part.
IgesReader::_Reset
void _Reset()
Dtk_bool
char Dtk_bool
Definition: define.h:725
IgesReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr > &inArrayStream, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
IgesReader::~IgesReader
virtual ~IgesReader()
IgesReader::ReadComponent
Dtk_ErrorStatus ReadComponent(const Dtk_ComponentPtr &inComponent, Dtk_NodePtr &outRootNode)
IgesReader::GetVersion
Dtk_Int32 GetVersion()
IgesReader::GetIgesReader
static IgesReader * GetIgesReader()
IgesReader::EndComponent
Dtk_ErrorStatus EndComponent(Dtk_ComponentPtr &inComponent)
IgesReader::Enable
static Dtk_bool Enable()
Dtk_Node
This is the Node Class The Dtk_Node object is used to retrieve informations in a Dtk_ComponentPtr obj...
Definition: dtk_maindoc.hpp:230
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:687
dtk_maindoc_ptr.hpp
IgesReader::_UniqueReader
static IgesReader * _UniqueReader
Definition: dtk_IgesReader.hpp:19
error_dtk.hpp
IgesReader::SetReadStringDecoding
static void SetReadStringDecoding(Dtk_Int32 inValue)
Set Preference on reading string
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
dtk_maindoc.hpp
util_stl_dtk.hpp
IgesReader::SetTransformPolylineToCurve
static void SetTransformPolylineToCurve(const Dtk_bool inValue)
Set Preference to change polygon to nurbs curve of degree 3 Usefull to accelerate the reading process...
IgesReader::ActivateReader
Dtk_ErrorStatus ActivateReader()
IgesReader::ReadEntity
Dtk_ErrorStatus ReadEntity(Dtk_Node &inNode, Dtk_EntityPtr &outEntity)
IgesReader
Definition: dtk_IgesReader.hpp:14
util_ptr_dtk.hpp
IgesReader::SetConfigExcludeGroup
static void SetConfigExcludeGroup(Dtk_bool inValue)
Set Preference to exclude group reading (type 402) Usefull if many group contains same entity to avoi...
define.h
IgesReader::InitReader
Dtk_ErrorStatus InitReader(const Dtk_string &inInputFile)
IgesReader::GetFileVersion
Dtk_ErrorStatus GetFileVersion(const Dtk_string &inInputFile, Dtk_string &outVersion)
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:85
IgesReader::_Private
Dtk_Handle * _Private
Definition: dtk_IgesReader.hpp:17
dtk_string.hpp
dtk_reader.hpp
IgesReader::CreateDocument
Dtk_ErrorStatus CreateDocument(const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
SetAsDeprecated
SetAsDeprecated("2022.2", "Use IgesReader::SetBoundaryPreference.") void igesr_SetBoundaryPreference(Dtk_Int32 inPreference)
Set Preference on reading boundaries if both restrictions exist (UV and 3D)
IgesReader::EndPopulateComponentsTree
Dtk_ErrorStatus EndPopulateComponentsTree()