DATAKIT SDK  V2026.2
dtk_Catiav4Reader.hpp
Go to the documentation of this file.
1 #ifndef _UTIL_G4R_READER_HPP_
2 #define _UTIL_G4R_READER_HPP_
3 
4 #include "def/define.h"
5 #include "util/dtk_reader.hpp"
6 #include "util/error_dtk.hpp"
8 
9 class CatiaV4Reader : public Dtk_Reader
10 {
11 public:
12  virtual ~CatiaV4Reader();
13  static Dtk_bool Enable();
14 
15 //Mandatory
16 //additionnal
17 //! \brief : Read analytic surface ( if available ) used to create the surface of Dtk_FacePtr
18 //! \param [in] inJele : ID of surface entity , obtain by infos->get_ID() of the Dtk_SurfacePtr of Dtk_FacePtr
19 //! [out] outSrf : Description of analytic surface found
20 //!
21 //! \return status Error
22 //! dtkErrorAPINotStarted : DtkAPI not started
23 //! dtkErrorUnavailableReader : CatiaV4 reader not enable
24 //! dtkCatiaV4_3dReadBadEntityNumber : Bad input parameter : inJele not a surface entity
25 //! dtkErrorAttributeNotFound : No analytic description available
26 //! dtkErrorNotProcessed : unknown analytic description
27 //! \remarks :
28 //! surfaces analytics read are :
29 //! -Plane (Dtk_PlaneSurface)
30 //! -Sphere (Dtk_SphericalSurface)
31 //! -Torus (Dtk_ToroidalSurface)
32 //! -Cylindrical (Dtk_CylindricalSurface)
33 //! -Conical (Dtk_ConicalSurface)
34 //!
35 //! \b Sample:
36 //! \code
37 //!
38 //!
39 //!
40 //! \endcode
42 
43  //! [Options]
44  //! \brief : Enable or disable conversion from MockUp Solid into a mesh solid
45  //! \param [in] inValue : 0 disable (default) ( MockUp Solid are a Dtk_Body )
46  //! 1 enable ( MockUp SOlid are a Dtk_mesh )
47  static void SetConfigMockUpAsMesh(int inValue );
48 
49 //! \brief : Enable or disable conversion from nurbs surfaces to analytic surfaces if defined on the file
50 //! \param [in] inValue : 0 disable (default) ( keep basic nurbs definition )
51 //! 1 enable ( try to replace by analytic surface if stored on the file )
52  static void SetConfigReadAnalyticSurface( int inValue );
53 
54  //! \brief : Enable or disable to order session tree according to CATIA V4 structure
55 //! \param [in] inValue : 0 disable (default)
56 //! 1 enable
57  static void SetConfigOrderedSessionTree( Dtk_Int32 inValue );
58 
59 //! \brief : Set Preference to change Allow Invalid Catiav4 Files
60 //! \param [in] inValue : 0 Do not read invalid (default)
61 //! 1 Allow read
62  static void SetAllowCatiaV4ReadInvalidFiles( const Dtk_bool inValue );
63 //! [Options]
64 
65 //! \brief : Internal use only - Enable or disable new color read method
66 static void EnableNewColorMethod();
68 };
69 
70 
71 //! \brief Set Preference to change Allow Invalid Catiav4 Files
72 //! \param [in] inValue 1 Allow read, 0 Do not read invalid (default)
73 //! \deprecated : use static method CatiaV4Reader::SetAllowCatiaV4ReadInvalidFiles
74 SetAsDeprecated( "v2023.1", "Use CatiaV4Reader::SetAllowCatiaV4ReadInvalidFiles instead." )
75 void SetAllowCatiaV4ReadInvalidFiles_Deprecated231( const Dtk_bool inValue );
76 
77 //! \brief : Enable or disable conversion from MockUp Solid into a mesh solid
78 //! \deprecated : use static method CatiaV4Reader::SetConfigMockUpAsMesh
79 SetAsDeprecated( "v2023.1", "Use CatiaV4Reader::SetConfigMockUpAsMesh instead." )
80 void catiav4r_SetConfigMockUpAsMesh_Deprecated231(int ival);
81 
82 //! \brief : Read analytic surface ( if available ) used to create the surface of Dtk_FacePtr
83 //! \remarks :
84 //! \deprecated : use static method CatiaV4Reader::ReadAnalyticDefinition
85 SetAsDeprecated( "v2023.1", "Use CatiaV4Reader::ReadAnalyticDefinition instead." )
86 extern Dtk_ErrorStatus CatiaV4ReadAnalyticDefinition_Deprecated231(Dtk_ID inJele,Dtk_SurfacePtr &outSrf);
87 
88 
89 #endif // of ifndef _UTIL_G4R_READER_HPP_
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:681
CatiaV4Reader::checkNewColorMethod
static Dtk_bool checkNewColorMethod()
CatiaV4Reader::ReadAnalyticDefinition
static Dtk_ErrorStatus ReadAnalyticDefinition(Dtk_ID inJele, Dtk_SurfacePtr &outSrf)
: Read analytic surface ( if available ) used to create the surface of Dtk_FacePtr
Dtk_Reader
Definition: dtk_reader.hpp:15
CatiaV4Reader::SetAllowCatiaV4ReadInvalidFiles
static void SetAllowCatiaV4ReadInvalidFiles(const Dtk_bool inValue)
: Set Preference to change Allow Invalid Catiav4 Files
CatiaV4Reader::Enable
static Dtk_bool Enable()
Dtk_bool
char Dtk_bool
Definition: define.h:717
CatiaV4Reader::SetConfigReadAnalyticSurface
static void SetConfigReadAnalyticSurface(int inValue)
: Enable or disable conversion from nurbs surfaces to analytic surfaces if defined on the file
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:679
outSrf
Dtk_SurfacePtr & outSrf
Definition: dtk_Catiav4Reader.hpp:86
error_dtk.hpp
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
CatiaV4Reader::~CatiaV4Reader
virtual ~CatiaV4Reader()
define.h
CatiaV4Reader::SetConfigOrderedSessionTree
static void SetConfigOrderedSessionTree(Dtk_Int32 inValue)
: Enable or disable to order session tree according to CATIA V4 structure
util_geom_ptr_dtk.hpp
CatiaV4Reader::SetConfigMockUpAsMesh
static void SetConfigMockUpAsMesh(int inValue)
: Enable or disable conversion from MockUp Solid into a mesh solid
dtk_reader.hpp
SetAsDeprecated
SetAsDeprecated("v2023.1", "Use CatiaV4Reader::SetAllowCatiaV4ReadInvalidFiles instead.") void SetAllowCatiaV4ReadInvalidFiles_Deprecated231(const Dtk_bool inValue)
Set Preference to change Allow Invalid Catiav4 Files.
CatiaV4Reader
Definition: dtk_Catiav4Reader.hpp:10
CatiaV4Reader::EnableNewColorMethod
static void EnableNewColorMethod()
[Options]