DATAKIT SDK  V2026.2
utilwriter.h
Go to the documentation of this file.
1 //Utility Fill Data for Writing Lib
2 #ifndef _UTILWRITER_H_
3 #define _UTILWRITER_H_
4 
7 #include "util/util_stl_dtk.hpp"
9 #include "util/util_ptr_dtk.hpp"
10 
11 /****************************************************************************/
12 //! \brief Create a Face entity and returns its Id
13 //! \param [in] inFaceName : Name for face
14 //! \param [in] inLayer : Layer for Face
15 //! \param [in] inColour : Colour For Face
16 //! \param [in] inNumSegmentIntoUVBoudaries : Number of segment for each boundaries (outer first)
17 //! \return int Id of face
18 //! \b Sample:
19 //! \code
20 //!
21 //!
22 //!
23 //! \endcode
24 int dtk_InitFaceToWrite(Dtk_string inFaceName,int inLayer,Dtk_RGB inColour, Dtk_tab<int> &inNumSegmentIntoUVBoudaries);
25 
26 /****************************************************************************/
27 //! \brief Construct basis surface(Nurbs Surface) for face
28 //! \param [in] inFaceNumber : Face number given by dtk_InitFaceToWrite
29 //! \param [in] inUDegree :
30 //! \param [in] inVDegree :
31 //! \param [in] inUKnots :
32 //! \param [in] inVKnots :
33 //! \param [in] inWeights :
34 //! \param [in] inControlPoints :
35 //! \return int
36 //! \b Sample:
37 //! \code
38 //!
39 //!
40 //!
41 //! \endcode
42 int dtk_AddBasisSurface(int inFaceNumber,int inUDegree,int inVDegree,Dtk_tab<double> &inUKnots,Dtk_tab<double> &inVKnots,Dtk_tab<double> &inWeights,Dtk_tab<Dtk_pnt> &inControlPoints);
43 
44 /****************************************************************************/
45 //! \brief Add a segment for Boundaries
46 //! \param [in] inFaceNumber : Face number given by dtk_InitFaceToWrite
47 //! \param [in] inNumBoundary :
48 //! \param [in] inNumSegment :
49 //! \param [in] inDegree :
50 //! \param [in] inKnots :
51 //! \param [in] inWeights :
52 //! \param [in] inControlPoints :
53 //! \return int
54 //! \b Sample:
55 //! \code
56 //!
57 //!
58 //!
59 //! \endcode
60 int dtk_AddSegmentInBoundary(int inFaceNumber,int inNumBoundary,int inNumSegment,int inDegree,Dtk_tab<double> &inKnots,Dtk_tab<double> &inWeights,Dtk_tab<Dtk_pnt> &inControlPoints);
61 
62 /****************************************************************************/
63 //! \brief Free memory allocated by dtk_InitFaceToWrite
64 //! \param [in] inFaceNumber : Face number given by dtk_InitFaceToWrite
65 //! \return void
66 //! \b Sample:
67 //! \code
68 //!
69 //!
70 //!
71 //! \endcode
72 void dtk_FreeFaceToWrite(int inFaceNumber);
73 
74 /****************************************************************************/
75 //! \brief Return the pointer to write
76 //! \param [in] inFaceNumber : Face number given by dtk_InitFaceToWrite
77 //! \return Dtk_EntityPtr
78 //! \b Sample:
79 //! \code
80 //!
81 //!
82 //!
83 //! \endcode
85 
86 /****************************************************************************/
87 //! \brief Create a NURBS Curve entity and return its Id
88 //! \param [in] inCurveName : Name
89 //! \param [in] inLayer : Layer
90 //! \param [in] inColour : Colour
91 //! \param [in] inDegree : degree
92 //! \param [in] inKnots : knots vector
93 //! \param [in] inWeights : weight if rationnal or empty Dtk_tab
94 //! \param [in] inControlPoints : Control points for nurbs
95 //! \return int Curve Id or -1 if failed
96 //! \b Sample:
97 //! \code
98 //!
99 //!
100 //!
101 //! \endcode
102 int dtk_InitCurveToWrite(Dtk_string inCurveName,int inLayer,Dtk_RGB inColour,int inDegree,Dtk_tab<double> &inKnots,Dtk_tab<double> &inWeights,Dtk_tab<Dtk_pnt> &inControlPoints);
103 /****************************************************************************/
104 //! \brief Create a Line entity and return its Id
105 //! \param [in] inCurveName : Name
106 //! \param [in] inLayer : Layer
107 //! \param [in] inColour : Colour
108 //! \param [in] inFirstPoint : FirstPoint of line
109 //! \param [in] inLastPoint : LastPoint of line
110 //! \return int Curve Id or -1 if failed
111 //! \b Sample:
112 //! \code
113 //!
114 //!
115 //!
116 //! \endcode
117 int dtk_InitCurveToWrite(Dtk_string inCurveName,int inLayer,Dtk_RGB inColour,const Dtk_pnt &inFirstPoint,const Dtk_pnt &inLastPoint);
118 /****************************************************************************/
119 //! \brief Create a Ellipse or Circle entity and return its Id
120 //! \param [in] inCurveName : Name
121 //! \param [in] inLayer : Layer
122 //! \param [in] inColour : Colour
123 //! \param [in] inCenterPoint : CenterPoint
124 //! \param [in] inNormal : Normal vector
125 //! \param [in] inReference : Direction for parameter U=0
126 //! \param [in] inMajorRadius : Major radius for ellipse
127 //! \param [in] inMinorRadius : Minor radius for ellipse if Major = Minor ---> Circle
128 //! \param [in] inUTrimMin : first trim parameter 0<inUTrimMin<inUTrimMax<2*Pi .If out of range --> full ellipse
129 //! \param [in] inUTrimMax : last trim parameter 0<inUTrimMin<inUTrimMax<2*Pi
130 //! \return int Curve Id or -1 if failed
131 //! \b Sample:
132 //! \code
133 //!
134 //!
135 //!
136 //! \endcode
138  int inLayer,
139  Dtk_RGB inColour,
140  const Dtk_pnt &inCenterPoint,
141  const Dtk_dir &inNormal,
142  const Dtk_dir &inReference,
143  const Dtk_Double64& inMajorRadius,
144  const Dtk_Double64& inMinorRadius,
145  const Dtk_Double64 inUTrimMin,
146  const Dtk_Double64 inUTrimMax);
147 
148 /****************************************************************************/
149 //! \brief Free memory allocated by dtk_InitCurveToWrite
150 //! \param [in] inCurveNumber : Curve number given by dtk_InitCurveToWrite
151 //! \return void
152 //! \b Sample:
153 //! \code
154 //!
155 //!
156 //!
157 //! \endcode
158 void dtk_FreeCurveToWrite(int inCurveNumber);
159 
160 /****************************************************************************/
161 //! \brief Return the pointer to write
162 //! \param [in] inCurveNumber : Curve number given by dtk_InitCurveToWrite
163 //! \return Dtk_EntityPtr
164 //! \b Sample:
165 //! \code
166 //!
167 //!
168 //!
169 //! \endcode
171 
172 /****************************************************************************/
173 //! \brief Create a point entity and return its Id
174 //! \param [in] inPointName : Name for point
175 //! \param [in] inLayer : Layer for point
176 //! \param [in] inColour : Colour for point
177 //! \param [in] inPoint : coordinates
178 //! \return int
179 //! \b Sample:
180 //! \code
181 //!
182 //!
183 //!
184 //! \endcode
185 int dtk_InitPointToWrite(Dtk_string inPointName,int inLayer,Dtk_RGB inColour,Dtk_pnt inPoint);
186 
187 /****************************************************************************/
188 //! \brief Free memory allocated by dtk_InitPointToWrite
189 //! \param [in] inPointNumber : Point number given by dtk_InitPointToWrite
190 //! \return void
191 //! \b Sample:
192 //! \code
193 //!
194 //!
195 //!
196 //! \endcode
197 void dtk_FreePointToWrite(int inPointNumber);
198 
199 /****************************************************************************/
200 //! \brief Return the pointer to write
201 //! \param [in] inPointNumber : Point number given by dtk_InitPointToWrite
202 //! \return Dtk_EntityPtr
203 //! \b Sample:
204 //! \code
205 //!
206 //!
207 //!
208 //! \endcode
210 
211 
212 /****************************************************************************/
213 //! \brief Dump a Face into binary file to send us if writing fails
214 //! \param [in] inFileName : Name for Dump File
215 //! \param [in] inFaceNumber : id for Face to dump
216 //! \return void
217 //! \b Sample:
218 //! \code
219 //!
220 //!
221 //!
222 //! \endcode
223 void dtk_DumpFaceToWrite(Dtk_string inFileName,int inFaceNumber);
224 
225 
226 #endif
227 
dtk_AddBasisSurface
int dtk_AddBasisSurface(int inFaceNumber, int inUDegree, int inVDegree, Dtk_tab< double > &inUKnots, Dtk_tab< double > &inVKnots, Dtk_tab< double > &inWeights, Dtk_tab< Dtk_pnt > &inControlPoints)
Construct basis surface(Nurbs Surface) for face.
dtk_DumpFaceToWrite
void dtk_DumpFaceToWrite(Dtk_string inFileName, int inFaceNumber)
Dump a Face into binary file to send us if writing fails.
dtk_InitPointToWrite
int dtk_InitPointToWrite(Dtk_string inPointName, int inLayer, Dtk_RGB inColour, Dtk_pnt inPoint)
Create a point entity and return its Id.
dtk_GetFaceToWrite
Dtk_EntityPtr dtk_GetFaceToWrite(int inFaceNumber)
Return the pointer to write.
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_Double64
double Dtk_Double64
Definition: define.h:691
dtk_pnt.hpp
dtk_InitFaceToWrite
int dtk_InitFaceToWrite(Dtk_string inFaceName, int inLayer, Dtk_RGB inColour, Dtk_tab< int > &inNumSegmentIntoUVBoudaries)
Create a Face entity and returns its Id.
dtk_FreeCurveToWrite
void dtk_FreeCurveToWrite(int inCurveNumber)
Free memory allocated by dtk_InitCurveToWrite.
dtk_InitCurveToWrite
int dtk_InitCurveToWrite(Dtk_string inCurveName, int inLayer, Dtk_RGB inColour, int inDegree, Dtk_tab< double > &inKnots, Dtk_tab< double > &inWeights, Dtk_tab< Dtk_pnt > &inControlPoints)
Create a NURBS Curve entity and return its Id.
dtk_FreeFaceToWrite
void dtk_FreeFaceToWrite(int inFaceNumber)
Free memory allocated by dtk_InitFaceToWrite.
dtk_AddSegmentInBoundary
int dtk_AddSegmentInBoundary(int inFaceNumber, int inNumBoundary, int inNumSegment, int inDegree, Dtk_tab< double > &inKnots, Dtk_tab< double > &inWeights, Dtk_tab< Dtk_pnt > &inControlPoints)
Add a segment for Boundaries.
Dtk_SmartPtr< Dtk_Entity >
Dtk_pnt
This is a mathematical point class.
Definition: dtk_pnt.hpp:20
dtk_GetPointToWrite
Dtk_EntityPtr dtk_GetPointToWrite(int inPointNumber)
Return the pointer to write.
util_stl_dtk.hpp
util_ptr_dtk.hpp
Dtk_tab< int >
dtk_FreePointToWrite
void dtk_FreePointToWrite(int inPointNumber)
Free memory allocated by dtk_InitPointToWrite.
dtk_string.hpp
dtk_rgb.hpp
Dtk_RGB
Definition: dtk_rgb.hpp:7
Dtk_dir
This is a mathematical direction class.
Definition: dtk_dir.hpp:14
dtk_GetCurveToWrite
Dtk_EntityPtr dtk_GetCurveToWrite(int inCurveNumber)
Return the pointer to write.