DATAKIT API  V2025.1
SwReader Class Referenceabstract
+ Inheritance diagram for SwReader:

Public Member Functions

virtual Dtk_ErrorStatus _ReadConnectedEntity (const Dtk_NodeConnectorPtr &inConnector, Dtk_tab< Dtk_EntityPtr > &outEntity)
 
virtual Dtk_ErrorStatus ActivateReader ()=0
 
virtual Dtk_ErrorStatus CreateDocument (const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)=0
 
virtual Dtk_ErrorStatus CreateDocumentGraphical (const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
 
virtual Dtk_ErrorStatus DesactivateReader ()=0
 
virtual Dtk_ErrorStatus EndComponent (Dtk_ComponentPtr &inComponent)=0
 
virtual Dtk_ErrorStatus EndPopulateComponentsTree ()=0
 
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)
 
virtual Dtk_ErrorStatus GetFileVersion (const Dtk_string &inInputFile, Dtk_string &outVersion)=0
 
void * GetSearchEngine ()
 
virtual Dtk_Int32 GetVersion ()=0
 
virtual Dtk_ErrorStatus PopulateComponentsTree (const Dtk_string &inInputFile, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)=0
 
virtual Dtk_ErrorStatus PopulateComponentsTree (const Dtk_tab< Dtk_StreamPtr > &inArrayStream, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)=0
 
virtual Dtk_ErrorStatus ReadAdditionalInfos (Dtk_Node &inNode, Dtk_ObjectPtr &outEntity)=0
 
virtual Dtk_ErrorStatus ReadAdvancedFeature (Dtk_Node &inNode, Dtk_ObjectPtr &outEntity)
 
virtual Dtk_ErrorStatus ReadComponent (const Dtk_ComponentPtr &inComponent, Dtk_NodePtr &outRootNode)=0
 
virtual Dtk_ErrorStatus ReadComponentGraphic (const Dtk_ComponentPtr &inComponent, Dtk_GraphicalDataPtr &outGraphicalData)
 
virtual Dtk_ErrorStatus ReadEntity (Dtk_Node &inNode, Dtk_EntityPtr &outEntity)=0
 

Static Public Member Functions

static Dtk_bool Enable ()
 
static Dtk_bool GetComputeBoundariesFromMesh (void)
 
static Dtk_bool GetConfigCreate2dCurvesOf3dGeometryForDrawings (void)
 
static Dtk_bool GetConfigReadDrawingsWithGraphicRepresentation ()
 
static void SetComputeBoundariesFromMesh (Dtk_bool inComputeBoundary)
 Use to force to compute boundaries from mesh with solidworks 2d/3d read. More...
 
static void SetConfigCreate2dCurvesOf3dGeometryForDrawings (Dtk_bool inCreateCurves)
 Choose if when reading a .SLDDRW file, curves in 2D plane are created from 3D geometry (mesh / body). Activated by default. More...
 
static void SetConfigReadDrawingsWithGraphicRepresentation (const Dtk_bool readWithGraphicRepresentation)
 When set to true, we read the graphic representation in .SLDDRW files. If false, we use the semantic representation. More...
 

Protected Member Functions

void _Init ()
 
void _Reset ()
 
Dtk_ErrorStatus _WriteInventoryInLogFile (Dtk_ID inID, int inNum, int *inCount, char **inEntitiesName)
 
 SwReader ()
 
virtual ~SwReader ()
 

Protected Attributes

Dtk_string _InputFile
 
FILE * _InputFilePtr
 

Constructor & Destructor Documentation

◆ SwReader()

SwReader::SwReader ( )
protected

◆ ~SwReader()

virtual SwReader::~SwReader ( )
protectedvirtual

Member Function Documentation

◆ _Init()

void Dtk_Reader::_Init ( )
protectedinherited

◆ _ReadConnectedEntity()

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

Reimplemented in GltfReader.

◆ _Reset()

void Dtk_Reader::_Reset ( )
protectedinherited

◆ _WriteInventoryInLogFile()

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

◆ ActivateReader()

◆ CreateDocument()

◆ CreateDocumentGraphical()

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

Reimplemented in ProeReader, and GltfReader.

◆ DesactivateReader()

◆ Enable()

static Dtk_bool SwReader::Enable ( )
static

◆ EndComponent()

◆ EndPopulateComponentsTree()

◆ 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;};

◆ GetComputeBoundariesFromMesh()

static Dtk_bool SwReader::GetComputeBoundariesFromMesh ( void  )
static
Returns
Option value to decide to compute boundaries from mesh with solidworks 2d/3d read or not.
Warning
call it after Dtk_API initialization.

◆ GetConfigCreate2dCurvesOf3dGeometryForDrawings()

static Dtk_bool SwReader::GetConfigCreate2dCurvesOf3dGeometryForDrawings ( void  )
static
Returns
Get value to know if when reading a .SLDDRW file, it create curves in 2D plane from 3D geometry (mesh / body).
Warning
call it after Dtk_API initialization.

◆ GetConfigReadDrawingsWithGraphicRepresentation()

static Dtk_bool SwReader::GetConfigReadDrawingsWithGraphicRepresentation ( )
static
Returns
Get value to know if when reading a .SLDDRW file, we are using graphic or semantic representation.
Warning
call it after Dtk_API initialization.

◆ 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()

◆ GetSearchEngine()

void* SwReader::GetSearchEngine ( )

◆ GetVersion()

◆ PopulateComponentsTree() [1/2]

◆ PopulateComponentsTree() [2/2]

◆ ReadAdditionalInfos()

◆ ReadAdvancedFeature()

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

◆ ReadComponent()

◆ ReadComponentGraphic()

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

◆ ReadEntity()

◆ SetComputeBoundariesFromMesh()

static void SwReader::SetComputeBoundariesFromMesh ( Dtk_bool  inComputeBoundary)
static

Use to force to compute boundaries from mesh with solidworks 2d/3d read.

Parameters
inComputeBoundaryDTK_TRUE to compute boundaries from mesh with solidworks 2d/3d read.
Warning
call it after Dtk_API initialization and before the Dtk_API::OpenDocument call.

◆ SetConfigCreate2dCurvesOf3dGeometryForDrawings()

static void SwReader::SetConfigCreate2dCurvesOf3dGeometryForDrawings ( Dtk_bool  inCreateCurves)
static

Choose if when reading a .SLDDRW file, curves in 2D plane are created from 3D geometry (mesh / body). Activated by default.

Parameters
inCreateCurvesDTK_TRUE to create curves in 2D plane from 3D geometry (mesh / body) when reading .SLDDRW files.
Warning
call it after Dtk_API initialization and before the Dtk_API::OpenDocument call.

◆ SetConfigReadDrawingsWithGraphicRepresentation()

static void SwReader::SetConfigReadDrawingsWithGraphicRepresentation ( const Dtk_bool  readWithGraphicRepresentation)
static

When set to true, we read the graphic representation in .SLDDRW files. If false, we use the semantic representation.

Warning
call it after Dtk_API initialization.

Field Documentation

◆ _InputFile

Dtk_string Dtk_Reader::_InputFile
protectedinherited

◆ _InputFilePtr

FILE* Dtk_Reader::_InputFilePtr
protectedinherited
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