mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-03 10:32:40 +00:00
Ported some methods including add_model_object() and apply_config() to XS
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "PrintConfig.hpp"
|
||||
#include "Point.hpp"
|
||||
#include "Layer.hpp"
|
||||
#include "Model.hpp"
|
||||
#include "PlaceholderParser.hpp"
|
||||
|
||||
|
||||
@@ -70,7 +71,6 @@ class PrintObject
|
||||
public:
|
||||
// vector of (vectors of volume ids), indexed by region_id
|
||||
std::vector<std::vector<int> > region_volumes;
|
||||
Points copies; // Slic3r::Point objects in scaled G-code coordinates
|
||||
PrintObjectConfig config;
|
||||
t_layer_height_ranges layer_height_ranges;
|
||||
|
||||
@@ -95,7 +95,10 @@ class PrintObject
|
||||
|
||||
Print* print();
|
||||
ModelObject* model_object();
|
||||
|
||||
|
||||
Points copies() const;
|
||||
void set_copies(const Points &points);
|
||||
|
||||
// adds region_id, too, if necessary
|
||||
void add_region_volume(int region_id, int volume_id);
|
||||
|
||||
@@ -119,6 +122,7 @@ class PrintObject
|
||||
private:
|
||||
Print* _print;
|
||||
ModelObject* _model_object;
|
||||
Points _copies; // Slic3r::Point objects in scaled G-code coordinates
|
||||
|
||||
// TODO: call model_object->get_bounding_box() instead of accepting
|
||||
// parameter
|
||||
@@ -164,6 +168,8 @@ class Print
|
||||
bool invalidate_step(PrintStep step);
|
||||
bool invalidate_all_steps();
|
||||
|
||||
void add_model_object(ModelObject* model_object, int idx = -1);
|
||||
bool apply_config(DynamicPrintConfig config);
|
||||
void init_extruders();
|
||||
|
||||
std::set<size_t> extruders() const;
|
||||
@@ -174,6 +180,7 @@ class Print
|
||||
private:
|
||||
void clear_regions();
|
||||
void delete_region(size_t idx);
|
||||
PrintRegionConfig _region_config_from_model_volume(const ModelVolume &volume);
|
||||
};
|
||||
|
||||
#define FOREACH_BASE(type, container, iterator) for (type::const_iterator iterator = (container).begin(); iterator != (container).end(); ++iterator)
|
||||
|
||||
Reference in New Issue
Block a user