DATAKIT API  V2025.1
IgesReader Class Reference
+ Inheritance diagram for IgesReader:

Public Member Functions

virtual Dtk_ErrorStatus _ReadConnectedEntity (const Dtk_NodeConnectorPtr &inConnector, Dtk_tab< Dtk_EntityPtr > &outEntity)
 
Dtk_ErrorStatus ActivateReader ()
 
Dtk_ErrorStatus CreateDocument (const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
 
virtual Dtk_ErrorStatus CreateDocumentGraphical (const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
 
Dtk_ErrorStatus DesactivateReader ()
 
Dtk_ErrorStatus EndComponent (Dtk_ComponentPtr &inComponent)
 
Dtk_ErrorStatus EndPopulateComponentsTree ()
 
virtual Dtk_ErrorStatus GetAssociatedEntities (Dtk_Node &inNode, Dtk_tab< Dtk_NodeConnectorPtr > &outAssociatedEntities)
 
virtual Dtk_ErrorStatus GetConnectorsPointingToThisComponent (Dtk_Component &inCompo, Dtk_tab< Dtk_NodeConnectorPtr > &outConnectedEntities)
 
virtual Dtk_ErrorStatus GetFilePreview (const Dtk_string &inInputFile, Dtk_PreviewPtr &outPreview)
 
Dtk_ErrorStatus GetFileVersion (const Dtk_string &inInputFile, Dtk_string &outVersion)
 
Dtk_Int32 GetVersion ()
 
Dtk_ErrorStatus InitReader (const Dtk_string &inInputFile)
 
Dtk_ErrorStatus PopulateComponentsTree (const Dtk_string &inInputFile, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
 
Dtk_ErrorStatus PopulateComponentsTree (const Dtk_tab< Dtk_StreamPtr > &inArrayStream, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
 
Dtk_ErrorStatus ReadAdditionalInfos (Dtk_Node &inNode, Dtk_ObjectPtr &outEntity)
 
virtual Dtk_ErrorStatus ReadAdvancedFeature (Dtk_Node &inNode, Dtk_ObjectPtr &outEntity)
 
Dtk_ErrorStatus ReadComponent (const Dtk_ComponentPtr &inComponent, Dtk_NodePtr &outRootNode)
 
virtual Dtk_ErrorStatus ReadComponentGraphic (const Dtk_ComponentPtr &inComponent, Dtk_GraphicalDataPtr &outGraphicalData)
 
Dtk_ErrorStatus ReadEntity (Dtk_Node &inNode, Dtk_EntityPtr &outEntity)
 
virtual ~IgesReader ()
 

Static Public Member Functions

static Dtk_bool Enable ()
 
static IgesReaderGetIgesReader ()
 
static void SetAllowReadInvalidFiles (const Dtk_bool inValue)
 Set Preference to change Allow Invalid Iges Files. More...
 
static void SetBoundaryPreference (Dtk_Int32 inPreference)
 Set Preference on reading boundaries if both restrictions exist (UV and 3D) More...
 
static void SetConfigExcludeGroup (Dtk_bool inValue)
 Set Preference to exclude group reading (type 402) Usefull if many group contains same entity to avoid duplication. More...
 
static void SetReadAsDrawing (Dtk_Int32 inBool)
 Set Preference on reading file as drawing or part. More...
 
static void SetReadStringDecoding (Dtk_Int32 inValue)
 Set Preference on reading string
More...
 
static void SetTransformPolylineToCurve (const Dtk_bool inValue)
 Set Preference to change polygon to nurbs curve of degree 3 Usefull to accelerate the reading process without seewing process. More...
 

Protected Member Functions

void _Init ()
 
Dtk_ErrorStatus _Inventory ()
 
void _Reset ()
 
Dtk_ErrorStatus _WriteInventoryInLogFile (Dtk_ID inID, int inNum, int *inCount, char **inEntitiesName)
 
Dtk_ErrorStatus _WriteLogFile ()
 
 IgesReader ()
 

Protected Attributes

Dtk_string _InputFile
 
FILE * _InputFilePtr
 
Dtk_Handle * _Private
 

Static Protected Attributes

static IgesReader_UniqueReader
 

Constructor & Destructor Documentation

◆ IgesReader()

IgesReader::IgesReader ( )
protected

◆ ~IgesReader()

virtual IgesReader::~IgesReader ( )
virtual

Member Function Documentation

◆ _Init()

void IgesReader::_Init ( )
protected

◆ _Inventory()

Dtk_ErrorStatus IgesReader::_Inventory ( )
protected

◆ _ReadConnectedEntity()

virtual Dtk_ErrorStatus Dtk_Reader::_ReadConnectedEntity ( const Dtk_NodeConnectorPtr inConnector,
Dtk_tab< Dtk_EntityPtr > &  outEntity 
)
virtualinherited

Reimplemented in GltfReader.

◆ _Reset()

void IgesReader::_Reset ( )
protected

◆ _WriteInventoryInLogFile()

Dtk_ErrorStatus Dtk_Reader::_WriteInventoryInLogFile ( Dtk_ID  inID,
int  inNum,
int *  inCount,
char **  inEntitiesName 
)
protectedinherited

◆ _WriteLogFile()

Dtk_ErrorStatus IgesReader::_WriteLogFile ( )
protected

◆ ActivateReader()

Dtk_ErrorStatus IgesReader::ActivateReader ( )
virtual

Implements Dtk_Reader.

◆ CreateDocument()

Dtk_ErrorStatus IgesReader::CreateDocument ( const Dtk_string inInputFile,
Dtk_MainDocPtr outDocument 
)
virtual

Implements Dtk_Reader.

◆ CreateDocumentGraphical()

virtual Dtk_ErrorStatus Dtk_Reader::CreateDocumentGraphical ( const Dtk_string inInputFile,
Dtk_MainDocPtr outDocument 
)
virtualinherited

Reimplemented in ProeReader, and GltfReader.

◆ DesactivateReader()

Dtk_ErrorStatus IgesReader::DesactivateReader ( )
virtual

Implements Dtk_Reader.

◆ Enable()

static Dtk_bool IgesReader::Enable ( )
static

◆ EndComponent()

Dtk_ErrorStatus IgesReader::EndComponent ( Dtk_ComponentPtr inComponent)
virtual

Implements Dtk_Reader.

◆ EndPopulateComponentsTree()

Dtk_ErrorStatus IgesReader::EndPopulateComponentsTree ( )
virtual

Implements Dtk_Reader.

◆ GetAssociatedEntities()

virtual Dtk_ErrorStatus Dtk_Reader::GetAssociatedEntities ( Dtk_Node inNode,
Dtk_tab< Dtk_NodeConnectorPtr > &  outAssociatedEntities 
)
virtualinherited

Reimplemented in StepReader, SolidEdgeReader, ProeReader, JtReader, GltfReader, CreoviewReader, and BRepOccReader.

51  {
52  outAssociatedEntities.clear(); inNode.GetID(); return dtkErrorNotYetImplemented;};

◆ GetConnectorsPointingToThisComponent()

virtual Dtk_ErrorStatus Dtk_Reader::GetConnectorsPointingToThisComponent ( Dtk_Component inCompo,
Dtk_tab< Dtk_NodeConnectorPtr > &  outConnectedEntities 
)
virtualinherited

Reimplemented in StepReader, SolidEdgeReader, ProeReader, JtReader, GltfReader, CreoviewReader, and BRepOccReader.

53  {
54  outConnectedEntities.clear(); inCompo.GetID(); return dtkErrorNotYetImplemented;};

◆ GetFilePreview()

virtual Dtk_ErrorStatus Dtk_Reader::GetFilePreview ( const Dtk_string inInputFile,
Dtk_PreviewPtr outPreview 
)
virtualinherited

Reimplemented in SolidEdgeReader, ProeReader, and _3dmReader.

34  {DTK_UNUSED(inInputFile); outPreview = NULL; return dtkErrorNotYetImplemented;}

◆ GetFileVersion()

Dtk_ErrorStatus IgesReader::GetFileVersion ( const Dtk_string inInputFile,
Dtk_string outVersion 
)
virtual

Implements Dtk_Reader.

◆ GetIgesReader()

static IgesReader* IgesReader::GetIgesReader ( )
static

◆ GetVersion()

Dtk_Int32 IgesReader::GetVersion ( )
virtual

Implements Dtk_Reader.

◆ InitReader()

Dtk_ErrorStatus IgesReader::InitReader ( const Dtk_string inInputFile)

◆ PopulateComponentsTree() [1/2]

Dtk_ErrorStatus IgesReader::PopulateComponentsTree ( const Dtk_string inInputFile,
Dtk_MainDocPtr inoutDocument,
Dtk_ComponentPtr outRootComponent 
)
virtual

Implements Dtk_Reader.

◆ PopulateComponentsTree() [2/2]

Dtk_ErrorStatus IgesReader::PopulateComponentsTree ( const Dtk_tab< Dtk_StreamPtr > &  inArrayStream,
Dtk_MainDocPtr inoutDocument,
Dtk_ComponentPtr outRootComponent 
)
virtual

Implements Dtk_Reader.

◆ ReadAdditionalInfos()

Dtk_ErrorStatus IgesReader::ReadAdditionalInfos ( Dtk_Node inNode,
Dtk_ObjectPtr outEntity 
)
virtual

Implements Dtk_Reader.

◆ ReadAdvancedFeature()

virtual Dtk_ErrorStatus Dtk_Reader::ReadAdvancedFeature ( Dtk_Node inNode,
Dtk_ObjectPtr outEntity 
)
virtualinherited

◆ ReadComponent()

Dtk_ErrorStatus IgesReader::ReadComponent ( const Dtk_ComponentPtr inComponent,
Dtk_NodePtr outRootNode 
)
virtual

Implements Dtk_Reader.

◆ ReadComponentGraphic()

virtual Dtk_ErrorStatus Dtk_Reader::ReadComponentGraphic ( const Dtk_ComponentPtr inComponent,
Dtk_GraphicalDataPtr outGraphicalData 
)
virtualinherited

◆ ReadEntity()

Dtk_ErrorStatus IgesReader::ReadEntity ( Dtk_Node inNode,
Dtk_EntityPtr outEntity 
)
virtual

Implements Dtk_Reader.

◆ SetAllowReadInvalidFiles()

static void IgesReader::SetAllowReadInvalidFiles ( const Dtk_bool  inValue)
static

Set Preference to change Allow Invalid Iges Files.

Usefull to force read the iges files don't respecting norm

Parameters
[in]inValue1 Allow read, 0 Do not read invalid (default)

◆ SetBoundaryPreference()

static void IgesReader::SetBoundaryPreference ( Dtk_Int32  inPreference)
static

Set Preference on reading boundaries if both restrictions exist (UV and 3D)

Parameters
[in]inPreference: File to read : 2 means Use UV first (default) 3 means Use 3D first

◆ SetConfigExcludeGroup()

static void IgesReader::SetConfigExcludeGroup ( Dtk_bool  inValue)
static

Set Preference to exclude group reading (type 402) Usefull if many group contains same entity to avoid duplication.

Parameters
[in]inValue= 1 Exclude, inValue = 0 Read 402 (default )

◆ SetReadAsDrawing()

static void IgesReader::SetReadAsDrawing ( Dtk_Int32  inBool)
static

Set Preference on reading file as drawing or part.

Parameters
[in]inBool= 1 means Load entities as Drawing - 2D entities / 0 means Load entities as Part - 3D entities

◆ SetReadStringDecoding()

static void IgesReader::SetReadStringDecoding ( Dtk_Int32  inValue)
static

Set Preference on reading string

Parameters
[in]inValue= 0 read ascii string (default) / 1 convert string from utf8

◆ SetTransformPolylineToCurve()

static void IgesReader::SetTransformPolylineToCurve ( const Dtk_bool  inValue)
static

Set Preference to change polygon to nurbs curve of degree 3 Usefull to accelerate the reading process without seewing process.

Parameters
[in]inValue1 Transform (default) , 0 No change

Field Documentation

◆ _InputFile

Dtk_string Dtk_Reader::_InputFile
protectedinherited

◆ _InputFilePtr

FILE* Dtk_Reader::_InputFilePtr
protectedinherited

◆ _Private

Dtk_Handle* IgesReader::_Private
protected

◆ _UniqueReader

IgesReader* IgesReader::_UniqueReader
staticprotected
dtkErrorNotYetImplemented
@ dtkErrorNotYetImplemented
Definition: error_dtk.hpp:32
Dtk_DocElement::GetID
Dtk_ID GetID() const
Retrieves the Dtk_DocElement ID - read only -.
Dtk_tab::clear
void clear(int no_delete=0)
Resets the Dtk_tab content.
Definition: util_stl_dtk.hpp:351
DTK_UNUSED
#define DTK_UNUSED(a)
Definition: define.h:730