 |
DATAKIT SDK
V2026.3
|
|
|
| void | CreatePDFLayout (const Dtk_string &inFileName, Dtk_Int32 artworkIndex, std::map< Dtk_Node::NodeDataTypeEnum, Dtk_Size_t > &inModelInventory) |
| |
| void | PdfWriteArray (Dtk_Size_t inNumLines, Dtk_Size_t inNumColumns, Dtk_Double64 inCellWidth, Dtk_Double64 inCellHeight, Dtk_tab< Dtk_tab< Dtk_string > > &inTabStrings, Dtk_Double64 inCharWidth, Dtk_Double64 inCharHeight, Dtk_tab< Dtk_tab< Dtk_pnt > > &outTabPoints, Dtk_pnt inOrigin, Dtk_RGB) |
| |
| Dtk_pnt | PdfWriteCartridge (const Dtk_string &inFileName, std::map< Dtk_Node::NodeDataTypeEnum, Dtk_Size_t > &inModelInventory) |
| |
| void | PdfWriteDtk_stringAsCompositeText (const Dtk_string &inString, Dtk_RGB textColor, Dtk_pnt location, Dtk_Double64 charWidth, Dtk_Double64 charHeight) |
| |
| DtkErrorStatus | PdfWritePicture (Dtk_string imageFullPathName, Dtk_Double64 pictureBBox[4]) |
| |
◆ CreatePDFLayout()
296 if (artworkIndex > -1)
306 Dtk_Double64 annotBBox[4] = { left, bottom, right, top };
◆ PdfWriteArray()
76 outTabPoints.
resize(inNumLines + 1);
78 outTabPoints[0].
resize(inNumColumns + 1);
79 for (j = 0; j < inNumColumns + 1; j++)
81 outTabPoints[0][j] = location + xDir * (j*inCellWidth);
84 for (i = 0; i < inNumLines; i++)
86 location -= yDir * inCellHeight;
88 outTabPoints[i + 1].
resize(inNumColumns + 1);
89 for (j = 0; j < inNumColumns + 1; j++)
91 outTabPoints[i + 1][j] = (location + xDir * (j * inCellWidth));
93 location[0] = inOrigin[0];
96 for (i = 0; i < inNumLines; i++)
99 bbox[0] = outTabPoints[i + 1][0].x();
100 bbox[1] = outTabPoints[i + 1][0].y();
101 bbox[2] = outTabPoints[i][1].x();
102 bbox[3] = outTabPoints[i][1].y();
104 bbox[0] = outTabPoints[i + 1][1].x();
105 bbox[1] = outTabPoints[i + 1][1].y();
106 bbox[2] = outTabPoints[i][2].x();
107 bbox[3] = outTabPoints[i][2].y();
112 for (i = 0; i < inNumLines; i++)
114 location -= yDir * inCellHeight;
115 for (j = 0; j < inNumColumns; j++)
120 location += xDir * inCellWidth;
122 location[0] = inOrigin[0];
126 polyline->AddPoint(outTabPoints[inNumLines][inNumColumns]);
127 polyline->AddPoint(outTabPoints[inNumLines][0]);
128 polyline->AddPoint(outTabPoints[0][0]);
129 polyline->AddPoint(outTabPoints[0][inNumColumns]);
131 polyline->info()->SetCurveThickNessInMM(lineThickness);
136 for (i = 0; i < inNumLines; i++)
139 for (j = 2; j < inNumColumns + 1; j++)
141 polyline->AddPoint(outTabPoints[i + 1][j]);
144 polyline->info()->SetCurveThickNessInMM(lineThickness);
149 for (i = 0; i < inNumColumns; i++)
152 for (j = 2; j < inNumLines + 1; j++)
154 polyline->AddPoint(outTabPoints[j][i + 1]);
157 polyline->info()->SetCurveThickNessInMM(lineThickness);
◆ PdfWriteCartridge()
172 Dtk_Double64 charHeight = 5, charWidth = 4, cellHeight, cellWidth;
176 Dtk_dir xDir(1, 0, 0), yDir(0, 1, 0);
182 cellHeight = charHeight + 13;
190 Dtk_string imageFullPathName =
"../InputFiles/Images/background.jpg";
192 pictureBBox[0] = 0.0;
193 pictureBBox[1] = 0.0;
202 imageFullPathName =
"../InputFiles/Images/logodtk.bmp";
203 pictureBBox[0] = 20.0;
204 pictureBBox[1] = 20.0;
205 pictureBBox[2] = 70.0;
206 pictureBBox[3] = 70.0;
213 std::time_t t = std::time(0);
217 dateString =
"Datakit API (V" + dtkVersion +
") on :";
218 location -= 10 * yDir;
221 #if defined(_WIN32) || defined(_WIN64)
222 ctime_s(buffer,
sizeof(buffer), &t);
227 location -= 10 * yDir;
238 polyline->AddPoint(
Dtk_pnt(margin, margin));
241 polyline->info()->SetCurveThickNessInMM(2);
250 tabStrings.
resize(numLines);
251 for (i = 0; i < numLines; i++)
253 tabStrings[i].
resize(numColumns);
266 tabStrings[0][0] =
"Inventory"; tabStrings[0][1] = inFileName.
filename() + inFileName.
extension();
267 tabStrings[1][0] =
"Number of processed BODIES"; tabStrings[1][1] = numBodies;
268 tabStrings[2][0] =
"Number of processed MESHES"; tabStrings[2][1] = numMeshes;
269 tabStrings[3][0] =
"Number of processed 3D PMIS"; tabStrings[3][1] = numPMIs;
270 tabStrings[4][0] =
"Number of processed DRAWINGS"; tabStrings[4][1] = numDrawings;
274 cellHeight = charHeight + 9;
276 PdfWriteArray(numLines, numColumns, cellWidth, cellHeight, tabStrings, charWidth, charHeight, tabPoints, origin, color);
◆ PdfWriteDtk_stringAsCompositeText()
34 Dtk_dir XDir(1., 0., 0.), YDir(0., 0., 1.);
45 Dtk_Text leftText =
Dtk_Text(leftString, inbox, inbox, slant, horizontalOrVertical, text_type, text_info, text_style);
48 transfo.
setOrigin(
Dtk_pnt(inbox.GetBottomLeftPoint().x() - inbox.GetYLength(), inbox.GetBottomLeftPoint().y()));
49 inbox.Transform(transfo);
50 Dtk_Text rightText =
Dtk_Text(rightString, inbox, inbox, slant, horizontalOrVertical, text_type, text_info, text_style);
55 Dtk_Text text =
Dtk_Text(inString, inbox, inbox, slant, horizontalOrVertical, text_type, text_info, text_style);
◆ PdfWritePicture()
18 cout <<
"Image File does not exist (" << imageFullPathName.
c_str() <<
")" << endl;
◆ modelInventory
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
DtkErrorStatus Create3DAnnotation(Dtk_UInt32 inArtworkIndex, Dtk_Double64 inBBox[4], Dtk_Int32 inModelDisplayIndex=-1, Dtk_Int32 inLayerID=-1, RenderMode inRenderMode=Unset, Lighting inLighting=UnsetLighting, Dtk_bool inAnnotActivation=0)
Creates 3D Annotation from 3D artwork in current page with its 2d bounding box.
@ FdtType
Definition: dtk_maindoc.hpp:257
This is the text_style. This class gathers information about text style.
Definition: util_draw_dtk.hpp:250
@ dtkErrorFileNotExist
Definition: error_dtk.hpp:103
void setOrigin(const Dtk_pnt &O)
Set a new O center point.
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_Double64 GetCurrentPageWidth()
Gets current page width.
size_t Dtk_Size_t
Definition: define.h:711
Dtk_Double64 GetCurrentPageHeight()
Gets current page height.
void PdfWriteDtk_stringAsCompositeText(const Dtk_string &inString, Dtk_RGB textColor, Dtk_pnt location, Dtk_Double64 charWidth, Dtk_Double64 charHeight)
Definition: PdfWriteLayout.cpp:23
This is the base text class. It's part of Dtk_CompositeText. This class represents the texts and valu...
Definition: util_draw_dtk.hpp:1110
DtkErrorStatus PdfWritePicture(Dtk_string imageFullPathName, Dtk_Double64 pictureBBox[4])
Definition: PdfWriteLayout.cpp:14
@ BodyType
Definition: dtk_maindoc.hpp:254
char Dtk_bool
Definition: define.h:724
double Dtk_Double64
Definition: define.h:698
int find_substring(const Dtk_string &s1) const
find the position of a substring into a Dtk_string
Dtk_ErrorStatus WritePicture(Dtk_string inPicturePath, Dtk_Double64 inPictureBBox[4])
Write a picture.
void add_int(const int integer, int force_unsigned_int=0)
concat an int to the Dtk_string (convert the int to Dtk_string)
static Dtk_API * GetAPI()
Get DATAKIT API.
b V2026 li b Input notes support for versions from to Supports usd binary and ASCII files longitude and elevation e g Revit Project Base added instance color override handling Note product and geometry topology level b V2026 li b Input Catia improved management of file with several bodies and bad quality files Creo views in camera default colors now fixed with duplicated components improved management of files from Inventor and bad quality files various fixes translated as IFC face based surface model added writing of metadata in the nodes extra field
Definition: EN_news.txt:46
Dtk_string filename() const
File Utility : Retrieves the filename in Dtk_string form.
Dtk_ErrorStatus WriteCompositeText(Dtk_CompositeText &inCompositeText)
Write a composite text.
DTK_Text_type
Definition: str_def.h:11
int32_t Dtk_Int32
Definition: define.h:686
void resize(Dtk_Size_t n, const T &t)
Resizes the array.
Definition: util_stl_dtk.hpp:604
Dtk_ErrorStatus WritePolylines(Dtk_tab< Dtk_PolylinePtr > &inTabPolylines)
Write a set of polylines.
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_string GetVersion() const
GetVersion of DatakitLibs.
Definition: util_ptr_dtk.hpp:37
const char * c_str() const
Retrieve the ASCII conversion string.
Dtk_ErrorStatus FillRectangle(Dtk_Double64 inBBox[4], Dtk_RGB inColor)
Fills a rectangle area with color.
Dtk_string extension() const
File Utility : Retrieves the extension in Dtk_string form.
This is a mathematical point class.
Definition: dtk_pnt.hpp:20
This is the composite text class. It's basically a Dtk_Text Container. This class represents a group ...
Definition: util_draw_dtk.hpp:1525
This is a high level array class.
Definition: util_stl_dtk.hpp:84
Dtk_string Substring(const Dtk_Size_t &inStartIndex, const Dtk_Size_t &inLength) const
@ dtk_text_type_undefined
Definition: str_def.h:25
int len() const
Retrieve the length of the Dtk_string.
void PdfWriteArray(Dtk_Size_t inNumLines, Dtk_Size_t inNumColumns, Dtk_Double64 inCellWidth, Dtk_Double64 inCellHeight, Dtk_tab< Dtk_tab< Dtk_string > > &inTabStrings, Dtk_Double64 inCharWidth, Dtk_Double64 inCharHeight, Dtk_tab< Dtk_tab< Dtk_pnt > > &outTabPoints, Dtk_pnt inOrigin, Dtk_RGB)
Definition: PdfWriteLayout.cpp:62
Dtk_pnt PdfWriteCartridge(const Dtk_string &inFileName, std::map< Dtk_Node::NodeDataTypeEnum, Dtk_Size_t > &inModelInventory)
Definition: PdfWriteLayout.cpp:166
void push_back(const T &x)
Inserts an element at the end of the array.
Definition: util_stl_dtk.hpp:416
void AddText(Dtk_Text inText)
Adds a Dtk_Text to the Dtk_CompositeText.
Definition: dtk_rgb.hpp:7
Dtk_ErrorStatus SetColor(const int &R, const int &G, const int &B)
@ DrawingType
Definition: dtk_maindoc.hpp:258
static Dtk_SmartPtr< Dtk_Info > create()
Calls default constructor to allocate a new object.
This is the base bounding box class. It's used into a lot of 2D Entities This class represents the ba...
Definition: util_draw_dtk.hpp:468
static Dtk_PolylinePtr Create(const Dtk_Polyline &in)
Calls copy constructor to allocate a new object.
This is a mathematical direction class.
Definition: dtk_dir.hpp:14
@ MeshType
Definition: dtk_maindoc.hpp:255
Definition: dtk_api.hpp:75