blob: 7542910678a92d58f23616a3172d05e96369d17d (
plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
//Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#ifndef SCENE_H
#define SCENE_H
#include "ExtruderTrain.h" //To store the extruders in the scene.
#include "MeshGroup.h" //To store the mesh groups in the scene.
#include "settings/Settings.h" //To store the global settings.
namespace cura
{
/*
* Represents a scene that should be sliced.
*/
class Scene
{
public:
/*
* \brief The global settings in the scene.
*/
Settings settings;
/*
* \brief Which extruder to evaluate each setting on, if different from the
* normal extruder of the object it's evaluated for.
*/
std::unordered_map<std::string, ExtruderTrain*> limit_to_extruder;
/*
* \brief The mesh groups in the scene.
*/
std::vector<MeshGroup> mesh_groups;
/*
* \brief The extruders in the scene.
*/
std::vector<ExtruderTrain> extruders;
/*
* \brief The mesh group that is being processed right now.
*
* During initialisation this may be nullptr. For the most part, during the
* slicing process, you can be assured that this will not be null so you can
* safely dereference it.
*/
std::vector<MeshGroup>::iterator current_mesh_group;
/*
* \brief Create an empty scene.
*
* This scene will have no models in it, no extruders, no settings, no
* nothing.
* \param num_mesh_groups The number of mesh groups to allocate for.
*/
Scene(const size_t num_mesh_groups);
/*
* \brief Gets a string that contains all settings.
*
* This string mimics the command line call of CuraEngine. In theory you
* could call CuraEngine with this output in the command in order to
* reproduce the output.
*/
const std::string getAllSettingsString() const;
/*
* \brief Generate the 3D printing instructions to print a given mesh group.
* \param mesh_group The mesh group to slice.
*/
void processMeshGroup(MeshGroup& mesh_group);
private:
/*
* \brief You are not allowed to copy the scene.
*/
Scene(const Scene&) = delete;
/*
* \brief You are not allowed to copy by assignment either.
*/
Scene& operator =(const Scene&) = delete;
};
} //namespace cura
#endif //SCENE_H
|