-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdata_converter.h
More file actions
46 lines (39 loc) · 1.79 KB
/
data_converter.h
File metadata and controls
46 lines (39 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include <QSvgRenderer>
#include "csv.h"
#include "dx_data.h"
#include "dx_iface.h"
#include "part.h"
#include "sheet.h"
#include "transformed_shape.h"
#include "svg_helper.h"
namespace nesting {
void read_from_csv(const std::string& path,
std::vector<nesting::geo::Polygon_with_holes_2>& polygons,
std::vector<uint32_t>& allowed_rotations,
std::vector<uint32_t>& quantity);
void read_from_cad(const std::string& path,
std::vector<nesting::geo::Polygon_with_holes_2>& polygons,
std::vector<uint32_t>& allowed_rotations,
std::vector<uint32_t>& quantity);
void read_from_svg(const std::string& path,
std::vector<nesting::geo::Polygon_with_holes_2>& polygons,
std::vector<uint32_t>& allowed_rotations,
std::vector<uint32_t>& quantity);
bool write_to_txt(const std::string& path,
const double& best_utilization,
const double& sheet_width,
const double& sheet_length,
const std::vector<geo::Polygon_with_holes_2>& res);
void polygon_to_svg(std::ofstream& ofs, const Polygon_with_holes_2& p);
bool write_to_svg(const std::string& path,
const double& best_utilization,
const double& sheet_width,
const double& sheet_length,
const std::vector<geo::Polygon_with_holes_2>& res);
bool write_to_dxf(const std::string& path,
const double& best_utilization,
const double& sheet_width,
const double& sheet_length,
const std::vector<geo::Polygon_with_holes_2>& res);
} // namespace nesting